[med-svn] [phast] 06/07: Fix some build issues

Andreas Tille tille at debian.org
Fri Jun 3 22:32:08 UTC 2016


This is an automated email from the git hooks/post-receive script.

tille pushed a commit to branch master
in repository phast.

commit fc9be6e55d8920e1219a7979e60fbe9464e6a34c
Author: Andreas Tille <tille at debian.org>
Date:   Fri Jun 3 23:02:00 2016 +0200

    Fix some build issues
---
 debian/patches/clapack.patch                     | 23 +++++++++++--
 debian/patches/do_not_install_to_opt.patch       | 19 +++++++++++
 debian/patches/fix_include.patch                 | 13 ++++++++
 debian/patches/series                            |  3 ++
 debian/patches/use_debian_packaged_libpcre.patch | 42 ++++++++++++++++++++++++
 5 files changed, 98 insertions(+), 2 deletions(-)

diff --git a/debian/patches/clapack.patch b/debian/patches/clapack.patch
index 472fcc5..ac1041b 100644
--- a/debian/patches/clapack.patch
+++ b/debian/patches/clapack.patch
@@ -40,12 +40,31 @@ Description: Debian's clapack package renames library from lapack.a
  
 --- a/src/make-include.mk
 +++ b/src/make-include.mk
-@@ -140,7 +140,7 @@ else
+@@ -120,8 +120,6 @@ ifneq ($(TARGETOS), Windows)
+     # PLAT is empty for windows builds
+     PLAT =
+   endif
+-  # F2C libraries used by CLAPACK; most users won't need to edit
+-  F2CPATH = ${CLAPACKPATH}/F2CLIBS
+ endif
+ 
+ # if neither VECLIB nor CLAPACKPATH is defined, then LAPACK will be
+@@ -140,16 +138,15 @@ else
  ifdef CLAPACKPATH
  ifneq ($(TARGETOS), Windows)
    CFLAGS += -I${CLAPACKPATH}/INCLUDE -I${F2CPATH}
 -  LIBS = -lphast -llapack -ltmg -lblaswr -lc -lf2c -lm
 +  LIBS = -lphast -lclapack -lctmg -lcblas -lc -lf2c -lm
  else
-   CFLAGS += -I${CLAPACKPATH}/INCLUDE -I${F2CPATH} -DPCRE_STATIC
+-  CFLAGS += -I${CLAPACKPATH}/INCLUDE -I${F2CPATH} -DPCRE_STATIC
++  CFLAGS += -I${CLAPACKPATH}/INCLUDE -DPCRE_STATIC
    LIBS = -lphast -lm  ${CLAPACKPATH}/liblapack.a ${CLAPACKPATH}/libf2c.a ${CLAPACKPATH}/libblas.a
