You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

71 lines
1.6 KiB

# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-libs/libparserutils/libparserutils-0.1.1.ebuild,v 1.8 2013/02/27 09:41:06 xmw Exp $
EAPI=5
inherit eutils flag-o-matic multilib toolchain-funcs
DESCRIPTION="library for building efficient parsers, written in C"
HOMEPAGE="http://www.netsurf-browser.org/projects/libparserutils/"
SRC_URI="http://download.netsurf-browser.org/libs/releases/${P}-src.tar.gz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~arm"
IUSE="debug iconv static-libs test"
RDEPEND=""
DEPEND="virtual/pkgconfig
test? ( dev-lang/perl )"
pkg_setup(){
netsurf_src_prepare() {
sed -e "/^CCOPT :=/s:=.*:=:" \
-e "/^CCNOOPT :=/s:=.*:=:" \
-e "/^CCDBG :=/s:=.*:=:" \
-i build/makefiles/Makefile.{gcc,clang} || die
sed -e "/^INSTALL_ITEMS/s: /lib: /$(get_libdir):g" \
-i Makefile || die
sed -e "/^libdir/s:/lib:/$(get_libdir):g" \
-i ${PN}.pc.in || die
}
netsurf_src_configure() {
echo "Q := " >> Makefile.config
echo "CC := $(tc-getCC)" >> Makefile.config
echo "AR := $(tc-getAR)" >> Makefile.config
}
netsurf_make() {
emake COMPONENT_TYPE=lib-shared BUILD=$(usex debug debug release) "$@"
use static-libs && \
emake COMPONENT_TYPE=lib-static BUILD=$(usex debug debug release) "$@"
}
append-cflags "-D$(usex iconv WITH WITHOUT)_ICONV_FILTER"
}
src_prepare() {
netsurf_src_prepare
epatch "${FILESDIR}"/${P}-unused.patch
}
src_configure() {
netsurf_src_configure
}
src_compile() {
netsurf_make
}
src_test() {
netsurf_make test
}
src_install() {
netsurf_make DESTDIR="${D}" PREFIX=/usr install
dodoc README docs/Todo
}