Package: src:cmor
Version: 2.8.0-4
Severity: normal
Tags: patch

Dear Maintainer,

On Ubuntu the attached patch was applied to achieve the following:

 * d/rules: Fix misspelling.
 * d/control: Add missing build-dependencies for ppc64el.
 * Explicitly link missing netcdf lib dependencies for ppc64el.

Thanks for considering the patch.

Erwan Prioul.

-- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: ppc64el (ppc64le)

Kernel: Linux 3.13-1-powerpc64le (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

--- a/configure.ac
+++ b/configure.ac
@@ -211,28 +211,28 @@ if [ test ${with_netcdfb} != "-yes" ]; t
     AC_CHECK_FILE([${with_netcdf}/bin/nc-config],[HAS_NCCONFIG=yes],[HAS_NCCONFIG=no])
     if [ test ${HAS_NCCONFIG} == "yes" ] ; then 
       NCCFLAGS=`${with_netcdf}/bin/nc-config --cflags`
-      NCLDFLAGS=`${with_netcdf}/bin/nc-config --libs`
+      NCLDFLAGS="`${with_netcdf}/bin/nc-config --libs` ${EXTRA_NCLDFLAGS}"
     else 
 #echo "CRAP!"
      NCCFLAGS=" -I${with_netcdf}/include"
      if [ test ${RTAG} != "none" ] ; then
-      NCLDFLAGS=" -L${with_netcdf}/lib  ${RTAG}${with_netcdf}/lib -lnetcdf"
+      NCLDFLAGS=" -L${with_netcdf}/lib  ${RTAG}${with_netcdf}/lib -lnetcdf ${EXTRA_NCLDFLAGS}"
      else
-      NCLDFLAGS=" -L${with_netcdf}/lib -lnetcdf"
+      NCLDFLAGS=" -L${with_netcdf}/lib -lnetcdf ${EXTRA_NCLDFLAGS}"
      fi
     fi
   else
     NCCFLAGS="-lnetcdf"
-    NCLDFLAGS=""
+    NCLDFLAGS=" ${EXTRA_NCLDFLAGS}"
   fi
 else
   AC_PATH_PROG(NCCONFIG,nc-config,"no")
   if [ test NCCONFIG != "no" ] ; then
    NCCFLAGS=`${NCCONFIG} --cflags`
-   NCLDFLAGS=`${NCCONFIG} --libs`
+   NCLDFLAGS="`${NCCONFIG} --libs` ${EXTRA_NCLDFLAGS}"
   else
    NCCFLAGS="-lnetcdf"
-   NCLDFLAGS=""
+   NCLDFLAGS=" ${EXTRA_NCLDFLAGS}"
   fi
 fi
 
--- a/debian/control
+++ b/debian/control
@@ -2,7 +2,7 @@
 Section: utils
 Priority: extra
 Maintainer: Alastair McKinstry <[email protected]>
-Build-Depends: debhelper (>= 8.1.3~), dh-buildinfo, libossp-uuid-dev, libudunits2-dev, libnetcdf-dev, uuid-dev, python-all-dev (>= 2.6.6-3~), python-setuptools (>= 0.6b3), libgfortran3, automake, python-numpy, gfortran
+Build-Depends: debhelper (>= 8.1.3~), dh-buildinfo, libossp-uuid-dev, libudunits2-dev, libnetcdf-dev, uuid-dev, python-all-dev (>= 2.6.6-3~), python-setuptools (>= 0.6b3), libgfortran3, automake, python-numpy, gfortran, pkg-config, libcurl4-gnutls-dev, libldap2-dev, heimdal-multidev, libsqlite3-dev, libsasl2-dev, libkeyutils-dev, libffi-dev, libhdf5-mpi-dev | libhdf5-dev
 Build-Conflicts: libcmor2
 Standards-Version: 3.9.3
 Homepage:  http://www2-pcmdi.llnl.gov/cmor
--- a/debian/rules
+++ b/debian/rules
@@ -7,7 +7,9 @@ DEB_HOST_MULTIARCH ?= $(shell dpkg-archi
 LIBDIR=/usr/lib/$(DEB_HOST_MULTIARCH)
 
 BUILD_ARCH_OS :-= $(shell dpkg-architecture -qDEB_BUILD_ARCH_OS)
-BUILD_ARCH_CPU := $(shell dpkg-archtiecture -qDEB_BUILD_ARCH_CPU)
+BUILD_ARCH_CPU := $(shell dpkg-architecture -qDEB_BUILD_ARCH_CPU)
+
+NETCDF_LIBS ?= $(shell pkg-config --libs heimdal-gssapi netcdf libffi)
 
 %:
 	dh $@ --with python2 
@@ -16,7 +18,10 @@ override_dh_auto_configure:
 	autoreconf -fiv
 	ln -sf  /usr/share/misc/config.sub 
 	dh_auto_configure -- --disable-color --enable-verbose-test   \
-		UUIDLDFLAGS="-lossp-uuid" UUIDFLAGS="-I/usr/include/ossp" SZLIBFLAGS=nosz
+		UUIDLDFLAGS="-lossp-uuid" UUIDFLAGS="-I/usr/include/ossp" SZLIBFLAGS=nosz   \
+		EXTRA_NCLDFLAGS="-lhdf5 -lm -lcurl $(NETCDF_LIBS) -lz -lidn -lrtmp -lgcrypt \
+		-lgnutls -lgssapi_krb5 -llber -lldap_r -lgpg-error -ltasn1 -lp11-kit        \
+		-lk5crypto -lkrb5support -lsasl2 -lkeyutils -lsqlite3"
 
 override_dh_auto_clean:
 	rm -rf config.sub config.log config.status libcmor.a libcmor.so.2 build test_grid

Reply via email to