[SCM] Debian packaging for suitesparse branch, master, updated. upstream/4.2.0-14-g0ac1e3a

Sébastien Villemot sebastien at debian.org
Sat Apr 20 19:55:45 UTC 2013


The following commit has been merged in the master branch:
commit ee6a175bc2e5e9499c841de2211825025c20b524
Author: Sébastien Villemot <sebastien at debian.org>
Date:   Sat Apr 20 10:07:52 2013 +0200

    Clean up build flags

diff --git a/debian/changelog b/debian/changelog
index 6fd1d56..b2d7c65 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -19,6 +19,11 @@ suitesparse (1:4.2.0-1) experimental; urgency=low
   * Update debian/copyright
   * Remove symbols files: they are useless since we bump the soversion
     at every new upstream release
+  * Clean up build flags
+    - make sure to inject flags from dpkg-buildflags
+    - buildflags.diff: new patch to remove spurious flags in upstream build
+      system
+    - remove -m64 flag on amd64 CPUs (Closes: #701654)
 
  -- Christophe Trophime <christophe.trophime at lncmi.cnrs.fr>  Mon, 10 Sep 2012 16:40:47 +0200
 
diff --git a/debian/patches/02-AMD_Lib_GNUmakefile.diff b/debian/patches/02-AMD_Lib_GNUmakefile.diff
index 597bcda..919c834 100644
--- a/debian/patches/02-AMD_Lib_GNUmakefile.diff
+++ b/debian/patches/02-AMD_Lib_GNUmakefile.diff
@@ -50,7 +50,7 @@ Index: suitesparse-4.0.2/AMD/Lib/GNUmakefile
  	- $(RANLIB) libamd.a
  
 +libamd.so.$(SOVERSION): amd_global.oo $(AMDI_SL) $(AMDL_SL)
-+	$(CC) -shared $^ -lm -Wl,-soname -Wl,$@ -o $@
++	$(CC) $(LDFLAGS) -shared $^ -lm -Wl,-soname -Wl,$@ -o $@
 +	ln -s $@ libamd.so
 +
  #-------------------------------------------------------------------------------
diff --git a/debian/patches/03-CAMD_Lib_GNUmakefile.diff b/debian/patches/03-CAMD_Lib_GNUmakefile.diff
index a323ada..14ea9b8 100644
--- a/debian/patches/03-CAMD_Lib_GNUmakefile.diff
+++ b/debian/patches/03-CAMD_Lib_GNUmakefile.diff
@@ -50,7 +50,7 @@ Index: suitesparse-4.0.2/CAMD/Lib/GNUmakefile
  	- $(RANLIB) libcamd.a
  
 +libcamd.so.$(SOVERSION): camd_global.oo $(CAMDI_SL) $(CAMDL_SL)
-+	$(CC) -shared $^ -lm -Wl,-soname -Wl,$@ -o $@
++	$(CC) $(LDFLAGS) -shared $^ -lm -Wl,-soname -Wl,$@ -o $@
 +	ln -s $@ libcamd.so
 +
  #-------------------------------------------------------------------------------
diff --git a/debian/patches/04-CCOLAMD_Lib_Makefile.diff b/debian/patches/04-CCOLAMD_Lib_Makefile.diff
index ffd846a..1197e39 100644
--- a/debian/patches/04-CCOLAMD_Lib_Makefile.diff
+++ b/debian/patches/04-CCOLAMD_Lib_Makefile.diff
@@ -2,10 +2,8 @@ Build shared version of CCOLAMD library
 
  -- Daniel Rus Morales <danirus at tol-project.org>  Tue, 17 Jul 2007 12:15:41 +0200
 
-Index: suitesparse-4.0.2/CCOLAMD/Lib/Makefile
-===================================================================
---- suitesparse-4.0.2.orig/CCOLAMD/Lib/Makefile	2012-09-10 21:21:09.536248755 +0200
-+++ suitesparse-4.0.2/CCOLAMD/Lib/Makefile	2012-09-10 21:21:37.784247567 +0200
+--- a/CCOLAMD/Lib/Makefile
++++ b/CCOLAMD/Lib/Makefile
 @@ -2,7 +2,9 @@
  # CCOLAMD Makefile
  #-------------------------------------------------------------------------------
@@ -22,10 +20,10 @@ Index: suitesparse-4.0.2/CCOLAMD/Lib/Makefile
  	- $(RANLIB) libccolamd.a 
  
 +libccolamd.so.$(SOVERSION):  $(SRC) $(INC)
-+	$(CC) -fPIC $(CFLAGS) $(I) -c ../Source/ccolamd_global.c -o ccolamd_global.oo
-+	$(CC) -fPIC $(CFLAGS) $(I) -c ../Source/ccolamd.c -o ccolamd.oo
-+	$(CC) -fPIC $(CFLAGS) $(I) -c ../Source/ccolamd.c -DDLONG -o ccolamd_l.oo
-+	$(CC) -shared *.oo -lm -Wl,-soname -Wl,$@ -o $@
++	$(CC) -fPIC $(CF) $(I) -c ../Source/ccolamd_global.c -o ccolamd_global.oo
++	$(CC) -fPIC $(CF) $(I) -c ../Source/ccolamd.c -o ccolamd.oo
++	$(CC) -fPIC $(CF) $(I) -c ../Source/ccolamd.c -DDLONG -o ccolamd_l.oo
++	$(CC) $(LDFLAGS) -shared *.oo -lm -Wl,-soname -Wl,$@ -o $@
 +	ln -s $@ libccolamd.so
 +
  ccode: libccolamd.a
diff --git a/debian/patches/05-COLAMD_Lib_Makefile.diff b/debian/patches/05-COLAMD_Lib_Makefile.diff
index 384ec53..7b13e68 100644
--- a/debian/patches/05-COLAMD_Lib_Makefile.diff
+++ b/debian/patches/05-COLAMD_Lib_Makefile.diff
@@ -2,10 +2,8 @@ Build shared version of COLAMD library
 
  -- Daniel Rus Morales <danirus at tol-project.org>  Tue, 17 Jul 2007 12:15:41 +0200
 
-Index: suitesparse-4.0.2/COLAMD/Lib/Makefile
-===================================================================
---- suitesparse-4.0.2.orig/COLAMD/Lib/Makefile	2012-09-10 21:21:09.472248758 +0200
-+++ suitesparse-4.0.2/COLAMD/Lib/Makefile	2012-09-10 21:21:46.744247190 +0200
+--- a/COLAMD/Lib/Makefile
++++ b/COLAMD/Lib/Makefile
 @@ -2,7 +2,9 @@
  # COLAMD Makefile
  #-------------------------------------------------------------------------------
@@ -22,10 +20,10 @@ Index: suitesparse-4.0.2/COLAMD/Lib/Makefile
  	- $(RANLIB) libcolamd.a
  
 +libcolamd.so.$(SOVERSION):  $(SRC) $(INC)
-+	$(CC) -fPIC $(CFLAGS) $(I) -c ../Source/colamd_global.c -o colamd_global.oo
-+	$(CC) -fPIC $(CFLAGS) $(I) -c ../Source/colamd.c -o colamd.oo
-+	$(CC) -fPIC $(CFLAGS) $(I) -c ../Source/colamd.c -DDLONG -o colamd_l.oo
-+	$(CC) -shared *.oo -lm -Wl,-soname -Wl,$@ -o $@
++	$(CC) -fPIC $(CF) $(I) -c ../Source/colamd_global.c -o colamd_global.oo
++	$(CC) -fPIC $(CF) $(I) -c ../Source/colamd.c -o colamd.oo
++	$(CC) -fPIC $(CF) $(I) -c ../Source/colamd.c -DDLONG -o colamd_l.oo
++	$(CC) $(LDFLAGS) -shared *.oo -lm -Wl,-soname -Wl,$@ -o $@
 +	ln -s $@ libcolamd.so
 +
  ccode: libcolamd.a
diff --git a/debian/patches/06-BTF_Lib_Makefile.diff b/debian/patches/06-BTF_Lib_Makefile.diff
index 776b8db..37bf458 100644
--- a/debian/patches/06-BTF_Lib_Makefile.diff
+++ b/debian/patches/06-BTF_Lib_Makefile.diff
@@ -25,7 +25,7 @@ Index: suitesparse-4.0.2/BTF/Lib/Makefile
  
 -$(OBJ): $(INC)
 +libbtf.so.$(SOVERSION): $(OBJ_SL)
-+	$(CC) -shared $^ -lm -Wl,-soname -Wl,$@ -o $@
++	$(CC) $(LDFLAGS) -shared $^ -lm -Wl,-soname -Wl,$@ -o $@
 +	ln -s $@ libbtf.so
 +
 +$(OBJ) $(OBJ_SL): $(INC)
diff --git a/debian/patches/07-KLU_Lib_Makefile.diff b/debian/patches/07-KLU_Lib_Makefile.diff
index 6a8d3bc..4d85efe 100644
--- a/debian/patches/07-KLU_Lib_Makefile.diff
+++ b/debian/patches/07-KLU_Lib_Makefile.diff
@@ -55,7 +55,7 @@ Index: suitesparse-4.0.2/KLU/Lib/Makefile
  
 -$(OBJ): $(INC)
 +libklu.so.$(SOVERSION): $(OBJ_SL)
-+	$(CC) -shared $^ -lm ../../AMD/Lib/libamd.so ../../BTF/Lib/libbtf.so ../../COLAMD/Lib/libcolamd.so -Wl,-soname -Wl,$@ -o $@
++	$(CC) $(LDFLAGS) -shared $^ -lm ../../AMD/Lib/libamd.so ../../BTF/Lib/libbtf.so ../../COLAMD/Lib/libcolamd.so -Wl,-soname -Wl,$@ -o $@
 +	ln -s $@ libklu.so
 +
 +$(OBJ) $(OBJ_SL): $(INC)
diff --git a/debian/patches/08-LDL_Lib_Makefile.diff b/debian/patches/08-LDL_Lib_Makefile.diff
index deebcaa..327c3b2 100644
--- a/debian/patches/08-LDL_Lib_Makefile.diff
+++ b/debian/patches/08-LDL_Lib_Makefile.diff
@@ -24,7 +24,7 @@ Index: suitesparse-4.0.2/LDL/Lib/Makefile
 +libldl.so.$(SOVERSION): ../Source/ldl.c ../Include/ldl.h
 +	$(C) -fPIC -c ../Source/ldl.c -o ldl.oo
 +	$(C) -fPIC -DLDL_LONG -c ../Source/ldl.c -o ldll.oo
-+	$(C) -fPIC -shared *.oo -lm -Wl,-soname -Wl,$@ -o $@
++	$(C) $(LDFLAGS) -shared *.oo -lm -Wl,-soname -Wl,$@ -o $@
 +	ln -s $@ libldl.so
 +
  distclean: purge
diff --git a/debian/patches/09-CSparse_Lib_Makefile.diff b/debian/patches/09-CSparse_Lib_Makefile.diff
index aaabca7..5bc0146 100644
--- a/debian/patches/09-CSparse_Lib_Makefile.diff
+++ b/debian/patches/09-CSparse_Lib_Makefile.diff
@@ -2,15 +2,14 @@ Build shared version of CSparse library
 
  -- Daniel Rus Morales <danirus at tol-project.org>  Tue, 17 Jul 2007 12:15:41 +0200
 
-diff -u upstrm/CSparse/Lib/Makefile debsrc/CSparse/Lib/Makefile
---- upstrm/CSparse/Lib/Makefile	2007-05-05 22:46:13.000000000 +0200
-+++ debsrc/CSparse/Lib/Makefile	2007-12-15 19:08:44.000000000 +0100
+--- a/CSparse/Lib/Makefile
++++ b/CSparse/Lib/Makefile
 @@ -3,7 +3,11 @@
  RANLIB = ranlib
  ARCHIVE = $(AR) $(ARFLAGS)
  
 -all: libcsparse.a
-+C = $(CC) $(CFLAGS) -I../Include
++C = $(CC) $(CF) -I../Include
 +
 +SOVERSION = $(shell perl ../../debian/library-soname.pl CSparse | sed 's/libcsparse//')
 +
@@ -38,7 +37,7 @@ diff -u upstrm/CSparse/Lib/Makefile debsrc/CSparse/Lib/Makefile
  	- $(RANLIB) libcsparse.a
  
 +libcsparse.so.$(SOVERSION): $(CS_SL)
-+	$(CC) -shared $^ -lm -Wl,-soname -Wl,$@ -o $@
++	$(CC) $(LDFLAGS) -shared $^ -lm -Wl,-soname -Wl,$@ -o $@
 +	ln -s $@ libcsparse.so
 +
 +
diff --git a/debian/patches/10-CXSparse_Lib_Makefile.diff b/debian/patches/10-CXSparse_Lib_Makefile.diff
index 2430b16..569487f 100644
--- a/debian/patches/10-CXSparse_Lib_Makefile.diff
+++ b/debian/patches/10-CXSparse_Lib_Makefile.diff
@@ -82,7 +82,7 @@ Index: suitesparse-4.0.2/CXSparse/Lib/Makefile
  	- $(RANLIB) libcxsparse.a
  
 +libcxsparse.so.$(SOVERSION): $(CS_SL)
-+	$(CC) -shared $^ -lm -Wl,-soname -Wl,$@ -o $@
++	$(CC) $(LDFLAGS) -shared $^ -lm -Wl,-soname -Wl,$@ -o $@
 +	ln -s $@ libcxsparse.so
 +
 +
diff --git a/debian/patches/11-UMFPACK_Lib_GNUmakefile.diff b/debian/patches/11-UMFPACK_Lib_GNUmakefile.diff
index 7cd6a55..2ee92e4 100644
--- a/debian/patches/11-UMFPACK_Lib_GNUmakefile.diff
+++ b/debian/patches/11-UMFPACK_Lib_GNUmakefile.diff
@@ -280,7 +280,7 @@ Index: suitesparse-4.0.2/UMFPACK/Lib/GNUmakefile
 -so: $(II) $(LL) $(GN) $(DI) $(DL) $(ZI) $(ZL)
 -	gcc -shared -Wl,-soname,libumfpack.so -o libumfpack.so $^
 +libumfpack.so.$(SOVERSION): $(II_SL) $(LL_SL) $(GN_SL) $(DI_SL) $(DL_SL) $(ZI_SL) $(ZL_SL)
-+	$(CC) -shared $^ -lm -lblas ../../AMD/Lib/libamd.so -Wl,-soname -Wl,$@ -o $@
++	$(CC) $(LDFLAGS) -shared $^ -lm -lblas ../../AMD/Lib/libamd.so -Wl,-soname -Wl,$@ -o $@
 +	ln -s $@ libumfpack.so
  
  #-------------------------------------------------------------------------------
diff --git a/debian/patches/12-CHOLMOD_Lib_Makefile.diff b/debian/patches/12-CHOLMOD_Lib_Makefile.diff
index 54f68e6..3a207a5 100644
--- a/debian/patches/12-CHOLMOD_Lib_Makefile.diff
+++ b/debian/patches/12-CHOLMOD_Lib_Makefile.diff
@@ -111,7 +111,7 @@ Build shared version of CHOLMOD library.
  
 -$(OBJ): $(INC)
 +libcholmod.so.$(SOVERSION): $(OBJ_SL)
-+	$(CC) -shared $^ -lblas -llapack ../../AMD/Lib/libamd.so ../../COLAMD/Lib/libcolamd.so -lm  -Wl,-soname -Wl,$@ -o $@
++	$(CC) $(LDFLAGS) -shared $^ -lblas -llapack ../../AMD/Lib/libamd.so ../../COLAMD/Lib/libcolamd.so -lm  -Wl,-soname -Wl,$@ -o $@
 +	ln -s $@ libcholmod.so
 +
 +$(OBJ) $(OBJ_SL): $(INC)
diff --git a/debian/patches/buildflags.diff b/debian/patches/buildflags.diff
new file mode 100644
index 0000000..4e80f1a
--- /dev/null
+++ b/debian/patches/buildflags.diff
@@ -0,0 +1,45 @@
+Description: Clean up build flags
+ - remove optimization flags because we want to support noopt option
+ - remove -fPIC because we don't want to use it for static libraries (and the
+   other patches enforce it for dynamic libraries)
+Author: Sébastien Villemot <sebastien at debian.org>
+Forwarded: not-needed
+Last-Update: 2013-04-20
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/CSparse/Lib/Makefile
++++ b/CSparse/Lib/Makefile
+@@ -1,4 +1,4 @@
+-CF = $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -O
++CF = $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH)
+ I = -I../Include
+ RANLIB = ranlib
+ ARCHIVE = $(AR) $(ARFLAGS)
+--- a/SuiteSparse_config/SuiteSparse_config.mk
++++ b/SuiteSparse_config/SuiteSparse_config.mk
+@@ -60,7 +60,7 @@
+ # C and C++ compiler flags.  The first three are standard for *.c and *.cpp
+ # Add -DNTIMER if you do use any timing routines (otherwise -lrt is required).
+ # CF = $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -O3 -fexceptions -fPIC -DNTIMER
+-  CF = $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -O3 -fexceptions -fPIC
++  CF = $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -fexceptions
+ 
+ # ranlib, and ar, for generating libraries.  If you don't need ranlib,
+ # just change it to RANLAB = echo
+@@ -73,7 +73,7 @@
+ 
+ # Fortran compiler (not required for 'make' or 'make library')
+ F77 = gfortran
+-F77FLAGS = $(FFLAGS) -O
++F77FLAGS = $(FFLAGS)
+ F77LIB =
+ 
+ # C and Fortran libraries.  Remove -lrt if you don't have it.
+--- a/CSparse/Demo/Makefile
++++ b/CSparse/Demo/Makefile
+@@ -1,4 +1,4 @@
+-CF = $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -O
++CF = $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH)
+ I = -I../Include
+ 
+ CS = ../Lib/libcsparse.a
diff --git a/debian/patches/series b/debian/patches/series
index 24eff78..4ee2517 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -11,3 +11,4 @@
 11-UMFPACK_Lib_GNUmakefile.diff
 12-CHOLMOD_Lib_Makefile.diff
 13-UFconfig_UFconfig.mk.diff
+buildflags.diff
diff --git a/debian/rules b/debian/rules
index 83119b3..25a49d6 100755
--- a/debian/rules
+++ b/debian/rules
@@ -12,11 +12,6 @@ DEB_MAKE_CLEAN_TARGET    := clean
 DEB_MAKE_BUILD_TARGET    := default
 DEB_COMPRESS_EXCLUDE     := .pdf
 
-CFLAGS=-fexceptions -Wall -O3 -g
-ifeq ($(DEB_HOST_ARCH_CPU),amd64)
- CFLAGS+=-m64
-endif
-
 # List of libraries provided by SuiteSparse
 LIBRARIES = AMD CAMD BTF COLAMD CCOLAMD CHOLMOD CSparse CXSparse KLU LDL UMFPACK
 # Generate variables like "AMD = libamd<soversion>"

-- 
Debian packaging for suitesparse



More information about the debian-science-commits mailing list