Closed novomesk closed 2 years ago
Thanks for the update @novomesk, about time. ;)
I guess it could be a while before all the MSYS2 dependant packages catch up w/ the new API, but I'll try to tweak the build script locally in the meantime...
Edit: Seems to build fine here so far w/ this configuration:
-DJPEGXL_ENABLE_PLUGINS=ON \
-DJPEGXL_ENABLE_PLUGIN_GIMP210=OFF \
-DJPEGXL_ENABLE_PLUGIN_MIME=OFF \
-DBUILD_TESTING=OFF \
-DJPEGXL_WARNINGS_AS_ERRORS=OFF \
-DJPEGXL_ENABLE_BENCHMARK=OFF \
-DJPEGXL_ENABLE_EXAMPLES=OFF \
-DJPEGXL_ENABLE_MANPAGES=OFF \
-DJPEGXL_ENABLE_SKCMS=OFF \
-DJPEGXL_FORCE_SYSTEM_BROTLI=ON \
-DJPEGXL_FORCE_SYSTEM_HWY=ON \
-DJPEGXL_FORCE_SYSTEM_LCMS2=ON \
-DJPEGXL_BUNDLE_LIBPNG=OFF \
-DJPEGXL_ENABLE_JNI=OFF \
-DJPEGXL_ENABLE_TCMALLOC=OFF \
(Although skcms still needs to be cloned as it's statically built into the GdkPixbuf plugin...)
Need to check over the patches next...
Old 0.6.x API can be still used with 0.7.0 it just triggers deprecated warnings during compilation. I think there won't be big troubles.
Can you please upstream this first one?
--- a/plugins/gdk-pixbuf/CMakeLists.txt
+++ b/plugins/gdk-pixbuf/CMakeLists.txt
@@ -12,7 +12,7 @@
return ()
endif ()
-add_library(pixbufloader-jxl SHARED pixbufloader-jxl.c)
+add_library(pixbufloader-jxl MODULE pixbufloader-jxl.c)
# Mark all symbols as hidden by default. The PkgConfig::Gdk-Pixbuf dependency
# will cause fill_info and fill_vtable entry points to be made public.
@@ -26,7 +26,7 @@
target_link_libraries(pixbufloader-jxl jxl jxl_threads skcms-interface 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 LIBRARY DESTINATION "${GDK_PIXBUF_MODULEDIR}")
+install(TARGETS pixbufloader-jxl DESTINATION "${GDK_PIXBUF_MODULEDIR}")
# Instead of the following, we might instead add the
# mime type image/jxl to
+add_library(pixbufloader-jxl MODULE pixbufloader-jxl.c)
Indeed, other use MODULE, not SHARED:
https://github.com/AOMediaCodec/libavif/blob/main/contrib/gdk-pixbuf/CMakeLists.txt
https://github.com/strukturag/libheif/blob/master/gdk-pixbuf/CMakeLists.txt
I can prepare the PR for libjxl.
From the GIMP link:
You are welcome to continue using the third-party plug-in if you prefer. For instance the MSYS2 project now has it built-in within the libjxl package. If you install it, it will take precedence over our new core plug-in.
So should we still be shipping the 2.10.x plugin, or not?
Ideally, maybe we should create a libjxl-gimp(210)
sub-package so the user can still have the choice? But that would have to be someone else stepping in... @Biswa96
I propose not to ship it. It is not very maintained, we will avoid circular dependency (when gimp2 and libjxl depends on each other) and there is going to be more activity on GIMP's side.
It would be possible to make an extra package with the file-jxl
plug-in but in the future, it will be discouraged to use it.
Package name
libjxl
New version number
0.7.0
Other information that may be useful
Hello,
this is the new version we waited for a long time: https://github.com/libjxl/libjxl/releases/tag/v0.7.0
This version works with system installed
highway
1.0.1 package. You can remove the conflict and use-DJPEGXL_FORCE_SYSTEM_HWY=ON
configuration.Do you remember, that we had to use the workaround with
-DHWY_COMPILE_ONLY_SCALAR
to avoid crashes in AVX2 generated code? It worked but there was performance penalty. I tried to build libjxl on MSYS2 without this workaround and I was unable to reproduce the crashes. I believe it could be because of newer gcc in MSYS2 and/or improvements in the highway library.There is a GIMP2 plugin in libjxl repo. Meanwhile, we have also limited JXL plug-in also in GIMP 2.10.32 (not only in GIMP 2.99.x like before).
When GIMP2 is a dependency of libjxl, GIMP plugin from libjxl repo is built.
When libjxl is a dependency of GIMP, JXL plug-in in official GIMP is built.
In the future, the GIMP plug-in will be probably removed from libjxl repo and further development will be done on GIMP side only.
When you want to disable the plug-in in libjxl repo, use
-DJPEGXL_ENABLE_PLUGIN_GIMP210=OFF
You can also use
-DJPEGXL_ENABLE_PLUGIN_MIME=OFF
becauseimage/jxl
definition is already added to shared-mime-info in MSYS2.There is some work with reviewing those old patches, some of them are maybe no longer needed.
Are you willing to submit a PR?
Perhaps @kmilos as he is more skilled in PKGBUILD area