public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Angelo Arrifano <miknix@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Subject: Re: [gentoo-dev] Announcement of The G Palmtop Environment ebuilds
Date: Sat, 07 Feb 2009 21:05:36 +0000	[thread overview]
Message-ID: <1234040736.13462.3.camel@localhost> (raw)
In-Reply-To: <498A3830.8060203@gentoo.org>

# Copyright 2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
#
# @ECLASS: gpe.eclass
# @MAINTAINER: <gpe@gentoo.org>
#
# Original Authors:
# Rene Wagner <rw@handhelds.org>
# Ned Ludd <solar@gentoo.org>
# Angelo Arrifano <miknix@gentoo.org>
#
# @BLURB: Provides common functionality for the G Palmtop Environment.
# @DESCRIPTION: Provides common functionality for the G Palmtop Environment.
#
# Thanks to:
# loki_val for EAPI->EAPI2 patch
# 
# Based on:
# gnome2.eclass and gpe.bbclass (the latter from OpenEmbedded)

inherit libtool toolchain-funcs

case "${EAPI:-0}" in
	0|1)
		EXPORT_FUNCTIONS src_unpack src_compile src_install
		;;
	*)
		EXPORT_FUNCTIONS src_unpack src_prepare src_configure src_compile src_install
		;;
esac

ELTCONF=""              # extra options passed to elibtoolize
GPE_DOCS=""             # documentation files to be installed with dodoc

[ -z "${GPE_MIRROR}" ] && GPE_MIRROR="http://gpe.linuxtogo.org/download/source"
[ -z "${GPE_TARBALL_SUFFIX}" ] && GPE_TARBALL_SUFFIX="gz"
SRC_URI="${GPE_MIRROR}/${P}.tar.${GPE_TARBALL_SUFFIX}"

HOMEPAGE="http://gpe.linuxtogo.org"

IUSE="nls"
GPECONF="${GPECONF} --enable-debug=no --disable-debug"

RDEPEND=""
DEPEND="
	>=dev-util/intltool-0.29
	>=dev-util/pkgconfig-0.12.0"

# @FUNCTION: gpe_src_unpack
# @DESCRIPTION: Unpacks and applies some required patches for GPE.
gpe_src_unpack() {
	unpack ${A}
	cd "${S}"
	has "${EAPI:-0}" 0 1 && gpe_src_prepare "$@"
}

# Do not call, use gpe_src_unpack() instead.
gpe_src_prepare() {
	# let portage handle stripping.
	for file in $(find . -name 'Makefile*') ; do
		sed -i  -e s/'install -s'/'install'/g \
			-e s/'install -Ds'/'install -D'/g \
			-e 's/$(INSTALL) -s/$(INSTALL) /g' \
			-e 's;strip ;#strip ;g' \
			${file} \
			||die "Sedding ${file} failed."
	done
	[[ -f configure ]] && elibtoolize
}

# @FUNCTION: gpe_src_configure
# @DESCRIPTION: Configures a GPE package in a cross-compile aware environment.
gpe_src_configure() {
	tc-export CC
	[[ -f configure ]] && econf "$@" ${GPECONF}
}

# @FUNCTION: gpe_src_compile
# @DESCRIPTION: (Cross-)Compiles a GPE package.
gpe_src_compile() {
	tc-export CC
	has "${EAPI:-0}" 0 1 && gpe_src_configure "$@"
	# miknix: Code belo must NOT die, some packages dont really build anything,
	# just install.
	emake PREFIX=/usr
}

# @FUNCTION: gpe_src_install
# @DESCRIPTION: Installs a GPE package in the correct way.
gpe_src_install() {
	local use_nls

	use_nls=yes
	use nls || use_nls=no

	if [ -f configure ]; then
		einstall "$@" || die "einstall failed"
	else
		emake DESTDIR=${D} ENABLE_NLS=${use_nls} \
			"$@" install || die "emake install failed"
	fi
	if [[ "${GPE_DOCS}" ]]; then
		dodoc ${GPE_DOCS} || die "dodoc failed"
	fi
}


Thanks all for the suggestions/patches
-- 
Angelo Arrifano <miknix@gentoo.org>
Gentoo Linux ARM/OMAP850 Developer




  reply	other threads:[~2009-02-07 21:04 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-03 15:34 [gentoo-dev] Announcement of The G Palmtop Environment ebuilds Angelo Arrifano
2009-02-03 16:28 ` Richard Freeman
2009-02-03 17:10   ` Angelo Arrifano
2009-02-03 18:48     ` Ned Ludd
2009-02-03 18:54       ` Richard Freeman
2009-02-03 19:24 ` Donnie Berkholz
2009-02-03 19:47   ` Donnie Berkholz
2009-02-03 20:13     ` Angelo Arrifano
2009-02-03 20:20       ` Ciaran McCreesh
2009-02-03 21:37       ` [gentoo-dev] " Duncan
2009-02-04 11:56 ` [gentoo-dev] " Petteri Räty
2009-02-04 14:03   ` Angelo Arrifano
2009-02-04 16:36     ` Petteri Räty
2009-02-05  0:37       ` Angelo Arrifano
2009-02-05  0:51         ` Ned Ludd
2009-02-05  0:52         ` Petteri Räty
2009-02-07 21:05           ` Angelo Arrifano [this message]
2009-02-08 21:38             ` Petteri Räty
2009-02-05 20:21       ` [gentoo-dev] " Ryan Hill
2009-02-05 21:17         ` Petteri Räty

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1234040736.13462.3.camel@localhost \
    --to=miknix@gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox