summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDamian Höster2024-12-31 17:16:51 +0100
committerDamian Höster2024-12-31 17:16:51 +0100
commita2a1e9e397960654ecb875417e616a1119a9ea1e (patch)
treebf9ea330b81cfa985a4b314e7dafb7ff067ebcc7
downloadaur-a2a1e9e397960654ecb875417e616a1119a9ea1e.tar.gz
Initial commit
-rw-r--r--.SRCINFO62
-rw-r--r--LICENSE9
-rw-r--r--PKGBUILD122
3 files changed, 193 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..acf56704a19f
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,62 @@
+pkgbase = libjxl-metrics
+ pkgdesc = JPEG XL image format reference implementation with butteraugli, ssimulacra, and ssimulacra2 metrics
+ pkgver = 0.11.1
+ pkgrel = 1
+ url = https://jpeg.org/jpegxl/
+ arch = x86_64
+ license = BSD
+ makedepends = git
+ makedepends = cmake
+ makedepends = clang
+ makedepends = lld
+ makedepends = giflib
+ makedepends = openexr
+ makedepends = libjpeg-turbo
+ makedepends = python
+ makedepends = asciidoc
+ makedepends = gflags
+ makedepends = zlib
+ depends = brotli
+ depends = highway
+ depends = gtest
+ depends = libpng
+ depends = lcms2
+ depends = gperftools
+ optdepends = gdk-pixbuf2: for gdk-pixbuf loader
+ optdepends = gimp: for building gimp jxl plugin
+ optdepends = java-environment: for building FNI Java wrapper
+ optdepends = libjxl-doc: for documentation
+ provides = libjxl
+ provides = libjxl.so=0.11
+ provides = libjxl_threads.so=0.11
+ provides = butteraugli
+ provides = ssimulacra
+ provides = ssimulacra2
+ conflicts = libjxl
+ conflicts = butteraugli
+ conflicts = ssimulacra
+ conflicts = ssimulacra2
+ source = libjxl::git+https://github.com/libjxl/libjxl.git#tag=v0.11.1
+ source = brotli::git+https://github.com/google/brotli.git
+ source = Little-CMS::git+https://github.com/mm2/Little-CMS.git
+ source = googletest::git+https://github.com/google/googletest.git
+ source = sjpeg::git+https://github.com/webmproject/sjpeg.git
+ source = skcms::git+https://skia.googlesource.com/skcms.git
+ source = highway::git+https://github.com/google/highway.git
+ source = libpng::git+https://github.com/glennrp/libpng.git
+ source = zlib::git+https://github.com/madler/zlib.git
+ source = gflags::git+https://github.com/gflags/gflags.git
+ source = libjxl-testdata::git+https://github.com/libjxl/testdata.git
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+
+pkgname = libjxl-metrics
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 000000000000..2cff940b9c86
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,9 @@
+Binary files, as well as any files describing changes ("patches") to the software that is being built are excluded from this license. They are provided under the license terms of the software they describe changes for.
+
+ Any files containing a license notice are excluded from this license. They are provided under the license terms defined in their respective notices.
+
+ Copyright 2024 Arch Linux Contributors
+
+ Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted.
+
+ THE SOFTWARE IS PROVIDED “AS IS” AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..dc897bb596f8
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,122 @@
+# Maintainer: Damian Höster <damian dot hoester at posteo dot de>
+
+_pkgname=libjxl
+pkgname=${_pkgname}-metrics
+pkgver=0.11.1
+pkgrel=1
+pkgdesc='JPEG XL image format reference implementation with butteraugli, ssimulacra, and ssimulacra2 metrics'
+arch=(x86_64)
+url=https://jpeg.org/jpegxl/
+license=(BSD)
+depends=(
+ brotli
+ highway
+ gtest
+ libpng
+ lcms2
+ gperftools
+)
+makedepends=(
+ git
+ cmake
+ clang
+ lld
+ giflib
+ openexr
+ libjpeg-turbo
+ python
+ asciidoc
+ gflags
+ zlib
+)
+provides=(
+ libjxl
+ libjxl.so=0.11
+ libjxl_threads.so=0.11
+ butteraugli
+ ssimulacra
+ ssimulacra2
+)
+conflicts=(
+ libjxl
+ butteraugli
+ ssimulacra
+ ssimulacra2
+)
+optdepends=(
+ 'gdk-pixbuf2: for gdk-pixbuf loader'
+ 'gimp: for building gimp jxl plugin'
+ 'java-environment: for building FNI Java wrapper'
+ 'libjxl-doc: for documentation'
+)
+source=(
+ $_pkgname::git+https://github.com/libjxl/libjxl.git#tag=v${pkgver}
+ brotli::git+https://github.com/google/brotli.git
+ Little-CMS::git+https://github.com/mm2/Little-CMS.git
+ googletest::git+https://github.com/google/googletest.git
+ sjpeg::git+https://github.com/webmproject/sjpeg.git
+ skcms::git+https://skia.googlesource.com/skcms.git
+ highway::git+https://github.com/google/highway.git
+ libpng::git+https://github.com/glennrp/libpng.git
+ zlib::git+https://github.com/madler/zlib.git
+ gflags::git+https://github.com/gflags/gflags.git
+ libjxl-testdata::git+https://github.com/libjxl/testdata.git
+)
+sha256sums=(
+ SKIP
+ SKIP
+ SKIP
+ SKIP
+ SKIP
+ SKIP
+ SKIP
+ SKIP
+ SKIP
+ SKIP
+ SKIP
+)
+
+prepare() {
+ git -C libjxl submodule init
+ git -C libjxl config --local submodule.third_party/brotli.url "${srcdir}/brotli"
+ git -C libjxl config --local submodule.third_party/lcms.url "${srcdir}/Little-CMS"
+ git -C libjxl config --local submodule.third_party/googletest.url "${srcdir}/googletest"
+ git -C libjxl config --local submodule.third_party/sjpeg.url "${srcdir}/sjpeg"
+ git -C libjxl config --local submodule.third_party/skcms.url "${srcdir}/skcms"
+ git -C libjxl config --local submodule.third_party/highway.url "${srcdir}/highway"
+ git -C libjxl config --local submodule.third_party/libpng.url "${srcdir}/libpng"
+ git -C libjxl config --local submodule.third_party/zlib.url "${srcdir}/zlib"
+ git -C libjxl config --local submodule.third_party/gflags.url "${srcdir}/gflags"
+ git -C libjxl config --local submodule.third_party/testdata.url "${srcdir}/libjxl-testdata"
+ git -C libjxl -c protocol.file.allow=always submodule update
+}
+
+build() {
+ # Using clang and lld as suggested by the repo
+ export CC=clang CXX=clang++
+ export CFLAGS+=' -flto=thin' CXXFLAGS+=' -flto=thin'
+ export LDFLAGS+=' -fuse-ld=lld -Wl,--thinlto-jobs=all'
+ cmake -S $_pkgname -B build \
+ -DBUILD_TESTING=0 \
+ -DJPEGXL_ENABLE_DEVTOOLS=ON \
+ -DJPEGXL_ENABLE_EXAMPLES=OFF \
+ -DJPEGXL_ENABLE_PLUGINS=ON \
+ -DJPEGXL_ENABLE_FUZZERS=OFF \
+ -DJPEGXL_ENABLE_DOXYGEN=OFF \
+ -DJPEGXL_FORCE_SYSTEM_BROTLI=TRUE \
+ -DJPEGXL_FORCE_SYSTEM_LCMS2=TRUE \
+ -DJPEGXL_FORCE_SYSTEM_GTEST=TRUE \
+ -DJPEGXL_FORCE_SYSTEM_HWY=TRUE \
+ -DCMAKE_C_FLAGS="$CFLAGS" \
+ -DCMAKE_CXX_FLAGS="$CXXFLAGS" \
+ -DCMAKE_EXE_LINKER_FLAGS="$LDFLAGS" \
+ -DCMAKE_INSTALL_PREFIX=/usr
+ make -C build "$MAKEFLAGS"
+}
+
+package() {
+ DESTDIR="$pkgdir" make -C build install
+ install -D -m644 $_pkgname/{LICENSE,PATENTS} -t "$pkgdir/usr/share/licenses/$_pkgname"
+ ln -s /usr/bin/butteraugli_main "$pkgdir/usr/bin/butteraugli"
+ ln -s /usr/bin/ssimulacra_main "$pkgdir/usr/bin/ssimulacra"
+}