unify configure.py calls into single command

This should fix and prevent bugs resulting from only adding a configure
option to either bootstrap or non-bootstrap variant when the intention
was to add it to both.

Resolves: rhbz#2009880
This commit is contained in:
Jan Staněk 2022-04-04 14:48:57 +02:00
parent 975cd082a0
commit d0e0545474
No known key found for this signature in database
GPG key ID: 2972F2037B243B6D

View file

@ -430,53 +430,28 @@ export NODE_GYP_FORCE_PYTHON=%{__python3}
# build with debugging symbols and add defines from libuv (#892601) # build with debugging symbols and add defines from libuv (#892601)
# Node's v8 breaks with GCC 6 because of incorrect usage of methods on # Node's v8 breaks with GCC 6 because of incorrect usage of methods on
# NULL objects. We need to pass -fno-delete-null-pointer-checks # NULL objects. We need to pass -fno-delete-null-pointer-checks
export CFLAGS='%{optflags} \ extra_cflags=(
-D_LARGEFILE_SOURCE \ -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 \ -D_FILE_OFFSET_BITS=64
-DZLIB_CONST \ -DZLIB_CONST
-fno-delete-null-pointer-checks' -fno-delete-null-pointer-checks
export CXXFLAGS='%{optflags} \ )
-D_LARGEFILE_SOURCE \ export CFLAGS="%{optflags} ${extra_cflags[*]}" CXXFLAGS="%{optflags} ${extra_cflags[*]}"
-D_FILE_OFFSET_BITS=64 \
-DZLIB_CONST \
-fno-delete-null-pointer-checks'
# Explicit new lines in C(XX)FLAGS can break naive build scripts
export CFLAGS="$(echo ${CFLAGS} | tr '\n\\' ' ')"
export CXXFLAGS="$(echo ${CXXFLAGS} | tr '\n\\' ' ')"
export LDFLAGS="%{build_ldflags}" export LDFLAGS="%{build_ldflags}"
%if %{with bootstrap}
%{__python3} configure.py --prefix=%{_prefix} \ %{__python3} configure.py --prefix=%{_prefix} \
--shared \ --shared \
--libdir=%{_lib} \ --libdir=%{_lib} \
%{ssl_configure} \ %{ssl_configure} \
%if !%{with bundled_zlib} %{!?with_bundled_zlib:--shared-zlib} \
--shared-zlib \
%endif
--shared-brotli \ --shared-brotli \
--without-dtrace \ %{!?with_bootstrap:--shared-libuv} \
--with-intl=small-icu \ %{!?with_bootstrap:%{nghttp2_configure} \
--without-corepack \ %{?with_bootstrap:--without-dtrace}%{!?with_bootstrap:--with-dtrace} \
--openssl-use-def-ca-store
%else
%{__python3} configure.py --prefix=%{_prefix} \
--shared \
--libdir=%{_lib} \
%{ssl_configure} \
%if !%{with bundled_zlib}
--shared-zlib \
%endif
--shared-brotli \
--shared-libuv \
%{nghttp2_configure} \
--with-dtrace \
--with-intl=small-icu \ --with-intl=small-icu \
--with-icu-default-data-dir=%{icudatadir} \ --with-icu-default-data-dir=%{icudatadir} \
--without-corepack \ --without-corepack \
--openssl-use-def-ca-store --openssl-use-def-ca-store
%endif
%make_build BUILDTYPE=Release %make_build BUILDTYPE=Release
@ -721,6 +696,7 @@ end
%changelog %changelog
* Mon Apr 04 2022 Jan Staněk <jstanek@redhat.com> - 16.14.1-2 * Mon Apr 04 2022 Jan Staněk <jstanek@redhat.com> - 16.14.1-2
- Unify configure.py calls into single command
* Thu Mar 17 2022 Stephen Gallagher <sgallagh@redhat.com> - 1:16.14.1-1 * Thu Mar 17 2022 Stephen Gallagher <sgallagh@redhat.com> - 1:16.14.1-1
- Update to Node.js 16.14.1 - Update to Node.js 16.14.1