# Copyright 1999-2014 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Id$ EAPI=5 inherit eutils multilib toolchain-funcs DESCRIPTION="HTML5 compliant parsing library, written in C" HOMEPAGE="http://www.netsurf-browser.org/projects/hubbub/" SRC_URI="http://download.netsurf-browser.org/libs/releases/${P}-src.tar.gz" LICENSE="MIT" SLOT="0" KEYWORDS="~amd64 ~arm" IUSE="debug doc static-libs test" RDEPEND="> 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) "$@" } } src_prepare() { NETSURF_PKGCONFIG=lib${PN} netsurf_src_prepare epatch "${FILESDIR}"/${P}-error.patch } src_configure() { netsurf_src_configure } src_compile() { netsurf_make use doc && emake docs } src_test() { netsurf_make test } src_install() { netsurf_make DESTDIR="${D}" PREFIX=/usr install dodoc README docs/{Architecture,Macros,Todo,Treebuilder,Updated} use doc && dohtml build/docs/html/* }