[packages/libjxl] - updated to 0.10.2 (new sonames)
qboosh
qboosh at pld-linux.org
Fri Apr 5 19:34:24 CEST 2024
commit bcd5e5cf0832d50b6939b7d869682330d6724cce
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Fri Apr 5 19:13:12 2024 +0200
- updated to 0.10.2 (new sonames)
libjxl-system-libs.patch | 55 ++++++----------------------------------
libjxl.spec | 65 +++++++++++++++++++++++++++++++++++++-----------
2 files changed, 57 insertions(+), 63 deletions(-)
---
diff --git a/libjxl.spec b/libjxl.spec
index f44aee5..f6cb397 100644
--- a/libjxl.spec
+++ b/libjxl.spec
@@ -1,25 +1,26 @@
#
# Conditional build:
-%bcond_with tests # build tests
-%bcond_without java # JNI interface
+%bcond_without static_libs # static library
+%bcond_with tests # build tests
+%bcond_without java # JNI interface
%{?use_default_jdk}
Summary: JPEG XL reference implementation
Summary(pl.UTF-8): Referencyjna implementacja JPEG XL
Name: libjxl
-Version: 0.8.2
+Version: 0.10.2
Release: 1
License: BSD
Group: Libraries
#Source0Download: https://github.com/libjxl/libjxl/releases
Source0: https://github.com/libjxl/libjxl/archive/v%{version}/%{name}-%{version}.tar.gz
-# Source0-md5: 826a2508b7978f50638794473173a3ad
+# Source0-md5: e383b622cb2caef4dfcc8047f5a0fe72
Patch0: %{name}-system-libs.patch
URL: https://github.com/libjxl/libjxl
BuildRequires: OpenEXR-devel
BuildRequires: asciidoc
-BuildRequires: cmake >= 3.10
+BuildRequires: cmake >= 3.16
BuildRequires: doxygen
BuildRequires: gdk-pixbuf2-devel >= 2.38
BuildRequires: giflib-devel >= 5
@@ -43,8 +44,6 @@ BuildRequires: lodepng-devel
BuildRequires: pkgconfig
BuildRequires: python3-devel >= 1:3
BuildRequires: rpmbuild(macros) >= 2.021
-# for gdk-pixbuf loader only (the rest uses lcms2 by default)
-BuildRequires: skcms-devel
BuildRequires: zlib-devel
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -146,9 +145,31 @@ Wtyczka wczytująca/zapisująca pliki JPEG XL dla GIMP-a.
%build
export JAVA_HOME="%{java_home}"
-install -d build
-cd build
-%cmake .. \
+
+%if %{with static_libs}
+%cmake -B build-static \
+ -DBUILD_SHARED_LIBS=OFF \
+ %{cmake_on_off tests BUILD_TESTING} \
+ -DJPEGXL_ENABLE_BENCHMARK=OFF \
+ -DJPEGXL_ENABLE_DOXYGEN=OFF \
+ -DJPEGXL_ENABLE_EXAMPLES=OFF \
+ -DJPEGXL_ENABLE_JNI=OFF \
+ -DJPEGXL_ENABLE_MANPAGES=OFF \
+ -DJPEGXL_ENABLE_SJPEG=OFF \
+ -DJPEGXL_ENABLE_SKCMS=OFF \
+ -DJPEGXL_ENABLE_TCMALLOC=OFF \
+ -DJPEGXL_ENABLE_TOOLS=OFF \
+ -DJPEGXL_ENABLE_VIEWERS=OFF \
+ -DJPEGXL_FORCE_SYSTEM_BROTLI=ON \
+ -DJPEGXL_FORCE_SYSTEM_GTEST=ON \
+ -DJPEGXL_FORCE_SYSTEM_HWY=ON \
+ -DJPEGXL_FORCE_SYSTEM_LCMS2=ON \
+ -DJPEGXL_INSTALL_JARDIR=%{_javadir}
+
+%{__make} -C build-static
+%endif
+
+%cmake -B build \
%{cmake_on_off tests BUILD_TESTING} \
%{!?with_java:-DJPEGXL_ENABLE_JNI=OFF} \
-DJPEGXL_ENABLE_PLUGINS=ON \
@@ -158,13 +179,19 @@ cd build
-DJPEGXL_FORCE_SYSTEM_BROTLI=ON \
-DJPEGXL_FORCE_SYSTEM_GTEST=ON \
-DJPEGXL_FORCE_SYSTEM_HWY=ON \
+ -DJPEGXL_FORCE_SYSTEM_LCMS2=ON \
-DJPEGXL_INSTALL_JARDIR=%{_javadir}
-%{__make}
+%{__make} -C build
%install
rm -rf $RPM_BUILD_ROOT
+%if %{with static_libs}
+%{__make} -C build-static install \
+ DESTDIR=$RPM_BUILD_ROOT
+%endif
+
%{__make} -C build install \
DESTDIR=$RPM_BUILD_ROOT
@@ -191,15 +218,18 @@ fi
%defattr(644,root,root,755)
%doc AUTHORS CHANGELOG.md CONTRIBUTORS LICENSE PATENTS README.md SECURITY.md doc/xl_overview.md
%attr(755,root,root) %{_libdir}/libjxl.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libjxl.so.0.8
+%attr(755,root,root) %ghost %{_libdir}/libjxl.so.0.10
+%attr(755,root,root) %{_libdir}/libjxl_cms.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libjxl_cms.so.0.10
+%attr(755,root,root) %{_libdir}/libjxl_extras_codec.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libjxl_extras_codec.so.0.10
%attr(755,root,root) %{_libdir}/libjxl_threads.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libjxl_threads.so.0.8
+%attr(755,root,root) %ghost %{_libdir}/libjxl_threads.so.0.10
%files tools
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/benchmark_xl
%attr(755,root,root) %{_bindir}/cjxl
-%attr(755,root,root) %{_bindir}/cjpeg_hdr
%attr(755,root,root) %{_bindir}/djxl
%attr(755,root,root) %{_bindir}/jxlinfo
%{_mandir}/man1/cjxl.1*
@@ -208,16 +238,21 @@ fi
%files devel
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/libjxl.so
+%attr(755,root,root) %{_libdir}/libjxl_cms.so
+%attr(755,root,root) %{_libdir}/libjxl_extras_codec.so
%attr(755,root,root) %{_libdir}/libjxl_threads.so
-%{_libdir}/libjxl_dec.a
%{_includedir}/jxl
%{_pkgconfigdir}/libjxl.pc
+%{_pkgconfigdir}/libjxl_cms.pc
%{_pkgconfigdir}/libjxl_threads.pc
+%if %{with static_libs}
%files static
%defattr(644,root,root,755)
%{_libdir}/libjxl.a
+%{_libdir}/libjxl_cms.a
%{_libdir}/libjxl_threads.a
+%endif
%if %{with java}
%files -n java-libjxl
diff --git a/libjxl-system-libs.patch b/libjxl-system-libs.patch
index c6525c9..2efc1ba 100644
--- a/libjxl-system-libs.patch
+++ b/libjxl-system-libs.patch
@@ -1,10 +1,10 @@
---- libjxl-0.8.1/third_party/CMakeLists.txt.orig 2023-03-05 22:20:51.206401583 +0100
-+++ libjxl-0.8.1/third_party/CMakeLists.txt 2023-03-06 19:40:16.610527695 +0100
-@@ -100,15 +100,6 @@
+--- libjxl-0.10.2/third_party/CMakeLists.txt.orig 2024-03-08 09:10:58.000000000 +0100
++++ libjxl-0.10.2/third_party/CMakeLists.txt 2024-04-05 16:53:39.078193231 +0200
+@@ -95,15 +95,6 @@ else()
endif()
# *cms
--if (JPEGXL_ENABLE_SKCMS OR JPEGXL_ENABLE_PLUGINS)
+-if (JPEGXL_ENABLE_SKCMS)
- if( NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/skcms/skcms.h" )
- message(FATAL_ERROR "Please run ${PROJECT_SOURCE_DIR}/deps.sh to fetch the "
- "build dependencies.")
@@ -13,10 +13,10 @@
- configure_file("${CMAKE_CURRENT_SOURCE_DIR}/skcms/LICENSE"
- ${PROJECT_BINARY_DIR}/LICENSE.skcms COPYONLY)
-endif ()
- if (JPEGXL_ENABLE_VIEWERS OR NOT JPEGXL_ENABLE_SKCMS)
+ if (JPEGXL_ENABLE_VIEWERS OR NOT JPEGXL_ENABLE_SKCMS OR JPEGXL_ENABLE_PLUGINS)
if( NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/lcms/.git" OR JPEGXL_FORCE_SYSTEM_LCMS2 )
- find_package(LCMS2 2.13)
-@@ -167,14 +158,3 @@
+ find_package(LCMS2 2.12)
+@@ -162,14 +153,3 @@ else()
${PROJECT_BINARY_DIR}/LICENSE.libpng COPYONLY)
endif() # JPEGXL_DEP_LICENSE_DIR
endif()
@@ -31,44 +31,3 @@
- configure_file("${CMAKE_CURRENT_SOURCE_DIR}/sjpeg/COPYING"
- ${PROJECT_BINARY_DIR}/LICENSE.sjpeg COPYONLY)
-endif ()
---- libjxl-0.8.1/lib/jxl.cmake.orig 2023-02-03 13:15:36.000000000 +0100
-+++ libjxl-0.8.1/lib/jxl.cmake 2023-03-06 19:41:57.656646948 +0100
-@@ -453,17 +453,6 @@
- target_link_libraries(jxl_enc-obj PUBLIC jxl_profiler)
- endif()
-
--#TODO(lode): don't depend on CMS for the core library
--if (JPEGXL_ENABLE_SKCMS)
-- target_include_directories(jxl_enc-obj PRIVATE
-- $<TARGET_PROPERTY:skcms,INCLUDE_DIRECTORIES>
-- )
--else ()
-- target_include_directories(jxl_enc-obj PRIVATE
-- $<TARGET_PROPERTY:lcms2,INCLUDE_DIRECTORIES>
-- )
--endif ()
--
- # Generate version.h
- configure_file("jxl/version.h.in" "include/jxl/version.h")
-
-@@ -505,9 +494,6 @@
- $<TARGET_OBJECTS:jxl_enc-obj>
- $<TARGET_OBJECTS:jxl_dec-obj>
- )
--if (JPEGXL_ENABLE_SKCMS AND JPEGXL_BUNDLE_SKCMS)
-- list(APPEND JPEGXL_INTERNAL_OBJECTS $<TARGET_OBJECTS:skcms-obj>)
--endif()
-
- # Private static library. This exposes all the internal functions and is used
- # for tests.
---- libjxl-0.8.1/plugins/gdk-pixbuf/CMakeLists.txt.orig 2023-03-06 19:40:46.967029907 +0100
-+++ libjxl-0.8.1/plugins/gdk-pixbuf/CMakeLists.txt 2023-03-06 19:42:39.186421962 +0100
-@@ -23,7 +23,7 @@
-
- # Note: This only needs the decoder library, but we don't install the decoder
- # shared library.
--target_link_libraries(pixbufloader-jxl jxl jxl_threads skcms-interface PkgConfig::Gdk-Pixbuf)
-+target_link_libraries(pixbufloader-jxl jxl jxl_threads skcms PkgConfig::Gdk-Pixbuf)
-
- execute_process(COMMAND ${PKG_CONFIG_EXECUTABLE} gdk-pixbuf-2.0 --variable gdk_pixbuf_moduledir --define-variable=prefix=${CMAKE_INSTALL_PREFIX} OUTPUT_VARIABLE GDK_PIXBUF_MODULEDIR OUTPUT_STRIP_TRAILING_WHITESPACE)
- install(TARGETS pixbufloader-jxl DESTINATION "${GDK_PIXBUF_MODULEDIR}")
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/libjxl.git/commitdiff/bcd5e5cf0832d50b6939b7d869682330d6724cce
More information about the pld-cvs-commit
mailing list