blob: 5506076794c3362eca2577e7640a1b4d9265b524 (
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
|
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-libs/libcss/libcss-0.1.2.ebuild,v 1.6 2012/11/11 21:23:41 xmw Exp $
EAPI=4
inherit multilib toolchain-funcs
DESCRIPTION="CSS parser and selection engine, written in C"
HOMEPAGE="http://www.netsurf-browser.org/projects/libcss/"
SRC_URI="http://download.netsurf-browser.org/libs/releases/libcss-0.1.2-src.tar.gz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~arm"
IUSE="static-libs test"
RDEPEND="dev-libs/libparserutils
dev-libs/libwapcaplet"
DEPEND="${RDEPEND}
test? ( dev-lang/perl )"
src_prepare() {
sed -e "/^INSTALL_ITEMS/s: /lib: /$(get_libdir):g" \
-e "s:-Werror::g" \
-i Makefile || die
sed -e "/^libdir/s:/lib:/$(get_libdir):g" \
-i ${PN}.pc.in || die
sed -e "s/\$\$(HOST_CC)/$(tc-getBUILD_CC)/g" \
-i src/parse/properties/Makefile || die
echo "Q := " >> Makefile.config.override
echo "CC := $(tc-getCC)" >> Makefile.config.override
echo "AR := $(tc-getAR)" >> Makefile.config.override
}
src_compile() {
emake COMPONENT_TYPE=lib-shared
use static-libs && emake COMPONENT_TYPE=lib-static
}
src_test() {
emake COMPONENT_TYPE=lib-shared test
use static-libs && emake COMPONENT_TYPE=lib-static test
}
src_install() {
emake DESTDIR="${D}" PREFIX=/usr COMPONENT_TYPE=lib-shared install
use static-libs && \
emake DESTDIR="${D}" PREFIX=/usr COMPONENT_TYPE=lib-static install
dodoc README
}
|