[nfft] 06/08: d/rules: skip build of nfftl if fftwl is not detected

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Tue Oct 13 18:58:20 UTC 2015


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

ghisvail-guest pushed a commit to branch debian/experimental
in repository nfft.

commit 6f4d33ad1313cea723b6e1ec6959884e4a2de1b9
Author: Ghislain Antony Vaillant <ghisvail at gmail.com>
Date:   Tue Oct 13 19:45:45 2015 +0100

    d/rules: skip build of nfftl if fftwl is not detected
---
 debian/rules | 20 +++++++++++++++++++-
 1 file changed, 19 insertions(+), 1 deletion(-)

diff --git a/debian/rules b/debian/rules
index 051fb86..b6f8399 100755
--- a/debian/rules
+++ b/debian/rules
@@ -16,14 +16,26 @@ COMMON_BUILD_OPTIONS = \
 	--enable-all \
 	--enable-openmp
 
+# Environment information.
+DEB_HOST_MULTIARCH := $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
+
+# Detect whether the long-double version of FFTW is available for the host
+# architecture. If not, the long-double build of NFFT will be discarded.
+ifeq "" "$(wildcard /usr/lib/$(DEB_HOST_MULTIARCH)/libfftw3l.so)"
+DH_SKIP_NFFTL = --no-package=libnfft3-long2
+endif
+
 %:
 	dh $@ --parallel --with autoreconf \
-		--dbg-package=libnfft3-dbg
+		--dbg-package=libnfft3-dbg \
+		$(DH_SKIP_NFFTL)
 
 override_dh_auto_clean-arch:
 	dh_auto_clean --arch --builddirectory=build-nfft
 	dh_auto_clean --arch --builddirectory=build-nfftf
+ifeq "" "$(DH_SKIP_NFFTL)"
 	dh_auto_clean --arch --builddirectory=build-nfftl
+endif
 
 override_dh_auto_clean-indep:
 	dh_auto_clean --indep --builddirectory=build-indep
@@ -37,11 +49,13 @@ override_dh_auto_configure-arch:
 		--disable-doxygen-doc \
 		--enable-single \
 		--program-suffix=f
+ifeq "" "$(DH_SKIP_NFFTL)"
 	dh_auto_configure --builddirectory=build-nfftl -- \
 		$(COMMON_BUILD_OPTIONS) \
 		--disable-doxygen-doc \
 		--enable-long-double \
 		--program-suffix=l
+endif
 
 override_dh_auto_configure-indep:
 	dh_auto_configure --builddirectory=build-indep -- \
@@ -51,7 +65,9 @@ override_dh_auto_configure-indep:
 override_dh_auto_build-arch:
 	dh_auto_build --arch --builddirectory=build-nfft
 	dh_auto_build --arch --builddirectory=build-nfftf
+ifeq "" "$(DH_SKIP_NFFTL)"
 	dh_auto_build --arch --builddirectory=build-nfftl
+endif
 
 override_dh_auto_build-indep:
 	cd $(CURDIR)/build-indep && make doc
@@ -61,8 +77,10 @@ override_dh_auto_install-arch:
 		--package=libnfft3-double2
 	dh_auto_install --arch --builddirectory=build-nfftf \
 		--package=libnfft3-single2
+ifeq "" "$(DH_SKIP_NFFTL)"
 	dh_auto_install --arch --builddirectory=build-nfftl \
 		--package=libnfft3-long2
+endif
 
 override_dh_auto_install-indep:
 	# Nothing to do here.

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



More information about the debian-science-commits mailing list