summaryrefslogtreecommitdiff
path: root/eclass/xemacs-packages.eclass
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /eclass/xemacs-packages.eclass
reinit the tree, so we can have metadata
Diffstat (limited to 'eclass/xemacs-packages.eclass')
-rw-r--r--eclass/xemacs-packages.eclass59
1 files changed, 59 insertions, 0 deletions
diff --git a/eclass/xemacs-packages.eclass b/eclass/xemacs-packages.eclass
new file mode 100644
index 000000000000..a40487bae78e
--- /dev/null
+++ b/eclass/xemacs-packages.eclass
@@ -0,0 +1,59 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# @ECLASS: xemacs-packages.eclass
+# @MAINTAINER:
+# xemacs@gentoo.org
+# @BLURB: Eclass to support elisp packages distributed by XEmacs.
+# @DESCRIPTION:
+# This eclass supports ebuilds for packages distributed by XEmacs.
+
+# @ECLASS-VARIABLE: XEMACS_PKG_CAT
+# @REQUIRED
+# @DESCRIPTION:
+# The package category that the package is in. Can be either standard,
+# mule, or contrib.
+
+# @ECLASS-VARIABLE: XEMACS_EXPERIMENTAL
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# If set then the package is downloaded from the experimental packages
+# repository, which is the staging area for packages upstream. Packages
+# in the experimental repository are auto-generated from XEmacs VCS, so
+# they may not be well-tested.
+
+EXPORT_FUNCTIONS src_unpack src_install
+
+RDEPEND="app-editors/xemacs"
+S="${WORKDIR}"
+
+: ${HOMEPAGE:="http://xemacs.org/"}
+: ${LICENSE:="GPL-2+"}
+
+# Backwards compatibility code, to be removed after 2017-05-03
+: ${XEMACS_PKG_CAT:=${PKG_CAT}}
+: ${XEMACS_EXPERIMENTAL:=${EXPERIMENTAL}}
+
+if [[ -n ${XEMACS_EXPERIMENTAL} ]]; then
+ : ${SRC_URI:="http://ftp.xemacs.org/pub/xemacs/beta/experimental/packages/${P}-pkg.tar.gz"}
+else
+ : ${SRC_URI:="http://ftp.xemacs.org/pub/xemacs/packages/${P}-pkg.tar.gz"}
+fi
+
+xemacs-packages_src_unpack() { :; }
+
+xemacs-packages_src_install() {
+ local install_dir
+
+ case ${XEMACS_PKG_CAT} in
+ standard) install_dir="/usr/lib/xemacs/xemacs-packages" ;;
+ mule) install_dir="/usr/lib/xemacs/mule-packages" ;;
+ contrib) install_dir="/usr/lib/xemacs/site-packages" ;;
+ *) die "Unsupported package category in XEMACS_PKG_CAT (or unset)" ;;
+ esac
+ debug-print "install_dir is ${install_dir}"
+
+ dodir "${install_dir}"
+ cd "${D}${EPREFIX}${install_dir}" || die
+ unpack ${A}
+}