summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Weber <xmw@gentoo.org>2013-02-27 08:43:22 +0000
committerMichael Weber <xmw@gentoo.org>2013-02-27 08:43:22 +0000
commit3705732eed04fdfbe87905b0b53f2a78807396e1 (patch)
tree9053c75db1059703cf468f3726718f7533923d3e /media-libs
parentKeep -Werror (diff)
downloadgentoo-2-3705732eed04fdfbe87905b0b53f2a78807396e1.tar.gz
gentoo-2-3705732eed04fdfbe87905b0b53f2a78807396e1.tar.bz2
gentoo-2-3705732eed04fdfbe87905b0b53f2a78807396e1.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)
Diffstat (limited to 'media-libs')
-rw-r--r--media-libs/libnsbmp/ChangeLog8
-rw-r--r--media-libs/libnsbmp/libnsbmp-0.0.3.ebuild55
2 files changed, 42 insertions, 21 deletions
diff --git a/media-libs/libnsbmp/ChangeLog b/media-libs/libnsbmp/ChangeLog
index 0a3c4e6d8715..73c5dfd6f6ce 100644
--- a/media-libs/libnsbmp/ChangeLog
+++ b/media-libs/libnsbmp/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for media-libs/libnsbmp
-# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-libs/libnsbmp/ChangeLog,v 1.1 2012/07/17 23:29:19 xmw Exp $
+# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/media-libs/libnsbmp/ChangeLog,v 1.2 2013/02/27 08:43:22 xmw Exp $
+
+ 27 Feb 2013; Michael Weber <xmw@gentoo.org> libnsbmp-0.0.3.ebuild:
+ netsurf eclass preparation. Restore cross-compile functionality (thanks James
+ Le Cuirot, bug 431884)
*libnsbmp-0.0.3 (17 Jul 2012)
diff --git a/media-libs/libnsbmp/libnsbmp-0.0.3.ebuild b/media-libs/libnsbmp/libnsbmp-0.0.3.ebuild
index 62aa36ba0c90..9c976b4e78ae 100644
--- a/media-libs/libnsbmp/libnsbmp-0.0.3.ebuild
+++ b/media-libs/libnsbmp/libnsbmp-0.0.3.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/media-libs/libnsbmp/libnsbmp-0.0.3.ebuild,v 1.1 2012/07/17 23:29:19 xmw Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-libs/libnsbmp/libnsbmp-0.0.3.ebuild,v 1.2 2013/02/27 08:43:22 xmw Exp $
-EAPI=4
+EAPI=5
inherit multilib toolchain-funcs
@@ -13,34 +13,51 @@ SRC_URI="http://download.netsurf-browser.org/libs/releases/${P}-src.tar.gz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~arm"
-IUSE="static-libs"
+IUSE="debug static-libs"
RDEPEND=""
DEPEND=""
+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) "$@"
+ }
+}
+
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
+ 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 COMPONENT_TYPE=lib-shared DESTDIR="${D}" PREFIX=/usr install
- use static-libs && \
- emake COMPONENT_TYPE=lib-static DESTDIR="${D}" PREFIX=/usr install
+ netsurf_make DESTDIR="${D}" PREFIX=/usr install
}