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/gnome-builder/
Date: Sun, 08 May 2022 04:22:12
Message-Id: 1651983672.ee7360dc60a70ef09d9425615bdb4deef4bc84d5.mattst88@gentoo
1 commit: ee7360dc60a70ef09d9425615bdb4deef4bc84d5
2 Author: Matt Turner <mattst88 <AT> gentoo <DOT> org>
3 AuthorDate: Sat Feb 19 23:50:30 2022 +0000
4 Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org>
5 CommitDate: Sun May 8 04:21:12 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ee7360dc
7
8 dev-util/gnome-builder: Version bump to 42.1
9
10 Closes: https://bugs.gentoo.org/829838
11 Closes: https://bugs.gentoo.org/843224
12 Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>
13
14 dev-util/gnome-builder/Manifest | 1 +
15 dev-util/gnome-builder/gnome-builder-42.1.ebuild | 276 +++++++++++++++++++++++
16 dev-util/gnome-builder/metadata.xml | 1 +
17 3 files changed, 278 insertions(+)
18
19 diff --git a/dev-util/gnome-builder/Manifest b/dev-util/gnome-builder/Manifest
20 index 0b140c2c4500..65b62a9908fa 100644
21 --- a/dev-util/gnome-builder/Manifest
22 +++ b/dev-util/gnome-builder/Manifest
23 @@ -1 +1,2 @@
24 DIST gnome-builder-3.40.2.tar.xz 12083992 BLAKE2B 136c3e89378221116b5252a8472768888f11bd580cf9d1d524504f9000b8123ee479e19073630bb678cc7392b716e45d122b406dc7d44b13ba0ba77b435077e0 SHA512 e0d1f0f21fe0f681f87d1ad672cb5bf60df3ef16541fffd8ca62d447339371bdb5cbc10d8fc83496822d6eb35ad8078b095ff97d950d940d862d6fd7968147a4
25 +DIST gnome-builder-42.1.tar.xz 13276028 BLAKE2B 657e362ab9a2df1c70d9071ecc010747e5c73bbaa1c0d903778720e4fe874361013cfca3fe162328dfae180502c4fcc68ee01f04d1329add874b9e8db41abcd1 SHA512 a04a71efb163808ed4bfc446334b8f9cabe33cd33c977c9047e4fb00042b18cf7095217b2e287a45efda863ef479fce11435a2d24d489ba1816e3f36a561244e
26
27 diff --git a/dev-util/gnome-builder/gnome-builder-42.1.ebuild b/dev-util/gnome-builder/gnome-builder-42.1.ebuild
28 new file mode 100644
29 index 000000000000..140a6077d367
30 --- /dev/null
31 +++ b/dev-util/gnome-builder/gnome-builder-42.1.ebuild
32 @@ -0,0 +1,276 @@
33 +# Copyright 1999-2022 Gentoo Authors
34 +# Distributed under the terms of the GNU General Public License v2
35 +
36 +EAPI=8
37 +PYTHON_COMPAT=( python3_{8..10} )
38 +DISABLE_AUTOFORMATTING=1
39 +FORCE_PRINT_ELOG=1
40 +
41 +inherit gnome.org gnome2-utils llvm meson optfeature python-single-r1 readme.gentoo-r1 virtualx xdg
42 +
43 +DESCRIPTION="An IDE for writing GNOME-based software"
44 +HOMEPAGE="https://wiki.gnome.org/Apps/Builder https://gitlab.gnome.org/GNOME/gnome-builder"
45 +
46 +# FIXME: Review licenses at some point
47 +LICENSE="GPL-3+ GPL-2+ LGPL-3+ LGPL-2+ MIT CC-BY-SA-3.0 CC0-1.0"
48 +SLOT="0"
49 +KEYWORDS="~amd64 ~x86"
50 +IUSE="clang +devhelp doc flatpak +git +glade gtk-doc spell +sysprof test +webkit"
51 +REQUIRED_USE="
52 + ${PYTHON_REQUIRED_USE}
53 + flatpak? ( git )
54 + devhelp? ( webkit )
55 +"
56 +
57 +# When bumping, pay attention to all the included plugins/*/meson.build (and other) build files and the requirements within.
58 +# `grep -rI dependency * --include='meson.build'` can give a good initial idea for external deps and their double checking.
59 +# The listed RDEPEND order shold roughly match that output as well, with toplevel one first then sorted by file path.
60 +# Most plugins have no extra requirements and default to enabled; we need to handle the ones with extra requirements. Many of
61 +# them have optional runtime dependencies, for which we try to at least notify the user via DOC_CONTENTS (but not all small
62 +# things); `grep -rI -e 'command-pattern.*=' -e 'push_arg'` can give a (spammy) idea, plus python imports in try/except.
63 +
64 +# Editorconfig needs old pcre, with vte migrating away, might want it optional or ported to pcre2?
65 +# An introspection USE flag of a dep is required if any introspection based language plugin wants to use it (grep for gi.repository). Last full check at 3.28.4
66 +
67 +# TODO: Handle llvm slots via llvm.eclass; see plugins/clang/meson.build
68 +RDEPEND="
69 + >=dev-libs/libdazzle-3.37.0[introspection]
70 + >=dev-libs/glib-2.69.1:2
71 + >=x11-libs/gtk+-3.24:3[introspection]
72 + >=x11-libs/gtksourceview-4.0.0:4[introspection]
73 + >=gui-libs/libhandy-1.5.0:1[introspection]
74 + >=dev-libs/json-glib-1.2.0
75 + >=dev-libs/jsonrpc-glib-3.41.0
76 + >=x11-libs/pango-1.38.0
77 + >=dev-libs/libpeas-1.22.0[python,${PYTHON_SINGLE_USEDEP}]
78 + dev-libs/libportal:=[gtk,introspection]
79 + >=dev-libs/template-glib-3.28.0[introspection]
80 + >=x11-libs/vte-0.65.0:2.91[introspection]
81 + >=dev-libs/libxml2-2.9.0
82 + webkit? ( >=net-libs/webkit-gtk-2.26:4=[introspection] )
83 + sysprof? (
84 + >=dev-util/sysprof-capture-3.37.1:4
85 + >=dev-util/sysprof-3.37.1:0/4[gtk]
86 + )
87 + >=app-text/cmark-0.29.0:0=
88 + flatpak? (
89 + dev-util/ostree
90 + >=net-libs/libsoup-2.52.0:2.4
91 + >=sys-apps/flatpak-1.10.2
92 + )
93 + git? (
94 + dev-libs/libgit2:=[ssh,threads]
95 + >=dev-libs/libgit2-glib-0.28.0.1[ssh]
96 + )
97 + dev-libs/libpcre:3
98 + dev-libs/libpcre2
99 +
100 + >=dev-libs/gobject-introspection-1.54.0:=
101 + $(python_gen_cond_dep '
102 + >=dev-python/pygobject-3.22.0:3[${PYTHON_USEDEP}]
103 + ')
104 + ${PYTHON_DEPS}
105 + clang? ( sys-devel/clang:= )
106 + devhelp? ( >=dev-util/devhelp-3.25.1:= )
107 + glade? ( >=dev-util/glade-3.22.0:3.10= )
108 + spell? (
109 + >=app-text/gspell-1.8:0=
110 + app-text/enchant:2
111 + )
112 +"
113 +DEPEND="${RDEPEND}"
114 +# TODO: runtime ctags path finding..
115 +
116 +# desktop-file-utils required for tests, but we have it in deptree for xdg update-desktop-database anyway, so be explicit and unconditional
117 +# appstream-glib needed for validation with appstream-util with FEATURES=test
118 +BDEPEND="
119 + doc? (
120 + $(python_gen_cond_dep '
121 + dev-python/sphinx[${PYTHON_USEDEP}]
122 + dev-python/sphinx_rtd_theme[${PYTHON_USEDEP}]
123 + ')
124 + )
125 + gtk-doc? (
126 + dev-util/gi-docgen
127 + app-text/docbook-xml-dtd:4.3
128 + )
129 + test? (
130 + dev-libs/appstream-glib
131 + sys-apps/dbus
132 + )
133 + dev-util/desktop-file-utils
134 + dev-util/glib-utils
135 + >=sys-devel/gettext-0.19.8
136 + virtual/pkgconfig
137 +"
138 +
139 +DOC_CONTENTS='gnome-builder can use various other dependencies on runtime to provide
140 +extra capabilities beyond these expressed via USE flags. Some of these
141 +that are currently available with packages include:
142 +
143 +* dev-util/uncrustify and dev-python/autopep8 for various Code Beautifier
144 + plugin out of the box functionality.
145 +* dev-util/ctags with exuberant-ctags selected via "eselect ctags" for
146 + C, C++, Python, JavaScript, CSS, HTML and Ruby autocompletion, semantic
147 + highlighting and symbol resolving support.
148 +* dev-python/jedi and dev-python/lxml for more accurate Python
149 + autocompletion support.
150 +* dev-util/valgrind for integration with valgrind.
151 +* dev-util/meson for integration with the Meson build system.
152 +* dev-util/cargo for integration with the Rust Cargo build system.
153 +* dev-util/cmake for integration with the CMake build system.
154 +* net-libs/nodejs[npm] for integration with the NPM package system.
155 +'
156 +# FIXME: Package codespell and mention here
157 +# FIXME: Package gnome-code-assistance and mention here, or maybe USE flag and default enable because it's rather important
158 +# eslint for additional diagnostics in JavaScript files (what package has this? At least something via NPM..)
159 +# jhbuild support
160 +# rust support via rust-analyzer; Go via go-langserver
161 +# autotools stuff for autotools plugin; gtkmm/autoconf-archive for C++ template
162 +# gjs/gettext/mono/PHPize stuff, but most of these are probably installed for other reasons anyways, when needed inside IDE
163 +# stylelint for stylesheet (CSS and co) linting
164 +# gvls for vala language-server integration
165 +
166 +llvm_check_deps() {
167 + has_version "sys-devel/clang:${LLVM_SLOT}"
168 +}
169 +
170 +pkg_setup() {
171 + python-single-r1_pkg_setup
172 + use clang && llvm_pkg_setup
173 +}
174 +
175 +src_configure() {
176 + local emesonargs=(
177 + -Dtracing=false
178 + -Dprofiling=false # not passing -pg to CFLAGS
179 + -Dtcmalloc=false
180 +
181 + -Dwith_safe_path=''
182 +
183 + -Dgnome_sdk_version=master
184 +
185 + -Dchannel=other
186 +
187 + $(meson_use doc help)
188 + $(meson_use gtk-doc docs)
189 +
190 + -Dnetwork_tests=false
191 +
192 + -Dctags_path=''
193 +
194 + $(meson_feature webkit)
195 +
196 + -Dplugin_autotools=true
197 + -Dplugin_beautifier=true
198 + -Dplugin_blueprint=true
199 + -Dplugin_c_pack=true
200 + -Dplugin_cargo=true
201 + $(meson_use clang plugin_clang)
202 + $(meson_use clang plugin_clangd)
203 + $(meson_use clang plugin_clang_format)
204 + -Dplugin_cmake=true
205 + -Dplugin_codespell=true
206 + -Dplugin_code_index=true
207 + -Dplugin_color_picker=true
208 + -Dplugin_copyright=true
209 + -Dplugin_ctags=true
210 + $(meson_use devhelp plugin_devhelp)
211 + -Dplugin_deviced=false # libdeviced not packaged?
212 + -Dplugin_dspy=true
213 + -Dplugin_editorconfig=true # needs libpcre
214 + -Dplugin_eslint=true
215 + -Dplugin_file_search=true
216 + $(meson_use flatpak plugin_flatpak)
217 + -Dplugin_gdb=true
218 + -Dplugin_gdiagnose=true
219 + -Dplugin_gettext=true
220 + $(meson_use git plugin_git)
221 + -Dplugin_gjs_symbols=true
222 + $(meson_use glade plugin_glade)
223 + -Dplugin_gnome_code_assistance=true
224 + -Dplugin_go_langserv=true
225 + -Dplugin_gradle=true
226 + -Dplugin_grep=true
227 + -Dplugin_gvls=true
228 + -Dplugin_html_completion=true
229 + -Dplugin_html_preview=true
230 + -Dplugin_intelephense=true
231 + -Dplugin_jedi_language_server=true
232 + -Dplugin_jhbuild=true
233 + -Dplugin_make=true
234 + -Dplugin_maven=true
235 + -Dplugin_meson=true
236 + -Dplugin_modelines=true
237 + -Dplugin_mono=true
238 + -Dplugin_newcomers=true
239 + -Dplugin_notification=true
240 + -Dplugin_npm=true
241 + -Dplugin_phpize=true
242 + -Dplugin_podman=true
243 + -Dplugin_python_pack=true
244 + -Dplugin_qemu=true
245 + -Dplugin_quick_highlight=true
246 + -Dplugin_retab=true
247 + -Dplugin_rls=true
248 + -Dplugin_rstcheck=true
249 + -Dplugin_rubocop=true
250 + -Dplugin_rust_analyzer=false # rust-analyzer not packaged
251 + -Dplugin_shellcmd=true
252 + $(meson_use spell plugin_spellcheck)
253 + -Dplugin_stylelint=true
254 + $(meson_use sysprof plugin_sysprof)
255 + -Dplugin_sysroot=true
256 + -Dplugin_todo=true
257 + -Dplugin_ts_language_server=true
258 + -Dplugin_update_manager=true
259 + -Dplugin_vala=true
260 + -Dplugin_vagrant=true
261 + -Dplugin_valgrind=true
262 + -Dplugin_vls=true
263 + -Dplugin_waf=true
264 + -Dplugin_words=true
265 + -Dplugin_xml_pack=true
266 + )
267 + meson_src_configure
268 +}
269 +
270 +src_install() {
271 + meson_src_install
272 + python_optimize
273 + if use doc; then
274 + rm "${ED}"/usr/share/doc/gnome-builder/en/.buildinfo || die
275 + rm "${ED}"/usr/share/doc/gnome-builder/en/objects.inv || die
276 + # custom docdir in build system, blocked by https://github.com/mesonbuild/meson/issues/825
277 + mv "${ED}"/usr/share/doc/gnome-builder/en "${ED}"/usr/share/doc/${PF}/html || die
278 + # _sources subdir left in on purpose, as HTML links to the rst files as "View page source". Additionally default docompress exclusion of /html/ already ensures they aren't compressed, thus linkable as-is.
279 + rmdir "${ED}"/usr/share/doc/gnome-builder/ || die
280 + fi
281 + readme.gentoo_create_doc
282 +}
283 +
284 +pkg_postinst() {
285 + xdg_pkg_postinst
286 + gnome2_schemas_update
287 + readme.gentoo_print_elog
288 +
289 + optfeature_header "Code beautifiers"
290 + optfeature "Python" dev-python/autopep8
291 + optfeature "C/C++/Java" dev-util/uncrustify
292 + optfeature "HTML" app-text/htmltidy
293 +
294 + optfeature_header "Language support"
295 + optfeature "Rust's Cargo build system" virtual/rust
296 + optfeature "CMake" dev-util/cmake
297 + optfeature "Java Maven build system" dev-java/maven-bin
298 + optfeature "Meson Build system" dev-util/meson
299 +}
300 +
301 +pkg_postrm() {
302 + xdg_pkg_postrm
303 + gnome2_schemas_update
304 +}
305 +
306 +src_test() {
307 + virtx dbus-run-session meson test -C "${BUILD_DIR}"
308 +}
309
310 diff --git a/dev-util/gnome-builder/metadata.xml b/dev-util/gnome-builder/metadata.xml
311 index 342b0c570e2c..63870d032088 100644
312 --- a/dev-util/gnome-builder/metadata.xml
313 +++ b/dev-util/gnome-builder/metadata.xml
314 @@ -8,6 +8,7 @@
315 <use>
316 <flag name="clang">Provide integration with <pkg>sys-devel/clang</pkg> for best possible C/C++ autocompletion, semantic highlighting, symbol resolving, and diagnostics support</flag>
317 <flag name="devhelp">Provide API docs browsing and integration via <pkg>dev-util/devhelp</pkg></flag>
318 + <flag name="flatpak">Enable support for flatpak applications using <pkg>sys-apps/flatpak</pkg></flag>
319 <flag name="git">Provide support for the Git version control system via <pkg>dev-libs/libgit2-glib</pkg>
320 (such as setup of Git for New Project, direct cloning for Open Project and changed lines indicators in the editor gutter)</flag>
321 <flag name="glade">Provide integration with <pkg>dev-util/glade</pkg> UI designer for Gtk</flag>