summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /eclass/gpe.eclass
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'eclass/gpe.eclass')
-rw-r--r--eclass/gpe.eclass115
1 files changed, 115 insertions, 0 deletions
diff --git a/eclass/gpe.eclass b/eclass/gpe.eclass
new file mode 100644
index 000000000000..e2146138532d
--- /dev/null
+++ b/eclass/gpe.eclass
@@ -0,0 +1,115 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# @ECLASS: gpe.eclass
+# @MAINTAINER:
+# gpe@gentoo.org
+# @AUTHOR:
+# Original Authors:
+# Rene Wagner <rw@handhelds.org>
+# Ned Ludd <solar@gentoo.org>
+# Angelo Arrifano <miknix@gentoo.org>
+# EAPI->EAPI2 patch: loki_val
+# multiple suggestions: Betelgeuse
+# Based on gnome2.eclass and gpe.bbclass (the latter from OpenEmbedded)
+# @BLURB: Provides common functionality for the G Palmtop Environment.
+
+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
+
+# @ECLASS-VARIABLE: ELTCONF
+# @DESCRIPTION:
+# Extra options passed to elibtoolize on gnome2 eclass.
+ELTCONF=""
+
+# @ECLASS-VARIABLE: GPE_DOCS
+# @DESCRIPTION:
+# Documentation files to be installed with dodoc.
+GPE_DOCS=""
+
+[[ -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
+ virtual/pkgconfig"
+
+# @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.
+ # sort is needed, see #272161 .
+ for file in $(find . -name 'Makefile*' | sort) ; 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 "$@"
+ emake PREFIX=/usr || die "emake failed"
+}
+
+# @FUNCTION: gpe_src_install
+# @DESCRIPTION:
+# Installs a GPE package in the correct way.
+gpe_src_install() {
+ local use_nls=yes
+
+ use nls || use_nls=no
+
+ if [ -f configure ]; then
+ einstall "$@" || die "einstall failed"
+ else
+ emake STRIP=true DESTDIR=${D} PREFIX=/usr \
+ ENABLE_NLS=${use_nls} "$@" install || die "emake install failed"
+ fi
+
+ use nls || rm -rf ${D}/usr/share/locale
+
+ # manual document installation
+ if [[ "${GPE_DOCS}" ]]; then
+ dodoc ${GPE_DOCS} || die "dodoc failed"
+ fi
+}