[med-svn] r16776 - in trunk/packages/mothur/trunk/debian: . patches

Timothy Booth tbooth-guest at moszumanska.debian.org
Thu Apr 24 17:44:29 UTC 2014


Author: tbooth-guest
Date: 2014-04-24 17:44:28 +0000 (Thu, 24 Apr 2014)
New Revision: 16776

Added:
   trunk/packages/mothur/trunk/debian/patches/find_pat_files
Modified:
   trunk/packages/mothur/trunk/debian/changelog
   trunk/packages/mothur/trunk/debian/control
   trunk/packages/mothur/trunk/debian/get-orig-source
   trunk/packages/mothur/trunk/debian/mothur.install
   trunk/packages/mothur/trunk/debian/patches/makefile.patch
   trunk/packages/mothur/trunk/debian/patches/series
   trunk/packages/mothur/trunk/debian/rules
Log:
Add the important .pat files and tell Mothur how to find them (certainly not
in /usr/bin).

As usual ignore the changelog entry for the PPA build, this should work
with the -dfsg source used for Debian.


Modified: trunk/packages/mothur/trunk/debian/changelog
===================================================================
--- trunk/packages/mothur/trunk/debian/changelog	2014-04-24 16:28:58 UTC (rev 16775)
+++ trunk/packages/mothur/trunk/debian/changelog	2014-04-24 17:44:28 UTC (rev 16776)
@@ -1,3 +1,9 @@
+mothur (1.33.3+repack-0biolinux2) trusty; urgency=low
+
+  * Refresh patches and build for Ubuntu Trusty
+
+ -- Tim Booth <tbooth at ceh.ac.uk>  Thu, 24 Apr 2014 18:41:42 +0100
+
 mothur (1.33.3+dfsg-1) unstable; urgency=medium
 
   * New upstream version
@@ -38,6 +44,40 @@
 
  -- Andreas Tille <tille at debian.org>  Tue, 30 Jul 2013 14:32:44 +0200
 
+mothur (1.31.2+repack-0biolinux1) precise; urgency=low
+
+  * New upstream
+  * All patches look OK
+
+ -- Tim Booth <tbooth at ceh.ac.uk>  Fri, 16 Aug 2013 12:09:01 +0100
+
+mothur (1.30.2+repack-0ubuntu1) precise; urgency=low
+
+  * New upstream
+  * Drop unneeded patch from last time 
+
+ -- Tim Booth <tbooth at ceh.ac.uk>  Tue, 30 Apr 2013 11:56:20 +0100
+
+mothur (1.29.0+repack-0ubuntu1) precise; urgency=low
+
+  * New upstream for January
+  * Patch to fix compilation on MPI - not sure if it is right
+
+ -- Tim Booth <tbooth at ceh.ac.uk>  Tue, 15 Jan 2013 14:51:19 +0000
+
+mothur (1.28.0+repack-precise2) precise; urgency=low
+
+  * New upstream, build for precise
+  * Enable mpi for 32-bit, for completeness
+  * Note that this should really be version -0ubuntu2, but its
+    too late to go there
+  * Parallel build enabled
+
+ -- Tim Booth <tbooth at ceh.ac.uk>  Thu, 10 Jan 2013 15:22:35 +0000
+
+mothur (1.27.0+dfsg-1) UNRELEASED; urgency=low
+=======
+
 mothur (1.27.0+repack-precise1) precise; urgency=low
 
   * Remove -march=native from makefile as this makes the result

Modified: trunk/packages/mothur/trunk/debian/control
===================================================================
--- trunk/packages/mothur/trunk/debian/control	2014-04-24 16:28:58 UTC (rev 16775)
+++ trunk/packages/mothur/trunk/debian/control	2014-04-24 17:44:28 UTC (rev 16776)
@@ -29,12 +29,12 @@
  calculators and visualization tools were added.
 
 Package: mothur-mpi
-Architecture: amd64
+Architecture: any
 Depends: ${shlibs:Depends},
          ${misc:Depends},
          mothur,
          openmpi-bin
 Description: mpi-enabled binary for mothur
  Provides the MPI-enabled binary for Mothur
- According to the docs this is of limited usefulness but is provided
- for completeness.
+ This is recommended for operations like shhh.flows which will be
+ very slow on a single processor.

