[atlas] 05/08: Add -lpthread to dynamic libs and .pc file when building the custom package.

Sébastien Villemot sebastien at debian.org
Thu Aug 10 17:07:36 UTC 2017


This is an automated email from the git hooks/post-receive script.

sebastien pushed a commit to branch master
in repository atlas.

commit 726a9966a6de2647fad200e01a11e7caeb8677b9
Author: Sébastien Villemot <sebastien at debian.org>
Date:   Thu Aug 10 18:37:36 2017 +0200

    Add -lpthread to dynamic libs and .pc file when building the custom package.
---
 debian/rules | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/debian/rules b/debian/rules
index 2dd9cb6..84cd9cd 100755
--- a/debian/rules
+++ b/debian/rules
@@ -117,7 +117,7 @@ override_dh_auto_build:
 	# Rather create our shared versions of individual ATLAS libraries
 	gfortran $(LDFLAGS) -shared -Wl,-soname=libatlas.so.3 -o libatlas.so.$(DEB_VERSION_UPSTREAM) \
 		-Wl,--whole-archive build/lib/libatlas.a -Wl,--no-whole-archive \
-		-lc -lm
+		$$(test -f build/lib/libptcblas.a && echo -lpthread) -lc -lm
 	ln -sf libatlas.so.$(DEB_VERSION_UPSTREAM) libatlas.so.3
 	ln -sf libatlas.so.$(DEB_VERSION_UPSTREAM) libatlas.so
 
@@ -172,10 +172,13 @@ override_dh_auto_build:
 	rm -rf tmp
 	gfortran $(LDFLAGS) -shared -Wl,-soname=libblas.so.3 -o libblas.so.$(DEB_VERSION_UPSTREAM) \
 		-Wl,--whole-archive libblas.a -Wl,--no-whole-archive \
-		-L. -latlas -lm -lc
+		-L. -latlas $$(test -f build/lib/libptcblas.a && echo -lpthread) -lm -lc
 	ln -sf libblas.so.$(DEB_VERSION_UPSTREAM) libblas.so.3
 	ln -sf libblas.so.$(DEB_VERSION_UPSTREAM) libblas.so
 
+	# Kludge to fix blas-atlas.pc by adding -lpthread when needed
+	if test -f build/lib/libptcblas.a; then sed -i 's/^Libs.private: \(.*\)/Libs.private: \1 -lpthread/' debian/blas-atlas.pc; fi
+
 	# Create static and shared full LAPACK
 	# Note that we unpack liblapack_atlas.a after liblapack_pic.a, in order to overwrite routines in the former
 	mkdir tmp

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/atlas.git



More information about the debian-science-commits mailing list