*/*: Discontinue Gentoo SuperH port
[gentoo.git] / x11-terms / gnome-terminal / gnome-terminal-3.34.2.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI="6"
5 GNOME2_LA_PUNT="yes"
6
7 inherit gnome2 readme.gentoo-r1
8
9 DESCRIPTION="The Gnome Terminal"
10 HOMEPAGE="https://wiki.gnome.org/Apps/Terminal/"
11
12 LICENSE="GPL-3+"
13 SLOT="0"
14 IUSE="debug +gnome-shell +nautilus vanilla"
15 SRC_URI+=" https://dev.gentoo.org/~leio/distfiles/${P}-patchset.tar.xz
16 !vanilla? ( https://dev.gentoo.org/~leio/distfiles/${P}-cntr-ntfy-autottl-ts.patch.xz )"
17
18 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux"
19
20 # FIXME: automagic dependency on gtk+[X], just transitive but needs proper control, bug 624960
21 RDEPEND="
22         >=dev-libs/glib-2.52:2
23         >=x11-libs/gtk+-3.20:3
24         >=x11-libs/vte-0.58.1:2.91[!vanilla?]
25         >=dev-libs/libpcre2-10
26         >=gnome-base/dconf-0.14
27         >=gnome-base/gsettings-desktop-schemas-0.1.0
28         sys-apps/util-linux
29         gnome-shell? ( gnome-base/gnome-shell )
30         nautilus? ( >=gnome-base/nautilus-3 )
31 "
32 # itstool required for help/* with non-en LINGUAS, see bug #549358
33 # xmllint required for glib-compile-resources, see bug #549304
34 DEPEND="${RDEPEND}
35         dev-libs/libxml2:2
36         dev-util/gdbus-codegen
37         dev-util/glib-utils
38         >=dev-util/intltool-0.50
39         dev-util/itstool
40         sys-devel/gettext
41         virtual/pkgconfig
42 "
43
44 DOC_CONTENTS="To get previous working directory inherited in new opened tab, or
45         notifications of long-running commands finishing, you will need
46         to add the following line to your ~/.bashrc:\n
47         . /etc/profile.d/vte-2.91.sh"
48
49 src_prepare() {
50         eapply "${WORKDIR}"/patches # translation updates; below conditional patch requires it to apply cleanly
51         if ! use vanilla; then
52                 # https://bugzilla.gnome.org/show_bug.cgi?id=695371
53                 # Fedora patches:
54                 # Restore transparency support (with compositing WMs only)
55                 # OSC 777 desktop notification support (notifications on tabs for long-running commands completing)
56                 # Restore "Set title" support
57                 # Automatic title updating based on currently running foreground process
58                 # https://src.fedoraproject.org/rpms/gnome-terminal/raw/f31/f/gnome-terminal-cntr-ntfy-autottl-ts.patch
59                 # Depends on vte[-vanilla] for OSC 777 and the preexec/precmd/etc patches in VTE
60                 eapply "${WORKDIR}"/${P}-cntr-ntfy-autottl-ts.patch
61         fi
62         gnome2_src_prepare
63 }
64
65 src_configure() {
66         gnome2_src_configure \
67                 --disable-static \
68                 $(use_enable debug) \
69                 $(use_enable gnome-shell search-provider) \
70                 $(use_with nautilus nautilus-extension)
71 }
72
73 src_install() {
74         DOCS="AUTHORS ChangeLog HACKING NEWS"
75         gnome2_src_install
76         if ! use vanilla; then
77                 # Separate "New Window/Tab" menu entries by default, instead of unified "New Terminal"
78                 insinto /usr/share/glib-2.0/schemas
79                 newins "${FILESDIR}"/separate-new-tab-window.gschema.override org.gnome.Terminal.gschema.override
80         fi
81         readme.gentoo_create_doc
82 }
83
84 pkg_postinst() {
85         gnome2_pkg_postinst
86         readme.gentoo_print_elog
87 }