Source: elmerfem
Severity: normal
Tags: patch
User: [email protected]

Dear Maintainer,

The package elmerfem fails to build from source on ppc64el for 2 particular 
reasons:
 - Needs update on autotools files within the several directories.
 - The keyword vector is now defined by gcc as a macro, so gcc replaces any 
instance of this word.

So the patch attached fixes those 2 problems so the package builds successfully.
There is probably a better way of cleaning the source tree using debian/rules 
but I could not make it perfectly
due to the usage of many source directories.

Thanks!

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

Kernel: Linux 3.16-trunk-powerpc64le (SMP w/32 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/dash
diff -Nru elmerfem-6.1.0.svn.5396.dfsg2/debian/autoreconf elmerfem-6.1.0.svn.5396.dfsg2/debian/autoreconf
--- elmerfem-6.1.0.svn.5396.dfsg2/debian/autoreconf	1970-01-01 00:00:00.000000000 +0000
+++ elmerfem-6.1.0.svn.5396.dfsg2/debian/autoreconf	2014-10-29 19:19:12.000000000 +0000
@@ -0,0 +1 @@
+post
diff -Nru elmerfem-6.1.0.svn.5396.dfsg2/debian/changelog elmerfem-6.1.0.svn.5396.dfsg2/debian/changelog
--- elmerfem-6.1.0.svn.5396.dfsg2/debian/changelog	2013-12-17 17:16:09.000000000 +0000
+++ elmerfem-6.1.0.svn.5396.dfsg2/debian/changelog	2014-10-29 19:19:06.000000000 +0000
@@ -1,3 +1,12 @@
+elmerfem (6.1.0.svn.5396.dfsg2-4ppc64el1) UNRELEASED; urgency=medium
+
+  * Created patch debian/patches/undef-vector.patch to undefine keyword vector which
+    gcc uses as a macro replacing it along the code during build.
+  * Added dh_autoreconf to debian/rules so it does not fail to build on ppc64el. It was
+    necessary to make d/rules perform it multiple times within each source directory.
+
+ -- Fernando Seiti Furusato <[email protected]>  Wed, 29 Oct 2014 19:14:36 +0000
+
 elmerfem (6.1.0.svn.5396.dfsg2-4) unstable; urgency=medium
 
   * Add build dependency on libpng-dev.
diff -Nru elmerfem-6.1.0.svn.5396.dfsg2/debian/control elmerfem-6.1.0.svn.5396.dfsg2/debian/control
--- elmerfem-6.1.0.svn.5396.dfsg2/debian/control	2013-12-17 17:16:09.000000000 +0000
+++ elmerfem-6.1.0.svn.5396.dfsg2/debian/control	2014-10-29 19:19:06.000000000 +0000
@@ -4,7 +4,7 @@
 Maintainer: Debian Science Maintainers <[email protected]>
 Uploaders: "Adam C. Powell, IV" <[email protected]>, Boris Pek <[email protected]>
 Standards-Version: 3.9.2
-Build-Depends: debhelper (>= 5), quilt, po-debconf, autoconf, automake,
+Build-Depends: debhelper (>= 5), quilt, po-debconf, dh-autoreconf,
  gfortran, libblas-dev | libblas.so, liblapack-dev | liblapack-3.so,
  mpi-default-dev, mpi-default-bin,
  libhypre-dev, libsuitesparse-dev, libarpack2-dev, libparpack2-dev,
diff -Nru elmerfem-6.1.0.svn.5396.dfsg2/debian/patches/series elmerfem-6.1.0.svn.5396.dfsg2/debian/patches/series
--- elmerfem-6.1.0.svn.5396.dfsg2/debian/patches/series	2013-12-17 17:16:09.000000000 +0000
+++ elmerfem-6.1.0.svn.5396.dfsg2/debian/patches/series	2014-10-29 19:19:06.000000000 +0000
@@ -2,3 +2,4 @@
 no-metis-partmesh.patch
 elmer-revision.patch
 add-NAMESPACE-for-elmerparam-R-module.patch
+undef-vector.patch
diff -Nru elmerfem-6.1.0.svn.5396.dfsg2/debian/patches/undef-vector.patch elmerfem-6.1.0.svn.5396.dfsg2/debian/patches/undef-vector.patch
--- elmerfem-6.1.0.svn.5396.dfsg2/debian/patches/undef-vector.patch	1970-01-01 00:00:00.000000000 +0000
+++ elmerfem-6.1.0.svn.5396.dfsg2/debian/patches/undef-vector.patch	2014-10-29 19:19:06.000000000 +0000
@@ -0,0 +1,27 @@
+Description: This patch was created to undefine the keyword vector which is
+ defined as a macro in gcc.
+Author: Fernando Seiti Furusato <[email protected]>
+---
+The information above should follow the Patch Tagging Guidelines, please
+checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
+are templates for supplementary fields that you might want to add:
+
+Origin: <vendor|upstream|other>, <url of original patch>
+Bug: <url in upstream bugtracker>
+Bug-Debian: https://bugs.debian.org/<bugnumber>
+Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
+Forwarded: <no|not-needed|url proving that it has been forwarded>
+Reviewed-By: <name and email of someone who approved the patch>
+Last-Update: <YYYY-MM-DD>
+
+--- elmerfem-6.1.0.svn.5396.dfsg2.orig/fem/configure.in
++++ elmerfem-6.1.0.svn.5396.dfsg2/fem/configure.in
+@@ -71,7 +71,7 @@ CFLAGS="$CFLAGS -I$prefix/include"
+ FCFLAGS="$FCFLAGS -I. ${INCLUDE_MODULE_FLAG}binio"
+ FFLAGS="$FFLAGS -I."
+ ELMER_HOME="$prefix"
+-FCPPFLAGS="$FCPPFLAGS -P $TRADITIONAL_CPP_FLAGS -I. -I$prefix/include -DFULL_INDUCTION -DUSE_ARPACK"
++FCPPFLAGS="$FCPPFLAGS -P $TRADITIONAL_CPP_FLAGS -I. -I$prefix/include -DFULL_INDUCTION -DUSE_ARPACK -Uvector"
+ TESTS_FCFLAGS=""
+ 
+ ELMER_LIBERRORMSG="wasn't found, make sure it is in the prefix, or CFLAGS and LIBS are correct if they are somewhere else."
diff -Nru elmerfem-6.1.0.svn.5396.dfsg2/debian/rules elmerfem-6.1.0.svn.5396.dfsg2/debian/rules
--- elmerfem-6.1.0.svn.5396.dfsg2/debian/rules	2013-12-17 17:16:09.000000000 +0000
+++ elmerfem-6.1.0.svn.5396.dfsg2/debian/rules	2014-10-29 19:19:06.000000000 +0000
@@ -55,6 +55,8 @@
 clean: patch
 	dh_testdir
 	for elmermodule in $(ELMER_MODULES); do \
+          echo $$elmermodule > debian/autoreconf; \
+          dh_autoreconf_clean ; \
 	  if [ -e $$elmermodule/Makefile ]; then \
 	    echo; echo CLEANING ELMER MODULE $$elmermodule; echo; \
 	    make -C $$elmermodule maintainer-clean; \
@@ -99,8 +101,9 @@
 	done
 	set -e; for elmermodule in $(ELMER_MODULES); do \
 	  echo; echo CONFIGURING ELMER MODULE $$elmermodule; echo; \
+	  echo $$elmermodule > debian/autoreconf; \
+	  dh_autoreconf_clean && dh_autoreconf; \
 	  (cd $$elmermodule && \
-	   autoconf && \
 	   LIBS="-L$(CURDIR)/debian/tmp/usr/lib" \
 	     CPPFLAGS="$(CPPFLAGS) -I$(CURDIR)/debian/tmp/usr/include -I/usr/include/freetype2" \
 	     FCPPFLAGS="$(FCPPFLAGS) -I$(CURDIR)/debian/tmp/usr/include" \

Reply via email to