[packages/nix] - up to 2.3.10 - added ldflags patch, pass empty BOOST_LDFLAGS to avoid preferring system nix libs o

qboosh qboosh at pld-linux.org
Sun Mar 14 06:57:01 CET 2021


commit 5c7feeef4996ad420c232b1fc79da6ee8e432e0d
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sun Mar 14 06:57:58 2021 +0100

    - up to 2.3.10
    - added ldflags patch, pass empty BOOST_LDFLAGS to avoid preferring system nix libs over built ones

 nix-ldflags.patch | 10 ++++++++++
 nix.spec          | 21 ++++++++++++++++-----
 2 files changed, 26 insertions(+), 5 deletions(-)
---
diff --git a/nix.spec b/nix.spec
index b910ee5..907a0e0 100644
--- a/nix.spec
+++ b/nix.spec
@@ -5,15 +5,20 @@
 Summary:	A purely functional package manager
 Summary(pl.UTF-8):	Czysto funkcyjny zarządca pakietów
 Name:		nix
-Version:	2.3.4
+Version:	2.3.10
 Release:	0.1
 License:	LGPL v2.1+
 Group:		Applications/System
+#Source0Download: https://nixos.org/download.html
 Source0:	https://nixos.org/releases/nix/%{name}-%{version}/%{name}-%{version}.tar.xz
-# Source0-md5:	0d8486cb6622bb53116200d3a3d378ca
+# Source0-md5:	116a603858b2a31f847033cdb4f40249
 Patch0:		%{name}-sh.patch
 Patch1:		%{name}-paths.patch
+Patch2:		%{name}-ldflags.patch
 URL:		https://nixos.org/nix/
+BuildRequires:	autoconf >= 2.50
+BuildRequires:	autoconf-archive
+BuildRequires:	automake
 # aws-sdk-cpp/aws-cpp-sdk-s3 (aws/s3/S3Client.h)
 BuildRequires:	boost-devel >= 1.66
 BuildRequires:	bzip2-devel
@@ -36,9 +41,9 @@ BuildRequires:	tar >= 1:1.22
 BuildRequires:	xz
 BuildRequires:	xz-devel
 Requires:	%{name}-libs = %{version}-%{release}
-Obsoletes:	nix-emacs-mode
 Provides:	/var/nix/manifests
 Provides:	/var/nix/profiles
+Obsoletes:	nix-emacs-mode < 2.3
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %define		nixdir		/var/lib/nix
@@ -86,6 +91,7 @@ Pliki nagłówkowe Niksa.
 %setup -q
 %patch0 -p1
 %patch1 -p1
+%patch2 -p1
 
 %build
 %{__aclocal} -I m4
@@ -95,7 +101,9 @@ Pliki nagłówkowe Niksa.
 	--localstatedir=%{nixdir}/var \
 	--with-store-dir=%{nixdir}/store
 
+# avoid BOOST_LDFLAGS=-L%{_libdir} which causes to link with system nix libraries instead of built ones
 %{__make} \
+	BOOST_LDFLAGS="" \
 	V=1
 
 %if %{with perl}
@@ -115,11 +123,14 @@ cd perl
 rm -rf $RPM_BUILD_ROOT
 
 %{__make} install \
-	DESTDIR=$RPM_BUILD_ROOT
+	BOOST_LDFLAGS="" \
+	DESTDIR=$RPM_BUILD_ROOT \
+	V=1
 
 %if %{with perl}
 %{__make} -C perl install \
-	DESTDIR=$RPM_BUILD_ROOT
+	DESTDIR=$RPM_BUILD_ROOT \
+	V=1
 %endif
 
 install -d $RPM_BUILD_ROOT%{nixdir}/{store,var/nix/{gcroots,profiles}/per-user}
diff --git a/nix-ldflags.patch b/nix-ldflags.patch
new file mode 100644
index 0000000..c8d4238
--- /dev/null
+++ b/nix-ldflags.patch
@@ -0,0 +1,10 @@
+--- nix-2.3.10/configure.ac.orig	2021-03-13 17:10:59.748579291 +0100
++++ nix-2.3.10/configure.ac	2021-03-13 19:03:22.665383108 +0100
+@@ -155,7 +155,6 @@
+ AX_BOOST_BASE([1.66], [CXXFLAGS="$BOOST_CPPFLAGS $CXXFLAGS"], [AC_MSG_ERROR([Nix requires boost.])])
+ # For unknown reasons, setting this directly in the ACTION-IF-FOUND above
+ # ends up with LDFLAGS being empty, so we set it afterwards.
+-LDFLAGS="$BOOST_LDFLAGS $LDFLAGS"
+ 
+ 
+ # Look for OpenSSL, a required dependency.
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/nix.git/commitdiff/5c7feeef4996ad420c232b1fc79da6ee8e432e0d



More information about the pld-cvs-commit mailing list