pantry/projects/nodejs.org/package.yml
Jacob Heider 5f67cff88e
fix(node) (#6157)
* fix(node)

closes #6155

* --gcc-toolchain

* CXXFLAGS

* #ifndef

* maybe it's old clang?

* maybe it needs to be gcc

* gcc to dep :(
2024-05-16 17:30:11 -04:00

59 lines
1.1 KiB
YAML

distributable:
url: https://nodejs.org/dist/v{{ version }}/node-v{{ version }}.tar.xz
strip-components: 1
versions:
github: nodejs/node/tags
companions:
npmjs.com: '*'
dependencies:
# prior builds of nodejs used our icu4c
unicode.org: ^71
openssl.org: 1.1
zlib.net: 1
linux:
gnu.org/gcc: '*' # libc++, since 22.2.0
provides:
- bin/node
interprets:
extensions: js
args: node
build:
dependencies:
python.org: ~3.9
script:
- run: python configure.py $ARGS
if: <14
- run: ./configure $ARGS
if: '>=14'
# v22 didn't include iomanip for std::precision in one file
- run: |
sed -i '/wasm-disassembler.h/a\
\
#include <iomanip>' wasm-disassembler.cc
working-directory: deps/v8/src/wasm
if: ^22
- make --jobs {{ hw.concurrency }} install
env:
ARGS:
- --without-npm
- --prefix={{ prefix }}
- --shared-openssl
- --shared-zlib
linux/x86-64:
CFLAGS: -fPIC
CXXFLAGS: -fPIC
LDFLAGS: -pie
test:
script: |
out=$(node $FIXTURE)
test "$out" = "Hello, world!"
fixture: console.log("Hello, world!");