From b62ddc35fef02dd8a6d166c14e540cb5d258c05e77547762f58a03bd58d283c2 Mon Sep 17 00:00:00 2001 From: Petr Gajdos Date: Thu, 14 Nov 2019 19:45:07 +0000 Subject: [PATCH] Accepting request 748749 from home:cgiboudeaux:branches:graphics - Add Fix-the-symlinks-creation.patch to fix the symlinks creation. OBS-URL: https://build.opensuse.org/request/show/748749 OBS-URL: https://build.opensuse.org/package/show/graphics/openexr?expand=0&rev=41 --- Fix-the-symlinks-creation.patch | 36 +++++++++++++++++++++++++++++++++ openexr.changes | 5 +++++ openexr.spec | 22 ++++++++++++++------ 3 files changed, 57 insertions(+), 6 deletions(-) create mode 100644 Fix-the-symlinks-creation.patch diff --git a/Fix-the-symlinks-creation.patch b/Fix-the-symlinks-creation.patch new file mode 100644 index 0000000..73a195e --- /dev/null +++ b/Fix-the-symlinks-creation.patch @@ -0,0 +1,36 @@ +From 4e54bde78f65c0fef8a9f794aaacea07813fba09 Mon Sep 17 00:00:00 2001 +From: Antonio Rojas +Date: Sat, 19 Oct 2019 09:58:10 +0200 +Subject: [PATCH] Take DESTDIR into account when creating library symlinks + +--- + IlmBase/config/LibraryDefine.cmake | 2 +- + OpenEXR/config/LibraryDefine.cmake | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/IlmBase/config/LibraryDefine.cmake b/IlmBase/config/LibraryDefine.cmake +index 0502825f..9fb92c1c 100644 +--- a/IlmBase/config/LibraryDefine.cmake ++++ b/IlmBase/config/LibraryDefine.cmake +@@ -100,7 +100,7 @@ function(ILMBASE_DEFINE_LIBRARY libname) + if(BUILD_SHARED_LIBS AND (NOT "${ILMBASE_LIB_SUFFIX}" STREQUAL "")) + set(verlibname ${CMAKE_SHARED_LIBRARY_PREFIX}${libname}${ILMBASE_LIB_SUFFIX}${CMAKE_SHARED_LIBRARY_SUFFIX}) + set(baselibname ${CMAKE_SHARED_LIBRARY_PREFIX}${libname}${CMAKE_SHARED_LIBRARY_SUFFIX}) +- install(CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E chdir ${CMAKE_INSTALL_FULL_LIBDIR} ${CMAKE_COMMAND} -E create_symlink ${verlibname} ${baselibname})") ++ install(CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E chdir \$ENV\{DESTDIR\}${CMAKE_INSTALL_FULL_LIBDIR} ${CMAKE_COMMAND} -E create_symlink ${verlibname} ${baselibname})") + install(CODE "message(\"-- Creating symlink in ${CMAKE_INSTALL_FULL_LIBDIR} ${baselibname} -> ${verlibname}\")") + set(verlibname) + set(baselibname) +diff --git a/OpenEXR/config/LibraryDefine.cmake b/OpenEXR/config/LibraryDefine.cmake +index 6946ca94..c5b6096a 100644 +--- a/OpenEXR/config/LibraryDefine.cmake ++++ b/OpenEXR/config/LibraryDefine.cmake +@@ -94,7 +94,7 @@ function(OPENEXR_DEFINE_LIBRARY libname) + if(BUILD_SHARED_LIBS AND (NOT "${OPENEXR_LIB_SUFFIX}" STREQUAL "")) + set(verlibname ${CMAKE_SHARED_LIBRARY_PREFIX}${libname}${OPENEXR_LIB_SUFFIX}${CMAKE_SHARED_LIBRARY_SUFFIX}) + set(baselibname ${CMAKE_SHARED_LIBRARY_PREFIX}${libname}${CMAKE_SHARED_LIBRARY_SUFFIX}) +- install(CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E chdir ${CMAKE_INSTALL_FULL_LIBDIR} ${CMAKE_COMMAND} -E create_symlink ${verlibname} ${baselibname})") ++ install(CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E chdir \$ENV\{DESTDIR\}${CMAKE_INSTALL_FULL_LIBDIR} ${CMAKE_COMMAND} -E create_symlink ${verlibname} ${baselibname})") + install(CODE "message(\"-- Creating symlink in ${CMAKE_INSTALL_FULL_LIBDIR} ${baselibname} -> ${verlibname}\")") + set(verlibname) + set(baselibname) diff --git a/openexr.changes b/openexr.changes index 4f08d93..51e2cdc 100644 --- a/openexr.changes +++ b/openexr.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Nov 14 17:57:37 UTC 2019 - Christophe Giboudeaux + +- Add Fix-the-symlinks-creation.patch to fix the symlinks creation. + ------------------------------------------------------------------- Mon Oct 7 09:56:42 UTC 2019 - pgajdos@suse.com diff --git a/openexr.spec b/openexr.spec index 1e13d4b..49757a0 100644 --- a/openexr.spec +++ b/openexr.spec @@ -1,7 +1,7 @@ # # spec file for package openexr # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LLC. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -30,6 +30,7 @@ Group: Productivity/Graphics/Other 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 BuildRequires: cmake BuildRequires: fltk-devel BuildRequires: freeglut-devel @@ -113,9 +114,11 @@ Industrial Light & Magic for use in computer imaging applications. This package contains documentation. %prep -%setup -q -n openexr-%{version}/OpenEXR +%setup -q +%patch0 -p1 %build +pushd OpenEXR export PTHREAD_LIBS="-lpthread" %if %{debug_build} export CXXFLAGS="%{optflags} -O0" @@ -136,16 +139,21 @@ for i in $(find -name Makefile); do done %endif make %{?_smp_mflags} +popd %install +pushd OpenEXR %cmake_install +popd %check %ifarch x86_64 +pushd OpenEXR # tests takes LOONG, e. g. 20 min, in obs even more that # exceed timeout limit 25 min export LD_LIBRARY_PATH="$PWD/build/IlmImf:$PWD/build/IlmImfUtil:$LD_LIBRARY_PATH" %ctest --timeout 3000 +popd %endif %post -n libIlmImf%{so_suffix}-%{sonum} -p /sbin/ldconfig @@ -155,8 +163,8 @@ export LD_LIBRARY_PATH="$PWD/build/IlmImf:$PWD/build/IlmImfUtil:$LD_LIBRARY_PATH %postun -n libIlmImfUtil%{so_suffix}-%{sonum} -p /sbin/ldconfig %files -%license ../LICENSE.md -%doc ../{CHANGES.md,CODE_OF_CONDUCT.md,CODEOWNERS,CONTRIBUTING.md,CONTRIBUTORS.md,README.md,SECURITY.md} +%license LICENSE.md +%doc CHANGES.md CODE_OF_CONDUCT.md CODEOWNERS CONTRIBUTING.md CONTRIBUTORS.md README.md SECURITY.md %{_bindir}/exrenvmap %{_bindir}/exrheader %{_bindir}/exrmakepreview @@ -168,7 +176,9 @@ export LD_LIBRARY_PATH="$PWD/build/IlmImf:$PWD/build/IlmImfUtil:$LD_LIBRARY_PATH %files devel %{_includedir}/OpenEXR +%{_libdir}/libIlmImf.so %{_libdir}/libIlmImf%{so_suffix}.so +%{_libdir}/libIlmImfUtil.so %{_libdir}/libIlmImfUtil%{so_suffix}.so %{_libdir}/pkgconfig/OpenEXR.pc %dir %{_libdir}/cmake/OpenEXR @@ -179,11 +189,11 @@ export LD_LIBRARY_PATH="$PWD/build/IlmImf:$PWD/build/IlmImfUtil:$LD_LIBRARY_PATH %exclude %{_docdir}/%{name}/{CHANGES.md,CODE_OF_CONDUCT.md,CODEOWNERS,CONTRIBUTING.md,CONTRIBUTORS.md,README.md,SECURITY.md} %files -n libIlmImf%{so_suffix}-%{sonum} -%license ../LICENSE.md +%license LICENSE.md %{_libdir}/libIlmImf-*.so.* %files -n libIlmImfUtil%{so_suffix}-%{sonum} -%license ../LICENSE.md +%license LICENSE.md %{_libdir}/libIlmImfUtil-*.so.* %changelog