[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1000736: bullseye-pu: package poco/1.10.0-6



Package: release.debian.org
Severity: normal
Tags: bullseye
User: release.debian.org@packages.debian.org
Usertags: pu
X-Debbugs-Cc: jspricke@debian.org

[ Reason ]
Compared to old-stable, libpoco-dev installs the cmake modules into
multi arch directories but I introduced a bug with it by installing them
into /usr/lib/<multi-arch>/cmake/cmake/Poco, i.e. with a second cmake in
the path and cmake can't find them there. This is reported in #1000656.

[ Impact ]
Poco is not found by cmake.

[ Tests ]
I tested it manually with:

find_package(Poco COMPONENTS Foundation REQUIRED)

[ Risks ]
I see the risk as low as the cmake modules are currently not usable
because the are at the wrong place. Even more, even if made available to
cmake manually, say by extending CMAKE_MODULE_PATH, they are not usable
cause the exported paths to the shared objects are wrong and they depend
on a missing FindPCRE.cmake.

[ Checklist ]
  [X] *all* changes are documented in the d/changelog
  [X] I reviewed all changes and I approve them
  [X] attach debdiff against the package in stable
  [X] the issue is verified as fixed in unstable

[ Changes ]
The changes are twofold:
1. The install path of the cmake modules is corrected in the cmake
source, using GNUInstallDirs. This fixes the exported paths to the
shared objects as well.
2. d/libpoco-dev.install is adopted to the new cmake modules location
and to install the FindPCRE.cmake as well.
>From 0b20519c8c4df22c6f5fffac9d977c8eea4799c5 Mon Sep 17 00:00:00 2001
From: Jochen Sprickerhof <git@jochen.sprickerhof.de>
Date: Sun, 28 Nov 2021 08:25:35 +0100
Subject: [PATCH] Fix cmake files

---
 debian/changelog                              |  9 +++
 debian/libpoco-dev.install                    |  3 +-
 ...tall-cmake-files-into-multiarch-dirs.patch | 62 +++++++++++++++++++
 debian/patches/series                         |  1 +
 4 files changed, 74 insertions(+), 1 deletion(-)
 create mode 100644 debian/patches/0013-Install-cmake-files-into-multiarch-dirs.patch

diff --git a/debian/changelog b/debian/changelog
index f055dcf1..d9068772 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
+poco (1.10.0-6+deb11u1) bullseye; urgency=medium
+
+  * Fix cmake files (Closes: #1000656).
+     - Drop duplicated cmake/ in path so they are discoverable by cmake.
+     - Fix cmake logic to export correct paths of shared objects.
+     - Install FindPCRE.cmake, needed by PocoFoundationConfig.cmake.
+
+ -- Jochen Sprickerhof <jspricke@debian.org>  Sun, 28 Nov 2021 08:18:29 +0100
+
 poco (1.10.0-6) unstable; urgency=medium
 
   [ Debian Janitor ]
diff --git a/debian/libpoco-dev.install b/debian/libpoco-dev.install
index 2ab89382..68f197b8 100644
--- a/debian/libpoco-dev.install
+++ b/debian/libpoco-dev.install
@@ -1,3 +1,4 @@
 usr/include/*
 usr/lib/*/lib*.so
-usr/lib/cmake usr/lib/${DEB_HOST_MULTIARCH}/cmake
+usr/lib/*/cmake
+cmake/FindPCRE.cmake usr/lib/${DEB_HOST_MULTIARCH}/cmake/Poco/
diff --git a/debian/patches/0013-Install-cmake-files-into-multiarch-dirs.patch b/debian/patches/0013-Install-cmake-files-into-multiarch-dirs.patch
new file mode 100644
index 00000000..afe6c036
--- /dev/null
+++ b/debian/patches/0013-Install-cmake-files-into-multiarch-dirs.patch
@@ -0,0 +1,62 @@
+From: Jochen Sprickerhof <git@jochen.sprickerhof.de>
+Date: Sun, 28 Nov 2021 08:16:05 +0100
+Subject: Install cmake files into multiarch dirs
+
+---
+ CMakeLists.txt         | 3 ++-
+ cmake/PocoMacros.cmake | 6 +++---
+ 2 files changed, 5 insertions(+), 4 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index e9d144e..2c4b716 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -438,12 +438,13 @@ write_basic_package_version_file(
+ )
+ 
+ configure_file(cmake/${PROJECT_NAME}Config.cmake.in "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}/${PROJECT_NAME}Config.cmake" @ONLY)
++include(GNUInstallDirs)
+ install(
+     FILES
+         ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}/${PROJECT_NAME}Config.cmake
+         ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}/${PROJECT_NAME}ConfigVersion.cmake
+     DESTINATION
+-        "lib${LIB_SUFFIX}/cmake/${PROJECT_NAME}"
++        "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}"
+     COMPONENT
+         Devel
+ )
+diff --git a/cmake/PocoMacros.cmake b/cmake/PocoMacros.cmake
+index 652fc7d..7070f9c 100644
+--- a/cmake/PocoMacros.cmake
++++ b/cmake/PocoMacros.cmake
+@@ -235,18 +235,19 @@ configure_file("cmake/Poco${target_name}Config.cmake"
+ 
+ set(ConfigPackageLocation "lib/cmake/${PROJECT_NAME}")
+ 
++include(GNUInstallDirs)
+ install(
+     EXPORT "${target_name}Targets"
+     FILE "${PROJECT_NAME}${target_name}Targets.cmake"
+     NAMESPACE "${PROJECT_NAME}::"
+-    DESTINATION "lib${LIB_SUFFIX}/cmake/${PROJECT_NAME}"
++    DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}"
+     )
+ 
+ install(
+     FILES
+         "${CMAKE_BINARY_DIR}/${PROJECT_NAME}/${PROJECT_NAME}${target_name}Config.cmake"
+         "${CMAKE_BINARY_DIR}/${PROJECT_NAME}/${PROJECT_NAME}${target_name}ConfigVersion.cmake"
+-    DESTINATION "lib${LIB_SUFFIX}/cmake/${PROJECT_NAME}"
++    DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}"
+     COMPONENT Devel
+     )
+ 
+@@ -268,7 +269,6 @@ install(
+     PATTERN ".svn" EXCLUDE
+     )
+ 
+-include(GNUInstallDirs)
+ install(
+     TARGETS "${target_name}" EXPORT "${target_name}Targets"
+     LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
diff --git a/debian/patches/series b/debian/patches/series
index 1ff353cd..763a3cc7 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -10,3 +10,4 @@ Add-m68k-to-Double-Conversion.patch
 0010-Disable-SHA2-test-on-platforms-where-it-s-broken.patch
 0011-Set-POCO_NO_FPENVIRONMENT-for-armel.patch
 0012-Disable-failing-tests.patch
+0013-Install-cmake-files-into-multiarch-dirs.patch
-- 
2.34.0


Reply to: