mirror of
https://github.com/void-linux/void-packages.git
synced 2025-06-12 18:13:50 +02:00
nodejs: fix i686 and some cleanup
This commit is contained in:
parent
eb36028679
commit
6883b66f35
1 changed files with 53 additions and 35 deletions
|
@ -1,14 +1,29 @@
|
||||||
# Template file for 'nodejs'
|
# Template file for 'nodejs'
|
||||||
pkgname=nodejs
|
pkgname=nodejs
|
||||||
version=22.15.0
|
version=22.15.0
|
||||||
revision=1
|
revision=2
|
||||||
hostmakedepends="which pkg-config python3-setuptools"
|
build_style=configure
|
||||||
_make_depends="zlib-devel \
|
configure_args="
|
||||||
$(vopt_if icu icu-devel) \
|
--prefix=/usr
|
||||||
$(vopt_if ssl openssl-devel) \
|
--enable-lto
|
||||||
$(vopt_if libuv libuv-devel) \
|
--shared-zlib
|
||||||
$(vopt_if nghttp2 nghttp2-devel) \
|
--shared-ada
|
||||||
$(vopt_if cares c-ares-devel) \
|
$(vopt_if icu --with-intl=system-icu)
|
||||||
|
$(vopt_if ssl --shared-openssl)
|
||||||
|
$(vopt_if libuv --shared-libuv)
|
||||||
|
$(vopt_if nghttp2 --shared-nghttp2)
|
||||||
|
$(vopt_if cares --shared-cares)
|
||||||
|
$(vopt_if brotli --shared-brotli)"
|
||||||
|
make_build_args="V=1 LD=$CXX"
|
||||||
|
hostmakedepends="pkg-config python3-setuptools"
|
||||||
|
_make_depends="
|
||||||
|
zlib-devel
|
||||||
|
ada-devel
|
||||||
|
$(vopt_if icu icu-devel)
|
||||||
|
$(vopt_if ssl openssl-devel)
|
||||||
|
$(vopt_if libuv libuv-devel)
|
||||||
|
$(vopt_if nghttp2 nghttp2-devel)
|
||||||
|
$(vopt_if cares c-ares-devel)
|
||||||
$(vopt_if brotli brotli-devel)"
|
$(vopt_if brotli brotli-devel)"
|
||||||
makedepends="${_make_depends}"
|
makedepends="${_make_depends}"
|
||||||
checkdepends="procps-ng iana-etc"
|
checkdepends="procps-ng iana-etc"
|
||||||
|
@ -56,21 +71,23 @@ esac
|
||||||
CFLAGS="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
|
CFLAGS="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
|
||||||
CXXFLAGS="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
|
CXXFLAGS="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
|
||||||
|
|
||||||
do_configure() {
|
post_patch() {
|
||||||
local _args
|
vsed -e 's/install: all/install:/' -i Makefile
|
||||||
|
}
|
||||||
|
|
||||||
|
pre_configure() {
|
||||||
export LD="$CXX"
|
export LD="$CXX"
|
||||||
if [ "$CROSS_BUILD" ]; then
|
if [ "$CROSS_BUILD" ]; then
|
||||||
case "$XBPS_TARGET_MACHINE" in
|
case "$XBPS_TARGET_MACHINE" in
|
||||||
arm*) _args="--dest-cpu=arm" ;;
|
arm*) configure_args+=" --dest-cpu=arm" ;;
|
||||||
aarch64*) _args="--dest-cpu=arm64" ;;
|
aarch64*) configure_args+=" --dest-cpu=arm64" ;;
|
||||||
ppc64*) _args="--dest-cpu=ppc64" ;;
|
ppc64*) configure_args+=" --dest-cpu=ppc64" ;;
|
||||||
ppc*) _args="--dest-cpu=ppc" ;;
|
ppc*) configure_args+=" --dest-cpu=ppc" ;;
|
||||||
mipsel*) _args="--dest-cpu=mipsel" ;;
|
mipsel*) configure_args+=" --dest-cpu=mipsel" ;;
|
||||||
mips*) _args="--dest-cpu=mips" ;;
|
mips*) configure_args+=" --dest-cpu=mips" ;;
|
||||||
i686*) _args="--dest-cpu=x86" ;;
|
i686*) configure_args+=" --dest-cpu=x86" ;;
|
||||||
x86_64*) _args="--dest-cpu=x86_64" ;;
|
x86_64*) configure_args+=" --dest-cpu=x86_64" ;;
|
||||||
riscv64*) _args="--dest-cpu=riscv64" ;;
|
riscv64*) configure_args+=" --dest-cpu=riscv64" ;;
|
||||||
*) msg_error "$pkgver: cannot be cross compiled for ${XBPS_TARGET_MACHINE}.\n" ;;
|
*) msg_error "$pkgver: cannot be cross compiled for ${XBPS_TARGET_MACHINE}.\n" ;;
|
||||||
esac
|
esac
|
||||||
# this is necessary - for example, normally compiling from ppc64le
|
# this is necessary - for example, normally compiling from ppc64le
|
||||||
|
@ -79,23 +96,25 @@ do_configure() {
|
||||||
#
|
#
|
||||||
# that results in the toolset built for target only, and attempting
|
# that results in the toolset built for target only, and attempting
|
||||||
# to execute it within the build system fails
|
# to execute it within the build system fails
|
||||||
_args+=" --cross-compiling"
|
configure_args+=" --cross-compiling"
|
||||||
|
fi
|
||||||
|
|
||||||
|
CFLAGS=${CFLAGS/-O2/}
|
||||||
|
CXXFLAGS=${CXXFLAGS/-O2/}
|
||||||
|
if [ "$XBPS_WORDSIZE" = 32 ]; then
|
||||||
|
CFLAGS=${CFLAGS/-g /-g1 }
|
||||||
|
CXXFLAGS=${CFLAGS/-g /-g1 }
|
||||||
fi
|
fi
|
||||||
./configure --prefix=/usr --shared-zlib --enable-lto \
|
|
||||||
$(vopt_if icu --with-intl=system-icu) \
|
|
||||||
$(vopt_if ssl --shared-openssl) \
|
|
||||||
$(vopt_if libuv --shared-libuv) \
|
|
||||||
$(vopt_if nghttp2 --shared-nghttp2) \
|
|
||||||
$(vopt_if cares --shared-cares) \
|
|
||||||
$(vopt_if brotli --shared-brotli) ${_args}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
do_build() {
|
pre_build() {
|
||||||
if [ "$CROSS_BUILD" ]; then
|
CFLAGS=${CFLAGS/-O2/}
|
||||||
make LD="$CXX" LDFLAGS+=-ldl ${makejobs} PORTABLE=1 V=1
|
CXXFLAGS=${CXXFLAGS/-O2/}
|
||||||
else
|
if [ "$XBPS_WORDSIZE" = 32 ]; then
|
||||||
make LD="$CXX" LDFLAGS+=-ldl ${makejobs} V=1
|
CFLAGS=${CFLAGS/-g /-g1 }
|
||||||
|
CXXFLAGS=${CFLAGS/-g /-g1 }
|
||||||
fi
|
fi
|
||||||
|
make_build_args+=" PORTABLE=1"
|
||||||
}
|
}
|
||||||
|
|
||||||
do_check() {
|
do_check() {
|
||||||
|
@ -148,9 +167,8 @@ test-tls-sni-server-client.js,\
|
||||||
make CI_SKIP_TESTS="$CI_SKIP_TESTS" LD="$CXX" LDFLAGS+=-ldl ${makejobs} V=1 test-only
|
make CI_SKIP_TESTS="$CI_SKIP_TESTS" LD="$CXX" LDFLAGS+=-ldl ${makejobs} V=1 test-only
|
||||||
}
|
}
|
||||||
|
|
||||||
do_install() {
|
post_install() {
|
||||||
make LD="$CXX" LDFLAGS+=-ldl DESTDIR="$DESTDIR" install
|
rm -rf $DESTDIR/usr/include/node/openssl
|
||||||
rm $DESTDIR/usr/include/node/openssl -rf
|
|
||||||
vlicense LICENSE
|
vlicense LICENSE
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue