diff options
-rw-r--r-- | .SRCINFO | 12 | ||||
-rw-r--r-- | 010-libjxl-openexr-fix.patch | 37 | ||||
-rw-r--r-- | PKGBUILD | 31 |
3 files changed, 19 insertions, 61 deletions
@@ -1,7 +1,7 @@ pkgbase = libjxl pkgdesc = JPEG XL image format reference implementation - pkgver = 0.3.7 - pkgrel = 4 + pkgver = 0.5 + pkgrel = 1 url = https://jpeg.org/jpegxl/ arch = x86_64 license = Apache @@ -25,7 +25,9 @@ pkgbase = libjxl makedepends = asciidoc makedepends = doxygen makedepends = graphviz - source = git+https://github.com/libjxl/libjxl.git#tag=v0.3.7 + makedepends = java-environment + makedepends = highway + source = git+https://github.com/libjxl/libjxl.git#tag=v0.5 source = git+https://github.com/google/brotli.git source = git+https://github.com/lvandeve/lodepng.git source = git+https://github.com/mm2/Little-CMS.git @@ -36,7 +38,6 @@ pkgbase = libjxl source = git+https://github.com/Netflix/vmaf.git source = git+https://github.com/thorfdbg/difftest_ng.git source = git+https://github.com/google/highway.git - source = 010-libjxl-openexr-fix.patch sha256sums = SKIP sha256sums = SKIP sha256sums = SKIP @@ -48,7 +49,6 @@ pkgbase = libjxl sha256sums = SKIP sha256sums = SKIP sha256sums = SKIP - sha256sums = 55e6c00fa8293d5cdcf205c88f21764bb89a2c8d2d252d059ec68091e3ee57ee pkgname = libjxl depends = brotli @@ -56,11 +56,13 @@ pkgname = libjxl optdepends = giflib: for CLI tools optdepends = gimp: for gimp plugin optdepends = gperftools: for CLI tools and gimp plugin + optdepends = java-runtime: for JNI bindings optdepends = libjpeg-turbo: for CLI tools optdepends = libpng: for CLI tools optdepends = openexr: for CLI tools provides = libjpeg-xl provides = libjxl.so + provides = libjxl_jni.so provides = libjxl_threads.so conflicts = libjpeg-xl replaces = libjpeg-xl diff --git a/010-libjxl-openexr-fix.patch b/010-libjxl-openexr-fix.patch deleted file mode 100644 index a6d247958c1c..000000000000 --- a/010-libjxl-openexr-fix.patch +++ /dev/null @@ -1,37 +0,0 @@ ---- a/lib/extras/codec_exr.cc -+++ b/lib/extras/codec_exr.cc -@@ -32,6 +32,12 @@ namespace { - namespace OpenEXR = OPENEXR_IMF_NAMESPACE; - namespace Imath = IMATH_NAMESPACE; - -+// OpenEXR::Int64 is deprecated in favor of using uint64_t directly, but using -+// uint64_t as recommended causes build failures with previous OpenEXR versions -+// on macOS, where the definition for OpenEXR::Int64 was actually not equivalent -+// to uint64_t. This alternative should work in all cases. -+using ExrInt64 = decltype(std::declval<OpenEXR::IStream>().tellg()); -+ - constexpr int kExrBitsPerSample = 16; - constexpr int kExrAlphaBits = 16; - -@@ -90,8 +96,8 @@ class InMemoryIStream : public OpenEXR::IStream { - return pos_ < bytes_.size(); - } - -- OpenEXR::Int64 tellg() override { return pos_; } -- void seekg(const OpenEXR::Int64 pos) override { -+ ExrInt64 tellg() override { return pos_; } -+ void seekg(const ExrInt64 pos) override { - JXL_ASSERT(pos + 1 <= bytes_.size()); - pos_ = pos; - } -@@ -115,8 +121,8 @@ class InMemoryOStream : public OpenEXR::OStream { - pos_ += n; - } - -- OpenEXR::Int64 tellp() override { return pos_; } -- void seekp(const OpenEXR::Int64 pos) override { -+ ExrInt64 tellp() override { return pos_; } -+ void seekp(const ExrInt64 pos) override { - if (bytes_.size() + 1 < pos) { - bytes_.resize(pos - 1); - } @@ -2,17 +2,17 @@ pkgbase=libjxl pkgname=('libjxl' 'libjxl-doc') -pkgver=0.3.7 -pkgrel=4 +pkgver=0.5 +pkgrel=1 pkgdesc='JPEG XL image format reference implementation' arch=('x86_64') url='https://jpeg.org/jpegxl/' -#license=('BSD') # license will change on the next release +license=('BSD') license=('Apache') makedepends=('git' 'cmake' 'clang' 'brotli' 'gdk-pixbuf2' 'giflib' 'gimp' 'gperftools' 'libjpeg-turbo' 'libpng' 'openexr' 'zlib' 'libgl' 'freeglut' 'gtest' 'gmock' 'python' 'asciidoc' 'doxygen' - 'graphviz') + 'graphviz' 'java-environment' 'highway') source=("git+https://github.com/libjxl/libjxl.git#tag=v${pkgver}" 'git+https://github.com/google/brotli.git' 'git+https://github.com/lvandeve/lodepng.git' @@ -23,8 +23,7 @@ source=("git+https://github.com/libjxl/libjxl.git#tag=v${pkgver}" 'git+https://github.com/veluca93/IQA-optimization.git' 'git+https://github.com/Netflix/vmaf.git' 'git+https://github.com/thorfdbg/difftest_ng.git' - 'git+https://github.com/google/highway.git' - '010-libjxl-openexr-fix.patch') + 'git+https://github.com/google/highway.git') sha256sums=('SKIP' 'SKIP' 'SKIP' @@ -35,8 +34,7 @@ sha256sums=('SKIP' 'SKIP' 'SKIP' 'SKIP' - 'SKIP' - '55e6c00fa8293d5cdcf205c88f21764bb89a2c8d2d252d059ec68091e3ee57ee') + 'SKIP') prepare() { git -C libjxl submodule init @@ -51,17 +49,9 @@ prepare() { git -C libjxl config --local submodule.third_party/difftest_ng.url "${srcdir}/difftest_ng" git -C libjxl config --local submodule.third_party/highway.url "${srcdir}/highway" git -C libjxl submodule update - - # https://gitlab.com/wg1/jpeg-xl/-/issues/162 - # https://gitlab.com/wg1/jpeg-xl/-/issues/238 - # https://github.com/libjxl/libjxl/commit/9a8f5195e4d1c45112fd65f184ebe115f4163ba2#diff-5302e2eb1ae00d323a83e482b68cbcc96bd3d717f3414663a5fffd29428808b3 - patch -d libjxl -Np1 -i "${srcdir}/010-libjxl-openexr-fix.patch" } build() { - # https://github.com/libjxl/libjxl/issues/98 - export CXXFLAGS="${CXXFLAGS/ -Wp,-D_GLIBCXX_ASSERTIONS/}" - export CC='clang' export CXX='clang++' cmake -B build -S libjxl \ @@ -74,7 +64,7 @@ build() { -DJPEGXL_ENABLE_GIMP_SAVING:BOOL='ON' \ -DJPEGXL_FORCE_SYSTEM_BROTLI:BOOL='true' \ -DJPEGXL_FORCE_SYSTEM_GTEST:BOOL='true' \ - -DJPEGXL_FORCE_SYSTEM_HWY:BOOL='false' \ + -DJPEGXL_FORCE_SYSTEM_HWY:BOOL='true' \ -DJPEGXL_WARNINGS_AS_ERRORS:BOOL='false' \ -Wno-dev make -C build all doc @@ -90,15 +80,17 @@ package_libjxl() { 'giflib: for CLI tools' 'gimp: for gimp plugin' 'gperftools: for CLI tools and gimp plugin' + 'java-runtime: for JNI bindings' 'libjpeg-turbo: for CLI tools' 'libpng: for CLI tools' 'openexr: for CLI tools') - provides=('libjpeg-xl' 'libjxl.so' 'libjxl_threads.so') + provides=('libjpeg-xl' 'libjxl.so' 'libjxl_jni.so' 'libjxl_threads.so') conflicts=('libjpeg-xl') replaces=('libjpeg-xl') make -C build DESTDIR="$pkgdir" install - rm -r "${pkgdir}/usr"/{include/{contrib,hwy},lib/{pkgconfig/,}libhwy*} + install -D -m755 build/tools/libjxl_jni.so -t "${pkgdir}/usr/lib" + install -D -m644 libjxl/{LICENSE,PATENTS} -t "${pkgdir}/usr/share/licenses/${pkgname}" } package_libjxl-doc() { @@ -109,5 +101,6 @@ package_libjxl-doc() { replaces=('libjpeg-xl-doc') install -d -m755 "${pkgdir}/usr/share/doc" + install -D -m644 libjxl/{LICENSE,PATENTS} -t "${pkgdir}/usr/share/licenses/${pkgname}" cp -dr --no-preserve='ownership' build/html "${pkgdir}/usr/share/doc/libjxl" } |