diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2020-01-16 16:18:18 +0000 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2020-01-16 16:18:18 +0000 |
commit | 0704956f7256f1f618cc5e03af2c1dbd0e83dbc5 (patch) | |
tree | 881671532c0c3c82ebd4523b6d6cbc8ace982aae /eclass | |
parent | 21435953e16cda318a82334ddbadb3b5c36d9ea7 (diff) |
gentoo resync : 16.01.2020
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/Manifest.gz | bin | 38095 -> 37122 bytes | |||
-rw-r--r-- | eclass/bsdmk.eclass | 89 | ||||
-rw-r--r-- | eclass/games-mods.eclass | 324 | ||||
-rw-r--r-- | eclass/obs-download.eclass | 45 | ||||
-rw-r--r-- | eclass/sgml-catalog.eclass | 106 | ||||
-rw-r--r-- | eclass/xemacs-elisp-common.eclass | 315 | ||||
-rw-r--r-- | eclass/xemacs-elisp.eclass | 59 |
7 files changed, 0 insertions, 938 deletions
diff --git a/eclass/Manifest.gz b/eclass/Manifest.gz Binary files differindex 0b040b97cfa9..890647fddb2b 100644 --- a/eclass/Manifest.gz +++ b/eclass/Manifest.gz diff --git a/eclass/bsdmk.eclass b/eclass/bsdmk.eclass deleted file mode 100644 index 2f9c3f3609d4..000000000000 --- a/eclass/bsdmk.eclass +++ /dev/null @@ -1,89 +0,0 @@ -# Copyright 1999-2011 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -# @DEAD -# All consumers are gone. Removal in 14 days - -# @ECLASS: bsdmk.eclass -# @MAINTAINER: -# maintainer-needed@gentoo.org -# @BLURB: Some functions for BSDmake - -inherit toolchain-funcs portability flag-o-matic - -EXPORT_FUNCTIONS src_compile src_install - -RDEPEND="" -# this should actually be BDEPEND, but this works. -DEPEND="virtual/pmake" - -ESED="/usr/bin/sed" - -# @ECLASS-VARIABLE: mymakeopts -# @DESCRIPTION: -# Options for bsd-make - -# @FUNCTION: append-opt -# @USAGE: < options > -# @DESCRIPTION: -# append options to enable or disable features -append-opt() { - mymakeopts="${mymakeopts} $@" -} - -# @FUNCTION: mkmake -# @USAGE: [ options ] -# @DESCRIPTION: -# calls bsd-make command with the given options, passing ${mymakeopts} to -# enable ports to useflags bridge. -mkmake() { - [[ -z ${BMAKE} ]] && BMAKE="$(get_bmake)" - - tc-export CC CXX LD RANLIB - - set -- ${BMAKE} ${MAKEOPTS} ${EXTRA_EMAKE} ${mymakeopts} NO_WERROR= STRIP= "$@" - echo "${@}" - "${@}" -} - -# @FUNCTION: mkinstall -# @USAGE: [ options ] -# @DESCRIPTION: -# Calls "bsd-make install" with the given options, passing ${mamakeopts} to -# enable ports to useflags bridge -mkinstall() { - [[ -z ${BMAKE} ]] && BMAKE="$(get_bmake)" - - # STRIP= will replace the default value of -s, leaving to portage the - # task of stripping executables. - set -- ${BMAKE} ${mymakeopts} NO_WERROR= STRIP= MANSUBDIR= DESTDIR="${D}" "$@" install - echo "${@}" - "${@}" -} - -# @FUNCTION: dummy_mk -# @USAGE: < dirnames > -# @DESCRIPTION: -# removes the specified subdirectories and creates a dummy makefile in them -# useful to remove the need for "minimal" patches -dummy_mk() { - for dir in $@; do - [ -d ${dir} ] || ewarn "dummy_mk called on a non-existing directory: $dir" - [ -f ${dir}/Makefile ] || ewarn "dummy_mk called on a directory without Makefile: $dir" - echo ".include <bsd.lib.mk>" > ${dir}/Makefile - done -} - -# @FUNCTION: bsdmk_src_compile -# @DESCRIPTION: -# The bsdmk src_compile function, which is exported -bsdmk_src_compile() { - mkmake "$@" || die "make failed" -} - -# @FUNCTION: bsdmk_src_install -# @DESCRIPTION: -# The bsdmk src_install function, which is exported -bsdmk_src_install() { - mkinstall "$@" || die "install failed" -} diff --git a/eclass/games-mods.eclass b/eclass/games-mods.eclass deleted file mode 100644 index d0d72eb83ebb..000000000000 --- a/eclass/games-mods.eclass +++ /dev/null @@ -1,324 +0,0 @@ -# Copyright 1999-2019 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -# @DEAD -# All consumers are gone. -# Bug #156882, #574642, #637740. Removal in 14 days. - -# Variables to specify in an ebuild which uses this eclass: -# GAME - (doom3, quake4 or ut2004, etc), unless ${PN} starts with e.g. "doom3-" -# MOD_DESC - Description for the mod -# MOD_NAME - Creates a command-line wrapper and desktop icon for the mod -# MOD_DIR - Subdirectory name for the mod, if applicable -# MOD_ICON - Custom icon for the mod, instead of the default - -inherit eutils games - -EXPORT_FUNCTIONS src_install pkg_postinst - -[[ -z ${GAME} ]] && GAME=${PN%%-*} - -case ${GAME} in - doom3) - GAME_PKGS="games-fps/doom3" - GAME_DIRS=( "${GAMES_PREFIX_OPT}"/doom3 ) - GAME_NAME="Doom 3" - GAME_BIN="doom3" - GAME_ICON="doom3" - DED_PKGS="" - DED_BIN="doom3-ded" - DED_OPTS="+set dedicated 1 +exec server.cfg" - DED_CFG_DIR=".doom3" - SELECT_MOD="+set fs_game " - ;; - enemy-territory) - GAME_PKGS="games-fps/enemy-territory" - GAME_DIRS=( "${GAMES_PREFIX_OPT}"/enemy-territory ) - GAME_NAME="Enemy Territory" - GAME_BIN="et" - GAME_ICON="ET" - DED_PKGS="" - DED_BIN="et-ded" - DED_OPTS="+set dedicated 1 +exec server.cfg" - DED_CFG_DIR=".etwolf" - SELECT_MOD="+set fs_game " - ;; - quake3) - GAME_PKGS="games-fps/quake3 games-fps/quake3-bin" - GAME_DIRS=( "${GAMES_DATADIR}"/quake3 "${GAMES_PREFIX_OPT}"/quake3 ) - GAME_NAME="Quake III" - GAME_BIN="quake3" - GAME_ICON="quake3" - DED_PKGS="" - DED_BIN="quake3-ded" - DED_OPTS="+set dedicated 1 +exec server.cfg" - DED_CFG_DIR=".q3a" - SELECT_MOD="+set fs_game " - ;; - quake4) - GAME_PKGS="games-fps/quake4-bin" - GAME_DIRS=( "${GAMES_PREFIX_OPT}"/quake4 ) - GAME_NAME="Quake 4" - GAME_BIN="quake4" - GAME_ICON="/usr/share/pixmaps/quake4.bmp" - DED_PKGS="" - DED_BIN="quake4-ded" - DED_OPTS="+set dedicated 1 +exec server.cfg" - DED_CFG_DIR=".quake4" - SELECT_MOD="+set fs_game " - ;; - ut2003) - GAME_PKGS="games-fps/ut2003" - GAME_DIRS=( "${GAMES_PREFIX_OPT}"/ut2003 ) - GAME_NAME="UT2003" - GAME_BIN="ut2003" - GAME_ICON="ut2003" - DED_PKGS="" - DED_BIN="ucc" - DED_OPTS="" - DED_CFG_DIR="" - SELECT_MOD="-mod=" - ;; - ut2004) - GAME_PKGS="games-fps/ut2004" - GAME_DIRS=( "${GAMES_PREFIX_OPT}"/{ut2004,ut2004-ded} ) - GAME_NAME="UT2004" - GAME_BIN="ut2004" - GAME_ICON="ut2004" - DED_PKGS="games-server/ut2004-ded" - DED_BIN="ut2004-ded" - DED_OPTS="" - DED_CFG_DIR="" - SELECT_MOD="-mod=" - ;; - *) - eerror "This game is either not supported or you must set the GAME" - eerror "variable to the proper game." - die "games-mods.eclass: unsupported GAME" - ;; -esac - -MOD_BIN="${GAME_BIN}-${PN/${GAME}-}" -MOD_DED_BIN="${MOD_BIN}-ded" - -games-mods_get_rdepend() { - local pkgs - - if [[ ${1} == "--ded" ]] ; then - pkgs=( ${DED_PKGS} ${GAME_PKGS} ) - else - pkgs=( ${GAME_PKGS} ) - fi - - [[ ${#pkgs[@]} -gt 1 ]] && echo -n "|| ( " - - case ${EAPI:-0} in - 0|1) echo -n "${pkgs[@]}" ;; - [23456]) - local p - if [[ ${1} == "--ded" ]] ; then - echo -n "${DED_PKGS}" - for p in ${GAME_PKGS} ; do - echo -n " ${p}[dedicated]" - done - else - for p in ${GAME_PKGS} ; do - echo -n " || ( ${p}[opengl] ${p}[-dedicated] )" - done - fi - ;; - *) die "EAPI ${EAPI} not supported" - esac - - [[ ${#pkgs[@]} -gt 1 ]] && echo -n " )" -} - -DESCRIPTION="${GAME_NAME} ${MOD_NAME} - ${MOD_DESC}" - -SLOT="0" -IUSE="dedicated opengl" -RESTRICT="bindist mirror strip" - -DEPEND="app-arch/unzip" -RDEPEND="dedicated? ( $(games-mods_get_rdepend --ded) ) - opengl? ( $(games-mods_get_rdepend) ) - !dedicated? ( !opengl? ( $(games-mods_get_rdepend) ) )" - -S=${WORKDIR} - -INS_DIR=${GAMES_DATADIR}/${GAME} - -games-mods_use_opengl() { - [[ -z ${MOD_DIR} ]] && return 1 - - if use opengl || ! use dedicated ; then - # Use opengl by default - return 0 - fi - - return 1 -} - -games-mods_use_dedicated() { - [[ -z ${MOD_DIR} ]] && return 1 - - use dedicated && return 0 || return 1 -} - -games-mods_dosyms() { - # We are installing everything for these mods into ${INS_DIR}, - # ${GAMES_DATADIR}/${GAME} in most cases, and symlinking it - # into ${GAMES_PREFIX_OPT}/${GAME} for each game. This should - # allow us to support both binary and source-based games easily. - local dir - for dir in "${GAME_DIRS[@]}" ; do - [[ -z ${dir} || ${INS_DIR} == ${dir} ]] && continue - pushd "${D}/${INS_DIR}" > /dev/null || die "pushd failed" - local i - for i in * ; do - if [[ -d ${i} ]] ; then - if [[ ${i} == ${MOD_DIR} ]] ; then - dosym "${INS_DIR}/${i}" "${dir}/${i}" \ - || die "dosym ${i} failed" - else - local f - while read f ; do - dosym "${INS_DIR}/${f}" "${dir}/${f}" \ - || die "dosym ${f} failed" - done < <(find "${i}" -type f) - fi - elif [[ -f ${i} ]] ; then - dosym "${INS_DIR}/${i}" "${dir}/${i}" \ - || die "dosym ${i} failed" - else - die "${i} shouldn't be there" - fi - done - popd > /dev/null || die "popd failed" - done -} - -games-mods_make_initd() { - cat <<EOF > "${T}"/${MOD_DED_BIN} -#!/sbin/openrc-run -# Copyright 1999-2016 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# Generated by games-mods.eclass - -depend() { - need net -} - -start() { - ebegin "Starting ${MOD_DED_BIN}" - start-stop-daemon --start --quiet --background --make-pidfile \\ - --pidfile /var/run/${MOD_DED_BIN}.pid \\ - --chuid \${${MOD_DED_BIN//-/_}_user}:\${${MOD_DED_BIN//-/_}_group} \\ - --env HOME="\${${MOD_DED_BIN//-/_}_home}" \\ - --exec "${GAMES_BINDIR}/${MOD_DED_BIN}" \\ - -- \${${MOD_DED_BIN//-/_}_opts} - eend \$? -} - -stop() { - ebegin "Stopping ${MOD_DED_BIN}" - start-stop-daemon --stop \\ - --pidfile /var/run/${MOD_DED_BIN}.pid - eend \$? -} -EOF - - doinitd "${T}"/${MOD_DED_BIN} || die "doinitd failed" -} - -games-mods_make_confd() { - cat <<-EOF > "${T}"/${MOD_DED_BIN} - # User and group the server should run as - ${MOD_DED_BIN//-/_}_user="${GAMES_USER_DED}" - ${MOD_DED_BIN//-/_}_group="${GAMES_GROUP}" - - # Directory to use for HOME - ${MOD_DED_BIN//-/_}_home="${GAMES_PREFIX}" - - # Any extra options you want to pass to the dedicated server - ${MOD_DED_BIN//-/_}_opts="" - EOF - - doconfd "${T}"/${MOD_DED_BIN} || die "doconfd failed" -} - -games-mods_src_install() { - if games-mods_use_opengl ; then - if [[ -n ${MOD_ICON} ]] ; then - # Install custom icon - local ext=${MOD_ICON##*.} - if [[ -f ${MOD_ICON} ]] ; then - newicon "${MOD_ICON}" ${PN}.${ext} || die "newicon failed" - else - newicon ${MOD_DIR}/"${MOD_ICON}" ${PN}.${ext} \ - || die "newicon failed" - fi - case ${ext} in - bmp|ico) - MOD_ICON=/usr/share/pixmaps/${PN}.${ext} - ;; - *) - MOD_ICON=${PN} - ;; - esac - else - # Use the game's standard icon - MOD_ICON=${GAME_ICON} - fi - - games_make_wrapper ${MOD_BIN} "${GAME_BIN} ${SELECT_MOD}${MOD_DIR}" - make_desktop_entry ${MOD_BIN} "${GAME_NAME} - ${MOD_NAME}" "${MOD_ICON}" - # Since only quake3 has both a binary and a source-based install, - # we only look for quake3 here. - case ${GAME} in - quake3) - if has_version games-fps/quake3-bin ; then - games_make_wrapper ${GAME_BIN}-bin-${PN/${GAME}-} \ - "${GAME_BIN}-bin ${SELECT_MOD}${MOD_DIR}" - fi - make_desktop_entry ${GAME_BIN}-bin-${PN/${GAME}-} \ - "${GAME_NAME} - ${MOD_NAME} (binary)" "${MOD_ICON}" - ;; - esac - fi - - # We expect anything not wanted to have been deleted by the ebuild - insinto "${INS_DIR}" - doins -r * || die "doins -r failed" - games-mods_dosyms - - if games-mods_use_dedicated ; then - if [[ -f ${FILESDIR}/server.cfg ]] ; then - insinto "${GAMES_SYSCONFDIR}"/${GAME}/${MOD_DIR} - doins "${FILESDIR}"/server.cfg || die "doins server.cfg failed" - dosym "${GAMES_SYSCONFDIR}"/${GAME}/${MOD_DIR}/server.cfg \ - "${GAMES_PREFIX}"/${DED_CFG_DIR}/${MOD_DIR}/server.cfg \ - || die "dosym server.cfg failed" - fi - games_make_wrapper ${MOD_DED_BIN} \ - "\"${GAMES_BINDIR}/${DED_BIN}\" ${SELECT_MOD}${MOD_DIR} ${DED_OPTS}" - games-mods_make_initd - games-mods_make_confd - fi - - prepgamesdirs -} - -games-mods_pkg_postinst() { - games_pkg_postinst - if games-mods_use_opengl ; then - elog "To play this mod run:" - elog " ${MOD_BIN}" - fi - if games-mods_use_dedicated ; then - elog "To launch a dedicated server run:" - elog " ${MOD_DED_BIN}" - elog "To launch the server at startup run:" - elog " rc-update add ${MOD_DED_BIN} default" - fi -} diff --git a/eclass/obs-download.eclass b/eclass/obs-download.eclass deleted file mode 100644 index d700f18edbd4..000000000000 --- a/eclass/obs-download.eclass +++ /dev/null @@ -1,45 +0,0 @@ -# Copyright 1999-2012 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -# @DEAD -# All consumers were last rited. Removal in 30 days. - -# @ECLASS: obs-download.eclass -# @MAINTAINER: -# maintainer-needed@gentoo.org -# @BLURB: Simplifies downloading from openSUSE Build Service. -# @DESCRIPTION: -# This eclass constructs OBS_URI based on provided project in openSUSE Build -# Service and package name. It can be used by packages/eclasses to download -# actual files. -# -# All you need to do in order to use it is set OBS_PROJECT and OBS_PACKAGE and -# inherit this eclass. It will provide OBS_URI in return which you will prepend -# to your files and use it in SRC_URI. Alternatively you can just set -# OPENSUSE_RELEASE and OBS_PACKAGE and it will give you back OBS_URI for -# downloading files from obs project corresponding to the specified openSUSE -# release. - -# @ECLASS-VARIABLE: OPENSUSE_RELEASE -# @DEFAULT_UNSET -# @DESCRIPTION: -# From which openSUSE realease to take files. -# Eg.: 12.1, 12.2, Factory - -# @ECLASS-VARIABLE: OBS_PROJECT -# @DEFAULT_UNSET -# @DESCRIPTION: -# In which obs project pakage is. -# This variable does not have to be set and is overridden, if -# OPENSUSE_RELEASE is provided. - -# @ECLASS-VARIABLE: OBS_PACKAGE -# @DESCRIPTION: -# Name of the package we want to take files from. -# By default taken from ${PN}. - -[[ -z ${OPENSUSE_RELEASE} ]] || OBS_PROJECT="openSUSE:${OPENSUSE_RELEASE}" -[[ -n ${OBS_PROJECT} ]] || die "OBS_PROJECT not set!" -[[ -n ${OBS_PACKAGE} ]] || OBS_PACKAGE="${PN}" - -OBS_URI="https://api.opensuse.org/public/source/${OBS_PROJECT}/${OBS_PACKAGE}" diff --git a/eclass/sgml-catalog.eclass b/eclass/sgml-catalog.eclass deleted file mode 100644 index e3c228efac29..000000000000 --- a/eclass/sgml-catalog.eclass +++ /dev/null @@ -1,106 +0,0 @@ -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -# @DEAD -# All consumers are gone. Removal in 14 days - -# @ECLASS: sgml-catalog.eclass -# @MAINTAINER: -# No maintainer <maintainer-needed@gentoo.org> -# @AUTHOR: -# Author Matthew Turk <satai@gentoo.org> -# @BLURB: Functions for installing SGML catalogs - -case ${EAPI:-0} in - 0|1|2|3|4|5) inherit base ;; - *) ;; -esac - -DEPEND=">=app-text/sgml-common-0.6.3-r2" - -# @ECLASS-VARIABLE: SGML_TOINSTALL -# @DESCRIPTION: -# An array of catalogs, arranged in pairs. -# Each pair consists of a centralized catalog followed by an ordinary catalog. -SGML_TOINSTALL=() - -# @FUNCTION: sgml-catalog_cat_include -# @USAGE: <centralized catalog> <ordinary catalog> -# @DESCRIPTION: -# Appends a catalog pair to the SGML_TOINSTALL array. -sgml-catalog_cat_include() { - debug-print function $FUNCNAME $* - SGML_TOINSTALL+=("$1" "$2") -} - -# @FUNCTION: sgml-catalog_cat_doinstall -# @USAGE: <centralized catalog> <ordinary catalog> -# @DESCRIPTION: -# Adds an ordinary catalog to a centralized catalog. -sgml-catalog_cat_doinstall() { - debug-print function $FUNCNAME $* - has "${EAPI:-0}" 0 1 2 && ! use prefix && EPREFIX= - "${EPREFIX}"/usr/bin/install-catalog --add "${EPREFIX}$1" "${EPREFIX}$2" &>/dev/null -} - -# @FUNCTION: sgml-catalog_cat_doremove -# @USAGE: <centralized catalog> <ordinary catalog> -# @DESCRIPTION: -# Removes an ordinary catalog from a centralized catalog. -sgml-catalog_cat_doremove() { - debug-print function $FUNCNAME $* - has "${EAPI:-0}" 0 1 2 && ! use prefix && EPREFIX= - "${EPREFIX}"/usr/bin/install-catalog --remove "${EPREFIX}$1" "${EPREFIX}$2" &>/dev/null -} - -sgml-catalog_pkg_postinst() { - debug-print function $FUNCNAME $* - has "${EAPI:-0}" 0 1 2 && ! use prefix && EPREFIX= - - set -- "${SGML_TOINSTALL[@]}" - - while (( $# )); do - if [[ ! -e "${EPREFIX}$2" ]]; then - ewarn "${EPREFIX}$2 doesn't appear to exist, although it ought to!" - shift 2 - continue - fi - einfo "Now adding ${EPREFIX}$2 to ${EPREFIX}$1 and ${EPREFIX}/etc/sgml/catalog" - sgml-catalog_cat_doinstall "$1" "$2" - shift 2 - done - sgml-catalog_cleanup -} - -sgml-catalog_pkg_prerm() { - sgml-catalog_cleanup -} - -sgml-catalog_pkg_postrm() { - debug-print function $FUNCNAME $* - has "${EAPI:-0}" 0 1 2 && ! use prefix && EPREFIX= - - set -- "${SGML_TOINSTALL[@]}" - - while (( $# )); do - einfo "Now removing ${EPREFIX}$2 from ${EPREFIX}$1 and ${EPREFIX}/etc/sgml/catalog" - sgml-catalog_cat_doremove "$1" "$2" - shift 2 - done -} - -sgml-catalog_cleanup() { - has "${EAPI:-0}" 0 1 2 && ! use prefix && EPREFIX= - if [ -e "${EPREFIX}/usr/bin/gensgmlenv" ] - then - einfo Regenerating SGML environment variables ... - gensgmlenv - grep -v export "${EPREFIX}/etc/sgml/sgml.env" > "${EPREFIX}/etc/env.d/93sgmltools-lite" - fi -} - -sgml-catalog_src_compile() { - return -} - -EXPORT_FUNCTIONS pkg_postrm pkg_postinst src_compile pkg_prerm diff --git a/eclass/xemacs-elisp-common.eclass b/eclass/xemacs-elisp-common.eclass deleted file mode 100644 index e0d864b13302..000000000000 --- a/eclass/xemacs-elisp-common.eclass +++ /dev/null @@ -1,315 +0,0 @@ -# Copyright 1999-2012 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# -# Copyright 2007-2011 Hans de Graaff <graaff@gentoo.org> -# -# Based on elisp-common.eclass: -# Copyright 2007 Christian Faulhammer <opfer@gentoo.org> -# Copyright 2002-2004 Matthew Kennedy <mkennedy@gentoo.org> -# Copyright 2004-2005 Mamoru Komachi <usata@gentoo.org> -# Copyright 2003 Jeremy Maitin-Shepard <jbms@attbi.com> -# Copyright 2007 Ulrich Müller <ulm@gentoo.org> -# -# @DEAD -# Ulrich Müller <ulm@gentoo.org> (2019-12-16) -# No longer used by any ebuild in the Gentoo repository. -# Removal in 30 days. -# -# @ECLASS: xemacs-elisp-common.eclass -# @MAINTAINER: -# xemacs@gentoo.org -# @BLURB: XEmacs-related installation utilities -# @DESCRIPTION: -# -# Usually you want to use this eclass for (optional) XEmacs support of -# your package. This is NOT for GNU Emacs! -# -# Many of the steps here are sometimes done by the build system of your -# package (especially compilation), so this is mainly for standalone elisp -# files you gathered from somewhere else. -# -# When relying on the xemacs USE flag, you need to add -# -# xemacs? ( app-editors/xemacs ) -# -# to your DEPEND/RDEPEND line and use the functions provided here to bring -# the files to the correct locations. -# -# @ROFF .SS -# src_compile() usage: -# -# An elisp file is compiled by the xemacs-elisp-compile() function -# defined here and simply takes the source files as arguments. -# -# xemacs-elisp-compile *.el -# -# In the case of interdependent elisp files, you can use the -# xemacs-elisp-comp() function which makes sure all files are -# loadable. -# -# xemacs-elisp-comp *.el -# -# Function xemacs-elisp-make-autoload-file() can be used to generate a -# file with autoload definitions for the lisp functions. It takes a -# list of directories (default: working directory) as its argument. -# Use of this function requires that the elisp source files contain -# magic ";;;###autoload" comments. See the XEmacs Lisp Reference Manual -# (node "Autoload") for a detailed explanation. -# -# @ROFF .SS -# src_install() usage: -# -# The resulting compiled files (.elc) should be put in a subdirectory -# of /usr/lib/xemacs/site-lisp/ which is named after the first -# argument of xemacs-elisp-install(). The following parameters are -# the files to be put in that directory. Usually the subdirectory -# should be ${PN}, but you can choose something else. -# -# xemacs-elisp-install ${PN} *.el *.elc -# -# To let the XEmacs support be activated by XEmacs on startup, you need -# to provide a site file (shipped in ${FILESDIR}) which contains the -# startup code (have a look in the documentation of your software). -# Normally this would look like this: -# -# (add-to-list 'load-path "@SITELISP@") -# (add-to-list 'auto-mode-alist '("\\.csv\\'" . csv-mode)) -# (autoload 'csv-mode "csv-mode" "Major mode for csv files." t) -# -# If your XEmacs support files are installed in a subdirectory of -# /usr/share/xemacs/site-packages/ (which is strongly recommended), you need -# to extend XEmacs' load-path as shown in the first non-comment line. -# The xemacs-elisp-site-file-install() function of this eclass will replace -# "@SITELISP@" by the actual path. -# -# The next line tells XEmacs to load the mode opening a file ending -# with ".csv" and load functions depending on the context and needed -# features. Be careful though. Commands as "load-library" or "require" -# bloat the editor as they are loaded on every startup. When having -# many XEmacs support files, users may be annoyed by the start-up time. -# Also avoid keybindings as they might interfere with the user's -# settings. Give a hint in pkg_postinst(), which should be enough. -# -# The naming scheme for this site-init file matches the shell pattern -# "[1-8][0-9]*-gentoo*.el", where the two digits at the beginning define -# the loading order (numbers below 10 or above 89 are reserved for -# internal use). So if your initialisation depends on another XEmacs -# package, your site file's number must be higher! If there are no such -# interdependencies then the number should be 50. Otherwise, numbers -# divisible by 10 are preferred. -# -# Best practice is to define a SITEFILE variable in the global scope of -# your ebuild (e.g., right after S or RDEPEND): -# -# SITEFILE="50${PN}-gentoo.el" -# -# Which is then installed by -# -# xemacs-elisp-site-file-install "${FILESDIR}/${SITEFILE}" || die -# -# in src_install(). Any characters after the "-gentoo" part and before -# the extension will be stripped from the destination file's name. -# For example, a file "50${PN}-gentoo-${PV}.el" will be installed as -# "50${PN}-gentoo.el". If your subdirectory is not named ${PN}, give -# the differing name as second argument. - -# @ECLASS-VARIABLE: XEMACS_SITELISP -# @DESCRIPTION: -# Directory where packages install indivivual XEmacs Lisp files. -XEMACS_SITELISP=/usr/share/xemacs/site-lisp - -# @ECLASS-VARIABLE: XEMACS_SITEPACKAGE -# @DESCRIPTION: -# Directory where packages install XEmacs Lisp packages. -XEMACS_SITEPACKAGE=/usr/share/xemacs/site-packages - -# @ECLASS-VARIABLE: XEMACS -# @DESCRIPTION: -# Path of XEmacs executable. -XEMACS=/usr/bin/xemacs - -# @ECLASS-VARIABLE: XEMACS_BATCH_CLEAN -# @DESCRIPTION: -# Invocation of XEMACS in batch mode. -XEMACS_BATCH_CLEAN="${XEMACS} --batch --no-site-file --no-init-file" - -# @FUNCTION: xemacs-elisp-compile -# @USAGE: <list of elisp files> -# @DESCRIPTION: -# Byte-compile elisp files with xemacs. This function will die when -# there is a problem compiling the lisp files. -xemacs-elisp-compile () { - { - ${XEMACS_BATCH_CLEAN} -f batch-byte-compile "$@" - xemacs-elisp-make-autoload-file "$@" - } || die "Compile lisp files failed" -} - -xemacs-elisp-make-autoload-file () { - ${XEMACS_BATCH_CLEAN} \ - -eval "(setq autoload-package-name \"${PN}\")" \ - -eval "(setq generated-autoload-file \"${S}/auto-autoloads.el\")" \ - -l autoload -f batch-update-autoloads "$@" -} - -# @FUNCTION: xemacs-elisp-install -# @USAGE: <subdirectory> <list of files> -# @DESCRIPTION: -# Install elisp source and byte-compiled files. All files are installed -# in site-packages in their own directory, indicated by the first -# argument to the function. This function will die if there is a problem -# installing the list files. - -xemacs-elisp-install () { - local subdir="$1" - shift - ( # use sub-shell to avoid possible environment polution - dodir "${XEMACS_SITEPACKAGE}"/lisp/"${subdir}" - insinto "${XEMACS_SITEPACKAGE}"/lisp/"${subdir}" - doins "$@" - ) || die "Installing lisp files failed" -} - -# @FUNCTION: xemacs-elisp-comp -# @USAGE: <list of elisp files> -# @DESCRIPTION: -# Byte-compile interdependent XEmacs lisp files. -# Originally taken from GNU autotools, but some configuration options -# removed as they don't make sense with the current status of XEmacs -# in Gentoo. - -xemacs-elisp-comp() { - # Copyright 1995 Free Software Foundation, Inc. - # François Pinard <pinard@iro.umontreal.ca>, 1995. - # This script byte-compiles all `.el' files which are part of its - # arguments, using XEmacs, and put the resulting `.elc' files into - # the current directory, so disregarding the original directories used - # in `.el' arguments. - # - # This script manages in such a way that all XEmacs LISP files to - # be compiled are made visible between themselves, in the event - # they require or load-library one another. - - test $# -gt 0 || return 1 - - einfo "Compiling XEmacs Elisp files ..." - - tempdir=elc.$$ - mkdir ${tempdir} - cp "$@" ${tempdir} - pushd ${tempdir} - - echo "(add-to-list 'load-path \"../\")" > script - ${XEMACS_BATCH_CLEAN} -l script -f batch-byte-compile *.el - local ret=$? - mv *.elc .. - - popd - rm -fr ${tempdir} - return ${ret} -} - -# @FUNCTION: xemacs-elisp-site-file-install -# @USAGE: <site-init file> [subdirectory] -# @DESCRIPTION: -# Install XEmacs site-init file in XEMACS_SITELISP directory. -# Automatically inserts a standard comment header with the name of the -# package (unless it is already present). Token @SITELISP@ is replaced -# by the path to the package's subdirectory in XEMACS_SITELISP. - -xemacs-elisp-site-file-install() { - local sf="${1##*/}" my_pn="${2:-${PN}}" ret - local header=";;; ${PN} site-lisp configuration" - - [[ ${sf} == [0-9][0-9]*-gentoo*.el ]] \ - || ewarn "xemacs-elisp-site-file-install: bad name of site-init file" - sf="${T}/${sf/%-gentoo*.el/-gentoo.el}" - ebegin "Installing site initialisation file for XEmacs" - [[ $1 = "${sf}" ]] || cp "$1" "${sf}" - sed -i -e "1{:x;/^\$/{n;bx;};/^;.*${PN}/I!s:^:${header}\n\n:;1s:^:\n:;}" \ - -e "s:@SITELISP@:${EPREFIX}${XEMACS_SITELISP}/${my_pn}:g" "${sf}" - ( # subshell to avoid pollution of calling environment - insinto "${XEMACS_SITELISP}/site-gentoo.d" - doins "${sf}" - ) - ret=$? - rm -f "${sf}" - eend ${ret} "xemacs-elisp-site-file-install: doins failed" -} - -# @FUNCTION: xemacs-elisp-site-regen -# @DESCRIPTION: -# Regenerate the site-gentoo.el file, based on packages' site -# initialisation files in the /usr/share/xemacs/site-lisp/site-gentoo.d/ -# directory. - -xemacs-elisp-site-regen() { - local sitelisp=${ROOT}${EPREFIX}${XEMACS_SITELISP} - local sf i line null="" page=$'\f' - local -a sflist - - if [ ! -d "${sitelisp}" ]; then - eerror "xemacs-elisp-site-regen: Directory ${sitelisp} does not exist" - return 1 - fi - - if [ ! -d "${T}" ]; then - eerror "xemacs-elisp-site-regen: Temporary directory ${T} does not exist" - return 1 - fi - - einfon "Regenerating site-gentoo.el for XEmacs (${EBUILD_PHASE}) ..." - - for sf in "${sitelisp}"/site-gentoo.d/[0-9][0-9]*.el - do - [ -r "${sf}" ] || continue - # sort files by their basename. straight insertion sort. - for ((i=${#sflist[@]}; i>0; i--)); do - [[ ${sf##*/} < ${sflist[i-1]##*/} ]] || break - sflist[i]=${sflist[i-1]} - done - sflist[i]=${sf} - done - - cat <<-EOF >"${T}"/site-gentoo.el - ;;; site-gentoo.el --- site initialisation for Gentoo-installed packages - - ;;; Commentary: - ;; Automatically generated by xemacs-elisp-common.eclass - ;; DO NOT EDIT THIS FILE - - ;;; Code: - EOF - # Use sed instead of cat here, since files may miss a trailing newline. - sed '$q' "${sflist[@]}" </dev/null >>"${T}"/site-gentoo.el - cat <<-EOF >>"${T}"/site-gentoo.el - - ${page} - (provide 'site-gentoo) - - ;; Local ${null}Variables: - ;; no-byte-compile: t - ;; buffer-read-only: t - ;; End: - - ;;; site-gentoo.el ends here - EOF - - if cmp -s "${sitelisp}"/site-gentoo.el "${T}"/site-gentoo.el; then - # This prevents outputting unnecessary text when there - # was actually no change. - # A case is a remerge where we have doubled output. - rm -f "${T}"/site-gentoo.el - echo " no changes." - else - mv "${T}"/site-gentoo.el "${sitelisp}"/site-gentoo.el - echo - case ${#sflist[@]} in - 0) ewarn "... Huh? No site initialisation files found." ;; - 1) einfo "... ${#sflist[@]} site initialisation file included." ;; - *) einfo "... ${#sflist[@]} site initialisation files included." ;; - esac - fi - - return 0 -} diff --git a/eclass/xemacs-elisp.eclass b/eclass/xemacs-elisp.eclass deleted file mode 100644 index a5500af4da01..000000000000 --- a/eclass/xemacs-elisp.eclass +++ /dev/null @@ -1,59 +0,0 @@ -# Copyright 1999-2011 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# -# Copyright 2007-2011 Hans de Graaff <graaff@gentoo.org> -# -# Based on elisp.eclass: -# Copyright 2007 Christian Faulhammer <opfer@gentoo.org> -# Copyright 2002-2003 Matthew Kennedy <mkennedy@gentoo.org> -# Copyright 2003 Jeremy Maitin-Shepard <jbms@attbi.com> -# -# @DEAD -# Ulrich Müller <ulm@gentoo.org> (2019-12-16) -# No longer used by any ebuild in the Gentoo repository. -# Removal in 30 days. -# -# @ECLASS: xemacs-elisp.eclass -# @MAINTAINER: -# xemacs@gentoo.org -# @BLURB: Eclass for XEmacs Lisp packages -# @DESCRIPTION: -# Emacs support for other than pure elisp packages is handled by -# xemacs-elisp-common.eclass where you won't have a dependency on XEmacs -# itself. All elisp-* functions are documented there. - -# @ECLASS-VARIABLE: SIMPLE_ELISP -# @DEFAULT_UNSET -# @DESCRIPTION: -# Setting SIMPLE_ELISP=t in an ebuild means, that the package's source -# is a single (in whatever way) compressed elisp file with the file name -# ${PN}-${PV}. This eclass will then redefine ${S}, and move -# ${PN}-${PV}.el to ${PN}.el in src_unpack(). - -inherit xemacs-elisp-common - -if [ "${SIMPLE_ELISP}" = 't' ]; then - S="${WORKDIR}/" -fi - - -DEPEND="app-editors/xemacs" -IUSE="" - -xemacs-elisp_src_unpack() { - unpack ${A} - if [ "${SIMPLE_ELISP}" = 't' ] - then - cd "${S}" && mv ${P}.el ${PN}.el - fi -} - -xemacs-elisp_src_compile() { - xemacs-elisp-compile *.el -} - -xemacs-elisp_src_install () { - xemacs-elisp-install "${PN}" *.el *.elc -} - -EXPORT_FUNCTIONS src_unpack src_compile src_install |