diff options
author | Damian Höster | 2025-01-11 01:53:50 +0100 |
---|---|---|
committer | Damian Höster | 2025-01-11 01:53:50 +0100 |
commit | 5f1b2faf4b7c3a6b9a00ac22a6bef4a08fc406ca (patch) | |
tree | 2f3caf5839fee437ed57d936f0522d300caab73b | |
parent | 5b883685c762a36775fc23b4a3483eb25b411d8f (diff) | |
download | aur-5f1b2faf4b7c3a6b9a00ac22a6bef4a08fc406ca.tar.gz |
Update PKGBUILD
-rw-r--r-- | .SRCINFO | 21 | ||||
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | PKGBUILD | 41 |
3 files changed, 26 insertions, 37 deletions
@@ -1,6 +1,6 @@ pkgbase = libjxl-metrics-git pkgdesc = JPEG XL image format reference implementation with butteraugli, ssimulacra, and ssimulacra2 metrics (git version) - pkgver = 0.11.1.r124.g7e1d4f17 + pkgver = 0.11.1.r142.g272f579a pkgrel = 1 url = https://jpeg.org/jpegxl/ arch = x86_64 @@ -9,22 +9,18 @@ pkgbase = libjxl-metrics-git makedepends = cmake makedepends = clang makedepends = lld - makedepends = giflib - makedepends = openexr - makedepends = libjpeg-turbo makedepends = python makedepends = asciidoc - makedepends = gflags - makedepends = zlib + makedepends = gdk-pixbuf2 + makedepends = gimp + makedepends = java-environment depends = brotli depends = highway - depends = gtest depends = libpng - depends = lcms2 + depends = libjpeg-turbo + depends = giflib + depends = openexr 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 @@ -36,6 +32,7 @@ pkgbase = libjxl-metrics-git conflicts = butteraugli conflicts = ssimulacra conflicts = ssimulacra2 + options = !lto source = libjxl::git+https://github.com/libjxl/libjxl.git source = brotli::git+https://github.com/google/brotli.git source = Little-CMS::git+https://github.com/mm2/Little-CMS.git @@ -45,8 +42,8 @@ pkgbase = libjxl-metrics-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 + source = libjpeg-turbo::git+https://github.com/libjpeg-turbo/libjpeg-turbo.git sha256sums = SKIP sha256sums = SKIP sha256sums = SKIP diff --git a/.gitignore b/.gitignore index 318f38726088..7d8d115316c8 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ !/PKGBUILD !/.SRCINFO !/LICENSE +!/.gitignore @@ -2,7 +2,7 @@ _pkgname=libjxl pkgname=${_pkgname}-metrics-git -pkgver=0.11.1.r124.g7e1d4f17 +pkgver=0.11.1.r142.g272f579a pkgrel=1 pkgdesc='JPEG XL image format reference implementation with butteraugli, ssimulacra, and ssimulacra2 metrics (git version)' arch=(x86_64) @@ -11,9 +11,10 @@ license=(BSD) depends=( brotli highway - gtest libpng - lcms2 + libjpeg-turbo + giflib + openexr gperftools ) makedepends=( @@ -21,13 +22,11 @@ makedepends=( cmake clang lld - giflib - openexr - libjpeg-turbo python asciidoc - gflags - zlib + gdk-pixbuf2 #optional, for building gdk-pixbuf loader + gimp #optional, for building GIMP plugin + java-environment #optional, for building JNI bindings ) provides=( libjxl @@ -44,11 +43,9 @@ conflicts=( 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' ) +options=(!lto) #Disabling pacman's LTO, as ThinLTO is enforced source=( $_pkgname::git+https://github.com/libjxl/libjxl.git brotli::git+https://github.com/google/brotli.git @@ -59,8 +56,8 @@ source=( 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 + libjpeg-turbo::git+https://github.com/libjpeg-turbo/libjpeg-turbo.git ) sha256sums=( SKIP @@ -86,8 +83,8 @@ prepare() { 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 config --local submodule.third_party/libjpeg-turbo.url "${srcdir}/libjpeg-turbo" git -C libjxl -c protocol.file.allow=always submodule update } @@ -99,30 +96,24 @@ pkgver() { } 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" cmake -S $_pkgname -B build \ -DBUILD_TESTING=0 \ -DJPEGXL_ENABLE_DEVTOOLS=ON \ + -DJPEGXL_ENABLE_DOXYGEN=OFF \ -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_COMPILER=clang \ - -DCMAKE_C_FLAGS="$CFLAGS -flto=thin" \ - -DCMAKE_CXX_COMPILER=clang++ \ - -DCMAKE_CXX_FLAGS="$CXXFLAGS -flto=thin" \ - -DCMAKE_EXE_LINKER_FLAGS="$LDFLAGS -fuse-ld=lld -Wl,--thinlto-jobs=all" \ -DCMAKE_INSTALL_PREFIX=/usr - make -C build "$MAKEFLAGS" + make -C build } package() { DESTDIR="$pkgdir" make -C build install - install -Dm644 $_pkgname/{LICENSE,PATENTS} -t "$pkgdir/usr/share/licenses/$_pkgname" + install -Dvm644 $_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" } |