[Debian-med-packaging] Bug#1018960: libminc embeds wrong cmake path

Steve Langasek steve.langasek at canonical.com
Fri Sep 2 18:03:32 BST 2022


Package: libminc
Version: 2.4.05-2
Severity: important
Tags: patch
User: ubuntu-devel at lists.ubuntu.com
Usertags: origin-ubuntu kinetic ubuntu-patch

Dear maintainers,

A no-change rebuild of minc-tools in Ubuntu for the new soname of libminc
shows that the cmake modules shipped in the package are broken:

[...]
CMake Error at CMakeLists.txt:46 (INCLUDE):
  INCLUDE could not find requested file:

    /usr/lib/x86_64-linux-gnu/lib/cmake/UseLIBMINC.cmake
[...]

  (https://launchpad.net/ubuntu/+source/minc-tools/2.3.00+dfsg-9build1/+build/24314485)

This is because one cmake module embeds an absolute path of another cmake
module, but does not embed the correct path of the module as installed by
the Debian package.

The attached patch fixes the wrong path and allows minc-tools to build. 
There may be more cmake-ish ways to fix this.

-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                   https://www.debian.org/
slangasek at ubuntu.com                                     vorlon at debian.org
-------------- next part --------------
diff -Nru libminc-2.4.05/debian/patches/fix_cmake_path.patch libminc-2.4.05/debian/patches/fix_cmake_path.patch
--- libminc-2.4.05/debian/patches/fix_cmake_path.patch	1969-12-31 16:00:00.000000000 -0800
+++ libminc-2.4.05/debian/patches/fix_cmake_path.patch	2022-09-02 09:53:40.000000000 -0700
@@ -0,0 +1,34 @@
+Description: fix hard-coded path to cmake file
+ LIBMINCConfig.cmake includes a hard-coded reference to the path for
+ UseLIBMINC.camke, but does not use the path where the file is installed in
+ Debian.
+Author: Steve Langasek <steve.langasek at ubuntu.com>
+Last-Update: 2022-09-02
+Forwarded: no
+
+Index: libminc-2.4.05/LIBMINCConfig.cmake.in
+===================================================================
+--- libminc-2.4.05.orig/LIBMINCConfig.cmake.in
++++ libminc-2.4.05/LIBMINCConfig.cmake.in
+@@ -22,7 +22,7 @@
+ 
+ set(LIBMINC_INCLUDE_DIRS "@LIBMINC_INCLUDE_DIRS_CONFIG@") # ${LIBMINC_INSTALL_PREFIX}/include
+ set(LIBMINC_LIBRARY_DIRS "@LIBMINC_LIBRARY_DIRS_CONFIG@") # ${LIBMINC_INSTALL_PREFIX}/lib
+-set(LIBMINC_USE_FILE     "@LIBMINC_USE_FILE_CONFIG@") # ${LIBMINC_INSTALL_PREFIX}/lib/UseLIBMINC.cmake
++set(LIBMINC_USE_FILE     "@LIBMINC_USE_FILE_CONFIG@") # ${LIBMINC_INSTALL_PREFIX}/cmake/LIBMINC/UseLIBMINC.cmake
+ 
+ set(LIBMINC_LIBRARIES    "@LIBMINC_LIBRARIES_CONFIG@")
+ set(VOLUME_IO_LIBRARIES  "@LIBMINC_LIBRARIES_CONFIG@")
+Index: libminc-2.4.05/CMakeLists.txt
+===================================================================
+--- libminc-2.4.05.orig/CMakeLists.txt
++++ libminc-2.4.05/CMakeLists.txt
+@@ -521,7 +521,7 @@
+ 
+ 
+ # config for install dir
+-SET(LIBMINC_USE_FILE_CONFIG     "\${LIBMINC_INSTALL_PREFIX}/lib/cmake/Use${LIBMINC_EXTERNAL_LIB_PREFIX}LIBMINC.cmake" )
++SET(LIBMINC_USE_FILE_CONFIG     "\${LIBMINC_INSTALL_PREFIX}/cmake/LIBMINC/Use${LIBMINC_EXTERNAL_LIB_PREFIX}LIBMINC.cmake" )
+ SET(LIBMINC_INCLUDE_DIRS_CONFIG "\${LIBMINC_INSTALL_PREFIX}/include" )
+ SET(LIBMINC_LIBRARY_DIRS_CONFIG "\${LIBMINC_INSTALL_PREFIX}/lib" )
+ SET(LIBMINC_STATIC_LIBRARIES_CONFIG   "" )
diff -Nru libminc-2.4.05/debian/patches/series libminc-2.4.05/debian/patches/series
--- libminc-2.4.05/debian/patches/series	2022-08-23 19:46:56.000000000 -0700
+++ libminc-2.4.05/debian/patches/series	2022-09-02 09:51:30.000000000 -0700
@@ -4,3 +4,4 @@
 remove-rpath.patch
 initialize_arrays_in_tests.patch
 disable-dimension-test.patch
+fix_cmake_path.patch


More information about the Debian-med-packaging mailing list