On Qua, 2009-02-04 at 13:56 +0200, Petteri Räty wrote: > Angelo Arrifano wrote: > > > > Since we are maintaining this over half a year now, we think that its > > time to finally starting moving step-by-step the GPE suite into the > > portage tree - starting with the eclass and toplevel categories. > > > > Please start by posting the new eclasses for review then. > > Regards, > Petteri >
# Copyright 2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ # # Authors: # Rene Wagner <r...@handhelds.org> # Ned Ludd <so...@gentoo.org> # Angelo Arrifano <mik...@gentoo.org> # based on gnome2.eclass and gpe.bbclass (the latter from OpenEmbedded) inherit libtool toolchain-funcs # GPE ECLASS #GPECONF="" # extra configure opts passed to econf ELTCONF="" # extra options passed to elibtoolize DOCS="" # documentation files to be installed with dodoc [ -z "${GPE_MIRROR}" ] && export GPE_MIRROR="http://gpe.linuxtogo.org/download/source" [ -z "${GPE_TARBALL_SUFFIX}" ] && export GPE_TARBALL_SUFFIX="gz" SRC_URI="${GPE_MIRROR}/${PN}-${PV}.tar.${GPE_TARBALL_SUFFIX}" HOMEPAGE="http://gpe.handhelds.org/" IUSE="${IUSE} nls" GPECONF="${GPECONF} --enable-debug=no --disable-debug" RDEPEND="" DEPEND=">=dev-util/intltool-0.29 >=dev-util/pkgconfig-0.12.0" gpe_src_configure() { tc-export CC if [ -f configure ]; then elibtoolize ${ELTCONF} econf "$@" ${GPECONF} || die "./configure failure" fi } gpe_src_compile() { tc-export CC has "${EAPI:-0}" 0 1 && gpe_src_configure "$@" emake PREFIX=/usr || die "compile failure" } gpe_src_install() { USE_NLS=yes use nls || USE_NLS=no if [ -f configure ]; then einstall "$@" else make DESTDIR=${D} PREFIX=/usr \ STRIP=true ENABLE_NLS=${USE_NLS} \ "$@" install fi # manual document installation [ -n "${DOCS}" ] && dodoc ${DOCS} } gpe_src_unpack() { unpack ${A} cd "${S}" # let portage handle stripping. for x in $(find "${S}" -name 'Makefile*') ; do sed -i -e s/'install -s'/'install'/g \ -e s/'install -Ds'/'install -D'/g \ -e 's/$(INSTALL) -s/$(INSTALL) /g' $x done } EXPORT_FUNCTIONS src_compile src_install src_unpack