1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
4 # @ECLASS: xemacs-packages.eclass
7 # @BLURB: Eclass to support elisp packages distributed by XEmacs.
9 # This eclass supports ebuilds for packages distributed by XEmacs.
11 # @ECLASS-VARIABLE: XEMACS_PKG_CAT
14 # The package category that the package is in. Can be either standard,
17 # @ECLASS-VARIABLE: XEMACS_EXPERIMENTAL
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.
25 EXPORT_FUNCTIONS src_unpack src_install
27 RDEPEND="app-editors/xemacs"
30 : ${HOMEPAGE:="http://xemacs.org/"}
31 : ${LICENSE:="GPL-2+"}
33 # Backwards compatibility code, to be removed after 2017-05-03
34 : ${XEMACS_PKG_CAT:=${PKG_CAT}}
35 : ${XEMACS_EXPERIMENTAL:=${EXPERIMENTAL}}
37 if [[ -n ${XEMACS_EXPERIMENTAL} ]]; then
38 : ${SRC_URI:="http://ftp.xemacs.org/pub/xemacs/beta/experimental/packages/${P}-pkg.tar.gz"}
40 : ${SRC_URI:="http://ftp.xemacs.org/pub/xemacs/packages/${P}-pkg.tar.gz"}
43 xemacs-packages_src_unpack() { :; }
45 xemacs-packages_src_install() {
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)" ;;
54 debug-print "install_dir is ${install_dir}"
56 dodir "${install_dir}"
57 cd "${D}${EPREFIX}${install_dir}" || die