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: Mon, 02 May 2011 21:59:50
Message-Id: 07a5f159da6729604269e0a46d96a84d02a077da.xmw@gentoo
1 commit: 07a5f159da6729604269e0a46d96a84d02a077da
2 Author: Michael Weber <xmw <AT> gentoo <DOT> org>
3 AuthorDate: Mon May 2 21:59:20 2011 +0000
4 Commit: Michael Weber <xmw <AT> gentoo <DOT> org>
5 CommitDate: Mon May 2 21:59:20 2011 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=dev/xmw.git;a=commit;h=07a5f159
7
8 netsurf.eclass: initial import
9
10 ---
11 eclass/netsurf.eclass | 53 +++++++++++++++++++++++++++++++++++++++++++++++++
12 1 files changed, 53 insertions(+), 0 deletions(-)
13
14 diff --git a/eclass/netsurf.eclass b/eclass/netsurf.eclass
15 new file mode 100644
16 index 0000000..cfc3cfc
17 --- /dev/null
18 +++ b/eclass/netsurf.eclass
19 @@ -0,0 +1,53 @@
20 +# Copyright 1999-2011 Gentoo Foundation
21 +# Distributed under the terms of the GNU General Public License v2
22 +# $Header: $
23 +
24 +#
25 +# Original Author: Michael Weber <xmw@g.o>
26 +# Purpose:
27 +#
28 +
29 +inherit multilib
30 +
31 +case "${EAPI:-0}" in
32 + 3|4) EXPORTED_FUNCTIONS="src_prepare src_compile src_install" ;;
33 + *) die "EAPI=${EAPI} is not supported" ;;
34 +esac
35 +
36 +# exports must be ALWAYS after inherit
37 +EXPORT_FUNCTIONS ${EXPORTED_FUNCTIONS}
38 +
39 +HOMEPAGE="http://www.netsurf-browser.org/projects/"
40 +SRC_URI="http://www.netsurf-browser.org/projects/releases/${P}-src.tar.gz"
41 +LICENSE="MIT"
42 +SLOT="0"
43 +IUSE="static-libs"
44 +
45 +DEPEND=""
46 +RDEPEND=""
47 +
48 +S=${WORKDIR}/${P}-src
49 +
50 +netsurf_src_prepare() {
51 + sed -e "/^INSTALL_ITEMS/s: /lib: /$(get_libdir):g" \
52 + -e "s:-Werror::g" \
53 + -e "/^COMPONENT_TYPE/s:lib-static:lib-shared:" \
54 + -i Makefile || die
55 + sed -e "/^libdir/s:/lib:/$(get_libdir):g" \
56 + -i ${PN}.pc.in || die
57 +}
58 +
59 +
60 +netsurf_src_compile() {
61 + emake || die
62 + if use static-libs ; then
63 + emake COMPONENT_TYPE=lib-static || die
64 + fi
65 +}
66 +
67 +netsurf_src_install() {
68 + emake DESTDIR="${D}" PREFIX=/usr install || die
69 + if use static-libs ; then
70 + emake COMPONENT_TYPE=lib-static DESTDIR="${D}" PREFIX=/usr install || die
71 + fi
72 +}