Skip to contentSkip to conversation

package/libjxl: new package

Buildroot Thomas Petazzoni via buildroot 1 participant 1 message Feb 13, 2023

lore
Share & tools
lore
#0 lore raw

commit: https://git.buildroot.net/buildroot/commit/?id=e648d399d8bd609697e78f13f7fa76be06d91a57
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master

libjxl is the reference implementation of JPEG XL (encoder and decoder).

https://github.com/libjxl/libjxl

---
 DEVELOPERS                                   |  2 ++
 package/Config.in                            |  1 +
 package/libjxl/Config.in                     | 25 +++++++++++++
 package/libjxl/libjxl.hash                   |  4 +++
 package/libjxl/libjxl.mk                     | 33 +++++++++++++++++
 support/testing/tests/package/test_libjxl.py | 53 ++++++++++++++++++++++++++++
 toolchain/Config.in                          |  5 +++
 7 files changed, 123 insertions(+)
DEVELOPERS +2 -0
index 28cad8f58f..df2b98ad53 100644
@@ -1688,6 +1688,7 @@ F:	package/fluidsynth/
 F:	package/glslsandbox-player/
 F:	package/gnupg2/
 F:	package/highway/
+F:	package/libjxl/
 F:	package/octave/
 F:	package/ola/
 F:	package/perftest/
@@ -1712,6 +1713,7 @@ F:	support/testing/tests/package/sample_python_spake2.py
 F:	support/testing/tests/package/test_gnupg2.py
 F:	support/testing/tests/package/test_highway.py
 F:	support/testing/tests/package/test_hwloc.py
+F:	support/testing/tests/package/test_libjxl.py
 F:	support/testing/tests/package/test_ncdu.py
 F:	support/testing/tests/package/test_octave.py
 F:	support/testing/tests/package/test_ola.py
package/Config.in +1 -0
index d205bcd816..fff2fb7a93 100644
@@ -1603,6 +1603,7 @@ menu "Graphics"
 	source "package/libgta/Config.in"
 	source "package/libgtk2/Config.in"
 	source "package/libgtk3/Config.in"
+	source "package/libjxl/Config.in"
 	source "package/libmediaart/Config.in"
 	source "package/libmng/Config.in"
 	source "package/libpng/Config.in"
package/libjxl/Config.in new file +25 -0
new file mode 100644
index 0000000000..da04b89f9b
@@ -0,0 +1,25 @@
+config BR2_PACKAGE_LIBJXL
+	bool "libjxl"
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_7 # highway
+	depends on BR2_TOOLCHAIN_HAS_ATOMIC # highway
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	depends on BR2_INSTALL_LIBSTDCPP # highway
+	# libjxl fail to link statically due to libatomic issue
+	depends on !BR2_STATIC_LIBS
+	depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_81426
+	select BR2_PACKAGE_BROTLI
+	select BR2_PACKAGE_HIGHWAY
+	select BR2_PACKAGE_LCMS2
+	help
+	  libjxl is the reference implementation of JPEG XL (encoder
+	  and decoder).
+
+	  https://github.com/libjxl/libjxl
+
+comment "libjxl needs a toolchain with C++, threads, gcc >= 7, dynamic library"
+	depends on BR2_TOOLCHAIN_HAS_ATOMIC
+	depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_81426
+	depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_7 || \
+		!BR2_INSTALL_LIBSTDCPP || \
+		!BR2_TOOLCHAIN_HAS_THREADS || \
+		BR2_STATIC_LIBS
package/libjxl/libjxl.hash new file +4 -0
new file mode 100644
index 0000000000..e71d32e61d
@@ -0,0 +1,4 @@
+# Locally computed:
+sha256  3114bba1fabb36f6f4adc2632717209aa6f84077bc4e93b420e0d63fa0455c5e  libjxl-0.7.0.tar.gz
+sha256  8405932022a556380c2d8c272eff154a923feb197233f348ce5f7334fb0a5ede  LICENSE
+sha256  91915f8ae056a68a3c5bdf05d9f6f78bb6903e27a8ca3a8434c9e4ac87300575  PATENTS
package/libjxl/libjxl.mk new file +33 -0
new file mode 100644
index 0000000000..cc24ba258c
@@ -0,0 +1,33 @@
+################################################################################
+#
+# libjxl
+#
+################################################################################
+
+LIBJXL_VERSION = 0.7.0
+LIBJXL_SITE = $(call github,libjxl,libjxl,v$(LIBJXL_VERSION))
+LIBJXL_LICENSE = BSD-3-Clause
+LIBJXL_LICENSE_FILES = LICENSE PATENTS
+LIBJXL_CPE_ID_VENDOR = libjxl_project
+LIBJXL_INSTALL_STAGING = YES
+
+LIBJXL_DEPENDENCIES = \
+	brotli \
+	lcms2 \
+	highway
+
+ifeq ($(BR2_PACKAGE_LIBPNG),y)
+LIBJXL_DEPENDENCIES += libpng
+endif
+
+LIBJXL_CONF_OPTS = \
+	-DJPEGXL_BUNDLE_LIBPNG=OFF \
+	-DJPEGXL_BUNDLE_SKCMS=OFF \
+	-DJPEGXL_ENABLE_DOXYGEN=OFF \
+	-DJPEGXL_ENABLE_JNI=OFF \
+	-DJPEGXL_ENABLE_MANPAGES=OFF \
+	-DJPEGXL_ENABLE_OPENEXR=OFF \
+	-DJPEGXL_ENABLE_SJPEG=OFF \
+	-DJPEGXL_ENABLE_SKCMS=OFF
+
+$(eval $(cmake-package))
support/testing/tests/package/test_libjxl.py new file +53 -0

53 lines not on this page · raw message

toolchain/Config.in +5 -0
index 01215e0e96..08e4ccad9e 100644
@@ -141,6 +141,11 @@ config BR2_TOOLCHAIN_HAS_GCC_BUG_68485
 	bool
 	default y if BR2_microblaze
 
+# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81426
+config BR2_TOOLCHAIN_HAS_GCC_BUG_81426
+	bool
+	default y if BR2_sh
+
 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83143
 # Error: invalid operands (*UND* and .text sections) for `-' on sh4.
 # This bug no longer exists in gcc 10.x but reappeared on gcc 11.x and

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot