[eccodes] 17/106: Update from grib-tools

Alastair McKinstry mckinstry at moszumanska.debian.org
Fri Jul 28 09:05:02 UTC 2017


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

mckinstry pushed a commit to branch debian/master
in repository eccodes.

commit b0fca40ef325c46d9c39b82c519e6c6efd3773d3
Author: Alastair McKinstry <mckinstry at debian.org>
Date:   Wed Jul 27 00:31:29 2016 +0100

    Update from grib-tools
---
 debian/rules | 54 ++++++++++++++++++++++++++++++++++++++++++++----------
 1 file changed, 44 insertions(+), 10 deletions(-)

diff --git a/debian/rules b/debian/rules
index 3d987ec..5514ba0 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,6 +1,12 @@
 #!/usr/bin/make -f
 
-LIBDIR=debian/tmp/usr/lib
+export DH_VERBOSE=1
+export DEB_LDFLAGS_MAINT_PREPEND := -Wl,-z,defs -Wl,--as-needed
+
+DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
+LIBDIR=/usr/lib/$(DEB_HOST_MULTIARCH)
+BUILDDIR=$(CURDIR)/debian/build
+UPSTREAM_VERSION=$(shell dpkg-parsechangelog | sed -ne 's/^Version: \(.*\)-.*/\1/p' | sed -e 's/\+.*//; s/^[0-9]://')
 
 # For hardening
 CPPFLAGS:=$(shell dpkg-buildflags --get CPPFLAGS)
@@ -8,7 +14,9 @@ CFLAGS:=$(shell dpkg-buildflags --get CFLAGS) $(CPPFLAGS) #  -fPIC
 CXXFLAGS:=$(shell dpkg-buildflags --get CXXFLAGS) $(CPPFLAGS)
 LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS)
 
-export LDFLAGS
+export LDFLAGS CFLAGS CPPFLAGS CXXFLAGS
+
+PY3VERSM:=$(shell py3versions -d)m
 
 # Don't test on mips. will time out most of the time on low-powered archs
 DO_TEST:=true
@@ -16,6 +24,22 @@ ARCH:=$(shell dpkg --print-architecture)
 ifeq ($(ARCH), mips)
 DO_TEST:=false
 endif
+ifeq ($(ARCH),hppa)
+DO_TEST:=false
+endif
+
+BUILD_FLAGS =  \
+	-DCMAKE_BUILD_TYPE=Release \
+	-DDISABLE_OS_CHECK=ON \
+	-DENABLE_PNG=ON -DENABLE_PYTHON=ON \
+	-DENABLE_AEC=ON \
+	-DENABLE_RPATHS=OFF \
+	-DENABLE_RELATIVE_RPATHS=OFF \
+	-DHAVE_BIT_REPRODUCIBLE=ON \
+	-DCFLAGS="${CFLAGS} ${LDFLAGS}" \
+	-DENABLE_ALIGN_MEMORY=ON -DENABLE_GRIB_TIMER=ON \
+	-DENABLE_GRIB_OMP_THREADS=ON \
+	-DPYTHON_EXECUTABLE=/usr/bin/python3 
 
 %:
 	dh $@ --buildsystem=cmake --with=python3
@@ -23,20 +47,30 @@ endif
 override_dh_auto_configure:
 	# Disable python modules until we figure out how to build them properly
 	F77=gfortran dh_auto_configure -- \
-	    -DENABLE_PNG=ON -DENABLE_PYTHON=ON \
-	    -DENABLE_AEC=ON \
-	    -DCFLAGS="${CFLAGS} ${LDFLAGS}" \
-	    -DENABLE_ALIGN_MEMORY=ON -DENABLE_GRIB_TIMER=ON 
-	   
-#       	-DENABLE_ALIGN_MEMORY=ON -DENABLE_GRIB_TIMER=ON      
-#	    -DENABLE_MEMORY_MANAGEMENT=ON -DENABLE_GRIB_THREADS=ON
-
+	    ${BUILD_FLAGS}
 
 override_dh_install:
 	for d in libeccodes_f90.so	libeccodes.so ; do \
 		cp $(LIBDIR)/$$d $(LIBDIR)/$$d.0.0.0 ; done
 	dh_numpy3
 	dh_install
+	#
+	# Setup cmake files for magics++, metview, etc.
+	#
+	mkdir -p debian/libgrib-api-dev/$(LIBDIR)/cmake/grib_api
+	cp debian/tmp/usr/share/grib_api/cmake/* debian/libgrib-api-dev/$(LIBDIR)/cmake/grib_api
+	sed -e 's%$${_IMPORT_PREFIX}%/usr%' \
+	       < debian/tmp/usr/share/grib_api//cmake/grib_api-targets-release.cmake | \
+	sed -e 's%-l${PY3VERSM} %%g' | \
+	sed -e 's%${LIBDIR}/libopenjpeg.so;%%' | sed -e 's%;${LIBDIR}/libpng.so%%g' \
+	      > debian/libgrib-api-dev/$(LIBDIR)/cmake/grib_api/grib_api-targets-release.cmake
+	sed -e 's%;${LIBDIR}/libopenjpeg.so%%g' \
+	        < debian/tmp/usr/share/grib_api//cmake/grib_api-config.cmake | \
+	sed -e 's%-l${PY3VERSM} %%g' | \
+	sed -s 's%/usr/include/${PY3VERSM};%%g' | sed -e 's%/usr/include/python2.7;%%g' | \
+	sed -e 's%;${LIBDIR}/libpng.so%%g' \
+	        > debian/libgrib-api-dev/$(LIBDIR)/cmake/grib_api/grib_api-config.cmake
+
 
 override_dh_auto_clean:
 	dh_auto_clean

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



More information about the debian-science-commits mailing list