| 1 |
# Copyright 1999-2011 Gentoo Foundation
|
| 2 |
# Distributed under the terms of the GNU General Public License v2
|
| 3 |
# $Header: /var/cvsroot/gentoo-x86/eclass/xemacs-packages.eclass,v 1.18 2011/06/04 07:53:54 graaff Exp $
|
| 4 |
|
| 5 |
# @ECLASS: xemacs-packages.eclass
|
| 6 |
# @MAINTAINER:
|
| 7 |
# xemacs@gentoo.org
|
| 8 |
# @BLURB: Eclass to support elisp packages distributed by XEmacs.
|
| 9 |
# @DESCRIPTION:
|
| 10 |
# This eclass supports ebuilds for packages distributed by XEmacs.
|
| 11 |
|
| 12 |
EXPORT_FUNCTIONS src_unpack src_compile src_install
|
| 13 |
|
| 14 |
RDEPEND="${RDEPEND} app-editors/xemacs"
|
| 15 |
DEPEND="${DEPEND}"
|
| 16 |
|
| 17 |
[ -z "$HOMEPAGE" ] && HOMEPAGE="http://xemacs.org/"
|
| 18 |
[ -z "$LICENSE" ] && LICENSE="GPL-2"
|
| 19 |
|
| 20 |
# @ECLASS-VARIABLE: PKG_CAT
|
| 21 |
# @REQUIRED
|
| 22 |
# @DESCRIPTION:
|
| 23 |
# The package category that the package is in. Can be either standard,
|
| 24 |
# mule, or contrib.
|
| 25 |
|
| 26 |
case "${PKG_CAT}" in
|
| 27 |
"standard" )
|
| 28 |
MY_INSTALL_DIR="/usr/lib/xemacs/xemacs-packages" ;;
|
| 29 |
|
| 30 |
"mule" )
|
| 31 |
MY_INSTALL_DIR="/usr/lib/xemacs/mule-packages" ;;
|
| 32 |
|
| 33 |
"contrib" )
|
| 34 |
MY_INSTALL_DIR="/usr/lib/xemacs/site-packages" ;;
|
| 35 |
*)
|
| 36 |
die "Unsupported package category in PKG_CAT (or unset)" ;;
|
| 37 |
esac
|
| 38 |
[ -n "$DEBUG" ] && einfo "MY_INSTALL_DIR is ${MY_INSTALL_DIR}"
|
| 39 |
|
| 40 |
# @ECLASS-VARIABLE: EXPERIMENTAL
|
| 41 |
# @DEFAULT_UNSET
|
| 42 |
# @DESCRIPTION:
|
| 43 |
# If set then the package is downloaded from the experimental packages
|
| 44 |
# repository, which is the staging area for packages upstream. Packages
|
| 45 |
# in the experimental repository are auto-generated from XEmacs VCS, so
|
| 46 |
# they may not be well-tested.
|
| 47 |
|
| 48 |
if [ -n "$EXPERIMENTAL" ]
|
| 49 |
then
|
| 50 |
[ -z "$SRC_URI" ] && SRC_URI="http://ftp.xemacs.org/pub/xemacs/beta/experimental/packages/${P}-pkg.tar.gz"
|
| 51 |
else
|
| 52 |
[ -z "$SRC_URI" ] && SRC_URI="http://ftp.xemacs.org/pub/xemacs/packages/${P}-pkg.tar.gz"
|
| 53 |
fi
|
| 54 |
[ -n "$DEBUG" ] && einfo "SRC_URI is ${SRC_URI}"
|
| 55 |
|
| 56 |
xemacs-packages_src_unpack() {
|
| 57 |
return 0
|
| 58 |
}
|
| 59 |
|
| 60 |
xemacs-packages_src_compile() {
|
| 61 |
einfo "Nothing to compile"
|
| 62 |
}
|
| 63 |
|
| 64 |
xemacs-packages_src_install() {
|
| 65 |
dodir ${MY_INSTALL_DIR}
|
| 66 |
cd "${D}${MY_INSTALL_DIR}"
|
| 67 |
unpack ${A}
|
| 68 |
}
|