diff --git a/0001-Use-absolute-CMAKE_INSTALL_FULL_LIBDIR-for-libdir-in.patch b/0001-Use-absolute-CMAKE_INSTALL_FULL_LIBDIR-for-libdir-in.patch new file mode 100644 index 0000000..e788a15 --- /dev/null +++ b/0001-Use-absolute-CMAKE_INSTALL_FULL_LIBDIR-for-libdir-in.patch @@ -0,0 +1,79 @@ +From d874a3ce5ad741ea61f42953c779d50ae93b66d6 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Stefan=20Br=C3=BCns?= +Date: Mon, 10 Feb 2020 18:37:32 +0100 +Subject: [PATCH] Use absolute CMAKE_INSTALL_FULL_LIBDIR for libdir in + pkgconfig files + +According to cmake GNUInstallDirs documentation, CMAKE_INSTALL_LIBDIR +may be either absolute or relative to CMAKE_INSTALL_PREFIX. Use +CMAKE_INSTALL_FULL_LIBDIR, which is always the full absolute path. + +Remove unused exec_prefix variable. + +Fixes https://github.com/AcademySoftwareFoundation/openexr/issues/595 +--- + IlmBase/IlmBase.pc.in | 1 - + IlmBase/config/CMakeLists.txt | 5 ++--- + OpenEXR/OpenEXR.pc.in | 1 - + OpenEXR/config/CMakeLists.txt | 5 ++--- + 4 files changed, 4 insertions(+), 8 deletions(-) + +diff --git a/IlmBase/IlmBase.pc.in b/IlmBase/IlmBase.pc.in +index 45fc4de..1edd055 100644 +--- a/IlmBase/IlmBase.pc.in ++++ b/IlmBase/IlmBase.pc.in +@@ -4,7 +4,6 @@ + ## + + prefix=@prefix@ +-exec_prefix=@exec_prefix@ + libdir=@libdir@ + includedir=@includedir@ + libsuffix=@LIB_SUFFIX_DASH@ +diff --git a/IlmBase/config/CMakeLists.txt b/IlmBase/config/CMakeLists.txt +index 508176a..e533987 100644 +--- a/IlmBase/config/CMakeLists.txt ++++ b/IlmBase/config/CMakeLists.txt +@@ -71,9 +71,8 @@ if(ILMBASE_INSTALL_PKG_CONFIG) + # use a helper function to avoid variable pollution, but pretty simple + function(ilmbase_pkg_config_help pcinfile) + set(prefix ${CMAKE_INSTALL_PREFIX}) +- set(exec_prefix ${CMAKE_INSTALL_BINDIR}) +- set(libdir ${CMAKE_INSTALL_LIBDIR}) +- set(includedir ${CMAKE_INSTALL_INCLUDEDIR}) ++ set(libdir ${CMAKE_INSTALL_FULL_LIBDIR}) ++ set(includedir ${CMAKE_INSTALL_FULL_INCLUDEDIR}) + set(LIB_SUFFIX_DASH ${ILMBASE_LIB_SUFFIX}) + if(TARGET Threads::Threads) + # hrm, can't use properties as they end up as generator expressions +diff --git a/OpenEXR/OpenEXR.pc.in b/OpenEXR/OpenEXR.pc.in +index cf72f88..4df6035 100644 +--- a/OpenEXR/OpenEXR.pc.in ++++ b/OpenEXR/OpenEXR.pc.in +@@ -4,7 +4,6 @@ + ## + + prefix=@prefix@ +-exec_prefix=@exec_prefix@ + libdir=@libdir@ + includedir=@includedir@ + OpenEXR_includedir=@includedir@/OpenEXR +diff --git a/OpenEXR/config/CMakeLists.txt b/OpenEXR/config/CMakeLists.txt +index 1ef829a..e068d2f 100644 +--- a/OpenEXR/config/CMakeLists.txt ++++ b/OpenEXR/config/CMakeLists.txt +@@ -72,9 +72,8 @@ if(OPENEXR_INSTALL_PKG_CONFIG) + # use a helper function to avoid variable pollution, but pretty simple + function(openexr_pkg_config_help pcinfile) + set(prefix ${CMAKE_INSTALL_PREFIX}) +- set(exec_prefix ${CMAKE_INSTALL_BINDIR}) +- set(libdir ${CMAKE_INSTALL_LIBDIR}) +- set(includedir ${CMAKE_INSTALL_INCLUDEDIR}) ++ set(libdir ${CMAKE_INSTALL_FULL_LIBDIR}) ++ set(includedir ${CMAKE_INSTALL_FULL_INCLUDEDIR}) + set(LIB_SUFFIX_DASH ${OPENEXR_LIB_SUFFIX}) + if(TARGET Threads::Threads) + # hrm, can't use properties as they end up as generator expressions +-- +2.25.0 + diff --git a/openexr.changes b/openexr.changes index 00aee36..4ed6628 100644 --- a/openexr.changes +++ b/openexr.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Feb 10 17:39:14 UTC 2020 - Stefan Brüns + +- Fix relative paths in generated pkgconfig files: + 0001-Use-absolute-CMAKE_INSTALL_FULL_LIBDIR-for-libdir-in.patch + ------------------------------------------------------------------- Sun Nov 24 13:47:08 UTC 2019 - Stefan Brüns diff --git a/openexr.spec b/openexr.spec index 1816c20..74f5123 100644 --- a/openexr.spec +++ b/openexr.spec @@ -1,7 +1,7 @@ # # spec file for package openexr # -# Copyright (c) 2019 SUSE LLC. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -31,6 +31,7 @@ URL: http://www.openexr.com/ Source0: https://github.com/openexr/openexr/archive/v%{version}.tar.gz Source2: baselibs.conf Patch0: Fix-the-symlinks-creation.patch +Patch1: 0001-Use-absolute-CMAKE_INSTALL_FULL_LIBDIR-for-libdir-in.patch BuildRequires: cmake BuildRequires: fltk-devel BuildRequires: freeglut-devel @@ -116,6 +117,7 @@ This package contains documentation. %prep %setup -q %patch0 -p1 +%patch1 -p1 %build pushd OpenEXR @@ -124,8 +126,7 @@ export PTHREAD_LIBS="-lpthread" export CXXFLAGS="%{optflags} -O0" %endif %cmake \ - -DCMAKE_INSTALL_DOCDIR="%{_docdir}/%{name}" \ - -DCMAKE_INSTALL_INCLUDEDIR=%{_includedir} + -DCMAKE_INSTALL_DOCDIR="%{_docdir}/%{name}" %if %{asan_build} vmemlimit=$(ulimit -v) if [ $vmemlimit != unlimited ]; then