diff options
author | Michael Weber <xmw@gentoo.org> | 2013-02-28 07:39:57 +0000 |
---|---|---|
committer | Michael Weber <xmw@gentoo.org> | 2013-02-28 07:39:57 +0000 |
commit | 4f9126b58c40fd55e370f82fdc61d2d70d9c339f (patch) | |
tree | 76081fb25bcd4ba4c872b507307f71c4d8f7a81b /dev-libs/libnsfb | |
parent | Revision bump to ensure that everybody is using the new spin of the tarball (... (diff) | |
download | gentoo-2-4f9126b58c40fd55e370f82fdc61d2d70d9c339f.tar.gz gentoo-2-4f9126b58c40fd55e370f82fdc61d2d70d9c339f.tar.bz2 gentoo-2-4f9126b58c40fd55e370f82fdc61d2d70d9c339f.zip |
netsurf eclass preparation.
(Portage version: 2.2.0_alpha163/cvs/Linux x86_64, signed Manifest commit with key 62EEF090)
Diffstat (limited to 'dev-libs/libnsfb')
-rw-r--r-- | dev-libs/libnsfb/ChangeLog | 6 | ||||
-rw-r--r-- | dev-libs/libnsfb/libnsfb-0.0.2.ebuild | 55 | ||||
-rw-r--r-- | dev-libs/libnsfb/libnsfb-9999.ebuild | 54 |
3 files changed, 74 insertions, 41 deletions
diff --git a/dev-libs/libnsfb/ChangeLog b/dev-libs/libnsfb/ChangeLog index a70b4ce45606..7d6e1f97c43d 100644 --- a/dev-libs/libnsfb/ChangeLog +++ b/dev-libs/libnsfb/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for dev-libs/libnsfb # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-libs/libnsfb/ChangeLog,v 1.4 2013/02/27 08:00:54 xmw Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-libs/libnsfb/ChangeLog,v 1.5 2013/02/28 07:39:57 xmw Exp $ + + 28 Feb 2013; Michael Weber <xmw@gentoo.org> libnsfb-0.0.2.ebuild, + libnsfb-9999.ebuild: + netsurf eclass preparation. 27 Feb 2013; Michael Weber <xmw@gentoo.org> libnsfb-0.0.2.ebuild, +files/libnsfb-0.0.2-autodetect.patch, libnsfb-9999.ebuild: diff --git a/dev-libs/libnsfb/libnsfb-0.0.2.ebuild b/dev-libs/libnsfb/libnsfb-0.0.2.ebuild index f0a0bbf5a77b..6598642eb595 100644 --- a/dev-libs/libnsfb/libnsfb-0.0.2.ebuild +++ b/dev-libs/libnsfb/libnsfb-0.0.2.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-libs/libnsfb/libnsfb-0.0.2.ebuild,v 1.2 2013/02/27 08:00:54 xmw Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-libs/libnsfb/libnsfb-0.0.2.ebuild,v 1.3 2013/02/28 07:39:57 xmw Exp $ EAPI=5 @@ -13,7 +13,7 @@ SRC_URI="http://download.netsurf-browser.org/netsurf/releases/source-full/netsur LICENSE="MIT" SLOT="0" KEYWORDS="~amd64 ~arm" -IUSE="sdl static-libs vnc xcb" +IUSE="debug sdl static-libs vnc xcb" RDEPEND="sdl? ( media-libs/libsdl ) vnc? ( net-libs/libvncserver ) @@ -27,6 +27,30 @@ DEPEND="${RDEPEND} # we don't allow access to /dev/fb0 RESTRICT="test" +pkg_setup(){ + netsurf_src_prepare() { + sed -e "/^CCOPT :=/s:=.*:=:" \ + -e "/^CCNOOPT :=/s:=.*:=:" \ + -e "/^CCDBG :=/s:=.*:=:" \ + -i build/makefiles/Makefile.{gcc,clang} + sed -e "/^INSTALL_ITEMS/s: /lib: /$(get_libdir):g" \ + -i Makefile || die + sed -e "/^libdir/s:/lib:/$(get_libdir):g" \ + -i ${NETSURF_PKGCONFIG:-${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_unpack() { default mv netsurf-2.9/${P} . || die @@ -40,17 +64,11 @@ src_prepare() { epatch "${FILESDIR}"/${P}-unused.patch epatch "${FILESDIR}"/${P}-autodetect.patch - sed -e "/^CCOPT :=/s:=.*:=:" \ - -i build/makefiles/Makefile.{gcc,clang} || die - sed -e '/^CFLAGS/s: -g : :' \ - -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_prepare +} - echo "Q := " >> Makefile.config - echo "CC := $(tc-getCC)" >> Makefile.config - echo "AR := $(tc-getAR)" >> Makefile.config +src_configure() { + netsurf_src_configure echo "NSFB_SDL_AVAILABLE := $(usex sdl)" >> Makefile.config echo "NSFB_VNC_AVAILABLE := $(usex vnc)" >> Makefile.config @@ -59,20 +77,15 @@ src_prepare() { } 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 usage } diff --git a/dev-libs/libnsfb/libnsfb-9999.ebuild b/dev-libs/libnsfb/libnsfb-9999.ebuild index 0b82774fdbc9..68895db3e195 100644 --- a/dev-libs/libnsfb/libnsfb-9999.ebuild +++ b/dev-libs/libnsfb/libnsfb-9999.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-libs/libnsfb/libnsfb-9999.ebuild,v 1.2 2013/02/27 08:00:54 xmw Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-libs/libnsfb/libnsfb-9999.ebuild,v 1.3 2013/02/28 07:39:57 xmw Exp $ EAPI=5 @@ -14,7 +14,7 @@ EGIT_REPO_URI="git://git.netsurf-browser.org/libnsfb.git" LICENSE="MIT" SLOT="0" KEYWORDS="" -IUSE="sdl static-libs vnc xcb" +IUSE="debug sdl static-libs vnc xcb" RDEPEND="sdl? ( media-libs/libsdl ) vnc? ( net-libs/libvncserver ) @@ -28,6 +28,30 @@ DEPEND="${RDEPEND} # we don't allow access to /dev/fb0 RESTRICT="test" +pkg_setup(){ + netsurf_src_prepare() { + sed -e "/^CCOPT :=/s:=.*:=:" \ + -e "/^CCNOOPT :=/s:=.*:=:" \ + -e "/^CCDBG :=/s:=.*:=:" \ + -i build/makefiles/Makefile.{gcc,clang} + sed -e "/^INSTALL_ITEMS/s: /lib: /$(get_libdir):g" \ + -i Makefile || die + sed -e "/^libdir/s:/lib:/$(get_libdir):g" \ + -i ${NETSURF_PKGCONFIG:-${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_unpack() { default git-2_src_unpack @@ -40,20 +64,17 @@ src_prepare() { #patch buildsystem from SRC_URI epatch "${FILESDIR}"/${PN}-0.0.2-autodetect.patch - sed -e "/^CCOPT :=/s:=.*:=:" \ - -i build/makefiles/Makefile.gcc || die + netsurf_src_prepare + sed -e '/^CFLAGS/s: -g : :' \ - -e "/^INSTALL_ITEMS/s: /lib: /$(get_libdir):g" \ -e "s/\$(eval \$(call pkg_config_get_variable,NSFB_XCBPROTO_VERSION,xcb,xcbproto_version))/NSFB_XCBPROTO_VERSION := $(pkg-config --variable=xcbproto_version xcb)/" \ -e "1iNSSHARED=${S}/build" \ -e "1iNSBUILD=${S}/build/makefiles" \ -i Makefile || die - sed -e "/^libdir/s:/lib:/$(get_libdir):g" \ - -i ${PN}.pc.in || die +} - echo "Q := " >> Makefile.config - echo "CC := $(tc-getCC)" >> Makefile.config - echo "AR := $(tc-getAR)" >> Makefile.config +src_configure() { + netsurf_src_configure echo "NSFB_SDL_AVAILABLE := $(usex sdl)" >> Makefile.config echo "NSFB_VNC_AVAILABLE := $(usex vnc)" >> Makefile.config @@ -62,20 +83,15 @@ src_prepare() { } 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 usage } |