[arch-commits] Commit in kio-extras/trunk (PKGBUILD kio-extras-openexr3.patch)

Antonio Rojas arojas at archlinux.org
Fri Apr 23 19:41:43 UTC 2021


    Date: Friday, April 23, 2021 @ 19:41:42
  Author: arojas
Revision: 413786

openexr 3.0 rebuild

Added:
  kio-extras/trunk/kio-extras-openexr3.patch
Modified:
  kio-extras/trunk/PKGBUILD

---------------------------+
 PKGBUILD                  |   12 +++++++++---
 kio-extras-openexr3.patch |   43 +++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 52 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2021-04-23 19:34:17 UTC (rev 413785)
+++ PKGBUILD	2021-04-23 19:41:42 UTC (rev 413786)
@@ -4,7 +4,7 @@
 
 pkgname=kio-extras
 pkgver=21.04.0
-pkgrel=1
+pkgrel=2
 pkgdesc="Additional components to increase the functionality of KIO"
 arch=(x86_64)
 url='https://www.kde.org/'
@@ -16,13 +16,19 @@
             'libappimage: AppImage thumbnails' 'icoutils: Windows executable thumbnails'
             'openexr: EXR format thumbnails' 'kactivities-stats: recently used kioslave')
 groups=(kde-applications kde-network)
-source=(https://download.kde.org/stable/release-service/$pkgver/src/$pkgname-$pkgver.tar.xz{,.sig})
+source=(https://download.kde.org/stable/release-service/$pkgver/src/$pkgname-$pkgver.tar.xz{,.sig}
+        kio-extras-openexr3.patch)
 sha256sums=('4f4a6f127a29d68e7c8185ff9f67a2c1ceb2df8edaa87bab4bcc974b5869b3dc'
-            'SKIP')
+            'SKIP'
+            '7d1c0e37f23a86d74e9f84077494cd751736041cdae7669a8e98d32bffbb9a64')
 validpgpkeys=(CA262C6C83DE4D2FB28A332A3A6A4DB839EAA6D7  # Albert Astals Cid <aacid at kde.org>
               F23275E4BF10AFC1DF6914A6DBD2CE893E2D1C87  # Christoph Feck <cfeck at kde.org>
               D81C0CB38EB725EF6691C385BB463350D6EF31EF) # Heiko Becker <heiko.becker at kde.org>
 
+prepare() {
+  patch -d $pkgname-$pkgver -p1 < kio-extras-openexr3.patch # Fix build with openexr 3
+}
+
 build() {
   cmake -B build -S $pkgname-$pkgver \
     -DLIBAPPIMAGE_LIBRARIES=libappimage.so \

Added: kio-extras-openexr3.patch
===================================================================
--- kio-extras-openexr3.patch	                        (rev 0)
+++ kio-extras-openexr3.patch	2021-04-23 19:41:42 UTC (rev 413786)
@@ -0,0 +1,43 @@
+diff --git a/thumbnail/CMakeLists.txt b/thumbnail/CMakeLists.txt
+index a26f4e3f..d3c7569e 100644
+--- a/thumbnail/CMakeLists.txt
++++ b/thumbnail/CMakeLists.txt
+@@ -1,6 +1,9 @@
+ add_definitions(-DTRANSLATION_DOMAIN=\"kio5_thumbnail\")
+ 
+-find_package(OpenEXR)
++find_package(OpenEXR 3.0 CONFIG)
++if(NOT OpenEXR_FOUND)
++    find_package(OpenEXR)
++endif()
+ set_package_properties(OpenEXR PROPERTIES DESCRIPTION "API for accessing OpenEXR formatted images"
+                        URL "https://www.openexr.com"
+                        TYPE OPTIONAL
+@@ -142,9 +145,13 @@ if(OpenEXR_FOUND)
+     target_link_libraries(exrthumbnail
+             KF5::KIOCore
+             KF5::KIOWidgets
+-            ${OpenEXR_LIBRARIES}
+     )
+-    target_include_directories(exrthumbnail SYSTEM PRIVATE ${OpenEXR_INCLUDE_DIRS})
++    if(TARGET OpenEXR::OpenEXR)
++        target_link_libraries(exrthumbnail OpenEXR::OpenEXR)
++    else()
++        target_include_directories(exrthumbnail SYSTEM PRIVATE ${OpenEXR_INCLUDE_DIRS})
++        target_link_libraries(exrthumbnail OpenEXR::OpenEXR)
++    endif()
+ 
+     # OpenEXR headers use exceptions; at least clang refuses to build the target
+     # when exceptions are not enabled.
+diff --git a/thumbnail/exrcreator.cpp b/thumbnail/exrcreator.cpp
+index d4c490d7..dd2dae65 100644
+--- a/thumbnail/exrcreator.cpp
++++ b/thumbnail/exrcreator.cpp
+@@ -23,6 +23,7 @@
+ #include <QImage>
+ #include <QFile>
+ 
++#include <ImfHeader.h>
+ #include <ImfInputFile.h>
+ #include <ImfPreviewImage.h>
+ 



More information about the arch-commits mailing list