Package: hdf5
Version: 1.6.6-3

Greetings,

I'm afraid your rules file doesn't build openmpi libraries on the
architectures where it's supposed to, so the openmpi packages are empty.
Looking through the build logs on every architecture where it's supposed
to work (amd64, ia64, sparc, powerpc), if I search the log for
"openmpi", I get the package installation, a couple of symlinks at the
top, then dh_makeshlibs at the very end, with no references to openmpi
in between.  I don't understand why this is; your system seems sound and
logical.

I realize that I'm the cause of a lot of your openmpi troubles, having
suggested this in the first place.  So I think I've come up with an
elegant solution to this problem, found in the patch.  Instead of
testing for the architecture in rules, each openmpi target just tests
for the file /usr/lib/openmpi/include/mpi.h, and if it finds it,
configures/builds/installs.  This patch works on amd64, haven't tested
it elsewhere.

The advantage of this approach is that when more arches support openmpi,
you can just adjust the arch lists in control, and rules will
automatically build the new openmpi packages.

I hope this patch meets with your approval, and solves this problem of
openmpi support once and for all.

Regards,
-Adam
-- 
GPG fingerprint: D54D 1AEE B11C CE9B A02B  C5DD 526F 01E8 564E E4B6

Engineering consulting with open source tools
http://www.opennovation.com/
--- hdf5-1.6.6/debian/rules~	2008-04-02 02:41:06.000000000 +0000
+++ hdf5-1.6.6/debian/rules	2008-04-02 02:40:36.000000000 +0000
@@ -18,38 +18,11 @@
 
 DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
 DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
-DEB_BUILD_ARCH      ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH)
 
 # To be used if binary packages were buildable on any arch
 #ARCH_FLAG=-a
 ARCH_FLAG=-s
 
-ifeq ($(DEB_BUILD_ARCH),arm)
-build_openmpi = no
-else ifeq ($(DEB_BUILD_ARCH),armel)
-build_openmpi = no
-else ifeq ($(DEB_BUILD_ARCH),hppa)
-build_openmpi = no
-else ifeq ($(DEB_BUILD_ARCH),mips)
-build_openmpi = no
-else ifeq ($(DEB_BUILD_ARCH),mipsel)
-build_openmpi = no
-else ifeq ($(DEB_BUILD_ARCH),s390)
-build_openmpi = no
-else
-build_openmpi = yes
-endif
-
-ifeq ($(build_openmpi),yes)
-configure_stamp_openmpi = configure-stamp-openmpi
-build_stamp_openmpi = build-stamp-openmpi
-install_openmpi = install-openmpi
-else
-configure_stamp_openmpi =
-build_stamp_openmpi = 
-install_openmpi =
-endif
-
 ifeq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
        USE_PROD = yes
 else
@@ -80,7 +53,7 @@
 		  --enable-shared --enable-production=$(USE_PROD)
 
 
-configure: configure-stamp-debian configure-stamp-serial configure-stamp-lam $(configure-stamp-openmpi) configure-stamp-mpich
+configure: configure-stamp-debian configure-stamp-serial configure-stamp-lam configure-stamp-openmpi configure-stamp-mpich
 
 configure-stamp-debian: debian/control.in
 	cd debian && for i in *_devlib; do j=`basename $$i _devlib`; \
@@ -119,12 +92,14 @@
 
 configure-stamp-openmpi: configure-stamp-debian
 	dh_testdir
-	-mkdir debian/build-openmpi
-# configure version with lam
+# configure version with openmpi
+	if [ -e /usr/lib/openmpi/include/mpi.h ]; then \
+	mkdir debian/build-openmpi; \
 	cd debian/build-openmpi && CPPFLAGS=-I/usr/lib/openmpi/include \
 		CC=mpicc.openmpi CXX=mpic++.openmpi RUNPARALLEL=/usr/bin/mpirun.openmpi \
 		../../configure $(CONFIGURE_FLAGS) \
-		--enable-parallel=yes
+		--enable-parallel=yes; \
+	fi
 	touch configure-stamp-openmpi
 
 configure-stamp-mpich: configure-stamp-debian
