summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authoroweissbarth2021-07-04 14:30:16 +0200
committeroweissbarth2021-07-04 14:37:32 +0200
commit65cfb51cddc4dd20d41873c81067f98de3ee62bf (patch)
treee0c91c3f7a5f5c623e75cbe0d9c21e71d71ddada
parent03c59d60357b0fcba334fc4944cda5a18bb49194 (diff)
downloadaur-65cfb51cddc4dd20d41873c81067f98de3ee62bf.tar.gz
Updated package to work with opencolorio1, OpenEXR3 and gcc11: partly based on the patch by bartus
I decided to not use the openexr2 package as it can not be installed side by side with openexr and many other packages already depend on v3.
-rw-r--r--.SRCINFO11
-rw-r--r--OCIO.patch17
-rw-r--r--OpenEXR.patch107
-rw-r--r--PKGBUILD37
4 files changed, 158 insertions, 14 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 4d5aef9d2f1a..cb61518acc30 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = djv
pkgdesc = Professional media review software for VFX, animation, and film production
pkgver = 2.0.8
- pkgrel = 3
+ pkgrel = 4
url = http://djv.sourceforge.net/
arch = x86_64
license = CUSTOM
@@ -13,8 +13,8 @@ pkgbase = djv
depends = libjpeg
depends = libpng
depends = libtiff
- depends = opencolorio
- depends = openexr
+ depends = opencolorio1
+ depends = openexr>=3.0.0
depends = python
depends = rtaudio
depends = zlib
@@ -25,6 +25,8 @@ pkgbase = djv
source = drop-third-party.patch
source = rtaudio-hint.patch
source = ffmpeg-install.patch
+ source = OCIO.patch
+ source = OpenEXR.patch
sha256sums = bee18559d8a04b361376741900f21f69c637b51306d2b504b67f125dd14fd427
sha256sums = ca440bc9c1713e9edb17ed5adc0456441e69af25f803c834427f23a6991e2eca
sha256sums = e2bb0b7ebccd1e645d9a62f0c6dadafb94705766c787a2ea38b91b1da4e95cf7
@@ -32,6 +34,7 @@ pkgbase = djv
sha256sums = f002c2586bed5c97f78a329379a85988c270751fc46cd6e9dd05103a52728618
sha256sums = 50474a248f3259b6cf0a1439dc9fd4e34f211113e5f64116cb6df95bee8271f0
sha256sums = e923d4abd6d2233ac6464773ff771ea7115cba8ed3fc2d1955b2129ff014272e
+ sha256sums = b145f3e57adda6e2216d936d4f6e5466a28eb9300d049f259af5bffef23dfbde
+ sha256sums = 86d64d8390c0fdc4f944ca9b55d7d7803c7f018d1f0e12098ffebc44ccbb2b00
pkgname = djv
-
diff --git a/OCIO.patch b/OCIO.patch
new file mode 100644
index 000000000000..4e3a669ca10e
--- /dev/null
+++ b/OCIO.patch
@@ -0,0 +1,17 @@
+--- FindOCIO.cmake 2020-06-12 04:11:18.000000000 +0200
++++ FindOCIO.cmake.patched 2021-07-04 12:25:14.498838944 +0200
+@@ -17,12 +17,12 @@
+
+ find_path(OCIO_INCLUDE_DIR
+ NAMES OpenColorIO.h
+- PATH_SUFFIXES OpenColorIO)
++ PATH_SUFFIXES OpenColorIO1)
+ set(OCIO_INCLUDE_DIRS
+ ${OCIO_INCLUDE_DIR})
+
+ find_library(
+- OCIO_LIBRARY NAMES OpenColorIO
++ OCIO_LIBRARY NAMES OpenColorIO1
+ PATH_SUFFIXES static)
+ set(OCIO_LIBRARIES
+ ${OCIO_LIBRARY})
diff --git a/OpenEXR.patch b/OpenEXR.patch
new file mode 100644
index 000000000000..9c390eeed712
--- /dev/null
+++ b/OpenEXR.patch
@@ -0,0 +1,107 @@
+diff --color -ruN DJV-2.0.8/CMakeLists.txt DJV-2.0.8_patched/CMakeLists.txt
+--- DJV-2.0.8/CMakeLists.txt 2021-07-04 12:54:25.048818457 +0200
++++ DJV-2.0.8_patched/CMakeLists.txt 2021-07-04 12:35:49.288831515 +0200
+@@ -142,7 +142,7 @@
+ PicoJSON
+ #OpenAL
+ RtAudio
+- IlmBase
++ Imath
+ PNG
+ OCIO
+ #OTIO
+@@ -179,7 +179,6 @@
+ set(JPEG_SHARED_LIBS ${BUILD_SHARED_LIBS})
+ set(TIFF_SHARED_LIBS ${BUILD_SHARED_LIBS})
+ set(PNG_SHARED_LIBS ${BUILD_SHARED_LIBS})
+-set(ILMBASE_SHARED_LIBS ${BUILD_SHARED_LIBS})
+ set(OPENEXR_SHARED_LIBS ${BUILD_SHARED_LIBS})
+ set(OCIO_SHARED_LIBS ${BUILD_SHARED_LIBS})
+ set(OTIO_SHARED_LIBS ${BUILD_SHARED_LIBS})
+diff --color -ruN DJV-2.0.8/lib/djvAV/CMakeLists.txt DJV-2.0.8_patched/lib/djvAV/CMakeLists.txt
+--- DJV-2.0.8/lib/djvAV/CMakeLists.txt 2020-06-12 04:11:18.000000000 +0200
++++ DJV-2.0.8_patched/lib/djvAV/CMakeLists.txt 2021-07-04 12:42:12.658827028 +0200
+@@ -167,8 +167,6 @@
+ glad
+ GLFW
+ FreeType
+- IlmBase::Imath
+- IlmBase::IlmThread
+ OCIO
+ #OpenAL
+ RtAudio
+@@ -184,7 +182,7 @@
+ set(LIBRARIES ${LIBRARIES} PNG)
+ endif()
+ if(OpenEXR_FOUND)
+- set(LIBRARIES ${LIBRARIES} OpenEXR::IlmImf)
++ set(LIBRARIES ${LIBRARIES} OpenEXR::OpenEXR)
+ target_compile_definitions(djvAV PUBLIC OpenEXR_FOUND)
+ endif()
+ if(TIFF_FOUND)
+diff --color -ruN DJV-2.0.8/lib/djvAV/Color.cpp DJV-2.0.8_patched/lib/djvAV/Color.cpp
+--- DJV-2.0.8/lib/djvAV/Color.cpp 2020-06-12 04:11:18.000000000 +0200
++++ DJV-2.0.8_patched/lib/djvAV/Color.cpp 2021-07-04 12:43:54.798825833 +0200
+@@ -373,7 +373,9 @@
+ for (size_t i = 0; i < channelCount; ++i)
+ {
+ AV::Image::F16_T tmp = 0.F;
+- is >> tmp;
++ float workaroud;
++ is >> workaroud;
++ tmp = half(workaroud);
+ value.setF16(tmp, i);
+ }
+ break;
+diff --color -ruN DJV-2.0.8/lib/djvAV/OpenEXR.h DJV-2.0.8_patched/lib/djvAV/OpenEXR.h
+--- DJV-2.0.8/lib/djvAV/OpenEXR.h 2020-06-12 04:11:18.000000000 +0200
++++ DJV-2.0.8_patched/lib/djvAV/OpenEXR.h 2021-07-04 12:37:45.808830151 +0200
+@@ -142,8 +142,8 @@
+ bool isMemoryMapped() const override;
+ char* readMemoryMapped(int n) override;
+ bool read(char c[], int n) override;
+- Imf::Int64 tellg() override;
+- void seekg(Imf::Int64 pos) override;
++ uint64_t tellg() override;
++ void seekg(uint64_t pos) override;
+
+ private:
+ DJV_PRIVATE();
+diff --color -ruN DJV-2.0.8/lib/djvAV/OpenEXRRead.cpp DJV-2.0.8_patched/lib/djvAV/OpenEXRRead.cpp
+--- DJV-2.0.8/lib/djvAV/OpenEXRRead.cpp 2020-06-12 04:11:18.000000000 +0200
++++ DJV-2.0.8_patched/lib/djvAV/OpenEXRRead.cpp 2021-07-04 12:39:58.008828604 +0200
+@@ -13,6 +13,7 @@
+ #include <ImfHeader.h>
+ #include <ImfInputFile.h>
+ #include <ImfRgbaYca.h>
++#include <ImfFrameBuffer.h>
+
+ using namespace djv::Core;
+
+@@ -75,12 +76,12 @@
+ return p.pos < p.size;
+ }
+
+- Imf::Int64 MemoryMappedIStream::tellg()
++ uint64_t MemoryMappedIStream::tellg()
+ {
+ return _p->pos;
+ }
+
+- void MemoryMappedIStream::seekg(Imf::Int64 pos)
++ void MemoryMappedIStream::seekg(int64_t pos)
+ {
+ _p->pos = pos;
+ }
+diff --color -ruN DJV-2.0.8/lib/djvAV/Pixel.h DJV-2.0.8_patched/lib/djvAV/Pixel.h
+--- DJV-2.0.8/lib/djvAV/Pixel.h 2020-06-12 04:11:18.000000000 +0200
++++ DJV-2.0.8_patched/lib/djvAV/Pixel.h 2021-07-04 13:01:01.748813814 +0200
+@@ -10,7 +10,7 @@
+ #include <djvCore/PicoJSON.h>
+ #include <djvCore/Range.h>
+
+-#include <OpenEXR/half.h>
++#include <Imath/half.h>
+
+ #include <limits>
+
diff --git a/PKGBUILD b/PKGBUILD
index 65c702d7d38c..42e75dadf8b7 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,13 +4,13 @@
pkgname=djv
pkgver=2.0.8
-pkgrel=3
+pkgrel=4
pkgdesc="Professional media review software for VFX, animation, and film production"
arch=("x86_64")
url="http://djv.sourceforge.net/"
license=('CUSTOM')
groups=()
-depends=('ffmpeg' 'freetype2' 'glfw' 'glm' 'libjpeg' 'libpng' 'libtiff' 'opencolorio' 'openexr' 'python' 'rtaudio' 'zlib')
+depends=('ffmpeg' 'freetype2' 'glfw' 'glm' 'libjpeg' 'libpng' 'libtiff' 'opencolorio1' 'openexr>=3.0.0' 'python' 'rtaudio' 'zlib')
makedepends=('cmake')
replaces=()
backup=()
@@ -21,15 +21,19 @@ source=("${pkgname}-${pkgver}.tgz::https://github.com/darbyjohnston/${pkgname^^}
"disable_tests_and_examples.patch"
"drop-third-party.patch"
"rtaudio-hint.patch"
- "ffmpeg-install.patch")
+ "ffmpeg-install.patch"
+ "OCIO.patch"
+ "OpenEXR.patch")
noextract=()
sha256sums=('bee18559d8a04b361376741900f21f69c637b51306d2b504b67f125dd14fd427'
- 'ca440bc9c1713e9edb17ed5adc0456441e69af25f803c834427f23a6991e2eca'
- 'e2bb0b7ebccd1e645d9a62f0c6dadafb94705766c787a2ea38b91b1da4e95cf7'
- 'edd3888cc651edcd2cc5d03fcde44283f75de7aee04cc9f02eafdb108140dfdf'
- 'f002c2586bed5c97f78a329379a85988c270751fc46cd6e9dd05103a52728618'
- '50474a248f3259b6cf0a1439dc9fd4e34f211113e5f64116cb6df95bee8271f0'
- 'e923d4abd6d2233ac6464773ff771ea7115cba8ed3fc2d1955b2129ff014272e')
+ 'ca440bc9c1713e9edb17ed5adc0456441e69af25f803c834427f23a6991e2eca'
+ 'e2bb0b7ebccd1e645d9a62f0c6dadafb94705766c787a2ea38b91b1da4e95cf7'
+ 'edd3888cc651edcd2cc5d03fcde44283f75de7aee04cc9f02eafdb108140dfdf'
+ 'f002c2586bed5c97f78a329379a85988c270751fc46cd6e9dd05103a52728618'
+ '50474a248f3259b6cf0a1439dc9fd4e34f211113e5f64116cb6df95bee8271f0'
+ 'e923d4abd6d2233ac6464773ff771ea7115cba8ed3fc2d1955b2129ff014272e'
+ 'b145f3e57adda6e2216d936d4f6e5466a28eb9300d049f259af5bffef23dfbde'
+ '86d64d8390c0fdc4f944ca9b55d7d7803c7f018d1f0e12098ffebc44ccbb2b00')
prepare() {
@@ -37,10 +41,23 @@ prepare() {
patch -b ${pkgname^^}-${pkgver}/third-party/CMakeLists.txt -i drop-third-party.patch
patch -b ${pkgname^^}-${pkgver}/cmake/Modules/FindRtAudio.cmake -i rtaudio-hint.patch
patch -b ${pkgname^^}-${pkgver}/cmake/Modules/FindFFmpeg.cmake -i ffmpeg-install.patch
+ patch -b ${pkgname^^}-${pkgver}/cmake/Modules/FindOCIO.cmake -i OCIO.patch
+ patch -p0 -i OpenEXR.patch
# Remove assert macro
sed -i '44,51d' ${pkgname^^}-${pkgver}/lib/djvCore/Core.h
- sed -i '44i#ifdef DJV_ASSERT \n #undef DJV_ASSERT\n#endif\n#define DJV_ASSERT(value)' ${pkgname^^}-${pkgver}/lib/djvCore/Core.h
+ sed -i '44i#ifdef DJV_ASSERT \n #undef DJV_ASSERT\n#endif\n#define DJV_ASSERT(value)' ${pkgname^^}-${pkgver}/lib/djvCore/Core.h
+
+ #fix gcc:11 headers regression
+ grep -lR "std::numeric_limits"|xargs sed -i '1 i\#include <limits>'
+ #fix header relocation against openexr:3
+ grep -lR "#include.*OpenColorIO"|xargs sed -i 's|OpenColorIO/|OpenColorIO1/|'
+ #fix missing headers
+ grep -lR "std::this_thread::sleep_for"|xargs sed -i '1 i\#include <thread>'
+
+ # Workaround potential gcc11 bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100381
+ sed -i "28,32d" ${pkgname^^}-${pkgver}/lib/djvAV/ThumbnailSystem.h
+ sed -i '7 i\#include <djvAV\/IO.h>' ${pkgname^^}-${pkgver}/lib/djvAV/ThumbnailSystem.h
}
build() {