diff options
Diffstat (limited to 'media-gfx/xpaint')
-rw-r--r-- | media-gfx/xpaint/Manifest | 11 | ||||
-rw-r--r-- | media-gfx/xpaint/files/xpaint-2.10.2-libtool-clang.patch | 13 | ||||
-rw-r--r-- | media-gfx/xpaint/files/xpaint-2.10.2-respect-ldflags.patch | 18 | ||||
-rw-r--r-- | media-gfx/xpaint/files/xpaint-3.1.3-gentoo-prefix.patch | 103 | ||||
-rw-r--r-- | media-gfx/xpaint/files/xpaint-3.1.3-gentoo-qa.patch | 41 | ||||
-rw-r--r-- | media-gfx/xpaint/files/xpaint-3.1.3-libtool-clang.patch | 51 | ||||
-rw-r--r-- | media-gfx/xpaint/metadata.xml | 9 | ||||
-rw-r--r-- | media-gfx/xpaint/xpaint-2.10.2-r1.ebuild | 15 | ||||
-rw-r--r-- | media-gfx/xpaint/xpaint-3.1.3.ebuild | 102 |
9 files changed, 355 insertions, 8 deletions
diff --git a/media-gfx/xpaint/Manifest b/media-gfx/xpaint/Manifest index f869f5fb6d40..fb8671fddc59 100644 --- a/media-gfx/xpaint/Manifest +++ b/media-gfx/xpaint/Manifest @@ -1,3 +1,10 @@ +AUX xpaint-2.10.2-libtool-clang.patch 416 BLAKE2B 021018cc53dd726cc943cf316a69c3e9717f08e3f15de2c3acac0343a1ef1ee519d497cb8e497d432c4dfe9d68b06f67dade7c5992ba6fae318025759255aad5 SHA512 79eaa418eaab3253149d9ddfc7214af03a222ab406f85711600bba2d2b79f56c13c7c35abfeabba172b073896558a6445f5cfc26f97b8f501b2a0e08043c50b5 +AUX xpaint-2.10.2-respect-ldflags.patch 936 BLAKE2B d91ad744ec49ba4226255050a38bd6441f2087868e1f3f542c997736663a822f26c1f5ff4fdd8ae7b1c39581a3627bad28ec8743611f4366879b77397e0b5922 SHA512 9a2de804b7b940fd8a58bb1d0780cb05ad206560c224fbb007cf23f628a5ebeb37cc9cca39b1be4e33aaa5611bd7a7f5aab6267e07d2e11b667007d505f8debf +AUX xpaint-3.1.3-gentoo-prefix.patch 3605 BLAKE2B c513a72991ec83b99fc12d90c112c743a0fec456ae09ad77ecee887e67d2891efd200d8d08bad594472060515b56b02b9097951c5ad285ddfebd3d46acc4265a SHA512 d231237fa1512637c5448b1c8c7a1dcffa1383a0dd24f6606215643ce51932ef58e994bfbc3f24d3376acdd9cc06d713d453c643d4d00e9d00af0e011e55762d +AUX xpaint-3.1.3-gentoo-qa.patch 1480 BLAKE2B 43b80854e8d0bb68566f86116444507852bf61807846ec97238a90fefc8a86f9be3978858c12af3278b787b14f805edb628327ae411b8b6fbdcd7530ee72cbd5 SHA512 cfa7057625f3086b573f9109a89f29e1cf17c15d253a0c903bd0f315e4aac3d8111df899ef98d0a3416486d81305f0a041f061985d31d435ccbd24b0fc5a57b3 +AUX xpaint-3.1.3-libtool-clang.patch 1434 BLAKE2B d89978f8c925a64fa62ff2a0788ed81ca5faee6a71afda069930a7381e2bb095bbad3c1236c3594532afc5441ef789bf6ea0571b4bb25065e2cbef7fdc52ebe3 SHA512 f4027619c4eda686953fc33c62518a7ef12db09e6160f5e038179aa06f64629d2ad28b373ec332fe3266fd7e15af77577b6a60cfdffb165afe1358519201c399 DIST xpaint-2.10.2.tar.bz2 1891925 BLAKE2B 056ef057357a2441c8a286adf326a98650e5e0905ee07c5ef24b0689dbb57247711c44b63211494e4ca9e44429d6237c017f53e2690f99790fa6100e4ce4d118 SHA512 a25aa940931c686e86cbc2bd8d6fd3c80d2c793a20d7a2dd90fb5cba1cd360b5e1c8433bf0d639e2b86cb2a74040be373f732c4617909aaf8c5ada2624ab5614 -EBUILD xpaint-2.10.2-r1.ebuild 1562 BLAKE2B 3bdd005d1615418f4eca8947d5d42beef5c4b9a195c8366918599be1a8bb731bca66c43389602bc014e9dfc5f0cdee7bc5837190309ad5eb997acb968ebf48ce SHA512 5d07821b01cc4a49cf5b3ff05520b109bfccde7fcf2cca64c6ca7bdd39df1b5784d6d4a7609af01d662f951da96957a14a23cbd8685d5d9faf1e8530ec142cd6 -MISC metadata.xml 1204 BLAKE2B 3cd1cf2062126075b6b4be1b987ab9098ae31b611abe6e81c15e684e62ed0a1133177c4718e5bc51d5be2a0b5b2b58fb4d4a2d67ea77f21ca6d9009f2a4d4150 SHA512 e2b37b1d3381dd97ecdd40f20535426539d7caff8032ffcb5e6b74d65968adb7319523a55e45d31a697a75b9aa384e0a5155059237730ea080cf46532da12c22 +DIST xpaint-3.1.3.tar.bz2 1656489 BLAKE2B c6f5ed4a6c990dccacc572c834fabf68a16cacfde477915e5c3598a96335a899344d4375a48e6bf06fb601e9b260a11cc2b43afb404a83b9fb7b3044288ce1fa SHA512 8ef15d6af4b65d9da18d3e5eb9eacc0b42e718d069e20de91f2e0352b642d0a4b7626a2008fdd6217c0668ed1ecdc7a09c4a993a6074c77b7899b4613c1c4bda +EBUILD xpaint-2.10.2-r1.ebuild 1627 BLAKE2B bcc7cc7bf254149c0a86633644700b4b2c109913f9c5c1587bff6d83a4a16db876975910b8e61c55a6fe6b79790eb709ddbb13aea7fa61da9e5b1ace2608aacd SHA512 869b6bcf1cf93fa0a64663bdaf38cb18aa0258005767bfc2087440f2acc9b506e824526d1684fb151a6220bc30d33cf545188aed0b52e40217078e952d7cd716 +EBUILD xpaint-3.1.3.ebuild 1897 BLAKE2B bcb42a0d09a8bbca4579966ab89e9abb101140e54944600fe7f6fa7e718fce557a13b3a212179fe880e8357a83e1c9ce08a600d391296fe67e139581f252ae3f SHA512 150c481b08f0348d9055dd9063648483b843616b69d2debef5cd4347fe1569708768c43791fa2243e9e9c5ae11aecbe958010983e1a1bdf6a005268dceb9ab31 +MISC metadata.xml 1439 BLAKE2B ca0b1f7ca10f9329bd535358cd6d683bdcbb793277a3c494c50b86d6e5a85691f2ebaefcdac49b5fa5dd610ebca07d30c16f9045db0cbb079dde142fadca4dae SHA512 74c75e26fa1ba697c15dee5c76048c99e104fff2492194ef71ebbe472c15790a5ca2a28f1ee2697b8c0dea1ff7b2e36947e52b03a9d885a338687353d6c555d3 diff --git a/media-gfx/xpaint/files/xpaint-2.10.2-libtool-clang.patch b/media-gfx/xpaint/files/xpaint-2.10.2-libtool-clang.patch new file mode 100644 index 000000000000..d6a3dab07830 --- /dev/null +++ b/media-gfx/xpaint/files/xpaint-2.10.2-libtool-clang.patch @@ -0,0 +1,13 @@ +libtool doesn't work if compiling with clang. Need to add --tag=CC +See bug https://bugs.gentoo.org/731010 +--- a/xpaintrw/Makefile.am ++++ b/xpaintrw/Makefile.am +@@ -25,7 +25,7 @@ + + xpaint_DEFINES = $(ARCH_DEFINES) $(EXTRA_DEFINES) $(XAWLIB_DEFINES) + +-LIBTOOL = /usr/bin/libtool ++LIBTOOL = /usr/bin/libtool --tag=CC + AM_CFLAGS = @X_CFLAGS@ @SPECIAL_CFLAGS@ $(xpaint_DEFINES) + AM_YFLAGS = -d + CLEANFILES = diff --git a/media-gfx/xpaint/files/xpaint-2.10.2-respect-ldflags.patch b/media-gfx/xpaint/files/xpaint-2.10.2-respect-ldflags.patch new file mode 100644 index 000000000000..11a0b0e9a84e --- /dev/null +++ b/media-gfx/xpaint/files/xpaint-2.10.2-respect-ldflags.patch @@ -0,0 +1,18 @@ +The original Makefile did not pass CFLAGS and LDFLAGS +See bug https://bugs.gentoo.org/727632 +Also remove -O3 and stripping, leave portage control that +--- 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 -Wstrict-prototypes -Wtraditional -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 -Wstrict-prototypes -Wtraditional -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/files/xpaint-3.1.3-gentoo-prefix.patch b/media-gfx/xpaint/files/xpaint-3.1.3-gentoo-prefix.patch new file mode 100644 index 000000000000..cf02a14725fa --- /dev/null +++ b/media-gfx/xpaint/files/xpaint-3.1.3-gentoo-prefix.patch @@ -0,0 +1,103 @@ +This patch fixes compiling xpaint inside a gentoo prefix. +There are multiple issues: + search paths hardcoded to /usr/include, + install paths outside prefix, + X resources in app-defaults with path hardcoded to /usr/share/xpaint +--- a/Makefile.am ++++ b/Makefile.am +@@ -3,7 +3,7 @@ + ## Local Configuration arguments + BINDIR = $(prefix)/bin + SHAREDIR = $(prefix)/share/xpaint +-XAPPLOADDIR = /etc/X11/app-defaults ++XAPPLOADDIR = $(sysconfdir)/X11/app-defaults + + ## Enable/disable PRINTCAP (for older BSD style printing configuration) + ## PRINTCAP = -DPRINTCAP +@@ -85,7 +85,7 @@ + .PHONY: + + version.h: +- rm -f xaw_incdir ; ln -s /usr/include/X11/Xaw3dxft xaw_incdir ++ rm -f xaw_incdir ; ln -s @includedir@/X11/Xaw3dxft xaw_incdir + echo "#define XPAINT_VERSION \"$(PACKAGE_VERSION)\"" > version.h + + substads: substads.c +@@ -149,8 +149,7 @@ + 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 install +- cd vxp2ps ; make install ++ cd vxp2ps ; make BINDIR=$(BINDIR) install + + clean-local: + rm -f xaw_incdir +--- a/util/Makefile ++++ b/util/Makefile +@@ -17,9 +17,9 @@ + + ifneq ($(WITH_PGF),no) + pgf2pnm: main.cpp pnm.cpp +- @if [ -x /usr/include/libpgf ] ; then \ +- $(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 ; \ ++ @if [ -x $(includedir)/libpgf ] ; then \ ++ $(CXX) $(CXXFLAGS) -fpermissive -c main.cpp -o main.o -I$(includedir)/libpgf ; \ ++ $(CXX) $(CXXFLAGS) -fpermissive -c pnm.cpp -o pnm.o -I$(includedir)/libpgf ; \ + $(CXX) $(CXXFLAGS) -fpermissive -o pgf2pnm main.o pnm.o $(LDFLAGS) -lpgf ; \ + else \ + echo "libpgf not installed !!" ; \ +--- a/configure.ac ++++ b/configure.ac +@@ -32,7 +32,7 @@ + AC_TYPE_UINT32_T + AC_TYPE_UINT64_T + +-CFLAGS="$CFLAGS -I/usr/include -I/usr/include/X11 -I/usr/include/X11/Xaw3dxft" ++CFLAGS="$CFLAGS -I${prefix}/include -I${prefix}/include/X11 -I${prefix}/include/X11/Xaw3dxft" + LIBS="$LIBS -lm" + echo "VERSION = $VERSION" > .version + +@@ -40,7 +40,7 @@ + AC_CHECK_LIB([X11], [XOpenDisplay], have_x11="yes") + if test x"$have_x11" = xyes; then + AC_SUBST([X_LIBS], ["-lXmu -lXt -lSM -lICE -lXext -lX11 -lXpm -ldl -rdynamic"]) +- AC_SUBST([X_CFLAGS], ["-I/usr/include/X11"]) ++ AC_SUBST([X_CFLAGS], ["-I${prefix}/include/X11"]) + else + echo "X11 libraries not installed !" + exit 1 +@@ -291,7 +291,7 @@ + fi + + if test x$enable_libopenjp2 = xyes; then +- CFLAGS="$CFLAGS -I/usr/include/openjpeg-2.3" ++ CFLAGS="$CFLAGS -I${prefix}/include/openjpeg-2.3" + LIBS="$LIBS -lopenjp2" + AC_SUBST(LIBOPENJP2_LIBS) + AC_DEFINE(HAVE_OPENJP2) +@@ -323,9 +323,9 @@ + [AC_LANG_PROGRAM([[#include <freetype2/config/ftheader.h>]])], + [AC_MSG_RESULT([already in path])], + [AC_PREPROC_IFELSE( +- [AC_LANG_PROGRAM([[#include </usr/include/freetype2/freetype/config/ftheader.h>]])], +- [AC_MSG_RESULT([/usr/include/freetype2]) +- AC_SUBST([SPECIAL_CFLAGS], ["-I/usr/include/freetype2"])], ++ [AC_LANG_PROGRAM([[#include <${prefix}/include/freetype2/freetype/config/ftheader.h>]])], ++ [AC_MSG_RESULT([${prefix}/include/freetype2]) ++ AC_SUBST([SPECIAL_CFLAGS], ["-I${prefix}/include/freetype2"])], + [AC_MSG_ERROR([cannot find freetype2 headers; try setting CFLAGS.])] + )] + ) +--- a/xpaintrw/Makefile.am ++++ b/xpaintrw/Makefile.am +@@ -13,7 +13,7 @@ + ARCH_DEFINES = -fPIC + + ## PBM_DEFINES = -DNETPBM10 +-PBM_DEFINES = -I/usr/include/netpbm -DNETPBM11 ++PBM_DEFINES = -I@includedir@/netpbm -DNETPBM11 + + ## + ## Specific xpaint options diff --git a/media-gfx/xpaint/files/xpaint-3.1.3-gentoo-qa.patch b/media-gfx/xpaint/files/xpaint-3.1.3-gentoo-qa.patch new file mode 100644 index 000000000000..cc7d70de6f3e --- /dev/null +++ b/media-gfx/xpaint/files/xpaint-3.1.3-gentoo-qa.patch @@ -0,0 +1,41 @@ +The original Makefile did not pass CFLAGS and LDFLAGS +See bug https://bugs.gentoo.org/727632 +Also remove -O3 and stripping +--- 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)$(BINDIR)" + + 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/files/xpaint-3.1.3-libtool-clang.patch b/media-gfx/xpaint/files/xpaint-3.1.3-libtool-clang.patch new file mode 100644 index 000000000000..9aef70c8a9a1 --- /dev/null +++ b/media-gfx/xpaint/files/xpaint-3.1.3-libtool-clang.patch @@ -0,0 +1,51 @@ +libtool doesn't work if compiling with clang. Need to add --tag=CC +Don't hardcode /usr/bin/libtool in gentoo prefix +See bug https://bugs.gentoo.org/731010 + +rdlibtool needs to find system libtool in current directory +See bug https://bugs.gentoo.org/778791 +--- a/configure.ac ++++ b/configure.ac +@@ -17,6 +17,10 @@ + AC_LANG_C + AM_PROG_AR + ++dnl libtool ++LT_INIT ++AC_SUBST([LIBTOOL_DEPS]) ++ + ## basic types + + AC_TYPE_INT8_T +--- a/xpaintrw/Makefile.am ++++ b/xpaintrw/Makefile.am +@@ -28,7 +28,8 @@ + + xpaint_DEFINES = $(ARCH_DEFINES) $(EXTRA_DEFINES) $(XAWLIB_DEFINES) + +-LIBTOOL = /usr/bin/libtool ++LIBTOOL = ../libtool ++AM_LIBTOOLFLAGS = --tag=CC + AM_CFLAGS = @X_CFLAGS@ @SPECIAL_CFLAGS@ $(xpaint_DEFINES) + AM_YFLAGS = -d + CLEANFILES = +--- a/Makefile.am ++++ b/Makefile.am +@@ -53,12 +53,16 @@ + dist_man_MANS = xpaint.1 imgmerge.1 + AM_CFLAGS = @X_CFLAGS@ @SPECIAL_CFLAGS@ $(xpaint_DEFINES) + ACLOCAL_AMFLAGS = -I m4 +-BUILT_SOURCES = version.h DefaultRC.txt.h messages.h XPaint.ad.h xpaint.1 ++BUILT_SOURCES = version.h DefaultRC.txt.h messages.h XPaint.ad.h xpaint.1 libtool + AM_YFLAGS = -d + CLEANFILES = preproc substads \ + version.h DefaultRC.txt.h messages.h XPaint.ad.h xpaint.1 + EXTRA_DIST = + ++LIBTOOL_DEPS = @LIBTOOL_DEPS@ ++libtool: ++ $(SHELL) ./config.status libtool ++ + BASE_HDRS = bitmap.h color.h crc32.h \ + Colormap.h ColormapP.h graphic.h hash.h image.h \ + menu.h messages.h misc.h operation.h ops.h \ diff --git a/media-gfx/xpaint/metadata.xml b/media-gfx/xpaint/metadata.xml index 8165ff483f18..74876f64cd4e 100644 --- a/media-gfx/xpaint/metadata.xml +++ b/media-gfx/xpaint/metadata.xml @@ -1,7 +1,14 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> - <!-- maintainer-needed --> + <maintainer type="person" proxied="yes"> + <email>ceamac.paragon@gmail.com</email> + <name>Viorel Munteanu</name> + </maintainer> + <maintainer type="project" proxied="proxy"> + <email>proxy-maint@gentoo.org</email> + <name>Proxy Maintainers</name> + </maintainer> <longdescription lang="en"> XPaint is an X Window System color image bitmap editing program. It also supports advanced features, such as image processing diff --git a/media-gfx/xpaint/xpaint-2.10.2-r1.ebuild b/media-gfx/xpaint/xpaint-2.10.2-r1.ebuild index dc92f046b92f..425586764ea2 100644 --- a/media-gfx/xpaint/xpaint-2.10.2-r1.ebuild +++ b/media-gfx/xpaint/xpaint-2.10.2-r1.ebuild @@ -3,7 +3,7 @@ EAPI=7 -inherit desktop toolchain-funcs +inherit autotools desktop toolchain-funcs DESCRIPTION="Image editor with tiff, jpeg and png support" HOMEPAGE="http://sf-xpaint.sourceforge.net/" @@ -18,6 +18,7 @@ IUSE="pgf tiff" RDEPEND=" media-libs/fontconfig media-libs/freetype:2 + media-libs/libjpeg-turbo:= media-libs/libpng:0= x11-libs/libICE x11-libs/libX11 @@ -28,7 +29,6 @@ RDEPEND=" x11-libs/libXpm x11-libs/libXt sys-libs/zlib - media-libs/libjpeg-turbo:= pgf? ( media-libs/libpgf ) tiff? ( media-libs/jbigkit:0= @@ -39,12 +39,18 @@ DEPEND="${RDEPEND}" BDEPEND=" sys-devel/bison sys-devel/flex + sys-devel/libtool virtual/pkgconfig " +PATCHES=( + "${FILESDIR}"/${P}-libtool-clang.patch + "${FILESDIR}"/${P}-respect-ldflags.patch +) + src_prepare() { default - sed -i -e 's/-O3 -s//g' util/Makefile || die + eautoreconf } src_configure() { @@ -78,6 +84,5 @@ src_install() { -C util install doicon icons/xpaint.svg make_desktop_entry "${PN}" - find "${D}" -name '*.la' -type f -delete || die - find "${D}" -name '*.a' -type f -delete || die + find "${ED}" \( -name '*.la' -o -name '*.a' \) -type f -delete || die } 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 000000000000..6c62608de446 --- /dev/null +++ b/media-gfx/xpaint/xpaint-3.1.3.ebuild @@ -0,0 +1,102 @@ +# 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 + virtual/pkgconfig +" + +PATCHES=( + "${FILESDIR}"/${P}-libtool-clang.patch + "${FILESDIR}"/${P}-gentoo-qa.patch + "${FILESDIR}"/${P}-gentoo-prefix.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 + + # regenerate resources in app-defaults + rm XPaint.ad || die + + 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' -o -name '*.a' \) -type f -delete || die +} + +pkg_postinst() { + xdg_desktop_database_update +} + +pkg_postrm() { + xdg_desktop_database_update +} |