From e40c32417ecff3709be17c09a8447e786cf9fbd2c4bf8ed078449bcc2a57e6e5 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Thu, 20 Jun 2024 21:09:56 +0000 Subject: [PATCH] - Enable cjpegli, djpegli tools - Add system-jpeg.diff OBS-URL: https://build.opensuse.org/package/show/graphics/libjxl?expand=0&rev=46 --- libjxl.changes | 6 ++++++ libjxl.spec | 6 ++++-- system-jpeg.diff | 29 +++++++++++++++++++++++++++++ 3 files changed, 39 insertions(+), 2 deletions(-) create mode 100644 system-jpeg.diff diff --git a/libjxl.changes b/libjxl.changes index 376beaa..72dd37b 100644 --- a/libjxl.changes +++ b/libjxl.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Jun 20 21:01:12 UTC 2024 - Jan Engelhardt + +- Enable cjpegli, djpegli tools +- Add system-jpeg.diff + ------------------------------------------------------------------- Fri Mar 8 10:49:26 UTC 2024 - Jan Engelhardt diff --git a/libjxl.spec b/libjxl.spec index 2f7d9c0..4c92444 100644 --- a/libjxl.spec +++ b/libjxl.spec @@ -33,6 +33,7 @@ URL: https://jpegxl.info/ Source: https://github.com/libjxl/libjxl/archive/refs/tags/v%version.tar.gz Source1: baselibs.conf Source2: skcms.tar +Patch1: system-jpeg.diff BuildRequires: asciidoc BuildRequires: c++_compiler BuildRequires: cmake @@ -112,7 +113,7 @@ This package provides a thumbnailer to render for JPEG XL file thumbnails, for example, on file-browsers. %prep -%setup -n libjxl-%version -a2 +%autosetup -n libjxl-%version -a2 -p1 mv skcms third_party/ %build @@ -122,7 +123,7 @@ mv skcms third_party/ -DJPEGXL_ENABLE_PLUGINS=ON -DJPEGXL_ENABLE_SKCMS=ON \ %endif -DJPEGXL_ENABLE_SJPEG=OFF -DJPEGXL_ENABLE_DOXYGEN=OFF \ - -DJPEGXL_ENABLE_JPEGLI=OFF + -DJPEGXL_ENABLE_JPEGLI=ON %cmake_build %install @@ -148,6 +149,7 @@ rm -Rf "$b/%_libdir"/libjxl* "$b/%_bindir" "$b/%_includedir" "$b/%_libdir/pkgcon %_libdir/libjxl*.so.* %files tools +%_bindir/?jpegli %_bindir/*xl* %_mandir/man*/*xl* diff --git a/system-jpeg.diff b/system-jpeg.diff new file mode 100644 index 0000000..3a2d05b --- /dev/null +++ b/system-jpeg.diff @@ -0,0 +1,29 @@ +From: Jan Engelhardt +Date: 2024-06-20 23:00:14.684111062 +0200 + +There are many legit reasons to depend on bundled software, but this ain't one of them! + +--- + lib/jpegli.cmake | 9 +++------ + 1 file changed, 3 insertions(+), 6 deletions(-) + +Index: libjxl-0.10.2/lib/jpegli.cmake +=================================================================== +--- libjxl-0.10.2.orig/lib/jpegli.cmake ++++ libjxl-0.10.2/lib/jpegli.cmake +@@ -23,12 +23,9 @@ elseif(JPEGLI_LIBJPEG_LIBRARY_SOVERSION + set(JPEG_LIB_VERSION 80) + endif() + +-configure_file( +- ../third_party/libjpeg-turbo/jconfig.h.in include/jpegli/jconfig.h) +-configure_file( +- ../third_party/libjpeg-turbo/jpeglib.h include/jpegli/jpeglib.h COPYONLY) +-configure_file( +- ../third_party/libjpeg-turbo/jmorecfg.h include/jpegli/jmorecfg.h COPYONLY) ++configure_file(/usr/include/jconfig.h include/jpegli/jconfig.h) ++configure_file(/usr/include/jpeglib.h include/jpegli/jpeglib.h COPYONLY) ++configure_file(/usr/include/jmorecfg.h include/jpegli/jmorecfg.h COPYONLY) + + add_library(jpegli-static STATIC EXCLUDE_FROM_ALL "${JPEGXL_INTERNAL_JPEGLI_SOURCES}") + target_compile_options(jpegli-static PRIVATE "${JPEGXL_INTERNAL_FLAGS}")