Gentoo Archives: gentoo-commits

From: Michael Weber <xmw@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] dev/xmw:master commit in: eclass/
Date: Tue, 03 May 2011 20:38:54
Message-Id: 5fc2077c9c8371a8ad1c826ca928018010ccefa9.xmw@gentoo
1 commit: 5fc2077c9c8371a8ad1c826ca928018010ccefa9
2 Author: Michael Weber <xmw <AT> gentoo <DOT> org>
3 AuthorDate: Tue May 3 20:14:30 2011 +0000
4 Commit: Michael Weber <xmw <AT> gentoo <DOT> org>
5 CommitDate: Tue May 3 20:14:30 2011 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=dev/xmw.git;a=commit;h=5fc2077c
7
8 netsurf.eclass: updated
9
10 ---
11 eclass/netsurf.eclass | 30 +++++++++++++++++++++++-------
12 1 files changed, 23 insertions(+), 7 deletions(-)
13
14 diff --git a/eclass/netsurf.eclass b/eclass/netsurf.eclass
15 index cfc3cfc..1d263ff 100644
16 --- a/eclass/netsurf.eclass
17 +++ b/eclass/netsurf.eclass
18 @@ -21,33 +21,49 @@ HOMEPAGE="http://www.netsurf-browser.org/projects/"
19 SRC_URI="http://www.netsurf-browser.org/projects/releases/${P}-src.tar.gz"
20 LICENSE="MIT"
21 SLOT="0"
22 -IUSE="static-libs"
23 +IUSE=""
24
25 -DEPEND=""
26 RDEPEND=""
27 +DEPEND=""
28
29 S=${WORKDIR}/${P}-src
30
31 +DOCS=( )
32 +
33 +# TODO doc
34 +NETSURF_PC_FILE=${PN}.pc.in
35 +
36 netsurf_src_prepare() {
37 sed -e "/^INSTALL_ITEMS/s: /lib: /$(get_libdir):g" \
38 -e "s:-Werror::g" \
39 -e "/^COMPONENT_TYPE/s:lib-static:lib-shared:" \
40 -i Makefile || die
41 - sed -e "/^libdir/s:/lib:/$(get_libdir):g" \
42 - -i ${PN}.pc.in || die
43 + if [ -e ${NETSURF_PC_FILE} ] ; then
44 + sed -e "/^libdir/s:/lib:/$(get_libdir):g" \
45 + -i ${NETSURF_PC_FILE} || die
46 + fi
47 }
48
49 -
50 netsurf_src_compile() {
51 emake || die
52 - if use static-libs ; then
53 + if has static-libs ${IUSE} && use static-libs ; then
54 emake COMPONENT_TYPE=lib-static || die
55 fi
56 + if has doc ${IUSE} && use doc ; then
57 + emake docs || die
58 + fi
59 }
60
61 netsurf_src_install() {
62 emake DESTDIR="${D}" PREFIX=/usr install || die
63 - if use static-libs ; then
64 + if has static-libs ${IUSE} && use static-libs ; then
65 emake COMPONENT_TYPE=lib-static DESTDIR="${D}" PREFIX=/usr install || die
66 fi
67 + local x
68 + for x in ${DOCS[@]} ; do
69 + dodoc "${x}" || die
70 + done
71 + if has doc ${IUSE} && use doc ; then
72 + dohtml build/docs/html/* || die
73 + fi
74 }