[libkml] 15/23: Add patch to support Multi-Arch library install path.

Sebastiaan Couwenberg sebastic at moszumanska.debian.org
Sat Jul 25 19:41:21 UTC 2015


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

sebastic pushed a commit to branch master
in repository libkml.

commit 2a781db091538480662b5b7a08b471188ec99b67
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date:   Sat Jul 25 18:48:46 2015 +0200

    Add patch to support Multi-Arch library install path.
---
 debian/changelog                   |  1 +
 debian/libkml-dev.install          |  2 +-
 debian/libkml1.install             |  2 +-
 debian/patches/install-paths.patch | 68 ++++++++++++++++++++++++++++++++++++++
 debian/patches/series              |  1 +
 debian/rules                       |  7 +---
 6 files changed, 73 insertions(+), 8 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 0a5ade0..4e389a9 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -10,6 +10,7 @@ libkml (1.3.0~r864+git20150723-0fa2f22-1) UNRELEASED; urgency=medium
   * Add patch to fix FTBFS due to ; separated compiler flags.
   * Add patch to fix SOVERSION from MAJOR.MINOR to MARJOR.
   * Rename library package to incorporate SONAME bump.
+  * Add patch to support Multi-Arch library install path.
 
  -- Bas Couwenberg <sebastic at debian.org>  Sat, 25 Jul 2015 15:16:12 +0200
 
diff --git a/debian/libkml-dev.install b/debian/libkml-dev.install
index 98f4d4f..c35cb98 100644
--- a/debian/libkml-dev.install
+++ b/debian/libkml-dev.install
@@ -1,2 +1,2 @@
 usr/include/
-usr/lib/lib*.so
+usr/lib/*/lib*.so
diff --git a/debian/libkml1.install b/debian/libkml1.install
index d0dbfd1..3ddde58 100644
--- a/debian/libkml1.install
+++ b/debian/libkml1.install
@@ -1 +1 @@
-usr/lib/lib*.so.*
+usr/lib/*/lib*.so.*
diff --git a/debian/patches/install-paths.patch b/debian/patches/install-paths.patch
new file mode 100644
index 0000000..12d5cb0
--- /dev/null
+++ b/debian/patches/install-paths.patch
@@ -0,0 +1,68 @@
+Description: Add user customizable install paths.
+Author: Bas Couwenberg <sebastic at debian.org>
+Forwarded: https://github.com/libkml/libkml/pull/197
+
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -28,6 +28,28 @@ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMA
+ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
+ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
+ 
++if(NOT DEFINED BIN_INSTALL_DIR)
++    set(BIN_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/bin")
++endif(NOT DEFINED BIN_INSTALL_DIR)
++if(NOT DEFINED LIB_INSTALL_DIR)
++    set(LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib")
++endif(NOT DEFINED LIB_INSTALL_DIR)
++if(NOT DEFINED DATA_INSTALL_DIR)
++    set(DATA_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/share")
++endif(NOT DEFINED DATA_INSTALL_DIR)
++if(NOT DEFINED INCLUDE_INSTALL_DIR)
++    set(INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include/kml")
++endif(NOT DEFINED INCLUDE_INSTALL_DIR)
++if(NOT DEFINED MAN_INSTALL_DIR)
++    set(MAN_INSTALL_DIR "${DATA_INSTALL_DIR}/man")
++endif(NOT DEFINED MAN_INSTALL_DIR)
++if(NOT DEFINED RESOURCE_INSTALL_DIR)
++    set(RESOURCE_INSTALL_DIR "${DATA_INSTALL_DIR}/libkml${VERSION_MAJOR}/resource/")
++endif(NOT DEFINED RESOURCE_INSTALL_DIR)
++if(NOT DEFINED LOCALE_INSTALL_DIR)
++    set(LOCALE_INSTALL_DIR "${DATA_INSTALL_DIR}/locale/")
++endif(NOT DEFINED LOCALE_INSTALL_DIR)
++
+ set(HAVE_SYSTEM_ZLIB CACHE INTERNAL FALSE)
+ set(HAVE_SYSTEM_MINIZIP CACHE INTERNAL FALSE)
+ set(HAVE_SYSTEM_EXPAT CACHE INTERNAL FALSE)
+--- a/cmake/LibKMLHelper.cmake
++++ b/cmake/LibKMLHelper.cmake
+@@ -21,7 +21,7 @@ macro(build_target)
+   string(SUBSTRING ${LIB_NAME} 3 ${${LIB_NAME}_END} ${LIB_NAME}_INCLUDE_DIR)
+   install(
+     FILES ${LIB_INCS}
+-    DESTINATION include/${${LIB_NAME}_INCLUDE_DIR})
++    DESTINATION ${INCLUDE_INSTALL_DIR})
+ 
+   install_target(${LIB_NAME})
+ 
+@@ -29,9 +29,9 @@ endmacro(build_target)
+ 
+ macro(install_target _target)
+   install(TARGETS ${_target}
+-    RUNTIME DESTINATION bin
+-    LIBRARY DESTINATION lib
+-    ARCHIVE DESTINATION lib)
++    RUNTIME DESTINATION ${BIN_INSTALL_DIR}
++    LIBRARY DESTINATION ${LIB_INSTALL_DIR}
++    ARCHIVE DESTINATION ${LIB_INSTALL_DIR})
+ endmacro(install_target)
+ 
+ function(build_test)
+--- a/src/kml/CMakeLists.txt
++++ b/src/kml/CMakeLists.txt
+@@ -7,5 +7,5 @@ add_subdirectory(regionator)
+ 
+ 
+ install(  FILES dom.h engine.h
+-          DESTINATION include/kml
++          DESTINATION ${INCLUDE_INSTALL_DIR}
+           COMPONENT Development)
diff --git a/debian/patches/series b/debian/patches/series
index 791d0ec..3dbc72e 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
 java-run-sh-shebang.diff
 compiler-flags.patch
 soversion.patch
+install-paths.patch
diff --git a/debian/rules b/debian/rules
index d705336..c73a10f 100755
--- a/debian/rules
+++ b/debian/rules
@@ -9,6 +9,7 @@ DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
 
 override_dh_auto_configure:
 	dh_auto_configure -- \
+		-DLIB_INSTALL_DIR=/usr/lib/$(DEB_HOST_MULTIARCH) \
 		-DBUILD_TESTING=OFF \
 		-DBUILD_EXAMPLES=OFF \
 		-DINSTALL_EXAMPLES=OFF \
@@ -28,12 +29,6 @@ override_dh_auto_install:
 	# Remove python swig
 	#find $(CURDIR)/debian/tmp/usr/lib -name "libkml*python*.so*" -delete
 
-	# Remove la files
-	#find $(CURDIR)/debian/tmp/usr/lib -name "*.la" -delete
-
-	# Move libraries from libkml subdirectory
-	#mv $(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libkml/* $(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/
-
 	# libminizip headers
 	#install -m755 -d $(CURDIR)/debian/tmp/usr/include/minizip
 	#install -m644 $(CURDIR)/third_party/zlib-*/contrib/minizip/*h $(CURDIR)/debian/tmp/usr/include/minizip/

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/libkml.git



More information about the Pkg-grass-devel mailing list