Gentoo Archives: gentoo-commits

From: Andrew Ammerlaan <andrewammerlaan@××××××.net>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/proj/guru:master commit in: media-gfx/glimpse/, media-gfx/glimpse/files/
Date: Mon, 31 Aug 2020 09:48:48
Message-Id: 1598835770.466d7126d0872892574eadd3c6f6e96d6f91ea02.andrewammerlaan@gentoo
1 commit: 466d7126d0872892574eadd3c6f6e96d6f91ea02
2 Author: Ronny (tastytea) Gutbrod <gentoo <AT> tastytea <DOT> de>
3 AuthorDate: Sun Aug 30 23:50:50 2020 +0000
4 Commit: Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net>
5 CommitDate: Mon Aug 31 01:02:50 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=466d7126
7
8 media-gfx/glimpse: New package.
9
10 Signed-off-by: Ronny (tastytea) Gutbrod <gentoo <AT> tastytea.de>
11
12 media-gfx/glimpse/Manifest | 1 +
13 .../files/glimpse-0.2_fix_test-appdata.patch | 15 ++
14 media-gfx/glimpse/glimpse-0.2.0.ebuild | 207 +++++++++++++++++++++
15 media-gfx/glimpse/metadata.xml | 20 ++
16 4 files changed, 243 insertions(+)
17
18 diff --git a/media-gfx/glimpse/Manifest b/media-gfx/glimpse/Manifest
19 new file mode 100644
20 index 0000000..a4589c8
21 --- /dev/null
22 +++ b/media-gfx/glimpse/Manifest
23 @@ -0,0 +1 @@
24 +DIST glimpse-0.2.0.tar.gz 42734079 BLAKE2B 3531bc2a125c54f3ca3e3b3bd60366065393f633b1a537a32b5bec80b151f8ebdfbd815fc9b3e476e2af42fb5f854a48c5714a08640ccd259f46b94d79c084f1 SHA512 6fccb418b8c233fb870b6bced728366e4fe935da0400f340fca14befc261b338d1a9d077c3f77358cb1df824df601f11aff473f1ce8e8086f3884f0ab93a795f
25
26 diff --git a/media-gfx/glimpse/files/glimpse-0.2_fix_test-appdata.patch b/media-gfx/glimpse/files/glimpse-0.2_fix_test-appdata.patch
27 new file mode 100644
28 index 0000000..25bf0b4
29 --- /dev/null
30 +++ b/media-gfx/glimpse/files/glimpse-0.2_fix_test-appdata.patch
31 @@ -0,0 +1,15 @@
32 +diff --git a/desktop/test-appdata.sh.in b/desktop/test-appdata.sh.in
33 +index 25be96b1c8..fb674360d9 100755
34 +--- a/desktop/test-appdata.sh.in
35 ++++ b/desktop/test-appdata.sh.in
36 +@@ -2,7 +2,7 @@
37 +
38 + # TODO: use validate-strict when the last errors for a strict validation
39 + # are fixed.
40 +-appstream-util validate-relax ${GIMP_TESTING_ABS_TOP_BUILDDIR}/desktop/org.glimpse_editor.Glimpse.appdata.xml && \
41 +-appstream-util validate-relax ${GIMP_TESTING_ABS_TOP_BUILDDIR}/desktop/glimpse-data-extras.metainfo.xml && \
42 ++appstream-util validate-relax --nonet ${GIMP_TESTING_ABS_TOP_BUILDDIR}/desktop/org.glimpse_editor.Glimpse.appdata.xml && \
43 ++appstream-util validate-relax --nonet ${GIMP_TESTING_ABS_TOP_BUILDDIR}/desktop/glimpse-data-extras.metainfo.xml && \
44 + if [ $(expr @GIMP_MICRO_VERSION@ % 2) = 0 ]; then
45 + grep TODO ${GIMP_TESTING_ABS_TOP_BUILDDIR}/desktop/org.glimpse_editor.Glimpse.appdata.xml
46 + if [ $? = 0 ]; then
47
48 diff --git a/media-gfx/glimpse/glimpse-0.2.0.ebuild b/media-gfx/glimpse/glimpse-0.2.0.ebuild
49 new file mode 100644
50 index 0000000..4fa67cc
51 --- /dev/null
52 +++ b/media-gfx/glimpse/glimpse-0.2.0.ebuild
53 @@ -0,0 +1,207 @@
54 +# Copyright 1999-2020 Gentoo Authors
55 +# Distributed under the terms of the GNU General Public License v2
56 +
57 +# Based on media-gfx/gimp-2.10.18-r2.ebuild
58 +
59 +EAPI=6 # gnome2.eclass doesn't work with EAPI 7.
60 +GNOME2_EAUTORECONF=yes
61 +WANT_AUTOMAKE=
62 +
63 +inherit autotools gnome2 virtualx
64 +
65 +DESCRIPTION="Image editor based on the GNU Image Manipulation Program"
66 +HOMEPAGE="https://glimpse-editor.org/"
67 +SRC_URI="https://github.com/glimpse-editor/Glimpse/archive/v${PV}.tar.gz -> ${P}.tar.gz"
68 +
69 +LICENSE="GPL-3+ LGPL-3+"
70 +SLOT="0"
71 +KEYWORDS="~amd64"
72 +
73 +IUSE="aalib alsa aqua debug doc gnome heif jpeg2k mng openexr postscript test udev unwind vector-icons webp wmf xpm cpu_flags_ppc_altivec cpu_flags_x86_mmx cpu_flags_x86_sse"
74 +
75 +RESTRICT="!test? ( test )"
76 +
77 +S="${WORKDIR}/Glimpse-${PV}"
78 +
79 +COMMON_DEPEND="
80 + >=app-text/poppler-0.50[cairo]
81 + >=app-text/poppler-data-0.4.7
82 + >=dev-libs/atk-2.2.0
83 + >=dev-libs/glib-2.56.0:2
84 + >=dev-libs/json-glib-1.2.6
85 + dev-libs/libxml2:2
86 + dev-libs/libxslt
87 + >=gnome-base/librsvg-2.40.6:2
88 + >=media-gfx/mypaint-brushes-1.3.1:=
89 + >=media-libs/babl-0.1.78
90 + >=media-libs/fontconfig-2.12.4
91 + >=media-libs/freetype-2.1.7
92 + >=media-libs/gegl-0.4.22:0.4[cairo]
93 + >=media-libs/gexiv2-0.10.6
94 + >=media-libs/harfbuzz-0.9.19
95 + >=media-libs/lcms-2.8:2
96 + >=media-libs/libmypaint-1.5.1:=
97 + >=media-libs/libpng-1.6.25:0=
98 + >=media-libs/tiff-3.5.7:0
99 + net-libs/glib-networking[ssl]
100 + sys-libs/zlib
101 + virtual/jpeg
102 + >=x11-libs/cairo-1.12.2
103 + >=x11-libs/gdk-pixbuf-2.31:2
104 + >=x11-libs/gtk+-2.24.32:2
105 + x11-libs/libXcursor
106 + >=x11-libs/pango-1.29.4
107 + aalib? ( media-libs/aalib )
108 + alsa? ( >=media-libs/alsa-lib-1.0.0 )
109 + aqua? ( >=x11-libs/gtk-mac-integration-2.0.0 )
110 + heif? ( >=media-libs/libheif-1.3.2:= )
111 + jpeg2k? ( >=media-libs/openjpeg-2.1.0:2= )
112 + mng? ( media-libs/libmng:= )
113 + openexr? ( >=media-libs/openexr-1.6.1:= )
114 + postscript? ( app-text/ghostscript-gpl )
115 + udev? ( dev-libs/libgudev:= )
116 + unwind? ( >=sys-libs/libunwind-1.1.0:= )
117 + webp? ( >=media-libs/libwebp-0.6.0:= )
118 + wmf? ( >=media-libs/libwmf-0.2.8 )
119 + xpm? ( x11-libs/libXpm )
120 +"
121 +
122 +RDEPEND="
123 + !media-gfx/gimp
124 + ${COMMON_DEPEND}
125 + x11-themes/hicolor-icon-theme
126 + gnome? ( gnome-base/gvfs )
127 +"
128 +
129 +DEPEND="
130 + ${COMMON_DEPEND}
131 + >=dev-lang/perl-5.10.0
132 + dev-libs/appstream-glib
133 + dev-util/gtk-update-icon-cache
134 + >=dev-util/intltool-0.40.1
135 + sys-apps/findutils
136 + >=sys-devel/gettext-0.19
137 + >=sys-devel/libtool-2.2
138 + virtual/pkgconfig
139 + doc? ( dev-util/gtk-doc )
140 + test? ( x11-base/xorg-server[xvfb] )
141 +"
142 +
143 +# TODO: Add BDEPEND after switch to EAPI 7.
144 +
145 +DOCS=( "AUTHORS" "HACKING.md" "NEWS" "README.md" )
146 +
147 +# Bug 685210 (and duplicate bug #691070)
148 +PATCHES=(
149 + "${FILESDIR}/${PN}-0.2_fix_test-appdata.patch"
150 +)
151 +
152 +src_prepare() {
153 + if has_version "media-gfx/mypaint-brushes:2.0" ; then
154 + sed -i -e 's/mypaint-brushes-1.0/mypaint-brushes-2.0/' configure.ac \
155 + || die # bug #737794
156 + fi
157 +
158 + # Disable system CFLAGS suppressing on SSE{2,4.1} support tests by addition
159 + # of {SSE2,SSE4_1}_EXTRA_CFLAGS: bug #702554
160 + sed -i -e 's:\$intrinsics_save_CFLAGS \$SSE2_EXTRA_CFLAGS:\$SSE2_EXTRA_CFLAGS \$intrinsics_save_CFLAGS:' \
161 + -e 's:\$intrinsics_save_CFLAGS \$SSE4_1_EXTRA_CFLAGS:\$SSE4_1_EXTRA_CFLAGS \$intrinsics_save_CFLAGS:' configure.ac || die
162 +
163 + sed -i -e 's/== "xquartz"/= "xquartz"/' configure.ac || die # bug #494864
164 + sed 's:-DGIMP_DISABLE_DEPRECATED:-DGIMP_protect_DISABLE_DEPRECATED:g' \
165 + -i configure.ac || die # bug #615144
166 +
167 + # Would normally be generated by autogen.sh.
168 + ! use doc && (echo "EXTRA_DIST = missing-gtk-doc" > gtk-doc.make || die)
169 + gnome2_src_prepare # calls eautoreconf
170 +
171 + sed 's:-DGIMP_protect_DISABLE_DEPRECATED:-DGIMP_DISABLE_DEPRECATED:g' \
172 + -i configure || die # bug #615144
173 + fgrep -q GIMP_DISABLE_DEPRECATED configure || die # bug #615144, self-test
174 +}
175 +
176 +_adjust_sandbox() {
177 + # Bug #569738 and bug #591214
178 + local nv
179 + for nv in /dev/nvidia-uvm /dev/nvidiactl /dev/nvidia{0..9} ; do
180 + # We do not check for existence as they may show up later
181 + # https://bugs.gentoo.org/show_bug.cgi?id=569738#c21
182 + addwrite "${nv}"
183 + done
184 +
185 + addwrite /dev/dri/ # bug #574038 and bug #684886
186 + addwrite /dev/ati/ # bug #589198
187 + addwrite /proc/mtrr # bug #589198
188 +}
189 +
190 +src_configure() {
191 + _adjust_sandbox
192 +
193 + local myconf=(
194 + GEGL="${EPREFIX}"/usr/bin/gegl-0.4
195 +
196 + --enable-default-binary
197 +
198 + --disable-check-update
199 + --enable-mp
200 + --with-appdata-test
201 + --with-bug-report-url=https://bugs.gentoo.org/
202 + --with-xmc
203 + --without-libbacktrace
204 + --without-webkit
205 + --without-xvfb-run
206 + --disable-python
207 + $(use_enable cpu_flags_ppc_altivec altivec)
208 + $(use_enable cpu_flags_x86_mmx mmx)
209 + $(use_enable cpu_flags_x86_sse sse)
210 + $(use_enable vector-icons)
211 + $(use_with aalib aa)
212 + $(use_with alsa)
213 + $(use_with !aqua x)
214 + $(use_with heif libheif)
215 + $(use_with jpeg2k jpeg2000)
216 + $(use_with mng libmng)
217 + $(use_with openexr)
218 + $(use_with postscript gs)
219 + $(use_with udev gudev)
220 + $(use_with unwind libunwind)
221 + $(use_with webp)
222 + $(use_with wmf)
223 + $(use_with xpm libxpm)
224 + )
225 +
226 + gnome2_src_configure "${myconf[@]}"
227 +}
228 +
229 +src_compile() {
230 + export XDG_DATA_DIRS="${EPREFIX}"/usr/share # bug 587004
231 + gnome2_src_compile
232 +}
233 +
234 +src_test() {
235 + virtx emake check
236 +}
237 +
238 +src_install() {
239 + gnome2_src_install
240 +
241 + # Workaround for bug #321111 to give Glimpse the least
242 + # precedence on PDF documents by default
243 + mv "${ED%/}"/usr/share/applications/{,zzz-}org.glimpse_editor.Glimpse.desktop || die
244 +
245 + find "${D}" -name '*.la' -type f -delete || die
246 +
247 + # Prevent dead symlink gimp-console.1 from downstream man page compression
248 + # (bug #433527)
249 + local gimp_app_version=$(grep '\[gimp_app_version' configure.ac \
250 + | sed -E 's/.*\[([2-9]\.[0-9]+)\].*/\1/')
251 + mv "${ED%/}"/usr/share/man/man1/gimp-console{-${gimp_app_version},}.1 || die
252 +}
253 +
254 +pkg_postinst() {
255 + gnome2_pkg_postinst
256 +}
257 +
258 +pkg_postrm() {
259 + gnome2_pkg_postrm
260 +}
261
262 diff --git a/media-gfx/glimpse/metadata.xml b/media-gfx/glimpse/metadata.xml
263 new file mode 100644
264 index 0000000..ee7030a
265 --- /dev/null
266 +++ b/media-gfx/glimpse/metadata.xml
267 @@ -0,0 +1,20 @@
268 +<?xml version="1.0" encoding="UTF-8"?>
269 +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
270 +<pkgmetadata>
271 + <maintainer type="person">
272 + <email>gentoo@××××××××.de</email>
273 + <name>Ronny (tastytea) Gutbrod</name>
274 + </maintainer>
275 + <upstream>
276 + <bugs-to>https://github.com/glimpse-editor/Glimpse/issues</bugs-to>
277 + <remote-id type="github">glimpse-editor/Glimpse</remote-id>
278 + </upstream>
279 + <use>
280 + <flag name="heif">
281 + Enable support for ISO/IEC 23008-12:2017 HEIF files
282 + </flag>
283 + <flag name="vector-icons">
284 + Enable support for vector icons (experimental)
285 + </flag>
286 + </use>
287 +</pkgmetadata>