summaryrefslogtreecommitdiff
blob: 033856fdcdafa68d9099a26e66594d6abe3d1e51 (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
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-text/highlight/highlight-2.6.9.ebuild,v 1.1 2008/05/04 20:34:41 drac Exp $

WX_GTK_VER=2.6

inherit wxwidgets eutils toolchain-funcs

DESCRIPTION="converts source code to formatted text ((X)HTML, RTF, (La)TeX, XSL-FO, XML) with syntax highlighting."
HOMEPAGE="http://www.andre-simon.de"
SRC_URI="http://www.andre-simon.de/zip/${P}.tar.bz2"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~hppa ~ppc ~sparc ~x86"
IUSE="wxwindows"

DEPEND="wxwindows? ( =x11-libs/wxGTK-2.6* )"

src_unpack() {
	unpack ${A}
	cd "${S}"
	epatch "${FILESDIR}"/${P}-gcc43.patch \
		"${FILESDIR}"/${P}-asneeded.patch
	sed -i \
		-e "s:-O2::" \
		src/makefile || die "sed failed."
}

src_compile() {
	emake -f makefile CXX="$(tc-getCXX)" all || die "emake all failed."
	if use wxwindows; then
		need-wxwidgets ansi
		emake -f makefile CXX="$(tc-getCXX)" all-gui || die "emake all-gui failed."
	fi
}

src_install() {
	dodir /usr/bin
	emake -f makefile \
		DESTDIR="${D}" \
		install || die "emake install failed."
	if use wxwindows; then
		emake -f makefile \
			DESTDIR="${D}" \
			install-gui || die "emake install-gui failed."
	fi
}