[mapserver] 01/04: Add patch to not export the mapserver target for static builds.

Sebastiaan Couwenberg sebastic at moszumanska.debian.org
Mon Oct 12 16:02:26 UTC 2015


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

sebastic pushed a commit to branch master
in repository mapserver.

commit 1415b9f7437a40dbc163d41ee6ca008663700623
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date:   Mon Sep 21 21:27:34 2015 +0200

    Add patch to not export the mapserver target for static builds.
---
 debian/changelog                                   |   1 +
 ...-mapserver-target-for-static-libmapserver.patch | 106 +++++++++++++++++++++
 debian/patches/series                              |   1 +
 3 files changed, 108 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 52f49af..cc48d63 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,7 @@ mapserver (7.0.0-5) UNRELEASED; urgency=medium
 
   * Add patch to add ARCHIVE install target for Windows builds.
   * Add patch to install mapserver target only once.
+  * Add patch to not export the mapserver target for static builds.
 
  -- Bas Couwenberg <sebastic at debian.org>  Sat, 12 Sep 2015 16:09:34 +0200
 
diff --git a/debian/patches/dont-export-mapserver-target-for-static-libmapserver.patch b/debian/patches/dont-export-mapserver-target-for-static-libmapserver.patch
new file mode 100644
index 0000000..eb8dd94
--- /dev/null
+++ b/debian/patches/dont-export-mapserver-target-for-static-libmapserver.patch
@@ -0,0 +1,106 @@
+Description: Don't export mapserver target for static libmapserver.
+ The CMake exports are only relevant for the dynamically linked libmapserver.
+Author: Bas Couwenberg <sebastic at debian.org>
+Bug: https://github.com/mapserver/mapserver/issues/5170
+Forwarded: https://github.com/mapserver/mapserver/pull/5171
+
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -870,9 +870,11 @@ configure_file (
+   "${PROJECT_BINARY_DIR}/mapserver-version.h"
+   )
+ 
+-set_target_properties(mapserver PROPERTIES
+-  PUBLIC_HEADER "${mapserver_HEADERS};${PROJECT_BINARY_DIR}/mapserver-config.h;${PROJECT_BINARY_DIR}/mapserver-version.h"
+-)
++if(BUILD_DYNAMIC)
++  set_target_properties(mapserver PROPERTIES
++    PUBLIC_HEADER "${mapserver_HEADERS};${PROJECT_BINARY_DIR}/mapserver-config.h;${PROJECT_BINARY_DIR}/mapserver-version.h"
++  )
++endif(BUILD_DYNAMIC)
+ 
+ macro(status_optional_component component enabled libpath)
+   if("${enabled}" EQUAL "1")
+@@ -987,43 +989,43 @@ if(BUILD_DYNAMIC)
+            LIBRARY DESTINATION ${INSTALL_LIB_DIR} COMPONENT shlib
+            PUBLIC_HEADER DESTINATION ${INSTALL_INCLUDE_DIR}/mapserver COMPONENT dev
+    )
+-endif(BUILD_DYNAMIC)
+-
+-# Add all targets to the build-tree export set
+-export(TARGETS mapserver
+-       FILE "${PROJECT_BINARY_DIR}/mapserverTargets.cmake"
+-)
+-
+-# Export the package for use from the build-tree
+-# (this registers the build-tree with a global CMake-registry)
+-export(PACKAGE mapserver)
+-
+-list(APPEND ALL_INCLUDE_DIRS ${INSTALL_INCLUDE_DIR})
+-list(APPEND ALL_INCLUDE_DIRS ${INSTALL_INCLUDE_DIR}/mapserver)
+-
+-list(REMOVE_DUPLICATES ALL_INCLUDE_DIRS)
+-
+-# Create the mapserver-config.cmake and mapserver-config-version files
+-file(RELATIVE_PATH REL_INCLUDE_DIR "${INSTALL_CMAKE_DIR}" "${ALL_INCLUDE_DIRS}")
+ 
+-# ... for the build tree
+-set(CONF_INCLUDE_DIRS "${PROJECT_SOURCE_DIR}" "${PROJECT_BINARY_DIR}")
+-configure_file(mapserver-config.cmake.in "${PROJECT_BINARY_DIR}/mapserver-config.cmake" @ONLY)
+-
+-# ... for the install tree
+-set(CONF_INCLUDE_DIRS "\${MAPSERVER_CMAKE_DIR}/${REL_INCLUDE_DIR}")
+-configure_file(mapserver-config.cmake.in "${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/mapserver-config.cmake" @ONLY)
+-
+-# ... for both
+-configure_file(mapserver-config-version.cmake.in "${PROJECT_BINARY_DIR}/mapserver-config-version.cmake" @ONLY)
+-
+-# Install the mapserver-config.cmake and mapserver-config-version.cmake
+-install(FILES "${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/mapserver-config.cmake"
+-              "${PROJECT_BINARY_DIR}/mapserver-config-version.cmake"
+-        DESTINATION "${INSTALL_CMAKE_DIR}" COMPONENT dev
+-)
+-
+-# Install the export set for use with the install-tree
+-install(EXPORT mapserverTargets
+-        DESTINATION "${INSTALL_CMAKE_DIR}" COMPONENT dev
+-)
++   # Add all targets to the build-tree export set
++   export(TARGETS mapserver
++          FILE "${PROJECT_BINARY_DIR}/mapserverTargets.cmake"
++   )
++   
++   # Export the package for use from the build-tree
++   # (this registers the build-tree with a global CMake-registry)
++   export(PACKAGE mapserver)
++   
++   list(APPEND ALL_INCLUDE_DIRS ${INSTALL_INCLUDE_DIR})
++   list(APPEND ALL_INCLUDE_DIRS ${INSTALL_INCLUDE_DIR}/mapserver)
++   
++   list(REMOVE_DUPLICATES ALL_INCLUDE_DIRS)
++   
++   # Create the mapserver-config.cmake and mapserver-config-version files
++   file(RELATIVE_PATH REL_INCLUDE_DIR "${INSTALL_CMAKE_DIR}" "${ALL_INCLUDE_DIRS}")
++   
++   # ... for the build tree
++   set(CONF_INCLUDE_DIRS "${PROJECT_SOURCE_DIR}" "${PROJECT_BINARY_DIR}")
++   configure_file(mapserver-config.cmake.in "${PROJECT_BINARY_DIR}/mapserver-config.cmake" @ONLY)
++   
++   # ... for the install tree
++   set(CONF_INCLUDE_DIRS "\${MAPSERVER_CMAKE_DIR}/${REL_INCLUDE_DIR}")
++   configure_file(mapserver-config.cmake.in "${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/mapserver-config.cmake" @ONLY)
++   
++   # ... for both
++   configure_file(mapserver-config-version.cmake.in "${PROJECT_BINARY_DIR}/mapserver-config-version.cmake" @ONLY)
++   
++   # Install the mapserver-config.cmake and mapserver-config-version.cmake
++   install(FILES "${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/mapserver-config.cmake"
++                 "${PROJECT_BINARY_DIR}/mapserver-config-version.cmake"
++           DESTINATION "${INSTALL_CMAKE_DIR}" COMPONENT dev
++   )
++   
++   # Install the export set for use with the install-tree
++   install(EXPORT mapserverTargets
++           DESTINATION "${INSTALL_CMAKE_DIR}" COMPONENT dev
++   )
++endif(BUILD_DYNAMIC)
diff --git a/debian/patches/series b/debian/patches/series
index 3eddf6d..4e345b2 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -5,3 +5,4 @@ cmake-mapserver-export.patch
 java-hardening.patch
 windows-archive-install-target.patch
 dont-install-headers-in-usr-lib.patch
+dont-export-mapserver-target-for-static-libmapserver.patch

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



More information about the Pkg-grass-devel mailing list