Gentoo Archives: gentoo-commits

From: Mart Raudsepp <leio@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/gnome-builder/files/, dev-util/gnome-builder/
Date: Sun, 26 Jan 2020 18:02:43
Message-Id: 1580061628.3207e8302325904c096a7cba75acfb6e4ea4d350.leio@gentoo
1 commit: 3207e8302325904c096a7cba75acfb6e4ea4d350
2 Author: Mart Raudsepp <leio <AT> gentoo <DOT> org>
3 AuthorDate: Sun Jan 26 16:16:52 2020 +0000
4 Commit: Mart Raudsepp <leio <AT> gentoo <DOT> org>
5 CommitDate: Sun Jan 26 18:00:28 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3207e830
7
8 dev-util/gnome-builder: bump to 3.32.4
9
10 Closes: https://bugs.gentoo.org/702442
11 Package-Manager: Portage-2.3.84, Repoman-2.3.20
12 Signed-off-by: Mart Raudsepp <leio <AT> gentoo.org>
13
14 dev-util/gnome-builder/Manifest | 2 +
15 .../gnome-builder/files/3.32.4-optional-vala.patch | 29 ++++
16 dev-util/gnome-builder/gnome-builder-3.32.4.ebuild | 185 +++++++++++++++++++++
17 dev-util/gnome-builder/metadata.xml | 1 +
18 4 files changed, 217 insertions(+)
19
20 diff --git a/dev-util/gnome-builder/Manifest b/dev-util/gnome-builder/Manifest
21 index 69e6c6daddc..808a9df9a29 100644
22 --- a/dev-util/gnome-builder/Manifest
23 +++ b/dev-util/gnome-builder/Manifest
24 @@ -1 +1,3 @@
25 DIST gnome-builder-3.30.3.tar.xz 9486164 BLAKE2B b983fd71b1bab31386ab8f4c3a6ff57b33afd2da5aff5e41e7d1cba388a9b6998a0f799c0843bde95f8ce0456fe46457d0c0c46622d59eeb7729d2e8868898f7 SHA512 468605dbd2bd712a76c333a974bb19ca889dfe8493c2e85101641034f3e2c8eba2c0ee2f98ad01f3466f0f42946f05790763ccfaf786d73da192d64360eec47f
26 +DIST gnome-builder-3.32.4-patchset.tar.xz 34740 BLAKE2B 6e29ce42b2b1878b5fcec7cf057bcdc015da8817d7f9209f4d03e02bb5837525e329d0627d4465123fb20a0a46415053d7e08b445634659123ebff12d2fb9d09 SHA512 494cf1ff370c7d86d42ec352966169e73b99556dc5a1be0bf0ec53cd78e8550897bb44187ae8f471fe3e10a85dc7d44d44c5edef0569b1d0a7dff7b5d78b1fa1
27 +DIST gnome-builder-3.32.4.tar.xz 11886980 BLAKE2B a7901566238dd39fe180d1e47089d7f99018be115f407d174472a8371374361fe50f2f15cb6d496a1afa3e30117d83788944636fb6a9487d4a719442ba6ae744 SHA512 a050161465edd448b0359ff781bf97b0cda6c184ea4f89193711a1bac3c7b79f76bac0d3600e3823a86aa19538228619b5d64aea94e8a67f480b5c1f79bc3b93
28
29 diff --git a/dev-util/gnome-builder/files/3.32.4-optional-vala.patch b/dev-util/gnome-builder/files/3.32.4-optional-vala.patch
30 new file mode 100644
31 index 00000000000..b31ee886eae
32 --- /dev/null
33 +++ b/dev-util/gnome-builder/files/3.32.4-optional-vala.patch
34 @@ -0,0 +1,29 @@
35 +diff --git a/meson_options.txt b/meson_options.txt
36 +index 36fcfc969..cef10804d 100644
37 +--- a/meson_options.txt
38 ++++ b/meson_options.txt
39 +@@ -13,6 +13,7 @@ option('channel',
40 +
41 + option('help', type: 'boolean', value: false)
42 + option('docs', type: 'boolean', value: false)
43 ++option('vapi', type: 'boolean')
44 +
45 + option('network_tests', type: 'boolean', value: true, description: 'Allow networking in unit-tests')
46 +
47 +diff --git a/src/meson.build b/src/meson.build
48 +index bc7f91841..53d678297 100644
49 +--- a/src/meson.build
50 ++++ b/src/meson.build
51 +@@ -124,6 +124,7 @@ configure_file(
52 + copy: true,
53 + )
54 +
55 ++if get_option('vapi')
56 + libide_vapi = gnome.generate_vapi('libide-' + libide_api_version,
57 + sources: libide_gir[0],
58 + install: true,
59 +@@ -141,3 +142,4 @@ libide_vapi = gnome.generate_vapi('libide-' + libide_api_version,
60 +
61 + # Must be after vapi generation
62 + subdir('plugins/vala-pack')
63 ++endif
64
65 diff --git a/dev-util/gnome-builder/gnome-builder-3.32.4.ebuild b/dev-util/gnome-builder/gnome-builder-3.32.4.ebuild
66 new file mode 100644
67 index 00000000000..ea692c5155d
68 --- /dev/null
69 +++ b/dev-util/gnome-builder/gnome-builder-3.32.4.ebuild
70 @@ -0,0 +1,185 @@
71 +# Copyright 1999-2020 Gentoo Authors
72 +# Distributed under the terms of the GNU General Public License v2
73 +
74 +EAPI=7
75 +PYTHON_COMPAT=( python3_{6,7} )
76 +VALA_MIN_API_VERSION="0.36"
77 +DISABLE_AUTOFORMATTING=1
78 +FORCE_PRINT_ELOG=1
79 +
80 +inherit gnome.org gnome2-utils llvm meson python-single-r1 readme.gentoo-r1 vala virtualx xdg
81 +
82 +DESCRIPTION="An IDE for writing GNOME-based software"
83 +HOMEPAGE="https://wiki.gnome.org/Apps/Builder"
84 +SRC_URI+=" https://dev.gentoo.org/~leio/distfiles/${P}-patchset.tar.xz"
85 +
86 +# FIXME: Review licenses at some point
87 +LICENSE="GPL-3+ GPL-2+ LGPL-3+ LGPL-2+ MIT CC-BY-SA-3.0 CC0-1.0"
88 +SLOT="0"
89 +KEYWORDS="~amd64 ~x86"
90 +IUSE="clang +devhelp doc +glade gtk-doc sysprof test vala"
91 +REQUIRED_USE="${PYTHON_REQUIRED_USE}"
92 +
93 +# When bumping, pay attention to all the included plugins/*/meson.build (and other) build files and the requirements within.
94 +# `grep -rI dependency * --include='meson.build'` can give a good initial idea for external deps and their double checking.
95 +# The listed RDEPEND order shold roughly match that output as well, with toplevel one first then sorted by file path.
96 +# Most plugins have no extra requirements and default to enabled; we need to handle the ones with extra requirements. Many of
97 +# them have optional runtime dependencies, for which we try to at least notify the user via DOC_CONTENTS (but not all small
98 +# things); `grep -rI -e 'command-pattern.*=' -e 'push_arg'` can give a (spammy) idea, plus python imports in try/except.
99 +
100 +# FIXME: plugin_flatpak needs flatpak.pc >=0.8.0, ostree-1 and libsoup-2.4.pc >=2.52.0
101 +# Editorconfig needs old pcre, with vte migrating away, might want it optional or ported to pcre2?
102 +# 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
103 +
104 +# TODO: Handle llvm slots via llvm.eclass; see plugins/clang/meson.build
105 +RDEPEND="
106 + >=dev-libs/libdazzle-3.31.90[introspection,vala?]
107 + >=dev-libs/glib-2.59.0:2
108 + >=x11-libs/gtk+-3.22.26:3[introspection]
109 + >=x11-libs/gtksourceview-4.0.0:4[introspection]
110 + >=dev-libs/json-glib-1.2.0
111 + >=dev-libs/jsonrpc-glib-3.19.91[vala?]
112 + >=x11-libs/pango-1.38.0
113 + $(python_gen_cond_dep '>=dev-libs/libpeas-1.22.0[python,${PYTHON_SINGLE_USEDEP}]')
114 + >=dev-libs/template-glib-3.28.0[introspection,vala?]
115 + >=x11-libs/vte-0.40.2:2.91[introspection,vala?]
116 + >=net-libs/webkit-gtk-2.12.0:4=[introspection]
117 + >=dev-libs/libxml2-2.9.0
118 + dev-libs/libgit2[ssh,threads]
119 + >=dev-libs/libgit2-glib-0.28[ssh]
120 + dev-libs/libpcre:3
121 +
122 + >=dev-libs/gobject-introspection-1.54.0:=
123 + >=dev-python/pygobject-3.22.0:3[${PYTHON_USEDEP}]
124 + ${PYTHON_DEPS}
125 + clang? ( sys-devel/clang:= )
126 + devhelp? ( >=dev-util/devhelp-3.25.1:= )
127 + glade? ( >=dev-util/glade-3.22.0:3.10 )
128 + sysprof? ( >=dev-util/sysprof-3.31.90[gtk] )
129 + vala? (
130 + dev-lang/vala:=
131 + $(vala_depend)
132 + )
133 +" # We use subslot operator dep on vala in addition to $(vala_depend), because we have _runtime_
134 +# usage in vala-pack plugin and need it rebuilt before removing an older vala it was built against
135 +DEPEND="${RDEPEND}"
136 +# TODO: runtime ctags path finding..
137 +# FIXME: spellcheck plugin temporarily disabled due to requiring enchant-2
138 +# >=app-text/gspell-1.2.0
139 +# >=app-text/enchant:2
140 +
141 +# desktop-file-utils required for tests, but we have it in deptree for xdg update-desktop-database anyway, so be explicit and unconditional
142 +# appstream-glib needed for validation with appstream-util with FEATURES=test
143 +BDEPEND="
144 + doc? ( dev-python/sphinx )
145 + test? (
146 + dev-libs/appstream-glib
147 + sys-apps/dbus )
148 + dev-util/desktop-file-utils
149 + dev-util/glib-utils
150 + >=dev-util/meson-0.49.2
151 + >=sys-devel/gettext-0.19.8
152 + virtual/pkgconfig
153 +"
154 +
155 +DOC_CONTENTS='gnome-builder can use various other dependencies on runtime to provide
156 +extra capabilities beyond these expressed via USE flags. Some of these
157 +that are currently available with packages include:
158 +
159 +* dev-util/uncrustify and dev-python/autopep8 for various Code Beautifier
160 + plugin out of the box functionality.
161 +* dev-util/ctags with exuberant-ctags selected via "eselect ctags" for
162 + C, C++, Python, JavaScript, CSS, HTML and Ruby autocompletion, semantic
163 + highlighting and symbol resolving support.
164 +* dev-python/jedi and dev-python/lxml for more accurate Python
165 + autocompletion support.
166 +* dev-util/valgrind for integration with valgrind.
167 +* dev-util/meson for integration with the Meson build system.
168 +* dev-util/cargo for integration with the Rust Cargo build system.
169 +* dev-util/cmake for integration with the CMake build system.
170 +* net-libs/nodejs[npm] for integration with the NPM package system.
171 +'
172 +# FIXME: Package gnome-code-assistance and mention here, or maybe USE flag and default enable because it's rather important
173 +# eslint for additional diagnostics in JavaScript files (what package has this? At least something via NPM..)
174 +# jhbuild support
175 +# rust language server via rls; Go via go-langserver
176 +# autotools stuff for autotools plugin; gtkmm/autoconf-archive for C++ template
177 +# gjs/gettext/mono/PHPize stuff, but most of these are probably installed for other reasons anyways, when needed inside IDE
178 +
179 +PATCHES=(
180 + "${WORKDIR}/patches" # gnome-builder-3-32 branch 2020-01-14 (commit 325cfb6d9e4) + cherry-picked meson link_whole fixes
181 + "${FILESDIR}"/${PV}-optional-vala.patch
182 +)
183 +
184 +llvm_check_deps() {
185 + has_version "sys-devel/clang:${LLVM_SLOT}"
186 +}
187 +
188 +pkg_setup() {
189 + python-single-r1_pkg_setup
190 + use clang && llvm_pkg_setup
191 +}
192 +
193 +src_prepare() {
194 + use vala && vala_src_prepare
195 + xdg_src_prepare
196 +}
197 +
198 +src_configure() {
199 + local emesonargs=(
200 + -Dtracing=false
201 + -Dprofiling=false # not passing -pg to CFLAGS
202 + -Dfusermount_wrapper=false # meant for flatpak builds
203 + -Dtcmalloc=false
204 + -Dchannel=other
205 +
206 + $(meson_use vala vapi) # TODO: doesn't work anymore; crude patch included
207 + $(meson_use doc help)
208 + $(meson_use gtk-doc docs)
209 +
210 + -Dnetwork_tests=false
211 + $(meson_use clang plugin_clang)
212 + $(meson_use devhelp plugin_devhelp)
213 + -Dplugin_deviced=false
214 + -Dplugin_editorconfig=true # needs libpcre
215 + -Dplugin_flatpak=false
216 + -Dplugin_podman=false
217 + $(meson_use glade plugin_glade)
218 + -Dplugin_git=true
219 + -Dplugin_spellcheck=false # TODO: requires enchant-2
220 + $(meson_use sysprof plugin_sysprof)
221 + $(meson_use vala plugin_vala)
222 + )
223 + meson_src_configure
224 +}
225 +
226 +src_install() {
227 + meson_src_install
228 + python_optimize
229 + if use doc; then
230 + rm "${ED}"/usr/share/doc/gnome-builder/en/.buildinfo || die
231 + rm "${ED}"/usr/share/doc/gnome-builder/en/objects.inv || die
232 + rm -r "${ED}"/usr/share/doc/gnome-builder/en/.doctrees || die
233 + # custom docdir in build system, blocked by https://github.com/mesonbuild/meson/issues/825
234 + mv "${ED}"/usr/share/doc/gnome-builder/en "${ED}"/usr/share/doc/${PF}/html || die
235 + # _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.
236 + rmdir "${ED}"/usr/share/doc/gnome-builder/ || die
237 + fi
238 + readme.gentoo_create_doc
239 +}
240 +
241 +pkg_postinst() {
242 + xdg_pkg_postinst
243 + gnome2_schemas_update
244 + readme.gentoo_print_elog
245 +}
246 +
247 +pkg_postrm() {
248 + xdg_pkg_postrm
249 + gnome2_schemas_update
250 +}
251 +
252 +src_test() {
253 + # FIXME: can't run meson_src_test together with virtx or dbus-run-session
254 + virtx dbus-run-session meson test -C "${BUILD_DIR}"
255 +}
256
257 diff --git a/dev-util/gnome-builder/metadata.xml b/dev-util/gnome-builder/metadata.xml
258 index 4eb8fba905d..efeddd2652d 100644
259 --- a/dev-util/gnome-builder/metadata.xml
260 +++ b/dev-util/gnome-builder/metadata.xml
261 @@ -10,6 +10,7 @@
262 <flag name="devhelp">Provide API docs browsing and integration via <pkg>dev-util/devhelp</pkg></flag>
263 <flag name="git">Provide support for the Git version control system via <pkg>dev-libs/libgit2-glib</pkg>
264 (such as setup of Git for New Project, direct cloning for Open Project and changed lines indicators in the editor gutter)</flag>
265 + <flag name="glade">Provide integration with <pkg>dev-util/glade</pkg> UI designer for Gtk</flag>
266 <flag name="sysprof">Provide an integrated profiler via <pkg>dev-util/sysprof</pkg></flag>
267 <flag name="vala">Provide an autoindenter, autocompletion, diagnostics, and symbol resolver for Vala</flag>
268 <flag name="webkit">Enable <pkg>net-libs/webkit-gtk</pkg> using plugins support and the HTML/Markdown previewer plugin</flag>