83c8db833e505fcebc57f9eb480c537edc4a0e28
[gentoo.git] / dev-util / glade / glade-3.22.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 PYTHON_COMPAT=( python3_{6,7,8} )
7
8 inherit gnome2 python-single-r1 virtualx
9
10 DESCRIPTION="A user interface designer for GTK+ and GNOME"
11 HOMEPAGE="https://glade.gnome.org/"
12
13 LICENSE="GPL-2+ FDL-1.1+"
14 SLOT="3.10/6" # subslot = suffix of libgladeui-2.so
15 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86"
16
17 IUSE="debug +introspection python webkit"
18 REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
19
20 RDEPEND="
21         dev-libs/atk[introspection?]
22         >=dev-libs/glib-2.53.2:2
23         >=dev-libs/libxml2-2.4.0:2
24         x11-libs/cairo:=
25         x11-libs/gdk-pixbuf:2[introspection?]
26         >=x11-libs/gtk+-3.20.0:3[introspection?]
27         x11-libs/pango[introspection?]
28         introspection? ( >=dev-libs/gobject-introspection-1.32:= )
29         python? (
30                 ${PYTHON_DEPS}
31                 x11-libs/gtk+:3[introspection]
32                 $(python_gen_cond_dep '
33                         >=dev-python/pygobject-3.8:3[${PYTHON_MULTI_USEDEP}]
34                 ')
35         )
36         webkit? ( >=net-libs/webkit-gtk-2.12.0:4 )
37 "
38 DEPEND="${RDEPEND}
39         app-text/docbook-xml-dtd:4.1.2
40         dev-libs/libxslt
41         >=dev-util/gtk-doc-am-1.13
42         >=dev-util/intltool-0.41.0
43         dev-util/itstool
44         virtual/pkgconfig
45 "
46 # eautoreconf requires:
47 #       app-text/yelp-tools
48 #       dev-libs/gobject-introspection-common
49 #       gnome-base/gnome-common
50
51 RESTRICT="test" # https://gitlab.gnome.org/GNOME/glade/issues/333
52
53 PATCHES=(
54         # To avoid file collison with other slots, rename help module.
55         # Prevent the UI from loading glade:3's gladeui devhelp documentation.
56         "${FILESDIR}"/${PN}-3.14.1-doc-version.patch
57 )
58
59 pkg_setup() {
60         use python && python-single-r1_pkg_setup
61 }
62
63 src_configure() {
64         gnome2_src_configure \
65                 --disable-static \
66                 --enable-gladeui \
67                 --enable-libtool-lock \
68                 $(usex debug --enable-debug ' ') \
69                 $(use_enable introspection) \
70                 $(use_enable python) \
71                 $(use_enable webkit webkit2gtk)
72 }
73
74 src_test() {
75         virtx emake check
76 }
77
78 src_install() {
79         # modify name in .devhelp2 file to avoid shadowing with glade:3 docs
80         sed -e 's:name="gladeui":name="gladeui-2":' \
81                 -i doc/html/gladeui.devhelp2 || die "sed of gladeui.devhelp2 failed"
82         gnome2_src_install
83 }
84
85 pkg_postinst() {
86         gnome2_pkg_postinst
87         if ! has_version dev-util/devhelp ; then
88                 elog "You may want to install dev-util/devhelp for integration API"
89                 elog "documentation support."
90         fi
91 }