Gentoo Archives: gentoo-commits

From: Patrick McLean <chutzpah@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-gfx/inkscape/files/, media-gfx/inkscape/
Date: Wed, 29 Jun 2016 20:29:36
Message-Id: 1467232158.533bd6dac8e8c9fcec94bfad564ea6fb893b7db8.chutzpah@gentoo
1 commit: 533bd6dac8e8c9fcec94bfad564ea6fb893b7db8
2 Author: Patrick McLean <chutzpah <AT> gentoo <DOT> org>
3 AuthorDate: Wed Jun 29 20:28:47 2016 +0000
4 Commit: Patrick McLean <chutzpah <AT> gentoo <DOT> org>
5 CommitDate: Wed Jun 29 20:29:18 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=533bd6da
7
8 media-gfx/inkscape: Revision bump, port to EAPI=6, add patch to fix compilation with glibmm-2.48 (bug #587098)
9
10 Package-Manager: portage-2.3.0
11
12 .../files/inkscape-0.91-fix-gtkmm-2.48.patch | 63 ++++++++
13 media-gfx/inkscape/inkscape-0.91-r3.ebuild | 177 +++++++++++++++++++++
14 2 files changed, 240 insertions(+)
15
16 diff --git a/media-gfx/inkscape/files/inkscape-0.91-fix-gtkmm-2.48.patch b/media-gfx/inkscape/files/inkscape-0.91-fix-gtkmm-2.48.patch
17 new file mode 100644
18 index 0000000..f9c0660
19 --- /dev/null
20 +++ b/media-gfx/inkscape/files/inkscape-0.91-fix-gtkmm-2.48.patch
21 @@ -0,0 +1,63 @@
22 +--- a/src/ui/clipboard.cpp 2016-04-02 15:15:43 +0000
23 ++++ b/src/ui/clipboard.cpp 2016-04-07 16:30:32 +0000
24 +@@ -146,8 +146,6 @@
25 + void _setClipboardColor(guint32);
26 + void _userWarn(SPDesktop *, char const *);
27 +
28 +- void _inkscape_wait_for_targets(std::list<Glib::ustring> &);
29 +-
30 + // private properites
31 + SPDocument *_clipboardSPDoc; ///< Document that stores the clipboard until someone requests it
32 + Inkscape::XML::Node *_defs; ///< Reference to the clipboard document's defs node
33 +@@ -1302,9 +1300,7 @@
34 + */
35 + Glib::ustring ClipboardManagerImpl::_getBestTarget()
36 + {
37 +- // GTKmm's wait_for_targets() is broken, see the comment in _inkscape_wait_for_targets()
38 +- std::list<Glib::ustring> targets; // = _clipboard->wait_for_targets();
39 +- _inkscape_wait_for_targets(targets);
40 ++ std::list<Glib::ustring> targets = _clipboard->wait_for_targets();
41 +
42 + // clipboard target debugging snippet
43 + /*
44 +@@ -1456,39 +1452,6 @@
45 + desktop->messageStack()->flash(Inkscape::WARNING_MESSAGE, msg);
46 + }
47 +
48 +-
49 +-// GTKMM's clipboard::wait_for_targets is buggy and might return bogus, see
50 +-//
51 +-// https://bugs.launchpad.net/inkscape/+bug/296778
52 +-// http://mail.gnome.org/archives/gtk-devel-list/2009-June/msg00062.html
53 +-//
54 +-// for details. Until this has been fixed upstream we will use our own implementation
55 +-// of this method, as copied from /gtkmm-2.16.0/gtk/gtkmm/clipboard.cc.
56 +-void ClipboardManagerImpl::_inkscape_wait_for_targets(std::list<Glib::ustring> &listTargets)
57 +-{
58 +- //Get a newly-allocated array of atoms:
59 +- GdkAtom* targets = NULL;
60 +- gint n_targets = 0;
61 +- gboolean test = gtk_clipboard_wait_for_targets( gtk_clipboard_get(GDK_SELECTION_CLIPBOARD), &targets, &n_targets );
62 +- if (!test || (targets == NULL)) {
63 +- return;
64 +- }
65 +-
66 +- //Add the targets to the C++ container:
67 +- for (int i = 0; i < n_targets; i++)
68 +- {
69 +- //Convert the atom to a string:
70 +- gchar* const atom_name = gdk_atom_name(targets[i]);
71 +-
72 +- Glib::ustring target;
73 +- if (atom_name) {
74 +- target = Glib::ScopedPtr<char>(atom_name).get(); //This frees the gchar*.
75 +- }
76 +-
77 +- listTargets.push_back(target);
78 +- }
79 +-}
80 +-
81 + /* #######################################
82 + ClipboardManager class
83 + ####################################### */
84 +
85
86 diff --git a/media-gfx/inkscape/inkscape-0.91-r3.ebuild b/media-gfx/inkscape/inkscape-0.91-r3.ebuild
87 new file mode 100644
88 index 0000000..e66b5ee
89 --- /dev/null
90 +++ b/media-gfx/inkscape/inkscape-0.91-r3.ebuild
91 @@ -0,0 +1,177 @@
92 +# Copyright 1999-2016 Gentoo Foundation
93 +# Distributed under the terms of the GNU General Public License v2
94 +# $Id$
95 +
96 +EAPI=6
97 +PYTHON_COMPAT=( python2_7 )
98 +PYTHON_REQ_USE="xml"
99 +
100 +inherit autotools eutils flag-o-matic gnome2-utils fdo-mime toolchain-funcs python-single-r1
101 +
102 +MY_P=${P/_/}
103 +
104 +DESCRIPTION="A SVG based generic vector-drawing program"
105 +HOMEPAGE="http://www.inkscape.org/"
106 +SRC_URI="https://inkscape.global.ssl.fastly.net/media/resources/file/${P}.tar.bz2"
107 +
108 +LICENSE="GPL-2 LGPL-2.1"
109 +SLOT="0"
110 +KEYWORDS="~amd64 ~hppa ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~sparc-solaris ~x86-solaris"
111 +IUSE="cdr dia dbus exif gnome imagemagick openmp postscript inkjar jpeg latex"
112 +IUSE+=" lcms nls spell static-libs visio wpg"
113 +
114 +REQUIRED_USE="${PYTHON_REQUIRED_USE}"
115 +
116 +WPG_DEPS="
117 + || (
118 + ( app-text/libwpg:0.3 dev-libs/librevenge )
119 + ( app-text/libwpd:0.9 app-text/libwpg:0.2 )
120 + )
121 +"
122 +COMMON_DEPEND="
123 + ${PYTHON_DEPS}
124 + >=app-text/poppler-0.26.0:=[cairo]
125 + >=dev-cpp/glibmm-2.48
126 + >=dev-cpp/gtkmm-2.18.0:2.4
127 + >=dev-cpp/cairomm-1.9.8
128 + >=dev-libs/boehm-gc-6.4
129 + >=dev-libs/glib-2.28
130 + >=dev-libs/libsigc++-2.0.12
131 + >=dev-libs/libxml2-2.6.20
132 + >=dev-libs/libxslt-1.0.15
133 + dev-libs/popt
134 + dev-python/lxml[${PYTHON_USEDEP}]
135 + media-libs/fontconfig
136 + media-libs/freetype:2
137 + media-libs/libpng:0
138 + sci-libs/gsl:=
139 + x11-libs/libX11
140 + >=x11-libs/gtk+-2.10.7:2
141 + >=x11-libs/pango-1.24
142 + cdr? (
143 + media-libs/libcdr
144 + ${WPG_DEPS}
145 + )
146 + dbus? ( dev-libs/dbus-glib )
147 + exif? ( media-libs/libexif )
148 + gnome? ( >=gnome-base/gnome-vfs-2.0 )
149 + imagemagick? ( media-gfx/imagemagick:=[cxx] )
150 + jpeg? ( virtual/jpeg:0 )
151 + lcms? ( media-libs/lcms:2 )
152 + spell? (
153 + app-text/aspell
154 + app-text/gtkspell:2
155 + )
156 + visio? (
157 + media-libs/libvisio
158 + ${WPG_DEPS}
159 + )
160 + wpg? ( ${WPG_DEPS} )
161 +"
162 +
163 +# These only use executables provided by these packages
164 +# See share/extensions for more details. inkscape can tell you to
165 +# install these so we could of course just not depend on those and rely
166 +# on that.
167 +RDEPEND="${COMMON_DEPEND}
168 + dev-python/numpy[${PYTHON_USEDEP}]
169 + media-gfx/uniconvertor
170 + dia? ( app-office/dia )
171 + latex? (
172 + media-gfx/pstoedit[plotutils]
173 + app-text/dvipsk
174 + app-text/texlive
175 + )
176 + postscript? ( app-text/ghostscript-gpl )
177 +"
178 +
179 +DEPEND="${COMMON_DEPEND}
180 + >=dev-libs/boost-1.36
181 + >=dev-util/intltool-0.40
182 + >=sys-devel/gettext-0.17
183 + virtual/pkgconfig
184 +"
185 +
186 +PATCHES=(
187 + "${FILESDIR}/${PN}-0.91_pre3-automagic.patch"
188 + "${FILESDIR}/${PN}-0.91_pre3-cppflags.patch"
189 + "${FILESDIR}/${PN}-0.91_pre3-desktop.patch"
190 + "${FILESDIR}/${PN}-0.91_pre3-exif.patch"
191 + "${FILESDIR}/${PN}-0.91_pre3-sk-man.patch"
192 + "${FILESDIR}/${PN}-0.48.4-epython.patch"
193 + "${FILESDIR}/${PN}-0.91-fix-gtkmm-2.48.patch"
194 +)
195 +
196 +S=${WORKDIR}/${MY_P}
197 +
198 +RESTRICT="test"
199 +
200 +pkg_pretend() {
201 + if use openmp; then
202 + tc-has-openmp || die "Please switch to an openmp compatible compiler"
203 + fi
204 +}
205 +
206 +src_prepare() {
207 + default
208 +
209 + sed -i "s#@EPYTHON@#${EPYTHON}#" \
210 + src/extension/implementation/script.cpp || die
211 +
212 + eautoreconf
213 +
214 + # bug 421111
215 + python_fix_shebang share/extensions
216 +}
217 +
218 +src_configure() {
219 + # aliasing unsafe wrt #310393
220 + append-flags -fno-strict-aliasing
221 + # enable c++11 as needed for sigc++-2.6, #566318
222 + # remove it when upstream solves the issue
223 + # https://bugs.launchpad.net/inkscape/+bug/1488079
224 + append-cxxflags -std=c++11
225 +
226 + econf \
227 + $(use_enable static-libs static) \
228 + $(use_enable nls) \
229 + $(use_enable openmp) \
230 + $(use_enable exif) \
231 + $(use_enable jpeg) \
232 + $(use_enable lcms) \
233 + --enable-poppler-cairo \
234 + $(use_enable wpg) \
235 + $(use_enable visio) \
236 + $(use_enable cdr) \
237 + $(use_enable dbus dbusapi) \
238 + $(use_enable imagemagick magick) \
239 + $(use_with gnome gnome-vfs) \
240 + $(use_with inkjar) \
241 + $(use_with spell gtkspell) \
242 + $(use_with spell aspell)
243 +}
244 +
245 +src_compile() {
246 + emake AR="$(tc-getAR)"
247 +}
248 +
249 +src_install() {
250 + default
251 +
252 + prune_libtool_files
253 + python_optimize "${ED}"/usr/share/${PN}/extensions
254 +}
255 +
256 +pkg_preinst() {
257 + gnome2_icon_savelist
258 +}
259 +
260 +pkg_postinst() {
261 + gnome2_icon_cache_update
262 + fdo-mime_desktop_database_update
263 +}
264 +
265 +pkg_postrm() {
266 + gnome2_icon_cache_update
267 + fdo-mime_desktop_database_update
268 +}