@@ -138,7 +113,7 @@
 		--enable-parallel=yes
 	touch configure-stamp-mpich
 
-build: build-stamp-serial build-stamp-lam $(build-stamp-openmpi) build-stamp-mpich
+build: build-stamp-serial build-stamp-lam build-stamp-openmpi build-stamp-mpich
 
 build-stamp-serial: configure-stamp-serial
 	dh_testdir
@@ -152,7 +127,9 @@
 
 build-stamp-openmpi: configure-stamp-openmpi 
 	dh_testdir
-	$(MAKE) -C debian/build-openmpi/
+	if [ -e /usr/lib/openmpi/include/mpi.h ]; then \
+	$(MAKE) -C debian/build-openmpi/; \
+	fi
 	touch build-stamp-openmpi
 
 build-stamp-mpich: configure-stamp-mpich 
@@ -192,10 +169,12 @@
 install-openmpi: build-stamp-openmpi
 	dh_testdir
 	dh_testroot
-	-mkdir debian/build-openmpi/tmpinst
-	$(MAKE) -C debian/build-openmpi/ install prefix=$(CURDIR)/debian/build-openmpi/tmpinst/usr
+	if [ -e /usr/lib/openmpi/include/mpi.h ]; then \
+	mkdir debian/build-openmpi/tmpinst; \
+	$(MAKE) -C debian/build-openmpi/ install prefix=$(CURDIR)/debian/build-openmpi/tmpinst/usr; \
 	dh_install -p$(openmpipack) -p$(package)-openmpi-dev \
-		--sourcedir=debian/build-openmpi/tmpinst
+		--sourcedir=debian/build-openmpi/tmpinst; \
+	fi
 
 install-mpich: build-stamp-mpich
 	dh_testdir
@@ -222,7 +201,7 @@
 	dh_md5sums -i
 	dh_builddeb -i
 
-binary-arch: build install-serial install-lam $(install-openmpi) install-mpich
+binary-arch: build install-serial install-lam install-openmpi install-mpich
 	dh_testdir
 	dh_testroot 
 	dh_installdocs $(ARCH_FLAG)
@@ -234,17 +213,17 @@
 	dh_fixperms $(ARCH_FLAG)
 #	dh_makeshlibs -p$(serpack) -V "$(serpack) | $(virtpack)"
 	dh_makeshlibs -p$(lampack) -V $(lampack)
-ifeq ($(build_openmpi),yes)
-	dh_makeshlibs -p$(openmpipack) -V $(openmpipack)
-endif
+	if [ -e /usr/lib/openmpi/include/mpi.h ]; then \
+	  dh_makeshlibs -p$(openmpipack) -V $(openmpipack); \
+	fi
 	dh_makeshlibs -p$(mpichpack) -V $(mpichpack)
 	dh_installdeb $(ARCH_FLAG)
 	dh_shlibdeps -phdf5-tools -L$(serpack) -ldebian/$(serpack)/usr/lib:debian/build-serial/test/.libs
 	dh_shlibdeps -p$(serpack) -L$(serpack) -ldebian/$(serpack)/usr/lib:debian/build-serial/test/.libs
 	dh_shlibdeps -p$(lampack) -L$(lampack) -ldebian/$(lampack)/usr/lib
-ifeq ($(build_openmpi),yes)
-	dh_shlibdeps -p$(openmpipack) -L$(openmpipack) -ldebian/$(openmpipack)/usr/lib
-endif
+	if [ -e /usr/lib/openmpi/include/mpi.h ]; then \
+	  dh_shlibdeps -p$(openmpipack) -L$(openmpipack) -ldebian/$(openmpipack)/usr/lib; \
+	fi
 	dh_shlibdeps -p$(mpichpack) -L$(mpichpack) -ldebian/$(mpichpack)/usr/lib
 	dh_gencontrol $(ARCH_FLAG)
 	dh_md5sums $(ARCH_FLAG)
_______________________________________________
Pkg-grass-devel mailing list
Pkg-grass-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/pkg-grass-devel

Reply via email to