summaryrefslogtreecommitdiff
path: root/media-gfx/xpaint
diff options
context:
space:
mode:
Diffstat (limited to 'media-gfx/xpaint')
-rw-r--r--media-gfx/xpaint/Manifest10
-rw-r--r--media-gfx/xpaint/files/xpaint-2.9.10.2-QA2.patch67
-rw-r--r--media-gfx/xpaint/files/xpaint-2.9.10.2-tiff.patch37
-rw-r--r--media-gfx/xpaint/files/xpaint-2.9.10.3-Fix-build-with-clang.patch25
-rw-r--r--media-gfx/xpaint/files/xpaint-2.9.9.4-QA1.patch91
-rw-r--r--media-gfx/xpaint/files/xpaint-2.9.9.4-parallel-make.patch25
-rw-r--r--media-gfx/xpaint/files/xpaint-2.9.9.4-submake.patch29
-rw-r--r--media-gfx/xpaint/xpaint-2.9.10.2-r1.ebuild84
-rw-r--r--media-gfx/xpaint/xpaint-2.9.10.3-r1.ebuild85
9 files changed, 453 insertions, 0 deletions
diff --git a/media-gfx/xpaint/Manifest b/media-gfx/xpaint/Manifest
index 428d18b6b9cb..4c8e302e8308 100644
--- a/media-gfx/xpaint/Manifest
+++ b/media-gfx/xpaint/Manifest
@@ -1,3 +1,13 @@
+AUX xpaint-2.9.10.2-QA2.patch 2235 BLAKE2B ff69a7b5b192d00a7bc308760f2d677e336b81023f458bd890574562c04946d9c1e8693e1edb09bef7c3799ba28c42a77c853f17d5d3730f6449259c5f17006e SHA512 5b8a34d8181f2b3b3b8459d4579b44e8a22807b25458401d3fe9243922ea1c7d565c25e938ff9506202ddd755e70ac103e70f9f258356ad0b240d8cbf2c53271
+AUX xpaint-2.9.10.2-tiff.patch 860 BLAKE2B 147daa24f9ec9ac321f488272873855eb025a0f8857463a7462f7627897b5b5bd9dcc6706a8b9efc9f0eaba1f0aafc91b62bbc21241a8dd2e2610d4c17ca1fe9 SHA512 38a34e3f317a3ac9a0ea5b8a62f3c93566c70889315ffa652c1dbec796e1448efabdcd58c8a7e67e70a4fa185871dfd6ca163bf38f50e9592ac792a4ca827dac
+AUX xpaint-2.9.10.3-Fix-build-with-clang.patch 669 BLAKE2B 72e06035a5cbc8f1f20f1ea22ee61047395f7f503ea77a7737ddc8b57b640be95f04ff199f2c69958fbdac9cdd1448e57ec292a3d2471404578e39db74fbd2b0 SHA512 7a8138a82eb3d4824d138a21d03759986ad03d05d65d0ef24fb911b642e1906bc5b6aba7417836fa4756cb63ae09427b7ec2a05be1588fd86a1668b52418f9e7
+AUX xpaint-2.9.9.4-QA1.patch 3336 BLAKE2B ef04f399152e9a66e774cff98c6b2c8d6f75761ef03736f33363be8af84421e2fec702aa13353124cf552eccbb3b49645cf2d3515955b39a7407fc90b2d29704 SHA512 2760bd60bc1e6335c48ce4576e9176c5893e70568f99d535b48878e6917591258ff5d206851c312b3af6b1bcda93076a60bcb3452176a49f588d4ffa1ed69a79
+AUX xpaint-2.9.9.4-parallel-make.patch 655 BLAKE2B 37c8ecee14090cb6a7a5543c9d53d52baf31446a5ef731ddf6b397660f6f6f6a598ee72c3309a0df82149e60fe123ad31936858eb48e5d1a141c3de54ddbbfcc SHA512 45161a7a76f05ebff009b8dda5c52baddcd936ee8c5984a3e0fa02d80a56947ba55df68c1241115dcce5a1f75d8993794b761ba0dbadb94b86b9c2ebfbe7c3d7
+AUX xpaint-2.9.9.4-submake.patch 747 BLAKE2B bbdce5e4ccbd6eb6b3957b9969261957d5e42ec12e273000abea0d34eef253325e1092b20df5d86ed2b30083acc5627ac2830d557b42d85f52394f3a99ef16f5 SHA512 72525c5cd892772210cba85b0f5ff193a6474657d6ffbead23c711de3346c87f8d306e252fdd8b98ae136f32311d88be6107bbe72932039bf17e4c0c64b70bae
DIST xpaint-2.10.2.tar.bz2 1891925 BLAKE2B 056ef057357a2441c8a286adf326a98650e5e0905ee07c5ef24b0689dbb57247711c44b63211494e4ca9e44429d6237c017f53e2690f99790fa6100e4ce4d118 SHA512 a25aa940931c686e86cbc2bd8d6fd3c80d2c793a20d7a2dd90fb5cba1cd360b5e1c8433bf0d639e2b86cb2a74040be373f732c4617909aaf8c5ada2624ab5614
+DIST xpaint-2.9.10.2.tar.bz2 1245813 BLAKE2B 9ff1a94bdbaf996f7ca41fd8df86ccfc58d7f51b24b20311f082beb30620dc48a6e9ae0e28ccf2cf41a7cd7901cf303fda1d45a7b48ff4ec356a3ac1f2ccd642 SHA512 8aa388d4b82b5867817eca2188f50734140c395efe663c290a78b4f24314754fb29257165a64c9b8a03634dede03d919d9a3a54c1d32049cc34216a1f3d4e499
+DIST xpaint-2.9.10.3.tar.bz2 1283725 BLAKE2B 46e1798830ddff6cc7d6d827fad0cad6d42a61dd6e6740ae6d3bca70ae7012a7c63d1d3ea5b6ebb21e0b2889c96c3f0e57969ec02bb8e742f945027e0e22e3b8 SHA512 d5d365e0308e50166e5ac70859e388436d8f0cb870b2dea0155fbc9a65a8377a861bea2217df2b5c016f8751c9ff1f74509eaff310acfaacd7b29c51cf726ac5
EBUILD xpaint-2.10.2.ebuild 1510 BLAKE2B 84c90679da7f4d8f48a57ad494d6a9914f4fa47a97e3d18bfa4f71c13619c94018e49879371fe18f852c15faf1a75ae4c9228e93d97d7b3c3eac62748c443aaa SHA512 8f009d6bdea418b73a4295e8f66e8b255f6b1b221346ddfe86beb44675fc66954ca2b6fb232f5248e2eb20aa19e7c5bd80b2be25c8ca0c9f5e6f849d34adbeea
+EBUILD xpaint-2.9.10.2-r1.ebuild 1634 BLAKE2B fd9d07d153e335a36ad0357348938782f6a887f4b3346ad3191c000cd0237c4f6e1dd3993515686b28da958218f5631c6558ec8b8d7deec8241830aad276823a SHA512 fa3117c3dda557ce2c19717652088d3ad0d7c7546d660ad3e5dbdd788056ffd462905c69f74b3b114658c3f3d7defeeb26307d00425009884a790381f0a259ac
+EBUILD xpaint-2.9.10.3-r1.ebuild 1696 BLAKE2B 140a5a043d216e0350294123b5a9f98da8b36b7648fa4b13c82726392e0fb976015d87fcfe1d2457b28db01ba89b010335d12d5da4c034940c26e3ba9987daa5 SHA512 1fac714e82d6df4f2f0dbe19f5a2fd9751d284496ed3b66487986155d20e4d01de8f0671000214ce87ff7eea09a96f0a3916aa2363c3532837b19f509fe50992
MISC metadata.xml 1204 BLAKE2B 3cd1cf2062126075b6b4be1b987ab9098ae31b611abe6e81c15e684e62ed0a1133177c4718e5bc51d5be2a0b5b2b58fb4d4a2d67ea77f21ca6d9009f2a4d4150 SHA512 e2b37b1d3381dd97ecdd40f20535426539d7caff8032ffcb5e6b74d65968adb7319523a55e45d31a697a75b9aa384e0a5155059237730ea080cf46532da12c22
diff --git a/media-gfx/xpaint/files/xpaint-2.9.10.2-QA2.patch b/media-gfx/xpaint/files/xpaint-2.9.10.2-QA2.patch
new file mode 100644
index 000000000000..9179585974c2
--- /dev/null
+++ b/media-gfx/xpaint/files/xpaint-2.9.10.2-QA2.patch
@@ -0,0 +1,67 @@
+From 08bdf5f5d0c64384b2be16bd8ac68244675388d5 Mon Sep 17 00:00:00 2001
+From: hasufell <hasufell@gentoo.org>
+Date: Sun, 6 Oct 2013 21:13:51 +0200
+Subject: [PATCH] respect CFLAGS
+
+---
+ Makefile.am | 2 +-
+ configure.ac | 2 +-
+ rw/Makefile.am | 2 +-
+ rw/configure.ac | 2 +-
+ 4 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 4cf1753..414597f 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -26,7 +26,7 @@ EXTERN_VIEWER = display
+ ## -D_BSD_SOURCE -D_SVID_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 \
+ ## -DFUNCPROTO=15 -DNARROWPROTO
+
+-ARCH_DEFINES = -g -O2 -fno-strict-aliasing -fPIC
++ARCH_DEFINES = -fno-strict-aliasing -fPIC
+
+ ##
+ ## Specific xpaint options
+diff --git a/configure.ac b/configure.ac
+index e058529..3979075 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -29,7 +29,7 @@ AC_TYPE_UINT16_T
+ AC_TYPE_UINT32_T
+ AC_TYPE_UINT64_T
+
+-CFLAGS="-I/usr/include -I/usr/include/X11 -I/usr/include/X11/Xaw3dxft"
++CFLAGS="$CFLAGS -I/usr/include -I/usr/include/X11 -I/usr/include/X11/Xaw3dxft"
+ LIBS="$LIBS -lm"
+ echo "VERSION = $VERSION" > .version
+
+diff --git a/rw/Makefile.am b/rw/Makefile.am
+index d91d5d5..2f50253 100644
+--- a/rw/Makefile.am
++++ b/rw/Makefile.am
+@@ -10,7 +10,7 @@ SHAREDIR = $(prefix)/share/xpaint
+ ## -D_BSD_SOURCE -D_SVID_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 \
+ ## -DFUNCPROTO=15 -DNARROWPROTO
+
+-ARCH_DEFINES = -g -O2 -fno-strict-aliasing -fPIC
++ARCH_DEFINES = -fno-strict-aliasing -fPIC
+
+ ##
+ ## Specific xpaint options
+diff --git a/rw/configure.ac b/rw/configure.ac
+index fb4f3d4..d9c7601 100644
+--- a/rw/configure.ac
++++ b/rw/configure.ac
+@@ -29,7 +29,7 @@ AC_TYPE_UINT16_T
+ AC_TYPE_UINT32_T
+ AC_TYPE_UINT64_T
+
+-CFLAGS="-D_POSIX_C_SOURCE=199309L -D_POSIX_SOURCE -D_XOPEN_SOURCE -D_BSD_SOURCE -D_SVID_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DFUNCPROTO=15 -DNARROWPROTO -I/usr/include -I/usr/include/X11 -I/usr/include/X11/Xaw3dxft"
++CFLAGS="$CFLAGS -D_POSIX_C_SOURCE=199309L -D_POSIX_SOURCE -D_XOPEN_SOURCE -D_BSD_SOURCE -D_SVID_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DFUNCPROTO=15 -DNARROWPROTO -I/usr/include -I/usr/include/X11 -I/usr/include/X11/Xaw3dxft"
+ LIBS="$LIBS -lm"
+
+ dnl check X11
+--
+1.8.3.2
+
diff --git a/media-gfx/xpaint/files/xpaint-2.9.10.2-tiff.patch b/media-gfx/xpaint/files/xpaint-2.9.10.2-tiff.patch
new file mode 100644
index 000000000000..20e59872b84d
--- /dev/null
+++ b/media-gfx/xpaint/files/xpaint-2.9.10.2-tiff.patch
@@ -0,0 +1,37 @@
+From: Julian Ospald <hasufell@gentoo.org>
+Date: Fri Jun 20 13:52:42 UTC 2014
+Subject: fix tiff build switch
+
+--- xpaint-2.9.10.2/configure.ac
++++ xpaint-2.9.10.2/configure.ac
+@@ -125,9 +125,11 @@
+ with_libtiff="yes"
+ tiff_header_found="no"
+ #
+-AC_ARG_ENABLE(tiff,
++AC_ARG_ENABLE([tiff],
+ [ --enable-tiff[=[yes|no]] Build with TIFF support [ [default=yes] ]],
+-test "$enable_tiff" = "no" && with_libtiff="no")
++ [with_libtiff=$enableval],
++ [with_libtiff=yes]
++)
+ #
+ if test "x$with_libtiff" = xyes ; then
+ #TIFF compiled with JPEG and JBIG support?
+--- xpaint-2.9.10.2/rw/readWriteTIFF.c
++++ xpaint-2.9.10.2/rw/readWriteTIFF.c
+@@ -14,6 +14,8 @@
+
+ /* $Id$ */
+
++#ifdef HAVE_TIFF
++
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include "tiffio.h"
+@@ -527,3 +529,5 @@ int WriteTIFF(char *file, Image * image)
+
+ return 0;
+ }
++
++#endif /* HAVE_TIFF */
diff --git a/media-gfx/xpaint/files/xpaint-2.9.10.3-Fix-build-with-clang.patch b/media-gfx/xpaint/files/xpaint-2.9.10.3-Fix-build-with-clang.patch
new file mode 100644
index 000000000000..a5a26214409e
--- /dev/null
+++ b/media-gfx/xpaint/files/xpaint-2.9.10.3-Fix-build-with-clang.patch
@@ -0,0 +1,25 @@
+From 69a76e5f4a72d83635cd413b7460df4776b2605f Mon Sep 17 00:00:00 2001
+From: hasufell <hasufell@gentoo.org>
+Date: Sun, 16 Aug 2015 16:51:26 +0200
+Subject: [PATCH] Fix build with clang
+
+---
+ rw/readWriteTGA.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/rw/readWriteTGA.c b/rw/readWriteTGA.c
+index 306a751..9046ee3 100644
+--- a/rw/readWriteTGA.c
++++ b/rw/readWriteTGA.c
+@@ -607,7 +607,7 @@ int WriteTGA(char *file_name, Image * image)
+ int tga_defdir = 1;
+ int transparency = -1;
+
+- if (!image) return;
++ if (!image) return -1;
+ w = image->width;
+ h = image->height;
+ bpp = image->scale;
+--
+2.5.0
+
diff --git a/media-gfx/xpaint/files/xpaint-2.9.9.4-QA1.patch b/media-gfx/xpaint/files/xpaint-2.9.9.4-QA1.patch
new file mode 100644
index 000000000000..31e3a38ba005
--- /dev/null
+++ b/media-gfx/xpaint/files/xpaint-2.9.9.4-QA1.patch
@@ -0,0 +1,91 @@
+From 2987bfa203a8467a697efffa211b90b12858b40b Mon Sep 17 00:00:00 2001
+From: hasufell <hasufell@gentoo.org>
+Date: Sun, 6 Oct 2013 20:37:28 +0200
+Subject: [PATCH] respect flags, add WITH_PGF option, fix echo
+
+---
+ util/Makefile | 56 +++++++++++++++++++++++++++++++++++---------------------
+ 1 file changed, 35 insertions(+), 21 deletions(-)
+
+diff --git a/util/Makefile b/util/Makefile
+index e6af415..21a0d17 100644
+--- a/util/Makefile
++++ b/util/Makefile
+@@ -1,39 +1,53 @@
+-GCC = gcc
+-CPP = g++ -fpermissive
++# set to anything but "no" to enable
++WITH_PGF=no
+
++ifneq ($(WITH_PGF),no)
+ all: pdfconcat ppmtops pgf2pnm
++else
++all: pdfconcat ppmtops
++endif
+
+ pdfconcat:
+- $(GCC) -O3 -s -DNDEBUG=1 -DNO_CONFIG=1 -ansi -pedantic -Wunused -Wall -W -Wstrict-prototypes -Wtraditional -Wnested-externs -Winline -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wmissing-prototypes -Wmissing-declarations pdfconcat.c -o pdfconcat
++ $(CC) $(CFLAGS) -DNDEBUG=1 -DNO_CONFIG=1 -ansi -pedantic -Wunused -Wall -W -Wstrict-prototypes -Wtraditional -Wnested-externs -Winline -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wmissing-prototypes -Wmissing-declarations pdfconcat.c -o pdfconcat $(LDFLAGS)
+
+ ppmtops:
+- $(GCC) ppmtops.c -o ppmtops
++ $(CC) $(CFLAGS) ppmtops.c -o ppmtops $(LDFLAGS)
+
++ifneq ($(WITH_PGF),no)
+ pgf2pnm: main.cpp pnm.cpp
+ @if [ -x /usr/include/libpgf ] ; then \
+- $(CPP) -c main.cpp -o main.o -I/usr/include/libpgf ; \
+- $(CPP) -c pnm.cpp -o pnm.o -I/usr/include/libpgf ; \
+- $(CPP) -o pgf2pnm main.o pnm.o -lpgf ; \
++ $(CXX) $(CXXFLAGS) -fpermissive -c main.cpp -o main.o -I/usr/include/libpgf ; \
++ $(CXX) $(CXXFLAGS) -fpermissive -c pnm.cpp -o pnm.o -I/usr/include/libpgf ; \
++ $(CXX) $(CXXFLAGS) -fpermissive -o pgf2pnm main.o pnm.o $(LDFLAGS) -lpgf ; \
+ else \
+- @echo "libpgf not installed !!" ; \
++ echo "libpgf not installed !!" ; \
+ fi
++endif
+
+-install:
++install-common:
+ @if [ -x pdfconcat ] ; then \
+- mkdir -p $(DESTDIR)/usr/bin ; \
+- install -c pdfconcat $(DESTDIR)/usr/bin ; \
+- echo "install -c pdfconcat $(DESTDIR)/usr/bin" ; \
+- mkdir -p $(DESTDIR)/usr/share/man/man1 ; \
+- install -c -m 644 pdfconcat.1 $(DESTDIR)/usr/share/man/man1 ; \
+- echo "install -c pdfconcat.1 $(DESTDIR)/usr/share/man/man1" ; fi
++ mkdir -p "$(DESTDIR)"/usr/bin ; \
++ install -c pdfconcat "$(DESTDIR)"/usr/bin ; \
++ echo "install -c pdfconcat "$(DESTDIR)"/usr/bin" ; \
++ mkdir -p "$(DESTDIR)"/usr/share/man/man1 ; \
++ install -c -m 644 pdfconcat.1 "$(DESTDIR)"/usr/share/man/man1 ; \
++ echo "install -c pdfconcat.1 "$(DESTDIR)"/usr/share/man/man1" ; fi
+ @if [ -x ppmtops ] ; then \
+- mkdir -p $(DESTDIR)/usr/bin ; \
+- install -c ppmtops $(DESTDIR)/usr/bin ; \
+- echo "install -c ppmtops $(DESTDIR)/usr/bin" ; fi
++ mkdir -p "$(DESTDIR)"/usr/bin ; \
++ install -c ppmtops "$(DESTDIR)"/usr/bin ; \
++ echo "install -c ppmtops "$(DESTDIR)"/usr/bin" ; fi
++
++install-pgf:
+ @if [ -x pgf2pnm ] ; then \
+- mkdir -p $(DESTDIR)/usr/bin ; \
+- install -c pgf2pnm $(DESTDIR)/usr/bin ; \
+- echo "install -c pgf2pnm $(DESTDIR)/usr/bin" ; fi
++ mkdir -p "$(DESTDIR)"/usr/bin ; \
++ install -c pgf2pnm "$(DESTDIR)"/usr/bin ; \
++ echo "install -c pgf2pnm "$(DESTDIR)"/usr/bin" ; fi
++
++ifneq ($(WITH_PGF),no)
++install: install-common install-pgf
++else
++install: install-common
++endif
+
+ clean:
+ rm -f core *~ *.o pdfconcat ppmtops pgf2pnm
+--
+1.8.3.2
+
diff --git a/media-gfx/xpaint/files/xpaint-2.9.9.4-parallel-make.patch b/media-gfx/xpaint/files/xpaint-2.9.9.4-parallel-make.patch
new file mode 100644
index 000000000000..250f634f9973
--- /dev/null
+++ b/media-gfx/xpaint/files/xpaint-2.9.9.4-parallel-make.patch
@@ -0,0 +1,25 @@
+From ae11f5cb975749bd8d6ffda48301eb4aadfee35d Mon Sep 17 00:00:00 2001
+From: hasufell <hasufell@gentoo.org>
+Date: Sun, 6 Oct 2013 21:02:12 +0200
+Subject: [PATCH] fix parallel make
+
+---
+ Makefile.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index b2285a0..4cf1753 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -112,7 +112,7 @@ XPaint.ad: app-defaults
+ XPaint.ad.h: substads XPaint.ad
+ ./substads -ad2c XPaint.ad $@
+
+-xpaint.1: xpaint.1.in version.h
++xpaint.1: substads xpaint.1.in version.h
+ ./substads -single xpaint.1.in xpaint.1 XPAINT_VERSION $(PACKAGE_VERSION)
+
+ install-exec-hook:
+--
+1.8.3.2
+
diff --git a/media-gfx/xpaint/files/xpaint-2.9.9.4-submake.patch b/media-gfx/xpaint/files/xpaint-2.9.9.4-submake.patch
new file mode 100644
index 000000000000..e218eb4c75e9
--- /dev/null
+++ b/media-gfx/xpaint/files/xpaint-2.9.9.4-submake.patch
@@ -0,0 +1,29 @@
+From 11b369b69c4637431b139960391bded531a9f652 Mon Sep 17 00:00:00 2001
+From: hasufell <hasufell@gentoo.org>
+Date: Sun, 6 Oct 2013 20:25:14 +0200
+Subject: [PATCH] don't run submake
+
+---
+ Makefile.am | 5 -----
+ 1 file changed, 5 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 5b2caec..b2285a0 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -139,11 +139,6 @@ install-exec-hook:
+ mkdir -p $(DESTDIR)$(SHAREDIR)/messages
+ cd share/messages ; $(RM) -f *~ ; cp -f Messages* $(DESTDIR)$(SHAREDIR)/messages
+ chmod -R a+r $(DESTDIR)$(SHAREDIR)/
+- cd util ; make ; make install DESTDIR=$(DESTDIR)$
+
+ clean-local:
+ rm -f xaw_incdir
+- cd util ; make clean
+-
+-distclean-local:
+- cd util ; make distclean
+\ No newline at end of file
+--
+1.8.3.2
+
diff --git a/media-gfx/xpaint/xpaint-2.9.10.2-r1.ebuild b/media-gfx/xpaint/xpaint-2.9.10.2-r1.ebuild
new file mode 100644
index 000000000000..4ca535290046
--- /dev/null
+++ b/media-gfx/xpaint/xpaint-2.9.10.2-r1.ebuild
@@ -0,0 +1,84 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit autotools eutils
+
+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="jpeg2k pgf tiff"
+
+RDEPEND="
+ media-libs/fontconfig
+ media-libs/freetype
+ media-libs/libpng:0
+ x11-libs/libICE
+ x11-libs/libX11
+ >=x11-libs/libXaw3dXft-1.6.2c
+ x11-libs/libXext
+ x11-libs/libXft
+ x11-libs/libXmu
+ x11-libs/libXpm
+ x11-libs/libXt
+ sys-libs/zlib
+ virtual/jpeg:0
+ jpeg2k? ( media-libs/openjpeg:0 )
+ pgf? ( media-libs/libpgf )
+ tiff? (
+ media-libs/jbigkit:0
+ media-libs/tiff:0
+ )"
+DEPEND="${RDEPEND}
+ sys-devel/flex
+ sys-devel/bison
+ virtual/pkgconfig"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-2.9.9.4-{QA1,submake,parallel-make}.patch \
+ "${FILESDIR}"/${PN}-2.9.10.2-{QA2,tiff}.patch
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_enable tiff) \
+ $(use_enable jpeg2k 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
+}
+
+pkg_postinst() {
+ elog "optional dependencies:"
+ elog " app-text/gv (external viewer for PostScript output)"
+ elog " media-gfx/imagemagick (external viewer for pixel graphics)"
+ elog " net-print/cups (printing)"
+}
diff --git a/media-gfx/xpaint/xpaint-2.9.10.3-r1.ebuild b/media-gfx/xpaint/xpaint-2.9.10.3-r1.ebuild
new file mode 100644
index 000000000000..00b7b44564af
--- /dev/null
+++ b/media-gfx/xpaint/xpaint-2.9.10.3-r1.ebuild
@@ -0,0 +1,85 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit autotools eutils
+
+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="jpeg2k pgf tiff"
+
+RDEPEND="
+ media-libs/fontconfig
+ media-libs/freetype
+ media-libs/libpng:0
+ x11-libs/libICE
+ x11-libs/libX11
+ >=x11-libs/libXaw3dXft-1.6.2c
+ x11-libs/libXext
+ x11-libs/libXft
+ x11-libs/libXmu
+ x11-libs/libXpm
+ x11-libs/libXt
+ sys-libs/zlib
+ virtual/jpeg:0
+ jpeg2k? ( media-libs/openjpeg:0 )
+ pgf? ( media-libs/libpgf )
+ tiff? (
+ media-libs/jbigkit:0
+ media-libs/tiff:0
+ )"
+DEPEND="${RDEPEND}
+ sys-devel/flex
+ sys-devel/bison
+ virtual/pkgconfig"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-2.9.9.4-{QA1,submake,parallel-make}.patch \
+ "${FILESDIR}"/${PN}-2.9.10.2-{QA2,tiff}.patch \
+ "${FILESDIR}"/${PN}-2.9.10.3-Fix-build-with-clang.patch
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_enable tiff) \
+ $(use_enable jpeg2k 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
+}
+
+pkg_postinst() {
+ elog "optional dependencies:"
+ elog " app-text/gv (external viewer for PostScript output)"
+ elog " media-gfx/imagemagick (external viewer for pixel graphics)"
+ elog " net-print/cups (printing)"
+}