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