+ endif
+ # IMPORTANT: use the following two lines instead for versions of CLAPACK
+ # older than 3.1.1
+ #CFLAGS += -I${CLAPACKPATH} -I${F2CPATH}
+ #LIBS = -lphast -llapack -ltmg -lblaswr -lc -lF77 -lI77 -lm
+-LIBPATH += -L${F2CPATH} 
+ 
+ # bypass
+ else
diff --git a/debian/patches/do_not_install_to_opt.patch b/debian/patches/do_not_install_to_opt.patch
new file mode 100644
index 0000000..fc4e06c
--- /dev/null
+++ b/debian/patches/do_not_install_to_opt.patch
@@ -0,0 +1,19 @@
+Author: Andreas Tille <tille at debian.org>
+Last-Update: Fri, 27 May 2016 18:06:35 +0200
+Description: Packages should not install anything to /opt
+
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -27,10 +27,10 @@ ifndef DESTDIR
+ 	DESTDIR=/
+ endif
+ 	mkdir -p ${DESTDIR}/usr/bin/
+-	mkdir -p ${DESTDIR}/opt/phast/data/
++	mkdir -p ${DESTDIR}/usr/share/phast/data/
+ 	mkdir -p ${DESTDIR}/usr/share/man/man1/
+ 	cp ../bin/* ${DESTDIR}/usr/bin/
+-	cp -R ../data/* ${DESTDIR}/opt/phast/data/
++	cp -R ../data/* ${DESTDIR}/usr/share/phast/data/
+ 	cp -R ../doc/man/* ${DESTDIR}/usr/share/man/man1/
+ 
+ doc:
diff --git a/debian/patches/fix_include.patch b/debian/patches/fix_include.patch
new file mode 100644
index 0000000..c07104f
--- /dev/null
+++ b/debian/patches/fix_include.patch
@@ -0,0 +1,13 @@
+--- a/src/make-include.mk
++++ b/src/make-include.mk
+@@ -137,10 +137,8 @@ LIBS = -lphast -framework vecLib -lc -lm
+ else
+ ifdef CLAPACKPATH
+ ifneq ($(TARGETOS), Windows)
+-  CFLAGS += -I${CLAPACKPATH}/INCLUDE -I${F2CPATH}
+   LIBS = -lphast -lclapack -lctmg -lcblas -lc -lf2c -lm
+ else
+-  CFLAGS += -I${CLAPACKPATH}/INCLUDE
+   LIBS = -lphast -lm  ${CLAPACKPATH}/liblapack.a ${CLAPACKPATH}/libf2c.a ${CLAPACKPATH}/libblas.a
+ endif
+ # IMPORTANT: use the following two lines instead for versions of CLAPACK
diff --git a/debian/patches/series b/debian/patches/series
index 3f76f8a..ec0fbad 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,4 @@
 clapack.patch
+do_not_install_to_opt.patch
+use_debian_packaged_libpcre.patch
+fix_include.patch
diff --git a/debian/patches/use_debian_packaged_libpcre.patch b/debian/patches/use_debian_packaged_libpcre.patch
new file mode 100644
index 0000000..83f367e
--- /dev/null
+++ b/debian/patches/use_debian_packaged_libpcre.patch
@@ -0,0 +1,42 @@
+--- a/src/make-include.mk
++++ b/src/make-include.mk
+@@ -57,7 +57,7 @@ else
+ endif
+ 
+ PHAST_VERSION=\"$(shell cat ${PHAST}/version)\"
+-CFLAGS += -I${INC} -DPHAST_VERSION=${PHAST_VERSION} -DPHAST_HOME=\"${PHAST_HOME}\" -I${PHAST}/src/lib/pcre -fno-strict-aliasing
++CFLAGS += -I${INC} -DPHAST_VERSION=${PHAST_VERSION} -DPHAST_HOME=\"${PHAST_HOME}\" -fno-strict-aliasing
+ LIBPATH = -L${LIB} 
+ 
+ # uncomment these lines for profiling (add -g for line-by-line
+@@ -140,7 +140,7 @@ ifneq ($(TARGETOS), Windows)
+   CFLAGS += -I${CLAPACKPATH}/INCLUDE -I${F2CPATH}
+   LIBS = -lphast -lclapack -lctmg -lcblas -lc -lf2c -lm
+ else
+-  CFLAGS += -I${CLAPACKPATH}/INCLUDE -DPCRE_STATIC
++  CFLAGS += -I${CLAPACKPATH}/INCLUDE
+   LIBS = -lphast -lm  ${CLAPACKPATH}/liblapack.a ${CLAPACKPATH}/libf2c.a ${CLAPACKPATH}/libblas.a
+ endif
+ # IMPORTANT: use the following two lines instead for versions of CLAPACK
+@@ -154,8 +154,8 @@ ifneq ($(TARGETOS), Windows)
+   CFLAGS += -DSKIP_LAPACK
+   LIBS = -lphast -lc -lm
+ else
+-  CFLAGS += -DSKIP_LAPACK -DPCRE_STATIC
+-  LIBS = -lphast -lm  
++  CFLAGS += -DSKIP_LAPACK
++  LIBS = -lphast -lm -lpcre
+ endif
+ endif
+ endif
+--- a/src/lib/Makefile
++++ b/src/lib/Makefile
+@@ -3,7 +3,7 @@ PHAST := ${PHAST}/..
+ 
+ CDIR = ${PWD}
+ 
+-PACKAGES=base msa feature hmm phylo phylo_hmm motif pcre
++PACKAGES=base msa feature hmm phylo phylo_hmm motif
+ 
+ ifdef RPHAST
+ PACKAGES += rphast

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/phast.git



More information about the debian-med-commit mailing list