git: 11b08d733b7c - main - graphics/libjxl: update to 0.9.0
Date: Fri, 22 Dec 2023 20:05:17 UTC
The branch main has been updated by jbeich: URL: https://cgit.FreeBSD.org/ports/commit/?id=11b08d733b7c027401aa514d11028a9482c57e93 commit 11b08d733b7c027401aa514d11028a9482c57e93 Author: Jan Beich <jbeich@FreeBSD.org> AuthorDate: 2023-12-22 14:33:41 +0000 Commit: Jan Beich <jbeich@FreeBSD.org> CommitDate: 2023-12-22 20:01:30 +0000 graphics/libjxl: update to 0.9.0 Changes: https://github.com/libjxl/libjxl/releases/tag/v0.9.0 Reported by: GitHub (watch releases) --- comms/xastir/Makefile | 1 + graphics/GraphicsMagick/Makefile | 2 +- graphics/GraphicsMagick/files/patch-coders_jxl.c | 63 ++++++++++++++++++ graphics/ImageMagick7/Makefile | 2 +- graphics/ImageMagick7/files/patch-coders_jxl.c | 44 +++++++++++++ graphics/darktable/Makefile | 2 +- graphics/geeqie/Makefile | 1 + graphics/gimp-app/Makefile | 2 +- .../files/patch-plug-ins_common_file-jpegxl.c | 41 ++++++++++++ graphics/gimp-jxl-plugin/Makefile | 2 +- graphics/gimp-jxl-plugin/distinfo | 6 +- graphics/gthumb/Makefile | 2 +- ...-extensions_cairo__io_cairo-image-surface-jxl.c | 26 ++++++++ graphics/imlib2-jxl/Makefile | 2 +- graphics/imlib2-jxl/files/patch-imlib2-jxl.c | 76 ++++++++++++++++++++++ graphics/kf5-kimageformats/Makefile | 1 + graphics/krita/Makefile | 1 + .../files/patch-plugins_impex_jxl_JPEGXLImport.cpp | 74 +++++++++++++++++++++ graphics/libjxl/Makefile | 11 ++-- graphics/libjxl/distinfo | 20 +++--- graphics/libjxl/files/patch-no-lcms2 | 31 +++++++++ graphics/libjxl/pkg-plist | 26 +++++--- graphics/sdl2_image/Makefile | 2 +- graphics/vips/Makefile | 4 ++ graphics/vips/distinfo | 2 + multimedia/aom/Makefile | 3 +- multimedia/emby-server/Makefile | 2 +- multimedia/ffmpeg/Makefile | 2 +- x11/swayimg/Makefile | 2 +- 29 files changed, 414 insertions(+), 39 deletions(-) diff --git a/comms/xastir/Makefile b/comms/xastir/Makefile index f43f5c04b272..5b509f5448b7 100644 --- a/comms/xastir/Makefile +++ b/comms/xastir/Makefile @@ -1,6 +1,7 @@ PORTNAME= xastir DISTVERSIONPREFIX= Release- DISTVERSION= 2.2.0 +PORTREVISION= 1 CATEGORIES= comms hamradio MAINTAINER= carl@stagecraft.cx diff --git a/graphics/GraphicsMagick/Makefile b/graphics/GraphicsMagick/Makefile index 03cd38dcd40f..8c4420fc8b7e 100644 --- a/graphics/GraphicsMagick/Makefile +++ b/graphics/GraphicsMagick/Makefile @@ -1,6 +1,6 @@ PORTNAME= GraphicsMagick PORTVERSION= 1.3.40 -PORTREVISION= 2 +PORTREVISION= 3 PORTEPOCH= 1 CATEGORIES= graphics MASTER_SITES= SF diff --git a/graphics/GraphicsMagick/files/patch-coders_jxl.c b/graphics/GraphicsMagick/files/patch-coders_jxl.c new file mode 100644 index 000000000000..4cd9d9155818 --- /dev/null +++ b/graphics/GraphicsMagick/files/patch-coders_jxl.c @@ -0,0 +1,63 @@ +https://sourceforge.net/p/graphicsmagick/code/ci/43bc74dd0c13/ + +--- coders/jxl.c.orig 2023-01-14 15:40:53 UTC ++++ coders/jxl.c +@@ -631,8 +631,12 @@ static Image *ReadJXLImage(const ImageInfo *image_info + JxlColorEncoding + color_encoding; + +- status=JxlDecoderGetColorAsEncodedProfile(jxl_decoder,&pixel_format, +- JXL_COLOR_PROFILE_TARGET_DATA,&color_encoding); ++ status=JxlDecoderGetColorAsEncodedProfile(jxl_decoder, ++#if JPEGXL_NUMERIC_VERSION < JPEGXL_COMPUTE_NUMERIC_VERSION(0,9,0) ++ &pixel_format, ++#endif /* if JPEGXL_NUMERIC_VERSION < JPEGXL_COMPUTE_NUMERIC_VERSION(0,9,0) */ ++ JXL_COLOR_PROFILE_TARGET_DATA, ++ &color_encoding); + if (status == JXL_DEC_ERROR) + { + status=JXL_DEC_SUCCESS; +@@ -733,8 +737,12 @@ static Image *ReadJXLImage(const ImageInfo *image_info + size_t + profile_size; + +- if (JxlDecoderGetICCProfileSize(jxl_decoder,&pixel_format, +- JXL_COLOR_PROFILE_TARGET_ORIGINAL,&profile_size) ++ if (JxlDecoderGetICCProfileSize(jxl_decoder, ++#if JPEGXL_NUMERIC_VERSION < JPEGXL_COMPUTE_NUMERIC_VERSION(0,9,0) ++ &pixel_format, ++#endif /* if JPEGXL_NUMERIC_VERSION < JPEGXL_COMPUTE_NUMERIC_VERSION(0,9,0) */ ++ JXL_COLOR_PROFILE_TARGET_ORIGINAL, ++ &profile_size) + == JXL_DEC_SUCCESS) + { + unsigned char +@@ -743,10 +751,14 @@ static Image *ReadJXLImage(const ImageInfo *image_info + if ((profile=MagickAllocateResourceLimitedMemory(unsigned char *,profile_size)) + != NULL) + { +- if (JxlDecoderGetColorAsICCProfile(jxl_decoder,&pixel_format, ++ if (JxlDecoderGetColorAsICCProfile(jxl_decoder, ++#if JPEGXL_NUMERIC_VERSION < JPEGXL_COMPUTE_NUMERIC_VERSION(0,9,0) ++ &pixel_format, ++#endif /* if JPEGXL_NUMERIC_VERSION < JPEGXL_COMPUTE_NUMERIC_VERSION(0,9,0) */ + JXL_COLOR_PROFILE_TARGET_ORIGINAL, + profile, +- profile_size) == JXL_DEC_SUCCESS) ++ profile_size) ++ == JXL_DEC_SUCCESS) + { + (void) SetImageProfile(image,"ICM",profile,profile_size); + } +@@ -1268,8 +1280,11 @@ static unsigned int WriteJXLImage(const ImageInfo *ima + /* TODO better error codes */ + if (jxl_status == JXL_ENC_ERROR) + ThrowJXLWriterException(CoderError,NoDataReturned,image); ++#if JPEGXL_NUMERIC_VERSION < JPEGXL_COMPUTE_NUMERIC_VERSION(0,9,0) ++ /* JXL_ENC_NOT_SUPPORTED was removed for 0.9.0, although API docs still mention it. */ + else if (jxl_status == JXL_ENC_NOT_SUPPORTED) + ThrowJXLWriterException(CoderError,UnsupportedBitsPerSample,image); ++#endif /* if JPEGXL_NUMERIC_VERSION < JPEGXL_COMPUTE_NUMERIC_VERSION(0,9,0) */ + else + ThrowJXLWriterException(CoderFatalError,Default,image); + } diff --git a/graphics/ImageMagick7/Makefile b/graphics/ImageMagick7/Makefile index 57a4e3d20479..66fd6062c196 100644 --- a/graphics/ImageMagick7/Makefile +++ b/graphics/ImageMagick7/Makefile @@ -1,6 +1,6 @@ PORTNAME= ImageMagick DISTVERSION= 7.1.0-62 -PORTREVISION= 8 +PORTREVISION= 9 CATEGORIES= graphics perl5 MASTER_SITES= https://ftp.acc.umu.se/mirror/imagemagick.org/ftp/releases/ \ https://mirror.dogado.de/imagemagick/releases/ \ diff --git a/graphics/ImageMagick7/files/patch-coders_jxl.c b/graphics/ImageMagick7/files/patch-coders_jxl.c new file mode 100644 index 000000000000..83ce69bf5925 --- /dev/null +++ b/graphics/ImageMagick7/files/patch-coders_jxl.c @@ -0,0 +1,44 @@ +https://github.com/ImageMagick/ImageMagick/commit/9db502e6a70c + +--- coders/jxl.c.orig 2023-02-12 15:55:38 UTC ++++ coders/jxl.c +@@ -444,8 +444,13 @@ static Image *ReadJXLImage(const ImageInfo *image_info + *profile; + + JXLSetFormat(image,&pixel_format,exception); ++#if JPEGXL_NUMERIC_VERSION >= JPEGXL_COMPUTE_NUMERIC_VERSION(0,9,0) ++ jxl_status=JxlDecoderGetColorAsEncodedProfile(jxl_info, ++ JXL_COLOR_PROFILE_TARGET_DATA,&color_encoding); ++#else + jxl_status=JxlDecoderGetColorAsEncodedProfile(jxl_info,&pixel_format, + JXL_COLOR_PROFILE_TARGET_DATA,&color_encoding); ++#endif + if (jxl_status == JXL_DEC_SUCCESS) + { + if (color_encoding.transfer_function == JXL_TRANSFER_FUNCTION_LINEAR) +@@ -460,14 +465,25 @@ static Image *ReadJXLImage(const ImageInfo *image_info + else + if (jxl_status != JXL_DEC_ERROR) + break; ++#if JPEGXL_NUMERIC_VERSION >= JPEGXL_COMPUTE_NUMERIC_VERSION(0,9,0) ++ jxl_status=JxlDecoderGetICCProfileSize(jxl_info, ++ JXL_COLOR_PROFILE_TARGET_ORIGINAL,&profile_size); ++#else + jxl_status=JxlDecoderGetICCProfileSize(jxl_info,&pixel_format, + JXL_COLOR_PROFILE_TARGET_ORIGINAL,&profile_size); ++#endif + if (jxl_status != JXL_DEC_SUCCESS) + break; + profile=AcquireStringInfo(profile_size); ++#if JPEGXL_NUMERIC_VERSION >= JPEGXL_COMPUTE_NUMERIC_VERSION(0,9,0) ++ jxl_status=JxlDecoderGetColorAsICCProfile(jxl_info, ++ JXL_COLOR_PROFILE_TARGET_ORIGINAL,GetStringInfoDatum(profile), ++ profile_size); ++#else + jxl_status=JxlDecoderGetColorAsICCProfile(jxl_info,&pixel_format, + JXL_COLOR_PROFILE_TARGET_ORIGINAL,GetStringInfoDatum(profile), + profile_size); ++#endif + (void) SetImageProfile(image,"icc",profile,exception); + profile=DestroyStringInfo(profile); + if (jxl_status == JXL_DEC_SUCCESS) diff --git a/graphics/darktable/Makefile b/graphics/darktable/Makefile index b8d47b96be96..027ce0a22b7f 100644 --- a/graphics/darktable/Makefile +++ b/graphics/darktable/Makefile @@ -1,6 +1,6 @@ PORTNAME= darktable PORTVERSION= 4.4.2 -PORTREVISION= 5 +PORTREVISION= 6 CATEGORIES= graphics MASTER_SITES= https://github.com/darktable-org/${PORTNAME}/releases/download/release-${PORTVERSION:C/\.rc/rc/}/ diff --git a/graphics/geeqie/Makefile b/graphics/geeqie/Makefile index 0b0a30aea9bd..164364273027 100644 --- a/graphics/geeqie/Makefile +++ b/graphics/geeqie/Makefile @@ -1,6 +1,7 @@ PORTNAME= geeqie DISTVERSIONPREFIX= v DISTVERSION= 2.1 +PORTREVISION= 1 CATEGORIES= graphics MAINTAINER= amdmi3@FreeBSD.org diff --git a/graphics/gimp-app/Makefile b/graphics/gimp-app/Makefile index 5b05a5f5aedd..ece2a3f69a4d 100644 --- a/graphics/gimp-app/Makefile +++ b/graphics/gimp-app/Makefile @@ -1,6 +1,6 @@ PORTNAME?= gimp PORTVERSION= 2.10.34 -PORTREVISION= 9 +PORTREVISION= 10 PORTEPOCH?= 1 CATEGORIES?= graphics gnome MASTER_SITES= GIMP/gimp/v${PORTVERSION:R} diff --git a/graphics/gimp-app/files/patch-plug-ins_common_file-jpegxl.c b/graphics/gimp-app/files/patch-plug-ins_common_file-jpegxl.c new file mode 100644 index 000000000000..88442fda0428 --- /dev/null +++ b/graphics/gimp-app/files/patch-plug-ins_common_file-jpegxl.c @@ -0,0 +1,41 @@ +https://gitlab.gnome.org/GNOME/gimp/-/commit/a4f02398188b + +--- plug-ins/common/file-jpegxl.c.orig 2023-02-21 19:56:19 UTC ++++ plug-ins/common/file-jpegxl.c +@@ -335,7 +335,10 @@ load_image (const gchar *filename, + result_size = channel_depth * pixel_format.num_channels + * (size_t) basicinfo.xsize * (size_t) basicinfo.ysize; + +- if (JxlDecoderGetColorAsEncodedProfile (decoder, &pixel_format, ++ if (JxlDecoderGetColorAsEncodedProfile (decoder, ++#if JPEGXL_NUMERIC_VERSION < JPEGXL_COMPUTE_NUMERIC_VERSION(0,9,0) ++ &pixel_format, ++#endif + JXL_COLOR_PROFILE_TARGET_DATA, + &color_encoding) == JXL_DEC_SUCCESS) + { +@@ -379,7 +382,10 @@ load_image (const gchar *filename, + + if (! profile) + { +- if (JxlDecoderGetICCProfileSize (decoder, &pixel_format, ++ if (JxlDecoderGetICCProfileSize (decoder, ++#if JPEGXL_NUMERIC_VERSION < JPEGXL_COMPUTE_NUMERIC_VERSION(0,9,0) ++ &pixel_format, ++#endif + JXL_COLOR_PROFILE_TARGET_DATA, + &icc_size) == JXL_DEC_SUCCESS) + { +@@ -387,7 +393,11 @@ load_image (const gchar *filename, + { + gpointer raw_icc_profile = g_malloc (icc_size); + +- if (JxlDecoderGetColorAsICCProfile (decoder, &pixel_format, JXL_COLOR_PROFILE_TARGET_DATA, ++ if (JxlDecoderGetColorAsICCProfile (decoder, ++#if JPEGXL_NUMERIC_VERSION < JPEGXL_COMPUTE_NUMERIC_VERSION(0,9,0) ++ &pixel_format, ++#endif ++ JXL_COLOR_PROFILE_TARGET_DATA, + raw_icc_profile, icc_size) + == JXL_DEC_SUCCESS) + { diff --git a/graphics/gimp-jxl-plugin/Makefile b/graphics/gimp-jxl-plugin/Makefile index 0142578d55ed..642064cfb217 100644 --- a/graphics/gimp-jxl-plugin/Makefile +++ b/graphics/gimp-jxl-plugin/Makefile @@ -1,6 +1,6 @@ PORTNAME= gimp-jxl-plugin DISTVERSIONPREFIX= v -DISTVERSION= 0.8.2 +DISTVERSION= 0.9.0 CATEGORIES= graphics MAINTAINER= jbeich@FreeBSD.org diff --git a/graphics/gimp-jxl-plugin/distinfo b/graphics/gimp-jxl-plugin/distinfo index eba7d3d5cf81..19b40924732b 100644 --- a/graphics/gimp-jxl-plugin/distinfo +++ b/graphics/gimp-jxl-plugin/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1686728961 -SHA256 (libjxl-libjxl-v0.8.2_GH0.tar.gz) = c70916fb3ed43784eb840f82f05d390053a558e2da106e40863919238fa7b420 -SIZE (libjxl-libjxl-v0.8.2_GH0.tar.gz) = 1612062 +TIMESTAMP = 1703255621 +SHA256 (libjxl-libjxl-v0.9.0_GH0.tar.gz) = d83bbe188d8fa9725bb75109c922c37fcff8c3b802808f3a6c2c14aaf8337d9f +SIZE (libjxl-libjxl-v0.9.0_GH0.tar.gz) = 1871551 diff --git a/graphics/gthumb/Makefile b/graphics/gthumb/Makefile index b17aa05774b0..e7622a8e3f0f 100644 --- a/graphics/gthumb/Makefile +++ b/graphics/gthumb/Makefile @@ -1,6 +1,6 @@ PORTNAME= gthumb PORTVERSION= 3.12.2 -PORTREVISION= 6 +PORTREVISION= 7 CATEGORIES= graphics MASTER_SITES= GNOME DIST_SUBDIR= gnome diff --git a/graphics/gthumb/files/patch-extensions_cairo__io_cairo-image-surface-jxl.c b/graphics/gthumb/files/patch-extensions_cairo__io_cairo-image-surface-jxl.c new file mode 100644 index 000000000000..02ff064ccc9a --- /dev/null +++ b/graphics/gthumb/files/patch-extensions_cairo__io_cairo-image-surface-jxl.c @@ -0,0 +1,26 @@ +https://gitlab.gnome.org/GNOME/gthumb/-/issues/306 + +--- extensions/cairo_io/cairo-image-surface-jxl.c.orig 2022-04-03 18:38:59 UTC ++++ extensions/cairo_io/cairo-image-surface-jxl.c +@@ -234,18 +234,18 @@ _cairo_image_surface_create_from_jxl(GInputStream *is + + case JXL_DEC_COLOR_ENCODING: + #if HAVE_LCMS2 +- if (JxlDecoderGetColorAsEncodedProfile(dec, &pixel_format, JXL_COLOR_PROFILE_TARGET_DATA, NULL) == JXL_DEC_SUCCESS) ++ if (JxlDecoderGetColorAsEncodedProfile(dec, JXL_COLOR_PROFILE_TARGET_DATA, NULL) == JXL_DEC_SUCCESS) + break; + + { + gsize profile_size; +- if (JxlDecoderGetICCProfileSize(dec, &pixel_format, JXL_COLOR_PROFILE_TARGET_DATA, &profile_size) > 0) { ++ if (JxlDecoderGetICCProfileSize(dec, JXL_COLOR_PROFILE_TARGET_DATA, &profile_size) > 0) { + g_message("Could not get ICC profile size.\n"); + break; + } + + guchar *profile_data = g_new(guchar, profile_size); +- if (JxlDecoderGetColorAsICCProfile(dec, &pixel_format, JXL_COLOR_PROFILE_TARGET_DATA, profile_data, profile_size) > 0) { ++ if (JxlDecoderGetColorAsICCProfile(dec, JXL_COLOR_PROFILE_TARGET_DATA, profile_data, profile_size) > 0) { + g_message("Could not get ICC profile.\n"); + g_free(profile_data); + break; diff --git a/graphics/imlib2-jxl/Makefile b/graphics/imlib2-jxl/Makefile index 52c8f2b3a61a..797ab46c823d 100644 --- a/graphics/imlib2-jxl/Makefile +++ b/graphics/imlib2-jxl/Makefile @@ -1,7 +1,7 @@ PORTNAME= imlib2-jxl DISTVERSIONPREFIX= v DISTVERSION= 0.1.1 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= graphics MAINTAINER= jbeich@FreeBSD.org diff --git a/graphics/imlib2-jxl/files/patch-imlib2-jxl.c b/graphics/imlib2-jxl/files/patch-imlib2-jxl.c new file mode 100644 index 000000000000..9a1d71d329e3 --- /dev/null +++ b/graphics/imlib2-jxl/files/patch-imlib2-jxl.c @@ -0,0 +1,76 @@ +https://github.com/alistair7/imlib2-jxl/commit/3888defd345f +https://github.com/alistair7/imlib2-jxl/commit/06a3b71e4d13 +https://github.com/alistair7/imlib2-jxl/commit/de2b38f5f34f + +--- imlib2-jxl.c.orig 2022-01-20 21:53:36 UTC ++++ imlib2-jxl.c +@@ -402,7 +402,7 @@ char load(ImlibImage *im, ImlibProgressFunction progre + * extract an ICC profile and save it for later. */ + + JxlColorEncoding color_enc; +- if(JxlDecoderGetColorAsEncodedProfile(dec, &pixel_format, JXL_COLOR_PROFILE_TARGET_DATA, &color_enc) == JXL_DEC_SUCCESS) ++ if(JxlDecoderGetColorAsEncodedProfile(dec, JXL_COLOR_PROFILE_TARGET_DATA, &color_enc) == JXL_DEC_SUCCESS) + { + if(color_enc.color_space == JXL_COLOR_SPACE_RGB && color_enc.transfer_function == JXL_TRANSFER_FUNCTION_SRGB) + { +@@ -412,7 +412,7 @@ char load(ImlibImage *im, ImlibProgressFunction progre + } + } + +- if(JxlDecoderGetICCProfileSize(dec, &pixel_format, JXL_COLOR_PROFILE_TARGET_DATA, &icc_size) != JXL_DEC_SUCCESS) ++ if(JxlDecoderGetICCProfileSize(dec, JXL_COLOR_PROFILE_TARGET_DATA, &icc_size) != JXL_DEC_SUCCESS) + { + icc_size = 0; + break; +@@ -420,7 +420,7 @@ char load(ImlibImage *im, ImlibProgressFunction progre + if(!(icc_blob = malloc(icc_size))) + RETURN_ERR("Failed to allocate %zu B for ICC profile", icc_size); + +- if(JxlDecoderGetColorAsICCProfile(dec, &pixel_format, JXL_COLOR_PROFILE_TARGET_DATA, icc_blob, icc_size) != JXL_DEC_SUCCESS) ++ if(JxlDecoderGetColorAsICCProfile(dec, JXL_COLOR_PROFILE_TARGET_DATA, icc_blob, icc_size) != JXL_DEC_SUCCESS) + icc_size = 0; + + break; +@@ -596,9 +596,9 @@ char save(ImlibImage *im, ImlibProgressFunction progre + if(JxlEncoderSetParallelRunner(enc, JxlThreadParallelRunner, runner) != JXL_ENC_SUCCESS) + RETURN_ERR("Failed in JxlEncoderSetParallelRunner"); + +- JxlEncoderOptions *opts; +- if(!(opts = JxlEncoderOptionsCreate(enc, NULL))) +- RETURN_ERR("Failed in JxlEncoderOptionsCreate"); ++ JxlEncoderFrameSettings *opts; ++ if(!(opts = JxlEncoderFrameSettingsCreate(enc, NULL))) ++ RETURN_ERR("Failed in JxlEncoderFrameSettingsCreate"); + + JxlPixelFormat pixel_format = { .align = 0, .data_type = JXL_TYPE_UINT8, .num_channels = 4, .endianness = JXL_NATIVE_ENDIAN}; + +@@ -633,14 +633,14 @@ char save(ImlibImage *im, ImlibProgressFunction progre + quality = max_quality; + + // Transform quality 0-99 to distance 15-0 +- if(JxlEncoderOptionsSetDistance(opts, 15 - (quality * 15/(float)max_quality)) != JXL_ENC_SUCCESS) +- RETURN_ERR("Failed in JxlEncoderOptionsSetDistance: %.1f", 15 - (quality * 15/(float)max_quality)); ++ if(JxlEncoderSetFrameDistance(opts, 15 - (quality * 15/(float)max_quality)) != JXL_ENC_SUCCESS) ++ RETURN_ERR("Failed in JxlEncoderSetFrameDistance: %.1f", 15 - (quality * 15/(float)max_quality)); + + // If quality is maxed out, explicity enable lossless mode + if(quality == max_quality) + { +- if(JxlEncoderOptionsSetLossless(opts, 1) != JXL_ENC_SUCCESS) +- RETURN_ERR("Failed in JxlEncoderOptionsSetLossless"); ++ if(JxlEncoderSetFrameLossless(opts, JXL_TRUE) != JXL_ENC_SUCCESS) ++ RETURN_ERR("Failed in JxlEncoderSetFrameLossless"); + } + + } +@@ -659,8 +659,8 @@ char save(ImlibImage *im, ImlibProgressFunction progre + // Transform compression 0-9 to effort 3-9 + compression = 3 + (int)roundf(compression * 6/(float)max_compression); + +- if(JxlEncoderOptionsSetEffort(opts, compression) != JXL_ENC_SUCCESS) +- RETURN_ERR("Failed in JxlEncoderOptionsSetEffort: %d", compression); ++ if(JxlEncoderFrameSettingsSetOption(opts, JXL_ENC_FRAME_SETTING_EFFORT, compression) != JXL_ENC_SUCCESS) ++ RETURN_ERR("Failed in JxlEncoderFrameSettingsSetOption(JXL_ENC_FRAME_SETTING_EFFORT, %d)", compression); + } + + const size_t pixels_size = 4 * im->w * im->h; diff --git a/graphics/kf5-kimageformats/Makefile b/graphics/kf5-kimageformats/Makefile index 087f960c7cf9..8e062f603460 100644 --- a/graphics/kf5-kimageformats/Makefile +++ b/graphics/kf5-kimageformats/Makefile @@ -1,5 +1,6 @@ PORTNAME= kimageformats DISTVERSION= ${KDE_FRAMEWORKS_VERSION} +PORTREVISION= 1 CATEGORIES= graphics kde kde-frameworks MAINTAINER= kde@FreeBSD.org diff --git a/graphics/krita/Makefile b/graphics/krita/Makefile index 260834ac6951..2d918764c54f 100644 --- a/graphics/krita/Makefile +++ b/graphics/krita/Makefile @@ -1,5 +1,6 @@ PORTNAME= krita DISTVERSION= 5.2.2 +PORTREVISION= 1 CATEGORIES= graphics kde MASTER_SITES= KDE/stable/${PORTNAME}/${DISTVERSION} DIST_SUBDIR= KDE/${PORTNAME} diff --git a/graphics/krita/files/patch-plugins_impex_jxl_JPEGXLImport.cpp b/graphics/krita/files/patch-plugins_impex_jxl_JPEGXLImport.cpp new file mode 100644 index 000000000000..f3fdc06afac7 --- /dev/null +++ b/graphics/krita/files/patch-plugins_impex_jxl_JPEGXLImport.cpp @@ -0,0 +1,74 @@ +plugins/impex/jxl/JPEGXLImport.cpp:513:20: error: no matching function for call to 'JxlDecoderGetColorAsEncodedProfile' + == JxlDecoderGetColorAsEncodedProfile(dec.get(), + ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +/usr/local/include/jxl/decode.h:749:29: note: candidate function not viable: requires 3 arguments, but 4 were provided +JXL_EXPORT JxlDecoderStatus JxlDecoderGetColorAsEncodedProfile( + ^ +plugins/impex/jxl/JPEGXLImport.cpp:638:24: error: no matching function for call to 'JxlDecoderGetICCProfileSize' + != JxlDecoderGetICCProfileSize(dec.get(), nullptr, JXL_COLOR_PROFILE_TARGET_DATA, &iccSize)) { + ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +/usr/local/include/jxl/decode.h:775:29: note: candidate function not viable: requires 3 arguments, but 4 were provided +JXL_EXPORT JxlDecoderStatus JxlDecoderGetICCProfileSize( + ^ +plugins/impex/jxl/JPEGXLImport.cpp:645:24: error: no matching function for call to 'JxlDecoderGetColorAsICCProfile' + != JxlDecoderGetColorAsICCProfile(dec.get(), + ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +/usr/local/include/jxl/decode.h:793:29: note: candidate function not viable: requires 4 arguments, but 5 were provided +JXL_EXPORT JxlDecoderStatus JxlDecoderGetColorAsICCProfile( + ^ +plugins/impex/jxl/JPEGXLImport.cpp:659:28: error: no matching function for call to 'JxlDecoderGetICCProfileSize' + != JxlDecoderGetICCProfileSize(dec.get(), + ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +/usr/local/include/jxl/decode.h:775:29: note: candidate function not viable: requires 3 arguments, but 4 were provided +JXL_EXPORT JxlDecoderStatus JxlDecoderGetICCProfileSize( + ^ +plugins/impex/jxl/JPEGXLImport.cpp:669:28: error: no matching function for call to 'JxlDecoderGetColorAsICCProfile' + != JxlDecoderGetColorAsICCProfile(dec.get(), + ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +/usr/local/include/jxl/decode.h:793:29: note: candidate function not viable: requires 4 arguments, but 5 were provided +JXL_EXPORT JxlDecoderStatus JxlDecoderGetColorAsICCProfile( + ^ + +--- plugins/impex/jxl/JPEGXLImport.cpp.orig 2023-12-06 11:38:26 UTC ++++ plugins/impex/jxl/JPEGXLImport.cpp +@@ -511,7 +511,6 @@ JPEGXLImport::convert(KisDocument *document, QIODevice + JxlColorEncoding colorEncoding{}; + if (JXL_DEC_SUCCESS + == JxlDecoderGetColorAsEncodedProfile(dec.get(), +- nullptr, + JXL_COLOR_PROFILE_TARGET_DATA, + &colorEncoding)) { + const TransferCharacteristics transferFunction = [&]() { +@@ -635,7 +634,7 @@ JPEGXLImport::convert(KisDocument *document, QIODevice + size_t iccSize = 0; + QByteArray iccProfile; + if (JXL_DEC_SUCCESS +- != JxlDecoderGetICCProfileSize(dec.get(), nullptr, JXL_COLOR_PROFILE_TARGET_DATA, &iccSize)) { ++ != JxlDecoderGetICCProfileSize(dec.get(), JXL_COLOR_PROFILE_TARGET_DATA, &iccSize)) { + errFile << "ICC profile size retrieval failed"; + document->setErrorMessage(i18nc("JPEG-XL errors", "Unable to read the image profile.")); + return ImportExportCodes::ErrorWhileReading; +@@ -643,7 +642,6 @@ JPEGXLImport::convert(KisDocument *document, QIODevice + iccProfile.resize(static_cast<int>(iccSize)); + if (JXL_DEC_SUCCESS + != JxlDecoderGetColorAsICCProfile(dec.get(), +- nullptr, + JXL_COLOR_PROFILE_TARGET_DATA, + reinterpret_cast<uint8_t *>(iccProfile.data()), + static_cast<size_t>(iccProfile.size()))) { +@@ -657,7 +655,6 @@ JPEGXLImport::convert(KisDocument *document, QIODevice + if (!d.m_info.uses_original_profile) { + if (JXL_DEC_SUCCESS + != JxlDecoderGetICCProfileSize(dec.get(), +- nullptr, + JXL_COLOR_PROFILE_TARGET_ORIGINAL, + &iccTargetSize)) { + errFile << "ICC profile size retrieval failed"; +@@ -667,7 +664,6 @@ JPEGXLImport::convert(KisDocument *document, QIODevice + iccTargetProfile.resize(static_cast<int>(iccTargetSize)); + if (JXL_DEC_SUCCESS + != JxlDecoderGetColorAsICCProfile(dec.get(), +- nullptr, + JXL_COLOR_PROFILE_TARGET_ORIGINAL, + reinterpret_cast<uint8_t *>(iccTargetProfile.data()), + static_cast<size_t>(iccTargetProfile.size()))) { diff --git a/graphics/libjxl/Makefile b/graphics/libjxl/Makefile index 60e62a40bc93..aafc7b2b84ad 100644 --- a/graphics/libjxl/Makefile +++ b/graphics/libjxl/Makefile @@ -1,7 +1,6 @@ PORTNAME= libjxl DISTVERSIONPREFIX= v -DISTVERSION= 0.8.2 -PORTREVISION= 3 +DISTVERSION= 0.9.0 CATEGORIES= graphics MAINTAINER= jbeich@FreeBSD.org @@ -19,9 +18,10 @@ USES= cmake:testing compiler:c++11-lib cpe localbase:ldflags pkgconfig shared-m CPE_VENDOR= ${PORTNAME}_project USE_GITHUB= yes USE_LDCONFIG= yes -GH_TUPLE= jbeich:skcms:b25b07b:skcms/third_party/skcms \ - libjxl:testdata:d6168ff:testdata/testdata \ - webmproject:sjpeg:868ab55:sjpeg/third_party/sjpeg \ +GH_TUPLE= jbeich:skcms:42030a7:skcms/third_party/skcms \ + libjpeg-turbo:libjpeg-turbo:2.1.5.1:libjpeg_turbo/third_party/libjpeg-turbo \ + libjxl:testdata:6c94363:testdata/testdata \ + webmproject:sjpeg:e5ab130:sjpeg/third_party/sjpeg \ ${NULL} CMAKE_ON= JPEGXL_ENABLE_PLUGINS CMAKE_OFF= ${BENCHMARK FUZZERS TCMALLOC:L:S/^/JPEGXL_ENABLE_/} @@ -40,6 +40,7 @@ GIF_CMAKE_BOOL_OFF= CMAKE_DISABLE_FIND_PACKAGE_GIF JPEG_USES= jpeg JPEG_CMAKE_BOOL_OFF= CMAKE_DISABLE_FIND_PACKAGE_JPEG +JPEG_CMAKE_BOOL_OFF+= JPEGXL_ENABLE_JPEGLI_LIBJPEG # XXX WITH_JPEG8, libmap.conf(5) LTO_CMAKE_BOOL= CMAKE_INTERPROCEDURAL_OPTIMIZATION LTO_CMAKE_ON= -DCMAKE_POLICY_DEFAULT_CMP0069:STRING=NEW diff --git a/graphics/libjxl/distinfo b/graphics/libjxl/distinfo index b14ac6d0de3f..e6277dcec552 100644 --- a/graphics/libjxl/distinfo +++ b/graphics/libjxl/distinfo @@ -1,9 +1,11 @@ -TIMESTAMP = 1686728961 -SHA256 (libjxl-libjxl-v0.8.2_GH0.tar.gz) = c70916fb3ed43784eb840f82f05d390053a558e2da106e40863919238fa7b420 -SIZE (libjxl-libjxl-v0.8.2_GH0.tar.gz) = 1612062 -SHA256 (jbeich-skcms-b25b07b_GH0.tar.gz) = 3e1ce9bb99269f1093d1e4e04bcbdbbecf0920a0c67abace278e37c61b93fb0e -SIZE (jbeich-skcms-b25b07b_GH0.tar.gz) = 10041269 -SHA256 (libjxl-testdata-d6168ff_GH0.tar.gz) = ed133d390a516ff9f52f17ec4c43d15d735d99a39f39b76c17b5f4084ae15c40 -SIZE (libjxl-testdata-d6168ff_GH0.tar.gz) = 67547424 -SHA256 (webmproject-sjpeg-868ab55_GH0.tar.gz) = ffe757b376fed2fd94473f8625c25f82a3a23aa317fb1bbf1ac8159b6e0a7726 -SIZE (webmproject-sjpeg-868ab55_GH0.tar.gz) = 2472084 +TIMESTAMP = 1703255621 +SHA256 (libjxl-libjxl-v0.9.0_GH0.tar.gz) = d83bbe188d8fa9725bb75109c922c37fcff8c3b802808f3a6c2c14aaf8337d9f +SIZE (libjxl-libjxl-v0.9.0_GH0.tar.gz) = 1871551 +SHA256 (jbeich-skcms-42030a7_GH0.tar.gz) = b7537267dd0fda80a98939cc4e4d15614d2d6f433cc8421b797e0f47078c2979 +SIZE (jbeich-skcms-42030a7_GH0.tar.gz) = 10050433 +SHA256 (libjpeg-turbo-libjpeg-turbo-2.1.5.1_GH0.tar.gz) = 61846251941e5791005fb7face196eec24541fce04f12570c308557529e92c75 +SIZE (libjpeg-turbo-libjpeg-turbo-2.1.5.1_GH0.tar.gz) = 2264936 +SHA256 (libjxl-testdata-6c94363_GH0.tar.gz) = ffe4ab8ae3b80085c6f2107d1335804cfbe3729aad52f5ce382dae254d07505e +SIZE (libjxl-testdata-6c94363_GH0.tar.gz) = 69080987 +SHA256 (webmproject-sjpeg-e5ab130_GH0.tar.gz) = 89d706381311af14e1124276266aebf41977f5facfd2a984cd365835e4bb55ff +SIZE (webmproject-sjpeg-e5ab130_GH0.tar.gz) = 2481141 diff --git a/graphics/libjxl/files/patch-no-lcms2 b/graphics/libjxl/files/patch-no-lcms2 new file mode 100644 index 000000000000..9874c26babfb --- /dev/null +++ b/graphics/libjxl/files/patch-no-lcms2 @@ -0,0 +1,31 @@ +Unused since https://github.com/libjxl/libjxl/commit/726da4dbbe2e + +-- Could NOT find LCMS2 (missing: LCMS2_LIBRARY LCMS2_INCLUDE_DIR) (Required is at least version "2.12") +CMake Error at third_party/CMakeLists.txt:111 (message): + Please install lcms2 or run git submodule update --init + +FAILED: plugins/gdk-pixbuf/libpixbufloader-jxl.so +ld: error: unable to find library -llcms2 + +--- third_party/CMakeLists.txt.orig 2023-12-22 14:33:41 UTC ++++ third_party/CMakeLists.txt +@@ -104,7 +104,7 @@ endif () + configure_file("${CMAKE_CURRENT_SOURCE_DIR}/skcms/LICENSE" + ${PROJECT_BINARY_DIR}/LICENSE.skcms COPYONLY) + endif () +-if (JPEGXL_ENABLE_VIEWERS OR NOT JPEGXL_ENABLE_SKCMS OR JPEGXL_ENABLE_PLUGINS) ++if (JPEGXL_ENABLE_VIEWERS OR NOT JPEGXL_ENABLE_SKCMS) + if( NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/lcms/.git" OR JPEGXL_FORCE_SYSTEM_LCMS2 ) + find_package(LCMS2 2.12) + if ( NOT LCMS2_FOUND ) +--- plugins/gdk-pixbuf/CMakeLists.txt.orig 2023-12-22 14:33:41 UTC ++++ plugins/gdk-pixbuf/CMakeLists.txt +@@ -25,7 +25,7 @@ set_target_properties(pixbufloader-jxl PROPERTIES + + # Note: This only needs the decoder library, but we don't install the decoder + # shared library. +-target_link_libraries(pixbufloader-jxl jxl jxl_threads lcms2 PkgConfig::Gdk-Pixbuf) ++target_link_libraries(pixbufloader-jxl jxl jxl_threads 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}") diff --git a/graphics/libjxl/pkg-plist b/graphics/libjxl/pkg-plist index 9fff17b6fd22..e75d7501c163 100644 --- a/graphics/libjxl/pkg-plist +++ b/graphics/libjxl/pkg-plist @@ -1,9 +1,9 @@ -%%JPEG%%bin/cjpeg_hdr +%%JPEG%%bin/cjpegli bin/cjxl +%%JPEG%%bin/djpegli bin/djxl bin/jxlinfo -include/jxl/butteraugli.h -include/jxl/butteraugli_cxx.h +include/jxl/cms.h include/jxl/cms_interface.h include/jxl/codestream_header.h include/jxl/color_encoding.h @@ -11,27 +11,33 @@ include/jxl/decode.h include/jxl/decode_cxx.h include/jxl/encode.h include/jxl/encode_cxx.h +include/jxl/jxl_cms_export.h include/jxl/jxl_export.h include/jxl/jxl_threads_export.h include/jxl/memory_manager.h include/jxl/parallel_runner.h include/jxl/resizable_parallel_runner.h include/jxl/resizable_parallel_runner_cxx.h +include/jxl/stats.h include/jxl/thread_parallel_runner.h include/jxl/thread_parallel_runner_cxx.h include/jxl/types.h include/jxl/version.h %%PIXBUF%%lib/gdk-pixbuf-2.0/%%GTK2_VERSION%%/loaders/libpixbufloader-jxl.so -lib/libjxl.a lib/libjxl.so -lib/libjxl.so.0.8 -lib/libjxl.so.0.8.2 -lib/libjxl_dec.a -lib/libjxl_threads.a +lib/libjxl.so.0.9 +lib/libjxl.so.0.9.0 +lib/libjxl_cms.so +lib/libjxl_cms.so.0.9 +lib/libjxl_cms.so.0.9.0 +lib/libjxl_extras_codec.so +lib/libjxl_extras_codec.so.0.9 +lib/libjxl_extras_codec.so.0.9.0 lib/libjxl_threads.so -lib/libjxl_threads.so.0.8 -lib/libjxl_threads.so.0.8.2 +lib/libjxl_threads.so.0.9 +lib/libjxl_threads.so.0.9.0 libdata/pkgconfig/libjxl.pc +libdata/pkgconfig/libjxl_cms.pc libdata/pkgconfig/libjxl_threads.pc %%MANPAGES%%share/man/man1/cjxl.1.gz %%MANPAGES%%share/man/man1/djxl.1.gz diff --git a/graphics/sdl2_image/Makefile b/graphics/sdl2_image/Makefile index df6be96200a8..ee53f1f45c67 100644 --- a/graphics/sdl2_image/Makefile +++ b/graphics/sdl2_image/Makefile @@ -1,7 +1,7 @@ PORTNAME= sdl2_image DISTVERSIONPREFIX= release- DISTVERSION= 2.6.3 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= graphics MAINTAINER= amdmi3@FreeBSD.org diff --git a/graphics/vips/Makefile b/graphics/vips/Makefile index a450953d4e96..531dd86344f3 100644 --- a/graphics/vips/Makefile +++ b/graphics/vips/Makefile @@ -1,8 +1,12 @@ PORTNAME= vips PORTVERSION= 8.15.0 +PORTREVISION= 1 CATEGORIES= graphics MASTER_SITES= https://github.com/libvips/libvips/releases/download/v${PORTVERSION}/ +PATCH_SITES= https://github.com/libvips/libvips/commit/ +PATCHFILES+= 83b155909eb8.patch:-p1 # https://github.com/libvips/libvips/pull/3774 + MAINTAINER= sunpoet@FreeBSD.org COMMENT= Free image processing system WWW= https://www.libvips.org/ \ diff --git a/graphics/vips/distinfo b/graphics/vips/distinfo index 58956a5db947..9cb107cf6819 100644 --- a/graphics/vips/distinfo +++ b/graphics/vips/distinfo @@ -1,3 +1,5 @@ TIMESTAMP = 1699774464 SHA256 (vips-8.15.0.tar.xz) = d33f81c6ab4bd1faeedc36dc32f880b19e9d5ff69b502e59d175332dfb8f63f1 SIZE (vips-8.15.0.tar.xz) = 18653932 +SHA256 (83b155909eb8.patch) = e878f269c98af7e85c6edc65fef98248bfc25f62839e2094c2572cfd92d302fb +SIZE (83b155909eb8.patch) = 3784 diff --git a/multimedia/aom/Makefile b/multimedia/aom/Makefile index d30b07cdf17c..0a242e7af896 100644 --- a/multimedia/aom/Makefile +++ b/multimedia/aom/Makefile @@ -1,7 +1,7 @@ PORTNAME= aom DISTVERSIONPREFIX= v DISTVERSION= 3.8.0 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= multimedia MAINTAINER= jbeich@FreeBSD.org @@ -25,6 +25,7 @@ CMAKE_OFF= ENABLE_DOCS ENABLE_TESTS OPTIONS_DEFINE= JXL VMAF OPTIONS_DEFAULT=JXL VMAF +OPTIONS_EXCLUDE=JXL # https://bugs.chromium.org/p/aomedia/issues/detail?id=3457 JXL_DESC= Encoding tuning for Butteraugli JXL_LIB_DEPENDS= libjxl.so:graphics/libjxl diff --git a/multimedia/emby-server/Makefile b/multimedia/emby-server/Makefile index e0a37412650b..9f57a433ed9f 100644 --- a/multimedia/emby-server/Makefile +++ b/multimedia/emby-server/Makefile @@ -1,6 +1,6 @@ PORTNAME= emby-server DISTVERSION?= 4.7.14.0 -PORTREVISION?= 6 +PORTREVISION?= 7 CATEGORIES= multimedia MASTER_SITES= https://github.com/MediaBrowser/Emby.Releases/releases/download/${DISTVERSION}/ \ https://mediabrowser.github.io/embytools/ diff --git a/multimedia/ffmpeg/Makefile b/multimedia/ffmpeg/Makefile index b58c464d33be..2ff2d3ba1d42 100644 --- a/multimedia/ffmpeg/Makefile +++ b/multimedia/ffmpeg/Makefile @@ -1,6 +1,6 @@ PORTNAME= ffmpeg PORTVERSION= 6.1 -PORTREVISION= 3 +PORTREVISION= 4 PORTEPOCH= 1 CATEGORIES= multimedia audio net MASTER_SITES= https://ffmpeg.org/releases/ diff --git a/x11/swayimg/Makefile b/x11/swayimg/Makefile index 120c871b57c7..c7cee9907723 100644 --- a/x11/swayimg/Makefile +++ b/x11/swayimg/Makefile @@ -1,7 +1,7 @@ PORTNAME= swayimg DISTVERSIONPREFIX= v DISTVERSION= 1.12 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= x11 wayland MAINTAINER= jbeich@FreeBSD.org