summaryrefslogtreecommitdiff
blob: b967fdb3163ced9d54ff7e87020ef6dfa626a6ac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=6
GNOME2_LA_PUNT="yes"

inherit autotools gnome2

DESCRIPTION="A simple image viewer widget for GTK"
HOMEPAGE="https://projects.gnome.org/gtkimageview/"
SRC_URI="mirror://gentoo/${P}.tar.gz"

LICENSE="LGPL-2.1"
SLOT="0"
KEYWORDS="~alpha amd64 arm ~arm64 ~hppa ia64 ~mips ppc ppc64 sparc x86 ~amd64-linux ~x86-linux ~x64-solaris ~x86-solaris"
IUSE="examples static-libs"

# tests are severely broken, bug #483952
RESTRICT="test"

RDEPEND="x11-libs/gtk+:2"
DEPEND="${RDEPEND}
	gnome-base/gnome-common
	dev-util/gtk-doc-am
"

src_prepare() {
	gnome2_src_prepare

	# Prevent excessive build failures due to gcc changes
	sed -e '/CFLAGS/s/-Werror //g' -i configure.in || die

	# Gold linker fix
	sed -e '/libtest.la/s:$: -lm:g' -i tests/Makefile.am || die

	# Don't rebuild gtk-doc
	sed "/^TARGET_DIR/i \GTKDOC_REBASE=true" -i gtk-doc.make || die

	mv configure.in configure.ac || die
	AT_NOELIBTOOLIZE=yes eautoreconf
}

src_configure() {
	gnome2_src_configure \
		$(use_enable static-libs static)
}

src_install() {
	gnome2_src_install
	if use examples ; then
		docinto examples
		dodoc tests/ex-*.c
	fi
}