From 415fcd5efe8b48402f4327c9e51b07bf4bea1214 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Stan=C4=9Bk?= Date: Mon, 4 Apr 2022 14:48:57 +0200 Subject: [PATCH] unify configure.py calls into single command MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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#2056971 Signed-off-by: Jan Staněk --- nodejs.spec | 38 ++++++++++---------------------------- 1 file changed, 10 insertions(+), 28 deletions(-) diff --git a/nodejs.spec b/nodejs.spec index 621b2ee..54674c1 100644 --- a/nodejs.spec +++ b/nodejs.spec @@ -379,45 +379,26 @@ export CXX='g++' # build with debugging symbols and add defines from libuv (#892601) # 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 -export CFLAGS='%{optflags} \ - -D_LARGEFILE_SOURCE \ - -D_FILE_OFFSET_BITS=64 \ - -DZLIB_CONST \ - -fno-delete-null-pointer-checks' -export CXXFLAGS='%{optflags} \ - -D_LARGEFILE_SOURCE \ - -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\\' ' ')" - +extra_cflags=( + -D_LARGEFILE_SOURCE + -D_FILE_OFFSET_BITS=64 + -DZLIB_CONST + -fno-delete-null-pointer-checks +) +export CFLAGS="%{optflags} ${extra_cflags[*]}" CXXFLAGS="%{optflags} ${extra_cflags[*]}" export LDFLAGS="%{build_ldflags}" -%if %{with bootstrap} %{__python3} configure.py --prefix=%{_prefix} \ --shared-openssl \ --shared-zlib \ --shared-brotli \ - --with-dtrace \ - --with-intl=small-icu \ - --openssl-use-def-ca-store \ - --openssl-default-cipher-list=PROFILE=SYSTEM -%else -%{__python3} configure.py --prefix=%{_prefix} \ - --shared-openssl \ - --shared-zlib \ - --shared-brotli \ - --shared-libuv \ - --shared-nghttp2 \ + %{!?with_bootstrap:--shared-libuv} \ + %{!?with_bootstrap:--shared-nghttp2} \ --with-dtrace \ --with-intl=small-icu \ --with-icu-default-data-dir=%{icudatadir} \ --openssl-use-def-ca-store \ --openssl-default-cipher-list=PROFILE=SYSTEM -%endif %if %{?with_debug} == 1 # Setting BUILDTYPE=Debug builds both release and debug binaries @@ -697,6 +678,7 @@ end %changelog * Mon Apr 25 2022 Jan Staněk - 1:16.14.0-5 +- Unify configure calls into single command * Mon Apr 11 2022 Zuzana Svetlikova - 1:16.14.0-4 - Apply lock file validation fixes