summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Bermond2020-02-01 14:18:23 +0000
committerDaniel Bermond2020-02-01 14:19:10 +0000
commitf76d30045f81718c7d3672ce11f451bab93dfd1b (patch)
tree0fd7d19268ad35dbce6e509843d09a279b68ff2c
downloadaur-f76d30045f81718c7d3672ce11f451bab93dfd1b.tar.gz
Initial commit of libjpeg-xl-git
-rw-r--r--.SRCINFO48
-rw-r--r--010-libjpeg-xl-git-remove-werror.patch14
-rw-r--r--020-libjpeg-xl-git-fix-headers-install-path.patch15
-rw-r--r--030-libjpeg-xl-git-fix-gdk-pixbuf-install-path.patch15
-rw-r--r--PKGBUILD83
5 files changed, 175 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..4f784e92e9a6
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,48 @@
+pkgbase = libjpeg-xl-git
+ pkgdesc = JPEG XL image format reference implementation (git version)
+ pkgver = r1.ff09371
+ pkgrel = 1
+ url = https://jpeg.org/jpegxl/
+ arch = x86_64
+ license = Apache
+ makedepends = git
+ makedepends = cmake
+ makedepends = clang
+ makedepends = libwebp
+ makedepends = openexr
+ makedepends = gtest
+ makedepends = python
+ makedepends = freeglut
+ depends = gcc-libs
+ depends = shared-mime-info
+ optdepends = libwebp: for CLI tools
+ optdepends = openexr: for CLI tools
+ provides = libjpeg-xl
+ conflicts = libjpeg-xl
+ source = git+https://gitlab.com/wg1/jpeg-xl.git
+ 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
+ source = git+https://github.com/google/googletest
+ source = git+https://github.com/gperftools/gperftools.git
+ source = git+https://github.com/google/brunsli.git
+ source = git+https://github.com/webmproject/sjpeg.git
+ source = git+https://skia.googlesource.com/skcms.git
+ source = 010-libjpeg-xl-git-remove-werror.patch
+ source = 020-libjpeg-xl-git-fix-headers-install-path.patch
+ source = 030-libjpeg-xl-git-fix-gdk-pixbuf-install-path.patch
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = 1d4a4f324ba33fe80cb6d68cbe65f280086c0d5ac094c4d443f94c66a5fabf6d
+ sha256sums = 0cfbbe7f3968648d4413649c8bb6f340749e946913e702ce250fc10c9ed5ba12
+ sha256sums = 5d7df9a9cfc15183915b522bfa1360e0c9034c24c7630c0da43df35326b53c3c
+
+pkgname = libjpeg-xl-git
+
diff --git a/010-libjpeg-xl-git-remove-werror.patch b/010-libjpeg-xl-git-remove-werror.patch
new file mode 100644
index 000000000000..62c9b2e92650
--- /dev/null
+++ b/010-libjpeg-xl-git-remove-werror.patch
@@ -0,0 +1,14 @@
+diff -Naurp a/CMakeLists.txt b/CMakeLists.txt
+--- a/CMakeLists.txt 2020-01-31 23:36:37.000000000 +0000
++++ b/CMakeLists.txt 2020-02-01 00:08:32.046032049 +0000
+@@ -167,10 +167,6 @@ add_compile_options(
+ -Wall
+ )
+
+-if (NOT WIN32)
+-add_compile_options(-Werror)
+-endif ()
+-
+ include(GNUInstallDirs)
+
+ set(CMAKE_CXX_STANDARD 11)
diff --git a/020-libjpeg-xl-git-fix-headers-install-path.patch b/020-libjpeg-xl-git-fix-headers-install-path.patch
new file mode 100644
index 000000000000..f35535a9670f
--- /dev/null
+++ b/020-libjpeg-xl-git-fix-headers-install-path.patch
@@ -0,0 +1,15 @@
+diff -Naurp a/jpegxl.cmake b/jpegxl.cmake
+--- a/jpegxl.cmake 2020-02-01 02:39:29.000000000 +0000
++++ b/jpegxl.cmake 2020-02-01 02:54:31.908727438 +0000
+@@ -426,9 +426,9 @@ endif() # APPLE
+ install(TARGETS jpegxl
+ DESTINATION ${CMAKE_INSTALL_LIBDIR})
+ install(DIRECTORY ${CMAKE_SOURCE_DIR}/include/jpegxl
+- DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/jpegxl")
++ DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
+ install(DIRECTORY ${CMAKE_BINARY_DIR}/include/jpegxl
+- DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/jpegxl")
++ DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
+
+ # Add a pkg-config file for libjpegxl.
+ configure_file("${CMAKE_SOURCE_DIR}/jxl/libjpegxl.pc.in" "libjpegxl.pc" @ONLY)
diff --git a/030-libjpeg-xl-git-fix-gdk-pixbuf-install-path.patch b/030-libjpeg-xl-git-fix-gdk-pixbuf-install-path.patch
new file mode 100644
index 000000000000..87da5dd43572
--- /dev/null
+++ b/030-libjpeg-xl-git-fix-gdk-pixbuf-install-path.patch
@@ -0,0 +1,15 @@
+diff -Naurp a/plugins/gdk-pixbuf/CMakeLists.txt b/plugins/gdk-pixbuf/CMakeLists.txt
+--- a/plugins/gdk-pixbuf/CMakeLists.txt 2020-02-01 03:12:11.000000000 +0000
++++ b/plugins/gdk-pixbuf/CMakeLists.txt 2020-02-01 03:29:15.820761981 +0000
+@@ -24,9 +24,9 @@ endif ()
+ add_library(pixbufloader-jxl SHARED pixbufloader-jxl.c c_interop.cc c_interop.h)
+ target_link_libraries(pixbufloader-jxl jpegxl-static PkgConfig::Gdk-Pixbuf)
+
+-install(TARGETS pixbufloader-jxl LIBRARY DESTINATION /usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders)
++install(TARGETS pixbufloader-jxl LIBRARY DESTINATION /usr/lib/gdk-pixbuf-2.0/2.10.0/loaders)
+
+-find_program(GDK_PIXBUF_QUERY_LOADERS_PROG gdk-pixbuf-query-loaders /usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0)
++find_program(GDK_PIXBUF_QUERY_LOADERS_PROG gdk-pixbuf-query-loaders /usr/lib/gdk-pixbuf-2.0)
+ if(NOT ${GDK_PIXBUF_QUERY_LOADERS_PROG} STREQUAL "GDK_PIXBUF_QUERY_LOADERS_PROG-NOTFOUND")
+ install(CODE "execute_process(COMMAND ${GDK_PIXBUF_QUERY_LOADERS_PROG} --update-cache)")
+ else()
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..1fabf22995a6
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,83 @@
+# Maintainer: Daniel Bermond <dbermond@archlinux.org>
+
+pkgname=libjpeg-xl-git
+pkgver=r1.ff09371
+pkgrel=1
+pkgdesc='JPEG XL image format reference implementation (git version)'
+arch=('x86_64')
+url='https://jpeg.org/jpegxl/'
+license=('Apache')
+depends=('gcc-libs' 'shared-mime-info')
+optdepends=('libwebp: for CLI tools'
+ 'openexr: for CLI tools')
+makedepends=('git' 'cmake' 'clang' 'libwebp' 'openexr' 'gtest' 'python' 'freeglut')
+provides=('libjpeg-xl')
+conflicts=('libjpeg-xl')
+source=('git+https://gitlab.com/wg1/jpeg-xl.git'
+ 'git+https://github.com/google/brotli.git'
+ 'git+https://github.com/lvandeve/lodepng.git'
+ 'git+https://github.com/mm2/Little-CMS.git'
+ 'git+https://github.com/google/googletest'
+ 'git+https://github.com/gperftools/gperftools.git'
+ 'git+https://github.com/google/brunsli.git'
+ 'git+https://github.com/webmproject/sjpeg.git'
+ 'git+https://skia.googlesource.com/skcms.git'
+ '010-libjpeg-xl-git-remove-werror.patch'
+ '020-libjpeg-xl-git-fix-headers-install-path.patch'
+ '030-libjpeg-xl-git-fix-gdk-pixbuf-install-path.patch')
+sha256sums=('SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ '1d4a4f324ba33fe80cb6d68cbe65f280086c0d5ac094c4d443f94c66a5fabf6d'
+ '0cfbbe7f3968648d4413649c8bb6f340749e946913e702ce250fc10c9ed5ba12'
+ '5d7df9a9cfc15183915b522bfa1360e0c9034c24c7630c0da43df35326b53c3c')
+
+prepare() {
+ cd jpeg-xl
+ git submodule init
+ git config --local submodule.third_party/brotli.url "${srcdir}/brotli"
+ git config --local submodule.third_party/lodepng.url "${srcdir}/lodepng"
+ git config --local submodule.third_party/lcms.url "${srcdir}/Little-CMS"
+ git config --local submodule.third_party/googletest.url "${srcdir}/googletest"
+ git config --local submodule.third_party/gperftools.url "${srcdir}/gperftools"
+ git config --local submodule.third_party/brunsli.url "${srcdir}/brunsli"
+ git config --local submodule.third_party/sjpeg.url "${srcdir}/sjpeg"
+ git config --local submodule.third_party/skcms.url "${srcdir}/skcms"
+ git submodule update
+ patch -Np1 -i "${srcdir}/010-libjpeg-xl-git-remove-werror.patch"
+ patch -Np1 -i "${srcdir}/020-libjpeg-xl-git-fix-headers-install-path.patch"
+ patch -Np1 -i "${srcdir}/030-libjpeg-xl-git-fix-gdk-pixbuf-install-path.patch"
+}
+
+pkgver() {
+ cd jpeg-xl
+ printf 'r%s.%s' "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
+build() {
+ cmake -B build -S jpeg-xl \
+ -DCMAKE_BUILD_TYPE:STRING='None' \
+ -DCMAKE_INSTALL_PREFIX:PATH='/usr' \
+ -DJPEGXL_ENABLE_BENCHMARK:BOOL='false' \
+ -DJPEGXL_ENABLE_FUZZERS:BOOL='false' \
+ -DJPEGXL_ENABLE_PLUGINS:BOOL='false' \
+ -DJPEGXL_ENABLE_VIEWERS:BOOL='false' \
+ -Wno-dev
+ make -C build
+}
+
+check() {
+ make -C build test
+}
+
+package() {
+ make -C build DESTDIR="$pkgdir" install
+ install -D -m644 jpeg-xl/plugins/mime/image-x-jxl.xml -t "${pkgdir}/usr/share/mime/packages"
+ rm "${pkgdir}/usr/bin/"{cbrunsli,butteraugli_main,decode_and_encode,epf_main,ssimulacra_main,xyb_range}
+}