libjxl: add recipe

Import this recipe from meta-wayland, because it is a prerequisite
for the Gnome desktop. The recently updated gnome-backgrounds package
has converted most of the backgrounds to jxl and to keep them usable
the gdk-pixbuf-loader for jpegxl must be provided. This is included
in the libjxl package itself.

Signed-off-by: Markus Volk <f_l_k@t-online.de>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Markus Volk 2024-04-02 07:55:10 +02:00 committed by Khem Raj
parent 28defafdc5
commit 322ab7587f
No known key found for this signature in database
GPG Key ID: BB053355919D3314

View File

@ -0,0 +1,42 @@
SUMMARY = "Reference implementation of JPEG XL (encoder and decoder)"
HOMEPAGE = "https://github.com/libjxl/libjxl/"
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://LICENSE;md5=6a905a337cc228a1f68f0b5416f52a7f"
inherit cmake pkgconfig mime
DEPENDS = "highway brotli"
SRC_URI = "gitsm://github.com/libjxl/libjxl.git;protocol=https;nobranch=1"
SRCREV = "e1489592a770b989303b0edc5cc1dc447bbe0515"
S = "${WORKDIR}/git"
EXTRA_OECMAKE = " \
-DCMAKE_BUILD_TYPE=Release \
-DJPEGXL_ENABLE_PLUGINS=ON \
-DBUILD_TESTING=OFF \
-DJPEGXL_WARNINGS_AS_ERRORS=OFF \
-DJPEGXL_ENABLE_SIZELESS_VECTORS=ON \
-DJPEGXL_ENABLE_SJPEG=OFF \
-DJPEGXL_ENABLE_BENCHMARK=OFF \
-DJPEGXL_ENABLE_EXAMPLES=OFF \
-DJPEGXL_ENABLE_MANPAGES=OFF \
-DJPEGXL_ENABLE_SKCMS=ON \
-DJPEGXL_FORCE_SYSTEM_BROTLI=ON \
-DJPEGXL_FORCE_SYSTEM_HWY=ON \
-DJPEGXL_ENABLE_JNI=OFF \
-DJPEGXL_ENABLE_TCMALLOC=OFF \
-DJPEGXL_ENABLE_TOOLS=OFF \
"
PACKAGECONFIG ?= "mime gdk-pixbuf-loader"
PACKAGECONFIG[gdk-pixbuf-loader] = "-DJPEGXL_ENABLE_PLUGIN_GDKPIXBUF=ON,-DJPEGXL_ENABLE_PLUGIN_GDKPIXBUF=OFF,gdk-pixbuf"
PACKAGECONFIG[gimp] = "-DJPEGXL_ENABLE_PLUGIN_GIMP210=ON,-DJPEGXL_ENABLE_PLUGIN_GIMP210=OFF,gimp"
PACKAGECONFIG[mime] = "-DJPEGXL_ENABLE_PLUGIN_MIME=ON,-DJPEGXL_ENABLE_PLUGIN_MIME=OFF"
FILES:${PN} += "${libdir}/gdk-pixbuf-2.0 ${datadir}"
CXXFLAGS:append:arm = " -mfp16-format=ieee"