Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 396289 | Differences between
and this patch

Collapse All | Expand All

(-)file_not_specified_in_diff (-29 / +41 lines)
Line  Link Here
0
-- htp-1.16.ebuild
0
++ htp-1.17.ebuild
Lines 1-50 Link Here
1
# Copyright 1999-2010 Gentoo Foundation
1
# Copyright 1999-2011 Gentoo Foundation
2
# Distributed under the terms of the GNU General Public License v2
2
# Distributed under the terms of the GNU General Public License v2
3
# $Header: /var/cvsroot/gentoo-x86/app-text/htp/htp-1.16.ebuild,v 1.4 2010/12/31 00:45:25 vapier Exp $
3
# $Header: /var/cvsroot/gentoo-x86/app-text/htp/htp-1.16.ebuild,v 1.4 2010/12/31 00:45:25 vapier Exp $
4
4
5
EAPI="2"
5
EAPI=4
6
6
7
inherit eutils toolchain-funcs
7
inherit eutils toolchain-funcs
8
8
9
DESCRIPTION="An HTML preprocessor"
9
DESCRIPTION="An HTML preprocessor"
10
HOMEPAGE="http://htp.sourceforge.net/"
10
HOMEPAGE="http://htp.sourceforge.net/"
11
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
11
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz
12
	doc? ( mirror://sourceforge/${PN}/${P}-doc.zip )"
12
13
13
LICENSE="Clarified-Artistic"
14
LICENSE="Clarified-Artistic"
14
SLOT="0"
15
SLOT="0"
15
KEYWORDS="~alpha ~ppc ~sparc ~x86"
16
KEYWORDS="~alpha ~ppc ~sparc ~x86"
16
IUSE=""
17
IUSE="doc examples"
17
18
18
# HTP does not use autoconf, have to set options defined in Makefile.config
19
DEPEND="doc? ( app-arch/unzip )"
19
20
20
src_prepare() {
21
# broken, reported upstream
21
	epatch "${FILESDIR}"/strip.patch #240110
22
# http://sf.net/tracker/?func=detail&aid=3466112&group_id=41382&atid=430444
22
	# let src_test take care of testing
23
RESTRICT="test"
23
	sed -i -e '/SUBDIRS /s:tests::' Makefile || die
24
24
	# don't install doc files with +x perms
25
src_unpack() {
25
	sed -i -e '$aINSTALL += -m644' homepage/ref/{*/,}Makefile || die
26
	unpack ${A}
26
	# make src_test abort on failure
27
27
	sed -i -e '/DIFF.*FAILED/s/echo/exit 1; :/' tests/Makefile || die
28
	if use doc; then
28
	# the png file in this test isn't fetchable
29
		mkdir "${WORKDIR}"/docs || die
29
	sed -i -e 's: width="630" height="331"::' tests/png.html.exp || die
30
		cd "${WORKDIR}"/docs
31
		unpack ${P}-doc.zip
32
	fi
30
}
33
}
31
34
32
src_compile() {
35
src_prepare() {
33
	emake \
36
	epatch "${FILESDIR}"/${P}-build.patch
34
		CCOPT="-c ${CFLAGS} ${CPPFLAGS} -DHAVE_SNPRINTF -DHAVE_VASPRINTF -DHAVE_ASPRINTF" \
35
		CC="$(tc-getCC)" \
36
		LINK='$(CC) $(LDFLAGS)' \
37
		|| die
38
}
37
}
39
38
40
src_test() {
39
src_compile() {
41
	emake -C tests || die
40
	tc-export CC
41
	emake
42
	use examples && emake examples
42
}
43
}
43
44
44
src_install() {
45
src_install() {
45
	emake \
46
	emake DESTDIR="${D}" install
46
		DESTDIR="${D}" \
47
47
		prefix='$(DESTDIR)/usr' \
48
	if use examples; then
48
		pkgdocdir='$(DESTDIR)/usr/share/doc/${PF}/html' \
49
		docinto examples
49
		install || die
50
		dodoc examples/*.{def,html,htp,htt}
51
	fi
52
53
	if use doc; then
54
		docinto html
55
		cd "${WORKDIR}"/docs/${PN}
56
		dodoc -r *.html pic
57
58
		cd tut
59
		docinto html/tut
60
		dodoc *.html
61
	fi
50
}
62
}

Return to bug 396289