mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-17 06:06:13 +03:00
openjpeg: fix includedir in cmake config files
This commit is contained in:
parent
44b02b52ea
commit
3148c89b3c
@ -6,6 +6,11 @@ callPackage ./generic.nix (args // rec {
|
||||
revision = "v${version}";
|
||||
sha256 = "08plxrnfl33sn2vh5nwbsngyv6b1sfpplvx881crm1v1ai10m2lz";
|
||||
|
||||
extraFlags = [
|
||||
"-DOPENJPEG_INSTALL_INCLUDE_DIR=${placeholder "dev"}/include/openjpeg-${branch}"
|
||||
"-DOPENJPEG_INSTALL_PACKAGE_DIR=${placeholder "dev"}/lib/openjpeg-${branch}"
|
||||
];
|
||||
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
name = "CVE-2018-7648.patch";
|
||||
@ -17,5 +22,10 @@ callPackage ./generic.nix (args // rec {
|
||||
url = "https://github.com/uclouvain/openjpeg/commit/92023cd6c377e0384a7725949b25655d4d94dced.patch";
|
||||
sha256 = "0rrxxqcp3vjkmvywxj9ac766m3fppy0x0nszrkf8irrqy1gnp38k";
|
||||
})
|
||||
(fetchpatch {
|
||||
url = https://github.com/uclouvain/openjpeg/commit/24fd3ce777a64b8b315cfe1ee642ec7b1cc6aa97.patch;
|
||||
sha256 = "1sl5wplgdfiqw8qbd8s5j5hq3ynbwgsnv8nxqfrk5s7vyrzx9pxv";
|
||||
})
|
||||
./fix-cmake-config-includedir.patch
|
||||
];
|
||||
})
|
||||
|
@ -0,0 +1,55 @@
|
||||
--- a/cmake/OpenJPEGConfig.cmake.in
|
||||
+++ b/cmake/OpenJPEGConfig.cmake.in
|
||||
@@ -32,7 +32,7 @@
|
||||
set(INC_DIR "@CMAKE_INSTALL_PREFIX@/@OPENJPEG_INSTALL_INCLUDE_DIR@")
|
||||
file(RELATIVE_PATH PKG_TO_INC_RPATH "${PKG_DIR}" "${INC_DIR}")
|
||||
|
||||
- get_filename_component(OPENJPEG_INCLUDE_DIRS "${SELF_DIR}/${PKG_TO_INC_RPATH}" ABSOLUTE)
|
||||
+ get_filename_component(OPENJPEG_INCLUDE_DIRS "@OPENJPEG_INSTALL_INCLUDE_DIR@" ABSOLUTE)
|
||||
|
||||
else()
|
||||
if(EXISTS ${SELF_DIR}/OpenJPEGExports.cmake)
|
||||
--- a/src/lib/openjp2/libopenjp2.pc.cmake.in
|
||||
+++ b/src/lib/openjp2/libopenjp2.pc.cmake.in
|
||||
@@ -3,7 +3,7 @@
|
||||
mandir=${prefix}/@OPENJPEG_INSTALL_MAN_DIR@
|
||||
docdir=${prefix}/@OPENJPEG_INSTALL_DOC_DIR@
|
||||
libdir=${prefix}/@OPENJPEG_INSTALL_LIB_DIR@
|
||||
-includedir=${prefix}/@OPENJPEG_INSTALL_INCLUDE_DIR@
|
||||
+includedir=@OPENJPEG_INSTALL_INCLUDE_DIR@
|
||||
|
||||
Name: openjp2
|
||||
Description: JPEG2000 library (Part 1 and 2)
|
||||
--- a/src/lib/openjp3d/libopenjp3d.pc.cmake.in
|
||||
+++ b/src/lib/openjp3d/libopenjp3d.pc.cmake.in
|
||||
@@ -3,7 +3,7 @@
|
||||
mandir=${prefix}/@OPENJPEG_INSTALL_MAN_DIR@
|
||||
docdir=${prefix}/@OPENJPEG_INSTALL_DOC_DIR@
|
||||
libdir=${prefix}/@OPENJPEG_INSTALL_LIB_DIR@
|
||||
-includedir=${prefix}/@OPENJPEG_INSTALL_INCLUDE_DIR@
|
||||
+includedir=@OPENJPEG_INSTALL_INCLUDE_DIR@
|
||||
|
||||
Name: openjp3d
|
||||
Description: JPEG2000 Extensions for three-dimensional data (Part 10)
|
||||
--- a/src/lib/openjpip/libopenjpip.pc.cmake.in
|
||||
+++ b/src/lib/openjpip/libopenjpip.pc.cmake.in
|
||||
@@ -3,7 +3,7 @@
|
||||
mandir=${prefix}/@OPENJPEG_INSTALL_MAN_DIR@
|
||||
docdir=${prefix}/@OPENJPEG_INSTALL_DOC_DIR@
|
||||
libdir=${prefix}/@OPENJPEG_INSTALL_LIB_DIR@
|
||||
-includedir=${prefix}/@OPENJPEG_INSTALL_INCLUDE_DIR@
|
||||
+includedir=@OPENJPEG_INSTALL_INCLUDE_DIR@
|
||||
|
||||
Name: openjpip
|
||||
Description: JPEG2000 Interactivity tools, APIs and protocols (Part 9)
|
||||
--- a/src/lib/openjpwl/libopenjpwl.pc.cmake.in
|
||||
+++ b/src/lib/openjpwl/libopenjpwl.pc.cmake.in
|
||||
@@ -3,7 +3,7 @@
|
||||
mandir=${prefix}/@OPENJPEG_INSTALL_MAN_DIR@
|
||||
docdir=${prefix}/@OPENJPEG_INSTALL_DOC_DIR@
|
||||
libdir=${prefix}/@OPENJPEG_INSTALL_LIB_DIR@
|
||||
-includedir=${prefix}/@OPENJPEG_INSTALL_INCLUDE_DIR@
|
||||
+includedir=@OPENJPEG_INSTALL_INCLUDE_DIR@
|
||||
|
||||
Name: openjpwl
|
||||
Description: JPEG2000 Wireless library (Part 11)
|
@ -11,7 +11,7 @@
|
||||
, testsSupport ? false
|
||||
, jdk ? null
|
||||
# Inherit generics
|
||||
, branch, version, revision, sha256, patches ? [], ...
|
||||
, branch, version, revision, sha256, patches ? [], extraFlags ? [], ...
|
||||
}:
|
||||
|
||||
assert jpipServerSupport -> jpipLibSupport && curl != null && fcgi != null;
|
||||
@ -51,7 +51,7 @@ stdenv.mkDerivation rec {
|
||||
(mkFlag jp3dSupport "BUILD_JP3D")
|
||||
(mkFlag thirdPartySupport "BUILD_THIRDPARTY")
|
||||
(mkFlag testsSupport "BUILD_TESTING")
|
||||
];
|
||||
] ++ extraFlags;
|
||||
|
||||
nativeBuildInputs = [ cmake pkgconfig ];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user