logo

overlay

My own overlay for experimentations, use with caution, no support is provided
commit: 31235876afbc0e7bba7cb4bc8122d6af6dbfc743
parent: 5112b7a342e9ad764d17ec330e96810505db0212
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Sat, 13 Jun 2020 10:10:22 +0200

x11-libs/gtk+: Add gtk4 ebuild

Diffstat:

Ax11-libs/gtk+/Manifest1+
Ax11-libs/gtk+/gtk+-3.98.5.ebuild162+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 163 insertions(+), 0 deletions(-)

diff --git a/x11-libs/gtk+/Manifest b/x11-libs/gtk+/Manifest @@ -0,0 +1 @@ +DIST gtk-3.98.5.tar.xz 18827724 BLAKE2B 4e37920b92edd3ae5af1e976dfe10aae4fd4819b410291b801f9d60a84b4d4b4945411a1773491e48fdf3378bfe01a4d1662fc66e03807c90f33c919d5aac07f SHA512 6bd0068ac504a92999eaa18934769adbd5fd39134bc8239728cc30633f44a8b59dc26d074e3d6932f8c1ce7c5e1adcb7db6c4556150505ac62f833161648fb20 diff --git a/x11-libs/gtk+/gtk+-3.98.5.ebuild b/x11-libs/gtk+/gtk+-3.98.5.ebuild @@ -0,0 +1,162 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +GNOME_ORG_MODULE="gtk" + +inherit meson gnome2 multilib virtualx multilib-minimal + +DESCRIPTION="Gimp ToolKit +" +HOMEPAGE="https://www.gtk.org/" + +LICENSE="LGPL-2+" +SLOT="4" +IUSE="broadway colord cups cloudprint cloudproviders examples gtk-doc +introspection test vim-syntax wayland +X xinerama tracker3 vulkan profiler" +REQUIRED_USE=" + || ( wayland X ) + xinerama? ( X ) +" + +KEYWORDS="~amd64" + +# Upstream wants us to do their job: +# https://bugzilla.gnome.org/show_bug.cgi?id=768662#c1 +RESTRICT="test" + +BDEPEND=" + >=dev-util/meson-0.54.2 + dev-lang/sassc + dev-util/gdbus-codegen + sys-apps/diffutils + dev-libs/libxslt +" + +DEPEND=" + >=dev-libs/glib-2.63.1:2[${MULTILIB_USEDEP}] + >=x11-libs/pango-1.45.0[introspection?,${MULTILIB_USEDEP}] + >=dev-libs/fribidi-0.19.7[${MULTILIB_USEDEP}] + >=dev-libs/atk-2.15.1[introspection?,${MULTILIB_USEDEP}] + >=x11-libs/cairo-1.14[glib,svg,X?,${MULTILIB_USEDEP}] + >=x11-libs/gdk-pixbuf-2.30:2[introspection?,${MULTILIB_USEDEP}] + >=media-libs/graphene-1.9.1[${MULTILIB_USEDEP}] + >=media-libs/libepoxy-1.4[X(+)?,${MULTILIB_USEDEP}] + introspection? ( >=dev-libs/gobject-introspection-1.39:= ) + wayland? ( + >=dev-libs/wayland-protocols-1.20 + >=dev-libs/wayland-1.14.91[${MULTILIB_USEDEP}] + >=x11-libs/libxkbcommon-0.2[${MULTILIB_USEDEP}] + ) + >=media-libs/harfbuzz-0.9:= + app-text/iso-codes + tracker3? ( >=app-misc/tracker-3.0 ) + X? ( + >=x11-libs/libXrandr-1.5[${MULTILIB_USEDEP}] + x11-libs/libX11[${MULTILIB_USEDEP}] + x11-libs/libXrender[${MULTILIB_USEDEP}] + x11-libs/libXi[${MULTILIB_USEDEP}] + x11-libs/libXext[${MULTILIB_USEDEP}] + x11-libs/libXcursor[${MULTILIB_USEDEP}] + x11-libs/libXdamage[${MULTILIB_USEDEP}] + x11-libs/libXfixes[${MULTILIB_USEDEP}] + x11-libs/libXcomposite[${MULTILIB_USEDEP}] + media-libs/fontconfig[${MULTILIB_USEDEP}] + xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] ) + ) + vulkan? ( + media-libs/vulkan-loader + media-libs/shaderc + ) + cloudproviders? ( dev-libs/libcloudproviders ) + profiler? ( dev-util/sysprof-capture ) + + cups? ( net-print/cups ) + cloudprint? ( + net-libs/rest:0.7 + dev-libs/json-glib + ) + colord? ( >=x11-misc/colord-0.1.9 ) +" + +src_prepare() { + gnome2_src_prepare +} + +multilib_src_configure() { + local emesonargs=( + $(meson_use X x11-backend) + $(meson_use wayland wayland-backend) + $(meson_use broadway broadway-backend) + + -Dmedia="none" + + -Dvulkan=$(usex vulkan) + -Dxinerama=$(usex xinerama) + $(meson_use cloudproviders) + $(meson_use profiler) + $(meson_use tracker3) + + -Dprint-backends=file + -Dcolord=$(usex colord) + ) + + meson_src_configure +} + +multilib_src_test() { + meson_src_test +} + +multilib_src_install() { + meson_src_install +} + +multilib_src_install_all() { + insinto /etc/gtk-4.0 + doins "${FILESDIR}"/settings.ini + # Skip README.{in,commits,win32} that would get installed by default + DOCS=( AUTHORS ChangeLog NEWS README ) + einstalldocs +} + +pkg_preinst() { + gnome2_pkg_preinst + + multilib_pkg_preinst() { + # Make immodules.cache belongs to gtk+ alone + local cache="usr/$(get_libdir)/gtk-4.0/4.0.0/immodules.cache" + + if [[ -e ${EROOT}${cache} ]]; then + cp "${EROOT}"${cache} "${ED}"/${cache} || die + else + touch "${ED}"/${cache} || die + fi + } + multilib_parallel_foreach_abi multilib_pkg_preinst +} + +pkg_postinst() { + gnome2_pkg_postinst + + multilib_pkg_postinst() { + gnome2_query_immodules_gtk3 \ + || die "Update immodules cache failed (for ${ABI})" + } + multilib_parallel_foreach_abi multilib_pkg_postinst + + if ! has_version "app-text/evince"; then + elog "Please install app-text/evince for print preview functionality." + elog "Alternatively, check \"gtk-print-preview-command\" documentation and" + elog "add it to your settings.ini file." + fi +} + +pkg_postrm() { + gnome2_pkg_postrm + + if [[ -z ${REPLACED_BY_VERSION} ]]; then + multilib_pkg_postrm() { + rm -f "${EROOT}"usr/$(get_libdir)/gtk-4.0/4.0.0/immodules.cache + } + multilib_foreach_abi multilib_pkg_postrm + fi +}