summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlfred Persson Forsberg <cat@catcream.org>2022-06-16 20:54:32 +0200
committerSam James <sam@gentoo.org>2022-06-16 22:08:49 +0100
commita6bf07acc01f5848f2b0b7c17b93e05611a651b5 (patch)
tree9d35c91dadf53bd8bdfd87bb8b0df1912d02c080 /media-libs
parentwww-apps/ikiwiki: Fix changelog (diff)
downloadgentoo-a6bf07acc01f5848f2b0b7c17b93e05611a651b5.tar.gz
gentoo-a6bf07acc01f5848f2b0b7c17b93e05611a651b5.tar.bz2
gentoo-a6bf07acc01f5848f2b0b7c17b93e05611a651b5.zip
media-libs/freeimage: fix build with musl 1.2.3
FreeImage relies on NULL being 0, while on musl for stdc++ >= 11 it is defined as nullptr. This breaks the build for musl. Returning FALSE here is correct. Closes: https://bugs.gentoo.org/841973 Signed-off-by: Alfred Persson Forsberg <cat@catcream.org> Closes: https://github.com/gentoo/gentoo/pull/25926 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'media-libs')
-rw-r--r--media-libs/freeimage/files/freeimage-3.18.0-null-to-false.patch22
-rw-r--r--media-libs/freeimage/freeimage-3.18.0-r8.ebuild1
2 files changed, 23 insertions, 0 deletions
diff --git a/media-libs/freeimage/files/freeimage-3.18.0-null-to-false.patch b/media-libs/freeimage/files/freeimage-3.18.0-null-to-false.patch
new file mode 100644
index 000000000000..3e8e13a40b3c
--- /dev/null
+++ b/media-libs/freeimage/files/freeimage-3.18.0-null-to-false.patch
@@ -0,0 +1,22 @@
+https://bugs.gentoo.org/841973
+
+See also:
+https://sourceforge.net/p/freeimage/mailman/message/37668470/
+https://git.alpinelinux.org/aports/commit/?id=9b938a7b38ea4b8d9a73f1bf0d90ee45bbfa9139
+
+diff --git a/Source/FreeImage/PluginPSD.cpp b/Source/FreeImage/PluginPSD.cpp
+index e5b5ffa..d9de81f 100644
+--- a/Source/FreeImage/PluginPSD.cpp
++++ b/Source/FreeImage/PluginPSD.cpp
+@@ -127,7 +127,7 @@ Load(FreeImageIO *io, fi_handle handle, int page, int flags, void *data) {
+ static BOOL DLL_CALLCONV
+ Save(FreeImageIO *io, FIBITMAP *dib, fi_handle handle, int page, int flags, void *data) {
+ if(!handle) {
+- return NULL;
++ return FALSE;
+ }
+ try {
+ psdParser parser;
+--
+2.35.1
+
diff --git a/media-libs/freeimage/freeimage-3.18.0-r8.ebuild b/media-libs/freeimage/freeimage-3.18.0-r8.ebuild
index aef7915a1072..826ed42b593c 100644
--- a/media-libs/freeimage/freeimage-3.18.0-r8.ebuild
+++ b/media-libs/freeimage/freeimage-3.18.0-r8.ebuild
@@ -56,6 +56,7 @@ PATCHES=(
"${FILESDIR}"/${PN}-3.18.0-openexr-3-imath.patch
"${FILESDIR}"/${PN}-3.18.0-libraw-0.20.0.patch
"${FILESDIR}"/${PN}-3.18.0-tiff-4.4.0.patch
+ "${FILESDIR}"/${PN}-3.18.0-null-to-false.patch
)
src_prepare() {