dev-perl/Audio-Scan: Cleanup old 1.0.0
[gentoo.git] / eclass / xemacs-packages.eclass
1 # Copyright 1999-2017 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 # @ECLASS-VARIABLE: XEMACS_PKG_CAT
12 # @REQUIRED
13 # @DESCRIPTION:
14 # The package category that the package is in. Can be either standard,
15 # mule, or contrib.
16
17 # @ECLASS-VARIABLE: XEMACS_EXPERIMENTAL
18 # @DEFAULT_UNSET
19 # @DESCRIPTION:
20 # If set then the package is downloaded from the experimental packages
21 # repository, which is the staging area for packages upstream. Packages
22 # in the experimental repository are auto-generated from XEmacs VCS, so
23 # they may not be well-tested.
24
25 EXPORT_FUNCTIONS src_unpack src_install
26
27 RDEPEND="app-editors/xemacs"
28 S="${WORKDIR}"
29
30 : ${HOMEPAGE:="http://xemacs.org/"}
31 : ${LICENSE:="GPL-2+"}
32
33 # Backwards compatibility code, to be removed after 2017-05-03
34 : ${XEMACS_PKG_CAT:=${PKG_CAT}}
35 : ${XEMACS_EXPERIMENTAL:=${EXPERIMENTAL}}
36
37 if [[ -n ${XEMACS_EXPERIMENTAL} ]]; then
38         : ${SRC_URI:="http://ftp.xemacs.org/pub/xemacs/beta/experimental/packages/${P}-pkg.tar.gz"}
39 else
40         : ${SRC_URI:="http://ftp.xemacs.org/pub/xemacs/packages/${P}-pkg.tar.gz"}
41 fi
42
43 xemacs-packages_src_unpack() { :; }
44
45 xemacs-packages_src_install() {
46         local install_dir
47
48         case ${XEMACS_PKG_CAT} in
49                 standard) install_dir="/usr/lib/xemacs/xemacs-packages" ;;
50                 mule)     install_dir="/usr/lib/xemacs/mule-packages"   ;;
51                 contrib)  install_dir="/usr/lib/xemacs/site-packages"   ;;
52                 *) die "Unsupported package category in XEMACS_PKG_CAT (or unset)" ;;
53         esac
54         debug-print "install_dir is ${install_dir}"
55
56         dodir "${install_dir}"
57         cd "${D}${EPREFIX}${install_dir}" || die
58         unpack ${A}
59 }