[hdf5] 02/03: No java wrapper library on hppa and hurd-i386

Gilles Filippini pini at debian.org
Sun Dec 4 15:32:58 UTC 2016


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

pini pushed a commit to branch master
in repository hdf5.

commit 794c4a2b25b213c2fda6c73bb4bfb3d3091a3a2d
Author: Gilles Filippini <pini at debian.org>
Date:   Fri Dec 2 11:35:11 2016 +0100

    No java wrapper library on hppa and hurd-i386
    
    where there is no JDK >= 1.7.
---
 debian/changelog  |  7 +++++++
 debian/control    |  2 +-
 debian/control.in |  2 +-
 debian/rules      | 32 ++++++++++++++++++++++++--------
 4 files changed, 33 insertions(+), 10 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index d73bb84..c1783f2 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+hdf5 (1.10.0-patch1+docs-2~exp3) experimental; urgency=medium
+
+  * Don't build the java wrapper library on hppa and hurd-i386 where
+    there is no JDK >= 1.7
+
+ -- Gilles Filippini <pini at debian.org>  Fri, 02 Dec 2016 11:32:12 +0100
+
 hdf5 (1.10.0-patch1+docs-2~exp2) experimental; urgency=medium
 
   * Fix FTBFS on kfreebsd-*
diff --git a/debian/control b/debian/control
index 6ca1eb8..7ac035a 100644
--- a/debian/control
+++ b/debian/control
@@ -8,7 +8,7 @@ Build-Depends: debhelper (>= 10~), mpi-default-dev, libmpich-dev, zlib1g-dev,
  libjpeg-dev, gfortran,
  sharutils, chrpath, autotools-dev, automake, dh-autoreconf,
  libaec-dev,
- default-jdk-headless, javahelper,
+ default-jdk-headless (>= 2:1.7) [!hppa !hurd-i386], javahelper [!hppa !hurd-i386],
 Build-Depends-Indep:
  doxygen, php-cli,
 Standards-Version: 3.9.8
diff --git a/debian/control.in b/debian/control.in
index 6585f19..595c05b 100644
--- a/debian/control.in
+++ b/debian/control.in
@@ -8,7 +8,7 @@ Build-Depends: debhelper (>= 10~), mpi-default-dev, libmpich-dev, zlib1g-dev,
  libjpeg-dev, gfortran,
  sharutils, chrpath, autotools-dev, automake, dh-autoreconf,
  libaec-dev,
- default-jdk-headless, javahelper,
+ default-jdk-headless (>= 2:1.7) [!hppa !hurd-i386], javahelper [!hppa !hurd-i386],
 Build-Depends-Indep:
  doxygen, php-cli,
 Standards-Version: 3.9.8
diff --git a/debian/rules b/debian/rules
index edafea7..6122b04 100755
--- a/debian/rules
+++ b/debian/rules
@@ -102,7 +102,19 @@ CONFIGURE_FLAGS = --prefix=/usr --host=$(DEB_HOST_GNU_TYPE) \
 		  --with-szlib \
 		  --enable-fortran --enable-fortran2003
 FLAVOR_FLAGS = --includedir=\$${prefix}/include/hdf5/$(1) --with-flavor=$(1)
-SERIAL_FLAGS = $(call FLAVOR_FLAGS,serial) --enable-threadsafe --enable-cxx --enable-java
+SERIAL_FLAGS = $(call FLAVOR_FLAGS,serial) --enable-threadsafe --enable-cxx
+
+# No java >= 1.7 on hppa and hurd-i386
+ifeq (,$(filter $(DEB_HOST_ARCH),hppa hurd-i386))
+SERIAL_FLAGS += --enable-java
+DH_HELPERS = --with-javahelper
+install_jni := install_jni
+dh_install_java := dh_install_java
+PACKAGES_java := libhdf5-java libhdf5-jni
+else
+export DH_OPTIONS += -Nlibhdf5-java -Nlibhdf5-jni
+endif
+
 OPENMPI_FLAGS = $(call FLAVOR_FLAGS,openmpi) --enable-parallel=yes
 MPICH_FLAGS = $(call FLAVOR_FLAGS,mpich) --enable-parallel=yes
 
@@ -182,7 +194,7 @@ $(foreach flavor,$(FLAVORS),$(eval $(call helper_flavor_rule,$(flavor),$(flavorp
 
 
 %:
-	dh $@ --with javahelper
+	dh $@ $(DH_HELPERS)
 
 override_dh_auto_clean: debian/control
 	rm -fr $(DEBIAN_OUT)
@@ -225,15 +237,17 @@ install_%:
 	dh_auto_install --builddirectory=$(builddir) --destdir=$(destdir)
 	chrpath -d $(destdir)/usr/lib/*/libhdf5*so*
 
-override_dh_auto_install-arch: serial_builddir = $(CURDIR)/debian/build-serial
-override_dh_auto_install-arch: serial_destdir = $(serial_builddir)/tmpinst
-override_dh_auto_install-arch: $(foreach flavor,$(FLAVORS),install_$(flavor))
+install_jni: serial_builddir = $(CURDIR)/debian/build-serial
+install_jni: serial_destdir = $(serial_builddir)/tmpinst
+install_jni: install_serial
 	dh_auto_install --builddirectory=$(serial_builddir)/java/src/jni --destdir=$(serial_destdir)
 	jnilib=$(serial_destdir)/usr/lib/$(DEB_HOST_MULTIARCH)/libhdf5_java.so && \
 	install -D $(serial_destdir)/usr/lib/$(DEB_HOST_MULTIARCH)/libhdf5_java.so \
 		$(serial_destdir)/usr/lib/$(DEB_HOST_MULTIARCH)/jni/libhdf5_java.so
 
-PACKAGES_serial := $(serpack) $(package)-dev hdf5-helpers hdf5-tools $(sercpppack) libhdf5-java libhdf5-jni
+override_dh_auto_install-arch: $(foreach flavor,$(FLAVORS),install_$(flavor)) $(install_jni)
+
+PACKAGES_serial := $(serpack) $(package)-dev hdf5-helpers hdf5-tools $(sercpppack) $(PACKAGES_java)
 PACKAGES_openmpi := $(openmpipack) $(package)-openmpi-dev
 PACKAGES_mpich := $(mpichpack) $(package)-mpich-dev
 
@@ -285,9 +299,11 @@ dh_install_doc:
 	  -execdir /bin/sh -c "/usr/bin/php -f '{}' > '{}.new'" \; \
 	  -exec mv "{}.new" "{}" \;
 
-override_dh_auto_build-indep: build_doc build_serial
-override_dh_auto_install-indep:
+dh_install_java: build_serial
 	mv debian/build-serial/java/src/jarhdf5-$(upstreamversion).jar debian/build-serial/java/src/jarhdf5.jar
+
+override_dh_auto_build-indep: build_doc build_serial
+override_dh_auto_install-indep: $(dh_install_java)
 override_dh_install-indep: dh_install_serial dh_install_doc
 
 override_dh_installchangelogs:

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/hdf5.git



More information about the Pkg-grass-devel mailing list