[suitesparse] 01/04: Ship libsuitesparseconfig in a separate package.
Sébastien Villemot
sebastien at debian.org
Sun Feb 8 18:02:52 UTC 2015
This is an automated email from the git hooks/post-receive script.
sebastien pushed a commit to branch master
in repository suitesparse.
commit 06f51994e9852ef9d470619e99d3bb7386d82822
Author: Sébastien Villemot <sebastien at debian.org>
Date: Sun Feb 8 18:32:42 2015 +0100
Ship libsuitesparseconfig in a separate package.
This is now necessary because the library contains a global symbol, shared
between several SuiteSparse libraries.
Git-Dch: Full
---
debian/control | 18 ++++++++++++++--
debian/control.in | 18 ++++++++++++++--
debian/install/SuiteSparse_config | 3 +++
debian/library-soname.pl | 9 ++++++--
debian/libsuitesparse-dev.install | 3 ++-
debian/patches/shared-libraries.patch | 39 +++++++++++++++++++----------------
debian/rules | 2 +-
7 files changed, 66 insertions(+), 26 deletions(-)
diff --git a/debian/control b/debian/control
index d51193a..bf703e6 100644
--- a/debian/control
+++ b/debian/control
@@ -160,6 +160,18 @@ Description: sparse QR factorization library
.
SPQR sparse QR factorization library
+Package: libsuitesparseconfig4.4.0
+Section: libs
+Architecture: any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: configuration routines for all SuiteSparse modules
+ Suitesparse is a collection of libraries for computations involving
+ sparse matrices. This package includes the following dynamic library:
+ .
+ SuiteSparse_config configuration routines for all SuiteSparse modules
+
Package: libsuitesparse-dev
Section: libdevel
Architecture: any
@@ -180,6 +192,7 @@ Depends: ${misc:Depends},
libldl2.2.1 (= ${binary:Version}),
libumfpack5.7.1 (= ${binary:Version}),
libspqr2.0.0 (= ${binary:Version}),
+ libsuitesparseconfig4.4.0 (= ${binary:Version}),
libblas-dev | libblas.so,
liblapack-dev | liblapack.so
Description: libraries for sparse matrices computations (development files)
@@ -210,7 +223,7 @@ Description: libraries for sparse matrices computations (development files)
.
SPQR sparse QR factorization
.
- SuiteSparse_config configuration file for all the above packages.
+ SuiteSparse_config configuration routines for all the above packages.
.
This package contains the static libraries and header files.
@@ -232,6 +245,7 @@ Depends: ${misc:Depends},
libldl2.2.1 (= ${binary:Version}),
libumfpack5.7.1 (= ${binary:Version}),
libspqr2.0.0 (= ${binary:Version}),
+ libsuitesparseconfig4.4.0 (= ${binary:Version}),
libblas-dev | libblas.so,
liblapack-dev | liblapack.so
Conflicts: libufsparse-dbg
@@ -264,7 +278,7 @@ Description: libraries for sparse matrices computations (debugging symbols)
.
SPQR sparse QR factorization
.
- SuiteSparse_config configuration file for all the above packages.
+ SuiteSparse_config configuration routines for all the above packages.
.
This package contains the debug libraries (stored in /usr/lib/debug).
diff --git a/debian/control.in b/debian/control.in
index 28f138c..b130064 100644
--- a/debian/control.in
+++ b/debian/control.in
@@ -155,6 +155,18 @@ Description: sparse QR factorization library
.
SPQR sparse QR factorization library
+Package: @SuiteSparse_config@
+Section: libs
+Architecture: any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: configuration routines for all SuiteSparse modules
+ Suitesparse is a collection of libraries for computations involving
+ sparse matrices. This package includes the following dynamic library:
+ .
+ SuiteSparse_config configuration routines for all SuiteSparse modules
+
Package: libsuitesparse-dev
Section: libdevel
Architecture: any
@@ -175,6 +187,7 @@ Depends: ${misc:Depends},
@LDL@ (= ${binary:Version}),
@UMFPACK@ (= ${binary:Version}),
@SPQR@ (= ${binary:Version}),
+ @SuiteSparse_config@ (= ${binary:Version}),
libblas-dev | libblas.so,
liblapack-dev | liblapack.so
Description: libraries for sparse matrices computations (development files)
@@ -205,7 +218,7 @@ Description: libraries for sparse matrices computations (development files)
.
SPQR sparse QR factorization
.
- SuiteSparse_config configuration file for all the above packages.
+ SuiteSparse_config configuration routines for all the above packages.
.
This package contains the static libraries and header files.
@@ -227,6 +240,7 @@ Depends: ${misc:Depends},
@LDL@ (= ${binary:Version}),
@UMFPACK@ (= ${binary:Version}),
@SPQR@ (= ${binary:Version}),
+ @SuiteSparse_config@ (= ${binary:Version}),
libblas-dev | libblas.so,
liblapack-dev | liblapack.so
Conflicts: libufsparse-dbg
@@ -259,7 +273,7 @@ Description: libraries for sparse matrices computations (debugging symbols)
.
SPQR sparse QR factorization
.
- SuiteSparse_config configuration file for all the above packages.
+ SuiteSparse_config configuration routines for all the above packages.
.
This package contains the debug libraries (stored in /usr/lib/debug).
diff --git a/debian/install/SuiteSparse_config b/debian/install/SuiteSparse_config
new file mode 100755
index 0000000..69f2ca8
--- /dev/null
+++ b/debian/install/SuiteSparse_config
@@ -0,0 +1,3 @@
+#!/usr/bin/dh-exec
+
+SuiteSparse_config/*.so.* /usr/lib/${DEB_HOST_MULTIARCH}/
diff --git a/debian/library-soname.pl b/debian/library-soname.pl
index 2ff7e6e..9a62968 100644
--- a/debian/library-soname.pl
+++ b/debian/library-soname.pl
@@ -12,7 +12,8 @@
KLU, "1.3.2",
LDL, "2.2.1",
UMFPACK, "5.7.1",
- SPQR, "2.0.0"
+ SPQR, "2.0.0",
+ SuiteSparse_config, "4.4.0"
);
die "Usage: $0 LIB\n" if $#ARGV != 0;
@@ -20,4 +21,8 @@ die "Usage: $0 LIB\n" if $#ARGV != 0;
my $lib = $ARGV [0];
die "$0: Unknown library $lib\n" if not exists $soversion {$lib};
-print "lib" . lc ($lib) . $soversion {$lib};
+my $debpkg = lc ($lib);
+$debpkg =~ s/_//;
+$debpkg = "lib" . $debpkg . $soversion {$lib};
+
+print $debpkg
diff --git a/debian/libsuitesparse-dev.install b/debian/libsuitesparse-dev.install
index 654bab6..13b5855 100755
--- a/debian/libsuitesparse-dev.install
+++ b/debian/libsuitesparse-dev.install
@@ -34,7 +34,8 @@ UMFPACK/Lib/*.a /usr/lib/${DEB_HOST_MULTIARCH}/
UMFPACK/Lib/*.so /usr/lib/${DEB_HOST_MULTIARCH}/
UMFPACK/Include/*.h /usr/include/suitesparse
SuiteSparse_config/*.h /usr/include/suitesparse
-SuiteSparse_config/libsuitesparseconfig.a /usr/lib/${DEB_HOST_MULTIARCH}/
+SuiteSparse_config/*.a /usr/lib/${DEB_HOST_MULTIARCH}/
+SuiteSparse_config/*.so /usr/lib/${DEB_HOST_MULTIARCH}/
SPQR/Lib/*.a /usr/lib/${DEB_HOST_MULTIARCH}/
SPQR/Lib/*.so /usr/lib/${DEB_HOST_MULTIARCH}/
SPQR/Include/*.h /usr/include/suitesparse
diff --git a/debian/patches/shared-libraries.patch b/debian/patches/shared-libraries.patch
index 1e5e561..ebccb59 100644
--- a/debian/patches/shared-libraries.patch
+++ b/debian/patches/shared-libraries.patch
@@ -1,8 +1,5 @@
Description: Build shared version of libraries
- Note that for libsuitesparseconfig we don't create a separate shared library,
- since it is too small. We rather embed a PIC version of it in the shared
- libraries that need it.
-Author: Daniel Rus Morales <danirus at tol-project.org>
+Author: Daniel Rus Morales <danirus at tol-project.org>, Sébastien Villemot <sebastien at debian.org>
Forwarded: no
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
@@ -47,7 +44,7 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
- $(RANLIB) libamd.a
+libamd.so.$(SOVERSION): $(AMDI_SL) $(AMDL_SL)
-+ $(CC) $(LDFLAGS) -shared $^ -lm ../../SuiteSparse_config/libsuitesparseconfig_pic.a -Wl,-soname -Wl,$@ -o $@
++ $(CC) $(LDFLAGS) -shared $^ -lm ../../SuiteSparse_config/libsuitesparseconfig.so -Wl,-soname -Wl,$@ -o $@
+ ln -s $@ libamd.so
+
#-------------------------------------------------------------------------------
@@ -158,7 +155,7 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
- $(RANLIB) libcamd.a
+libcamd.so.$(SOVERSION): $(CAMDI_SL) $(CAMDL_SL)
-+ $(CC) $(LDFLAGS) -shared $^ -lm ../../SuiteSparse_config/libsuitesparseconfig_pic.a -Wl,-soname -Wl,$@ -o $@
++ $(CC) $(LDFLAGS) -shared $^ -lm ../../SuiteSparse_config/libsuitesparseconfig.so -Wl,-soname -Wl,$@ -o $@
+ ln -s $@ libcamd.so
+
#-------------------------------------------------------------------------------
@@ -184,7 +181,7 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+libccolamd.so.$(SOVERSION): $(SRC) $(INC)
+ $(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 ../../SuiteSparse_config/libsuitesparseconfig_pic.a -Wl,-soname -Wl,$@ -o $@
++ $(CC) $(LDFLAGS) -shared *.oo -lm ../../SuiteSparse_config/libsuitesparseconfig.so -Wl,-soname -Wl,$@ -o $@
+ ln -s $@ libccolamd.so
+
ccode: libccolamd.a
@@ -303,7 +300,7 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
-$(OBJ): $(INC)
+libcholmod.so.$(SOVERSION): $(OBJ_SL)
-+ $(CC) $(LDFLAGS) -shared $^ -lblas -llapack ../../AMD/Lib/libamd.so ../../COLAMD/Lib/libcolamd.so ../../CAMD/Lib/libcamd.so ../../CCOLAMD/Lib/libccolamd.so -lm ../../SuiteSparse_config/libsuitesparseconfig_pic.a -lrt -Wl,-soname -Wl,$@ -o $@
++ $(CC) $(LDFLAGS) -shared $^ -lblas -llapack ../../AMD/Lib/libamd.so ../../COLAMD/Lib/libcolamd.so ../../CAMD/Lib/libcamd.so ../../CCOLAMD/Lib/libccolamd.so -lm ../../SuiteSparse_config/libsuitesparseconfig.so -lrt -Wl,-soname -Wl,$@ -o $@
+ ln -s $@ libcholmod.so
+
+$(OBJ) $(OBJ_SL): $(INC)
@@ -913,7 +910,7 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+libcolamd.so.$(SOVERSION): $(SRC) $(INC)
+ $(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 ../../SuiteSparse_config/libsuitesparseconfig_pic.a -Wl,-soname -Wl,$@ -o $@
++ $(CC) $(LDFLAGS) -shared *.oo -lm ../../SuiteSparse_config/libsuitesparseconfig.so -Wl,-soname -Wl,$@ -o $@
+ ln -s $@ libcolamd.so
+
ccode: libcolamd.a
@@ -1097,7 +1094,7 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
-$(OBJ): $(INC)
+libklu.so.$(SOVERSION): $(OBJ_SL)
-+ $(CC) $(LDFLAGS) -shared $^ -lm ../../AMD/Lib/libamd.so ../../BTF/Lib/libbtf.so ../../COLAMD/Lib/libcolamd.so ../../SuiteSparse_config/libsuitesparseconfig_pic.a -Wl,-soname -Wl,$@ -o $@
++ $(CC) $(LDFLAGS) -shared $^ -lm ../../AMD/Lib/libamd.so ../../BTF/Lib/libbtf.so ../../COLAMD/Lib/libcolamd.so ../../SuiteSparse_config/libsuitesparseconfig.so -Wl,-soname -Wl,$@ -o $@
+ ln -s $@ libklu.so
+
+$(OBJ) $(OBJ_SL): $(INC)
@@ -1458,7 +1455,7 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
- $(RANLIB) libspqr.a
+libspqr.so.$(SOVERSION): $(OBJ_SL)
-+ $(CC) $(LDFLAGS) -shared $^ -lm -lblas -llapack ../../CHOLMOD/Lib/libcholmod.so ../../SuiteSparse_config/libsuitesparseconfig_pic.a -Wl,-soname -Wl,$@ -o $@
++ $(CC) $(LDFLAGS) -shared $^ -lm -lblas -llapack ../../CHOLMOD/Lib/libcholmod.so ../../SuiteSparse_config/libsuitesparseconfig.so -Wl,-soname -Wl,$@ -o $@
+ ln -s $@ libspqr.so
+
spqr_1colamd.o: ../Source/spqr_1colamd.cpp
@@ -1948,30 +1945,36 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
-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) $(LDFLAGS) -shared $^ -lm -lblas ../../AMD/Lib/libamd.so ../../CHOLMOD/Lib/libcholmod.so ../../SuiteSparse_config/libsuitesparseconfig_pic.a -Wl,-soname -Wl,$@ -o $@
++ $(CC) $(LDFLAGS) -shared $^ -lm -lblas ../../AMD/Lib/libamd.so ../../CHOLMOD/Lib/libcholmod.so ../../SuiteSparse_config/libsuitesparseconfig.so -Wl,-soname -Wl,$@ -o $@
+ ln -s $@ libumfpack.so
#-------------------------------------------------------------------------------
# Remove all but the files in the original distribution
--- a/SuiteSparse_config/Makefile
+++ b/SuiteSparse_config/Makefile
-@@ -8,7 +8,7 @@ default: ccode
+@@ -4,11 +4,13 @@
+
+ VERSION = 4.4.0
+
++SOVERSION = $(shell perl ../debian/library-soname.pl SuiteSparse_config | sed 's/libsuitesparseconfig//')
++
+ default: ccode
include SuiteSparse_config.mk
-ccode: libsuitesparseconfig.a
-+ccode: libsuitesparseconfig.a libsuitesparseconfig_pic.a
++ccode: libsuitesparseconfig.a libsuitesparseconfig.so.$(SOVERSION)
all: libsuitesparseconfig.a
-@@ -20,6 +20,12 @@ libsuitesparseconfig.a: SuiteSparse_conf
+@@ -20,6 +22,12 @@ libsuitesparseconfig.a: SuiteSparse_conf
$(RANLIB) libsuitesparseconfig.a
- $(RM) SuiteSparse_config.o
-+libsuitesparseconfig_pic.a: SuiteSparse_config.c SuiteSparse_config.h
++libsuitesparseconfig.so.$(SOVERSION): SuiteSparse_config.c SuiteSparse_config.h
+ $(CC) $(CF) -fPIC -o SuiteSparse_config.oo -c SuiteSparse_config.c
-+ $(ARCHIVE) libsuitesparseconfig_pic.a SuiteSparse_config.oo
-+ $(RANLIB) libsuitesparseconfig_pic.a
++ $(CC) $(LDFLAGS) -shared SuiteSparse_config.oo -Wl,-soname -Wl,$@ -o $@ -lm
++ ln -s $@ libsuitesparseconfig.so
+ - $(RM) SuiteSparse_config.oo
+
distclean: purge
diff --git a/debian/rules b/debian/rules
index d9fd007..13b110e 100755
--- a/debian/rules
+++ b/debian/rules
@@ -12,7 +12,7 @@ DEB_MAKE_BUILD_TARGET := default
DEB_COMPRESS_EXCLUDE_ALL := .pdf
# List of libraries provided by SuiteSparse
-LIBRARIES = AMD CAMD BTF COLAMD CCOLAMD CHOLMOD CSparse CXSparse KLU LDL UMFPACK SPQR
+LIBRARIES = AMD CAMD BTF COLAMD CCOLAMD CHOLMOD CSparse CXSparse KLU LDL UMFPACK SPQR SuiteSparse_config
# Generate variables like "AMD = libamd<soversion>"
$(foreach lib, $(LIBRARIES), $(eval $(lib) = $(shell perl debian/library-soname.pl $(lib))))
# Lists of lib*.install files
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/suitesparse.git
More information about the debian-science-commits
mailing list