summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorSergey Kosukhin <skosukhin@gmail.com>2017-12-08 13:36:20 +0100
committerMassimiliano Culpo <massimiliano.culpo@gmail.com>2017-12-08 13:36:20 +0100
commitbd92cc0a1af4196406949a4b8ab76b438a8204b9 (patch)
treebfd8fa269680884ad02fe447cebf1b8d531d769e /var
parent1bdea989783bbf7108504eb246f14ecac1a02125 (diff)
downloadspack-bd92cc0a1af4196406949a4b8ab76b438a8204b9.tar.gz
spack-bd92cc0a1af4196406949a4b8ab76b438a8204b9.tar.bz2
spack-bd92cc0a1af4196406949a4b8ab76b438a8204b9.tar.xz
spack-bd92cc0a1af4196406949a4b8ab76b438a8204b9.zip
Package 'openjpeg': set INSTALL_NAME_DIR on MacOS for old versions. (#6603)
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/openjpeg/macos.patch13
-rw-r--r--var/spack/repos/builtin/packages/openjpeg/package.py5
2 files changed, 18 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/openjpeg/macos.patch b/var/spack/repos/builtin/packages/openjpeg/macos.patch
new file mode 100644
index 0000000000..f736b92b47
--- /dev/null
+++ b/var/spack/repos/builtin/packages/openjpeg/macos.patch
@@ -0,0 +1,13 @@
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -151,6 +151,10 @@ IF(NOT OPENJPEG_INSTALL_PACKAGE_DIR)
+ SET(OPENJPEG_INSTALL_PACKAGE_DIR "${OPENJPEG_INSTALL_LIB_DIR}/${OPENJPEG_INSTALL_SUBDIR}")
+ ENDIF(NOT OPENJPEG_INSTALL_PACKAGE_DIR)
+
++IF(APPLE)
++ LIST(APPEND OPENJPEG_LIBRARY_PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/${OPENJPEG_INSTALL_LIB_DIR}")
++ENDIF()
++
+ #-----------------------------------------------------------------------------
+ # Big endian test:
+ INCLUDE (${CMAKE_ROOT}/Modules/TestBigEndian.cmake)
diff --git a/var/spack/repos/builtin/packages/openjpeg/package.py b/var/spack/repos/builtin/packages/openjpeg/package.py
index b8e4855337..751722dec5 100644
--- a/var/spack/repos/builtin/packages/openjpeg/package.py
+++ b/var/spack/repos/builtin/packages/openjpeg/package.py
@@ -49,6 +49,11 @@ class Openjpeg(CMakePackage):
version('1.5.2', '545f98923430369a6b046ef3632ef95c')
version('1.5.1', 'd774e4b5a0db5f0f171c4fc0aabfa14e')
+ # The problem with install name of the library on MacOs was fixed starting
+ # version 2.1.1: https://github.com/uclouvain/openjpeg/commit/b9a247b559e62e55f5561624cf4a19aee3c8afdc
+ # The solution works for the older versions (at least starting 1.5.1) too.
+ patch('macos.patch', when='@:2.1.0 platform=darwin')
+
def url_for_version(self, version):
if version >= Version('2.1.1'):
return super(Openjpeg, self).url_for_version(version)