Gentoo Archives: gentoo-commits

From: Matt Turner <mattst88@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/anjuta/, dev-util/anjuta/files/
Date: Sun, 03 Apr 2022 04:33:42
Message-Id: 1648960004.7db644f137ae072d45063aec1471731439b841af.mattst88@gentoo
1 commit: 7db644f137ae072d45063aec1471731439b841af
2 Author: Matt Turner <mattst88 <AT> gentoo <DOT> org>
3 AuthorDate: Sun Apr 3 02:16:29 2022 +0000
4 Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org>
5 CommitDate: Sun Apr 3 04:26:44 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7db644f1
7
8 dev-util/anjuta: EAPI 8
9
10 - drop stable keywords
11 - Add new vala support
12 - Fix autoconf-2.70 support (bug #817017)
13
14 Closes: https://bugs.gentoo.org/817017
15 Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>
16
17 ...njuta-3.34.0.ebuild => anjuta-3.34.0-r1.ebuild} | 30 ++---
18 .../anjuta/files/3.34.0-Add-new-vala-support.patch | 132 +++++++++++++++++++++
19 dev-util/anjuta/files/3.34.0-autoconf-2.70.patch | 15 +++
20 .../anjuta/files/3.34.0-prefer-newer-vala.patch | 15 +++
21 4 files changed, 177 insertions(+), 15 deletions(-)
22
23 diff --git a/dev-util/anjuta/anjuta-3.34.0.ebuild b/dev-util/anjuta/anjuta-3.34.0-r1.ebuild
24 similarity index 79%
25 rename from dev-util/anjuta/anjuta-3.34.0.ebuild
26 rename to dev-util/anjuta/anjuta-3.34.0-r1.ebuild
27 index 865d18e33fbe..43ee21d824b3 100644
28 --- a/dev-util/anjuta/anjuta-3.34.0.ebuild
29 +++ b/dev-util/anjuta/anjuta-3.34.0-r1.ebuild
30 @@ -1,23 +1,22 @@
31 -# Copyright 1999-2021 Gentoo Authors
32 +# Copyright 1999-2022 Gentoo Authors
33 # Distributed under the terms of the GNU General Public License v2
34
35 -EAPI=6
36 -GNOME2_LA_PUNT="yes"
37 -PYTHON_COMPAT=( python3_{8..9} )
38 +EAPI=8
39 +PYTHON_COMPAT=( python3_{8..10} )
40 # libanjuta-language-vala.so links to a specific slot of libvala; we want to
41 # avoid automagic behavior.
42 -VALA_MIN_API_VERSION="0.46" # 3.34.0 upstream release supports up to 0.44, but 0.46 vala LTS support was added without any other adjustments post-release; 0.48 will need patches
43 +VALA_MIN_API_VERSION="0.56"
44 VALA_MAX_API_VERSION="${VALA_MIN_API_VERSION}"
45
46 -# We inherit autotools explicitly because GNOME2_EAUTORECONF is set only conditionally later, so gnome2.eclass doesn't do it for us
47 -inherit autotools gnome2 flag-o-matic readme.gentoo-r1 python-single-r1 vala
48 +GNOME2_EAUTORECONF="yes"
49 +inherit gnome2 flag-o-matic readme.gentoo-r1 python-single-r1 vala
50
51 DESCRIPTION="A versatile IDE for GNOME"
52 -HOMEPAGE="https://wiki.gnome.org/Apps/Anjuta"
53 +HOMEPAGE="https://wiki.gnome.org/Apps/Anjuta https://gitlab.gnome.org/GNOME/anjuta/"
54
55 LICENSE="GPL-2+"
56 SLOT="0"
57 -KEYWORDS="amd64 ~ppc ~sparc x86"
58 +KEYWORDS="~amd64 ~ppc ~sparc ~x86"
59
60 IUSE="debug devhelp glade +introspection subversion terminal test vala"
61 RESTRICT="!test? ( test )"
62 @@ -72,7 +71,6 @@ DEPEND="${COMMON_DEPEND}
63 sys-devel/flex
64 >=sys-devel/gettext-0.17
65 virtual/pkgconfig
66 - !!dev-libs/gnome-build
67 test? (
68 app-text/docbook-xml-dtd:4.1.2
69 app-text/docbook-xml-dtd:4.5 )
70 @@ -82,6 +80,12 @@ DEPEND="${COMMON_DEPEND}
71 "
72 # yelp-tools, gi-common and gnome-common are required by eautoreconf
73
74 +PATCHES=(
75 + "${FILESDIR}"/${PV}-Add-new-vala-support.patch
76 + "${FILESDIR}"/${PV}-autoconf-2.70.patch
77 + "${FILESDIR}"/${PV}-prefer-newer-vala.patch
78 +)
79 +
80 pkg_setup() {
81 python-single-r1_pkg_setup
82 }
83 @@ -95,10 +99,6 @@ will need to:
84 1. Go to 'Build' -> 'Configure project'
85 2. Add 'VALAC=/usr/bin/valac-X.XX' (respecting quotes) to
86 'Configure options'."
87 -
88 - # Without removing other vala versions, it ends up picking the oldest vala available, not newest
89 - sed -i -e "s/\[0.44\], \[0.42\], \[0.40\], \[0.38\], \[0.36\], \[0.34\], \[0.32\], \[0.30\], \[0.28\], \[0.26\], \[0.24\], \[0.22\], \[0.20\], \[0.18\]/[${VALA_MAX_API_VERSION}]/" configure.ac || die
90 - GNOME2_EAUTORECONF="yes"
91 fi
92
93 # COPYING is used in Anjuta's help/about entry
94 @@ -111,7 +111,7 @@ will need to:
95 sed -e '/SUBDIRS =/ s/benchmark//' \
96 -i plugins/symbol-db/Makefile.{am,in} || die
97
98 - use vala && vala_src_prepare
99 + use vala && vala_setup
100 gnome2_src_prepare
101 }
102
103
104 diff --git a/dev-util/anjuta/files/3.34.0-Add-new-vala-support.patch b/dev-util/anjuta/files/3.34.0-Add-new-vala-support.patch
105 new file mode 100644
106 index 000000000000..219a0308121b
107 --- /dev/null
108 +++ b/dev-util/anjuta/files/3.34.0-Add-new-vala-support.patch
109 @@ -0,0 +1,132 @@
110 +This is a combination of 7 upstream commits:
111 +
112 +build: Allow building with vala 0.46 and drop support for 0.30 and earlier
113 +language-support-vala: Support for vala 0.48 API
114 +build: Allow building with vala 0.48
115 +build: Allow building with vala 0.50
116 +build: Allow building with vala 0.50 and 0.52
117 +build: Allow building with vala 0.54
118 +build: Allow building with vala 0.56
119 +---
120 + configure.ac | 4 +--
121 + plugins/language-support-vala/plugin.vala | 37 ++++++++++++++++++-----
122 + 2 files changed, 31 insertions(+), 10 deletions(-)
123 +
124 +diff --git a/configure.ac b/configure.ac
125 +index 3b4c99504..4fbad5392 100644
126 +--- a/configure.ac
127 ++++ b/configure.ac
128 +@@ -338,7 +338,7 @@ if test "$user_disabled_vala" = 1; then
129 + else
130 + AC_MSG_RESULT(no)
131 + AC_MSG_CHECKING(if libvala is available)
132 +- m4_foreach([VERSION], [[0.44], [0.42], [0.40], [0.38], [0.36], [0.34], [0.32], [0.30], [0.28], [0.26], [0.24], [0.22], [0.20], [0.18]],
133 ++ m4_foreach_w([VERSION], [0.56 0.54 0.52 0.50 0.48 0.46 0.44 0.42 0.40 0.38 0.36 0.34 0.32],
134 + [PKG_CHECK_EXISTS([ libvala-VERSION ],
135 + [ valaver="-VERSION" ])
136 + ])
137 +@@ -350,7 +350,7 @@ else
138 + else
139 + AC_MSG_RESULT(no)
140 + enable_vala="no"
141 +- VALA_REQUIRED=0.18.0
142 ++ VALA_REQUIRED=0.32.0
143 + fi
144 + AC_SUBST(LIBVALA)
145 + fi
146 +diff --git a/plugins/language-support-vala/plugin.vala b/plugins/language-support-vala/plugin.vala
147 +index 13d35fec4..d94634c7f 100644
148 +--- a/plugins/language-support-vala/plugin.vala
149 ++++ b/plugins/language-support-vala/plugin.vala
150 +@@ -78,7 +78,11 @@ public class ValaPlugin : Plugin, IAnjuta.Preferences {
151 +
152 + void init_context () {
153 + context = new Vala.CodeContext();
154 ++#if VALA_0_50
155 ++ context.set_target_profile (Vala.Profile.GOBJECT);
156 ++#else
157 + context.profile = Vala.Profile.GOBJECT;
158 ++#endif
159 + context.report = report;
160 + report.clear_error_indicators ();
161 +
162 +@@ -414,11 +418,19 @@ public class ValaPlugin : Plugin, IAnjuta.Preferences {
163 + builder.append_printf ("%s sender", widget.get_full_name ());
164 +
165 + foreach (var param in sig.get_parameters ()) {
166 ++#if VALA_0_48
167 ++ builder.append_printf (", %s %s", param.variable_type.type_symbol.get_full_name (), param.name);
168 ++#else
169 + builder.append_printf (", %s %s", param.variable_type.data_type.get_full_name (), param.name);
170 ++#endif
171 + }
172 + } else {
173 + foreach (var param in sig.get_parameters ()) {
174 ++#if VALA_0_48
175 ++ builder.append_printf ("%s %s, ", param.variable_type.type_symbol.get_full_name (), param.name);
176 ++#else
177 + builder.append_printf ("%s %s, ", param.variable_type.data_type.get_full_name (), param.name);
178 ++#endif
179 + }
180 +
181 + builder.append_printf ("%s sender", widget.get_full_name ());
182 +@@ -563,6 +575,15 @@ public class ValaPlugin : Plugin, IAnjuta.Preferences {
183 + }
184 + return matching_symbols;
185 + }
186 ++
187 ++ inline List<Vala.Symbol> symbol_lookup_inherited_for_type (Vala.DataType data_type, string name, bool prefix_match, bool invocation = false) {
188 ++#if VALA_0_48
189 ++ return symbol_lookup_inherited (data_type.type_symbol, name, prefix_match, invocation);
190 ++#else
191 ++ return symbol_lookup_inherited (data_type.data_type, name, prefix_match, invocation);
192 ++#endif
193 ++ }
194 ++
195 + List<Vala.Symbol> symbol_lookup_inherited (Vala.Symbol? sym, string name, bool prefix_match, bool invocation = false) {
196 + List<Vala.Symbol> result = null;
197 +
198 +@@ -580,32 +601,32 @@ public class ValaPlugin : Plugin, IAnjuta.Preferences {
199 + }
200 + if (invocation && sym is Vala.Method) {
201 + var func = (Vala.Method) sym;
202 +- result.concat (symbol_lookup_inherited (func.return_type.data_type, name, prefix_match));
203 ++ result.concat (symbol_lookup_inherited_for_type (func.return_type, name, prefix_match));
204 + } else if (sym is Vala.Class) {
205 + var cl = (Vala.Class) sym;
206 + foreach (var base_type in cl.get_base_types ()) {
207 +- result.concat (symbol_lookup_inherited (base_type.data_type, name, prefix_match));
208 ++ result.concat (symbol_lookup_inherited_for_type (base_type, name, prefix_match));
209 + }
210 + } else if (sym is Vala.Struct) {
211 + var st = (Vala.Struct) sym;
212 +- result.concat (symbol_lookup_inherited (st.base_type.data_type, name, prefix_match));
213 ++ result.concat (symbol_lookup_inherited_for_type (st.base_type, name, prefix_match));
214 + } else if (sym is Vala.Interface) {
215 + var iface = (Vala.Interface) sym;
216 + foreach (var prerequisite in iface.get_prerequisites ()) {
217 +- result.concat (symbol_lookup_inherited (prerequisite.data_type, name, prefix_match));
218 ++ result.concat (symbol_lookup_inherited_for_type (prerequisite, name, prefix_match));
219 + }
220 + } else if (sym is Vala.LocalVariable) {
221 + var variable = (Vala.LocalVariable) sym;
222 +- result.concat (symbol_lookup_inherited (variable.variable_type.data_type, name, prefix_match));
223 ++ result.concat (symbol_lookup_inherited_for_type (variable.variable_type, name, prefix_match));
224 + } else if (sym is Vala.Field) {
225 + var field = (Vala.Field) sym;
226 +- result.concat (symbol_lookup_inherited (field.variable_type.data_type, name, prefix_match));
227 ++ result.concat (symbol_lookup_inherited_for_type (field.variable_type, name, prefix_match));
228 + } else if (sym is Vala.Property) {
229 + var prop = (Vala.Property) sym;
230 +- result.concat (symbol_lookup_inherited (prop.property_type.data_type, name, prefix_match));
231 ++ result.concat (symbol_lookup_inherited_for_type (prop.property_type, name, prefix_match));
232 + } else if (sym is Vala.Parameter) {
233 + var fp = (Vala.Parameter) sym;
234 +- result.concat (symbol_lookup_inherited (fp.variable_type.data_type, name, prefix_match));
235 ++ result.concat (symbol_lookup_inherited_for_type (fp.variable_type, name, prefix_match));
236 + }
237 +
238 + return result;
239 +--
240 +2.35.1
241 +
242
243 diff --git a/dev-util/anjuta/files/3.34.0-autoconf-2.70.patch b/dev-util/anjuta/files/3.34.0-autoconf-2.70.patch
244 new file mode 100644
245 index 000000000000..fdcc9e3158bf
246 --- /dev/null
247 +++ b/dev-util/anjuta/files/3.34.0-autoconf-2.70.patch
248 @@ -0,0 +1,15 @@
249 +https://gitlab.gnome.org/GNOME/anjuta/-/merge_requests/13
250 +
251 +diff --git a/configure.ac b/configure.ac
252 +index c637f9cf3..4b101c35e 100644
253 +--- a/configure.ac
254 ++++ b/configure.ac
255 +@@ -85,8 +85,6 @@ case "$YACC" in
256 + AC_MSG_ERROR(bison is required)
257 + ;;
258 + esac
259 +-AC_LANG([C])
260 +-AC_LANG([C++])
261 + AC_PROG_CXX
262 + AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])],,
263 + AC_MSG_ERROR([C++ Compiler required to compile Anjuta]))
264
265 diff --git a/dev-util/anjuta/files/3.34.0-prefer-newer-vala.patch b/dev-util/anjuta/files/3.34.0-prefer-newer-vala.patch
266 new file mode 100644
267 index 000000000000..6ae0ead0f3d7
268 --- /dev/null
269 +++ b/dev-util/anjuta/files/3.34.0-prefer-newer-vala.patch
270 @@ -0,0 +1,15 @@
271 +https://gitlab.gnome.org/GNOME/anjuta/-/merge_requests/14
272 +
273 +diff --git a/configure.ac b/configure.ac
274 +index c637f9cf3..b34e103b2 100644
275 +--- a/configure.ac
276 ++++ b/configure.ac
277 +@@ -338,7 +338,7 @@ if test "$user_disabled_vala" = 1; then
278 + else
279 + AC_MSG_RESULT(no)
280 + AC_MSG_CHECKING(if libvala is available)
281 +- m4_foreach_w([VERSION], [0.56 0.54 0.52 0.50 0.48 0.46 0.44 0.42 0.40 0.38 0.36 0.34 0.32],
282 ++ m4_foreach_w([VERSION], [0.32 0.34 0.36 0.38 0.40 0.42 0.44 0.46 0.48 0.50 0.52 0.54 0.56],
283 + [PKG_CHECK_EXISTS([ libvala-VERSION ],
284 + [ valaver="-VERSION" ])
285 + ])