[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: hdf5: Drop openmpi support on some architectures



package hdf5
tags 473328 patch
thanks

Attached below is a patch for disabling the building of libhdf5-openmpi-*
packages on some problematic architectures.

Note that I did not take the approach of adding an Architecture field for
the libhdf5-openmpi-* package stanzas in debian/control.in.  Instead this
file is filtered through slice before generating the final debian/control.
In debian/rules, conditional compilation is managed using new variables.

Please, consider fixing this bug in a timely manner.  If you wish, I could
NMU the package.

Regards,

-- 
Rafael
Index: debian/control.in
===================================================================
--- debian/control.in	(revision 1487)
+++ debian/control.in	(working copy)
@@ -3,7 +3,7 @@
 Priority: optional
 Maintainer: Debian GIS Project <pkg-grass-devel@lists.alioth.debian.org>
 Uploaders: Francesco Paolo Lovergine <frankie@debian.org>
-Build-Depends: libmpich1.0-dev (>= 1.2.7-1), zlib1g-dev, lam4-dev (>= 7.1.1-3.2), libopenmpi-dev, libjpeg62-dev, debhelper (>> 5)
+Build-Depends: libmpich1.0-dev (>= 1.2.7-1), zlib1g-dev, lam4-dev (>= 7.1.1-3.2), libopenmpi-dev [!arm !armel !hppa !mips !mipsel !s390], libjpeg62-dev, debhelper (>> 5), slice
 Standards-Version: 3.7.3
 Homepage: http://hdf.ncsa.uiuc.edu/HDF5/
 Vcs-Browser: http://svn.debian.org/viewsvn/pkg-grass/packages/hdf5/trunk/
@@ -69,6 +69,7 @@
  .
  This package contains development files for use with LAM.
 
+[OPENMPI:
 Package: libhdf5-openmpi-@VERSION@-0
 Section: libs
 Priority: extra
@@ -99,6 +100,7 @@
  files larger than 2 GB, and supports parallel I/O.
  .
  This package contains development files for use with OpenMPI.
+:]
 
 Package: libhdf5-mpich-@VERSION@-0
 Section: libs
Index: debian/changelog
===================================================================
--- debian/changelog	(revision 1487)
+++ debian/changelog	(working copy)
@@ -1,9 +1,15 @@
 hdf5 (1.6.6-2) UNRELEASED; urgency=low
 
+  [ Francesco Paolo Lovergine ]
   * Fixed changelog due to patch dropped before release, but still logged.
 
- -- Francesco Paolo Lovergine <frankie@debian.org>  Thu, 20 Mar 2008 12:55:54 +0100
+  [ Rafael Laboissiere ]
+  * NMU
+  * Do not create the libdhf5-openmpi-* packages on some selected
+    architectures (closes: #473328)
 
+ -- Rafael Laboissiere <rafael@debian.org>  Mon, 31 Mar 2008 02:48:15 +0200
+
 hdf5 (1.6.6-1) unstable; urgency=low
 
   [ Francesco Paolo Lovergine ]
Index: debian/rules
===================================================================
--- debian/rules	(revision 1487)
+++ debian/rules	(working copy)
@@ -18,7 +18,36 @@
 
 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)
 
+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)
+sliceterm = UNDEF+OPENMPI
+configure_stamp_openmpi = configure-stamp-openmpi
+build_stamp_openmpi = build-stamp-openmpi
+install_openmpi = install-openmpi
+else
+sliceterm = UNDEF
+configure_stamp_openmpi =
+build_stamp_openmpi = 
+install_openmpi =
+endif
+
 ifeq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
        USE_PROD = yes
 else
@@ -49,7 +78,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`; \
@@ -107,7 +136,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
@@ -137,7 +166,8 @@
 	-rm -rf debian/build-openmpi
 	-rm -rf debian/build-mpich
 	-find debian -type l | xargs rm -f
-	grep -v ^\% debian/control.in | sed "s/@VERSION@/$(version)/g" > debian/control
+	grep -v ^\% debian/control.in | sed "s/@VERSION@/$(version)/g"	\
+		| slice -o$(sliceterm):debian/control
 	dh_clean configure-stamp* build-stamp* install-stamp* debian/*.shlibs
 
 install: install-serial install-lam install-openmpi install-mpich install-doc
@@ -191,7 +221,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 -a
@@ -203,13 +233,17 @@
 	dh_fixperms -a
 #	dh_makeshlibs -p$(serpack) -V "$(serpack) | $(virtpack)"
 	dh_makeshlibs -p$(lampack) -V $(lampack)
+ifeq ($(build_openmpi),yes)
 	dh_makeshlibs -p$(openmpipack) -V $(openmpipack)
+endif
 	dh_makeshlibs -p$(mpichpack) -V $(mpichpack)
 	dh_installdeb -a
 	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
 	dh_shlibdeps -p$(mpichpack) -L$(mpichpack) -ldebian/$(mpichpack)/usr/lib
 	dh_gencontrol -a
 	dh_md5sums -a

Reply to: