From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from pigeon.gentoo.org ([69.77.167.62] helo=lists.gentoo.org)
	by finch.gentoo.org with esmtp (Exim 4.60)
	(envelope-from <gentoo-dev+bounces-34195-garchives=archives.gentoo.org@lists.gentoo.org>)
	id 1LUjTa-0007Ll-Q9
	for garchives@archives.gentoo.org; Wed, 04 Feb 2009 15:15:43 +0000
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 35A50E076F;
	Wed,  4 Feb 2009 15:02:47 +0000 (UTC)
Received: from smtp.gentoo.org (unknown [140.211.166.183])
	by pigeon.gentoo.org (Postfix) with ESMTP id 1194BE076F
	for <gentoo-dev@lists.gentoo.org>; Wed,  4 Feb 2009 15:02:47 +0000 (UTC)
Received: from [10.0.0.8] (unknown [81.193.83.20])
	(using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTP id 24E1064B2D;
	Wed,  4 Feb 2009 14:02:42 +0000 (UTC)
Subject: Re: [gentoo-dev] Announcement of The G Palmtop Environment ebuilds
From: Angelo Arrifano <miknix@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Cc: betelgeuse@gentoo.org
In-Reply-To: <4989827F.3000907@gentoo.org>
References: <1233675279.6250.95.camel@localhost>
	 <4989827F.3000907@gentoo.org>
Content-Type: text/plain; charset=UTF-8
Organization: Gentoo Linux ARM/OMAP850 Developer
Date: Wed, 04 Feb 2009 14:03:27 +0000
Message-Id: <1233756207.22368.29.camel@localhost>
Precedence: bulk
List-Post: <mailto:gentoo-dev@lists.gentoo.org>
List-Help: <mailto:gentoo-dev+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-dev+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-dev+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-dev.gentoo.org>
X-BeenThere: gentoo-dev@lists.gentoo.org
Reply-to: gentoo-dev@lists.gentoo.org
Mime-Version: 1.0
X-Mailer: Evolution 2.22.3.1 
Content-Transfer-Encoding: quoted-printable
X-Archives-Salt: 8d2f6a5c-ad94-49ba-90f1-4b22a357c8c2
X-Archives-Hash: f968d58a6e4d54981741118acdd20b80

On Qua, 2009-02-04 at 13:56 +0200, Petteri R=C3=A4ty wrote:
> Angelo Arrifano wrote:
> >=20
> > 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.
> >=20
>=20
> Please start by posting the new eclasses for review then.
>=20
> Regards,
> Petteri
>=20

# Copyright 2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
#
# Authors:
# Rene Wagner <rw@handhelds.org>
# Ned Ludd <solar@gentoo.org>
# Angelo Arrifano <miknix@gentoo.org>

# based on gnome2.eclass and gpe.bbclass (the latter from OpenEmbedded)

inherit libtool toolchain-funcs

# GPE ECLASS
#GPECONF=3D""             # extra configure opts passed to econf
ELTCONF=3D""              # extra options passed to elibtoolize
DOCS=3D""                 # documentation files to be installed with dodo=
c

[ -z "${GPE_MIRROR}" ] && export GPE_MIRROR=3D"http://gpe.linuxtogo.org/d=
ownload/source"

[ -z "${GPE_TARBALL_SUFFIX}" ] && export GPE_TARBALL_SUFFIX=3D"gz"

SRC_URI=3D"${GPE_MIRROR}/${PN}-${PV}.tar.${GPE_TARBALL_SUFFIX}"
HOMEPAGE=3D"http://gpe.handhelds.org/"

IUSE=3D"${IUSE} nls"
GPECONF=3D"${GPECONF} --enable-debug=3Dno --disable-debug"

RDEPEND=3D""
DEPEND=3D">=3Ddev-util/intltool-0.29 >=3Ddev-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=3D/usr || die "compile failure"
}

gpe_src_install() {
	USE_NLS=3Dyes
	use nls || USE_NLS=3Dno

	if [ -f configure ]; then
		einstall "$@"
	else
		make DESTDIR=3D${D} PREFIX=3D/usr \
			STRIP=3Dtrue ENABLE_NLS=3D${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