commit:     4866112462debfdde734c6b9f5841108be8dbfbf
Author:     Viorel Munteanu <ceamac.paragon <AT> gmail <DOT> com>
AuthorDate: Sun Mar 21 08:47:43 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Mar 27 16:42:31 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=48661124

media-gfx/xpaint: new version 3.1.3

Package-Manager: Portage-3.0.13, Repoman-3.0.2
Signed-off-by: Viorel Munteanu <ceamac.paragon <AT> gmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 media-gfx/xpaint/Manifest                          |  1 +
 .../files/xpaint-3.1.3-cflags-ldflags-strip.patch  | 41 +++++++++
 media-gfx/xpaint/xpaint-3.1.3.ebuild               | 98 ++++++++++++++++++++++
 3 files changed, 140 insertions(+)

diff --git a/media-gfx/xpaint/Manifest b/media-gfx/xpaint/Manifest
index 5c6f7235ace..c9cb55e12c3 100644
--- a/media-gfx/xpaint/Manifest
+++ b/media-gfx/xpaint/Manifest
@@ -1 +1,2 @@
 DIST xpaint-2.10.2.tar.bz2 1891925 BLAKE2B 
056ef057357a2441c8a286adf326a98650e5e0905ee07c5ef24b0689dbb57247711c44b63211494e4ca9e44429d6237c017f53e2690f99790fa6100e4ce4d118
 SHA512 
a25aa940931c686e86cbc2bd8d6fd3c80d2c793a20d7a2dd90fb5cba1cd360b5e1c8433bf0d639e2b86cb2a74040be373f732c4617909aaf8c5ada2624ab5614
+DIST xpaint-3.1.3.tar.bz2 1656489 BLAKE2B 
c6f5ed4a6c990dccacc572c834fabf68a16cacfde477915e5c3598a96335a899344d4375a48e6bf06fb601e9b260a11cc2b43afb404a83b9fb7b3044288ce1fa
 SHA512 
8ef15d6af4b65d9da18d3e5eb9eacc0b42e718d069e20de91f2e0352b642d0a4b7626a2008fdd6217c0668ed1ecdc7a09c4a993a6074c77b7899b4613c1c4bda

diff --git a/media-gfx/xpaint/files/xpaint-3.1.3-cflags-ldflags-strip.patch 
b/media-gfx/xpaint/files/xpaint-3.1.3-cflags-ldflags-strip.patch
new file mode 100644
index 00000000000..f0677c0d713
--- /dev/null
+++ b/media-gfx/xpaint/files/xpaint-3.1.3-cflags-ldflags-strip.patch
@@ -0,0 +1,41 @@
+The original Makefiles did not pass CFLAGS and LDFLAGS, causing QA warnings
+See also bug https://bugs.gentoo.org/727632
+Also remove -O3 and stripping, leave portage control that
+--- a/vxp2ps/Makefile
++++ b/vxp2ps/Makefile
+@@ -3,16 +3,16 @@
+ all: vxp2ps vxp2tex vxp2dkw
+ 
+ vxp2ps: vxp2ps.c
+-      gcc vxp2ps.c -o vxp2ps -lm $(CFLAGSEXTRA)
++      $(CC) vxp2ps.c -o vxp2ps -lm $(CFLAGS) $(CPPFLAGS) $(LDFLAGS)
+ 
+ vxp2tex: vxp2tex.c
+-      gcc vxp2tex.c -o vxp2tex -lm
++      $(CC) vxp2tex.c -o vxp2tex -lm $(CFLAGS) $(CPPFLAGS) $(LDFLAGS)
+ 
+ vxp2dkw: vxp2dkw.c
+-      gcc vxp2dkw.c -o vxp2dkw -lm
++      $(CC) vxp2dkw.c -o vxp2dkw -lm $(CFLAGS) $(CPPFLAGS) $(LDFLAGS)
+ 
+ install: all
+-      install -c -s vxp2ps vxp2tex vxp2dkw "$(DESTDIR)"/usr/bin
++      install -c vxp2ps vxp2tex vxp2dkw "$(DESTDIR)"/usr/bin
+ 
+ clean:
+       rm -f core *~ vxp2ps vxp2tex vxp2dkw
+--- a/util/Makefile
++++ b/util/Makefile
+@@ -10,10 +10,10 @@
+ endif
+ 
+ pdfconcat:
+-      $(CC) $(CFLAGS) -O3 -s -DNDEBUG=1 -DNO_CONFIG=1 -ansi -pedantic 
-Wunused -Wall -W -Wnested-externs -Winline -Wpointer-arith -Wbad-function-cast 
-Wcast-qual -Wmissing-prototypes -Wmissing-declarations pdfconcat.c -o pdfconcat
++      $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -DNDEBUG=1 -DNO_CONFIG=1 -ansi 
-pedantic -Wunused -Wall -W -Wnested-externs -Winline -Wpointer-arith 
-Wbad-function-cast -Wcast-qual -Wmissing-prototypes -Wmissing-declarations 
pdfconcat.c -o pdfconcat
+ 
+ ppmtops:
+-      $(CC) $(CFLAGS) ppmtops.c -o ppmtops
++      $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) ppmtops.c -o ppmtops
+ 
+ ifneq ($(WITH_PGF),no)
+ pgf2pnm: main.cpp pnm.cpp

diff --git a/media-gfx/xpaint/xpaint-3.1.3.ebuild 
b/media-gfx/xpaint/xpaint-3.1.3.ebuild
new file mode 100644
index 00000000000..a853557cf49
--- /dev/null
+++ b/media-gfx/xpaint/xpaint-3.1.3.ebuild
@@ -0,0 +1,98 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools desktop toolchain-funcs xdg-utils
+
+DESCRIPTION="Image editor with tiff, jpeg and png support"
+HOMEPAGE="http://sf-xpaint.sourceforge.net/";
+SRC_URI="mirror://sourceforge/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/freetype:2
+       media-libs/libjpeg-turbo:=
+       media-libs/libpng:0=
+       media-libs/netpbm:=
+       x11-libs/libICE
+       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
+       sys-libs/zlib
+       pgf? ( media-libs/libpgf )
+       tiff? (
+               media-libs/jbigkit:0=
+               media-libs/tiff:0
+       )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+       sys-devel/bison
+       sys-devel/flex
+       sys-devel/libtool
+       virtual/pkgconfig
+"
+
+PATCHES=(
+       "${FILESDIR}"/${PN}-2.10.2-libtool-clang.patch
+       "${FILESDIR}"/${P}-cflags-ldflags-strip.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)" \
+               -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' -o -name '*.a' \) -type f -delete || die
+}
+
+pkg_postinst() {
+       xdg_desktop_database_update
+}
+
+pkg_postrm() {
+       xdg_desktop_database_update
+}

Reply via email to