commit:     84f884fcc0de32b33d1083f5a837761949e750bd
Author:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
AuthorDate: Wed Nov 27 06:19:59 2024 +0000
Commit:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
CommitDate: Wed Nov 27 06:20:16 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=84f884fc

media-gfx/xpaint: fix compilation with gcc-15

Closes: https://bugs.gentoo.org/944996
Signed-off-by: Viorel Munteanu <ceamac <AT> gentoo.org>

 .../xpaint/files/xpaint-3.1.4-gentoo-gcc-15.patch  | 24 ++++++
 media-gfx/xpaint/xpaint-3.1.4-r5.ebuild            | 88 ++++++++++++++++++++++
 2 files changed, 112 insertions(+)

diff --git a/media-gfx/xpaint/files/xpaint-3.1.4-gentoo-gcc-15.patch 
b/media-gfx/xpaint/files/xpaint-3.1.4-gentoo-gcc-15.patch
new file mode 100644
index 000000000000..6724a8ac6a56
--- /dev/null
+++ b/media-gfx/xpaint/files/xpaint-3.1.4-gentoo-gcc-15.patch
@@ -0,0 +1,24 @@
+https://bugs.gentoo.org/944996
+
+--- a/vxp2ps/vxp2ps.c
++++ b/vxp2ps/vxp2ps.c
+@@ -144,7 +144,7 @@
+ }
+ #endif
+ 
+-void ps_init()
++void ps_init(FILE* fo)
+ {
+   fprintf(fo, "%%!PS-Adobe-2.0\n");
+   fprintf(fo, "%%%%Creator: vxp2ps\n");
+--- a/vxp2ps/vxp2tex.c
++++ b/vxp2ps/vxp2tex.c
+@@ -29,7 +29,7 @@
+ #define DRAWOP 0x3000300
+ #define FILLOP 0x2492000
+ 
+-void ps_init()
++void ps_init(FILE* fo)
+ {
+   fprintf(fo, "%%!PS-Adobe-2.0\n");
+   fprintf(fo, "%%%%Creator: vxp2tex\n");

diff --git a/media-gfx/xpaint/xpaint-3.1.4-r5.ebuild 
b/media-gfx/xpaint/xpaint-3.1.4-r5.ebuild
new file mode 100644
index 000000000000..063cff5eb62b
--- /dev/null
+++ b/media-gfx/xpaint/xpaint-3.1.4-r5.ebuild
@@ -0,0 +1,88 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools desktop toolchain-funcs xdg
+
+DESCRIPTION="Image editor with tiff, jpeg and png support"
+HOMEPAGE="https://sf-xpaint.sourceforge.net/";
+SRC_URI="https://downloads.sourceforge.net/sf-xpaint/${P}.tar.bz2";
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="pgf tiff"
+# jpeg2k disabled for blocking media-libs/openjpeg:0 security cleanup, bug 
735592
+
+RDEPEND="
+       media-libs/fontconfig
+       media-libs/libjpeg-turbo:=
+       media-libs/libpng:=
+       media-libs/netpbm
+       x11-libs/libX11
+       >=x11-libs/libXaw3dXft-1.6.2h[unicode(+)]
+       x11-libs/libXext
+       x11-libs/libXft
+       x11-libs/libXmu
+       x11-libs/libXpm
+       x11-libs/libXt
+       pgf? ( media-libs/libpgf )
+       tiff? ( media-libs/tiff:= )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+       app-alternatives/yacc
+       app-alternatives/lex
+       virtual/pkgconfig
+"
+
+PATCHES=(
+       "${FILESDIR}"/${PN}-3.1.3-libtool-clang.patch
+       "${FILESDIR}"/${PN}-3.1.3-gentoo-qa.patch
+       "${FILESDIR}"/${PN}-3.1.3-gentoo-prefix.patch
+       "${FILESDIR}"/${P}-gentoo-shared-lib.patch
+       "${FILESDIR}"/${P}-gentoo-lto.patch
+       "${FILESDIR}"/${P}-gentoo-gcc-15.patch
+)
+
+src_prepare() {
+       default
+       eautoreconf
+}
+
+src_configure() {
+       econf \
+               $(use_enable tiff) \
+               --disable-libdvipgm \
+               --disable-libopenjpeg
+}
+
+src_compile() {
+       # clean up
+       emake clean
+       emake -C util clean
+
+       # parallel make still fails sometimes
+       emake substads
+       emake xpaint.1
+
+       default
+       emake \
+               WITH_PGF="$(usex pgf "yes" "no")" \
+               CC="$(tc-getCC)" \
+               CXX="$(tc-getCXX)" \
+               includedir="${EPREFIX}"/usr/include \
+               -C util
+}
+
+src_install() {
+       default
+       emake \
+               WITH_PGF="$(usex pgf "yes" "no")" \
+               DESTDIR="${ED}" \
+               -C util install
+       doicon icons/xpaint.svg
+       make_desktop_entry "${PN}"
+       find "${ED}" -name '*.la' -delete || die
+}

Reply via email to