File: Make-upstream-easier-to-package

package info (click to toggle)
fcidecomp 2.1.1%2Bdeb1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,648 kB
  • sloc: ansic: 1,270; python: 829; sh: 294; makefile: 11
file content (73 lines) | stat: -rw-r--r-- 2,870 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
Description: Make upstream easier to package
 This:
 * allows upstream to be built and installed as a single source
 * fixes upstream's CMakeLists.txt to use GNUInstallDirs
Author: Enrico Zini <enrico@debian.org>

---
The information above should follow the Patch Tagging Guidelines, please
checkout https://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:

Origin: (upstream|backport|vendor|other), (<patch-url>|commit:<commit-id>)
Bug: <upstream-bugtracker-url>
Bug-Debian: https://bugs.debian.org/<bugnumber>
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
Forwarded: (no|not-needed|<patch-forwarded-url>)
Applied-Upstream: <version>, (<commit-url>|commit:<commid-id>)
Reviewed-By: <name and email of someone who approved/reviewed the patch>
Last-Update: 2024-12-27

--- /dev/null
+++ fcidecomp-2.1.1/CMakeLists.txt
@@ -0,0 +1,15 @@
+cmake_minimum_required(VERSION 3.15.0)
+project(fcidecomp)
+
+# Set build directories
+include(GNUInstallDirs)
+set(HDF5_PLUGIN_INSTALL_PATH "${CMAKE_INSTALL_LIBDIR}/hdf5/serial/plugins" CACHE PATH
+  "Where to install the dynamic HDF5-plugin")
+
+# Build library
+add_subdirectory(src/fcidecomp/fcicomp-jpegls)
+
+# Build filter plugin
+set(FCICOMP_JPEGLS_INCLUDE_DIR ../fcicomp-jpegls/include/)
+add_subdirectory(src/fcidecomp/fcicomp-H5Zjpegls)
+TARGET_LINK_LIBRARIES (H5Zjpegls PRIVATE fcicomp_jpegls)
--- fcidecomp-2.1.1.orig/src/fcidecomp/fcicomp-H5Zjpegls/CMakeLists.txt
+++ fcidecomp-2.1.1/src/fcidecomp/fcicomp-H5Zjpegls/CMakeLists.txt
@@ -87,7 +87,7 @@ SET (CMAKE_MODULE_PATH ${FCICOMP_CMAKE_M
 SET (ENV{FCICOMP_JPEGLS_ROOT} ${FCICOMP_JPEGLS_ROOT})
 
 # Find FCICOMP_JPEGLS includes and library
-FIND_PACKAGE (FCICOMP_JPEGLS REQUIRED)
+#FIND_PACKAGE (FCICOMP_JPEGLS REQUIRED)
 INCLUDE_DIRECTORIES (${FCICOMP_JPEGLS_INCLUDE_DIR})
 
 #-----------------------------------------------------------------------------
@@ -256,8 +256,8 @@ ENDIF (EXTRA_LINK_FLAGS_DEBUG)
 STRING (TOLOWER ${PROJECT_NAME} PROJECT_NAME_LOWER)
 
 # Define the include and lib install dir
-SET (INCLUDE_INSTALL_DIR include/)
-SET (LIBRARY_INSTALL_DIR hdf5/lib/plugin/)
+SET (INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_INCLUDEDIR}")
+SET (LIBRARY_INSTALL_DIR "${HDF5_PLUGIN_INSTALL_PATH}")
 
 # Install the library
 INSTALL (TARGETS ${TARGET_LIBRARY_NAME}
--- fcidecomp-2.1.1.orig/src/fcidecomp/fcicomp-jpegls/CMakeLists.txt
+++ fcidecomp-2.1.1/src/fcidecomp/fcicomp-jpegls/CMakeLists.txt
@@ -229,8 +229,8 @@ ENDIF (EXTRA_LINK_FLAGS_DEBUG)
 STRING (TOLOWER ${PROJECT_NAME} PROJECT_NAME_LOWER)
 
 # Define the include and lib install dir
-SET (INCLUDE_INSTALL_DIR include/)
-SET (LIBRARY_INSTALL_DIR lib/)
+SET (INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_INCLUDEDIR}")
+SET (LIBRARY_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}")
 
 # Install the library
 INSTALL (TARGETS ${TARGET_LIBRARY_NAME}