From 2195d5e6b87fc6c3c46851f28ce3a6fe71189f17 Mon Sep 17 00:00:00 2001 From: emmett1 Date: Tue, 25 Feb 2025 00:02:22 +0800 Subject: nodejs: fix build when using libressl --- repos/extra/nodejs/abuild | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) (limited to 'repos/extra/nodejs/abuild') diff --git a/repos/extra/nodejs/abuild b/repos/extra/nodejs/abuild index 179a64d8..c3b4e261 100644 --- a/repos/extra/nodejs/abuild +++ b/repos/extra/nodejs/abuild @@ -4,13 +4,23 @@ release=1 source="https://$name.org/dist/v$version/node-v$version.tar.xz" build() { - ./configure --prefix=/usr \ - --shared-cares \ - --shared-libuv \ - --shared-openssl \ - --shared-nghttp2 \ - --shared-zlib \ - --with-intl=system-icu + # use system openssl when openssl installed + if [ -f $SPM_PKGDB/openssl ]; then + _opt="--shared-openssl" + fi + # use ninja when ninja/samurai installed + if [ -f $SPM_PKGDB/ninja ] || [ -f $SPM_PKGDB/samurai ]; then + _opt="$_opt --ninja" + fi + ./configure \ + --prefix=/usr \ + --shared-cares \ + --shared-libuv \ + --shared-nghttp2 \ + --shared-nghttp3 \ + --shared-zlib \ + --with-intl=system-icu \ + $_opt make make install } -- cgit v1.2.3