Package: libcmark-dev
Version: 0.28.3-1
Tags: patch
User: debian-cr...@lists.debian.org
Usertags: ftcbfs
Control: affects -1 + src:mkvtoolnix

mkvtoolnix fails to cross build from source, because it does not find
libcmark.pc using pkg-config. During cross compilation, pkg-config does
not search /usr/lib/pkgconfig. It only searches /usr/share/pkgconfig and
/usr/lib/<triplet>/pkgconfig. Thus we need to move libcmark.pc to the
multiarch location. It doesn't use multiarch, because the CMakelists.txt
uses a custom libdir variable instead of using the standard, working
CMAKE_INSTALL_LIBDIR variable. Please consider applying the attached
patch.

Helmut
diff --minimal -Nru cmark-0.28.3/debian/changelog cmark-0.28.3/debian/changelog
--- cmark-0.28.3/debian/changelog       2018-05-28 01:55:25.000000000 +0200
+++ cmark-0.28.3/debian/changelog       2020-02-06 20:42:25.000000000 +0100
@@ -1,3 +1,10 @@
+cmark (0.28.3-1.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Move libcmark.pc to a multiarch location. (Closes: #-1)
+
+ -- Helmut Grohne <hel...@subdivi.de>  Thu, 06 Feb 2020 20:42:25 +0100
+
 cmark (0.28.3-1) unstable; urgency=low
 
   * New upstream release (closes: #892815)
diff --minimal -Nru cmark-0.28.3/debian/libcmark-dev.install 
cmark-0.28.3/debian/libcmark-dev.install
--- cmark-0.28.3/debian/libcmark-dev.install    2018-04-29 02:07:27.000000000 
+0200
+++ cmark-0.28.3/debian/libcmark-dev.install    2020-02-06 20:42:25.000000000 
+0100
@@ -1,6 +1,6 @@
 usr/include
-usr/lib/*.a
-usr/lib/*.so
+usr/lib/*/*.a
+usr/lib/*/*.so
 usr/lib/*/cmake
-usr/lib/pkgconfig
+usr/lib/*/pkgconfig
 usr/share/man/man3
diff --minimal -Nru cmark-0.28.3/debian/libcmark0.install 
cmark-0.28.3/debian/libcmark0.install
--- cmark-0.28.3/debian/libcmark0.install       2018-03-04 11:47:47.000000000 
+0100
+++ cmark-0.28.3/debian/libcmark0.install       2020-02-06 20:42:25.000000000 
+0100
@@ -1 +1 @@
-usr/lib/*.so.*
+usr/lib/*/*.so.*
diff --minimal -Nru cmark-0.28.3/debian/patches/multiarch.patch 
cmark-0.28.3/debian/patches/multiarch.patch
--- cmark-0.28.3/debian/patches/multiarch.patch 1970-01-01 01:00:00.000000000 
+0100
+++ cmark-0.28.3/debian/patches/multiarch.patch 2020-02-06 20:42:25.000000000 
+0100
@@ -0,0 +1,27 @@
+--- cmark-0.28.3.orig/src/CMakeLists.txt
++++ cmark-0.28.3/src/CMakeLists.txt
+@@ -125,21 +125,19 @@
+ 
+ set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS ON)
+ 
+-set(libdir lib${LIB_SUFFIX})
+-
+ include (InstallRequiredSystemLibraries)
+ install(TARGETS ${PROGRAM} ${CMARK_INSTALL}
+   EXPORT cmark
+   RUNTIME DESTINATION bin
+-  LIBRARY DESTINATION ${libdir}
+-  ARCHIVE DESTINATION ${libdir}
++  LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
++  ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+   )
+ 
+ if(CMARK_SHARED OR CMARK_STATIC)
+   configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libcmark.pc.in
+     ${CMAKE_CURRENT_BINARY_DIR}/libcmark.pc @ONLY)
+   install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libcmark.pc
+-    DESTINATION ${libdir}/pkgconfig)
++        DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
+ 
+   install(FILES
+     cmark.h
diff --minimal -Nru cmark-0.28.3/debian/patches/series 
cmark-0.28.3/debian/patches/series
--- cmark-0.28.3/debian/patches/series  1970-01-01 01:00:00.000000000 +0100
+++ cmark-0.28.3/debian/patches/series  2020-02-06 20:42:25.000000000 +0100
@@ -0,0 +1 @@
+multiarch.patch

Reply via email to