Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-gfx/xpaint/files/, media-gfx/xpaint/
Date: Wed, 20 Oct 2021 01:51:35
Message-Id: 1634694365.345630239813968d48dc235350372a750005c071.sam@gentoo
1 commit: 345630239813968d48dc235350372a750005c071
2 Author: Viorel Munteanu <ceamac.paragon <AT> gmail <DOT> com>
3 AuthorDate: Sun Oct 10 07:15:53 2021 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Wed Oct 20 01:46:05 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=34563023
7
8 media-gfx/xpaint: add v3.1.4
9
10 Package-Manager: Portage-3.0.20, Repoman-3.0.3
11 Signed-off-by: Viorel Munteanu <ceamac.paragon <AT> gmail.com>
12 Closes: https://github.com/gentoo/gentoo/pull/22538
13 Signed-off-by: Sam James <sam <AT> gentoo.org>
14
15 media-gfx/xpaint/Manifest | 1 +
16 .../files/xpaint-3.1.4-gentoo-shared-lib.patch | 15 ++++
17 media-gfx/xpaint/xpaint-3.1.4.ebuild | 96 ++++++++++++++++++++++
18 3 files changed, 112 insertions(+)
19
20 diff --git a/media-gfx/xpaint/Manifest b/media-gfx/xpaint/Manifest
21 index 1b59012a7db..7ed4b083c4e 100644
22 --- a/media-gfx/xpaint/Manifest
23 +++ b/media-gfx/xpaint/Manifest
24 @@ -1 +1,2 @@
25 DIST xpaint-3.1.3.tar.bz2 1656489 BLAKE2B c6f5ed4a6c990dccacc572c834fabf68a16cacfde477915e5c3598a96335a899344d4375a48e6bf06fb601e9b260a11cc2b43afb404a83b9fb7b3044288ce1fa SHA512 8ef15d6af4b65d9da18d3e5eb9eacc0b42e718d069e20de91f2e0352b642d0a4b7626a2008fdd6217c0668ed1ecdc7a09c4a993a6074c77b7899b4613c1c4bda
26 +DIST xpaint-3.1.4.tar.bz2 1630009 BLAKE2B 6090156f0c27742487edfd24e803e814d7f2801c3847a5435a896e575ee3bf0b17f498e8ba8f4b7a87536780dd7c15ec7e0c0e0acb28b225d95ed0c835abfa97 SHA512 ea81f0f0eaad2072fe487efba933b6f0a4f2a4d8ae7548169b8e765cf1232c9944149a822173350af91309535d8f3625b8e58814811a5f4491fa3e2fcdf92e1d
27
28 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
29 new file mode 100644
30 index 00000000000..b05500ea6f7
31 --- /dev/null
32 +++ b/media-gfx/xpaint/files/xpaint-3.1.4-gentoo-shared-lib.patch
33 @@ -0,0 +1,15 @@
34 +xpaint was compiling and installing a shared library but it was not using it, linking with the static one instead
35 +This patch attempts to link with libxpaintrw.so instead
36 +So we can pass --disable-static to configure
37 +
38 +--- a/Makefile.am
39 ++++ b/Makefile.am
40 +@@ -79,7 +79,7 @@
41 +
42 + xpaint_SOURCES = $(BASE_HDRS) $(BASE_SRCS)
43 +
44 +-xpaint_LDADD = xpaintrw/.libs/libxpaintrw.a @X_LIBS@ @X_LIBS_EXTRA@
45 ++xpaint_LDADD = -Lxpaintrw/.libs -lxpaintrw @X_LIBS@ @X_LIBS_EXTRA@
46 +
47 + docs: INSTALL README TODO ChangeLog
48 + .PHONY:
49
50 diff --git a/media-gfx/xpaint/xpaint-3.1.4.ebuild b/media-gfx/xpaint/xpaint-3.1.4.ebuild
51 new file mode 100644
52 index 00000000000..64e86898d49
53 --- /dev/null
54 +++ b/media-gfx/xpaint/xpaint-3.1.4.ebuild
55 @@ -0,0 +1,96 @@
56 +# Copyright 1999-2021 Gentoo Authors
57 +# Distributed under the terms of the GNU General Public License v2
58 +
59 +EAPI=8
60 +
61 +inherit autotools desktop toolchain-funcs xdg-utils
62 +
63 +DESCRIPTION="Image editor with tiff, jpeg and png support"
64 +HOMEPAGE="http://sf-xpaint.sourceforge.net/"
65 +SRC_URI="mirror://sourceforge/sf-xpaint/${P}.tar.bz2"
66 +
67 +LICENSE="GPL-3"
68 +SLOT="0"
69 +KEYWORDS="~amd64 ~x86"
70 +IUSE="pgf tiff"
71 +# jpeg2k disabled for blocking media-libs/openjpeg:0 security cleanup, bug 735592
72 +
73 +RDEPEND="
74 + media-libs/fontconfig
75 + media-libs/libjpeg-turbo:=
76 + media-libs/libpng:0=
77 + media-libs/netpbm
78 + x11-libs/libX11
79 + >=x11-libs/libXaw3dXft-1.6.2h[unicode]
80 + x11-libs/libXext
81 + x11-libs/libXft
82 + x11-libs/libXmu
83 + x11-libs/libXpm
84 + x11-libs/libXt
85 + pgf? ( media-libs/libpgf )
86 + tiff? ( media-libs/tiff:0 )
87 +"
88 +DEPEND="${RDEPEND}"
89 +BDEPEND="
90 + sys-devel/bison
91 + sys-devel/flex
92 + virtual/pkgconfig
93 +"
94 +
95 +PATCHES=(
96 + "${FILESDIR}"/${PN}-3.1.3-libtool-clang.patch
97 + "${FILESDIR}"/${PN}-3.1.3-gentoo-qa.patch
98 + "${FILESDIR}"/${PN}-3.1.3-gentoo-prefix.patch
99 + "${FILESDIR}"/${P}-gentoo-shared-lib.patch
100 +)
101 +
102 +src_prepare() {
103 + default
104 + eautoreconf
105 +}
106 +
107 +src_configure() {
108 + econf \
109 + $(use_enable tiff) \
110 + --disable-libdvipgm \
111 + --disable-libopenjpeg
112 +}
113 +
114 +src_compile() {
115 + # clean up
116 + emake clean
117 + emake -C util clean
118 +
119 + # parallel make still fails sometimes
120 + emake substads
121 + emake xpaint.1
122 +
123 + default
124 + emake \
125 + WITH_PGF="$(usex pgf "yes" "no")" \
126 + CC="$(tc-getCC)" \
127 + CXX="$(tc-getCXX)" \
128 + includedir="${EPREFIX}"/usr/include \
129 + -C util
130 +}
131 +
132 +src_install() {
133 + default
134 + emake \
135 + WITH_PGF="$(usex pgf "yes" "no")" \
136 + DESTDIR="${ED}" \
137 + -C util install
138 + doicon icons/xpaint.svg
139 + make_desktop_entry "${PN}"
140 + find "${ED}" -name '*.la' -delete || die
141 +}
142 +
143 +pkg_postinst() {
144 + xdg_desktop_database_update
145 + xdg_icon_cache_update
146 +}
147 +
148 +pkg_postrm() {
149 + xdg_desktop_database_update
150 + xdg_icon_cache_update
151 +}