Modified: trunk/packages/mothur/trunk/debian/get-orig-source
===================================================================
--- trunk/packages/mothur/trunk/debian/get-orig-source	2014-04-24 16:28:58 UTC (rev 16775)
+++ trunk/packages/mothur/trunk/debian/get-orig-source	2014-04-24 17:44:28 UTC (rev 16776)
@@ -1,9 +1,10 @@
 #!/bin/sh
 # script to download and repack source package of mothur because it is provided as zip
+# This is broken
 
 # set -x
 PKG=`dpkg-parsechangelog | awk '/^Source/ { print $2 }'`
-VERSION=`uscan --verbose --force-download | \
+VERSION=`env USCAN_REPACK= uscan --verbose --force-download | \
     grep "Newest version on remote site is .* local version is .*" | \
     head -n 1 | \
     sed "s/Newest version on remote site is \([-0-9.]\+\),.*/\1/"`
@@ -20,5 +21,5 @@
 find ${UPSTREAMDIR} -name ".*"  | xargs rm -f
 find ${UPSTREAMDIR} -name "*.o" | xargs rm -f
 
+rm -rf "${UPSTREAMDIR}" __MACOSX
 XZ_OPT="-6v" tar --owner=root --group=root --mode=a+rX -caf "$PKG"_"$VERSION".orig.tar.xz "${UPSTREAMDIR}"
-rm -rf "${UPSTREAMDIR}" __MACOSX

Modified: trunk/packages/mothur/trunk/debian/mothur.install
===================================================================
--- trunk/packages/mothur/trunk/debian/mothur.install	2014-04-24 16:28:58 UTC (rev 16775)
+++ trunk/packages/mothur/trunk/debian/mothur.install	2014-04-24 17:44:28 UTC (rev 16776)
@@ -1,2 +1,3 @@
 mothur /usr/bin
 uchime /usr/bin
+lookupFiles/* /usr/share/mothur

Added: trunk/packages/mothur/trunk/debian/patches/find_pat_files
===================================================================
--- trunk/packages/mothur/trunk/debian/patches/find_pat_files	                        (rev 0)
+++ trunk/packages/mothur/trunk/debian/patches/find_pat_files	2014-04-24 17:44:28 UTC (rev 16776)
@@ -0,0 +1,49 @@
+Mothur ships with some .pat files which are needed by a couple of commands.
+Default behaviour is to fall back to looking in the exec dir, which makes
+no sense in a package, so redirect it.
+--- a/shhhercommand.cpp
++++ b/shhhercommand.cpp
+@@ -314,10 +314,10 @@
+ 					for (int i = 0; i < exepath.length(); i++) { tempPath[i] = tolower(exepath[i]); }
+ 					exepath = exepath.substr(0, (tempPath.find_last_of('m')));
+ 					
+-					string tryPath = m->getFullPathName(exepath) + m->getSimpleName(lookupFileName);
+-					m->mothurOut("Unable to open " + lookupFileName + ". Trying mothur's executable location " + tryPath); m->mothurOutEndLine();
++					string tryPath = "/usr/share/mothur/";
++					m->mothurOut("Unable to open " + lookupFileName + ". Trying default location " + tryPath); m->mothurOutEndLine();
+ 					ifstream in2;
+-					ableToOpen = m->openInputFile(tryPath, in2, "noerror");
++					ableToOpen = m->openInputFile(tryPath +  m->getSimpleName(lookupFileName), in2, "noerror");
+ 					in2.close();
+ 					lookupFileName = tryPath;
+ 				}
+@@ -334,10 +334,10 @@
+ 				for (int i = 0; i < exepath.length(); i++) { tempPath[i] = tolower(exepath[i]); }
+ 				exepath = exepath.substr(0, (tempPath.find_last_of('m')));
+ 					
+-				string tryPath = m->getFullPathName(exepath) + m->getSimpleName(lookupFileName);
+-				m->mothurOut("Unable to open " + lookupFileName + ". Trying mothur's executable location " + tryPath); m->mothurOutEndLine();
++				string tryPath = "/usr/share/mothur/";
++				m->mothurOut("Unable to open " + lookupFileName + ". Trying default location " + tryPath); m->mothurOutEndLine();
+ 				ifstream in2;
+-				int ableToOpen = m->openInputFile(tryPath, in2, "noerror");
++				int ableToOpen = m->openInputFile(tryPath + m->getSimpleName(lookupFileName), in2, "noerror");
+ 				in2.close();
+ 				lookupFileName = tryPath;
+ 				
+--- a/sffmultiplecommand.cpp
++++ b/sffmultiplecommand.cpp
+@@ -315,10 +315,10 @@
+ 				for (int i = 0; i < exepath.length(); i++) { tempPath[i] = tolower(exepath[i]); }
+ 				exepath = exepath.substr(0, (tempPath.find_last_of('m')));
+                 
+-				string tryPath = m->getFullPathName(exepath) + m->getSimpleName(lookupFileName);
+-				m->mothurOut("Unable to open " + lookupFileName + ". Trying mothur's executable location " + tryPath); m->mothurOutEndLine();
++				string tryPath = "/usr/share/mothur/";
++				m->mothurOut("Unable to open " + lookupFileName + ". Trying default location " + tryPath); m->mothurOutEndLine();
+ 				ifstream in2;
+-				int ableToOpen = m->openInputFile(tryPath, in2, "noerror");
++				int ableToOpen = m->openInputFile(tryPath + m->getSimpleName(lookupFileName), in2, "noerror");
+ 				in2.close();
+ 				lookupFileName = tryPath;
+ 				

Modified: trunk/packages/mothur/trunk/debian/patches/makefile.patch
===================================================================
--- trunk/packages/mothur/trunk/debian/patches/makefile.patch	2014-04-24 16:28:58 UTC (rev 16775)
+++ trunk/packages/mothur/trunk/debian/patches/makefile.patch	2014-04-24 17:44:28 UTC (rev 16776)
@@ -9,8 +9,8 @@
  
  # Optimize to level 3:
 -CXXFLAGS += -O3 
-+# Nope, let debuild set this.
-+# CXXFLAGS += -O3
++# Nope - let debuild set this
++#CXXFLAGS += -O3
  
  ifeq  ($(strip $(64BIT_VERSION)),yes)
  	#if you are using centos uncomment the following lines
@@ -28,7 +28,7 @@
  	#CXXFLAGS += -mtune=native -march=native 
 +	# But not if you are trying to make a generic build for
 +	# packaging, because your binary will end up being specific
-+	# to your processor.
++	# to your own processor.
  	
  	CXXFLAGS += -DBIT_VERSION 
 -	FORTRAN_FLAGS = -m64

Modified: trunk/packages/mothur/trunk/debian/patches/series
===================================================================
--- trunk/packages/mothur/trunk/debian/patches/series	2014-04-24 16:28:58 UTC (rev 16775)
+++ trunk/packages/mothur/trunk/debian/patches/series	2014-04-24 17:44:28 UTC (rev 16776)
@@ -4,5 +4,6 @@
 catchall_fix.patch
 build_without_tty.patch
 uchime_link_dynamically
+find_pat_files
 uchime_hardening.patch
 spelling.patch

Modified: trunk/packages/mothur/trunk/debian/rules
===================================================================
--- trunk/packages/mothur/trunk/debian/rules	2014-04-24 16:28:58 UTC (rev 16775)
+++ trunk/packages/mothur/trunk/debian/rules	2014-04-24 17:44:28 UTC (rev 16776)
@@ -6,17 +6,20 @@
 #export DH_VERBOSE=1
 
 ARCHBITS ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH_BITS)
+THREADS ?= -j3
 
 %:
 	dh $@
 
 override_dh_auto_build:
 	if [ $(ARCHBITS) -eq 64 ] ; then \
-	    dh_auto_build -- 64BIT_VERSION=yes USEMPI=yes && \
+	    dh_auto_build -- $(THREADS) 64BIT_VERSION=yes USEMPI=yes && \
 	    mv mothur mothur-mpi && make clean && \
-	    dh_auto_build -- 64BIT_VERSION=yes USEMPI=no ; \
+	    dh_auto_build -- $(THREADS) 64BIT_VERSION=yes USEMPI=no ; \
 	else \
-	    dh_auto_build -- 64BIT_VERSION=no ; \
+	    dh_auto_build -- $(THREADS) 64BIT_VERSION=no USEMPI=yes && \
+	    mv mothur mothur-mpi && make clean && \
+	    dh_auto_build -- $(THREADS) 64BIT_VERSION=no USEMPI=no ; \
 	fi
 
 override_dh_auto_install:




More information about the debian-med-commit mailing list