Skip to content

Commit

Permalink
node-js: add v17.9.1, v20.15.0, v21.7.3, v22.3.0, v22.4.0 (spack#45007)
Browse files Browse the repository at this point in the history
* Adding new versions and compilation conflict for nodejs
* Update failed version for gcc14
* Updating conflicts notes for correctness/clarity/format
* Applying spack-ized versions of fix in nodejs/node#52223 to adddress CI failures
* Update fix-old-glibc-random-headers.patch
* Update package.py
* Update fix-old-glibc-random-headers.patch
* Update fix-old-glibc-random-headers.patch
* Adding conflict for older glibc
* Fixing patch for older systems, need to undef
* Removing overly strict conflicts

---------

Signed-off-by: Teague Sterling <[email protected]>
  • Loading branch information
teaguesterling authored and FrederickDeny committed Aug 26, 2024
1 parent 0c02f5e commit 84deebb
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
diff --git a/deps/cares/config/linux/ares_config.h b/deps/cares/config/linux/ares_config.h
index 3cb135a..88934ad 100644
--- a/deps/cares/config/linux/ares_config.h
+++ b/deps/cares/config/linux/ares_config.h
@@ -116,7 +116,7 @@
#define HAVE_GETNAMEINFO 1

/* Define to 1 if you have `getrandom` */
-#define HAVE_GETRANDOM 1
+#undef HAVE_GETRANDOM

/* Define to 1 if you have `getservbyport_r` */
#define HAVE_GETSERVBYPORT_R 1
@@ -329,7 +329,7 @@
#define HAVE_SYS_PARAM_H 1

/* Define to 1 if you have the <sys/random.h> header file. */
-#define HAVE_SYS_RANDOM_H 1
+#undef HAVE_SYS_RANDOM_H

/* Define to 1 if you have the <sys/select.h> header file. */
#define HAVE_SYS_SELECT_H 1
18 changes: 15 additions & 3 deletions var/spack/repos/builtin/packages/node-js/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,22 @@ class NodeJs(Package):
license("Unicode-TOU")

# Current (latest features) - odd major number
version("21.7.3", sha256="ce1f61347671ef219d9c2925313d629d3fef98fc8d7f5ef38dd4656f7d0f58e7")
version("19.2.0", sha256="aac9d1a366fb57d68f4639f9204d1de5d6387656959a97ed929a5ba9e62c033a")
version("17.9.1", sha256="1102f5e0aafaab8014d19c6c57142caf2ba3ef69d88d7a7f0f82798051796027")
version("15.3.0", sha256="cadfa384a5f14591b84ce07a1afe529f28deb0d43366fb0ae4e78afba96bfaf2")
version("13.8.0", sha256="815b5e1b18114f35da89e4d98febeaba97555d51ef593bd5175db2b05f2e8be6")
version("13.5.0", sha256="4b8078d896a7550d7ed399c1b4ac9043e9f883be404d9b337185c8d8479f2db8")

# LTS (recommended for most users) - even major number
version(
"18.12.1",
sha256="ba8174dda00d5b90943f37c6a180a1d37c861d91e04a4cb38dc1c0c74981c186",
"22.4.0",
sha256="b62cd83c9a57a11349883f89b1727a16e66c02eb6255a4bf32714ff5d93165f5",
preferred=True,
)
version("22.3.0", sha256="6326484853093ab6b8f361a267445f4a5bff469042cda11a3585497b13136b55")
version("20.15.0", sha256="01e2c034467a324a33e778c81f2808dff13d289eaa9307d3e9b06c171e4d932d")
version("18.12.1", sha256="ba8174dda00d5b90943f37c6a180a1d37c861d91e04a4cb38dc1c0c74981c186")
version("16.18.1", sha256="3d24c9c3a953afee43edc44569045eda56cd45cd58b0539922d17da62736189c")
version("14.21.1", sha256="76ba961536dc11e4dfd9b198c61ff3399e655eca959ae4b66d926f29bfcce9d3")
version("14.16.1", sha256="5f5080427abddde7f22fd2ba77cd2b8a1f86253277a1eec54bc98a202728ce80")
Expand Down Expand Up @@ -79,9 +84,16 @@ class NodeJs(Package):
# https://github.com/spack/spack/issues/19310
conflicts(
"%gcc@:4.8",
msg="fails to build with gcc 4.8 (see https://github.com/spack/spack/issues/19310",
msg="fails to build with gcc 4.8 (see https://github.com/spack/spack/issues/19310)",
)

conflicts(
"%gcc@14:", when="@:19", msg="fails to build with gcc 14+ due to implicit conversions"
)

# See https://github.com/nodejs/node/issues/52223
patch("fix-old-glibc-random-headers.patch", when="^glibc@:2.24")

def setup_build_environment(self, env):
# Force use of experimental Python 3 support
env.set("PYTHON", self.spec["python"].command.path)
Expand Down

0 comments on commit 84deebb

Please sign in to comment.