[libsdsl] 02/13: enable multi-arch
Tomasz Buchert
tomasz at moszumanska.debian.org
Sun Apr 10 17:45:58 UTC 2016
This is an automated email from the git hooks/post-receive script.
tomasz pushed a commit to branch master
in repository libsdsl.
commit 3d66b870f14ba1cadfa7c465cf93410318527f27
Author: Tomasz Buchert <tomasz at debian.org>
Date: Tue Aug 25 09:37:03 2015 +0200
enable multi-arch
---
debian/control | 11 ++++----
debian/patches/0001-Patch-cmake-files.patch | 41 ++++++++++++++++++-----------
debian/rules | 4 ++-
3 files changed, 35 insertions(+), 21 deletions(-)
diff --git a/debian/control b/debian/control
index 73ec536..a48efc1 100644
--- a/debian/control
+++ b/debian/control
@@ -1,17 +1,16 @@
Source: libsdsl
Priority: optional
Maintainer: Tomasz Buchert <tomasz at debian.org>
-Build-Depends: debhelper (>= 9), cmake, libdivsufsort-dev
+Build-Depends: cmake, debhelper (>= 9), libdivsufsort-dev
Standards-Version: 3.9.6
Section: libs
Homepage: https://github.com/simongog/sdsl-lite
-#Vcs-Git: git://anonscm.debian.org/collab-maint/libsdsl.git
-#Vcs-Browser: https://anonscm.debian.org/gitweb/?p=collab-maint/libsdsl.git;a=summary
Package: libsdsl-dev
Section: libdevel
Architecture: any
-Depends: libsdsl3 (= ${binary:Version}), ${misc:Depends}
+Multi-Arch: same
+Depends: libdivsufsort-dev, libsdsl3 (= ${binary:Version}), ${misc:Depends}
Description: succinct data structure library - development files
The Succinct Data Structure Library (SDSL) is a powerful and flexible
C++11 library implementing succinct data structures. In total, the
@@ -27,7 +26,9 @@ Description: succinct data structure library - development files
Package: libsdsl3
Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}
+Pre-Depends: ${misc:Pre-Depends}
+Multi-Arch: same
+Depends: ${misc:Depends}, ${shlibs:Depends}
Description: succinct data structure library
The Succinct Data Structure Library (SDSL) is a powerful and flexible
C++11 library implementing succinct data structures. In total, the
diff --git a/debian/patches/0001-Patch-cmake-files.patch b/debian/patches/0001-Patch-cmake-files.patch
index 36d5765..0c8ffee 100644
--- a/debian/patches/0001-Patch-cmake-files.patch
+++ b/debian/patches/0001-Patch-cmake-files.patch
@@ -1,5 +1,5 @@
From: Tomasz Buchert <tomasz at debian.org>
-Date: Tue, 4 Aug 2015 21:51:07 +0200
+Date: Tue, 25 Aug 2015 09:36:21 +0200
Subject: Patch cmake files
We change three things:
@@ -7,18 +7,18 @@ We change three things:
* we comment out machine-specific compiler flags
* we disable compilation of "external" libraries; libdivsufsort is
packaged in Debian now
- * we allow to specify final library directory via
- CMAKE_LIBRARY_ARCHITECTURE to support Debian multi-arch
+ * use GNUInstallDirs
---
- CMakeLists.txt | 22 ++++++++++++++--------
- lib/CMakeLists.txt | 6 +++---
- 2 files changed, 17 insertions(+), 11 deletions(-)
+ CMakeLists.txt | 21 ++++++++++++---------
+ include/sdsl/CMakeLists.txt | 2 +-
+ lib/CMakeLists.txt | 6 +++---
+ 3 files changed, 16 insertions(+), 13 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 20b1377..39f2329 100644
+index 20b1377..8f9da0f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
-@@ -51,17 +51,23 @@ else()
+@@ -51,17 +51,20 @@ else()
append_cxx_compiler_flags("-O3 -ffast-math -funroll-loops" "CLANG" CMAKE_CXX_OPT_FLAGS)
endif()
@@ -39,10 +39,8 @@ index 20b1377..39f2329 100644
- else()
- append_cxx_compiler_flags("-msse4.2" "CLANG" CMAKE_CXX_OPT_FLAGS)
- endif()
-+set(LIBDIR "lib")
-+if(DEFINED CMAKE_LIBRARY_ARCHITECTURE)
-+ set(LIBDIR "lib/${CMAKE_LIBRARY_ARCHITECTURE}")
- endif()
+-endif()
++include(GNUInstallDirs)
-add_subdirectory(external)
+## we use packaged libdivsufsort
@@ -50,8 +48,21 @@ index 20b1377..39f2329 100644
add_subdirectory(include)
add_subdirectory(lib)
+diff --git a/include/sdsl/CMakeLists.txt b/include/sdsl/CMakeLists.txt
+index ef921f0..cbed536 100644
+--- a/include/sdsl/CMakeLists.txt
++++ b/include/sdsl/CMakeLists.txt
+@@ -11,7 +11,7 @@ file(GLOB hppFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "${CMAKE_CURRENT_SOURCE_
+
+ foreach(hppFile ${hppFiles}) # copy each file
+ configure_file( "${CMAKE_CURRENT_SOURCE_DIR}/${hppFile}" "${CMAKE_CURRENT_BINARY_DIR}/${hppFile}" COPYONLY )
+- install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${hppFile}" DESTINATION include/sdsl)
++ install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${hppFile}" DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/sdsl")
+ # MESSAGE(${hppFile})
+ endforeach(hppFile)
+
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
-index 32888b2..1a5660e 100644
+index 32888b2..ff7fb02 100644
--- a/lib/CMakeLists.txt
+++ b/lib/CMakeLists.txt
@@ -1,6 +1,6 @@
@@ -68,8 +79,8 @@ index 32888b2..1a5660e 100644
RUNTIME DESTINATION bin
- LIBRARY DESTINATION lib
- ARCHIVE DESTINATION lib)
-+ LIBRARY DESTINATION "${LIBDIR}"
-+ ARCHIVE DESTINATION "${LIBDIR}")
++ LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
++ ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}")
set_target_properties(sdsl PROPERTIES
VERSION "${LIBRARY_VERSION_FULL}"
diff --git a/debian/rules b/debian/rules
index 14dafce..4e9eef9 100755
--- a/debian/rules
+++ b/debian/rules
@@ -4,6 +4,8 @@
%:
dh $@ --parallel
+DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
+
override_dh_auto_configure:
dh_auto_configure -- -DBUILD_SHARED_LIBS=ON \
- -DCMAKE_LIBRARY_ARCHITECTURE=${DEB_HOST_MULTIARCH}
+ -DCMAKE_LIBRARY_ARCHITECTURE_DEBIAN=${DEB_HOST_MULTIARCH}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/libsdsl.git
More information about the debian-science-commits
mailing list