summaryrefslogtreecommitdiff
blob: 0a178a22989de9e69a1aa495641ff053a95e8c10 (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-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-text/sablotron/sablotron-1.0.3.ebuild,v 1.2 2007/04/17 10:16:09 betelgeuse Exp $

inherit base autotools flag-o-matic

MY_PN="Sablot"
MY_P="${MY_PN}-${PV}"
S=${WORKDIR}/${MY_P}

DESCRIPTION="An XSLT Parser in C++"
HOMEPAGE="http://www.gingerall.org/sablotron.html"
SRC_URI="http://download-1.gingerall.cz/download/sablot/${MY_P}.tar.gz"

# Sablotron can optionally be built under GPL, using MPL for now
LICENSE="MPL-1.1"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc-macos ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd"
IUSE="doc perl"

RDEPEND=">=dev-libs/expat-1.95.6-r1"
DEPEND="${RDEPEND}
	doc? ( >=dev-perl/XML-Parser-2.3 )"

PATCHES="${FILESDIR}/1.0.3-libsablot-expat.patch"

src_compile() {
	# Don't use --without-html-dir, since that ends up installing files under
	# the /no directory
	local myconf="--with-html-dir=/usr/share/doc/${PF}/html"

	# Please make sure at least elibtoolize is run, else we get references
	# to PORTAGE_TMPDIR in /usr/lib/libsablot.la ...
	eautoreconf

	use perl && myconf="${myconf} --enable-perlconnect"

	# rphillips, fixes bug #3876
	# this is fixed for me with apache2, but keeping it in here
	# for apache1 users and/or until some clever detection
	# is added <obz@gentoo.org>
	append-ldflags -lstdc++ -shared-libgcc

	econf ${myconf} || die "Configure failed"
	emake || die "Make failed"
}

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

	use doc || rm -rf "${D}/usr/share/doc/${PF}/html"

	dodoc README README_JS RELEASE src/TODO
}