1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-18 00:10:04 +00:00

graphics/libheif: restore API compatibility.

PR:		ports/282675
Approved by:	maintainer (makc@)
This commit is contained in:
Xin LI 2024-11-09 20:46:56 -08:00
parent b359e3699e
commit b280ef6a26
3 changed files with 23 additions and 0 deletions

View File

@ -1,5 +1,6 @@
PORTNAME= libheif
DISTVERSION= 1.19.1
PORTREVISION= 1
CATEGORIES= graphics
MASTER_SITES= https://github.com/strukturag/${PORTNAME}/releases/download/v${DISTVERSION}/

View File

@ -0,0 +1,11 @@
--- libheif/api/libheif/heif.h.orig 2024-11-01 10:56:56 UTC
+++ libheif/api/libheif/heif.h
@@ -2363,7 +2363,7 @@ struct heif_encoding_options
// Set this to the NCLX parameters to be used in the output image or set to NULL
// when the same parameters as in the input image should be used.
- const struct heif_color_profile_nclx* output_nclx_profile;
+ struct heif_color_profile_nclx* output_nclx_profile;
uint8_t macOS_compatibility_workaround_no_nclx_profile;

View File

@ -0,0 +1,11 @@
--- libheif/context.cc.orig 2024-11-01 10:56:56 UTC
+++ libheif/context.cc
@@ -1154,7 +1154,7 @@ Result<std::shared_ptr<ImageItem>> HeifContext::encode
heif_encoding_options options = in_options;
if (const auto* nclx = output_image_item->get_forced_output_nclx()) {
- options.output_nclx_profile = nclx;
+ options.output_nclx_profile = const_cast<heif_color_profile_nclx*>(nclx);
}
Result<std::shared_ptr<HeifPixelImage>> srcImageResult = output_image_item->convert_colorspace_for_encoding(pixel_image,