# When bumping, pay attention to all the included plugins/*/meson.build (and other) build files and the requirements within.
# `grep -rI dependency * --include='meson.build'` can give a good initial idea for external deps and their double checking.
# The listed RDEPEND order shold roughly match that output as well, with toplevel one first.
# Most plugins have no extra requirements and default to enabled; we need to handle the ones with extra requirements. Many of
# them have optional runtime dependencies, for which we try to at least notify the user via DOC_CONTENTS (but not all small
# things); `grep -rI -e 'command-pattern.*=' -e 'push_arg'` can give a (spammy) idea, plus python imports in try/except.
# FIXME: with_flatpak needs flatpak.pc >=0.8.0, ${LIBGIT_DEPS} and libsoup-2.4.pc >=2.52.0
# Editorconfig needs old pcre, with vte migrating away, might want it optional or ported to pcre2?
# 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
# These are needed with either USE=git or USE=flatpak (albeit the latter isn't supported yet)
LIBGIT_DEPS="
dev-libs/libgit2[ssh,threads]
>=dev-libs/libgit2-glib-0.25.0[ssh]
"
# TODO: Handle llvm slots via llvm.eclass; see plugins/clang/meson.build
-Denable_profiling=false# not passing -pg to CFLAGS
-Dwith_channel=other
-Dwith_editorconfig=true# needs libpcre
$(meson_use webkit with_webkit)
$(meson_use vala with_vapi)
$(meson_use doc with_help)
$(meson_use gtk-doc with_docs)
$(meson_use clang with_clang)
$(meson_use devhelp with_devhelp)
-Dwith_deviced=false
-Dwith_flatpak=false
$(meson_use git with_git)
$(meson_use webkit with_html_preview)
-Dwith_spellcheck=false# TODO: requires enchant-2
$(meson_use sysprof with_sysprof)
$(meson_use vala with_vala_pack)
)
meson_src_configure
}
src_install(){
meson_src_install
if use doc;then
rm "${ED}"/usr/share/doc/gnome-builder/en/.buildinfo || die
rm "${ED}"/usr/share/doc/gnome-builder/en/objects.inv || die
rm -r "${ED}"/usr/share/doc/gnome-builder/en/.doctrees || die
# custom docdir in build system, blocked by https://github.com/mesonbuild/meson/issues/825
mv "${ED}"/usr/share/doc/gnome-builder/en "${ED}"/usr/share/doc/${PF}/html || die
# _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.
rmdir "${ED}"/usr/share/doc/gnome-builder/ || die
fi
readme.gentoo_create_doc
}
pkg_postinst(){
xdg_pkg_postinst
gnome2_icon_cache_update
gnome2_schemas_update
readme.gentoo_print_elog
}
pkg_postrm(){
xdg_pkg_postrm
gnome2_icon_cache_update
gnome2_schemas_update
}
src_test(){
# FIXME: this should be handled at meson level upstream like epiphany does
find "${S}" -name '*.gschema.xml' -exec cp {}"${BUILD_DIR}/data/gsettings"\;|| die
"${EROOT}${GLIB_COMPILE_SCHEMAS}" --allow-any-name "${BUILD_DIR}/data/gsettings"|| die