summaryrefslogtreecommitdiff
blob: 52063cb126562a10c6da11693759c1fab0cb046c (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
55
56
57
58
59
60
61
62
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/www-client/ochusha/ochusha-0.5.8.2-r2.ebuild,v 1.1 2006/10/29 19:41:51 flameeyes Exp $

inherit flag-o-matic eutils

IUSE="nls ssl"

DESCRIPTION="Ochusha - 2ch viewer for GTK+"
HOMEPAGE="http://ochusha.sourceforge.jp/"
SRC_URI="mirror://sourceforge.jp/${PN}/16560/${P}.tar.bz2"

LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~x86-fbsd"

RDEPEND="virtual/xft
	>=x11-libs/gtk+-2.2.4
	>=dev-libs/glib-2.2.3
	>=dev-libs/libxml2-2.5.0
	>=gnome-base/libghttp-1.0.9
	sys-libs/zlib
	nls? ( virtual/libintl )
	ssl? ( dev-libs/openssl )"
DEPEND="${RDEPEND}
	dev-util/pkgconfig
	nls? ( sys-devel/gettext )"

src_unpack() {
	unpack ${A}
	cd "${S}"
	epatch "${FILESDIR}"/${P}-gentoo.diff
	epatch "${FILESDIR}"/${P}-glib-2.10.diff
}

src_compile() {
	econf $(use_enable nls) \
		$(use_with ssl) \
		--enable-regex \
		--disable-shared \
		--enable-static \
		--with-included-oniguruma || die
	emake || die
}

src_install() {
	make DESTDIR="${D}" install || die

	rm "${D}"/usr/share/ochusha/ochusha.desktop

	insinto /usr/share/applications
	doins "${S}/gtk2/ochusha.desktop"
	sed -i -e 's:Icon=.*:Icon=ochusha:' "${D}"/usr/share/applications/ochusha.desktop

	insinto /usr/share/icons/hicolor/48x48/apps
	newins "${S}/gtk2/ochusha48.png" ochusha.png
	insinto /usr/share/icons/hicolor/32x32/apps
	newins "${S}/gtk2/ochusha32.png" ochusha.png

	dodoc ACKNOWLEDGEMENT AUTHORS BUGS \
		ChangeLog INSTALL* NEWS README TODO
}