net-p2p: Remove *-fbsd KEYWORDS
[gentoo.git] / net-p2p / gtk-gnutella / gtk-gnutella-1.1.15.ebuild
1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 # eutils: strip-linguas
7 inherit eutils toolchain-funcs
8
9 IUSE="nls dbus ssl +gtk"
10
11 DESCRIPTION="A GTK+ Gnutella client"
12 SRC_URI="mirror://sourceforge/${PN}/${P}.tar.xz"
13 HOMEPAGE="http://gtk-gnutella.sourceforge.net/"
14
15 SLOT="0"
16 LICENSE="GPL-2"
17 KEYWORDS="amd64 ppc ~ppc64 x86"
18
19 RDEPEND="
20         sys-libs/binutils-libs:=
21         dev-libs/glib:2
22         sys-libs/zlib
23         gtk? ( >=x11-libs/gtk+-2.2.1:2 )
24         dbus? ( >=sys-apps/dbus-0.35.2 )
25         ssl? ( >=net-libs/gnutls-2.2.5 )
26         nls? ( >=sys-devel/gettext-0.11.5 )"
27 DEPEND="${RDEPEND}"
28 BDEPEND="virtual/pkgconfig"
29
30 src_prepare() {
31         strip-linguas -i po
32
33         echo "# Gentoo-selected LINGUAS" > po/LINGUAS
34         for ling in ${LINGUAS}; do
35                 echo $ling >> po/LINGUAS
36         done
37
38         default
39 }
40
41 src_configure() {
42         # There is no option to turn off optimization through the build.sh
43         # script.
44         sed -i -e "s/Configure -Oder/Configure -Oder -Doptimize=none/" build.sh || die
45
46         # The build script does not support the equivalent --enable
47         # options so we must construct the configuration by hand.
48
49         local myconf
50
51         if ! use nls; then
52                 myconf="${myconf} --disable-nls"
53         fi
54
55         if ! use dbus; then
56                 myconf="${myconf} --disable-dbus"
57         fi
58
59         if ! use ssl; then
60                 myconf="${myconf} --disable-gnutls"
61         fi
62
63         if use gtk; then
64                 myconf="${myconf} --gtk2"
65         else
66                 myconf="${myconf} --topless"
67         fi
68
69         ./build.sh \
70                 --configure-only \
71                 --prefix="/usr" \
72                 --cc=$(tc-getCC) \
73                 ${myconf}
74 }
75
76 src_compile() {
77         # Build system is not parallel-safe, bug 500760
78         emake -j1
79 }
80
81 src_install() {
82         dodir /usr/bin
83         emake INSTALL_PREFIX="${D}" install || die "Install failed"
84         dodoc AUTHORS ChangeLog README TODO
85
86         # Touch the symbols file into the future to avoid warnings from
87         # gtk-gnutella later on, since we will most likely strip the binary.
88         touch --date="next minute" "${D}/usr/lib/gtk-gnutella/gtk-gnutella.nm" || die
89 }