1 |
commit: 9dafd4f5e7373393f09024ec05693c6844694882 |
2 |
Author: Gilles Dartiguelongue <eva <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Jan 29 07:39:17 2018 +0000 |
4 |
Commit: Gilles Dartiguelongue <eva <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Jan 29 07:45:37 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/gnome.git/commit/?id=9dafd4f5 |
7 |
|
8 |
gnome-base/librsvg: experimental rust based ebuild |
9 |
|
10 |
While build goes just fine, lots of unit tests are broken and there is |
11 |
no multilib support for now. |
12 |
|
13 |
Requires rust >=1.20 for bundled rust packages. |
14 |
|
15 |
.../files/librsvg-2.40.12-gtk-optional.patch | 58 ++++++++++++ |
16 |
.../files/librsvg-2.40.2-vala-out-of-source.patch | 28 ++++++ |
17 |
gnome-base/librsvg/librsvg-2.42.1.ebuild | 101 +++++++++++++++++++++ |
18 |
gnome-base/librsvg/metadata.xml | 11 +++ |
19 |
profiles/package.mask | 4 + |
20 |
5 files changed, 202 insertions(+) |
21 |
|
22 |
diff --git a/gnome-base/librsvg/files/librsvg-2.40.12-gtk-optional.patch b/gnome-base/librsvg/files/librsvg-2.40.12-gtk-optional.patch |
23 |
new file mode 100644 |
24 |
index 00000000..b7c5b852 |
25 |
--- /dev/null |
26 |
+++ b/gnome-base/librsvg/files/librsvg-2.40.12-gtk-optional.patch |
27 |
@@ -0,0 +1,58 @@ |
28 |
+From 18917f7fd3160afe06019f4b6234aeb78a3fdb4e Mon Sep 17 00:00:00 2001 |
29 |
+From: Ross Burton <ross.burton@×××××.com> |
30 |
+Date: Tue, 19 Nov 2013 16:00:29 +0000 |
31 |
+Subject: [PATCH] configure: add option to enable/disable use of GTK+ |
32 |
+ |
33 |
+Distro packagers like predictability and automatically detected optional |
34 |
+dependencies are not predicable. Add a --with-gtk3 option (default to "auto") |
35 |
+for forcibly controlling whether GTK+ will be used or not. |
36 |
+ |
37 |
+Signed-off-by: Ross Burton <ross.burton@×××××.com> |
38 |
+ |
39 |
+https://bugzilla.gnome.org/show_bug.cgi?id=712693 |
40 |
+--- |
41 |
+ configure.in | 17 +++++++++++------ |
42 |
+ 1 file changed, 11 insertions(+), 6 deletions(-) |
43 |
+ |
44 |
+diff --git a/configure.in b/configure.in |
45 |
+index f7a89dc..1498f72 100644 |
46 |
+--- a/configure.ac |
47 |
++++ b/configure.ac |
48 |
+@@ -119,17 +119,22 @@ AC_CHECK_FUNCS(strtok_r) |
49 |
+ # GTK |
50 |
+ # =========================================================================== |
51 |
+ |
52 |
+-PKG_CHECK_MODULES([GTK3],[gtk+-3.0 >= $GTK3_REQUIRED],[have_gtk_3=yes],[have_gtk_3=no]) |
53 |
+- |
54 |
+ GTK3_BINARY_VERSION= |
55 |
+ |
56 |
+-if test "$have_gtk_3" = "yes"; then |
57 |
+- GTK3_BINARY_VERSION="`$PKG_CONFIG --variable=gtk_binary_version gtk+-3.0`" |
58 |
++AC_MSG_CHECKING([whether to use GTK+ 3]) |
59 |
++AC_ARG_WITH([gtk3], |
60 |
++ [AS_HELP_STRING([--without-gtk3],[Don't build GTK+3 tools (default=auto)])], |
61 |
++ [],[PKG_CHECK_EXISTS([gtk+-3.0 >= $GTK3_REQUIRED],[with_gtk3=yes],[with_gtk3=no])]) |
62 |
++AC_MSG_RESULT([$with_gtk3]) |
63 |
++ |
64 |
++if test "$with_gtk3" = "yes"; then |
65 |
++ PKG_CHECK_MODULES(GTK3, [gtk+-3.0 >= $GTK3_REQUIRED]) |
66 |
++ GTK3_BINARY_VERSION="`$PKG_CONFIG --variable=gtk_binary_version gtk+-3.0`" |
67 |
+ fi |
68 |
+ |
69 |
+ AC_SUBST([GTK3_BINARY_VERSION]) |
70 |
+ |
71 |
+-AM_CONDITIONAL([HAVE_GTK_3],[test "$have_gtk_3" = "yes"]) |
72 |
++AM_CONDITIONAL([HAVE_GTK_3],[test "$with_gtk3" = "yes"]) |
73 |
+ |
74 |
+ dnl =========================================================================== |
75 |
+ dnl GDK-Pixbuf SVG loader |
76 |
+@@ -305,6 +310,6 @@ librsvg-$VERSION |
77 |
+ Build introspectable bindings: ${found_introspection} |
78 |
+ Build Vala bindings: ${enable_vala} |
79 |
+ Build GdkPixbuf loader: ${enable_pixbuf_loader} |
80 |
+- GTK+ $GTK3_REQUIRED or later: ${have_gtk_3} |
81 |
++ GTK 3.0: ${with_gtk3} |
82 |
+ Build miscellaneous tools: ${build_misc_tools} |
83 |
+ " |
84 |
+-- |
85 |
+1.7.10.4 |
86 |
\ No newline at end of file |
87 |
|
88 |
diff --git a/gnome-base/librsvg/files/librsvg-2.40.2-vala-out-of-source.patch b/gnome-base/librsvg/files/librsvg-2.40.2-vala-out-of-source.patch |
89 |
new file mode 100644 |
90 |
index 00000000..bda09057 |
91 |
--- /dev/null |
92 |
+++ b/gnome-base/librsvg/files/librsvg-2.40.2-vala-out-of-source.patch |
93 |
@@ -0,0 +1,28 @@ |
94 |
+From bf4da5524d50e1068f851bcbe50c8f8ae1948d73 Mon Sep 17 00:00:00 2001 |
95 |
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@g.o> |
96 |
+Date: Wed, 18 Jun 2014 09:44:51 +0200 |
97 |
+Subject: [PATCH] build: Fix building .vapi out-of-source. |
98 |
+ |
99 |
+Rsvg-2.0-custom.vala file resides in $(srcdir), and therefore full path |
100 |
+needs to be given to vapigen. Otherwise, the build fails when build is |
101 |
+performed out-of-source. |
102 |
+--- |
103 |
+ Makefile.am | 2 +- |
104 |
+ 1 file changed, 1 insertion(+), 1 deletion(-) |
105 |
+ |
106 |
+diff --git a/Makefile.am b/Makefile.am |
107 |
+index e881100..dc6b0c9 100644 |
108 |
+--- a/Makefile.am |
109 |
++++ b/Makefile.am |
110 |
+@@ -257,7 +257,7 @@ VAPIGEN_VAPIS = librsvg-$(RSVG_API_VERSION).vapi |
111 |
+ |
112 |
+ librsvg_@RSVG_API_VERSION_U@_vapi_DEPS = gio-2.0 cairo |
113 |
+ librsvg_@RSVG_API_VERSION_U@_vapi_METADATADIRS = $(srcdir) |
114 |
+-librsvg_@RSVG_API_VERSION_U@_vapi_FILES = Rsvg-$(RSVG_API_VERSION).gir Rsvg-$(RSVG_API_VERSION)-custom.vala |
115 |
++librsvg_@RSVG_API_VERSION_U@_vapi_FILES = Rsvg-$(RSVG_API_VERSION).gir $(srcdir)/Rsvg-$(RSVG_API_VERSION)-custom.vala |
116 |
+ |
117 |
+ vapidir = $(datadir)/vala/vapi |
118 |
+ vapi_DATA = $(VAPIGEN_VAPIS) |
119 |
+-- |
120 |
+2.0.0 |
121 |
+ |
122 |
|
123 |
diff --git a/gnome-base/librsvg/librsvg-2.42.1.ebuild b/gnome-base/librsvg/librsvg-2.42.1.ebuild |
124 |
new file mode 100644 |
125 |
index 00000000..43fd2555 |
126 |
--- /dev/null |
127 |
+++ b/gnome-base/librsvg/librsvg-2.42.1.ebuild |
128 |
@@ -0,0 +1,101 @@ |
129 |
+# Copyright 1999-2017 Gentoo Foundation |
130 |
+# Distributed under the terms of the GNU General Public License v2 |
131 |
+ |
132 |
+EAPI=6 |
133 |
+GNOME2_LA_PUNT="yes" |
134 |
+GNOME2_EAUTORECONF="yes" |
135 |
+VALA_USE_DEPEND="vapigen" |
136 |
+ |
137 |
+inherit gnome2 multilib-minimal vala |
138 |
+ |
139 |
+DESCRIPTION="Scalable Vector Graphics (SVG) rendering library" |
140 |
+HOMEPAGE="https://wiki.gnome.org/Projects/LibRsvg" |
141 |
+ |
142 |
+LICENSE="LGPL-2" |
143 |
+SLOT="2" |
144 |
+KEYWORDS="~amd64 ~arm64 ~sparc ~x86" |
145 |
+ |
146 |
+IUSE="debug +introspection tools vala" |
147 |
+REQUIRED_USE="vala? ( introspection )" |
148 |
+ |
149 |
+RDEPEND=" |
150 |
+ >=dev-libs/glib-2.52.3:2[${MULTILIB_USEDEP}] |
151 |
+ >=x11-libs/cairo-1.12.14-r4[${MULTILIB_USEDEP}] |
152 |
+ >=x11-libs/pango-1.38.0[${MULTILIB_USEDEP}] |
153 |
+ >=dev-libs/libxml2-2.9.1-r4:2[${MULTILIB_USEDEP}] |
154 |
+ >=dev-libs/libcroco-0.6.8-r1[${MULTILIB_USEDEP}] |
155 |
+ >=x11-libs/gdk-pixbuf-2.30.7:2[introspection?,${MULTILIB_USEDEP}] |
156 |
+ introspection? ( >=dev-libs/gobject-introspection-0.10.8:= ) |
157 |
+ tools? ( >=x11-libs/gtk+-3.10.0:3 ) |
158 |
+" |
159 |
+DEPEND="${RDEPEND} |
160 |
+ dev-libs/gobject-introspection-common |
161 |
+ dev-libs/vala-common |
162 |
+ dev-util/cargo |
163 |
+ >=virtual/rust-1.20 |
164 |
+ >=dev-util/gtk-doc-am-1.13 |
165 |
+ >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] |
166 |
+ vala? ( $(vala_depend) ) |
167 |
+" |
168 |
+# >=gtk-doc-am-1.13, gobject-introspection-common, vala-common needed by eautoreconf |
169 |
+ |
170 |
+PATCHES=( |
171 |
+ # https://bugzilla.gnome.org/show_bug.cgi?id=653323 |
172 |
+ "${FILESDIR}"/${PN}-2.40.12-gtk-optional.patch |
173 |
+ |
174 |
+ # https://bugzilla.gnome.org/show_bug.cgi?id=731826 |
175 |
+ "${FILESDIR}"/${PN}-2.40.2-vala-out-of-source.patch |
176 |
+) |
177 |
+ |
178 |
+src_prepare() { |
179 |
+ use vala && vala_src_prepare |
180 |
+ gnome2_src_prepare |
181 |
+} |
182 |
+ |
183 |
+multilib_src_configure() { |
184 |
+ local myconf=() |
185 |
+ |
186 |
+ # -Bsymbolic is not supported by the Darwin toolchain |
187 |
+ if [[ ${CHOST} == *-darwin* ]]; then |
188 |
+ myconf+=( --disable-Bsymbolic ) |
189 |
+ fi |
190 |
+ |
191 |
+ # --disable-tools even when USE=tools; the tools/ subdirectory is useful |
192 |
+ # only for librsvg developers |
193 |
+ ECONF_SOURCE=${S} \ |
194 |
+ gnome2_src_configure \ |
195 |
+ --disable-static \ |
196 |
+ --disable-tools \ |
197 |
+ $(use_enable debug) \ |
198 |
+ $(multilib_native_use_enable introspection) \ |
199 |
+ $(multilib_native_use_with tools gtk3) \ |
200 |
+ $(multilib_native_use_enable vala) \ |
201 |
+ --enable-pixbuf-loader \ |
202 |
+ "${myconf[@]}" |
203 |
+ |
204 |
+ if multilib_is_native_abi; then |
205 |
+ ln -s "${S}"/doc/html doc/html || die |
206 |
+ fi |
207 |
+} |
208 |
+ |
209 |
+multilib_src_compile() { |
210 |
+ # causes segfault if set, see bug #411765 |
211 |
+ unset __GL_NO_DSO_FINALIZER |
212 |
+ gnome2_src_compile |
213 |
+} |
214 |
+ |
215 |
+multilib_src_install() { |
216 |
+ gnome2_src_install |
217 |
+} |
218 |
+ |
219 |
+pkg_postinst() { |
220 |
+ # causes segfault if set, see bug 375615 |
221 |
+ unset __GL_NO_DSO_FINALIZER |
222 |
+ multilib_foreach_abi gnome2_pkg_postinst |
223 |
+} |
224 |
+ |
225 |
+pkg_postrm() { |
226 |
+ # causes segfault if set, see bug 375615 |
227 |
+ unset __GL_NO_DSO_FINALIZER |
228 |
+ multilib_foreach_abi gnome2_pkg_postrm |
229 |
+} |
230 |
|
231 |
diff --git a/gnome-base/librsvg/metadata.xml b/gnome-base/librsvg/metadata.xml |
232 |
new file mode 100644 |
233 |
index 00000000..fb664414 |
234 |
--- /dev/null |
235 |
+++ b/gnome-base/librsvg/metadata.xml |
236 |
@@ -0,0 +1,11 @@ |
237 |
+<?xml version="1.0" encoding="UTF-8"?> |
238 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
239 |
+<pkgmetadata> |
240 |
+<maintainer type="project"> |
241 |
+ <email>gnome@g.o</email> |
242 |
+ <name>Gentoo GNOME Desktop</name> |
243 |
+</maintainer> |
244 |
+<use> |
245 |
+ <flag name="tools">Build svg viewer tool</flag> |
246 |
+</use> |
247 |
+</pkgmetadata> |
248 |
|
249 |
diff --git a/profiles/package.mask b/profiles/package.mask |
250 |
index 5247ae13..390424ef 100644 |
251 |
--- a/profiles/package.mask |
252 |
+++ b/profiles/package.mask |
253 |
@@ -10,3 +10,7 @@ |
254 |
# Sobhan Mohammadpour <sobhan@g.o> (21 Dec 2017) |
255 |
# Depends on masked dev-lang/spidermonkey:52 |
256 |
=dev-libs/gjs-1.50.2 |
257 |
+ |
258 |
+# Gilles Dartiguelongue <eva@g.o> (29 Jan 2018) |
259 |
+# Lots of unittests broken, no multilib support |
260 |
+>=gnome-base/librsvg-2.41 |