summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--media-gfx/xpaint/Manifest1
-rw-r--r--media-gfx/xpaint/files/xpaint-3.1.4-gentoo-shared-lib.patch15
-rw-r--r--media-gfx/xpaint/xpaint-3.1.4.ebuild96
3 files changed, 112 insertions, 0 deletions
diff --git a/media-gfx/xpaint/Manifest b/media-gfx/xpaint/Manifest
index 1b59012a7db5..7ed4b083c4e6 100644
--- a/media-gfx/xpaint/Manifest
+++ b/media-gfx/xpaint/Manifest
@@ -1 +1,2 @@
DIST xpaint-3.1.3.tar.bz2 1656489 BLAKE2B c6f5ed4a6c990dccacc572c834fabf68a16cacfde477915e5c3598a96335a899344d4375a48e6bf06fb601e9b260a11cc2b43afb404a83b9fb7b3044288ce1fa SHA512 8ef15d6af4b65d9da18d3e5eb9eacc0b42e718d069e20de91f2e0352b642d0a4b7626a2008fdd6217c0668ed1ecdc7a09c4a993a6074c77b7899b4613c1c4bda
+DIST xpaint-3.1.4.tar.bz2 1630009 BLAKE2B 6090156f0c27742487edfd24e803e814d7f2801c3847a5435a896e575ee3bf0b17f498e8ba8f4b7a87536780dd7c15ec7e0c0e0acb28b225d95ed0c835abfa97 SHA512 ea81f0f0eaad2072fe487efba933b6f0a4f2a4d8ae7548169b8e765cf1232c9944149a822173350af91309535d8f3625b8e58814811a5f4491fa3e2fcdf92e1d
diff --git a/media-gfx/xpaint/files/xpaint-3.1.4-gentoo-shared-lib.patch b/media-gfx/xpaint/files/xpaint-3.1.4-gentoo-shared-lib.patch
new file mode 100644
index 000000000000..b05500ea6f75
--- /dev/null
+++ b/media-gfx/xpaint/files/xpaint-3.1.4-gentoo-shared-lib.patch
@@ -0,0 +1,15 @@
+xpaint was compiling and installing a shared library but it was not using it, linking with the static one instead
+This patch attempts to link with libxpaintrw.so instead
+So we can pass --disable-static to configure
+
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -79,7 +79,7 @@
+
+ xpaint_SOURCES = $(BASE_HDRS) $(BASE_SRCS)
+
+-xpaint_LDADD = xpaintrw/.libs/libxpaintrw.a @X_LIBS@ @X_LIBS_EXTRA@
++xpaint_LDADD = -Lxpaintrw/.libs -lxpaintrw @X_LIBS@ @X_LIBS_EXTRA@
+
+ docs: INSTALL README TODO ChangeLog
+ .PHONY:
diff --git a/media-gfx/xpaint/xpaint-3.1.4.ebuild b/media-gfx/xpaint/xpaint-3.1.4.ebuild
new file mode 100644
index 000000000000..64e86898d496
--- /dev/null
+++ b/media-gfx/xpaint/xpaint-3.1.4.ebuild
@@ -0,0 +1,96 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+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/libjpeg-turbo:=
+ media-libs/libpng:0=
+ 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:0 )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ sys-devel/bison
+ sys-devel/flex
+ 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
+)
+
+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
+}
+
+pkg_postinst() {
+ xdg_desktop_database_update
+ xdg_icon_cache_update
+}
+
+pkg_postrm() {
+ xdg_desktop_database_update
+ xdg_icon_cache_update
+}