public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/freeimage/files/, media-libs/freeimage/
Date: Thu, 16 Jun 2022 21:14:12 +0000 (UTC)	[thread overview]
Message-ID: <1655413729.a6bf07acc01f5848f2b0b7c17b93e05611a651b5.sam@gentoo> (raw)

commit:     a6bf07acc01f5848f2b0b7c17b93e05611a651b5
Author:     Alfred Persson Forsberg <cat <AT> catcream <DOT> org>
AuthorDate: Thu Jun 16 18:54:32 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Jun 16 21:08:49 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a6bf07ac

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 <AT> catcream.org>
Closes: https://github.com/gentoo/gentoo/pull/25926
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../files/freeimage-3.18.0-null-to-false.patch     | 22 ++++++++++++++++++++++
 media-libs/freeimage/freeimage-3.18.0-r8.ebuild    |  1 +
 2 files changed, 23 insertions(+)

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() {


             reply	other threads:[~2022-06-16 21:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-16 21:14 Sam James [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-12-22  9:55 [gentoo-commits] repo/gentoo:master commit in: media-libs/freeimage/files/, media-libs/freeimage/ Ionen Wolkens
2022-05-30 20:27 Ionen Wolkens
2022-02-15 19:51 Sam James
2020-12-29  1:05 Sam James
2020-07-19 12:02 James Le Cuirot
2019-11-26 20:26 James Le Cuirot
2019-04-14 16:25 James Le Cuirot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1655413729.a6bf07acc01f5848f2b0b7c17b93e05611a651b5.sam@gentoo \
    --to=sam@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox