summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Weber <xmw@gentoo.org>2013-02-27 08:53:48 +0000
committerMichael Weber <xmw@gentoo.org>2013-02-27 08:53:48 +0000
commit8d2a73702247ee8e204c5026b76af2250677bfda (patch)
tree22add9ebb0d5a2aea076c53c0f655d4062225643
parentnetsurf eclass preparation (diff)
downloadgentoo-2-8d2a73702247ee8e204c5026b76af2250677bfda.tar.gz
gentoo-2-8d2a73702247ee8e204c5026b76af2250677bfda.tar.bz2
gentoo-2-8d2a73702247ee8e204c5026b76af2250677bfda.zip
netsurf eclass preparation. Restore cross-compile functionality (thanks James Le Cuirot, bug 431884)
(Portage version: 2.2.0_alpha163/cvs/Linux x86_64, signed Manifest commit with key 62EEF090)
-rw-r--r--dev-libs/libparserutils/ChangeLog8
-rw-r--r--dev-libs/libparserutils/libparserutils-0.1.1.ebuild60
2 files changed, 44 insertions, 24 deletions
diff --git a/dev-libs/libparserutils/ChangeLog b/dev-libs/libparserutils/ChangeLog
index e6b40363382c..6fa9c3e79acd 100644
--- a/dev-libs/libparserutils/ChangeLog
+++ b/dev-libs/libparserutils/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for dev-libs/libparserutils
-# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/libparserutils/ChangeLog,v 1.4 2012/07/18 07:16:31 xmw Exp $
+# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/libparserutils/ChangeLog,v 1.5 2013/02/27 08:53:48 xmw Exp $
+
+ 27 Feb 2013; Michael Weber <xmw@gentoo.org> libparserutils-0.1.1.ebuild:
+ netsurf eclass preparation. Restore cross-compile functionality (thanks James
+ Le Cuirot, bug 431884)
18 Jul 2012; Michael Weber <xmw@gentoo.org> libparserutils-0.1.1.ebuild:
fix shared/static targets for test
diff --git a/dev-libs/libparserutils/libparserutils-0.1.1.ebuild b/dev-libs/libparserutils/libparserutils-0.1.1.ebuild
index 4698c67f79a3..21b33fd05750 100644
--- a/dev-libs/libparserutils/libparserutils-0.1.1.ebuild
+++ b/dev-libs/libparserutils/libparserutils-0.1.1.ebuild
@@ -1,8 +1,8 @@
-# Copyright 1999-2012 Gentoo Foundation
+# 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.4 2012/07/18 07:16:31 xmw Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/libparserutils/libparserutils-0.1.1.ebuild,v 1.5 2013/02/27 08:53:48 xmw Exp $
-EAPI=4
+EAPI=5
inherit flag-o-matic multilib toolchain-funcs
@@ -13,23 +13,34 @@ SRC_URI="http://download.netsurf-browser.org/libs/releases/${P}-src.tar.gz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~arm"
-IUSE="iconv static-libs test"
+IUSE="debug iconv static-libs test"
RDEPEND=""
DEPEND="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
- echo "Q := " >> Makefile.config.override
- echo "CC := $(tc-getCC)" >> Makefile.config.override
- echo "AR := $(tc-getAR)" >> Makefile.config.override
-}
+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
+ }
-src_configure() {
+ 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) "$@"
+ }
+
if use iconv ; then
append-cflags "-DWITH_ICONV_FILTER"
else
@@ -37,19 +48,24 @@ src_configure() {
fi
}
+src_prepare() {
+ netsurf_src_prepare
+}
+
+src_configure() {
+ netsurf_src_configure
+}
+
src_compile() {
- emake COMPONENT_TYPE=lib-shared
- use static-libs && emake COMPONENT_TYPE=lib-static
+ netsurf_make
}
src_test() {
- emake COMPONENT_TYPE=lib-shared test
- use static-libs && emake COMPONENT_TYPE=lib-static test
+ netsurf_make 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
+ netsurf_make DESTDIR="${D}" PREFIX=/usr install
+
dodoc README docs/Todo
}