[neon/neon-packaging/vector-blf/Neon/unstable] debian/patches: add patches needed by labplot

Carlos De Maine null at kde.org
Sat Apr 1 03:14:46 BST 2023


Git commit bacd6ffb8c7e74c10511878e8e9a3918bba7aadc by Carlos De Maine.
Committed on 01/04/2023 at 02:14.
Pushed by carlosdem into branch 'Neon/unstable'.

add patches needed by labplot

A  +99   -0    debian/patches/0001_labplot_patches
A  +1    -0    debian/patches/series

https://invent.kde.org/neon/neon-packaging/vector-blf/commit/bacd6ffb8c7e74c10511878e8e9a3918bba7aadc

diff --git a/debian/patches/0001_labplot_patches b/debian/patches/0001_labplot_patches
new file mode 100644
index 0000000..ef60bb9
--- /dev/null
+++ b/debian/patches/0001_labplot_patches
@@ -0,0 +1,99 @@
+From 8e6cf6460c8c8959d5a89c4c7fe02145698c4e91 Mon Sep 17 00:00:00 2001
+From: Martin Marmsoler <martin.marmsoler at gmail.com>
+Date: Tue, 31 Jan 2023 17:32:05 +0100
+Subject: [PATCH 1/2] do not change install destination, because dlls are
+ stored then also in libdir instead in the default runtime dir "bin"
+
+---
+ src/Vector/BLF/CMakeLists.txt | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/src/Vector/BLF/CMakeLists.txt b/src/Vector/BLF/CMakeLists.txt
+index b028ea11..590715a1 100644
+--- a/src/Vector/BLF/CMakeLists.txt
++++ b/src/Vector/BLF/CMakeLists.txt
+@@ -341,8 +341,7 @@ endif()
+ 
+ # install
+ install(
+-    TARGETS ${PROJECT_NAME}
+-    DESTINATION ${CMAKE_INSTALL_LIBDIR})
++    TARGETS ${PROJECT_NAME})
+ install(
+     FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc
+     DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
+
+From b7a419c4d8edbf495ab309b57a380a2444ee2730 Mon Sep 17 00:00:00 2001
+From: Martin Marmsoler <martin.marmsoler at gmail.com>
+Date: Thu, 2 Mar 2023 19:34:58 +0100
+Subject: [PATCH 2/2] Install files only if not FETCH_CONTENT_INCLUSION,
+ because when including the project into another project with FecthContent the
+ headers are only needed during build but not after installation
+
+---
+ CMakeLists.txt                |  2 ++
+ src/Vector/BLF/CMakeLists.txt | 21 ++++++++++++---------
+ src/Vector/CMakeLists.txt     |  8 +++++---
+ 3 files changed, 19 insertions(+), 12 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 3bb50c75..16a7920f 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -21,6 +21,8 @@ option(OPTION_BUILD_TESTS "Build tests" OFF)
+ option(OPTION_USE_GCOV "Build with gcov to generate coverage data on execution" OFF)
+ option(OPTION_USE_GPROF "Build with gprof" OFF)
+ option(OPTION_ADD_LCOV "Add lcov targets to generate HTML coverage report" OFF)
++# Turn OFF, if you are using FetchContent to include it to your project
++option(FETCH_CONTENT_INCLUSION "Include project with FetchContent_Declare in another project. In this case the headers and the cmake files are not needed, only the library" OFF)
+ 
+ # directories
+ include(GNUInstallDirs)
+diff --git a/src/Vector/BLF/CMakeLists.txt b/src/Vector/BLF/CMakeLists.txt
+index 590715a1..71cd1d71 100644
+--- a/src/Vector/BLF/CMakeLists.txt
++++ b/src/Vector/BLF/CMakeLists.txt
+@@ -342,15 +342,18 @@ endif()
+ # install
+ install(
+     TARGETS ${PROJECT_NAME})
+-install(
+-    FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc
+-    DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
+-install(
+-    FILES
+-        ${CMAKE_CURRENT_BINARY_DIR}/vector_blf_export.h
+-        ${CMAKE_CURRENT_BINARY_DIR}/config.h
+-        $<TARGET_PROPERTY:${PROJECT_NAME},INTERFACE_SOURCES>
+-    DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/Vector/BLF)
++
++if (NOT FETCH_CONTENT_INCLUSION)
++    install(
++        FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc
++        DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
++    install(
++        FILES
++            ${CMAKE_CURRENT_BINARY_DIR}/vector_blf_export.h
++            ${CMAKE_CURRENT_BINARY_DIR}/config.h
++            $<TARGET_PROPERTY:${PROJECT_NAME},INTERFACE_SOURCES>
++        DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/Vector/BLF)
++endif()
+ 
+ # sub directories
+ add_subdirectory(docs)
+diff --git a/src/Vector/CMakeLists.txt b/src/Vector/CMakeLists.txt
+index d321b47d..e3cca81e 100644
+--- a/src/Vector/CMakeLists.txt
++++ b/src/Vector/CMakeLists.txt
+@@ -4,6 +4,8 @@
+ 
+ add_subdirectory(BLF)
+ 
+-install(
+-    FILES BLF.h
+-    DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/Vector)
++if (NOT FETCH_CONTENT_INCLUSION)
++    install(
++        FILES BLF.h
++        DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/Vector)
++endif()
\ No newline at end of file
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..2771d7c
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+0001_labplot_patches


More information about the Neon-commits mailing list