public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/lisp:master commit in: eclass/
@ 2013-04-04 19:10 Stelian Ionescu
  0 siblings, 0 replies; 32+ messages in thread
From: Stelian Ionescu @ 2013-04-04 19:10 UTC (permalink / raw
  To: gentoo-commits

commit:     487ca18539f6f6fc0496854434652412d926d346
Author:     Stelian Ionescu <sionescu <AT> cddr <DOT> org>
AuthorDate: Thu Apr  4 19:10:34 2013 +0000
Commit:     Stelian Ionescu <sionescu <AT> cddr <DOT> org>
CommitDate: Thu Apr  4 19:10:34 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/lisp.git;a=commit;h=487ca185

common-lisp-3.eclass: move virtual/common-lisp to PDEPEND

---
 eclass/common-lisp-3.eclass |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/eclass/common-lisp-3.eclass b/eclass/common-lisp-3.eclass
index 5fd7d24..52160cc 100644
--- a/eclass/common-lisp-3.eclass
+++ b/eclass/common-lisp-3.eclass
@@ -34,7 +34,7 @@ CLSYSTEMROOT="${ROOT%/}"/usr/share/common-lisp/systems
 # Default package name. To override, set these after inheriting this eclass.
 CLPACKAGE="${PN}"
 
-RDEPEND="virtual/commonlisp"
+PDEPEND="virtual/commonlisp"
 
 EXPORT_FUNCTIONS src_compile src_install
 


^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [gentoo-commits] proj/lisp:master commit in: eclass/
@ 2015-08-18 21:24 José María Alonso
  0 siblings, 0 replies; 32+ messages in thread
From: José María Alonso @ 2015-08-18 21:24 UTC (permalink / raw
  To: gentoo-commits

commit:     aa4700d675aeace5752528f3811eea516125cb08
Author:     Chema Alonso Josa <nimiux <AT> gentoo <DOT> org>
AuthorDate: Tue Aug 18 21:25:13 2015 +0000
Commit:     José María Alonso <nimiux <AT> gentoo <DOT> org>
CommitDate: Tue Aug 18 21:25:13 2015 +0000
URL:        https://gitweb.gentoo.org/proj/lisp.git/commit/?id=aa4700d6

bash-completion-r1.eclass: added, in use by some ebuilds (bug #557710)

 eclass/bash-completion-r1.eclass | 134 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 134 insertions(+)

diff --git a/eclass/bash-completion-r1.eclass b/eclass/bash-completion-r1.eclass
new file mode 100644
index 0000000..2551973
--- /dev/null
+++ b/eclass/bash-completion-r1.eclass
@@ -0,0 +1,134 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# @ECLASS: bash-completion-r1.eclass
+# @MAINTAINER:
+# mgorny@gentoo.org
+# @BLURB: A few quick functions to install bash-completion files
+# @EXAMPLE:
+#
+# @CODE
+# EAPI=5
+#
+# src_configure() {
+# 	econf \
+#		--with-bash-completion-dir="$(get_bashcompdir)"
+# }
+#
+# src_install() {
+# 	default
+#
+# 	newbashcomp contrib/${PN}.bash-completion ${PN}
+# }
+# @CODE
+
+inherit toolchain-funcs
+
+case ${EAPI:-0} in
+	0|1|2|3|4|5) ;;
+	*) die "EAPI ${EAPI} unsupported (yet)."
+esac
+
+# @FUNCTION: _bash-completion-r1_get_bashdir
+# @INTERNAL
+# @DESCRIPTION:
+# First argument is name of the string in bash-completion.pc
+# Second argument is the fallback directory if the string is not found
+# @EXAMPLE:
+# _bash-completion-r1_get_bashdir completionsdir /usr/share/bash-completion
+_bash-completion-r1_get_bashdir() {
+	debug-print-function ${FUNCNAME} "${@}"
+
+	if $(tc-getPKG_CONFIG) --exists bash-completion &>/dev/null; then
+		local path="$($(tc-getPKG_CONFIG) --variable=$1 bash-completion)"
+		# we need to return unprefixed, so strip from what pkg-config returns
+		# to us, bug #477692
+		echo "${path#${EPREFIX}}"
+	else
+		echo $2
+	fi
+}
+
+# @FUNCTION: _bash-completion-r1_get_bashcompdir
+# @INTERNAL
+# @DESCRIPTION:
+# Get unprefixed bash-completion completions directory.
+_bash-completion-r1_get_bashcompdir() {
+	debug-print-function ${FUNCNAME} "${@}"
+
+	_bash-completion-r1_get_bashdir completionsdir /usr/share/bash-completion/completions
+}
+
+# @FUNCTION: _bash-completion-r1_get_helpersdir
+# @INTERNAL
+# @DESCRIPTION:
+# Get unprefixed bash-completion helpers directory.
+_bash-completion-r1_get_bashhelpersdir() {
+	debug-print-function ${FUNCNAME} "${@}"
+
+	_bash-completion-r1_get_bashdir helpersdir /usr/share/bash-completion/helpers
+}
+
+# @FUNCTION: get_bashcompdir
+# @DESCRIPTION:
+# Get the bash-completion completions directory.
+get_bashcompdir() {
+	debug-print-function ${FUNCNAME} "${@}"
+
+	echo "${EPREFIX}$(_bash-completion-r1_get_bashcompdir)"
+}
+
+# @FUNCTION: get_bashhelpersdir
+# @INTERNAL
+# @DESCRIPTION:
+# Get the bash-completion helpers directory.
+get_bashhelpersdir() {
+	debug-print-function ${FUNCNAME} "${@}"
+
+	echo "${EPREFIX}$(_bash-completion-r1_get_bashhelpersdir)"
+}
+
+# @FUNCTION: dobashcomp
+# @USAGE: file [...]
+# @DESCRIPTION:
+# Install bash-completion files passed as args. Has EAPI-dependant failure
+# behavior (like doins).
+dobashcomp() {
+	debug-print-function ${FUNCNAME} "${@}"
+
+	(
+		insinto "$(_bash-completion-r1_get_bashcompdir)"
+		doins "${@}"
+	)
+}
+
+# @FUNCTION: newbashcomp
+# @USAGE: file newname
+# @DESCRIPTION:
+# Install bash-completion file under a new name. Has EAPI-dependant failure
+# behavior (like newins).
+newbashcomp() {
+	debug-print-function ${FUNCNAME} "${@}"
+
+	(
+		insinto "$(_bash-completion-r1_get_bashcompdir)"
+		newins "${@}"
+	)
+}
+
+# @FUNCTION: bashcomp_alias
+# @USAGE: <basename> <alias>...
+# @DESCRIPTION:
+# Alias <basename> completion to one or more commands (<alias>es).
+bashcomp_alias() {
+	debug-print-function ${FUNCNAME} "${@}"
+
+	[[ ${#} -lt 2 ]] && die "Usage: ${FUNCNAME} <basename> <alias>..."
+	local base=${1} f
+	shift
+
+	for f; do
+		dosym "${base}" "$(_bash-completion-r1_get_bashcompdir)/${f}"
+	done
+}


^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [gentoo-commits] proj/lisp:master commit in: eclass/
@ 2016-06-17 16:01 José María Alonso
  0 siblings, 0 replies; 32+ messages in thread
From: José María Alonso @ 2016-06-17 16:01 UTC (permalink / raw
  To: gentoo-commits

commit:     1a8f7a7ec10f0eb11c1777850ba5931c3ac6b9d7
Author:     Chema Alonso Josa <nimiux <AT> gentoo <DOT> org>
AuthorDate: Fri Jun 17 16:06:18 2016 +0000
Commit:     José María Alonso <nimiux <AT> gentoo <DOT> org>
CommitDate: Fri Jun 17 16:06:18 2016 +0000
URL:        https://gitweb.gentoo.org/proj/lisp.git/commit/?id=1a8f7a7e

common-lisp-3.eclass: Update CommonLisp implementations. Add CL_BINARY variable

 eclass/common-lisp-3.eclass | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/eclass/common-lisp-3.eclass b/eclass/common-lisp-3.eclass
index 52160cc..c903448 100644
--- a/eclass/common-lisp-3.eclass
+++ b/eclass/common-lisp-3.eclass
@@ -1,6 +1,6 @@
-# Copyright 1999-2010 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: $
+# $Id$
 
 # @ECLASS: common-lisp-3.eclass
 # @MAINTAINER:
@@ -177,13 +177,14 @@ common-lisp-export-impl-args() {
 		eerror "Usage: ${FUNCNAME[0]} lisp-implementation"
 		die "${FUNCNAME[0]}: wrong number of arguments: $#"
 	fi
+	CL_BINARY="${1}"
 	case ${1} in
 		clisp)
 			CL_NORC="-norc"
 			CL_LOAD="-i"
 			CL_EVAL="-x"
 			;;
-		clozure | ccl | openmcl)
+		clozurecl | ccl | openmcl)
 			CL_NORC="--no-init"
 			CL_LOAD="--load"
 			CL_EVAL="--eval"
@@ -193,7 +194,8 @@ common-lisp-export-impl-args() {
 			CL_LOAD="-load"
 			CL_EVAL="-eval"
 			;;
-		ecl)
+		ecl | ecls)
+			CL_BINARY="ecl"
 			CL_NORC="-norc"
 			CL_LOAD="-load"
 			CL_EVAL="-eval"
@@ -207,5 +209,5 @@ common-lisp-export-impl-args() {
 			die ${1} is not supported by ${0}
 			;;
 	esac
-	export CL_NORC CL_LOAD CL_EVAL
+	export CL_BINARY CL_NORC CL_LOAD CL_EVAL
 }


^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [gentoo-commits] proj/lisp:master commit in: eclass/
@ 2016-11-29 22:43 José María Alonso
  0 siblings, 0 replies; 32+ messages in thread
From: José María Alonso @ 2016-11-29 22:43 UTC (permalink / raw
  To: gentoo-commits

commit:     00116aee91a1c4af1a3eed3b3dd454c5dbb02809
Author:     Chema Alonso Josa <nimiux <AT> gentoo <DOT> org>
AuthorDate: Tue Nov 29 22:43:24 2016 +0000
Commit:     José María Alonso <nimiux <AT> gentoo <DOT> org>
CommitDate: Tue Nov 29 22:43:24 2016 +0000
URL:        https://gitweb.gentoo.org/proj/lisp.git/commit/?id=00116aee

eclass: Adds git-r3 eclass

 eclass/git-r3.eclass | 1041 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 1041 insertions(+)

diff --git a/eclass/git-r3.eclass b/eclass/git-r3.eclass
new file mode 100644
index 0000000..f76f1a7
--- /dev/null
+++ b/eclass/git-r3.eclass
@@ -0,0 +1,1041 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# @ECLASS: git-r3.eclass
+# @MAINTAINER:
+# Michał Górny <mgorny@gentoo.org>
+# @BLURB: Eclass for fetching and unpacking git repositories.
+# @DESCRIPTION:
+# Third generation eclass for easing maintenance of live ebuilds using
+# git as remote repository.
+
+case "${EAPI:-0}" in
+	0|1|2|3|4|5|6)
+		;;
+	*)
+		die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}"
+		;;
+esac
+
+if [[ ! ${_GIT_R3} ]]; then
+
+inherit eutils
+
+fi
+
+EXPORT_FUNCTIONS src_unpack
+
+if [[ ! ${_GIT_R3} ]]; then
+
+if [[ ! ${_INHERITED_BY_GIT_2} ]]; then
+	DEPEND=">=dev-vcs/git-1.8.2.1"
+fi
+
+# @ECLASS-VARIABLE: EGIT_CLONE_TYPE
+# @DESCRIPTION:
+# Type of clone that should be used against the remote repository.
+# This can be either of: 'mirror', 'single', 'shallow'.
+#
+# This is intended to be set by user in make.conf. Ebuilds are supposed
+# to set EGIT_MIN_CLONE_TYPE if necessary instead.
+#
+# The 'mirror' type clones all remote branches and tags with complete
+# history and all notes. EGIT_COMMIT can specify any commit hash.
+# Upstream-removed branches and tags are purged from the local clone
+# while fetching. This mode is suitable for cloning the local copy
+# for development or hosting a local git mirror. However, clones
+# of repositories with large diverged branches may quickly grow large.
+#
+# The 'single+tags' type clones the requested branch and all tags
+# in the repository. All notes are fetched as well. EGIT_COMMIT
+# can safely specify hashes throughout the current branch and all tags.
+# No purging of old references is done (if you often switch branches,
+# you may need to remove stale branches yourself). This mode is intended
+# mostly for use with broken git servers such as Google Code that fail
+# to fetch tags along with the branch in 'single' mode.
+#
+# The 'single' type clones only the requested branch or tag. Tags
+# referencing commits throughout the branch history are fetched as well,
+# and all notes. EGIT_COMMIT can safely specify only hashes
+# in the current branch. No purging of old references is done (if you
+# often switch branches, you may need to remove stale branches
+# yourself). This mode is suitable for general use.
+#
+# The 'shallow' type clones only the newest commit on requested branch
+# or tag. EGIT_COMMIT can only specify tags, and since the history is
+# unavailable calls like 'git describe' will not reference prior tags.
+# No purging of old references is done. This mode is intended mostly for
+# embedded systems with limited disk space.
+: ${EGIT_CLONE_TYPE:=single}
+
+# @ECLASS-VARIABLE: EGIT_MIN_CLONE_TYPE
+# @DESCRIPTION:
+# 'Minimum' clone type supported by the ebuild. Takes same values
+# as EGIT_CLONE_TYPE. When user sets a type that's 'lower' (that is,
+# later on the list) than EGIT_MIN_CLONE_TYPE, the eclass uses
+# EGIT_MIN_CLONE_TYPE instead.
+#
+# This variable is intended to be used by ebuilds only. Users are
+# supposed to set EGIT_CLONE_TYPE instead.
+#
+# A common case is to use 'single' whenever the build system requires
+# access to full branch history, or 'single+tags' when Google Code
+# or a similar remote is used that does not support shallow clones
+# and fetching tags along with commits. Please use sparingly, and to fix
+# fatal errors rather than 'non-pretty versions'.
+: ${EGIT_MIN_CLONE_TYPE:=shallow}
+
+# @ECLASS-VARIABLE: EGIT3_STORE_DIR
+# @DESCRIPTION:
+# Storage directory for git sources.
+#
+# This is intended to be set by user in make.conf. Ebuilds must not set
+# it.
+#
+# EGIT3_STORE_DIR=${DISTDIR}/git3-src
+
+# @ECLASS-VARIABLE: EGIT_MIRROR_URI
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# 'Top' URI to a local git mirror. If specified, the eclass will try
+# to fetch from the local mirror instead of using the remote repository.
+#
+# The mirror needs to follow EGIT3_STORE_DIR structure. The directory
+# created by eclass can be used for that purpose.
+#
+# Example:
+# @CODE
+# EGIT_MIRROR_URI="git://mirror.lan/"
+# @CODE
+
+# @ECLASS-VARIABLE: EGIT_REPO_URI
+# @REQUIRED
+# @DESCRIPTION:
+# URIs to the repository, e.g. git://foo, https://foo. If multiple URIs
+# are provided, the eclass will consider them as fallback URIs to try
+# if the first URI does not work. For supported URI syntaxes, read up
+# the manpage for git-clone(1).
+#
+# It can be overriden via env using ${PN}_LIVE_REPO variable.
+#
+# Can be a whitespace-separated list or an array.
+#
+# Example:
+# @CODE
+# EGIT_REPO_URI="git://a/b.git https://c/d.git"
+# @CODE
+
+# @ECLASS-VARIABLE: EVCS_OFFLINE
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# If non-empty, this variable prevents any online operations.
+
+# @ECLASS-VARIABLE: EVCS_UMASK
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# Set this variable to a custom umask. This is intended to be set by
+# users. By setting this to something like 002, it can make life easier
+# for people who do development as non-root (but are in the portage
+# group), and then switch over to building with FEATURES=userpriv.
+# Or vice-versa. Shouldn't be a security issue here as anyone who has
+# portage group write access already can screw the system over in more
+# creative ways.
+
+# @ECLASS-VARIABLE: EGIT_BRANCH
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# The branch name to check out. If unset, the upstream default (HEAD)
+# will be used.
+#
+# It can be overriden via env using ${PN}_LIVE_BRANCH variable.
+
+# @ECLASS-VARIABLE: EGIT_COMMIT
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# The tag name or commit identifier to check out. If unset, newest
+# commit from the branch will be used. If set, EGIT_BRANCH will
+# be ignored.
+#
+# It can be overriden via env using ${PN}_LIVE_COMMIT variable.
+
+# @ECLASS-VARIABLE: EGIT_COMMIT_DATE
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# Attempt to check out the repository state for the specified timestamp.
+# The date should be in format understood by 'git rev-list'.
+#
+# The eclass will select the last commit with commit date preceding
+# the specified date. When merge commits are found, only first parents
+# will be considered in order to avoid switching into external branches
+# (assuming that merges are done correctly). In other words, each merge
+# will be considered alike a single commit with date corresponding
+# to the merge commit date.
+#
+# It can be overriden via env using ${PN}_LIVE_COMMIT_DATE variable.
+
+# @ECLASS-VARIABLE: EGIT_CHECKOUT_DIR
+# @DESCRIPTION:
+# The directory to check the git sources out to.
+#
+# EGIT_CHECKOUT_DIR=${WORKDIR}/${P}
+
+# @ECLASS-VARIABLE: EGIT_SUBMODULES
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# An array of inclusive and exclusive wildcards on submodule names,
+# stating which submodules are fetched and checked out. Exclusions
+# start with '-', and exclude previously matched submodules.
+#
+# If unset, all submodules are enabled. Empty list disables all
+# submodules. In order to use an exclude-only list, start the array
+# with '*'.
+#
+# Remember that wildcards need to be quoted in order to prevent filename
+# expansion.
+#
+# Examples:
+# @CODE
+# # Disable all submodules
+# EGIT_SUBMODULES=()
+#
+# # Include only foo and bar
+# EGIT_SUBMODULES=( foo bar )
+#
+# # Use all submodules except for test-* but include test-lib
+# EGIT_SUBMODULES=( '*' '-test-*' test-lib )
+# @CODE
+
+# @FUNCTION: _git-r3_env_setup
+# @INTERNAL
+# @DESCRIPTION:
+# Set the eclass variables as necessary for operation. This can involve
+# setting EGIT_* to defaults or ${PN}_LIVE_* variables.
+_git-r3_env_setup() {
+	debug-print-function ${FUNCNAME} "$@"
+
+	# check the clone type
+	case "${EGIT_CLONE_TYPE}" in
+		mirror|single+tags|single|shallow)
+			;;
+		*)
+			die "Invalid EGIT_CLONE_TYPE=${EGIT_CLONE_TYPE}"
+	esac
+	case "${EGIT_MIN_CLONE_TYPE}" in
+		shallow)
+			;;
+		single)
+			if [[ ${EGIT_CLONE_TYPE} == shallow ]]; then
+				einfo "git-r3: ebuild needs to be cloned in '\e[1msingle\e[22m' mode, adjusting"
+				EGIT_CLONE_TYPE=single
+			fi
+			;;
+		single+tags)
+			if [[ ${EGIT_CLONE_TYPE} == shallow || ${EGIT_CLONE_TYPE} == single ]]; then
+				einfo "git-r3: ebuild needs to be cloned in '\e[1msingle+tags\e[22m' mode, adjusting"
+				EGIT_CLONE_TYPE=single+tags
+			fi
+			;;
+		mirror)
+			if [[ ${EGIT_CLONE_TYPE} != mirror ]]; then
+				einfo "git-r3: ebuild needs to be cloned in '\e[1mmirror\e[22m' mode, adjusting"
+				EGIT_CLONE_TYPE=mirror
+			fi
+			;;
+		*)
+			die "Invalid EGIT_MIN_CLONE_TYPE=${EGIT_MIN_CLONE_TYPE}"
+	esac
+
+	if [[ ${EGIT_SUBMODULES[@]+1} && $(declare -p EGIT_SUBMODULES) != "declare -a"* ]]
+	then
+		die 'EGIT_SUBMODULES must be an array.'
+	fi
+
+	local esc_pn livevar
+	esc_pn=${PN//[-+]/_}
+	[[ ${esc_pn} == [0-9]* ]] && esc_pn=_${esc_pn}
+
+	livevar=${esc_pn}_LIVE_REPO
+	EGIT_REPO_URI=${!livevar-${EGIT_REPO_URI}}
+	[[ ${!livevar} ]] \
+		&& ewarn "Using ${livevar}, no support will be provided"
+
+	livevar=${esc_pn}_LIVE_BRANCH
+	EGIT_BRANCH=${!livevar-${EGIT_BRANCH}}
+	[[ ${!livevar} ]] \
+		&& ewarn "Using ${livevar}, no support will be provided"
+
+	livevar=${esc_pn}_LIVE_COMMIT
+	EGIT_COMMIT=${!livevar-${EGIT_COMMIT}}
+	[[ ${!livevar} ]] \
+		&& ewarn "Using ${livevar}, no support will be provided"
+
+	livevar=${esc_pn}_LIVE_COMMIT_DATE
+	EGIT_COMMIT_DATE=${!livevar-${EGIT_COMMIT_DATE}}
+	[[ ${!livevar} ]] \
+		&& ewarn "Using ${livevar}, no support will be provided"
+
+	if [[ ${EGIT_COMMIT} && ${EGIT_COMMIT_DATE} ]]; then
+		die "EGIT_COMMIT and EGIT_COMMIT_DATE can not be specified simultaneously"
+	fi
+
+	# Migration helpers. Remove them when git-2 is removed.
+
+	if [[ ${EGIT_SOURCEDIR} ]]; then
+		eerror "EGIT_SOURCEDIR has been replaced by EGIT_CHECKOUT_DIR. While updating"
+		eerror "your ebuild, please check whether the variable is necessary at all"
+		eerror "since the default has been changed from \${S} to \${WORKDIR}/\${P}."
+		eerror "Therefore, proper setting of S may be sufficient."
+		die "EGIT_SOURCEDIR has been replaced by EGIT_CHECKOUT_DIR."
+	fi
+
+	if [[ ${EGIT_MASTER} ]]; then
+		eerror "EGIT_MASTER has been removed. Instead, the upstream default (HEAD)"
+		eerror "is used by the eclass. Please remove the assignment or use EGIT_BRANCH"
+		eerror "as necessary."
+		die "EGIT_MASTER has been removed."
+	fi
+
+	if [[ ${EGIT_HAS_SUBMODULES} ]]; then
+		eerror "EGIT_HAS_SUBMODULES has been removed. The eclass no longer needs"
+		eerror "to switch the clone type in order to support submodules and therefore"
+		eerror "submodules are detected and fetched automatically. If you need to"
+		eerror "disable or filter submodules, see EGIT_SUBMODULES."
+		die "EGIT_HAS_SUBMODULES is no longer necessary."
+	fi
+
+	if [[ ${EGIT_PROJECT} ]]; then
+		eerror "EGIT_PROJECT has been removed. Instead, the eclass determines"
+		eerror "the local clone path using path in canonical EGIT_REPO_URI."
+		eerror "If the current algorithm causes issues for you, please report a bug."
+		die "EGIT_PROJECT is no longer necessary."
+	fi
+
+	if [[ ${EGIT_BOOTSTRAP} ]]; then
+		eerror "EGIT_BOOTSTRAP has been removed. Please create proper src_prepare()"
+		eerror "instead."
+		die "EGIT_BOOTSTRAP has been removed."
+	fi
+
+	if [[ ${EGIT_NOUNPACK} ]]; then
+		eerror "EGIT_NOUNPACK has been removed. The eclass no longer calls default"
+		eerror "unpack function. If necessary, please declare proper src_unpack()."
+		die "EGIT_NOUNPACK has been removed."
+	fi
+}
+
+# @FUNCTION: _git-r3_set_gitdir
+# @USAGE: <repo-uri>
+# @INTERNAL
+# @DESCRIPTION:
+# Obtain the local repository path and set it as GIT_DIR. Creates
+# a new repository if necessary.
+#
+# <repo-uri> may be used to compose the path. It should therefore be
+# a canonical URI to the repository.
+_git-r3_set_gitdir() {
+	debug-print-function ${FUNCNAME} "$@"
+
+	local repo_name=${1#*://*/}
+
+	# strip the trailing slash
+	repo_name=${repo_name%/}
+
+	# strip common prefixes to make paths more likely to match
+	# e.g. git://X/Y.git vs https://X/git/Y.git
+	# (but just one of the prefixes)
+	case "${repo_name}" in
+		# gnome.org... who else?
+		browse/*) repo_name=${repo_name#browse/};;
+		# cgit can proxy requests to git
+		cgit/*) repo_name=${repo_name#cgit/};;
+		# pretty common
+		git/*) repo_name=${repo_name#git/};;
+		# gentoo.org
+		gitroot/*) repo_name=${repo_name#gitroot/};;
+		# sourceforge
+		p/*) repo_name=${repo_name#p/};;
+		# kernel.org
+		pub/scm/*) repo_name=${repo_name#pub/scm/};;
+	esac
+	# ensure a .git suffix, same reason
+	repo_name=${repo_name%.git}.git
+	# now replace all the slashes
+	repo_name=${repo_name//\//_}
+
+	local distdir=${PORTAGE_ACTUAL_DISTDIR:-${DISTDIR}}
+	: ${EGIT3_STORE_DIR:=${distdir}/git3-src}
+
+	GIT_DIR=${EGIT3_STORE_DIR}/${repo_name}
+
+	if [[ ! -d ${EGIT3_STORE_DIR} && ! ${EVCS_OFFLINE} ]]; then
+		(
+			addwrite /
+			mkdir -p "${EGIT3_STORE_DIR}"
+		) || die "Unable to create ${EGIT3_STORE_DIR}"
+	fi
+
+	addwrite "${EGIT3_STORE_DIR}"
+	if [[ ! -d ${GIT_DIR} ]]; then
+		if [[ ${EVCS_OFFLINE} ]]; then
+			eerror "A clone of the following repository is required to proceed:"
+			eerror "  ${1}"
+			eerror "However, networking activity has been disabled using EVCS_OFFLINE and there"
+			eerror "is no local clone available."
+			die "No local clone of ${1}. Unable to proceed with EVCS_OFFLINE."
+		fi
+
+		local saved_umask
+		if [[ ${EVCS_UMASK} ]]; then
+			saved_umask=$(umask)
+			umask "${EVCS_UMASK}" || die "Bad options to umask: ${EVCS_UMASK}"
+		fi
+		mkdir "${GIT_DIR}" || die
+		git init --bare || die
+		if [[ ${saved_umask} ]]; then
+			umask "${saved_umask}" || die
+		fi
+	fi
+}
+
+# @FUNCTION: _git-r3_set_submodules
+# @USAGE: <file-contents>
+# @INTERNAL
+# @DESCRIPTION:
+# Parse .gitmodules contents passed as <file-contents>
+# as in "$(cat .gitmodules)"). Composes a 'submodules' array that
+# contains in order (name, URL, path) for each submodule.
+_git-r3_set_submodules() {
+	debug-print-function ${FUNCNAME} "$@"
+
+	local data=${1}
+
+	# ( name url path ... )
+	submodules=()
+
+	local l
+	while read l; do
+		# submodule.<path>.path=<path>
+		# submodule.<path>.url=<url>
+		[[ ${l} == submodule.*.url=* ]] || continue
+
+		l=${l#submodule.}
+		local subname=${l%%.url=*}
+
+		# filter out on EGIT_SUBMODULES
+		if declare -p EGIT_SUBMODULES &>/dev/null; then
+			local p l_res res=
+			for p in "${EGIT_SUBMODULES[@]}"; do
+				if [[ ${p} == -* ]]; then
+					p=${p#-}
+					l_res=
+				else
+					l_res=1
+				fi
+
+				[[ ${subname} == ${p} ]] && res=${l_res}
+			done
+
+			if [[ ! ${res} ]]; then
+				einfo "Skipping submodule \e[1m${subname}\e[22m"
+				continue
+			fi
+		fi
+
+		# skip modules that have 'update = none', bug #487262.
+		local upd=$(echo "${data}" | git config -f /dev/fd/0 \
+			submodule."${subname}".update)
+		[[ ${upd} == none ]] && continue
+
+		# https://github.com/git/git/blob/master/refs.c#L39
+		# for now, we just filter /. because of #572312
+		local enc_subname=${subname//\/.//_}
+		[[ ${enc_subname} == .* ]] && enc_subname=_${enc_subname#.}
+
+		submodules+=(
+			"${enc_subname}"
+			"$(echo "${data}" | git config -f /dev/fd/0 \
+				submodule."${subname}".url || die)"
+			"$(echo "${data}" | git config -f /dev/fd/0 \
+				submodule."${subname}".path || die)"
+		)
+	done < <(echo "${data}" | git config -f /dev/fd/0 -l || die)
+}
+
+# @FUNCTION: _git-r3_set_subrepos
+# @USAGE: <submodule-uri> <parent-repo-uri>...
+# @INTERNAL
+# @DESCRIPTION:
+# Create 'subrepos' array containing absolute (canonical) submodule URIs
+# for the given <submodule-uri>. If the URI is relative, URIs will be
+# constructed using all <parent-repo-uri>s. Otherwise, this single URI
+# will be placed in the array.
+_git-r3_set_subrepos() {
+	debug-print-function ${FUNCNAME} "$@"
+
+	local suburl=${1}
+	subrepos=( "${@:2}" )
+
+	if [[ ${suburl} == ./* || ${suburl} == ../* ]]; then
+		# drop all possible trailing slashes for consistency
+		subrepos=( "${subrepos[@]%%/}" )
+
+		while true; do
+			if [[ ${suburl} == ./* ]]; then
+				suburl=${suburl:2}
+			elif [[ ${suburl} == ../* ]]; then
+				suburl=${suburl:3}
+
+				# XXX: correctness checking
+
+				# drop the last path component
+				subrepos=( "${subrepos[@]%/*}" )
+				# and then the trailing slashes, again
+				subrepos=( "${subrepos[@]%%/}" )
+			else
+				break
+			fi
+		done
+
+		# append the preprocessed path to the preprocessed URIs
+		subrepos=( "${subrepos[@]/%//${suburl}}")
+	else
+		subrepos=( "${suburl}" )
+	fi
+}
+
+
+# @FUNCTION: _git-r3_is_local_repo
+# @USAGE: <repo-uri>
+# @INTERNAL
+# @DESCRIPTION:
+# Determine whether the given URI specifies a local (on-disk)
+# repository.
+_git-r3_is_local_repo() {
+	debug-print-function ${FUNCNAME} "$@"
+
+	local uri=${1}
+
+	[[ ${uri} == file://* || ${uri} == /* ]]
+}
+
+# @FUNCTION: git-r3_fetch
+# @USAGE: [<repo-uri> [<remote-ref> [<local-id> [<commit-date>]]]]
+# @DESCRIPTION:
+# Fetch new commits to the local clone of repository.
+#
+# <repo-uri> specifies the repository URIs to fetch from, as a space-
+# -separated list. The first URI will be used as repository group
+# identifier and therefore must be used consistently. When not
+# specified, defaults to ${EGIT_REPO_URI}.
+#
+# <remote-ref> specifies the remote ref or commit id to fetch.
+# It is preferred to use 'refs/heads/<branch-name>' for branches
+# and 'refs/tags/<tag-name>' for tags. Other options are 'HEAD'
+# for upstream default branch and hexadecimal commit SHA1. Defaults
+# to the first of EGIT_COMMIT, EGIT_BRANCH or literal 'HEAD' that
+# is set to a non-null value.
+#
+# <local-id> specifies the local branch identifier that will be used to
+# locally store the fetch result. It should be unique to multiple
+# fetches within the repository that can be performed at the same time
+# (including parallel merges). It defaults to ${CATEGORY}/${PN}/${SLOT%/*}.
+# This default should be fine unless you are fetching multiple trees
+# from the same repository in the same ebuild.
+#
+# <commit-id> requests attempting to use repository state as of specific
+# date. For more details, see EGIT_COMMIT_DATE.
+#
+# The fetch operation will affect the EGIT_STORE only. It will not touch
+# the working copy, nor export any environment variables.
+# If the repository contains submodules, they will be fetched
+# recursively.
+git-r3_fetch() {
+	debug-print-function ${FUNCNAME} "$@"
+
+	local repos
+	if [[ ${1} ]]; then
+		repos=( ${1} )
+	elif [[ $(declare -p EGIT_REPO_URI) == "declare -a"* ]]; then
+		repos=( "${EGIT_REPO_URI[@]}" )
+	else
+		repos=( ${EGIT_REPO_URI} )
+	fi
+
+	local branch=${EGIT_BRANCH:+refs/heads/${EGIT_BRANCH}}
+	local remote_ref=${2:-${EGIT_COMMIT:-${branch:-HEAD}}}
+	local local_id=${3:-${CATEGORY}/${PN}/${SLOT%/*}}
+	local local_ref=refs/git-r3/${local_id}/__main__
+	local commit_date=${4:-${EGIT_COMMIT_DATE}}
+
+	[[ ${repos[@]} ]] || die "No URI provided and EGIT_REPO_URI unset"
+
+	local -x GIT_DIR
+	_git-r3_set_gitdir "${repos[0]}"
+
+	# prepend the local mirror if applicable
+	if [[ ${EGIT_MIRROR_URI} ]]; then
+		repos=(
+			"${EGIT_MIRROR_URI%/}/${GIT_DIR##*/}"
+			"${repos[@]}"
+		)
+	fi
+
+	# try to fetch from the remote
+	local r success saved_umask
+	if [[ ${EVCS_UMASK} ]]; then
+		saved_umask=$(umask)
+		umask "${EVCS_UMASK}" || die "Bad options to umask: ${EVCS_UMASK}"
+	fi
+	for r in "${repos[@]}"; do
+		if [[ ! ${EVCS_OFFLINE} ]]; then
+			einfo "Fetching \e[1m${r}\e[22m ..."
+
+			local fetch_command=( git fetch "${r}" )
+			local clone_type=${EGIT_CLONE_TYPE}
+
+			if [[ ${r} == http://* || ${r} == https://* ]] &&
+					[[ ! ${EGIT_CURL_WARNED} ]] &&
+					! ROOT=/ has_version 'dev-vcs/git[curl]'
+			then
+				ewarn "git-r3: fetching from HTTP(S) requested. In order to support HTTP(S),"
+				ewarn "dev-vcs/git needs to be built with USE=curl. Example solution:"
+				ewarn
+				ewarn "	echo dev-vcs/git curl >> /etc/portage/package.use"
+				ewarn "	emerge -1v dev-vcs/git"
+				ewarn
+				ewarn "HTTP(S) URIs will be skipped."
+				EGIT_CURL_WARNED=1
+			fi
+
+			if [[ ${clone_type} == mirror ]]; then
+				fetch_command+=(
+					--prune
+					# mirror the remote branches as local branches
+					"+refs/heads/*:refs/heads/*"
+					# pull tags explicitly in order to prune them properly
+					"+refs/tags/*:refs/tags/*"
+					# notes in case something needs them
+					"+refs/notes/*:refs/notes/*"
+					# and HEAD in case we need the default branch
+					# (we keep it in refs/git-r3 since otherwise --prune interferes)
+					"+HEAD:refs/git-r3/HEAD"
+				)
+			else # single or shallow
+				local fetch_l fetch_r
+
+				if [[ ${remote_ref} == HEAD ]]; then
+					# HEAD
+					fetch_l=HEAD
+				elif [[ ${remote_ref} == refs/* ]]; then
+					# regular branch, tag or some other explicit ref
+					fetch_l=${remote_ref}
+				else
+					# tag or commit id...
+					# let ls-remote figure it out
+					local tagref=$(git ls-remote "${r}" "refs/tags/${remote_ref}")
+
+					# if it was a tag, ls-remote obtained a hash
+					if [[ ${tagref} ]]; then
+						# tag
+						fetch_l=refs/tags/${remote_ref}
+					else
+						# commit id
+						# so we need to fetch the whole branch
+						if [[ ${branch} ]]; then
+							fetch_l=${branch}
+						else
+							fetch_l=HEAD
+						fi
+
+						# fetching by commit in shallow mode? can't do.
+						if [[ ${clone_type} == shallow ]]; then
+							clone_type=single
+						fi
+					fi
+				fi
+
+				# checkout by date does not make sense in shallow mode
+				if [[ ${commit_date} && ${clone_type} == shallow ]]; then
+					clone_type=single
+				fi
+
+				if [[ ${fetch_l} == HEAD ]]; then
+					fetch_r=refs/git-r3/HEAD
+				else
+					fetch_r=${fetch_l}
+				fi
+
+				fetch_command+=(
+					"+${fetch_l}:${fetch_r}"
+				)
+
+				if [[ ${clone_type} == single+tags ]]; then
+					fetch_command+=(
+						# pull tags explicitly as requested
+						"+refs/tags/*:refs/tags/*"
+					)
+				fi
+			fi
+
+			if [[ ${clone_type} == shallow ]]; then
+				if _git-r3_is_local_repo; then
+					# '--depth 1' causes sandbox violations with local repos
+					# bug #491260
+					clone_type=single
+				elif [[ ! $(git rev-parse --quiet --verify "${fetch_r}") ]]
+				then
+					# use '--depth 1' when fetching a new branch
+					fetch_command+=( --depth 1 )
+				fi
+			else # non-shallow mode
+				if [[ -f ${GIT_DIR}/shallow ]]; then
+					fetch_command+=( --unshallow )
+				fi
+			fi
+
+			set -- "${fetch_command[@]}"
+			echo "${@}" >&2
+			"${@}" || continue
+
+			if [[ ${clone_type} == mirror || ${fetch_l} == HEAD ]]; then
+				# update our HEAD to match our remote HEAD ref
+				git symbolic-ref HEAD refs/git-r3/HEAD \
+						|| die "Unable to update HEAD"
+			fi
+		fi
+
+		# now let's see what the user wants from us
+		if [[ ${commit_date} ]]; then
+			local dated_commit_id=$(
+				git rev-list --first-parent --before="${commit_date}" \
+					-n 1 "${remote_ref}"
+			)
+			if [[ ${?} -ne 0 ]]; then
+				die "Listing ${remote_ref} failed (wrong ref?)."
+			elif [[ ! ${dated_commit_id} ]]; then
+				die "Unable to find commit for date ${commit_date}."
+			else
+				set -- git update-ref --no-deref "${local_ref}" "${dated_commit_id}"
+			fi
+		else
+			local full_remote_ref=$(
+				git rev-parse --verify --symbolic-full-name "${remote_ref}"
+			)
+
+			if [[ ${full_remote_ref} ]]; then
+				# when we are given a ref, create a symbolic ref
+				# so that we preserve the actual argument
+				set -- git symbolic-ref "${local_ref}" "${full_remote_ref}"
+			else
+				# otherwise, we were likely given a commit id
+				set -- git update-ref --no-deref "${local_ref}" "${remote_ref}"
+			fi
+		fi
+
+		echo "${@}" >&2
+		if ! "${@}"; then
+			if [[ ${EVCS_OFFLINE} ]]; then
+				eerror "A clone of the following repository is required to proceed:"
+				eerror "  ${r}"
+				eerror "However, networking activity has been disabled using EVCS_OFFLINE and the local"
+				eerror "clone does not have requested ref:"
+				eerror "  ${remote_ref}"
+				die "Local clone of ${r} does not have requested ref: ${remote_ref}. Unable to proceed with EVCS_OFFLINE."
+			else
+				die "Referencing ${remote_ref} failed (wrong ref?)."
+			fi
+		fi
+
+		success=1
+		break
+	done
+	if [[ ${saved_umask} ]]; then
+		umask "${saved_umask}" || die
+	fi
+	[[ ${success} ]] || die "Unable to fetch from any of EGIT_REPO_URI"
+
+	# submodules can reference commits in any branch
+	# always use the 'mirror' mode to accomodate that, bug #503332
+	local EGIT_CLONE_TYPE=mirror
+
+	# recursively fetch submodules
+	if git cat-file -e "${local_ref}":.gitmodules &>/dev/null; then
+		local submodules
+		_git-r3_set_submodules \
+			"$(git cat-file -p "${local_ref}":.gitmodules || die)"
+
+		while [[ ${submodules[@]} ]]; do
+			local subname=${submodules[0]}
+			local url=${submodules[1]}
+			local path=${submodules[2]}
+
+			# use only submodules for which path does exist
+			# (this is in par with 'git submodule'), bug #551100
+			# note: git cat-file does not work for submodules
+			if [[ $(git ls-tree -d "${local_ref}" "${path}") ]]
+			then
+				local commit=$(git rev-parse "${local_ref}:${path}" || die)
+
+				if [[ ! ${commit} ]]; then
+					die "Unable to get commit id for submodule ${subname}"
+				fi
+
+				local subrepos
+				_git-r3_set_subrepos "${url}" "${repos[@]}"
+
+				git-r3_fetch "${subrepos[*]}" "${commit}" "${local_id}/${subname}"
+			fi
+
+			submodules=( "${submodules[@]:3}" ) # shift
+		done
+	fi
+}
+
+# @FUNCTION: git-r3_checkout
+# @USAGE: [<repo-uri> [<checkout-path> [<local-id>]]]
+# @DESCRIPTION:
+# Check the previously fetched tree to the working copy.
+#
+# <repo-uri> specifies the repository URIs, as a space-separated list.
+# The first URI will be used as repository group identifier
+# and therefore must be used consistently with git-r3_fetch.
+# The remaining URIs are not used and therefore may be omitted.
+# When not specified, defaults to ${EGIT_REPO_URI}.
+#
+# <checkout-path> specifies the path to place the checkout. It defaults
+# to ${EGIT_CHECKOUT_DIR} if set, otherwise to ${WORKDIR}/${P}.
+#
+# <local-id> needs to specify the local identifier that was used
+# for respective git-r3_fetch.
+#
+# The checkout operation will write to the working copy, and export
+# the repository state into the environment. If the repository contains
+# submodules, they will be checked out recursively.
+git-r3_checkout() {
+	debug-print-function ${FUNCNAME} "$@"
+
+	local repos
+	if [[ ${1} ]]; then
+		repos=( ${1} )
+	elif [[ $(declare -p EGIT_REPO_URI) == "declare -a"* ]]; then
+		repos=( "${EGIT_REPO_URI[@]}" )
+	else
+		repos=( ${EGIT_REPO_URI} )
+	fi
+
+	local out_dir=${2:-${EGIT_CHECKOUT_DIR:-${WORKDIR}/${P}}}
+	local local_id=${3:-${CATEGORY}/${PN}/${SLOT%/*}}
+
+	local -x GIT_DIR
+	_git-r3_set_gitdir "${repos[0]}"
+
+	einfo "Checking out \e[1m${repos[0]}\e[22m to \e[1m${out_dir}\e[22m ..."
+
+	if ! git cat-file -e refs/git-r3/"${local_id}"/__main__; then
+		die "Logic error: no local clone of ${repos[0]}. git-r3_fetch not used?"
+	fi
+	local remote_ref=$(
+		git symbolic-ref --quiet refs/git-r3/"${local_id}"/__main__
+	)
+	local new_commit_id=$(
+		git rev-parse --verify refs/git-r3/"${local_id}"/__main__
+	)
+
+	git-r3_sub_checkout() {
+		local orig_repo=${GIT_DIR}
+		local -x GIT_DIR=${out_dir}/.git
+		local -x GIT_WORK_TREE=${out_dir}
+
+		mkdir -p "${out_dir}" || die
+
+		# use git init+fetch instead of clone since the latter doesn't like
+		# non-empty directories.
+
+		git init --quiet || die
+		# setup 'alternates' to avoid copying objects
+		echo "${orig_repo}/objects" > "${GIT_DIR}"/objects/info/alternates || die
+		# now copy the refs
+		cp -R "${orig_repo}"/refs/* "${GIT_DIR}"/refs/ || die
+
+		# (no need to copy HEAD, we will set it via checkout)
+
+		if [[ -f ${orig_repo}/shallow ]]; then
+			cp "${orig_repo}"/shallow "${GIT_DIR}"/ || die
+		fi
+
+		set -- git checkout --quiet
+		if [[ ${remote_ref} ]]; then
+			set -- "${@}" "${remote_ref#refs/heads/}"
+		else
+			set -- "${@}" "${new_commit_id}"
+		fi
+		echo "${@}" >&2
+		"${@}" || die "git checkout ${remote_ref:-${new_commit_id}} failed"
+	}
+	git-r3_sub_checkout
+	unset -f git-r3_sub_checkout
+
+	local old_commit_id=$(
+		git rev-parse --quiet --verify refs/git-r3/"${local_id}"/__old__
+	)
+	if [[ ! ${old_commit_id} ]]; then
+		echo "GIT NEW branch -->"
+		echo "   repository:               ${repos[0]}"
+		echo "   at the commit:            ${new_commit_id}"
+	else
+		# diff against previous revision
+		echo "GIT update -->"
+		echo "   repository:               ${repos[0]}"
+		# write out message based on the revisions
+		if [[ "${old_commit_id}" != "${new_commit_id}" ]]; then
+			echo "   updating from commit:     ${old_commit_id}"
+			echo "   to commit:                ${new_commit_id}"
+
+			git --no-pager diff --stat \
+				${old_commit_id}..${new_commit_id}
+		else
+			echo "   at the commit:            ${new_commit_id}"
+		fi
+	fi
+	git update-ref --no-deref refs/git-r3/"${local_id}"/{__old__,__main__} || die
+
+	# recursively checkout submodules
+	if [[ -f ${out_dir}/.gitmodules ]]; then
+		local submodules
+		_git-r3_set_submodules \
+			"$(<"${out_dir}"/.gitmodules)"
+
+		while [[ ${submodules[@]} ]]; do
+			local subname=${submodules[0]}
+			local url=${submodules[1]}
+			local path=${submodules[2]}
+
+			# use only submodules for which path does exist
+			# (this is in par with 'git submodule'), bug #551100
+			if [[ -d ${out_dir}/${path} ]]; then
+				local subrepos
+				_git-r3_set_subrepos "${url}" "${repos[@]}"
+
+				git-r3_checkout "${subrepos[*]}" "${out_dir}/${path}" \
+					"${local_id}/${subname}"
+			fi
+
+			submodules=( "${submodules[@]:3}" ) # shift
+		done
+	fi
+
+	# keep this *after* submodules
+	export EGIT_DIR=${GIT_DIR}
+	export EGIT_VERSION=${new_commit_id}
+}
+
+# @FUNCTION: git-r3_peek_remote_ref
+# @USAGE: [<repo-uri> [<remote-ref>]]
+# @DESCRIPTION:
+# Peek the reference in the remote repository and print the matching
+# (newest) commit SHA1.
+#
+# <repo-uri> specifies the repository URIs to fetch from, as a space-
+# -separated list. When not specified, defaults to ${EGIT_REPO_URI}.
+#
+# <remote-ref> specifies the remote ref to peek.  It is preferred to use
+# 'refs/heads/<branch-name>' for branches and 'refs/tags/<tag-name>'
+# for tags. Alternatively, 'HEAD' may be used for upstream default
+# branch. Defaults to the first of EGIT_COMMIT, EGIT_BRANCH or literal
+# 'HEAD' that is set to a non-null value.
+#
+# The operation will be done purely on the remote, without using local
+# storage. If commit SHA1 is provided as <remote-ref>, the function will
+# fail due to limitations of git protocol.
+#
+# On success, the function returns 0 and writes hexadecimal commit SHA1
+# to stdout. On failure, the function returns 1.
+git-r3_peek_remote_ref() {
+	debug-print-function ${FUNCNAME} "$@"
+
+	local repos
+	if [[ ${1} ]]; then
+		repos=( ${1} )
+	elif [[ $(declare -p EGIT_REPO_URI) == "declare -a"* ]]; then
+		repos=( "${EGIT_REPO_URI[@]}" )
+	else
+		repos=( ${EGIT_REPO_URI} )
+	fi
+
+	local branch=${EGIT_BRANCH:+refs/heads/${EGIT_BRANCH}}
+	local remote_ref=${2:-${EGIT_COMMIT:-${branch:-HEAD}}}
+
+	[[ ${repos[@]} ]] || die "No URI provided and EGIT_REPO_URI unset"
+
+	local r success
+	for r in "${repos[@]}"; do
+		einfo "Peeking \e[1m${remote_ref}\e[22m on \e[1m${r}\e[22m ..." >&2
+
+		local lookup_ref
+		if [[ ${remote_ref} == refs/* || ${remote_ref} == HEAD ]]
+		then
+			lookup_ref=${remote_ref}
+		else
+			# ls-remote by commit is going to fail anyway,
+			# so we may as well pass refs/tags/ABCDEF...
+			lookup_ref=refs/tags/${remote_ref}
+		fi
+
+		# split on whitespace
+		local ref=(
+			$(git ls-remote "${r}" "${lookup_ref}")
+		)
+
+		if [[ ${ref[0]} ]]; then
+			echo "${ref[0]}"
+			return 0
+		fi
+	done
+
+	return 1
+}
+
+git-r3_src_fetch() {
+	debug-print-function ${FUNCNAME} "$@"
+
+	if [[ ! ${EGIT3_STORE_DIR} && ${EGIT_STORE_DIR} ]]; then
+		ewarn "You have set EGIT_STORE_DIR but not EGIT3_STORE_DIR. Please consider"
+		ewarn "setting EGIT3_STORE_DIR for git-r3.eclass. It is recommended to use"
+		ewarn "a different directory than EGIT_STORE_DIR to ease removing old clones"
+		ewarn "when git-2 eclass becomes deprecated."
+	fi
+
+	_git-r3_env_setup
+	git-r3_fetch
+}
+
+git-r3_src_unpack() {
+	debug-print-function ${FUNCNAME} "$@"
+
+	_git-r3_env_setup
+	git-r3_src_fetch
+	git-r3_checkout
+}
+
+# https://bugs.gentoo.org/show_bug.cgi?id=482666
+git-r3_pkg_needrebuild() {
+	debug-print-function ${FUNCNAME} "$@"
+
+	local new_commit_id=$(git-r3_peek_remote_ref)
+	[[ ${new_commit_id} && ${EGIT_VERSION} ]] || die "Lookup failed"
+
+	if [[ ${EGIT_VERSION} != ${new_commit_id} ]]; then
+		einfo "Update from \e[1m${EGIT_VERSION}\e[22m to \e[1m${new_commit_id}\e[22m"
+	else
+		einfo "Local and remote at \e[1m${EGIT_VERSION}\e[22m"
+	fi
+
+	[[ ${EGIT_VERSION} != ${new_commit_id} ]]
+}
+
+# 'export' locally until this gets into EAPI
+pkg_needrebuild() { git-r3_pkg_needrebuild; }
+
+_GIT_R3=1
+fi


^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [gentoo-commits] proj/lisp:master commit in: eclass/
@ 2016-11-30 14:25 José María Alonso
  0 siblings, 0 replies; 32+ messages in thread
From: José María Alonso @ 2016-11-30 14:25 UTC (permalink / raw
  To: gentoo-commits

commit:     87af48eb76cc157e19215abf90cdb957dcd88adb
Author:     Chema Alonso Josa <nimiux <AT> gentoo <DOT> org>
AuthorDate: Wed Nov 30 14:25:38 2016 +0000
Commit:     José María Alonso <nimiux <AT> gentoo <DOT> org>
CommitDate: Wed Nov 30 14:25:38 2016 +0000
URL:        https://gitweb.gentoo.org/proj/lisp.git/commit/?id=87af48eb

eclass/common-lisp-3: Fixes typo

 eclass/common-lisp-3.eclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eclass/common-lisp-3.eclass b/eclass/common-lisp-3.eclass
index c903448..d079e55 100644
--- a/eclass/common-lisp-3.eclass
+++ b/eclass/common-lisp-3.eclass
@@ -118,7 +118,7 @@ common-lisp-install-sources() {
 		elif [[ -d ${path} ]] ; then
 			common-lisp-install-sources -t ${ftype} $(find "${path}" -type f)
 		else
-			die "${path} it neither a regular file nor a directory"
+			die "${path} is neither a regular file nor a directory"
 		fi
 	done
 }


^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [gentoo-commits] proj/lisp:master commit in: eclass/
@ 2017-08-22 21:28 José María Alonso
  0 siblings, 0 replies; 32+ messages in thread
From: José María Alonso @ 2017-08-22 21:28 UTC (permalink / raw
  To: gentoo-commits

commit:     501d09bb084c260740272eec3283fe1a5bbdb91a
Author:     Chema Alonso Josa <nimiux <AT> gentoo <DOT> org>
AuthorDate: Tue Aug 22 21:29:22 2017 +0000
Commit:     José María Alonso <nimiux <AT> gentoo <DOT> org>
CommitDate: Tue Aug 22 21:29:22 2017 +0000
URL:        https://gitweb.gentoo.org/proj/lisp.git/commit/?id=501d09bb

common-lisp-2.eclass: Remove obsolete eclass

 eclass/common-lisp-2.eclass | 138 --------------------------------------------
 1 file changed, 138 deletions(-)

diff --git a/eclass/common-lisp-2.eclass b/eclass/common-lisp-2.eclass
deleted file mode 100644
index 7c2869a1..00000000
--- a/eclass/common-lisp-2.eclass
+++ /dev/null
@@ -1,138 +0,0 @@
-# Copyright 1999-2010 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: $
-#
-# Maintained by the Gentoo Common Lisp project
-# irc: #gentoo-lisp, herd: <common-lisp@gentoo.org>, list: <gentoo-lisp@gentoo.org>
-#
-# This eclass supports the installation of Common Lisp libraries
-#
-# Public functions:
-#
-# common-lisp-install path [<other_paths>...]
-#   recursively install sources
-#
-# common-lisp-symlink-asdf [<paths>...]
-#   create symlinks in $CLSYSTEMROOT to asdf files
-#
-# common-lisp-export-impl-args lisp-implementation
-#   export a few variables containing the switches necessary
-#   to make the CL implementation perform basic functions:
-#   * CL_NORC: don't load initfiles
-#   * CL_LOAD: load a certain file
-#   * CL_EVAL: eval a certain expression at startup
-#
-
-inherit eutils
-
-# CL packages in the overlay don't have their tarballs on the mirrors
-# so it's useless to mirror them
-RESTRICT="mirror"
-
-CLSOURCEROOT="${ROOT%/}"/usr/share/common-lisp/source
-CLSYSTEMROOT="${ROOT%/}"/usr/share/common-lisp/systems
-
-# Sources will be installed into ${CLSOURCEROOT}/${CLPACKAGE}/
-# Any asdf files will be symlinked in ${CLSYSTEMROOT}/${CLSYSTEM} as they may be
-# in an arbitrarily deeply nested directory under ${CLSOURCEROOT}/${CLPACKAGE}/
-
-# To override, set these after inheriting this eclass
-CLPACKAGE="${PN}"
-CLSYSTEMS="${PN}"
-
-RDEPEND="virtual/commonlisp"
-
-EXPORT_FUNCTIONS src_install
-
-absolute-path-p() {
-	[[ $# = 1 ]] || die "${FUNCNAME[0]} must receive one argument"
-	[[ ${1} = /* ]]
-}
-
-common-lisp-install-source() {
-	[[ $# = 2 ]] || die "${FUNCNAME[0]} must receive exactly two arguments"
-
-	local source="${1}"
-	local target="${CLSOURCEROOT}/${CLPACKAGE}/${2}"
-	insinto "${target}"
-	doins -r "${source}" || die "Failed to install ${source} into $(dirname "${target}")"
-}
-
-common-lisp-install() {
-	[[ $# = 0 ]] && die "${FUNCNAME[0]} must receive at least one argument"
-	for path in "$@"; do
-		if absolute-path-p "${path}" ; then
-			die "Cannot install files with absolute path: ${path}"
-		fi
-		common-lisp-install-source "${path}" "$(dirname "${path}")"
-	done
-}
-
-common-lisp-install-single-system() {
-	[[ $# != 1 ]] && die "${FUNCNAME[0]} must receive exactly one argument"
-
-	local file="${CLSOURCEROOT%/}/${CLPACKAGE}/${1}.asd"
-	[[ -f "${D}"/${file} ]] || die "${D}/${file} does not exist"
-	dosym "${file}" "${CLSYSTEMROOT%/}/$(basename ${file})"
-}
-
-# Symlink asdf files
-# if no arguments received, default to the contents of ${CLSYSTEMS}
-common-lisp-symlink-asdf() {
-	dodir "${CLSYSTEMROOT}"
-
-	[[ $# = 0 ]] && set - ${CLSYSTEMS}
-	for package in "$@" ; do
-		common-lisp-install-single-system "${package}"
-	done
-}
-
-common-lisp-system-symlink() {
-	die "common-lisp-system-symlink() has been renamed to common-lisp-symlink-asdf()"
-}
-
-common-lisp-2_src_install() {
-	common-lisp-install *.{lisp,asd}
-	common-lisp-symlink-asdf
-	for i in README HEADER TODO CHANGELOG ChangeLog CHANGES BUGS CONTRIBUTORS *NEWS ; do
-		[[ -f ${i} ]] && dodoc ${i}
-	done
-}
-
-common-lisp-export-impl-args() {
-	if [[ $# != 1 ]]; then
-		eerror "Usage: ${0} lisp-implementation"
-		die "${0}: wrong number of arguments: $#"
-	fi
-	case ${1} in
-		clisp)
-			CL_NORC="-norc"
-			CL_LOAD="-i"
-			CL_EVAL="-x"
-			;;
-		clozure|ccl|openmcl)
-			CL_NORC="--no-init"
-			CL_LOAD="--load"
-			CL_EVAL="--eval"
-			;;
-		cmucl)
-			CL_NORC="-nositeinit -noinit"
-			CL_LOAD="-load"
-			CL_EVAL="-eval"
-			;;
-		ecl)
-			CL_NORC="-norc"
-			CL_LOAD="-load"
-			CL_EVAL="-eval"
-			;;
-		sbcl)
-			CL_NORC="--sysinit /dev/null --userinit /dev/null"
-			CL_LOAD="--load"
-			CL_EVAL="--eval"
-			;;
-		*)
-			die ${1} is not supported by ${0}
-			;;
-	esac
-	export CL_NORC CL_LOAD CL_EVAL
-}


^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [gentoo-commits] proj/lisp:master commit in: eclass/
@ 2017-08-22 21:32 José María Alonso
  0 siblings, 0 replies; 32+ messages in thread
From: José María Alonso @ 2017-08-22 21:32 UTC (permalink / raw
  To: gentoo-commits

commit:     59492b860e673f1a301981554382934b36589545
Author:     Chema Alonso Josa <nimiux <AT> gentoo <DOT> org>
AuthorDate: Tue Aug 22 21:32:40 2017 +0000
Commit:     José María Alonso <nimiux <AT> gentoo <DOT> org>
CommitDate: Tue Aug 22 21:32:40 2017 +0000
URL:        https://gitweb.gentoo.org/proj/lisp.git/commit/?id=59492b86

common-lisp-3.eclass: Updates header and CL_BINARY variable

 eclass/common-lisp-3.eclass | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/eclass/common-lisp-3.eclass b/eclass/common-lisp-3.eclass
index d079e552..290b7532 100644
--- a/eclass/common-lisp-3.eclass
+++ b/eclass/common-lisp-3.eclass
@@ -1,6 +1,5 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Id$
 
 # @ECLASS: common-lisp-3.eclass
 # @MAINTAINER:
@@ -42,7 +41,9 @@ EXPORT_FUNCTIONS src_compile src_install
 # @DESCRIPTION:
 # Since there's nothing to build in most cases, default doesn't do
 # anything.
-common-lisp-3_src_compile() { true; }
+common-lisp-3_src_compile() {
+	true;
+}
 
 # @FUNCTION: absolute-path-p
 # @DESCRIPTION:
@@ -178,13 +179,14 @@ common-lisp-export-impl-args() {
 		die "${FUNCNAME[0]}: wrong number of arguments: $#"
 	fi
 	CL_BINARY="${1}"
-	case ${1} in
+	case "${CL_BINARY}" in
 		clisp)
 			CL_NORC="-norc"
 			CL_LOAD="-i"
 			CL_EVAL="-x"
 			;;
-		clozurecl | ccl | openmcl)
+		clozure | clozurecl | ccl | openmcl)
+			CL_BINARY="ccl"
 			CL_NORC="--no-init"
 			CL_LOAD="--load"
 			CL_EVAL="--eval"
@@ -206,7 +208,7 @@ common-lisp-export-impl-args() {
 			CL_EVAL="--eval"
 			;;
 		*)
-			die ${1} is not supported by ${0}
+			die "${CL_BINARY} is not supported by ${0}"
 			;;
 	esac
 	export CL_BINARY CL_NORC CL_LOAD CL_EVAL


^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [gentoo-commits] proj/lisp:master commit in: eclass/
@ 2017-08-22 21:33 José María Alonso
  0 siblings, 0 replies; 32+ messages in thread
From: José María Alonso @ 2017-08-22 21:33 UTC (permalink / raw
  To: gentoo-commits

commit:     20662b9aa58fe14d123fccf9b8c4e0d4bb44b508
Author:     Chema Alonso Josa <nimiux <AT> gentoo <DOT> org>
AuthorDate: Tue Aug 22 21:34:16 2017 +0000
Commit:     José María Alonso <nimiux <AT> gentoo <DOT> org>
CommitDate: Tue Aug 22 21:34:16 2017 +0000
URL:        https://gitweb.gentoo.org/proj/lisp.git/commit/?id=20662b9a

git-r3.eclass: Syncs with ebuild repository

 eclass/git-r3.eclass | 26 +++++++++++---------------
 1 file changed, 11 insertions(+), 15 deletions(-)

diff --git a/eclass/git-r3.eclass b/eclass/git-r3.eclass
index f76f1a7e..bc7d4d92 100644
--- a/eclass/git-r3.eclass
+++ b/eclass/git-r3.eclass
@@ -1,6 +1,5 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Id$
 
 # @ECLASS: git-r3.eclass
 # @MAINTAINER:
@@ -18,12 +17,6 @@ case "${EAPI:-0}" in
 		;;
 esac
 
-if [[ ! ${_GIT_R3} ]]; then
-
-inherit eutils
-
-fi
-
 EXPORT_FUNCTIONS src_unpack
 
 if [[ ! ${_GIT_R3} ]]; then
@@ -154,8 +147,9 @@ fi
 # @DEFAULT_UNSET
 # @DESCRIPTION:
 # The tag name or commit identifier to check out. If unset, newest
-# commit from the branch will be used. If set, EGIT_BRANCH will
-# be ignored.
+# commit from the branch will be used. Note that if set to a commit
+# not on HEAD branch, EGIT_BRANCH needs to be set to a branch on which
+# the commit is available.
 #
 # It can be overriden via env using ${PN}_LIVE_COMMIT variable.
 
@@ -163,7 +157,8 @@ fi
 # @DEFAULT_UNSET
 # @DESCRIPTION:
 # Attempt to check out the repository state for the specified timestamp.
-# The date should be in format understood by 'git rev-list'.
+# The date should be in format understood by 'git rev-list'. The commits
+# on EGIT_BRANCH will be considered.
 #
 # The eclass will select the last commit with commit date preceding
 # the specified date. When merge commits are found, only first parents
@@ -447,10 +442,11 @@ _git-r3_set_submodules() {
 			submodule."${subname}".update)
 		[[ ${upd} == none ]] && continue
 
-		# https://github.com/git/git/blob/master/refs.c#L39
-		# for now, we just filter /. because of #572312
-		local enc_subname=${subname//\/.//_}
-		[[ ${enc_subname} == .* ]] && enc_subname=_${enc_subname#.}
+		# https://github.com/git/git/blob/master/refs.c#L31
+		# we are more restrictive than git itself but that should not
+		# cause any issues, #572312, #606950
+		# TODO: check escaped names for collisions
+		local enc_subname=${subname//[^a-zA-Z0-9-]/_}
 
 		submodules+=(
 			"${enc_subname}"


^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [gentoo-commits] proj/lisp:master commit in: eclass/
@ 2017-08-22 21:36 José María Alonso
  0 siblings, 0 replies; 32+ messages in thread
From: José María Alonso @ 2017-08-22 21:36 UTC (permalink / raw
  To: gentoo-commits

commit:     3c6610a924d9e67f04bb373b9bbef475a13e1546
Author:     Chema Alonso Josa <nimiux <AT> gentoo <DOT> org>
AuthorDate: Tue Aug 22 21:37:08 2017 +0000
Commit:     José María Alonso <nimiux <AT> gentoo <DOT> org>
CommitDate: Tue Aug 22 21:37:08 2017 +0000
URL:        https://gitweb.gentoo.org/proj/lisp.git/commit/?id=3c6610a9

bash-completion-r1.eclass: Syncs with ebuild repository

 eclass/bash-completion-r1.eclass | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/eclass/bash-completion-r1.eclass b/eclass/bash-completion-r1.eclass
index 25519736..eb2dfce4 100644
--- a/eclass/bash-completion-r1.eclass
+++ b/eclass/bash-completion-r1.eclass
@@ -1,6 +1,5 @@
 # Copyright 1999-2014 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Id$
 
 # @ECLASS: bash-completion-r1.eclass
 # @MAINTAINER:
@@ -26,7 +25,7 @@
 inherit toolchain-funcs
 
 case ${EAPI:-0} in
-	0|1|2|3|4|5) ;;
+	0|1|2|3|4|5|6) ;;
 	*) die "EAPI ${EAPI} unsupported (yet)."
 esac
 
@@ -41,12 +40,13 @@ _bash-completion-r1_get_bashdir() {
 	debug-print-function ${FUNCNAME} "${@}"
 
 	if $(tc-getPKG_CONFIG) --exists bash-completion &>/dev/null; then
-		local path="$($(tc-getPKG_CONFIG) --variable=$1 bash-completion)"
+		local path
+		path=$($(tc-getPKG_CONFIG) --variable="${1}" bash-completion) || die
 		# we need to return unprefixed, so strip from what pkg-config returns
 		# to us, bug #477692
 		echo "${path#${EPREFIX}}"
 	else
-		echo $2
+		echo "${2}"
 	fi
 }
 
@@ -129,6 +129,7 @@ bashcomp_alias() {
 	shift
 
 	for f; do
-		dosym "${base}" "$(_bash-completion-r1_get_bashcompdir)/${f}"
+		dosym "${base}" "$(_bash-completion-r1_get_bashcompdir)/${f}" \
+			|| return
 	done
 }


^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [gentoo-commits] proj/lisp:master commit in: eclass/
@ 2017-08-29 15:23 José María Alonso
  0 siblings, 0 replies; 32+ messages in thread
From: José María Alonso @ 2017-08-29 15:23 UTC (permalink / raw
  To: gentoo-commits

commit:     fcb67da06e1c6dae87b541a6292bcf6f835aa0b0
Author:     Chema Alonso Josa <nimiux <AT> gentoo <DOT> org>
AuthorDate: Tue Aug 29 15:23:39 2017 +0000
Commit:     José María Alonso <nimiux <AT> gentoo <DOT> org>
CommitDate: Tue Aug 29 15:23:39 2017 +0000
URL:        https://gitweb.gentoo.org/proj/lisp.git/commit/?id=fcb67da0

common-lisp-3.eclass: Adds comment on CL_BINARY variable

 eclass/common-lisp-3.eclass | 1 +
 1 file changed, 1 insertion(+)

diff --git a/eclass/common-lisp-3.eclass b/eclass/common-lisp-3.eclass
index 290b7532..f0f0b0da 100644
--- a/eclass/common-lisp-3.eclass
+++ b/eclass/common-lisp-3.eclass
@@ -170,6 +170,7 @@ common-lisp-3_src_install() {
 # @DESCRIPTION:
 #   Export a few variables containing the switches necessary
 #   to make the CL implementation perform basic functions:
+#   * CL_BINARY: Common Lisp implementation
 #   * CL_NORC: don't load syste-wide or user-specific initfiles
 #   * CL_LOAD: load a certain file
 #   * CL_EVAL: eval a certain expression at startup


^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [gentoo-commits] proj/lisp:master commit in: eclass/
@ 2017-10-06 21:21 José María Alonso
  0 siblings, 0 replies; 32+ messages in thread
From: José María Alonso @ 2017-10-06 21:21 UTC (permalink / raw
  To: gentoo-commits

commit:     cb8aca55c8e7964608b8d2ebc27a19ec455c4df9
Author:     Chema Alonso Josa <nimiux <AT> gentoo <DOT> org>
AuthorDate: Fri Oct  6 21:21:06 2017 +0000
Commit:     José María Alonso <nimiux <AT> gentoo <DOT> org>
CommitDate: Fri Oct  6 21:21:06 2017 +0000
URL:        https://gitweb.gentoo.org/proj/lisp.git/commit/?id=cb8aca55

common-lisp-3.eclass: Adds CLIMPLEMENTATIONS variable and common-lisp-find-lisp-impl function

 eclass/common-lisp-3.eclass | 21 +++++++++++++++++++--
 1 file changed, 19 insertions(+), 2 deletions(-)

diff --git a/eclass/common-lisp-3.eclass b/eclass/common-lisp-3.eclass
index f0f0b0da..9acf17e3 100644
--- a/eclass/common-lisp-3.eclass
+++ b/eclass/common-lisp-3.eclass
@@ -15,6 +15,11 @@ inherit eutils
 # so it's useless to mirror them
 RESTRICT="mirror"
 
+# @ECLASS-VARIABLE: CLIMPLEMENTATIONS
+# @DESCRIPTION:
+# Common Lisp implementations
+CLIMPLEMENTATIONS="sbcl clisp clozurecl cmucl ecls gcl"
+
 # @ECLASS-VARIABLE: CLSOURCEROOT
 # @DESCRIPTION:
 # Default path of Common Lisp libraries sources. Sources will
@@ -165,11 +170,23 @@ common-lisp-3_src_install() {
 	done
 }
 
+# @FUNCTION: common-lisp-find-lisp-impl
+# @USAGE: common-lisp-find-lisp-impl
+# @DESCRIPTION:
+# Outputs an installed Common Lisp implementation. Transverses
+# CLIMPLEMENTATIONS to find it.
+common-lisp-find-lisp-impl() {
+	for lisp in ${CLIMPLEMENTATIONS} ; do
+		[[ "$(best_version dev-lisp/${lisp})" ]] && echo "${lisp}" && return
+	done
+	die "No CommonLisp implementation found"
+}
+
 # @FUNCTION: common-lisp-export-impl-args
 # @USAGE: common-lisp-export-impl-args <lisp-implementation>
 # @DESCRIPTION:
-#   Export a few variables containing the switches necessary
-#   to make the CL implementation perform basic functions:
+# Export a few variables containing the switches necessary
+# to make the CL implementation perform basic functions:
 #   * CL_BINARY: Common Lisp implementation
 #   * CL_NORC: don't load syste-wide or user-specific initfiles
 #   * CL_LOAD: load a certain file


^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [gentoo-commits] proj/lisp:master commit in: eclass/
@ 2017-10-28 14:25 José María Alonso
  0 siblings, 0 replies; 32+ messages in thread
From: José María Alonso @ 2017-10-28 14:25 UTC (permalink / raw
  To: gentoo-commits

commit:     50fcd4aacafbb5d9b08330e9c4d54196c010412c
Author:     Chema Alonso Josa <nimiux <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 28 14:25:03 2017 +0000
Commit:     José María Alonso <nimiux <AT> gentoo <DOT> org>
CommitDate: Sat Oct 28 14:25:03 2017 +0000
URL:        https://gitweb.gentoo.org/proj/lisp.git/commit/?id=50fcd4aa

elisp.eclass: Copy from gentoo repo

 eclass/elisp-common.eclass | 414 +++++++++++++++++++++++++++++++++++++++++++++
 eclass/elisp.eclass        | 218 ++++++++++++++++++++++++
 2 files changed, 632 insertions(+)

diff --git a/eclass/elisp-common.eclass b/eclass/elisp-common.eclass
new file mode 100644
index 00000000..05b03f49
--- /dev/null
+++ b/eclass/elisp-common.eclass
@@ -0,0 +1,414 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# @ECLASS: elisp-common.eclass
+# @MAINTAINER:
+# Gentoo GNU Emacs project <gnu-emacs@gentoo.org>
+# @AUTHOR:
+# Matthew Kennedy <mkennedy@gentoo.org>
+# Jeremy Maitin-Shepard <jbms@attbi.com>
+# Mamoru Komachi <usata@gentoo.org>
+# Christian Faulhammer <fauli@gentoo.org>
+# Ulrich Müller <ulm@gentoo.org>
+# @BLURB: Emacs-related installation utilities
+# @DESCRIPTION:
+#
+# Usually you want to use this eclass for (optional) GNU Emacs support
+# of your package.  This is NOT for XEmacs!
+#
+# 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 emacs USE flag, you need to add
+#
+# @CODE
+# 	emacs? ( virtual/emacs )
+# @CODE
+#
+# to your DEPEND/RDEPEND line and use the functions provided here to
+# bring the files to the correct locations.
+#
+# If your package requires a minimum Emacs version, e.g. Emacs 24, then
+# the dependency should be on >=virtual/emacs-24 instead.  Because the
+# user can select the Emacs executable with eselect, you should also
+# make sure that the active Emacs version is sufficient.  This can be
+# tested with function elisp-need-emacs(), which would typically be
+# called from pkg_setup(), as in the following example:
+#
+# @CODE
+# 	elisp-need-emacs 24 || die "Emacs version too low"
+# @CODE
+#
+# Please note that such tests should be limited to packages that are
+# known to fail with lower Emacs versions; the standard case is to
+# depend on virtual/emacs without version.
+#
+# @ROFF .SS
+# src_compile() usage:
+#
+# An elisp file is compiled by the elisp-compile() function defined
+# here and simply takes the source files as arguments.  The case of
+# interdependent elisp files is also supported, since the current
+# directory is added to the load-path which makes sure that all files
+# are loadable.
+#
+# @CODE
+# 	elisp-compile *.el
+# @CODE
+#
+# Function elisp-make-autoload-file() can be used to generate a file
+# with autoload definitions for the lisp functions.  It takes the output
+# file name (default: "${PN}-autoloads.el") and a list of directories
+# (default: working directory) as its arguments.  Use of this function
+# requires that the elisp source files contain magic ";;;###autoload"
+# comments.  See the Emacs 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/share/emacs/site-lisp/ which is named after the first argument
+# of elisp-install().  The following parameters are the files to be put
+# in that directory.  Usually the subdirectory should be ${PN}, you can
+# choose something else, but remember to tell elisp-site-file-install()
+# (see below) the change, as it defaults to ${PN}.
+#
+# @CODE
+# 	elisp-install ${PN} *.el *.elc
+# @CODE
+#
+# To let the Emacs support be activated by Emacs 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:
+#
+# @CODE
+# 	(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)
+# @CODE
+#
+# If your Emacs support files are installed in a subdirectory of
+# /usr/share/emacs/site-lisp/ (which is strongly recommended), you need
+# to extend Emacs' load-path as shown in the first non-comment line.
+# The elisp-site-file-install() function of this eclass will replace
+# "@SITELISP@" and "@SITEETC@" by the actual paths.
+#
+# The next line tells Emacs 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 Emacs 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 guiding principle is that emerging your package should not by
+# itself cause a change of standard Emacs behaviour.
+#
+# 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 Emacs
+# 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):
+#
+# @CODE
+# 	SITEFILE="50${PN}-gentoo.el"
+# @CODE
+#
+# Which is then installed by
+#
+# @CODE
+# 	elisp-site-file-install "${FILESDIR}/${SITEFILE}"
+# @CODE
+#
+# 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.
+#
+# @ROFF .SS
+# pkg_postinst() / pkg_postrm() usage:
+#
+# After that you need to recreate the start-up file of Emacs after
+# emerging and unmerging by using
+#
+# @CODE
+# 	pkg_postinst() {
+# 		elisp-site-regen
+# 	}
+#
+# 	pkg_postrm() {
+# 		elisp-site-regen
+# 	}
+# @CODE
+#
+# When having optional Emacs support, you should prepend "use emacs &&"
+# to above calls of elisp-site-regen().
+# Don't use "has_version virtual/emacs"!  When unmerging the state of
+# the emacs USE flag is taken from the package database and not from the
+# environment, so it is no problem when you unset USE=emacs between
+# merge and unmerge of a package.
+
+# @ECLASS-VARIABLE: SITELISP
+# @DESCRIPTION:
+# Directory where packages install Emacs Lisp files.
+SITELISP=/usr/share/emacs/site-lisp
+
+# @ECLASS-VARIABLE: SITEETC
+# @DESCRIPTION:
+# Directory where packages install miscellaneous (not Lisp) files.
+SITEETC=/usr/share/emacs/etc
+
+# @ECLASS-VARIABLE: EMACS
+# @DESCRIPTION:
+# Path of Emacs executable.
+EMACS=${EPREFIX}/usr/bin/emacs
+
+# @ECLASS-VARIABLE: EMACSFLAGS
+# @DESCRIPTION:
+# Flags for executing Emacs in batch mode.
+# These work for Emacs versions 18-24, so don't change them.
+EMACSFLAGS="-batch -q --no-site-file"
+
+# @ECLASS-VARIABLE: BYTECOMPFLAGS
+# @DESCRIPTION:
+# Emacs flags used for byte-compilation in elisp-compile().
+BYTECOMPFLAGS="-L ."
+
+# @FUNCTION: elisp-emacs-version
+# @RETURN: exit status of Emacs
+# @DESCRIPTION:
+# Output version of currently active Emacs.
+
+elisp-emacs-version() {
+	local version ret
+	# The following will work for at least versions 18-24.
+	echo "(princ emacs-version)" >"${T}"/emacs-version.el
+	version=$(
+		# EMACS could be a microemacs variant that ignores the -batch
+		# option and would therefore hang, waiting for user interaction.
+		# Redirecting stdin and unsetting TERM and DISPLAY will cause
+		# most of them to exit with an error.
+		unset TERM DISPLAY
+		${EMACS} ${EMACSFLAGS} -l "${T}"/emacs-version.el </dev/null
+	)
+	ret=$?
+	rm -f "${T}"/emacs-version.el
+	if [[ ${ret} -ne 0 ]]; then
+		eerror "elisp-emacs-version: Failed to run ${EMACS}"
+		return ${ret}
+	fi
+	if [[ -z ${version} ]]; then
+		eerror "elisp-emacs-version: Could not determine Emacs version"
+		return 1
+	fi
+	echo "${version}"
+}
+
+# @FUNCTION: elisp-need-emacs
+# @USAGE: <version>
+# @RETURN: 0 if true, 1 if false, 2 if trouble
+# @DESCRIPTION:
+# Test if the eselected Emacs version is at least the major version
+# of GNU Emacs specified as argument.
+
+elisp-need-emacs() {
+	local need_emacs=$1 have_emacs
+	have_emacs=$(elisp-emacs-version) || return 2
+	einfo "Emacs version: ${have_emacs}"
+	if [[ ${have_emacs} =~ XEmacs|Lucid ]]; then
+		eerror "This package needs GNU Emacs."
+		return 1
+	fi
+	if ! [[ ${have_emacs%%.*} -ge ${need_emacs%%.*} ]]; then
+		eerror "This package needs at least Emacs ${need_emacs%%.*}."
+		eerror "Use \"eselect emacs\" to select the active version."
+		return 1
+	fi
+	return 0
+}
+
+# @FUNCTION: elisp-compile
+# @USAGE: <list of elisp files>
+# @DESCRIPTION:
+# Byte-compile Emacs Lisp files.
+#
+# This function uses GNU Emacs to byte-compile all ".el" specified by
+# its arguments.  The resulting byte-code (".elc") files are placed in
+# the same directory as their corresponding source file.
+#
+# The current directory is added to the load-path.  This will ensure
+# that interdependent Emacs Lisp files are visible between themselves,
+# in case they require or load one another.
+
+elisp-compile() {
+	ebegin "Compiling GNU Emacs Elisp files"
+	${EMACS} ${EMACSFLAGS} ${BYTECOMPFLAGS} -f batch-byte-compile "$@"
+	eend $? "elisp-compile: batch-byte-compile failed" || die
+}
+
+# @FUNCTION: elisp-make-autoload-file
+# @USAGE: [output file] [list of directories]
+# @DESCRIPTION:
+# Generate a file with autoload definitions for the lisp functions.
+
+elisp-make-autoload-file() {
+	local f="${1:-${PN}-autoloads.el}" null="" page=$'\f'
+	shift
+	ebegin "Generating autoload file for GNU Emacs"
+
+	cat >"${f}" <<-EOF
+	;;; ${f##*/} --- autoloads for ${PN}
+
+	;;; Commentary:
+	;; Automatically generated by elisp-common.eclass
+	;; DO NOT EDIT THIS FILE
+
+	;;; Code:
+	${page}
+	;; Local ${null}Variables:
+	;; version-control: never
+	;; no-byte-compile: t
+	;; no-update-autoloads: t
+	;; End:
+
+	;;; ${f##*/} ends here
+	EOF
+
+	${EMACS} ${EMACSFLAGS} \
+		--eval "(setq make-backup-files nil)" \
+		--eval "(setq generated-autoload-file (expand-file-name \"${f}\"))" \
+		-f batch-update-autoloads "${@-.}"
+
+	eend $? "elisp-make-autoload-file: batch-update-autoloads failed" || die
+}
+
+# @FUNCTION: elisp-install
+# @USAGE: <subdirectory> <list of files>
+# @DESCRIPTION:
+# Install files in SITELISP directory.
+
+elisp-install() {
+	local subdir="$1"
+	shift
+	ebegin "Installing Elisp files for GNU Emacs support"
+	( # subshell to avoid pollution of calling environment
+		insinto "${SITELISP}/${subdir}"
+		doins "$@"
+	)
+	eend $? "elisp-install: doins failed" || die
+}
+
+# @FUNCTION: elisp-site-file-install
+# @USAGE: <site-init file> [subdirectory]
+# @DESCRIPTION:
+# Install Emacs site-init file in SITELISP directory.  Automatically
+# inserts a standard comment header with the name of the package (unless
+# it is already present).  Tokens @SITELISP@ and @SITEETC@ are replaced
+# by the path to the package's subdirectory in SITELISP and SITEETC,
+# respectively.
+
+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 "elisp-site-file-install: bad name of site-init file"
+	[[ ${sf%-gentoo*.el} != "${sf}" ]] && sf="${sf%-gentoo*.el}-gentoo.el"
+	sf="${T}/${sf}"
+	ebegin "Installing site initialisation file for GNU Emacs"
+	[[ $1 = "${sf}" ]] || cp "$1" "${sf}"
+	sed -i -e "1{:x;/^\$/{n;bx;};/^;.*${PN}/I!s:^:${header}\n\n:;1s:^:\n:;}" \
+		-e "s:@SITELISP@:${EPREFIX}${SITELISP}/${my_pn}:g" \
+		-e "s:@SITEETC@:${EPREFIX}${SITEETC}/${my_pn}:g;\$q" "${sf}"
+	( # subshell to avoid pollution of calling environment
+		insinto "${SITELISP}/site-gentoo.d"
+		doins "${sf}"
+	)
+	ret=$?
+	rm -f "${sf}"
+	eend ${ret} "elisp-site-file-install: doins failed" || die
+}
+
+# @FUNCTION: elisp-site-regen
+# @DESCRIPTION:
+# Regenerate the site-gentoo.el file, based on packages' site
+# initialisation files in the /usr/share/emacs/site-lisp/site-gentoo.d/
+# directory.
+
+elisp-site-regen() {
+	local sitelisp=${ROOT%/}${EPREFIX}${SITELISP}
+	local sf i ret=0 null="" page=$'\f'
+	local -a sflist
+
+	if [[ ${EBUILD_PHASE} = *rm && ! -e ${sitelisp}/site-gentoo.el ]]; then
+		ewarn "Refusing to create site-gentoo.el in ${EBUILD_PHASE} phase."
+		return 0
+	fi
+
+	[[ -d ${sitelisp} ]] \
+		|| die "elisp-site-regen: Directory ${sitelisp} does not exist"
+
+	[[ -d ${T} ]] \
+		|| die "elisp-site-regen: Temporary directory ${T} does not exist"
+
+	ebegin "Regenerating site-gentoo.el for GNU Emacs (${EBUILD_PHASE})"
+
+	for sf in "${sitelisp}"/site-gentoo.d/[0-9][0-9]*.el; do
+		[[ -r ${sf} ]] && sflist+=("${sf}")
+	done
+
+	cat <<-EOF >"${T}"/site-gentoo.el || ret=$?
+	;;; site-gentoo.el --- site initialisation for Gentoo-installed packages
+
+	;;; Commentary:
+	;; Automatically generated by 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 || ret=$?
+	cat <<-EOF >>"${T}"/site-gentoo.el || ret=$?
+
+	${page}
+	(provide 'site-gentoo)
+
+	;; Local ${null}Variables:
+	;; no-byte-compile: t
+	;; buffer-read-only: t
+	;; End:
+
+	;;; site-gentoo.el ends here
+	EOF
+
+	if [[ ${ret} -ne 0 ]]; then
+		eend ${ret} "elisp-site-regen: Writing site-gentoo.el failed."
+		die
+	elif 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
+		eend
+		einfo "... no changes."
+	else
+		mv "${T}"/site-gentoo.el "${sitelisp}"/site-gentoo.el
+		eend $? "elisp-site-regen: Replacing site-gentoo.el failed" || die
+		case ${#sflist[@]} in
+			0) [[ ${PN} = emacs-common-gentoo ]] \
+				|| 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/elisp.eclass b/eclass/elisp.eclass
new file mode 100644
index 00000000..078a7994
--- /dev/null
+++ b/eclass/elisp.eclass
@@ -0,0 +1,218 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# @ECLASS: elisp.eclass
+# @MAINTAINER:
+# Gentoo GNU Emacs project <gnu-emacs@gentoo.org>
+# @AUTHOR:
+# Matthew Kennedy <mkennedy@gentoo.org>
+# Jeremy Maitin-Shepard <jbms@attbi.com>
+# Christian Faulhammer <fauli@gentoo.org>
+# Ulrich Müller <ulm@gentoo.org>
+# @BLURB: Eclass for Emacs Lisp packages
+# @DESCRIPTION:
+#
+# This eclass is designed to install elisp files of Emacs related
+# packages into the site-lisp directory.  The majority of elisp packages
+# will only need to define the standard ebuild variables (like SRC_URI)
+# and optionally SITEFILE for successful installation.
+#
+# Emacs support for other than pure elisp packages is handled by
+# elisp-common.eclass where you won't have a dependency on Emacs itself.
+# All elisp-* functions are documented there.
+#
+# If the package's source is a single (in whatever way) compressed elisp
+# file with the file name ${P}.el, then this eclass will move ${P}.el to
+# ${PN}.el in src_unpack().
+
+# @ECLASS-VARIABLE: NEED_EMACS
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# If you need anything different from Emacs 23, use the NEED_EMACS
+# variable before inheriting elisp.eclass.  Set it to the major version
+# your package uses and the dependency will be adjusted.
+
+# @ECLASS-VARIABLE: ELISP_PATCHES
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# Space separated list of patches to apply after unpacking the sources.
+# Patch files are searched for in the current working dir, WORKDIR, and
+# FILESDIR.
+
+# @ECLASS-VARIABLE: ELISP_REMOVE
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# Space separated list of files to remove after unpacking the sources.
+
+# @ECLASS-VARIABLE: SITEFILE
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# Name of package's site-init file.  The filename must match the shell
+# pattern "[1-8][0-9]*-gentoo.el"; numbers below 10 and above 89 are
+# reserved for internal use.  "50${PN}-gentoo.el" is a reasonable choice
+# in most cases.
+
+# @ECLASS-VARIABLE: ELISP_TEXINFO
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# Space separated list of Texinfo sources.  Respective GNU Info files
+# will be generated in src_compile() and installed in src_install().
+
+# @ECLASS-VARIABLE: DOCS
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# DOCS="blah.txt ChangeLog" is automatically used to install the given
+# files by dodoc in src_install().
+
+inherit elisp-common
+
+case ${EAPI:-0} in
+	0|1)
+		inherit eutils
+		EXPORT_FUNCTIONS src_{unpack,compile,install} \
+			pkg_{setup,postinst,postrm} ;;
+	2|3|4|5)
+		inherit eutils
+		EXPORT_FUNCTIONS src_{unpack,prepare,configure,compile,install} \
+			pkg_{setup,postinst,postrm} ;;
+	6)
+		EXPORT_FUNCTIONS src_{unpack,prepare,configure,compile,install} \
+			pkg_{setup,postinst,postrm} ;;
+	*) die "${ECLASS}: EAPI ${EAPI} not supported" ;;
+esac
+
+DEPEND=">=virtual/emacs-${NEED_EMACS:-23}"
+RDEPEND="${DEPEND}"
+
+# @FUNCTION: elisp_pkg_setup
+# @DESCRIPTION:
+# Test if the eselected Emacs version is sufficient to fulfil the major
+# version requirement of the NEED_EMACS variable.
+
+elisp_pkg_setup() {
+	elisp-need-emacs "${NEED_EMACS:-23}"
+	case $? in
+		0) ;;
+		1) die "Emacs version too low" ;;
+		*) die "Could not determine Emacs version" ;;
+	esac
+}
+
+# @FUNCTION: elisp_src_unpack
+# @DESCRIPTION:
+# Unpack the sources; also handle the case of a single *.el file in
+# WORKDIR for packages distributed that way.  For EAPIs without
+# src_prepare, call elisp_src_prepare.
+
+elisp_src_unpack() {
+	[[ -n ${A} ]] && unpack ${A}
+	if [[ -f ${P}.el ]]; then
+		# the "simple elisp" case with a single *.el file in WORKDIR
+		mv ${P}.el ${PN}.el || die
+		[[ -d ${S} ]] || S=${WORKDIR}
+	fi
+
+	case ${EAPI:-0} in
+		0|1) [[ -d ${S} ]] && cd "${S}"
+			elisp_src_prepare ;;
+	esac
+}
+
+# @FUNCTION: elisp_src_prepare
+# @DESCRIPTION:
+# Apply any patches listed in ELISP_PATCHES.  Patch files are searched
+# for in the current working dir, WORKDIR, and FILESDIR.
+
+elisp_src_prepare() {
+	local patch file
+	for patch in ${ELISP_PATCHES}; do
+		if [[ -f ${patch} ]]; then
+			file="${patch}"
+		elif [[ -f ${WORKDIR}/${patch} ]]; then
+			file="${WORKDIR}/${patch}"
+		elif [[ -f ${FILESDIR}/${patch} ]]; then
+			file="${FILESDIR}/${patch}"
+		else
+			die "Cannot find ${patch}"
+		fi
+		case ${EAPI:-0} in
+			0|1|2|3|4|5) epatch "${file}" ;;
+			6) eapply "${file}" ;;
+		esac
+	done
+
+	# apply any user patches
+	case ${EAPI:-0} in
+		0|1|2|3|4|5) epatch_user ;;
+		6) eapply_user ;;
+	esac
+
+	if [[ -n ${ELISP_REMOVE} ]]; then
+		rm ${ELISP_REMOVE} || die
+	fi
+}
+
+# @FUNCTION: elisp_src_configure
+# @DESCRIPTION:
+# Do nothing, because Emacs packages seldomly bring a full build system.
+
+elisp_src_configure() { :; }
+
+# @FUNCTION: elisp_src_compile
+# @DESCRIPTION:
+# Call elisp-compile to byte-compile all Emacs Lisp (*.el) files.
+# If ELISP_TEXINFO lists any Texinfo sources, call makeinfo to generate
+# GNU Info files from them.
+
+elisp_src_compile() {
+	elisp-compile *.el
+	if [[ -n ${ELISP_TEXINFO} ]]; then
+		makeinfo ${ELISP_TEXINFO} || die
+	fi
+}
+
+# @FUNCTION: elisp_src_install
+# @DESCRIPTION:
+# Call elisp-install to install all Emacs Lisp (*.el and *.elc) files.
+# If the SITEFILE variable specifies a site-init file, install it with
+# elisp-site-file-install.  Also install any GNU Info files listed in
+# ELISP_TEXINFO and documentation listed in the DOCS variable.
+
+elisp_src_install() {
+	elisp-install ${PN} *.el *.elc
+	if [[ -n ${SITEFILE} ]]; then
+		elisp-site-file-install "${FILESDIR}/${SITEFILE}"
+	fi
+	if [[ -n ${ELISP_TEXINFO} ]]; then
+		set -- ${ELISP_TEXINFO}
+		set -- ${@##*/}
+		doinfo ${@/%.*/.info*} || die
+	fi
+	if [[ -n ${DOCS} ]]; then
+		dodoc ${DOCS} || die
+	fi
+	if declare -f readme.gentoo_create_doc >/dev/null; then
+		readme.gentoo_create_doc
+	fi
+}
+
+# @FUNCTION: elisp_pkg_postinst
+# @DESCRIPTION:
+# Call elisp-site-regen, in order to collect the site initialisation for
+# all installed Emacs Lisp packages in the site-gentoo.el file.
+
+elisp_pkg_postinst() {
+	elisp-site-regen
+	if declare -f readme.gentoo_print_elog >/dev/null; then
+		readme.gentoo_print_elog
+	fi
+}
+
+# @FUNCTION: elisp_pkg_postrm
+# @DESCRIPTION:
+# Call elisp-site-regen, in order to collect the site initialisation for
+# all installed Emacs Lisp packages in the site-gentoo.el file.
+
+elisp_pkg_postrm() {
+	elisp-site-regen
+}


^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [gentoo-commits] proj/lisp:master commit in: eclass/
@ 2017-10-28 14:27 José María Alonso
  0 siblings, 0 replies; 32+ messages in thread
From: José María Alonso @ 2017-10-28 14:27 UTC (permalink / raw
  To: gentoo-commits

commit:     22187f7ebc613fc36d2b57b390a7f8e2b88c8b3d
Author:     Chema Alonso Josa <nimiux <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 28 14:27:07 2017 +0000
Commit:     José María Alonso <nimiux <AT> gentoo <DOT> org>
CommitDate: Sat Oct 28 14:27:07 2017 +0000
URL:        https://gitweb.gentoo.org/proj/lisp.git/commit/?id=22187f7e

git-r3.eclass: Syng with gentoo repo

 eclass/git-r3.eclass | 31 ++++++++++++++++++++++++-------
 1 file changed, 24 insertions(+), 7 deletions(-)

diff --git a/eclass/git-r3.eclass b/eclass/git-r3.eclass
index bc7d4d92..c9d2731a 100644
--- a/eclass/git-r3.eclass
+++ b/eclass/git-r3.eclass
@@ -105,18 +105,22 @@ fi
 # @ECLASS-VARIABLE: EGIT_REPO_URI
 # @REQUIRED
 # @DESCRIPTION:
-# URIs to the repository, e.g. git://foo, https://foo. If multiple URIs
-# are provided, the eclass will consider them as fallback URIs to try
-# if the first URI does not work. For supported URI syntaxes, read up
-# the manpage for git-clone(1).
+# URIs to the repository, e.g. https://foo. If multiple URIs are
+# provided, the eclass will consider the remaining URIs as fallbacks
+# to try if the first URI does not work. For supported URI syntaxes,
+# read the manpage for git-clone(1).
 #
-# It can be overriden via env using ${PN}_LIVE_REPO variable.
+# URIs should be using https:// whenever possible. http:// and git://
+# URIs are completely unsecured and their use (even if only as
+# a fallback) renders the ebuild completely vulnerable to MITM attacks.
+#
+# It can be overridden via env using ${PN}_LIVE_REPO variable.
 #
 # Can be a whitespace-separated list or an array.
 #
 # Example:
 # @CODE
-# EGIT_REPO_URI="git://a/b.git https://c/d.git"
+# EGIT_REPO_URI="https://a/b.git https://c/d.git"
 # @CODE
 
 # @ECLASS-VARIABLE: EVCS_OFFLINE
@@ -566,6 +570,16 @@ git-r3_fetch() {
 
 	[[ ${repos[@]} ]] || die "No URI provided and EGIT_REPO_URI unset"
 
+	local r
+	for r in "${repos[@]}"; do
+		if [[ ${r} == git:* || ${r} == http:* ]]; then
+			ewarn "git-r3: ${r%%:*} protocol is completely unsecure and may render the ebuild"
+			ewarn "easily susceptible to MITM attacks (even if used only as fallback). Please"
+			ewarn "use https instead."
+			ewarn "[URI: ${r}]"
+		fi
+	done
+
 	local -x GIT_DIR
 	_git-r3_set_gitdir "${repos[0]}"
 
@@ -578,7 +592,7 @@ git-r3_fetch() {
 	fi
 
 	# try to fetch from the remote
-	local r success saved_umask
+	local success saved_umask
 	if [[ ${EVCS_UMASK} ]]; then
 		saved_umask=$(umask)
 		umask "${EVCS_UMASK}" || die "Bad options to umask: ${EVCS_UMASK}"
@@ -853,6 +867,9 @@ git-r3_checkout() {
 		echo "${orig_repo}/objects" > "${GIT_DIR}"/objects/info/alternates || die
 		# now copy the refs
 		cp -R "${orig_repo}"/refs/* "${GIT_DIR}"/refs/ || die
+		if [[ -f ${orig_repo}/packed-refs ]]; then
+			cp "${orig_repo}"/packed-refs "${GIT_DIR}"/packed-refs || die
+		fi
 
 		# (no need to copy HEAD, we will set it via checkout)
 


^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [gentoo-commits] proj/lisp:master commit in: eclass/
@ 2017-10-28 14:29 José María Alonso
  0 siblings, 0 replies; 32+ messages in thread
From: José María Alonso @ 2017-10-28 14:29 UTC (permalink / raw
  To: gentoo-commits

commit:     9f2b33191158b517d3aea3de953b4610d8add860
Author:     Chema Alonso Josa <nimiux <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 28 14:29:00 2017 +0000
Commit:     José María Alonso <nimiux <AT> gentoo <DOT> org>
CommitDate: Sat Oct 28 14:29:00 2017 +0000
URL:        https://gitweb.gentoo.org/proj/lisp.git/commit/?id=9f2b3319

glo-utils.eclass: Drop obsolete eclass

 eclass/glo-utils.eclass | 45 ---------------------------------------------
 1 file changed, 45 deletions(-)

diff --git a/eclass/glo-utils.eclass b/eclass/glo-utils.eclass
deleted file mode 100644
index dd7dab8f..00000000
--- a/eclass/glo-utils.eclass
+++ /dev/null
@@ -1,45 +0,0 @@
-# Copyright 1999-2010 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: $
-#
-# This eclass contains various utilities used in the Gentoo Lisp overlay
-#
-# Public functions:
-#
-# glo_usev flagname [<if_yes> [<if_no>]]
-#   If $(use FLAGNAME) return true, echo IF_YES to standard output,
-#   otherwise echo IF_NO. IF_YES defaults to FLAGNAME if not specified
-#
-# glo_best_flag flag+
-#   Echo to stdout the first active USE flag among those supplied as parameters.
-#   If none are active, echo the first one
-#
-
-glo_usev() {
-	if [[ $# < 1 || $# > 3 ]]; then
-		echo "Usage: ${0} flag [if_yes [if_no]]"
-		die "${0}: wrong number of arguments: $#"
-	fi
-	local if_yes="${2:-${1}}" if_no="${3}"
-	if useq ${1} ; then
-		printf "%s" "${if_yes}"
-		return 0
-	else
-		printf "%s" "${if_no}"
-		return 1
-	fi
-}
-
-glo_best_flag() {
-	if [[ $# < 1 ]]; then
-		echo "Usage: ${0} flag+"
-		die "${0}: wrong number of arguments: $#"
-	fi
-	for flag in $@ ; do
-		if use ${flag} ; then
-			echo ${flag}
-			return
-		fi
-	done
-	echo ${1}
-}


^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [gentoo-commits] proj/lisp:master commit in: eclass/
@ 2017-12-10 19:56 José María Alonso
  0 siblings, 0 replies; 32+ messages in thread
From: José María Alonso @ 2017-12-10 19:56 UTC (permalink / raw
  To: gentoo-commits

commit:     37620f874574313cb781ce2815d4de68f2c8917e
Author:     Chema Alonso Josa <nimiux <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 10 19:56:47 2017 +0000
Commit:     José María Alonso <nimiux <AT> gentoo <DOT> org>
CommitDate: Sun Dec 10 19:56:47 2017 +0000
URL:        https://gitweb.gentoo.org/proj/lisp.git/commit/?id=37620f87

git-r3.eclass: Drops redundant eclass

 eclass/git-r3.eclass | 1054 --------------------------------------------------
 1 file changed, 1054 deletions(-)

diff --git a/eclass/git-r3.eclass b/eclass/git-r3.eclass
deleted file mode 100644
index c9d2731a..00000000
--- a/eclass/git-r3.eclass
+++ /dev/null
@@ -1,1054 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-# @ECLASS: git-r3.eclass
-# @MAINTAINER:
-# Michał Górny <mgorny@gentoo.org>
-# @BLURB: Eclass for fetching and unpacking git repositories.
-# @DESCRIPTION:
-# Third generation eclass for easing maintenance of live ebuilds using
-# git as remote repository.
-
-case "${EAPI:-0}" in
-	0|1|2|3|4|5|6)
-		;;
-	*)
-		die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}"
-		;;
-esac
-
-EXPORT_FUNCTIONS src_unpack
-
-if [[ ! ${_GIT_R3} ]]; then
-
-if [[ ! ${_INHERITED_BY_GIT_2} ]]; then
-	DEPEND=">=dev-vcs/git-1.8.2.1"
-fi
-
-# @ECLASS-VARIABLE: EGIT_CLONE_TYPE
-# @DESCRIPTION:
-# Type of clone that should be used against the remote repository.
-# This can be either of: 'mirror', 'single', 'shallow'.
-#
-# This is intended to be set by user in make.conf. Ebuilds are supposed
-# to set EGIT_MIN_CLONE_TYPE if necessary instead.
-#
-# The 'mirror' type clones all remote branches and tags with complete
-# history and all notes. EGIT_COMMIT can specify any commit hash.
-# Upstream-removed branches and tags are purged from the local clone
-# while fetching. This mode is suitable for cloning the local copy
-# for development or hosting a local git mirror. However, clones
-# of repositories with large diverged branches may quickly grow large.
-#
-# The 'single+tags' type clones the requested branch and all tags
-# in the repository. All notes are fetched as well. EGIT_COMMIT
-# can safely specify hashes throughout the current branch and all tags.
-# No purging of old references is done (if you often switch branches,
-# you may need to remove stale branches yourself). This mode is intended
-# mostly for use with broken git servers such as Google Code that fail
-# to fetch tags along with the branch in 'single' mode.
-#
-# The 'single' type clones only the requested branch or tag. Tags
-# referencing commits throughout the branch history are fetched as well,
-# and all notes. EGIT_COMMIT can safely specify only hashes
-# in the current branch. No purging of old references is done (if you
-# often switch branches, you may need to remove stale branches
-# yourself). This mode is suitable for general use.
-#
-# The 'shallow' type clones only the newest commit on requested branch
-# or tag. EGIT_COMMIT can only specify tags, and since the history is
-# unavailable calls like 'git describe' will not reference prior tags.
-# No purging of old references is done. This mode is intended mostly for
-# embedded systems with limited disk space.
-: ${EGIT_CLONE_TYPE:=single}
-
-# @ECLASS-VARIABLE: EGIT_MIN_CLONE_TYPE
-# @DESCRIPTION:
-# 'Minimum' clone type supported by the ebuild. Takes same values
-# as EGIT_CLONE_TYPE. When user sets a type that's 'lower' (that is,
-# later on the list) than EGIT_MIN_CLONE_TYPE, the eclass uses
-# EGIT_MIN_CLONE_TYPE instead.
-#
-# This variable is intended to be used by ebuilds only. Users are
-# supposed to set EGIT_CLONE_TYPE instead.
-#
-# A common case is to use 'single' whenever the build system requires
-# access to full branch history, or 'single+tags' when Google Code
-# or a similar remote is used that does not support shallow clones
-# and fetching tags along with commits. Please use sparingly, and to fix
-# fatal errors rather than 'non-pretty versions'.
-: ${EGIT_MIN_CLONE_TYPE:=shallow}
-
-# @ECLASS-VARIABLE: EGIT3_STORE_DIR
-# @DESCRIPTION:
-# Storage directory for git sources.
-#
-# This is intended to be set by user in make.conf. Ebuilds must not set
-# it.
-#
-# EGIT3_STORE_DIR=${DISTDIR}/git3-src
-
-# @ECLASS-VARIABLE: EGIT_MIRROR_URI
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# 'Top' URI to a local git mirror. If specified, the eclass will try
-# to fetch from the local mirror instead of using the remote repository.
-#
-# The mirror needs to follow EGIT3_STORE_DIR structure. The directory
-# created by eclass can be used for that purpose.
-#
-# Example:
-# @CODE
-# EGIT_MIRROR_URI="git://mirror.lan/"
-# @CODE
-
-# @ECLASS-VARIABLE: EGIT_REPO_URI
-# @REQUIRED
-# @DESCRIPTION:
-# URIs to the repository, e.g. https://foo. If multiple URIs are
-# provided, the eclass will consider the remaining URIs as fallbacks
-# to try if the first URI does not work. For supported URI syntaxes,
-# read the manpage for git-clone(1).
-#
-# URIs should be using https:// whenever possible. http:// and git://
-# URIs are completely unsecured and their use (even if only as
-# a fallback) renders the ebuild completely vulnerable to MITM attacks.
-#
-# It can be overridden via env using ${PN}_LIVE_REPO variable.
-#
-# Can be a whitespace-separated list or an array.
-#
-# Example:
-# @CODE
-# EGIT_REPO_URI="https://a/b.git https://c/d.git"
-# @CODE
-
-# @ECLASS-VARIABLE: EVCS_OFFLINE
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# If non-empty, this variable prevents any online operations.
-
-# @ECLASS-VARIABLE: EVCS_UMASK
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# Set this variable to a custom umask. This is intended to be set by
-# users. By setting this to something like 002, it can make life easier
-# for people who do development as non-root (but are in the portage
-# group), and then switch over to building with FEATURES=userpriv.
-# Or vice-versa. Shouldn't be a security issue here as anyone who has
-# portage group write access already can screw the system over in more
-# creative ways.
-
-# @ECLASS-VARIABLE: EGIT_BRANCH
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# The branch name to check out. If unset, the upstream default (HEAD)
-# will be used.
-#
-# It can be overriden via env using ${PN}_LIVE_BRANCH variable.
-
-# @ECLASS-VARIABLE: EGIT_COMMIT
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# The tag name or commit identifier to check out. If unset, newest
-# commit from the branch will be used. Note that if set to a commit
-# not on HEAD branch, EGIT_BRANCH needs to be set to a branch on which
-# the commit is available.
-#
-# It can be overriden via env using ${PN}_LIVE_COMMIT variable.
-
-# @ECLASS-VARIABLE: EGIT_COMMIT_DATE
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# Attempt to check out the repository state for the specified timestamp.
-# The date should be in format understood by 'git rev-list'. The commits
-# on EGIT_BRANCH will be considered.
-#
-# The eclass will select the last commit with commit date preceding
-# the specified date. When merge commits are found, only first parents
-# will be considered in order to avoid switching into external branches
-# (assuming that merges are done correctly). In other words, each merge
-# will be considered alike a single commit with date corresponding
-# to the merge commit date.
-#
-# It can be overriden via env using ${PN}_LIVE_COMMIT_DATE variable.
-
-# @ECLASS-VARIABLE: EGIT_CHECKOUT_DIR
-# @DESCRIPTION:
-# The directory to check the git sources out to.
-#
-# EGIT_CHECKOUT_DIR=${WORKDIR}/${P}
-
-# @ECLASS-VARIABLE: EGIT_SUBMODULES
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# An array of inclusive and exclusive wildcards on submodule names,
-# stating which submodules are fetched and checked out. Exclusions
-# start with '-', and exclude previously matched submodules.
-#
-# If unset, all submodules are enabled. Empty list disables all
-# submodules. In order to use an exclude-only list, start the array
-# with '*'.
-#
-# Remember that wildcards need to be quoted in order to prevent filename
-# expansion.
-#
-# Examples:
-# @CODE
-# # Disable all submodules
-# EGIT_SUBMODULES=()
-#
-# # Include only foo and bar
-# EGIT_SUBMODULES=( foo bar )
-#
-# # Use all submodules except for test-* but include test-lib
-# EGIT_SUBMODULES=( '*' '-test-*' test-lib )
-# @CODE
-
-# @FUNCTION: _git-r3_env_setup
-# @INTERNAL
-# @DESCRIPTION:
-# Set the eclass variables as necessary for operation. This can involve
-# setting EGIT_* to defaults or ${PN}_LIVE_* variables.
-_git-r3_env_setup() {
-	debug-print-function ${FUNCNAME} "$@"
-
-	# check the clone type
-	case "${EGIT_CLONE_TYPE}" in
-		mirror|single+tags|single|shallow)
-			;;
-		*)
-			die "Invalid EGIT_CLONE_TYPE=${EGIT_CLONE_TYPE}"
-	esac
-	case "${EGIT_MIN_CLONE_TYPE}" in
-		shallow)
-			;;
-		single)
-			if [[ ${EGIT_CLONE_TYPE} == shallow ]]; then
-				einfo "git-r3: ebuild needs to be cloned in '\e[1msingle\e[22m' mode, adjusting"
-				EGIT_CLONE_TYPE=single
-			fi
-			;;
-		single+tags)
-			if [[ ${EGIT_CLONE_TYPE} == shallow || ${EGIT_CLONE_TYPE} == single ]]; then
-				einfo "git-r3: ebuild needs to be cloned in '\e[1msingle+tags\e[22m' mode, adjusting"
-				EGIT_CLONE_TYPE=single+tags
-			fi
-			;;
-		mirror)
-			if [[ ${EGIT_CLONE_TYPE} != mirror ]]; then
-				einfo "git-r3: ebuild needs to be cloned in '\e[1mmirror\e[22m' mode, adjusting"
-				EGIT_CLONE_TYPE=mirror
-			fi
-			;;
-		*)
-			die "Invalid EGIT_MIN_CLONE_TYPE=${EGIT_MIN_CLONE_TYPE}"
-	esac
-
-	if [[ ${EGIT_SUBMODULES[@]+1} && $(declare -p EGIT_SUBMODULES) != "declare -a"* ]]
-	then
-		die 'EGIT_SUBMODULES must be an array.'
-	fi
-
-	local esc_pn livevar
-	esc_pn=${PN//[-+]/_}
-	[[ ${esc_pn} == [0-9]* ]] && esc_pn=_${esc_pn}
-
-	livevar=${esc_pn}_LIVE_REPO
-	EGIT_REPO_URI=${!livevar-${EGIT_REPO_URI}}
-	[[ ${!livevar} ]] \
-		&& ewarn "Using ${livevar}, no support will be provided"
-
-	livevar=${esc_pn}_LIVE_BRANCH
-	EGIT_BRANCH=${!livevar-${EGIT_BRANCH}}
-	[[ ${!livevar} ]] \
-		&& ewarn "Using ${livevar}, no support will be provided"
-
-	livevar=${esc_pn}_LIVE_COMMIT
-	EGIT_COMMIT=${!livevar-${EGIT_COMMIT}}
-	[[ ${!livevar} ]] \
-		&& ewarn "Using ${livevar}, no support will be provided"
-
-	livevar=${esc_pn}_LIVE_COMMIT_DATE
-	EGIT_COMMIT_DATE=${!livevar-${EGIT_COMMIT_DATE}}
-	[[ ${!livevar} ]] \
-		&& ewarn "Using ${livevar}, no support will be provided"
-
-	if [[ ${EGIT_COMMIT} && ${EGIT_COMMIT_DATE} ]]; then
-		die "EGIT_COMMIT and EGIT_COMMIT_DATE can not be specified simultaneously"
-	fi
-
-	# Migration helpers. Remove them when git-2 is removed.
-
-	if [[ ${EGIT_SOURCEDIR} ]]; then
-		eerror "EGIT_SOURCEDIR has been replaced by EGIT_CHECKOUT_DIR. While updating"
-		eerror "your ebuild, please check whether the variable is necessary at all"
-		eerror "since the default has been changed from \${S} to \${WORKDIR}/\${P}."
-		eerror "Therefore, proper setting of S may be sufficient."
-		die "EGIT_SOURCEDIR has been replaced by EGIT_CHECKOUT_DIR."
-	fi
-
-	if [[ ${EGIT_MASTER} ]]; then
-		eerror "EGIT_MASTER has been removed. Instead, the upstream default (HEAD)"
-		eerror "is used by the eclass. Please remove the assignment or use EGIT_BRANCH"
-		eerror "as necessary."
-		die "EGIT_MASTER has been removed."
-	fi
-
-	if [[ ${EGIT_HAS_SUBMODULES} ]]; then
-		eerror "EGIT_HAS_SUBMODULES has been removed. The eclass no longer needs"
-		eerror "to switch the clone type in order to support submodules and therefore"
-		eerror "submodules are detected and fetched automatically. If you need to"
-		eerror "disable or filter submodules, see EGIT_SUBMODULES."
-		die "EGIT_HAS_SUBMODULES is no longer necessary."
-	fi
-
-	if [[ ${EGIT_PROJECT} ]]; then
-		eerror "EGIT_PROJECT has been removed. Instead, the eclass determines"
-		eerror "the local clone path using path in canonical EGIT_REPO_URI."
-		eerror "If the current algorithm causes issues for you, please report a bug."
-		die "EGIT_PROJECT is no longer necessary."
-	fi
-
-	if [[ ${EGIT_BOOTSTRAP} ]]; then
-		eerror "EGIT_BOOTSTRAP has been removed. Please create proper src_prepare()"
-		eerror "instead."
-		die "EGIT_BOOTSTRAP has been removed."
-	fi
-
-	if [[ ${EGIT_NOUNPACK} ]]; then
-		eerror "EGIT_NOUNPACK has been removed. The eclass no longer calls default"
-		eerror "unpack function. If necessary, please declare proper src_unpack()."
-		die "EGIT_NOUNPACK has been removed."
-	fi
-}
-
-# @FUNCTION: _git-r3_set_gitdir
-# @USAGE: <repo-uri>
-# @INTERNAL
-# @DESCRIPTION:
-# Obtain the local repository path and set it as GIT_DIR. Creates
-# a new repository if necessary.
-#
-# <repo-uri> may be used to compose the path. It should therefore be
-# a canonical URI to the repository.
-_git-r3_set_gitdir() {
-	debug-print-function ${FUNCNAME} "$@"
-
-	local repo_name=${1#*://*/}
-
-	# strip the trailing slash
-	repo_name=${repo_name%/}
-
-	# strip common prefixes to make paths more likely to match
-	# e.g. git://X/Y.git vs https://X/git/Y.git
-	# (but just one of the prefixes)
-	case "${repo_name}" in
-		# gnome.org... who else?
-		browse/*) repo_name=${repo_name#browse/};;
-		# cgit can proxy requests to git
-		cgit/*) repo_name=${repo_name#cgit/};;
-		# pretty common
-		git/*) repo_name=${repo_name#git/};;
-		# gentoo.org
-		gitroot/*) repo_name=${repo_name#gitroot/};;
-		# sourceforge
-		p/*) repo_name=${repo_name#p/};;
-		# kernel.org
-		pub/scm/*) repo_name=${repo_name#pub/scm/};;
-	esac
-	# ensure a .git suffix, same reason
-	repo_name=${repo_name%.git}.git
-	# now replace all the slashes
-	repo_name=${repo_name//\//_}
-
-	local distdir=${PORTAGE_ACTUAL_DISTDIR:-${DISTDIR}}
-	: ${EGIT3_STORE_DIR:=${distdir}/git3-src}
-
-	GIT_DIR=${EGIT3_STORE_DIR}/${repo_name}
-
-	if [[ ! -d ${EGIT3_STORE_DIR} && ! ${EVCS_OFFLINE} ]]; then
-		(
-			addwrite /
-			mkdir -p "${EGIT3_STORE_DIR}"
-		) || die "Unable to create ${EGIT3_STORE_DIR}"
-	fi
-
-	addwrite "${EGIT3_STORE_DIR}"
-	if [[ ! -d ${GIT_DIR} ]]; then
-		if [[ ${EVCS_OFFLINE} ]]; then
-			eerror "A clone of the following repository is required to proceed:"
-			eerror "  ${1}"
-			eerror "However, networking activity has been disabled using EVCS_OFFLINE and there"
-			eerror "is no local clone available."
-			die "No local clone of ${1}. Unable to proceed with EVCS_OFFLINE."
-		fi
-
-		local saved_umask
-		if [[ ${EVCS_UMASK} ]]; then
-			saved_umask=$(umask)
-			umask "${EVCS_UMASK}" || die "Bad options to umask: ${EVCS_UMASK}"
-		fi
-		mkdir "${GIT_DIR}" || die
-		git init --bare || die
-		if [[ ${saved_umask} ]]; then
-			umask "${saved_umask}" || die
-		fi
-	fi
-}
-
-# @FUNCTION: _git-r3_set_submodules
-# @USAGE: <file-contents>
-# @INTERNAL
-# @DESCRIPTION:
-# Parse .gitmodules contents passed as <file-contents>
-# as in "$(cat .gitmodules)"). Composes a 'submodules' array that
-# contains in order (name, URL, path) for each submodule.
-_git-r3_set_submodules() {
-	debug-print-function ${FUNCNAME} "$@"
-
-	local data=${1}
-
-	# ( name url path ... )
-	submodules=()
-
-	local l
-	while read l; do
-		# submodule.<path>.path=<path>
-		# submodule.<path>.url=<url>
-		[[ ${l} == submodule.*.url=* ]] || continue
-
-		l=${l#submodule.}
-		local subname=${l%%.url=*}
-
-		# filter out on EGIT_SUBMODULES
-		if declare -p EGIT_SUBMODULES &>/dev/null; then
-			local p l_res res=
-			for p in "${EGIT_SUBMODULES[@]}"; do
-				if [[ ${p} == -* ]]; then
-					p=${p#-}
-					l_res=
-				else
-					l_res=1
-				fi
-
-				[[ ${subname} == ${p} ]] && res=${l_res}
-			done
-
-			if [[ ! ${res} ]]; then
-				einfo "Skipping submodule \e[1m${subname}\e[22m"
-				continue
-			fi
-		fi
-
-		# skip modules that have 'update = none', bug #487262.
-		local upd=$(echo "${data}" | git config -f /dev/fd/0 \
-			submodule."${subname}".update)
-		[[ ${upd} == none ]] && continue
-
-		# https://github.com/git/git/blob/master/refs.c#L31
-		# we are more restrictive than git itself but that should not
-		# cause any issues, #572312, #606950
-		# TODO: check escaped names for collisions
-		local enc_subname=${subname//[^a-zA-Z0-9-]/_}
-
-		submodules+=(
-			"${enc_subname}"
-			"$(echo "${data}" | git config -f /dev/fd/0 \
-				submodule."${subname}".url || die)"
-			"$(echo "${data}" | git config -f /dev/fd/0 \
-				submodule."${subname}".path || die)"
-		)
-	done < <(echo "${data}" | git config -f /dev/fd/0 -l || die)
-}
-
-# @FUNCTION: _git-r3_set_subrepos
-# @USAGE: <submodule-uri> <parent-repo-uri>...
-# @INTERNAL
-# @DESCRIPTION:
-# Create 'subrepos' array containing absolute (canonical) submodule URIs
-# for the given <submodule-uri>. If the URI is relative, URIs will be
-# constructed using all <parent-repo-uri>s. Otherwise, this single URI
-# will be placed in the array.
-_git-r3_set_subrepos() {
-	debug-print-function ${FUNCNAME} "$@"
-
-	local suburl=${1}
-	subrepos=( "${@:2}" )
-
-	if [[ ${suburl} == ./* || ${suburl} == ../* ]]; then
-		# drop all possible trailing slashes for consistency
-		subrepos=( "${subrepos[@]%%/}" )
-
-		while true; do
-			if [[ ${suburl} == ./* ]]; then
-				suburl=${suburl:2}
-			elif [[ ${suburl} == ../* ]]; then
-				suburl=${suburl:3}
-
-				# XXX: correctness checking
-
-				# drop the last path component
-				subrepos=( "${subrepos[@]%/*}" )
-				# and then the trailing slashes, again
-				subrepos=( "${subrepos[@]%%/}" )
-			else
-				break
-			fi
-		done
-
-		# append the preprocessed path to the preprocessed URIs
-		subrepos=( "${subrepos[@]/%//${suburl}}")
-	else
-		subrepos=( "${suburl}" )
-	fi
-}
-
-
-# @FUNCTION: _git-r3_is_local_repo
-# @USAGE: <repo-uri>
-# @INTERNAL
-# @DESCRIPTION:
-# Determine whether the given URI specifies a local (on-disk)
-# repository.
-_git-r3_is_local_repo() {
-	debug-print-function ${FUNCNAME} "$@"
-
-	local uri=${1}
-
-	[[ ${uri} == file://* || ${uri} == /* ]]
-}
-
-# @FUNCTION: git-r3_fetch
-# @USAGE: [<repo-uri> [<remote-ref> [<local-id> [<commit-date>]]]]
-# @DESCRIPTION:
-# Fetch new commits to the local clone of repository.
-#
-# <repo-uri> specifies the repository URIs to fetch from, as a space-
-# -separated list. The first URI will be used as repository group
-# identifier and therefore must be used consistently. When not
-# specified, defaults to ${EGIT_REPO_URI}.
-#
-# <remote-ref> specifies the remote ref or commit id to fetch.
-# It is preferred to use 'refs/heads/<branch-name>' for branches
-# and 'refs/tags/<tag-name>' for tags. Other options are 'HEAD'
-# for upstream default branch and hexadecimal commit SHA1. Defaults
-# to the first of EGIT_COMMIT, EGIT_BRANCH or literal 'HEAD' that
-# is set to a non-null value.
-#
-# <local-id> specifies the local branch identifier that will be used to
-# locally store the fetch result. It should be unique to multiple
-# fetches within the repository that can be performed at the same time
-# (including parallel merges). It defaults to ${CATEGORY}/${PN}/${SLOT%/*}.
-# This default should be fine unless you are fetching multiple trees
-# from the same repository in the same ebuild.
-#
-# <commit-id> requests attempting to use repository state as of specific
-# date. For more details, see EGIT_COMMIT_DATE.
-#
-# The fetch operation will affect the EGIT_STORE only. It will not touch
-# the working copy, nor export any environment variables.
-# If the repository contains submodules, they will be fetched
-# recursively.
-git-r3_fetch() {
-	debug-print-function ${FUNCNAME} "$@"
-
-	local repos
-	if [[ ${1} ]]; then
-		repos=( ${1} )
-	elif [[ $(declare -p EGIT_REPO_URI) == "declare -a"* ]]; then
-		repos=( "${EGIT_REPO_URI[@]}" )
-	else
-		repos=( ${EGIT_REPO_URI} )
-	fi
-
-	local branch=${EGIT_BRANCH:+refs/heads/${EGIT_BRANCH}}
-	local remote_ref=${2:-${EGIT_COMMIT:-${branch:-HEAD}}}
-	local local_id=${3:-${CATEGORY}/${PN}/${SLOT%/*}}
-	local local_ref=refs/git-r3/${local_id}/__main__
-	local commit_date=${4:-${EGIT_COMMIT_DATE}}
-
-	[[ ${repos[@]} ]] || die "No URI provided and EGIT_REPO_URI unset"
-
-	local r
-	for r in "${repos[@]}"; do
-		if [[ ${r} == git:* || ${r} == http:* ]]; then
-			ewarn "git-r3: ${r%%:*} protocol is completely unsecure and may render the ebuild"
-			ewarn "easily susceptible to MITM attacks (even if used only as fallback). Please"
-			ewarn "use https instead."
-			ewarn "[URI: ${r}]"
-		fi
-	done
-
-	local -x GIT_DIR
-	_git-r3_set_gitdir "${repos[0]}"
-
-	# prepend the local mirror if applicable
-	if [[ ${EGIT_MIRROR_URI} ]]; then
-		repos=(
-			"${EGIT_MIRROR_URI%/}/${GIT_DIR##*/}"
-			"${repos[@]}"
-		)
-	fi
-
-	# try to fetch from the remote
-	local success saved_umask
-	if [[ ${EVCS_UMASK} ]]; then
-		saved_umask=$(umask)
-		umask "${EVCS_UMASK}" || die "Bad options to umask: ${EVCS_UMASK}"
-	fi
-	for r in "${repos[@]}"; do
-		if [[ ! ${EVCS_OFFLINE} ]]; then
-			einfo "Fetching \e[1m${r}\e[22m ..."
-
-			local fetch_command=( git fetch "${r}" )
-			local clone_type=${EGIT_CLONE_TYPE}
-
-			if [[ ${r} == http://* || ${r} == https://* ]] &&
-					[[ ! ${EGIT_CURL_WARNED} ]] &&
-					! ROOT=/ has_version 'dev-vcs/git[curl]'
-			then
-				ewarn "git-r3: fetching from HTTP(S) requested. In order to support HTTP(S),"
-				ewarn "dev-vcs/git needs to be built with USE=curl. Example solution:"
-				ewarn
-				ewarn "	echo dev-vcs/git curl >> /etc/portage/package.use"
-				ewarn "	emerge -1v dev-vcs/git"
-				ewarn
-				ewarn "HTTP(S) URIs will be skipped."
-				EGIT_CURL_WARNED=1
-			fi
-
-			if [[ ${clone_type} == mirror ]]; then
-				fetch_command+=(
-					--prune
-					# mirror the remote branches as local branches
-					"+refs/heads/*:refs/heads/*"
-					# pull tags explicitly in order to prune them properly
-					"+refs/tags/*:refs/tags/*"
-					# notes in case something needs them
-					"+refs/notes/*:refs/notes/*"
-					# and HEAD in case we need the default branch
-					# (we keep it in refs/git-r3 since otherwise --prune interferes)
-					"+HEAD:refs/git-r3/HEAD"
-				)
-			else # single or shallow
-				local fetch_l fetch_r
-
-				if [[ ${remote_ref} == HEAD ]]; then
-					# HEAD
-					fetch_l=HEAD
-				elif [[ ${remote_ref} == refs/* ]]; then
-					# regular branch, tag or some other explicit ref
-					fetch_l=${remote_ref}
-				else
-					# tag or commit id...
-					# let ls-remote figure it out
-					local tagref=$(git ls-remote "${r}" "refs/tags/${remote_ref}")
-
-					# if it was a tag, ls-remote obtained a hash
-					if [[ ${tagref} ]]; then
-						# tag
-						fetch_l=refs/tags/${remote_ref}
-					else
-						# commit id
-						# so we need to fetch the whole branch
-						if [[ ${branch} ]]; then
-							fetch_l=${branch}
-						else
-							fetch_l=HEAD
-						fi
-
-						# fetching by commit in shallow mode? can't do.
-						if [[ ${clone_type} == shallow ]]; then
-							clone_type=single
-						fi
-					fi
-				fi
-
-				# checkout by date does not make sense in shallow mode
-				if [[ ${commit_date} && ${clone_type} == shallow ]]; then
-					clone_type=single
-				fi
-
-				if [[ ${fetch_l} == HEAD ]]; then
-					fetch_r=refs/git-r3/HEAD
-				else
-					fetch_r=${fetch_l}
-				fi
-
-				fetch_command+=(
-					"+${fetch_l}:${fetch_r}"
-				)
-
-				if [[ ${clone_type} == single+tags ]]; then
-					fetch_command+=(
-						# pull tags explicitly as requested
-						"+refs/tags/*:refs/tags/*"
-					)
-				fi
-			fi
-
-			if [[ ${clone_type} == shallow ]]; then
-				if _git-r3_is_local_repo; then
-					# '--depth 1' causes sandbox violations with local repos
-					# bug #491260
-					clone_type=single
-				elif [[ ! $(git rev-parse --quiet --verify "${fetch_r}") ]]
-				then
-					# use '--depth 1' when fetching a new branch
-					fetch_command+=( --depth 1 )
-				fi
-			else # non-shallow mode
-				if [[ -f ${GIT_DIR}/shallow ]]; then
-					fetch_command+=( --unshallow )
-				fi
-			fi
-
-			set -- "${fetch_command[@]}"
-			echo "${@}" >&2
-			"${@}" || continue
-
-			if [[ ${clone_type} == mirror || ${fetch_l} == HEAD ]]; then
-				# update our HEAD to match our remote HEAD ref
-				git symbolic-ref HEAD refs/git-r3/HEAD \
-						|| die "Unable to update HEAD"
-			fi
-		fi
-
-		# now let's see what the user wants from us
-		if [[ ${commit_date} ]]; then
-			local dated_commit_id=$(
-				git rev-list --first-parent --before="${commit_date}" \
-					-n 1 "${remote_ref}"
-			)
-			if [[ ${?} -ne 0 ]]; then
-				die "Listing ${remote_ref} failed (wrong ref?)."
-			elif [[ ! ${dated_commit_id} ]]; then
-				die "Unable to find commit for date ${commit_date}."
-			else
-				set -- git update-ref --no-deref "${local_ref}" "${dated_commit_id}"
-			fi
-		else
-			local full_remote_ref=$(
-				git rev-parse --verify --symbolic-full-name "${remote_ref}"
-			)
-
-			if [[ ${full_remote_ref} ]]; then
-				# when we are given a ref, create a symbolic ref
-				# so that we preserve the actual argument
-				set -- git symbolic-ref "${local_ref}" "${full_remote_ref}"
-			else
-				# otherwise, we were likely given a commit id
-				set -- git update-ref --no-deref "${local_ref}" "${remote_ref}"
-			fi
-		fi
-
-		echo "${@}" >&2
-		if ! "${@}"; then
-			if [[ ${EVCS_OFFLINE} ]]; then
-				eerror "A clone of the following repository is required to proceed:"
-				eerror "  ${r}"
-				eerror "However, networking activity has been disabled using EVCS_OFFLINE and the local"
-				eerror "clone does not have requested ref:"
-				eerror "  ${remote_ref}"
-				die "Local clone of ${r} does not have requested ref: ${remote_ref}. Unable to proceed with EVCS_OFFLINE."
-			else
-				die "Referencing ${remote_ref} failed (wrong ref?)."
-			fi
-		fi
-
-		success=1
-		break
-	done
-	if [[ ${saved_umask} ]]; then
-		umask "${saved_umask}" || die
-	fi
-	[[ ${success} ]] || die "Unable to fetch from any of EGIT_REPO_URI"
-
-	# submodules can reference commits in any branch
-	# always use the 'mirror' mode to accomodate that, bug #503332
-	local EGIT_CLONE_TYPE=mirror
-
-	# recursively fetch submodules
-	if git cat-file -e "${local_ref}":.gitmodules &>/dev/null; then
-		local submodules
-		_git-r3_set_submodules \
-			"$(git cat-file -p "${local_ref}":.gitmodules || die)"
-
-		while [[ ${submodules[@]} ]]; do
-			local subname=${submodules[0]}
-			local url=${submodules[1]}
-			local path=${submodules[2]}
-
-			# use only submodules for which path does exist
-			# (this is in par with 'git submodule'), bug #551100
-			# note: git cat-file does not work for submodules
-			if [[ $(git ls-tree -d "${local_ref}" "${path}") ]]
-			then
-				local commit=$(git rev-parse "${local_ref}:${path}" || die)
-
-				if [[ ! ${commit} ]]; then
-					die "Unable to get commit id for submodule ${subname}"
-				fi
-
-				local subrepos
-				_git-r3_set_subrepos "${url}" "${repos[@]}"
-
-				git-r3_fetch "${subrepos[*]}" "${commit}" "${local_id}/${subname}"
-			fi
-
-			submodules=( "${submodules[@]:3}" ) # shift
-		done
-	fi
-}
-
-# @FUNCTION: git-r3_checkout
-# @USAGE: [<repo-uri> [<checkout-path> [<local-id>]]]
-# @DESCRIPTION:
-# Check the previously fetched tree to the working copy.
-#
-# <repo-uri> specifies the repository URIs, as a space-separated list.
-# The first URI will be used as repository group identifier
-# and therefore must be used consistently with git-r3_fetch.
-# The remaining URIs are not used and therefore may be omitted.
-# When not specified, defaults to ${EGIT_REPO_URI}.
-#
-# <checkout-path> specifies the path to place the checkout. It defaults
-# to ${EGIT_CHECKOUT_DIR} if set, otherwise to ${WORKDIR}/${P}.
-#
-# <local-id> needs to specify the local identifier that was used
-# for respective git-r3_fetch.
-#
-# The checkout operation will write to the working copy, and export
-# the repository state into the environment. If the repository contains
-# submodules, they will be checked out recursively.
-git-r3_checkout() {
-	debug-print-function ${FUNCNAME} "$@"
-
-	local repos
-	if [[ ${1} ]]; then
-		repos=( ${1} )
-	elif [[ $(declare -p EGIT_REPO_URI) == "declare -a"* ]]; then
-		repos=( "${EGIT_REPO_URI[@]}" )
-	else
-		repos=( ${EGIT_REPO_URI} )
-	fi
-
-	local out_dir=${2:-${EGIT_CHECKOUT_DIR:-${WORKDIR}/${P}}}
-	local local_id=${3:-${CATEGORY}/${PN}/${SLOT%/*}}
-
-	local -x GIT_DIR
-	_git-r3_set_gitdir "${repos[0]}"
-
-	einfo "Checking out \e[1m${repos[0]}\e[22m to \e[1m${out_dir}\e[22m ..."
-
-	if ! git cat-file -e refs/git-r3/"${local_id}"/__main__; then
-		die "Logic error: no local clone of ${repos[0]}. git-r3_fetch not used?"
-	fi
-	local remote_ref=$(
-		git symbolic-ref --quiet refs/git-r3/"${local_id}"/__main__
-	)
-	local new_commit_id=$(
-		git rev-parse --verify refs/git-r3/"${local_id}"/__main__
-	)
-
-	git-r3_sub_checkout() {
-		local orig_repo=${GIT_DIR}
-		local -x GIT_DIR=${out_dir}/.git
-		local -x GIT_WORK_TREE=${out_dir}
-
-		mkdir -p "${out_dir}" || die
-
-		# use git init+fetch instead of clone since the latter doesn't like
-		# non-empty directories.
-
-		git init --quiet || die
-		# setup 'alternates' to avoid copying objects
-		echo "${orig_repo}/objects" > "${GIT_DIR}"/objects/info/alternates || die
-		# now copy the refs
-		cp -R "${orig_repo}"/refs/* "${GIT_DIR}"/refs/ || die
-		if [[ -f ${orig_repo}/packed-refs ]]; then
-			cp "${orig_repo}"/packed-refs "${GIT_DIR}"/packed-refs || die
-		fi
-
-		# (no need to copy HEAD, we will set it via checkout)
-
-		if [[ -f ${orig_repo}/shallow ]]; then
-			cp "${orig_repo}"/shallow "${GIT_DIR}"/ || die
-		fi
-
-		set -- git checkout --quiet
-		if [[ ${remote_ref} ]]; then
-			set -- "${@}" "${remote_ref#refs/heads/}"
-		else
-			set -- "${@}" "${new_commit_id}"
-		fi
-		echo "${@}" >&2
-		"${@}" || die "git checkout ${remote_ref:-${new_commit_id}} failed"
-	}
-	git-r3_sub_checkout
-	unset -f git-r3_sub_checkout
-
-	local old_commit_id=$(
-		git rev-parse --quiet --verify refs/git-r3/"${local_id}"/__old__
-	)
-	if [[ ! ${old_commit_id} ]]; then
-		echo "GIT NEW branch -->"
-		echo "   repository:               ${repos[0]}"
-		echo "   at the commit:            ${new_commit_id}"
-	else
-		# diff against previous revision
-		echo "GIT update -->"
-		echo "   repository:               ${repos[0]}"
-		# write out message based on the revisions
-		if [[ "${old_commit_id}" != "${new_commit_id}" ]]; then
-			echo "   updating from commit:     ${old_commit_id}"
-			echo "   to commit:                ${new_commit_id}"
-
-			git --no-pager diff --stat \
-				${old_commit_id}..${new_commit_id}
-		else
-			echo "   at the commit:            ${new_commit_id}"
-		fi
-	fi
-	git update-ref --no-deref refs/git-r3/"${local_id}"/{__old__,__main__} || die
-
-	# recursively checkout submodules
-	if [[ -f ${out_dir}/.gitmodules ]]; then
-		local submodules
-		_git-r3_set_submodules \
-			"$(<"${out_dir}"/.gitmodules)"
-
-		while [[ ${submodules[@]} ]]; do
-			local subname=${submodules[0]}
-			local url=${submodules[1]}
-			local path=${submodules[2]}
-
-			# use only submodules for which path does exist
-			# (this is in par with 'git submodule'), bug #551100
-			if [[ -d ${out_dir}/${path} ]]; then
-				local subrepos
-				_git-r3_set_subrepos "${url}" "${repos[@]}"
-
-				git-r3_checkout "${subrepos[*]}" "${out_dir}/${path}" \
-					"${local_id}/${subname}"
-			fi
-
-			submodules=( "${submodules[@]:3}" ) # shift
-		done
-	fi
-
-	# keep this *after* submodules
-	export EGIT_DIR=${GIT_DIR}
-	export EGIT_VERSION=${new_commit_id}
-}
-
-# @FUNCTION: git-r3_peek_remote_ref
-# @USAGE: [<repo-uri> [<remote-ref>]]
-# @DESCRIPTION:
-# Peek the reference in the remote repository and print the matching
-# (newest) commit SHA1.
-#
-# <repo-uri> specifies the repository URIs to fetch from, as a space-
-# -separated list. When not specified, defaults to ${EGIT_REPO_URI}.
-#
-# <remote-ref> specifies the remote ref to peek.  It is preferred to use
-# 'refs/heads/<branch-name>' for branches and 'refs/tags/<tag-name>'
-# for tags. Alternatively, 'HEAD' may be used for upstream default
-# branch. Defaults to the first of EGIT_COMMIT, EGIT_BRANCH or literal
-# 'HEAD' that is set to a non-null value.
-#
-# The operation will be done purely on the remote, without using local
-# storage. If commit SHA1 is provided as <remote-ref>, the function will
-# fail due to limitations of git protocol.
-#
-# On success, the function returns 0 and writes hexadecimal commit SHA1
-# to stdout. On failure, the function returns 1.
-git-r3_peek_remote_ref() {
-	debug-print-function ${FUNCNAME} "$@"
-
-	local repos
-	if [[ ${1} ]]; then
-		repos=( ${1} )
-	elif [[ $(declare -p EGIT_REPO_URI) == "declare -a"* ]]; then
-		repos=( "${EGIT_REPO_URI[@]}" )
-	else
-		repos=( ${EGIT_REPO_URI} )
-	fi
-
-	local branch=${EGIT_BRANCH:+refs/heads/${EGIT_BRANCH}}
-	local remote_ref=${2:-${EGIT_COMMIT:-${branch:-HEAD}}}
-
-	[[ ${repos[@]} ]] || die "No URI provided and EGIT_REPO_URI unset"
-
-	local r success
-	for r in "${repos[@]}"; do
-		einfo "Peeking \e[1m${remote_ref}\e[22m on \e[1m${r}\e[22m ..." >&2
-
-		local lookup_ref
-		if [[ ${remote_ref} == refs/* || ${remote_ref} == HEAD ]]
-		then
-			lookup_ref=${remote_ref}
-		else
-			# ls-remote by commit is going to fail anyway,
-			# so we may as well pass refs/tags/ABCDEF...
-			lookup_ref=refs/tags/${remote_ref}
-		fi
-
-		# split on whitespace
-		local ref=(
-			$(git ls-remote "${r}" "${lookup_ref}")
-		)
-
-		if [[ ${ref[0]} ]]; then
-			echo "${ref[0]}"
-			return 0
-		fi
-	done
-
-	return 1
-}
-
-git-r3_src_fetch() {
-	debug-print-function ${FUNCNAME} "$@"
-
-	if [[ ! ${EGIT3_STORE_DIR} && ${EGIT_STORE_DIR} ]]; then
-		ewarn "You have set EGIT_STORE_DIR but not EGIT3_STORE_DIR. Please consider"
-		ewarn "setting EGIT3_STORE_DIR for git-r3.eclass. It is recommended to use"
-		ewarn "a different directory than EGIT_STORE_DIR to ease removing old clones"
-		ewarn "when git-2 eclass becomes deprecated."
-	fi
-
-	_git-r3_env_setup
-	git-r3_fetch
-}
-
-git-r3_src_unpack() {
-	debug-print-function ${FUNCNAME} "$@"
-
-	_git-r3_env_setup
-	git-r3_src_fetch
-	git-r3_checkout
-}
-
-# https://bugs.gentoo.org/show_bug.cgi?id=482666
-git-r3_pkg_needrebuild() {
-	debug-print-function ${FUNCNAME} "$@"
-
-	local new_commit_id=$(git-r3_peek_remote_ref)
-	[[ ${new_commit_id} && ${EGIT_VERSION} ]] || die "Lookup failed"
-
-	if [[ ${EGIT_VERSION} != ${new_commit_id} ]]; then
-		einfo "Update from \e[1m${EGIT_VERSION}\e[22m to \e[1m${new_commit_id}\e[22m"
-	else
-		einfo "Local and remote at \e[1m${EGIT_VERSION}\e[22m"
-	fi
-
-	[[ ${EGIT_VERSION} != ${new_commit_id} ]]
-}
-
-# 'export' locally until this gets into EAPI
-pkg_needrebuild() { git-r3_pkg_needrebuild; }
-
-_GIT_R3=1
-fi


^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [gentoo-commits] proj/lisp:master commit in: eclass/
@ 2018-03-17 21:30 José María Alonso
  0 siblings, 0 replies; 32+ messages in thread
From: José María Alonso @ 2018-03-17 21:30 UTC (permalink / raw
  To: gentoo-commits

commit:     8e411c0d8701d705eb9484735de44d4479d441da
Author:     Chema Alonso Josa <nimiux <AT> gentoo <DOT> org>
AuthorDate: Sat Mar 17 21:31:02 2018 +0000
Commit:     José María Alonso <nimiux <AT> gentoo <DOT> org>
CommitDate: Sat Mar 17 21:31:02 2018 +0000
URL:        https://gitweb.gentoo.org/proj/lisp.git/commit/?id=8e411c0d

elisp.eclass: Syncs with portage tree

 eclass/elisp.eclass | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/eclass/elisp.eclass b/eclass/elisp.eclass
index 078a7994..67459730 100644
--- a/eclass/elisp.eclass
+++ b/eclass/elisp.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 # @ECLASS: elisp.eclass
@@ -68,11 +68,11 @@ inherit elisp-common
 
 case ${EAPI:-0} in
 	0|1)
-		inherit eutils
+		inherit epatch
 		EXPORT_FUNCTIONS src_{unpack,compile,install} \
 			pkg_{setup,postinst,postrm} ;;
 	2|3|4|5)
-		inherit eutils
+		inherit epatch
 		EXPORT_FUNCTIONS src_{unpack,prepare,configure,compile,install} \
 			pkg_{setup,postinst,postrm} ;;
 	6)


^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [gentoo-commits] proj/lisp:master commit in: eclass/
@ 2018-05-18 19:56 José María Alonso
  0 siblings, 0 replies; 32+ messages in thread
From: José María Alonso @ 2018-05-18 19:56 UTC (permalink / raw
  To: gentoo-commits

commit:     b6aa18ed6216c130d133823988ca6c2a6947bad6
Author:     Chema Alonso Josa <nimiux <AT> gentoo <DOT> org>
AuthorDate: Fri May 18 19:55:59 2018 +0000
Commit:     José María Alonso <nimiux <AT> gentoo <DOT> org>
CommitDate: Fri May 18 19:55:59 2018 +0000
URL:        https://gitweb.gentoo.org/proj/lisp.git/commit/?id=b6aa18ed

common-lisp-3.eclass: Add abcl implementation

 eclass/common-lisp-3.eclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eclass/common-lisp-3.eclass b/eclass/common-lisp-3.eclass
index 9acf17e3..01fad68d 100644
--- a/eclass/common-lisp-3.eclass
+++ b/eclass/common-lisp-3.eclass
@@ -18,7 +18,7 @@ RESTRICT="mirror"
 # @ECLASS-VARIABLE: CLIMPLEMENTATIONS
 # @DESCRIPTION:
 # Common Lisp implementations
-CLIMPLEMENTATIONS="sbcl clisp clozurecl cmucl ecls gcl"
+CLIMPLEMENTATIONS="sbcl clisp clozurecl cmucl ecls gcl abcl"
 
 # @ECLASS-VARIABLE: CLSOURCEROOT
 # @DESCRIPTION:


^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [gentoo-commits] proj/lisp:master commit in: eclass/
@ 2018-05-19 14:01 José María Alonso
  0 siblings, 0 replies; 32+ messages in thread
From: José María Alonso @ 2018-05-19 14:01 UTC (permalink / raw
  To: gentoo-commits

commit:     f495b90001b02f470fa161fc39b4a64eb3e284bc
Author:     Chema Alonso Josa <nimiux <AT> gentoo <DOT> org>
AuthorDate: Sat May 19 14:01:11 2018 +0000
Commit:     José María Alonso <nimiux <AT> gentoo <DOT> org>
CommitDate: Sat May 19 14:01:11 2018 +0000
URL:        https://gitweb.gentoo.org/proj/lisp.git/commit/?id=f495b900

Add abcl to common-lisp-export-impl-args

 eclass/common-lisp-3.eclass | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/eclass/common-lisp-3.eclass b/eclass/common-lisp-3.eclass
index 01fad68d..ae229491 100644
--- a/eclass/common-lisp-3.eclass
+++ b/eclass/common-lisp-3.eclass
@@ -11,10 +11,6 @@
 
 inherit eutils
 
-# CL packages in the overlay don't have their tarballs on the mirrors
-# so it's useless to mirror them
-RESTRICT="mirror"
-
 # @ECLASS-VARIABLE: CLIMPLEMENTATIONS
 # @DESCRIPTION:
 # Common Lisp implementations
@@ -198,6 +194,11 @@ common-lisp-export-impl-args() {
 	fi
 	CL_BINARY="${1}"
 	case "${CL_BINARY}" in
+		sbcl)
+			CL_NORC="--sysinit /dev/null --userinit /dev/null"
+			CL_LOAD="--load"
+			CL_EVAL="--eval"
+			;;
 		clisp)
 			CL_NORC="-norc"
 			CL_LOAD="-i"
@@ -220,8 +221,8 @@ common-lisp-export-impl-args() {
 			CL_LOAD="-load"
 			CL_EVAL="-eval"
 			;;
-		sbcl)
-			CL_NORC="--sysinit /dev/null --userinit /dev/null"
+		abcl)
+			CL_NORC="--noinit"
 			CL_LOAD="--load"
 			CL_EVAL="--eval"
 			;;


^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [gentoo-commits] proj/lisp:master commit in: eclass/
@ 2018-05-31 16:08 José María Alonso
  0 siblings, 0 replies; 32+ messages in thread
From: José María Alonso @ 2018-05-31 16:08 UTC (permalink / raw
  To: gentoo-commits

commit:     8da871783f07a9503d13354d4f09c912a4d9cb09
Author:     Chema Alonso Josa <nimiux <AT> gentoo <DOT> org>
AuthorDate: Thu May 31 16:08:40 2018 +0000
Commit:     José María Alonso <nimiux <AT> gentoo <DOT> org>
CommitDate: Thu May 31 16:08:40 2018 +0000
URL:        https://gitweb.gentoo.org/proj/lisp.git/commit/?id=8da87178

bash-completion-r1.eclass: Update from main repo

 eclass/bash-completion-r1.eclass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/eclass/bash-completion-r1.eclass b/eclass/bash-completion-r1.eclass
index eb2dfce4..eff5e68c 100644
--- a/eclass/bash-completion-r1.eclass
+++ b/eclass/bash-completion-r1.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2014 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 # @ECLASS: bash-completion-r1.eclass
@@ -25,7 +25,7 @@
 inherit toolchain-funcs
 
 case ${EAPI:-0} in
-	0|1|2|3|4|5|6) ;;
+	0|1|2|3|4|5|6|7) ;;
 	*) die "EAPI ${EAPI} unsupported (yet)."
 esac
 


^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [gentoo-commits] proj/lisp:master commit in: eclass/
@ 2018-05-31 16:10 José María Alonso
  0 siblings, 0 replies; 32+ messages in thread
From: José María Alonso @ 2018-05-31 16:10 UTC (permalink / raw
  To: gentoo-commits

commit:     5c8bcbf9519454d24aba5569cc6bb2dbe4d0d3eb
Author:     Chema Alonso Josa <nimiux <AT> gentoo <DOT> org>
AuthorDate: Thu May 31 16:10:32 2018 +0000
Commit:     José María Alonso <nimiux <AT> gentoo <DOT> org>
CommitDate: Thu May 31 16:10:32 2018 +0000
URL:        https://gitweb.gentoo.org/proj/lisp.git/commit/?id=5c8bcbf9

elisp.eclass: Update from main repo

 eclass/elisp.eclass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/eclass/elisp.eclass b/eclass/elisp.eclass
index 67459730..4447f125 100644
--- a/eclass/elisp.eclass
+++ b/eclass/elisp.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 # @ECLASS: elisp.eclass
@@ -75,7 +75,7 @@ case ${EAPI:-0} in
 		inherit epatch
 		EXPORT_FUNCTIONS src_{unpack,prepare,configure,compile,install} \
 			pkg_{setup,postinst,postrm} ;;
-	6)
+	6|7)
 		EXPORT_FUNCTIONS src_{unpack,prepare,configure,compile,install} \
 			pkg_{setup,postinst,postrm} ;;
 	*) die "${ECLASS}: EAPI ${EAPI} not supported" ;;


^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [gentoo-commits] proj/lisp:master commit in: eclass/
@ 2018-06-21 14:40 José María Alonso
  0 siblings, 0 replies; 32+ messages in thread
From: José María Alonso @ 2018-06-21 14:40 UTC (permalink / raw
  To: gentoo-commits

commit:     db532929210df5e4625730eff0c617629c09a7df
Author:     Chema Alonso Josa <nimiux <AT> gentoo <DOT> org>
AuthorDate: Thu Jun 21 14:40:42 2018 +0000
Commit:     José María Alonso <nimiux <AT> gentoo <DOT> org>
CommitDate: Thu Jun 21 14:40:42 2018 +0000
URL:        https://gitweb.gentoo.org/proj/lisp.git/commit/?id=db532929

elisp.eclass: Sync with main repo

 eclass/elisp.eclass | 28 ++++++++++++++--------------
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/eclass/elisp.eclass b/eclass/elisp.eclass
index 4447f125..0f07a3ef 100644
--- a/eclass/elisp.eclass
+++ b/eclass/elisp.eclass
@@ -65,24 +65,24 @@
 # files by dodoc in src_install().
 
 inherit elisp-common
+case ${EAPI:-0} in
+	0|1|2|3|4|5) inherit epatch ;;
+	6|7) ;;
+	*) die "${ECLASS}: EAPI ${EAPI} not supported" ;;
+esac
 
 case ${EAPI:-0} in
-	0|1)
-		inherit epatch
-		EXPORT_FUNCTIONS src_{unpack,compile,install} \
-			pkg_{setup,postinst,postrm} ;;
-	2|3|4|5)
-		inherit epatch
-		EXPORT_FUNCTIONS src_{unpack,prepare,configure,compile,install} \
+	0|1) EXPORT_FUNCTIONS src_{unpack,compile,install} \
 			pkg_{setup,postinst,postrm} ;;
-	6|7)
-		EXPORT_FUNCTIONS src_{unpack,prepare,configure,compile,install} \
+	*) EXPORT_FUNCTIONS src_{unpack,prepare,configure,compile,install} \
 			pkg_{setup,postinst,postrm} ;;
-	*) die "${ECLASS}: EAPI ${EAPI} not supported" ;;
 esac
 
-DEPEND=">=virtual/emacs-${NEED_EMACS:-23}"
-RDEPEND="${DEPEND}"
+RDEPEND=">=virtual/emacs-${NEED_EMACS:-23}"
+case ${EAPI:-0} in
+	0|1|2|3|4|5|6) DEPEND="${RDEPEND}" ;;
+	*) BDEPEND="${RDEPEND}" ;;
+esac
 
 # @FUNCTION: elisp_pkg_setup
 # @DESCRIPTION:
@@ -137,14 +137,14 @@ elisp_src_prepare() {
 		fi
 		case ${EAPI:-0} in
 			0|1|2|3|4|5) epatch "${file}" ;;
-			6) eapply "${file}" ;;
+			*) eapply "${file}" ;;
 		esac
 	done
 
 	# apply any user patches
 	case ${EAPI:-0} in
 		0|1|2|3|4|5) epatch_user ;;
-		6) eapply_user ;;
+		*) eapply_user ;;
 	esac
 
 	if [[ -n ${ELISP_REMOVE} ]]; then


^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [gentoo-commits] proj/lisp:master commit in: eclass/
@ 2019-08-08 21:24 Ulrich Müller
  0 siblings, 0 replies; 32+ messages in thread
From: Ulrich Müller @ 2019-08-08 21:24 UTC (permalink / raw
  To: gentoo-commits

commit:     e9e354f4f1185174f954786937f9093f27c53015
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Thu Aug  8 21:18:32 2019 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Thu Aug  8 21:18:32 2019 +0000
URL:        https://gitweb.gentoo.org/proj/lisp.git/commit/?id=e9e354f4

subversion.eclass: Copied from Gentoo repository.

Bug: https://bugs.gentoo.org/690646
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>

 eclass/subversion.eclass | 542 +++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 542 insertions(+)

diff --git a/eclass/subversion.eclass b/eclass/subversion.eclass
new file mode 100644
index 00000000..6d26820b
--- /dev/null
+++ b/eclass/subversion.eclass
@@ -0,0 +1,542 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# @ECLASS: subversion.eclass
+# @MAINTAINER:
+# Akinori Hattori <hattya@gentoo.org>
+# @AUTHOR:
+# Original Author: Akinori Hattori <hattya@gentoo.org>
+# @SUPPORTED_EAPIS: 4 5 6 7
+# @BLURB: Fetch software sources from subversion repositories
+# @DESCRIPTION:
+# The subversion eclass provides functions to fetch, patch and bootstrap
+# software sources from subversion repositories.
+
+ESVN="${ECLASS}"
+
+case ${EAPI:-0} in
+	4|5)
+		inherit eutils
+		EXPORT_FUNCTIONS src_unpack src_prepare pkg_preinst
+		;;
+	6|7)
+		inherit estack
+		EXPORT_FUNCTIONS src_unpack pkg_preinst
+		;;
+	*)
+		die "${ESVN}: EAPI ${EAPI:-0} is not supported"
+		;;
+esac
+
+PROPERTIES+=" live"
+
+DEPEND="|| (
+		dev-vcs/subversion[http]
+		dev-vcs/subversion[webdav-neon]
+		dev-vcs/subversion[webdav-serf]
+	)
+	net-misc/rsync"
+
+case ${EAPI} in
+	4|5|6) ;;
+	*) BDEPEND="${DEPEND}"; DEPEND="" ;;
+esac
+
+# @ECLASS-VARIABLE: ESVN_STORE_DIR
+# @DESCRIPTION:
+# subversion sources store directory. Users may override this in /etc/portage/make.conf
+[[ -z ${ESVN_STORE_DIR} ]] && ESVN_STORE_DIR="${PORTAGE_ACTUAL_DISTDIR:-${DISTDIR}}/svn-src"
+
+# @ECLASS-VARIABLE: ESVN_FETCH_CMD
+# @DESCRIPTION:
+# subversion checkout command
+ESVN_FETCH_CMD="svn checkout"
+
+# @ECLASS-VARIABLE: ESVN_UPDATE_CMD
+# @DESCRIPTION:
+# subversion update command
+ESVN_UPDATE_CMD="svn update"
+
+# @ECLASS-VARIABLE: ESVN_SWITCH_CMD
+# @DESCRIPTION:
+# subversion switch command
+ESVN_SWITCH_CMD="svn switch"
+
+# @ECLASS-VARIABLE: ESVN_OPTIONS
+# @DESCRIPTION:
+# the options passed to checkout or update. If you want a specific revision see
+# ESVN_REPO_URI instead of using -rREV.
+ESVN_OPTIONS="${ESVN_OPTIONS:-}"
+
+# @ECLASS-VARIABLE: ESVN_REPO_URI
+# @DESCRIPTION:
+# repository uri
+#
+# e.g. http://foo/trunk, svn://bar/trunk, svn://bar/branch/foo@1234
+#
+# supported URI schemes:
+#   http://
+#   https://
+#   svn://
+#   svn+ssh://
+#   file://
+#
+# to peg to a specific revision, append @REV to the repo's uri
+ESVN_REPO_URI="${ESVN_REPO_URI:-}"
+
+# @ECLASS-VARIABLE: ESVN_REVISION
+# @DESCRIPTION:
+# User configurable revision checkout or update to from the repository
+#
+# Useful for live svn or trunk svn ebuilds allowing the user to peg
+# to a specific revision
+#
+# Note: This should never be set in an ebuild!
+ESVN_REVISION="${ESVN_REVISION:-}"
+
+# @ECLASS-VARIABLE: ESVN_USER
+# @DESCRIPTION:
+# User name
+ESVN_USER="${ESVN_USER:-}"
+
+# @ECLASS-VARIABLE: ESVN_PASSWORD
+# @DESCRIPTION:
+# Password
+ESVN_PASSWORD="${ESVN_PASSWORD:-}"
+
+# @ECLASS-VARIABLE: ESVN_PROJECT
+# @DESCRIPTION:
+# project name of your ebuild (= name space)
+#
+# subversion eclass will check out the subversion repository like:
+#
+#   ${ESVN_STORE_DIR}/${ESVN_PROJECT}/${ESVN_REPO_URI##*/}
+#
+# so if you define ESVN_REPO_URI as http://svn.collab.net/repo/svn/trunk or
+# http://svn.collab.net/repo/svn/trunk/. and PN is subversion-svn.
+# it will check out like:
+#
+#   ${ESVN_STORE_DIR}/subversion/trunk
+#
+# this is not used in order to declare the name of the upstream project.
+# so that you can declare this like:
+#
+#   # jakarta commons-loggin
+#   ESVN_PROJECT=commons/logging
+#
+# default: ${PN/-svn}.
+ESVN_PROJECT="${ESVN_PROJECT:-${PN/-svn}}"
+
+# @ECLASS-VARIABLE: ESVN_BOOTSTRAP
+# @DESCRIPTION:
+# Bootstrap script or command like autogen.sh or etc..
+# Removed in EAPI 6 and later.
+ESVN_BOOTSTRAP="${ESVN_BOOTSTRAP:-}"
+
+# @ECLASS-VARIABLE: ESVN_PATCHES
+# @DESCRIPTION:
+# subversion eclass can apply patches in subversion_bootstrap().
+# you can use regexp in this variable like *.diff or *.patch or etc.
+# NOTE: patches will be applied before ESVN_BOOTSTRAP is processed.
+#
+# Patches are searched both in ${PWD} and ${FILESDIR}, if not found in either
+# location, the installation dies.
+#
+# Removed in EAPI 6 and later, use PATCHES instead.
+ESVN_PATCHES="${ESVN_PATCHES:-}"
+
+# @ECLASS-VARIABLE: ESVN_RESTRICT
+# @DESCRIPTION:
+# this should be a space delimited list of subversion eclass features to
+# restrict.
+#   export)
+#     don't export the working copy to S.
+ESVN_RESTRICT="${ESVN_RESTRICT:-}"
+
+# @ECLASS-VARIABLE: ESVN_OFFLINE
+# @DESCRIPTION:
+# Set this variable to a non-empty value to disable the automatic updating of
+# an svn source tree. This is intended to be set outside the subversion source
+# tree by users.
+ESVN_OFFLINE="${ESVN_OFFLINE:-${EVCS_OFFLINE}}"
+
+# @ECLASS-VARIABLE: ESVN_UMASK
+# @DESCRIPTION:
+# Set this variable to a custom umask. This is intended to be set by users.
+# By setting this to something like 002, it can make life easier for people
+# who do development as non-root (but are in the portage group), and then
+# switch over to building with FEATURES=userpriv.  Or vice-versa.  Shouldn't
+# be a security issue here as anyone who has portage group write access
+# already can screw the system over in more creative ways.
+ESVN_UMASK="${ESVN_UMASK:-${EVCS_UMASK}}"
+
+# @ECLASS-VARIABLE: ESVN_UP_FREQ
+# @DESCRIPTION:
+# Set the minimum number of hours between svn up'ing in any given svn module. This is particularly
+# useful for split KDE ebuilds where we want to ensure that all submodules are compiled for the same
+# revision. It should also be kept user overrideable.
+ESVN_UP_FREQ="${ESVN_UP_FREQ:=}"
+
+# @ECLASS-VARIABLE: ESCM_LOGDIR
+# @DESCRIPTION:
+# User configuration variable. If set to a path such as e.g. /var/log/scm any
+# package inheriting from subversion.eclass will record svn revision to
+# ${CATEGORY}/${PN}.log in that path in pkg_preinst. This is not supposed to be
+# set by ebuilds/eclasses. It defaults to empty so users need to opt in.
+ESCM_LOGDIR="${ESCM_LOGDIR:=}"
+
+# @FUNCTION: subversion_fetch
+# @USAGE: [repo_uri] [destination]
+# @DESCRIPTION:
+# Wrapper function to fetch sources from subversion via svn checkout or svn update,
+# depending on whether there is an existing working copy in ${ESVN_STORE_DIR}.
+#
+# Can take two optional parameters:
+#   repo_uri    - a repository URI. default is ESVN_REPO_URI.
+#   destination - a check out path in S.
+subversion_fetch() {
+	local repo_uri="$(subversion__get_repository_uri "${1:-${ESVN_REPO_URI}}")"
+	local revision="$(subversion__get_peg_revision "${1:-${ESVN_REPO_URI}}")"
+	local S_dest="${2}"
+
+	if [[ -z ${repo_uri} ]]; then
+		die "${ESVN}: ESVN_REPO_URI (or specified URI) is empty."
+	fi
+
+	[[ -n "${ESVN_REVISION}" ]] && revision="${ESVN_REVISION}"
+
+	# check for the scheme
+	local scheme="${repo_uri%%:*}"
+	case "${scheme}" in
+		http|https)
+			;;
+		svn|svn+ssh)
+			;;
+		file)
+			;;
+		*)
+			die "${ESVN}: fetch from '${scheme}' is not yet implemented."
+			;;
+	esac
+
+	addread "/etc/subversion"
+	addwrite "${ESVN_STORE_DIR}"
+
+	if [[ -n "${ESVN_UMASK}" ]]; then
+		eumask_push "${ESVN_UMASK}"
+	fi
+
+	if [[ ! -d ${ESVN_STORE_DIR} ]]; then
+		debug-print "${FUNCNAME}: initial checkout. creating subversion directory"
+		mkdir -m 775 -p "${ESVN_STORE_DIR}" || die "${ESVN}: can't mkdir ${ESVN_STORE_DIR}."
+	fi
+
+	pushd "${ESVN_STORE_DIR}" >/dev/null || die "${ESVN}: can't chdir to ${ESVN_STORE_DIR}"
+
+	local wc_path="$(subversion__get_wc_path "${repo_uri}")"
+	local options="${ESVN_OPTIONS} --config-dir ${ESVN_STORE_DIR}/.subversion"
+
+	[[ -n "${revision}" ]] && options="${options} -r ${revision}"
+
+	if [[ "${ESVN_OPTIONS}" = *-r* ]]; then
+		ewarn "\${ESVN_OPTIONS} contains -r, this usage is unsupported. Please"
+		ewarn "see \${ESVN_REPO_URI}"
+	fi
+
+	if has_version ">=dev-vcs/subversion-1.6.0"; then
+		options="${options} --config-option=config:auth:password-stores="
+	fi
+
+	debug-print "${FUNCNAME}: wc_path = \"${wc_path}\""
+	debug-print "${FUNCNAME}: ESVN_OPTIONS = \"${ESVN_OPTIONS}\""
+	debug-print "${FUNCNAME}: options = \"${options}\""
+
+	if [[ ! -d ${wc_path}/.svn ]]; then
+		if [[ -n ${ESVN_OFFLINE} ]]; then
+			ewarn "ESVN_OFFLINE cannot be used when there is no existing checkout."
+		fi
+		# first check out
+		einfo "subversion check out start -->"
+		einfo "     repository: ${repo_uri}${revision:+@}${revision}"
+
+		debug-print "${FUNCNAME}: ${ESVN_FETCH_CMD} ${options} ${repo_uri}"
+
+		mkdir -m 775 -p "${ESVN_PROJECT}" || die "${ESVN}: can't mkdir ${ESVN_PROJECT}."
+		cd "${ESVN_PROJECT}" || die "${ESVN}: can't chdir to ${ESVN_PROJECT}"
+		if [[ -n "${ESVN_USER}" ]]; then
+			${ESVN_FETCH_CMD} ${options} --username "${ESVN_USER}" --password "${ESVN_PASSWORD}" "${repo_uri}" || die "${ESVN}: can't fetch to ${wc_path} from ${repo_uri}."
+		else
+			${ESVN_FETCH_CMD} ${options} "${repo_uri}" || die "${ESVN}: can't fetch to ${wc_path} from ${repo_uri}."
+		fi
+
+	elif [[ -n ${ESVN_OFFLINE} ]]; then
+		svn upgrade "${wc_path}" &>/dev/null
+		svn cleanup "${wc_path}" &>/dev/null
+		subversion_wc_info "${repo_uri}" || die "${ESVN}: unknown problem occurred while accessing working copy."
+
+		if [[ -n ${ESVN_REVISION} && ${ESVN_REVISION} != ${ESVN_WC_REVISION} ]]; then
+			die "${ESVN}: You requested off-line updating and revision ${ESVN_REVISION} but only revision ${ESVN_WC_REVISION} is available locally."
+		fi
+		einfo "Fetching disabled: Using existing repository copy at revision ${ESVN_WC_REVISION}."
+	else
+		svn upgrade "${wc_path}" &>/dev/null
+		svn cleanup "${wc_path}" &>/dev/null
+		subversion_wc_info "${repo_uri}" || die "${ESVN}: unknown problem occurred while accessing working copy."
+
+		local esvn_up_freq=
+		if [[ -n ${ESVN_UP_FREQ} ]]; then
+			if [[ -n ${ESVN_UP_FREQ//[[:digit:]]} ]]; then
+				die "${ESVN}: ESVN_UP_FREQ must be an integer value corresponding to the minimum number of hours between svn up."
+			elif [[ -z $(find "${wc_path}/.svn/entries" -mmin "+$((ESVN_UP_FREQ*60))") ]]; then
+				einfo "Fetching disabled since ${ESVN_UP_FREQ} hours has not passed since last update."
+				einfo "Using existing repository copy at revision ${ESVN_WC_REVISION}."
+				esvn_up_freq=no_update
+			fi
+		fi
+
+		if [[ -z ${esvn_up_freq} ]]; then
+			if [[ ${ESVN_WC_UUID} != $(subversion__svn_info "${repo_uri}" "Repository UUID") ]]; then
+				# UUID mismatch. Delete working copy and check out it again.
+				einfo "subversion recheck out start -->"
+				einfo "     old UUID: ${ESVN_WC_UUID}"
+				einfo "     new UUID: $(subversion__svn_info "${repo_uri}" "Repository UUID")"
+				einfo "     repository: ${repo_uri}${revision:+@}${revision}"
+
+				rm -fr "${ESVN_PROJECT}" || die
+
+				debug-print "${FUNCNAME}: ${ESVN_FETCH_CMD} ${options} ${repo_uri}"
+
+				mkdir -m 775 -p "${ESVN_PROJECT}" || die "${ESVN}: can't mkdir ${ESVN_PROJECT}."
+				cd "${ESVN_PROJECT}" || die "${ESVN}: can't chdir to ${ESVN_PROJECT}"
+				if [[ -n "${ESVN_USER}" ]]; then
+					${ESVN_FETCH_CMD} ${options} --username "${ESVN_USER}" --password "${ESVN_PASSWORD}" "${repo_uri}" || die "${ESVN}: can't fetch to ${wc_path} from ${repo_uri}."
+				else
+					${ESVN_FETCH_CMD} ${options} "${repo_uri}" || die "${ESVN}: can't fetch to ${wc_path} from ${repo_uri}."
+				fi
+			elif [[ ${ESVN_WC_URL} != $(subversion__get_repository_uri "${repo_uri}") ]]; then
+				einfo "subversion switch start -->"
+				einfo "     old repository: ${ESVN_WC_URL}@${ESVN_WC_REVISION}"
+				einfo "     new repository: ${repo_uri}${revision:+@}${revision}"
+
+				debug-print "${FUNCNAME}: ${ESVN_SWITCH_CMD} ${options} ${repo_uri}"
+
+				cd "${wc_path}" || die "${ESVN}: can't chdir to ${wc_path}"
+				if [[ -n "${ESVN_USER}" ]]; then
+					${ESVN_SWITCH_CMD} ${options} --username "${ESVN_USER}" --password "${ESVN_PASSWORD}" ${repo_uri} || die "${ESVN}: can't update ${wc_path} from ${repo_uri}."
+				else
+					${ESVN_SWITCH_CMD} ${options} ${repo_uri} || die "${ESVN}: can't update ${wc_path} from ${repo_uri}."
+				fi
+			else
+				# update working copy
+				einfo "subversion update start -->"
+				einfo "     repository: ${repo_uri}${revision:+@}${revision}"
+
+				debug-print "${FUNCNAME}: ${ESVN_UPDATE_CMD} ${options}"
+
+				cd "${wc_path}" || die "${ESVN}: can't chdir to ${wc_path}"
+				if [[ -n "${ESVN_USER}" ]]; then
+					${ESVN_UPDATE_CMD} ${options} --username "${ESVN_USER}" --password "${ESVN_PASSWORD}" || die "${ESVN}: can't update ${wc_path} from ${repo_uri}."
+				else
+					${ESVN_UPDATE_CMD} ${options} || die "${ESVN}: can't update ${wc_path} from ${repo_uri}."
+				fi
+			fi
+
+			# export updated information for the working copy
+			subversion_wc_info "${repo_uri}" || die "${ESVN}: unknown problem occurred while accessing working copy."
+		fi
+	fi
+
+	if [[ -n "${ESVN_UMASK}" ]]; then
+		eumask_pop
+	fi
+
+	einfo "   working copy: ${wc_path}"
+
+	if ! has "export" ${ESVN_RESTRICT}; then
+		cd "${wc_path}" || die "${ESVN}: can't chdir to ${wc_path}"
+
+		local S="${S}/${S_dest}"
+		mkdir -p "${S}"
+
+		# export to the ${WORKDIR}
+		#*  "svn export" has a bug.  see https://bugs.gentoo.org/119236
+		#* svn export . "${S}" || die "${ESVN}: can't export to ${S}."
+		rsync -rlpgo --exclude=".svn/" . "${S}" || die "${ESVN}: can't export to ${S}."
+	fi
+
+	popd >/dev/null
+	echo
+}
+
+# @FUNCTION: subversion_bootstrap
+# @DESCRIPTION:
+# Apply patches in ${ESVN_PATCHES} and run ${ESVN_BOOTSTRAP} if specified.
+# Removed in EAPI 6 and later.
+subversion_bootstrap() {
+	[[ ${EAPI} == [012345] ]] || die "${FUNCNAME} is removed from subversion.eclass in EAPI 6 and later"
+
+	if has "export" ${ESVN_RESTRICT}; then
+		return
+	fi
+
+	cd "${S}"
+
+	if [[ -n ${ESVN_PATCHES} ]]; then
+		local patch fpatch
+		einfo "apply patches -->"
+		for patch in ${ESVN_PATCHES}; do
+			if [[ -f ${patch} ]]; then
+				epatch "${patch}"
+			else
+				for fpatch in ${FILESDIR}/${patch}; do
+					if [[ -f ${fpatch} ]]; then
+						epatch "${fpatch}"
+					else
+						die "${ESVN}: ${patch} not found"
+					fi
+				done
+			fi
+		done
+		echo
+	fi
+
+	if [[ -n ${ESVN_BOOTSTRAP} ]]; then
+		einfo "begin bootstrap -->"
+		if [[ -f ${ESVN_BOOTSTRAP} && -x ${ESVN_BOOTSTRAP} ]]; then
+			einfo "   bootstrap with a file: ${ESVN_BOOTSTRAP}"
+			eval "./${ESVN_BOOTSTRAP}" || die "${ESVN}: can't execute ESVN_BOOTSTRAP."
+		else
+			einfo "   bootstrap with command: ${ESVN_BOOTSTRAP}"
+			eval "${ESVN_BOOTSTRAP}" || die "${ESVN}: can't eval ESVN_BOOTSTRAP."
+		fi
+	fi
+}
+
+# @FUNCTION: subversion_wc_info
+# @USAGE: [repo_uri]
+# @RETURN: ESVN_WC_URL, ESVN_WC_ROOT, ESVN_WC_UUID, ESVN_WC_REVISION and ESVN_WC_PATH
+# @DESCRIPTION:
+# Get svn info for the specified repo_uri. The default repo_uri is ESVN_REPO_URI.
+#
+# The working copy information on the specified repository URI are set to
+# ESVN_WC_* variables.
+subversion_wc_info() {
+	local repo_uri="$(subversion__get_repository_uri "${1:-${ESVN_REPO_URI}}")"
+	local wc_path="$(subversion__get_wc_path "${repo_uri}")"
+
+	debug-print "${FUNCNAME}: repo_uri = ${repo_uri}"
+	debug-print "${FUNCNAME}: wc_path = ${wc_path}"
+
+	if [[ ! -d ${wc_path} ]]; then
+		return 1
+	fi
+
+	export ESVN_WC_URL="$(subversion__svn_info "${wc_path}" "URL")"
+	export ESVN_WC_ROOT="$(subversion__svn_info "${wc_path}" "Repository Root")"
+	export ESVN_WC_UUID="$(subversion__svn_info "${wc_path}" "Repository UUID")"
+	export ESVN_WC_REVISION="$(subversion__svn_info "${wc_path}" "Revision")"
+	export ESVN_WC_PATH="${wc_path}"
+}
+
+# @FUNCTION: subversion_src_unpack
+# @DESCRIPTION:
+# Default src_unpack. Fetch.
+subversion_src_unpack() {
+	subversion_fetch || die "${ESVN}: unknown problem occurred in subversion_fetch."
+}
+
+# @FUNCTION: subversion_src_prepare
+# @DESCRIPTION:
+# Default src_prepare. Bootstrap.
+# Removed in EAPI 6 and later.
+subversion_src_prepare() {
+	[[ ${EAPI} == [012345] ]] || die "${FUNCNAME} is removed from subversion.eclass in EAPI 6 and later"
+	subversion_bootstrap || die "${ESVN}: unknown problem occurred in subversion_bootstrap."
+}
+
+# @FUNCTION: subversion_pkg_preinst
+# @USAGE: [repo_uri]
+# @DESCRIPTION:
+# Log the svn revision of source code. Doing this in pkg_preinst because we
+# want the logs to stick around if packages are uninstalled without messing with
+# config protection.
+subversion_pkg_preinst() {
+	local pkgdate=$(date "+%Y%m%d %H:%M:%S")
+	if [[ -n ${ESCM_LOGDIR} ]]; then
+		local dir="${EROOT%/}${ESCM_LOGDIR}/${CATEGORY}"
+		if [[ ! -d ${dir} ]]; then
+			mkdir -p "${dir}" || eerror "Failed to create '${dir}' for logging svn revision"
+		fi
+		local logmessage="svn: ${pkgdate} - ${PF}:${SLOT} was merged at revision ${ESVN_WC_REVISION}"
+		if [[ -d ${dir} ]]; then
+			echo "${logmessage}" >>"${dir}/${PN}.log"
+		else
+			eerror "Could not log the message '${logmessage}' to '${dir}/${PN}.log'"
+		fi
+	fi
+}
+
+## -- Private Functions
+
+## -- subversion__svn_info() ------------------------------------------------- #
+#
+# param $1 - a target.
+# param $2 - a key name.
+#
+subversion__svn_info() {
+	local target="${1}"
+	local key="${2}"
+
+	env LC_ALL=C svn info ${options} --username "${ESVN_USER}" --password "${ESVN_PASSWORD}" "${target}" \
+		| grep -i "^${key}" \
+		| cut -d" " -f2-
+}
+
+## -- subversion__get_repository_uri() --------------------------------------- #
+#
+# param $1 - a repository URI.
+subversion__get_repository_uri() {
+	local repo_uri="${1}"
+
+	debug-print "${FUNCNAME}: repo_uri = ${repo_uri}"
+	if [[ -z ${repo_uri} ]]; then
+		die "${ESVN}: ESVN_REPO_URI (or specified URI) is empty."
+	fi
+	# delete trailing slash
+	if [[ -z ${repo_uri##*/} ]]; then
+		repo_uri="${repo_uri%/}"
+	fi
+	repo_uri="${repo_uri%@*}"
+
+	echo "${repo_uri}"
+}
+
+## -- subversion__get_wc_path() ---------------------------------------------- #
+#
+# param $1 - a repository URI.
+subversion__get_wc_path() {
+	local repo_uri="$(subversion__get_repository_uri "${1}")"
+
+	debug-print "${FUNCNAME}: repo_uri = ${repo_uri}"
+
+	echo "${ESVN_STORE_DIR}/${ESVN_PROJECT}/${repo_uri##*/}"
+}
+
+## -- subversion__get_peg_revision() ----------------------------------------- #
+#
+# param $1 - a repository URI.
+subversion__get_peg_revision() {
+	local repo_uri="${1}"
+	local peg_rev=
+
+	debug-print "${FUNCNAME}: repo_uri = ${repo_uri}"
+	# repo_uri has peg revision?
+	if [[ ${repo_uri} = *@* ]]; then
+		peg_rev="${repo_uri##*@}"
+		debug-print "${FUNCNAME}: peg_rev = ${peg_rev}"
+	else
+		debug-print "${FUNCNAME}: repo_uri does not have a peg revision."
+	fi
+
+	echo "${peg_rev}"
+}


^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [gentoo-commits] proj/lisp:master commit in: eclass/
@ 2019-08-08 21:24 Ulrich Müller
  0 siblings, 0 replies; 32+ messages in thread
From: Ulrich Müller @ 2019-08-08 21:24 UTC (permalink / raw
  To: gentoo-commits

commit:     95c7e8ec0ef6b07ebb83ba35d174bb35b647f83c
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Thu Aug  8 21:23:10 2019 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Thu Aug  8 21:23:10 2019 +0000
URL:        https://gitweb.gentoo.org/proj/lisp.git/commit/?id=95c7e8ec

subversion.eclass: Re-add support for old EAPIs.

Bug: https://bugs.gentoo.org/690646
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>

 eclass/subversion.eclass | 29 +++++++++++++++++++----------
 1 file changed, 19 insertions(+), 10 deletions(-)

diff --git a/eclass/subversion.eclass b/eclass/subversion.eclass
index 6d26820b..4d5f8677 100644
--- a/eclass/subversion.eclass
+++ b/eclass/subversion.eclass
@@ -6,7 +6,7 @@
 # Akinori Hattori <hattya@gentoo.org>
 # @AUTHOR:
 # Original Author: Akinori Hattori <hattya@gentoo.org>
-# @SUPPORTED_EAPIS: 4 5 6 7
+# @SUPPORTED_EAPIS: 0 1 2 3 4 5 6 7
 # @BLURB: Fetch software sources from subversion repositories
 # @DESCRIPTION:
 # The subversion eclass provides functions to fetch, patch and bootstrap
@@ -15,7 +15,11 @@
 ESVN="${ECLASS}"
 
 case ${EAPI:-0} in
-	4|5)
+	0|1)
+		inherit eutils
+		EXPORT_FUNCTIONS src_unpack pkg_preinst
+		;;
+	2|3|4|5)
 		inherit eutils
 		EXPORT_FUNCTIONS src_unpack src_prepare pkg_preinst
 		;;
@@ -30,15 +34,16 @@ esac
 
 PROPERTIES+=" live"
 
-DEPEND="|| (
-		dev-vcs/subversion[http]
-		dev-vcs/subversion[webdav-neon]
-		dev-vcs/subversion[webdav-serf]
-	)
-	net-misc/rsync"
+case ${EAPI:-0} in
+	0|1) DEPEND="dev-vcs/subversion" ;;
+	*)   DEPEND="|| ( dev-vcs/subversion[http]
+				dev-vcs/subversion[webdav-neon]
+				dev-vcs/subversion[webdav-serf]	)" ;;
+esac
+DEPEND+=" net-misc/rsync"
 
 case ${EAPI} in
-	4|5|6) ;;
+	0|1|2|3|4|5|6) ;;
 	*) BDEPEND="${DEPEND}"; DEPEND="" ;;
 esac
 
@@ -440,9 +445,12 @@ subversion_wc_info() {
 
 # @FUNCTION: subversion_src_unpack
 # @DESCRIPTION:
-# Default src_unpack. Fetch.
+# Default src_unpack. Fetch and, in older EAPIs, bootstrap.
 subversion_src_unpack() {
 	subversion_fetch || die "${ESVN}: unknown problem occurred in subversion_fetch."
+	if has "${EAPI:-0}" 0 1; then
+		subversion_bootstrap || die "${ESVN}: unknown problem occurred in subversion_bootstrap."
+	fi
 }
 
 # @FUNCTION: subversion_src_prepare
@@ -461,6 +469,7 @@ subversion_src_prepare() {
 # want the logs to stick around if packages are uninstalled without messing with
 # config protection.
 subversion_pkg_preinst() {
+	has "${EAPI:-0}" 0 1 2 && ! use prefix && EROOT="${ROOT}"
 	local pkgdate=$(date "+%Y%m%d %H:%M:%S")
 	if [[ -n ${ESCM_LOGDIR} ]]; then
 		local dir="${EROOT%/}${ESCM_LOGDIR}/${CATEGORY}"


^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [gentoo-commits] proj/lisp:master commit in: eclass/
@ 2020-02-11 21:25 Ulrich Müller
  0 siblings, 0 replies; 32+ messages in thread
From: Ulrich Müller @ 2020-02-11 21:25 UTC (permalink / raw
  To: gentoo-commits

commit:     789ec9a122f5d86578693be4c35ec99a9aa09da7
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Tue Feb 11 21:25:04 2020 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Tue Feb 11 21:25:04 2020 +0000
URL:        https://gitweb.gentoo.org/proj/lisp.git/commit/?id=789ec9a1

git-2.eclass: Copied from Gentoo repository.

Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>

 eclass/git-2.eclass | 610 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 610 insertions(+)

diff --git a/eclass/git-2.eclass b/eclass/git-2.eclass
new file mode 100644
index 00000000..91716329
--- /dev/null
+++ b/eclass/git-2.eclass
@@ -0,0 +1,610 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# @ECLASS: git-2.eclass
+# @MAINTAINER:
+# maintainer-needed@gentoo.org
+# @SUPPORTED_EAPIS: 0 1 2 3 4 5
+# @BLURB: Eclass for fetching and unpacking git repositories.
+# @DESCRIPTION:
+# Eclass for easing maintenance of live ebuilds using git as remote repository.
+# Eclass support working with git submodules and branching.
+#
+# This eclass is DEPRECATED. Please use git-r3 instead.
+
+case ${EAPI:-0} in
+	0|1|2|3|4|5) ;;
+	*) die "${ECLASS}.eclass is banned in EAPI ${EAPI}";;
+esac
+
+# This eclass support all EAPIs.
+EXPORT_FUNCTIONS src_unpack
+
+PROPERTIES+=" live"
+
+DEPEND="dev-vcs/git"
+
+# @ECLASS-VARIABLE: EGIT_SOURCEDIR
+# @DESCRIPTION:
+# This variable specifies destination where the cloned
+# data are copied to.
+#
+# EGIT_SOURCEDIR="${S}"
+
+# @ECLASS-VARIABLE: EGIT_STORE_DIR
+# @DESCRIPTION:
+# Storage directory for git sources.
+#
+# EGIT_STORE_DIR="${DISTDIR}/egit-src"
+
+# @ECLASS-VARIABLE: EGIT_HAS_SUBMODULES
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# If non-empty this variable enables support for git submodules in our
+# checkout. Also this makes the checkout to be non-bare for now.
+
+# @ECLASS-VARIABLE: EGIT_OPTIONS
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# Variable specifying additional options for fetch command.
+
+# @ECLASS-VARIABLE: EGIT_MASTER
+# @DESCRIPTION:
+# Variable for specifying master branch.
+# Useful when upstream don't have master branch or name it differently.
+#
+# EGIT_MASTER="master"
+
+# @ECLASS-VARIABLE: EGIT_PROJECT
+# @DESCRIPTION:
+# Variable specifying name for the folder where we check out the git
+# repository. Value of this variable should be unique in the
+# EGIT_STORE_DIR as otherwise you would override another repository.
+#
+# EGIT_PROJECT="${EGIT_REPO_URI##*/}"
+
+# @ECLASS-VARIABLE: EGIT_DIR
+# @DESCRIPTION:
+# Directory where we want to store the git data.
+# This variable should not be overridden.
+#
+# EGIT_DIR="${EGIT_STORE_DIR}/${EGIT_PROJECT}"
+
+# @ECLASS-VARIABLE: EGIT_REPO_URI
+# @REQUIRED
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# URI for the repository
+# e.g. http://foo, git://bar
+#
+# It can be overridden via env using packagename_LIVE_REPO
+# variable.
+#
+# Support multiple values:
+# EGIT_REPO_URI="git://a/b.git http://c/d.git"
+
+# @ECLASS-VARIABLE: EVCS_OFFLINE
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# If non-empty this variable prevents performance of any online
+# operations.
+
+# @ECLASS-VARIABLE: EGIT_BRANCH
+# @DESCRIPTION:
+# Variable containing branch name we want to check out.
+# It can be overridden via env using packagename_LIVE_BRANCH
+# variable.
+#
+# EGIT_BRANCH="${EGIT_MASTER}"
+
+# @ECLASS-VARIABLE: EGIT_COMMIT
+# @DESCRIPTION:
+# Variable containing commit hash/tag we want to check out.
+# It can be overridden via env using packagename_LIVE_COMMIT
+# variable.
+#
+# EGIT_COMMIT="${EGIT_BRANCH}"
+
+# @ECLASS-VARIABLE: EGIT_REPACK
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# If non-empty this variable specifies that repository will be repacked to
+# save space. However this can take a REALLY LONG time with VERY big
+# repositories.
+
+# @ECLASS-VARIABLE: EGIT_PRUNE
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# If non-empty this variable enables pruning all loose objects on each fetch.
+# This is useful if upstream rewinds and rebases branches often.
+
+# @ECLASS-VARIABLE: EGIT_NONBARE
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# If non-empty this variable specifies that all checkouts will be done using
+# non bare repositories. This is useful if you can't operate with bare
+# checkouts for some reason.
+
+# @ECLASS-VARIABLE: EGIT_NOUNPACK
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# If non-empty this variable bans unpacking of ${A} content into the srcdir.
+# Default behavior is to unpack ${A} content.
+
+# @FUNCTION: git-2_init_variables
+# @INTERNAL
+# @DESCRIPTION:
+# Internal function initializing all git variables.
+# We define it in function scope so user can define
+# all the variables before and after inherit.
+git-2_init_variables() {
+	debug-print-function ${FUNCNAME} "$@"
+
+	local esc_pn liverepo livebranch livecommit
+	esc_pn=${PN//[-+]/_}
+
+	: ${EGIT_SOURCEDIR="${S}"}
+
+	: ${EGIT_STORE_DIR:="${PORTAGE_ACTUAL_DISTDIR-${DISTDIR}}/egit-src"}
+
+	: ${EGIT_HAS_SUBMODULES:=}
+
+	: ${EGIT_OPTIONS:=}
+
+	: ${EGIT_MASTER:=master}
+
+	liverepo=${esc_pn}_LIVE_REPO
+	EGIT_REPO_URI=${!liverepo:-${EGIT_REPO_URI}}
+	[[ ${EGIT_REPO_URI} ]] || die "EGIT_REPO_URI must have some value"
+
+	: ${EVCS_OFFLINE:=}
+
+	livebranch=${esc_pn}_LIVE_BRANCH
+	[[ ${!livebranch} ]] && ewarn "QA: using \"${esc_pn}_LIVE_BRANCH\" variable, you won't get any support"
+	EGIT_BRANCH=${!livebranch:-${EGIT_BRANCH:-${EGIT_MASTER}}}
+
+	livecommit=${esc_pn}_LIVE_COMMIT
+	[[ ${!livecommit} ]] && ewarn "QA: using \"${esc_pn}_LIVE_COMMIT\" variable, you won't get any support"
+	EGIT_COMMIT=${!livecommit:-${EGIT_COMMIT:-${EGIT_BRANCH}}}
+
+	: ${EGIT_REPACK:=}
+
+	: ${EGIT_PRUNE:=}
+}
+
+# @FUNCTION: git-2_submodules
+# @INTERNAL
+# @DESCRIPTION:
+# Internal function wrapping the submodule initialisation and update.
+git-2_submodules() {
+	debug-print-function ${FUNCNAME} "$@"
+	if [[ ${EGIT_HAS_SUBMODULES} ]]; then
+		if [[ ${EVCS_OFFLINE} ]]; then
+			# for submodules operations we need to be online
+			debug-print "${FUNCNAME}: not updating submodules in offline mode"
+			return 1
+		fi
+
+		debug-print "${FUNCNAME}: working in \"${1}\""
+		pushd "${EGIT_DIR}" > /dev/null || die
+
+		debug-print "${FUNCNAME}: git submodule init"
+		git submodule init || die
+		debug-print "${FUNCNAME}: git submodule sync"
+		git submodule sync || die
+		debug-print "${FUNCNAME}: git submodule update"
+		git submodule update || die
+
+		popd > /dev/null || die
+	fi
+}
+
+# @FUNCTION: git-2_branch
+# @INTERNAL
+# @DESCRIPTION:
+# Internal function that changes branch for the repo based on EGIT_COMMIT and
+# EGIT_BRANCH variables.
+git-2_branch() {
+	debug-print-function ${FUNCNAME} "$@"
+
+	local branchname src
+
+	debug-print "${FUNCNAME}: working in \"${EGIT_SOURCEDIR}\""
+	pushd "${EGIT_SOURCEDIR}" > /dev/null || die
+
+	local branchname=branch-${EGIT_BRANCH} src=origin/${EGIT_BRANCH}
+	if [[ ${EGIT_COMMIT} != ${EGIT_BRANCH} ]]; then
+		branchname=tree-${EGIT_COMMIT}
+		src=${EGIT_COMMIT}
+	fi
+	debug-print "${FUNCNAME}: git checkout -b ${branchname} ${src}"
+	git checkout -b ${branchname} ${src} \
+		|| die "${FUNCNAME}: changing the branch failed"
+
+	popd > /dev/null || die
+}
+
+# @FUNCTION: git-2_gc
+# @INTERNAL
+# @DESCRIPTION:
+# Internal function running garbage collector on checked out tree.
+git-2_gc() {
+	debug-print-function ${FUNCNAME} "$@"
+
+	local args
+
+	if [[ ${EGIT_REPACK} || ${EGIT_PRUNE} ]]; then
+		pushd "${EGIT_DIR}" > /dev/null || die
+		ebegin "Garbage collecting the repository"
+		[[ ${EGIT_PRUNE} ]] && args='--prune'
+		debug-print "${FUNCNAME}: git gc ${args}"
+		git gc ${args}
+		eend $?
+		popd > /dev/null || die
+	fi
+}
+
+# @FUNCTION: git-2_prepare_storedir
+# @INTERNAL
+# @DESCRIPTION:
+# Internal function preparing directory where we are going to store SCM
+# repository.
+git-2_prepare_storedir() {
+	debug-print-function ${FUNCNAME} "$@"
+
+	local clone_dir
+
+	# initial clone, we have to create master git storage directory and play
+	# nicely with sandbox
+	if [[ ! -d ${EGIT_STORE_DIR} ]]; then
+		debug-print "${FUNCNAME}: Creating git main storage directory"
+		addwrite /
+		mkdir -m 775 -p "${EGIT_STORE_DIR}" \
+			|| die "${FUNCNAME}: can't mkdir \"${EGIT_STORE_DIR}\""
+	fi
+
+	# allow writing into EGIT_STORE_DIR
+	addwrite "${EGIT_STORE_DIR}"
+
+	# calculate git.eclass store dir for data
+	# We will try to clone the old repository,
+	# and we will remove it if we don't need it anymore.
+	EGIT_OLD_CLONE=
+	if [[ ${EGIT_STORE_DIR} == */egit-src ]]; then
+		local old_store_dir=${EGIT_STORE_DIR/%egit-src/git-src}
+		local old_location=${old_store_dir}/${EGIT_PROJECT:-${PN}}
+
+		if [[ -d ${old_location} ]]; then
+			EGIT_OLD_CLONE=${old_location}
+			# required to remove the old clone
+			addwrite "${old_store_dir}"
+		fi
+	fi
+
+	# calculate the proper store dir for data
+	# If user didn't specify the EGIT_DIR, we check if he did specify
+	# the EGIT_PROJECT or get the folder name from EGIT_REPO_URI.
+	EGIT_REPO_URI=${EGIT_REPO_URI%/}
+	if [[ ! ${EGIT_DIR} ]]; then
+		if [[ ${EGIT_PROJECT} ]]; then
+			clone_dir=${EGIT_PROJECT}
+		else
+			local strippeduri=${EGIT_REPO_URI%/.git}
+			clone_dir=${strippeduri##*/}
+		fi
+		EGIT_DIR=${EGIT_STORE_DIR}/${clone_dir}
+
+		if [[ ${EGIT_OLD_CLONE} && ! -d ${EGIT_DIR} ]]; then
+			elog "${FUNCNAME}: ${CATEGORY}/${PF} will be cloned from old location."
+			elog "It will be necessary to rebuild the package to fetch updates."
+			EGIT_REPO_URI="${EGIT_OLD_CLONE} ${EGIT_REPO_URI}"
+		fi
+	fi
+	export EGIT_DIR=${EGIT_DIR}
+	debug-print "${FUNCNAME}: Storing the repo into \"${EGIT_DIR}\"."
+}
+
+# @FUNCTION: git-2_move_source
+# @INTERNAL
+# @DESCRIPTION:
+# Internal function moving sources from the EGIT_DIR to EGIT_SOURCEDIR dir.
+git-2_move_source() {
+	debug-print-function ${FUNCNAME} "$@"
+
+	debug-print "${FUNCNAME}: ${MOVE_COMMAND} \"${EGIT_DIR}\" \"${EGIT_SOURCEDIR}\""
+	pushd "${EGIT_DIR}" > /dev/null || die
+	mkdir -p "${EGIT_SOURCEDIR}" \
+		|| die "${FUNCNAME}: failed to create ${EGIT_SOURCEDIR}"
+	${MOVE_COMMAND} "${EGIT_SOURCEDIR}" \
+		|| die "${FUNCNAME}: sync to \"${EGIT_SOURCEDIR}\" failed"
+	popd > /dev/null || die
+}
+
+# @FUNCTION: git-2_initial_clone
+# @INTERNAL
+# @DESCRIPTION:
+# Internal function running initial clone on specified repo_uri.
+git-2_initial_clone() {
+	debug-print-function ${FUNCNAME} "$@"
+
+	local repo_uri
+
+	EGIT_REPO_URI_SELECTED=""
+	for repo_uri in ${EGIT_REPO_URI}; do
+		debug-print "${FUNCNAME}: git clone ${EGIT_LOCAL_OPTIONS} \"${repo_uri}\" \"${EGIT_DIR}\""
+		if git clone ${EGIT_LOCAL_OPTIONS} "${repo_uri}" "${EGIT_DIR}"; then
+			# global variable containing the repo_name we will be using
+			debug-print "${FUNCNAME}: EGIT_REPO_URI_SELECTED=\"${repo_uri}\""
+			EGIT_REPO_URI_SELECTED="${repo_uri}"
+			break
+		fi
+	done
+
+	[[ ${EGIT_REPO_URI_SELECTED} ]] \
+		|| die "${FUNCNAME}: can't fetch from ${EGIT_REPO_URI}"
+}
+
+# @FUNCTION: git-2_update_repo
+# @INTERNAL
+# @DESCRIPTION:
+# Internal function running update command on specified repo_uri.
+git-2_update_repo() {
+	debug-print-function ${FUNCNAME} "$@"
+
+	local repo_uri
+
+	if [[ ${EGIT_LOCAL_NONBARE} ]]; then
+		# checkout master branch and drop all other local branches
+		git checkout ${EGIT_MASTER} || die "${FUNCNAME}: can't checkout master branch ${EGIT_MASTER}"
+		for x in $(git branch | grep -v "* ${EGIT_MASTER}" | tr '\n' ' '); do
+			debug-print "${FUNCNAME}: git branch -D ${x}"
+			git branch -D ${x} > /dev/null
+		done
+	fi
+
+	EGIT_REPO_URI_SELECTED=""
+	for repo_uri in ${EGIT_REPO_URI}; do
+		# git urls might change, so reset it
+		git config remote.origin.url "${repo_uri}"
+
+		debug-print "${EGIT_UPDATE_CMD}"
+		if ${EGIT_UPDATE_CMD} > /dev/null; then
+			# global variable containing the repo_name we will be using
+			debug-print "${FUNCNAME}: EGIT_REPO_URI_SELECTED=\"${repo_uri}\""
+			EGIT_REPO_URI_SELECTED="${repo_uri}"
+			break
+		fi
+	done
+
+	[[ ${EGIT_REPO_URI_SELECTED} ]] \
+		|| die "${FUNCNAME}: can't update from ${EGIT_REPO_URI}"
+}
+
+# @FUNCTION: git-2_fetch
+# @INTERNAL
+# @DESCRIPTION:
+# Internal function fetching repository from EGIT_REPO_URI and storing it in
+# specified EGIT_STORE_DIR.
+git-2_fetch() {
+	debug-print-function ${FUNCNAME} "$@"
+
+	local oldsha cursha repo_type
+
+	[[ ${EGIT_LOCAL_NONBARE} ]] && repo_type="non-bare repository" || repo_type="bare repository"
+
+	if [[ ! -d ${EGIT_DIR} ]]; then
+		git-2_initial_clone
+		pushd "${EGIT_DIR}" > /dev/null || die
+		cursha=$(git rev-parse ${UPSTREAM_BRANCH})
+		echo "GIT NEW clone -->"
+		echo "   repository:               ${EGIT_REPO_URI_SELECTED}"
+		echo "   at the commit:            ${cursha}"
+
+		popd > /dev/null || die
+	elif [[ ${EVCS_OFFLINE} ]]; then
+		pushd "${EGIT_DIR}" > /dev/null || die
+		cursha=$(git rev-parse ${UPSTREAM_BRANCH})
+		echo "GIT offline update -->"
+		echo "   repository:               $(git config remote.origin.url)"
+		echo "   at the commit:            ${cursha}"
+		popd > /dev/null || die
+	else
+		pushd "${EGIT_DIR}" > /dev/null || die
+		oldsha=$(git rev-parse ${UPSTREAM_BRANCH})
+		git-2_update_repo
+		cursha=$(git rev-parse ${UPSTREAM_BRANCH})
+
+		# fetch updates
+		echo "GIT update -->"
+		echo "   repository:               ${EGIT_REPO_URI_SELECTED}"
+		# write out message based on the revisions
+		if [[ "${oldsha}" != "${cursha}" ]]; then
+			echo "   updating from commit:     ${oldsha}"
+			echo "   to commit:                ${cursha}"
+		else
+			echo "   at the commit:            ${cursha}"
+		fi
+
+		# print nice statistic of what was changed
+		git --no-pager diff --stat ${oldsha}..${UPSTREAM_BRANCH}
+		popd > /dev/null || die
+	fi
+	# export the version the repository is at
+	export EGIT_VERSION="${cursha}"
+	# log the repo state
+	[[ ${EGIT_COMMIT} != ${EGIT_BRANCH} ]] \
+		&& echo "   commit:                   ${EGIT_COMMIT}"
+	echo "   branch:                   ${EGIT_BRANCH}"
+	echo "   storage directory:        \"${EGIT_DIR}\""
+	echo "   checkout type:            ${repo_type}"
+
+	# Cleanup after git.eclass
+	if [[ ${EGIT_OLD_CLONE} ]]; then
+		einfo "${FUNCNAME}: removing old clone in ${EGIT_OLD_CLONE}."
+		rm -rf "${EGIT_OLD_CLONE}"
+	fi
+}
+
+# @FUNCTION: git_bootstrap
+# @INTERNAL
+# @DESCRIPTION:
+# Internal function that runs bootstrap command on unpacked source.
+git-2_bootstrap() {
+	debug-print-function ${FUNCNAME} "$@"
+
+	# @ECLASS-VARIABLE: EGIT_BOOTSTRAP
+	# @DESCRIPTION:
+	# Command to be executed after checkout and clone of the specified
+	# repository.
+	# enviroment the package will fail if there is no update, thus in
+	# combination with --keep-going it would lead in not-updating
+	# pakcages that are up-to-date.
+	if [[ ${EGIT_BOOTSTRAP} ]]; then
+		pushd "${EGIT_SOURCEDIR}" > /dev/null || die
+		einfo "Starting bootstrap"
+
+		if [[ -f ${EGIT_BOOTSTRAP} ]]; then
+			# we have file in the repo which we should execute
+			debug-print "${FUNCNAME}: bootstraping with file \"${EGIT_BOOTSTRAP}\""
+
+			if [[ -x ${EGIT_BOOTSTRAP} ]]; then
+				eval "./${EGIT_BOOTSTRAP}" \
+					|| die "${FUNCNAME}: bootstrap script failed"
+			else
+				eerror "\"${EGIT_BOOTSTRAP}\" is not executable."
+				eerror "Report upstream, or bug ebuild maintainer to remove bootstrap command."
+				die "\"${EGIT_BOOTSTRAP}\" is not executable"
+			fi
+		else
+			# we execute some system command
+			debug-print "${FUNCNAME}: bootstraping with commands \"${EGIT_BOOTSTRAP}\""
+
+			eval "${EGIT_BOOTSTRAP}" \
+				|| die "${FUNCNAME}: bootstrap commands failed"
+		fi
+
+		einfo "Bootstrap finished"
+		popd > /dev/null || die
+	fi
+}
+
+# @FUNCTION: git-2_migrate_repository
+# @INTERNAL
+# @DESCRIPTION:
+# Internal function migrating between bare and normal checkout repository.
+# This is based on usage of EGIT_SUBMODULES, at least until they
+# start to work with bare checkouts sanely.
+# This function also set some global variables that differ between
+# bare and non-bare checkout.
+git-2_migrate_repository() {
+	debug-print-function ${FUNCNAME} "$@"
+
+	local bare returnstate
+
+	# first find out if we have submodules
+	# or user explicitly wants us to use non-bare clones
+	if ! [[ ${EGIT_HAS_SUBMODULES} || ${EGIT_NONBARE} ]]; then
+		bare=1
+	fi
+
+	# test if we already have some repo and if so find out if we have
+	# to migrate the data
+	if [[ -d ${EGIT_DIR} ]]; then
+		if [[ ${bare} && -d ${EGIT_DIR}/.git ]]; then
+			debug-print "${FUNCNAME}: converting \"${EGIT_DIR}\" to bare copy"
+
+			ebegin "Converting \"${EGIT_DIR}\" from non-bare to bare copy"
+			mv "${EGIT_DIR}/.git" "${EGIT_DIR}.bare"
+			export GIT_DIR="${EGIT_DIR}.bare"
+			git config core.bare true > /dev/null
+			returnstate=$?
+			unset GIT_DIR
+			rm -rf "${EGIT_DIR}"
+			mv "${EGIT_DIR}.bare" "${EGIT_DIR}"
+			eend ${returnstate}
+		elif [[ ! ${bare} && ! -d ${EGIT_DIR}/.git ]]; then
+			debug-print "${FUNCNAME}: converting \"${EGIT_DIR}\" to non-bare copy"
+
+			ebegin "Converting \"${EGIT_DIR}\" from bare to non-bare copy"
+			git clone -l "${EGIT_DIR}" "${EGIT_DIR}.nonbare" > /dev/null
+			returnstate=$?
+			rm -rf "${EGIT_DIR}"
+			mv "${EGIT_DIR}.nonbare" "${EGIT_DIR}"
+			eend ${returnstate}
+		fi
+	fi
+	if [[ ${returnstate} -ne 0 ]]; then
+		debug-print "${FUNCNAME}: converting \"${EGIT_DIR}\" failed, removing to start from scratch"
+
+		# migration failed, remove the EGIT_DIR to play it safe
+		einfo "Migration failed, removing \"${EGIT_DIR}\" to start from scratch."
+		rm -rf "${EGIT_DIR}"
+	fi
+
+	# set various options to work with both targets
+	if [[ ${bare} ]]; then
+		debug-print "${FUNCNAME}: working in bare repository for \"${EGIT_DIR}\""
+		EGIT_LOCAL_OPTIONS+="${EGIT_OPTIONS} --bare"
+		MOVE_COMMAND="git clone -l -s -n ${EGIT_DIR// /\\ }"
+		EGIT_UPDATE_CMD="git fetch -t -f -u origin ${EGIT_BRANCH}:${EGIT_BRANCH}"
+		UPSTREAM_BRANCH="${EGIT_BRANCH}"
+		EGIT_LOCAL_NONBARE=
+	else
+		debug-print "${FUNCNAME}: working in bare repository for non-bare \"${EGIT_DIR}\""
+		MOVE_COMMAND="cp -pPR ."
+		EGIT_LOCAL_OPTIONS="${EGIT_OPTIONS}"
+		EGIT_UPDATE_CMD="git pull -f -u ${EGIT_OPTIONS}"
+		UPSTREAM_BRANCH="origin/${EGIT_BRANCH}"
+		EGIT_LOCAL_NONBARE="true"
+	fi
+}
+
+# @FUNCTION: git-2_cleanup
+# @INTERNAL
+# @DESCRIPTION:
+# Internal function cleaning up all the global variables
+# that are not required after the unpack has been done.
+git-2_cleanup() {
+	debug-print-function ${FUNCNAME} "$@"
+
+	# Here we can unset only variables that are GLOBAL
+	# defined by the eclass, BUT NOT subject to change
+	# by user (like EGIT_PROJECT).
+	# If ebuild writer polutes his environment it is
+	# his problem only.
+	unset EGIT_DIR
+	unset MOVE_COMMAND
+	unset EGIT_LOCAL_OPTIONS
+	unset EGIT_UPDATE_CMD
+	unset UPSTREAM_BRANCH
+	unset EGIT_LOCAL_NONBARE
+}
+
+# @FUNCTION: git-2_src_unpack
+# @DESCRIPTION:
+# Default git src_unpack function.
+git-2_src_unpack() {
+	debug-print-function ${FUNCNAME} "$@"
+
+	git-2_init_variables
+	git-2_prepare_storedir
+	git-2_migrate_repository
+	git-2_fetch "$@"
+	git-2_gc
+	git-2_submodules
+	git-2_move_source
+	git-2_branch
+	git-2_bootstrap
+	git-2_cleanup
+	echo ">>> Unpacked to ${EGIT_SOURCEDIR}"
+
+	# Users can specify some SRC_URI and we should
+	# unpack the files too.
+	if [[ ! ${EGIT_NOUNPACK} ]]; then
+		if has ${EAPI:-0} 0 1; then
+			[[ ${A} ]] && unpack ${A}
+		else
+			default_src_unpack
+		fi
+	fi
+}


^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [gentoo-commits] proj/lisp:master commit in: eclass/
@ 2022-03-13 20:21 Ulrich Müller
  0 siblings, 0 replies; 32+ messages in thread
From: Ulrich Müller @ 2022-03-13 20:21 UTC (permalink / raw
  To: gentoo-commits

commit:     8e38919f0b289cbc0e58ecd633a07f3efb60e6f9
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Sun Mar 13 20:07:31 2022 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Sun Mar 13 20:07:31 2022 +0000
URL:        https://gitweb.gentoo.org/proj/lisp.git/commit/?id=8e38919f

eclass: Remove unused eclasses

Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>

 eclass/eggs-svn.eclass   |  41 ----
 eclass/eggs.eclass       | 176 --------------
 eclass/git-2.eclass      | 610 -----------------------------------------------
 eclass/subversion.eclass | 551 ------------------------------------------
 4 files changed, 1378 deletions(-)

diff --git a/eclass/eggs-svn.eclass b/eclass/eggs-svn.eclass
deleted file mode 100644
index abeb83b8..00000000
--- a/eclass/eggs-svn.eclass
+++ /dev/null
@@ -1,41 +0,0 @@
-# Copyright 1999-2010 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: $
-#
-# Copyright 2008 Leonardo Valeri Manera <l.valerimanera@gmail.com>
-#
-# @ECLASS: eggs-svn.eclass
-# @MAINTAINER:
-# @BLURB: Eclass for Chicken-Scheme SVN Egg packages
-# @DESCRIPTION:
-#
-# This eclass provides generalized functions to compile, test and
-# install eggs, as well as setting a number of variables to default
-# or autogenerated values.
-
-inherit eggs subversion
-
-SRC_URI=""
-if [[ -n ${NON_TRUNK} ]]; then
-	ESVN_REPO_URI="http://galinha.ucpel.tche.br/svn/chicken-eggs/release/3/${EGG_NAME}"
-else
-	ESVN_REPO_URI="http://galinha.ucpel.tche.br/svn/chicken-eggs/release/3/${EGG_NAME}/trunk"
-fi
-ESVN_OPTIONS="--username=anonymous --password= --non-interactive"
-
-eggs-svn-doc_maker() {
-	true
-}
-
-eggs-svn_src_unpack() {
-	mkdir "${S}"
-	cd "${S}"
-	subversion_fetch || die
-}
-
-eggs-svn_src_compile() {
-	eggs-svn-doc_maker
-	eggs_src_compile
-}
-
-EXPORT_FUNCTIONS src_unpack src_compile

diff --git a/eclass/eggs.eclass b/eclass/eggs.eclass
deleted file mode 100644
index 5dff371d..00000000
--- a/eclass/eggs.eclass
+++ /dev/null
@@ -1,176 +0,0 @@
-# Copyright 1999-2010 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: $
-#
-# Copyright 2008 Leonardo Valeri Manera <l.valerimanera@gmail.com>
-#
-# @ECLASS: eggs.eclass
-# @MAINTAINER:
-# @BLURB: Eclass for Chicken-Scheme Egg packages
-# @DESCRIPTION:
-#
-# This eclass provides generalized functions to compile, test and
-# install eggs, as well as setting a number of variables to default
-# or autogenerated values.
-
-# @ECLASS-VARIABLE: NEED_CHICKEN
-# @DESCRIPTION:
-# If you need anything different from chicken 3.0.5, use the
-# NEED_CHICKEN variable before inheriting elisp.eclass.  Set it to the
-# major version the egg needs and the dependency will be adjusted.
-
-# @ECLASS-VARIABLE: EGG_TESTABLE
-# @DESCRIPTION:
-# Enables egg test-phase if set to 'yes'.
-
-# @ECLASS-VARIABLE: EGG_NAME
-# @DESCRIPTION:
-# Override egg name autogeneration by settting this before importing
-# this eclass.
-
-RESTRICT="primaryuri"
-
-inherit flag-o-matic
-
-VERSION="${NEED_CHICKEN:-3.1.0}"
-DEPEND=">=dev-scheme/chicken-${VERSION}"
-RDEPEND=">=dev-scheme/chicken-${VERSION}"
-SLOT="0"
-IUSE=""
-
-case ${PN} in
-	srfi*)
-		EGG_NAME=${PN/#srfi/srfi-}
-		;;
-	*)
-		EGG_NAME=${EGG_NAME:-${PN}}
-		;;
-esac
-
-EGGDOC_DIR="/usr/share/doc/chicken-eggs/${PN}"
-
-SRC_URI="http://cleo.uwindsor.ca/cgi-bin/gentoo-eggs/${EGG_NAME}-3-${PV}.tar.gz"
-
-if [[ -n "${OLD_EGGPAGE}" ]]; then
-	HOMEPAGE="http://www.call-with-current-continuation.org/eggs/${EGG_NAME}"
-else
-	HOMEPAGE="http://chicken.wiki.br/${EGG_NAME}"
-fi
-
-# @FUNCTION: eggs-install_binaries
-# @USAGE:
-# @DESCRIPTION:
-# INstall egg binaries/scripts/wrappers into /usr/bin
-eggs-install_binaries() {
-	if [[ -d "${S}/install/${PROGRAM_PATH}" ]]; then
-		pushd "${S}/install/${PROGRAM_PATH}" >/dev/null
-		local file
-		for file in $(ls); do
-			einfo "  => /usr/bin/${file}"
-			dobin "${file}" || die "failed installing ${file}"
-			eend $?
-		done
-		popd >/dev/null
-	fi
-}
-
-# @FUNCTION: eggs-install_files
-# @USAGE:
-# @DESCRIPTION:
-# Install egg files into the correct locations.
-eggs-install_files() {
-	local destination=${1:-${CHICKEN_REPOSITORY}}
-	local real_destination
-	local file
-	for file in $(ls); do
-		case "${file}" in
-			*.html|*.css)
-				# Hackish, but working, way of displaying real destinations
-				# in info messages. Feel free to improve on it.
-				real_destination=${EGGDOC_DIR}
-				insinto "${EGGDOC_DIR}"
-				insopts -m644
-				;;
-			*.so)
-				real_destination=${destination}
-				insinto "${destination}"
-				insopts -m755
-				;;
-			*)
-				real_destination=${destination}
-				insinto "${destination}"
-				insopts -m644
-				;;
-		esac
-		if [[ -d "${file}" ]];then
-			# To iterate is human, to recurse, divine.
-			( cd "${file}"; eggs-install_files "${destination}/${file}" )
-		else
-			einfo "  => ${real_destination}/${file}"
-			doins "${file}" || die "failed installing ${file}"
-			eend $?
-		fi
-	done
-}
-
-# @FUNCTION: eggs-set_paths
-# @USAGE:
-# @DESCRIPTION:
-# Modify the .setup-info file(s) to reflect true documentation
-# installation paths.
-eggs-set_paths() {
-	ebegin "Processing setup files"
-	for setup_file in $(ls *.setup-info); do
-		einfo "  ${setup_file}"
-		sed -e "s:${PROGRAM_PATH}:/usr/bin:g" \
-			-e "s:${CHICKEN_REPOSITORY}/\(.*\).html:${EGGDOC_DIR}/\1.html:g" \
-			-i "${setup_file}" || die "failed processing ${setup_file}"
-		eend $?
-	done
-	einfo "Done processing setup files."
-}
-
-#
-# Ebuild function redefintions
-#
-
-eggs_src_unpack() {
-	mkdir "${S}"
-	cd "${S}"
-	unpack "${A}" || die
-}
-
-eggs_src_compile() {
-	strip-flags || die
-	filter-ldflags -Wl,--as-needed
-	CSC_OPTIONS="-C '$CFLAGS $LDFLAGS'"
-
-	CHICKEN_SETUP_OPTIONS="-v -k -build-prefix ${S}/build -install-prefix ${S}/install"
-
-	chicken-setup ${CHICKEN_SETUP_OPTIONS} || die "egg compilation failed"
-}
-
-eggs_src_test() {
-	if [[ "${EGG_TESTABLE}" == "yes" ]]; then
-		chicken-setup -n -t ${CHICKEN_SETUP_OPTIONS} || die "egg test phase failed"
-	fi
-}
-
-eggs_src_install() {
-	CHICKEN_REPOSITORY=$(chicken-setup -R) || die
-	PROGRAM_PATH=$(chicken-setup -P) || die
-
-	pushd "${S}/install/${CHICKEN_REPOSITORY}" >/dev/null
-
-	[[ -f index.html ]] && rm index.html
-	eggs-set_paths
-
-	ebegin "Installing files"
-	eggs-install_binaries
-	eggs-install_files
-	einfo "Done with installation."
-
-	popd >/dev/null
-}
-
-EXPORT_FUNCTIONS src_unpack src_compile src_test src_install

diff --git a/eclass/git-2.eclass b/eclass/git-2.eclass
deleted file mode 100644
index 91716329..00000000
--- a/eclass/git-2.eclass
+++ /dev/null
@@ -1,610 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-# @ECLASS: git-2.eclass
-# @MAINTAINER:
-# maintainer-needed@gentoo.org
-# @SUPPORTED_EAPIS: 0 1 2 3 4 5
-# @BLURB: Eclass for fetching and unpacking git repositories.
-# @DESCRIPTION:
-# Eclass for easing maintenance of live ebuilds using git as remote repository.
-# Eclass support working with git submodules and branching.
-#
-# This eclass is DEPRECATED. Please use git-r3 instead.
-
-case ${EAPI:-0} in
-	0|1|2|3|4|5) ;;
-	*) die "${ECLASS}.eclass is banned in EAPI ${EAPI}";;
-esac
-
-# This eclass support all EAPIs.
-EXPORT_FUNCTIONS src_unpack
-
-PROPERTIES+=" live"
-
-DEPEND="dev-vcs/git"
-
-# @ECLASS-VARIABLE: EGIT_SOURCEDIR
-# @DESCRIPTION:
-# This variable specifies destination where the cloned
-# data are copied to.
-#
-# EGIT_SOURCEDIR="${S}"
-
-# @ECLASS-VARIABLE: EGIT_STORE_DIR
-# @DESCRIPTION:
-# Storage directory for git sources.
-#
-# EGIT_STORE_DIR="${DISTDIR}/egit-src"
-
-# @ECLASS-VARIABLE: EGIT_HAS_SUBMODULES
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# If non-empty this variable enables support for git submodules in our
-# checkout. Also this makes the checkout to be non-bare for now.
-
-# @ECLASS-VARIABLE: EGIT_OPTIONS
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# Variable specifying additional options for fetch command.
-
-# @ECLASS-VARIABLE: EGIT_MASTER
-# @DESCRIPTION:
-# Variable for specifying master branch.
-# Useful when upstream don't have master branch or name it differently.
-#
-# EGIT_MASTER="master"
-
-# @ECLASS-VARIABLE: EGIT_PROJECT
-# @DESCRIPTION:
-# Variable specifying name for the folder where we check out the git
-# repository. Value of this variable should be unique in the
-# EGIT_STORE_DIR as otherwise you would override another repository.
-#
-# EGIT_PROJECT="${EGIT_REPO_URI##*/}"
-
-# @ECLASS-VARIABLE: EGIT_DIR
-# @DESCRIPTION:
-# Directory where we want to store the git data.
-# This variable should not be overridden.
-#
-# EGIT_DIR="${EGIT_STORE_DIR}/${EGIT_PROJECT}"
-
-# @ECLASS-VARIABLE: EGIT_REPO_URI
-# @REQUIRED
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# URI for the repository
-# e.g. http://foo, git://bar
-#
-# It can be overridden via env using packagename_LIVE_REPO
-# variable.
-#
-# Support multiple values:
-# EGIT_REPO_URI="git://a/b.git http://c/d.git"
-
-# @ECLASS-VARIABLE: EVCS_OFFLINE
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# If non-empty this variable prevents performance of any online
-# operations.
-
-# @ECLASS-VARIABLE: EGIT_BRANCH
-# @DESCRIPTION:
-# Variable containing branch name we want to check out.
-# It can be overridden via env using packagename_LIVE_BRANCH
-# variable.
-#
-# EGIT_BRANCH="${EGIT_MASTER}"
-
-# @ECLASS-VARIABLE: EGIT_COMMIT
-# @DESCRIPTION:
-# Variable containing commit hash/tag we want to check out.
-# It can be overridden via env using packagename_LIVE_COMMIT
-# variable.
-#
-# EGIT_COMMIT="${EGIT_BRANCH}"
-
-# @ECLASS-VARIABLE: EGIT_REPACK
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# If non-empty this variable specifies that repository will be repacked to
-# save space. However this can take a REALLY LONG time with VERY big
-# repositories.
-
-# @ECLASS-VARIABLE: EGIT_PRUNE
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# If non-empty this variable enables pruning all loose objects on each fetch.
-# This is useful if upstream rewinds and rebases branches often.
-
-# @ECLASS-VARIABLE: EGIT_NONBARE
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# If non-empty this variable specifies that all checkouts will be done using
-# non bare repositories. This is useful if you can't operate with bare
-# checkouts for some reason.
-
-# @ECLASS-VARIABLE: EGIT_NOUNPACK
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# If non-empty this variable bans unpacking of ${A} content into the srcdir.
-# Default behavior is to unpack ${A} content.
-
-# @FUNCTION: git-2_init_variables
-# @INTERNAL
-# @DESCRIPTION:
-# Internal function initializing all git variables.
-# We define it in function scope so user can define
-# all the variables before and after inherit.
-git-2_init_variables() {
-	debug-print-function ${FUNCNAME} "$@"
-
-	local esc_pn liverepo livebranch livecommit
-	esc_pn=${PN//[-+]/_}
-
-	: ${EGIT_SOURCEDIR="${S}"}
-
-	: ${EGIT_STORE_DIR:="${PORTAGE_ACTUAL_DISTDIR-${DISTDIR}}/egit-src"}
-
-	: ${EGIT_HAS_SUBMODULES:=}
-
-	: ${EGIT_OPTIONS:=}
-
-	: ${EGIT_MASTER:=master}
-
-	liverepo=${esc_pn}_LIVE_REPO
-	EGIT_REPO_URI=${!liverepo:-${EGIT_REPO_URI}}
-	[[ ${EGIT_REPO_URI} ]] || die "EGIT_REPO_URI must have some value"
-
-	: ${EVCS_OFFLINE:=}
-
-	livebranch=${esc_pn}_LIVE_BRANCH
-	[[ ${!livebranch} ]] && ewarn "QA: using \"${esc_pn}_LIVE_BRANCH\" variable, you won't get any support"
-	EGIT_BRANCH=${!livebranch:-${EGIT_BRANCH:-${EGIT_MASTER}}}
-
-	livecommit=${esc_pn}_LIVE_COMMIT
-	[[ ${!livecommit} ]] && ewarn "QA: using \"${esc_pn}_LIVE_COMMIT\" variable, you won't get any support"
-	EGIT_COMMIT=${!livecommit:-${EGIT_COMMIT:-${EGIT_BRANCH}}}
-
-	: ${EGIT_REPACK:=}
-
-	: ${EGIT_PRUNE:=}
-}
-
-# @FUNCTION: git-2_submodules
-# @INTERNAL
-# @DESCRIPTION:
-# Internal function wrapping the submodule initialisation and update.
-git-2_submodules() {
-	debug-print-function ${FUNCNAME} "$@"
-	if [[ ${EGIT_HAS_SUBMODULES} ]]; then
-		if [[ ${EVCS_OFFLINE} ]]; then
-			# for submodules operations we need to be online
-			debug-print "${FUNCNAME}: not updating submodules in offline mode"
-			return 1
-		fi
-
-		debug-print "${FUNCNAME}: working in \"${1}\""
-		pushd "${EGIT_DIR}" > /dev/null || die
-
-		debug-print "${FUNCNAME}: git submodule init"
-		git submodule init || die
-		debug-print "${FUNCNAME}: git submodule sync"
-		git submodule sync || die
-		debug-print "${FUNCNAME}: git submodule update"
-		git submodule update || die
-
-		popd > /dev/null || die
-	fi
-}
-
-# @FUNCTION: git-2_branch
-# @INTERNAL
-# @DESCRIPTION:
-# Internal function that changes branch for the repo based on EGIT_COMMIT and
-# EGIT_BRANCH variables.
-git-2_branch() {
-	debug-print-function ${FUNCNAME} "$@"
-
-	local branchname src
-
-	debug-print "${FUNCNAME}: working in \"${EGIT_SOURCEDIR}\""
-	pushd "${EGIT_SOURCEDIR}" > /dev/null || die
-
-	local branchname=branch-${EGIT_BRANCH} src=origin/${EGIT_BRANCH}
-	if [[ ${EGIT_COMMIT} != ${EGIT_BRANCH} ]]; then
-		branchname=tree-${EGIT_COMMIT}
-		src=${EGIT_COMMIT}
-	fi
-	debug-print "${FUNCNAME}: git checkout -b ${branchname} ${src}"
-	git checkout -b ${branchname} ${src} \
-		|| die "${FUNCNAME}: changing the branch failed"
-
-	popd > /dev/null || die
-}
-
-# @FUNCTION: git-2_gc
-# @INTERNAL
-# @DESCRIPTION:
-# Internal function running garbage collector on checked out tree.
-git-2_gc() {
-	debug-print-function ${FUNCNAME} "$@"
-
-	local args
-
-	if [[ ${EGIT_REPACK} || ${EGIT_PRUNE} ]]; then
-		pushd "${EGIT_DIR}" > /dev/null || die
-		ebegin "Garbage collecting the repository"
-		[[ ${EGIT_PRUNE} ]] && args='--prune'
-		debug-print "${FUNCNAME}: git gc ${args}"
-		git gc ${args}
-		eend $?
-		popd > /dev/null || die
-	fi
-}
-
-# @FUNCTION: git-2_prepare_storedir
-# @INTERNAL
-# @DESCRIPTION:
-# Internal function preparing directory where we are going to store SCM
-# repository.
-git-2_prepare_storedir() {
-	debug-print-function ${FUNCNAME} "$@"
-
-	local clone_dir
-
-	# initial clone, we have to create master git storage directory and play
-	# nicely with sandbox
-	if [[ ! -d ${EGIT_STORE_DIR} ]]; then
-		debug-print "${FUNCNAME}: Creating git main storage directory"
-		addwrite /
-		mkdir -m 775 -p "${EGIT_STORE_DIR}" \
-			|| die "${FUNCNAME}: can't mkdir \"${EGIT_STORE_DIR}\""
-	fi
-
-	# allow writing into EGIT_STORE_DIR
-	addwrite "${EGIT_STORE_DIR}"
-
-	# calculate git.eclass store dir for data
-	# We will try to clone the old repository,
-	# and we will remove it if we don't need it anymore.
-	EGIT_OLD_CLONE=
-	if [[ ${EGIT_STORE_DIR} == */egit-src ]]; then
-		local old_store_dir=${EGIT_STORE_DIR/%egit-src/git-src}
-		local old_location=${old_store_dir}/${EGIT_PROJECT:-${PN}}
-
-		if [[ -d ${old_location} ]]; then
-			EGIT_OLD_CLONE=${old_location}
-			# required to remove the old clone
-			addwrite "${old_store_dir}"
-		fi
-	fi
-
-	# calculate the proper store dir for data
-	# If user didn't specify the EGIT_DIR, we check if he did specify
-	# the EGIT_PROJECT or get the folder name from EGIT_REPO_URI.
-	EGIT_REPO_URI=${EGIT_REPO_URI%/}
-	if [[ ! ${EGIT_DIR} ]]; then
-		if [[ ${EGIT_PROJECT} ]]; then
-			clone_dir=${EGIT_PROJECT}
-		else
-			local strippeduri=${EGIT_REPO_URI%/.git}
-			clone_dir=${strippeduri##*/}
-		fi
-		EGIT_DIR=${EGIT_STORE_DIR}/${clone_dir}
-
-		if [[ ${EGIT_OLD_CLONE} && ! -d ${EGIT_DIR} ]]; then
-			elog "${FUNCNAME}: ${CATEGORY}/${PF} will be cloned from old location."
-			elog "It will be necessary to rebuild the package to fetch updates."
-			EGIT_REPO_URI="${EGIT_OLD_CLONE} ${EGIT_REPO_URI}"
-		fi
-	fi
-	export EGIT_DIR=${EGIT_DIR}
-	debug-print "${FUNCNAME}: Storing the repo into \"${EGIT_DIR}\"."
-}
-
-# @FUNCTION: git-2_move_source
-# @INTERNAL
-# @DESCRIPTION:
-# Internal function moving sources from the EGIT_DIR to EGIT_SOURCEDIR dir.
-git-2_move_source() {
-	debug-print-function ${FUNCNAME} "$@"
-
-	debug-print "${FUNCNAME}: ${MOVE_COMMAND} \"${EGIT_DIR}\" \"${EGIT_SOURCEDIR}\""
-	pushd "${EGIT_DIR}" > /dev/null || die
-	mkdir -p "${EGIT_SOURCEDIR}" \
-		|| die "${FUNCNAME}: failed to create ${EGIT_SOURCEDIR}"
-	${MOVE_COMMAND} "${EGIT_SOURCEDIR}" \
-		|| die "${FUNCNAME}: sync to \"${EGIT_SOURCEDIR}\" failed"
-	popd > /dev/null || die
-}
-
-# @FUNCTION: git-2_initial_clone
-# @INTERNAL
-# @DESCRIPTION:
-# Internal function running initial clone on specified repo_uri.
-git-2_initial_clone() {
-	debug-print-function ${FUNCNAME} "$@"
-
-	local repo_uri
-
-	EGIT_REPO_URI_SELECTED=""
-	for repo_uri in ${EGIT_REPO_URI}; do
-		debug-print "${FUNCNAME}: git clone ${EGIT_LOCAL_OPTIONS} \"${repo_uri}\" \"${EGIT_DIR}\""
-		if git clone ${EGIT_LOCAL_OPTIONS} "${repo_uri}" "${EGIT_DIR}"; then
-			# global variable containing the repo_name we will be using
-			debug-print "${FUNCNAME}: EGIT_REPO_URI_SELECTED=\"${repo_uri}\""
-			EGIT_REPO_URI_SELECTED="${repo_uri}"
-			break
-		fi
-	done
-
-	[[ ${EGIT_REPO_URI_SELECTED} ]] \
-		|| die "${FUNCNAME}: can't fetch from ${EGIT_REPO_URI}"
-}
-
-# @FUNCTION: git-2_update_repo
-# @INTERNAL
-# @DESCRIPTION:
-# Internal function running update command on specified repo_uri.
-git-2_update_repo() {
-	debug-print-function ${FUNCNAME} "$@"
-
-	local repo_uri
-
-	if [[ ${EGIT_LOCAL_NONBARE} ]]; then
-		# checkout master branch and drop all other local branches
-		git checkout ${EGIT_MASTER} || die "${FUNCNAME}: can't checkout master branch ${EGIT_MASTER}"
-		for x in $(git branch | grep -v "* ${EGIT_MASTER}" | tr '\n' ' '); do
-			debug-print "${FUNCNAME}: git branch -D ${x}"
-			git branch -D ${x} > /dev/null
-		done
-	fi
-
-	EGIT_REPO_URI_SELECTED=""
-	for repo_uri in ${EGIT_REPO_URI}; do
-		# git urls might change, so reset it
-		git config remote.origin.url "${repo_uri}"
-
-		debug-print "${EGIT_UPDATE_CMD}"
-		if ${EGIT_UPDATE_CMD} > /dev/null; then
-			# global variable containing the repo_name we will be using
-			debug-print "${FUNCNAME}: EGIT_REPO_URI_SELECTED=\"${repo_uri}\""
-			EGIT_REPO_URI_SELECTED="${repo_uri}"
-			break
-		fi
-	done
-
-	[[ ${EGIT_REPO_URI_SELECTED} ]] \
-		|| die "${FUNCNAME}: can't update from ${EGIT_REPO_URI}"
-}
-
-# @FUNCTION: git-2_fetch
-# @INTERNAL
-# @DESCRIPTION:
-# Internal function fetching repository from EGIT_REPO_URI and storing it in
-# specified EGIT_STORE_DIR.
-git-2_fetch() {
-	debug-print-function ${FUNCNAME} "$@"
-
-	local oldsha cursha repo_type
-
-	[[ ${EGIT_LOCAL_NONBARE} ]] && repo_type="non-bare repository" || repo_type="bare repository"
-
-	if [[ ! -d ${EGIT_DIR} ]]; then
-		git-2_initial_clone
-		pushd "${EGIT_DIR}" > /dev/null || die
-		cursha=$(git rev-parse ${UPSTREAM_BRANCH})
-		echo "GIT NEW clone -->"
-		echo "   repository:               ${EGIT_REPO_URI_SELECTED}"
-		echo "   at the commit:            ${cursha}"
-
-		popd > /dev/null || die
-	elif [[ ${EVCS_OFFLINE} ]]; then
-		pushd "${EGIT_DIR}" > /dev/null || die
-		cursha=$(git rev-parse ${UPSTREAM_BRANCH})
-		echo "GIT offline update -->"
-		echo "   repository:               $(git config remote.origin.url)"
-		echo "   at the commit:            ${cursha}"
-		popd > /dev/null || die
-	else
-		pushd "${EGIT_DIR}" > /dev/null || die
-		oldsha=$(git rev-parse ${UPSTREAM_BRANCH})
-		git-2_update_repo
-		cursha=$(git rev-parse ${UPSTREAM_BRANCH})
-
-		# fetch updates
-		echo "GIT update -->"
-		echo "   repository:               ${EGIT_REPO_URI_SELECTED}"
-		# write out message based on the revisions
-		if [[ "${oldsha}" != "${cursha}" ]]; then
-			echo "   updating from commit:     ${oldsha}"
-			echo "   to commit:                ${cursha}"
-		else
-			echo "   at the commit:            ${cursha}"
-		fi
-
-		# print nice statistic of what was changed
-		git --no-pager diff --stat ${oldsha}..${UPSTREAM_BRANCH}
-		popd > /dev/null || die
-	fi
-	# export the version the repository is at
-	export EGIT_VERSION="${cursha}"
-	# log the repo state
-	[[ ${EGIT_COMMIT} != ${EGIT_BRANCH} ]] \
-		&& echo "   commit:                   ${EGIT_COMMIT}"
-	echo "   branch:                   ${EGIT_BRANCH}"
-	echo "   storage directory:        \"${EGIT_DIR}\""
-	echo "   checkout type:            ${repo_type}"
-
-	# Cleanup after git.eclass
-	if [[ ${EGIT_OLD_CLONE} ]]; then
-		einfo "${FUNCNAME}: removing old clone in ${EGIT_OLD_CLONE}."
-		rm -rf "${EGIT_OLD_CLONE}"
-	fi
-}
-
-# @FUNCTION: git_bootstrap
-# @INTERNAL
-# @DESCRIPTION:
-# Internal function that runs bootstrap command on unpacked source.
-git-2_bootstrap() {
-	debug-print-function ${FUNCNAME} "$@"
-
-	# @ECLASS-VARIABLE: EGIT_BOOTSTRAP
-	# @DESCRIPTION:
-	# Command to be executed after checkout and clone of the specified
-	# repository.
-	# enviroment the package will fail if there is no update, thus in
-	# combination with --keep-going it would lead in not-updating
-	# pakcages that are up-to-date.
-	if [[ ${EGIT_BOOTSTRAP} ]]; then
-		pushd "${EGIT_SOURCEDIR}" > /dev/null || die
-		einfo "Starting bootstrap"
-
-		if [[ -f ${EGIT_BOOTSTRAP} ]]; then
-			# we have file in the repo which we should execute
-			debug-print "${FUNCNAME}: bootstraping with file \"${EGIT_BOOTSTRAP}\""
-
-			if [[ -x ${EGIT_BOOTSTRAP} ]]; then
-				eval "./${EGIT_BOOTSTRAP}" \
-					|| die "${FUNCNAME}: bootstrap script failed"
-			else
-				eerror "\"${EGIT_BOOTSTRAP}\" is not executable."
-				eerror "Report upstream, or bug ebuild maintainer to remove bootstrap command."
-				die "\"${EGIT_BOOTSTRAP}\" is not executable"
-			fi
-		else
-			# we execute some system command
-			debug-print "${FUNCNAME}: bootstraping with commands \"${EGIT_BOOTSTRAP}\""
-
-			eval "${EGIT_BOOTSTRAP}" \
-				|| die "${FUNCNAME}: bootstrap commands failed"
-		fi
-
-		einfo "Bootstrap finished"
-		popd > /dev/null || die
-	fi
-}
-
-# @FUNCTION: git-2_migrate_repository
-# @INTERNAL
-# @DESCRIPTION:
-# Internal function migrating between bare and normal checkout repository.
-# This is based on usage of EGIT_SUBMODULES, at least until they
-# start to work with bare checkouts sanely.
-# This function also set some global variables that differ between
-# bare and non-bare checkout.
-git-2_migrate_repository() {
-	debug-print-function ${FUNCNAME} "$@"
-
-	local bare returnstate
-
-	# first find out if we have submodules
-	# or user explicitly wants us to use non-bare clones
-	if ! [[ ${EGIT_HAS_SUBMODULES} || ${EGIT_NONBARE} ]]; then
-		bare=1
-	fi
-
-	# test if we already have some repo and if so find out if we have
-	# to migrate the data
-	if [[ -d ${EGIT_DIR} ]]; then
-		if [[ ${bare} && -d ${EGIT_DIR}/.git ]]; then
-			debug-print "${FUNCNAME}: converting \"${EGIT_DIR}\" to bare copy"
-
-			ebegin "Converting \"${EGIT_DIR}\" from non-bare to bare copy"
-			mv "${EGIT_DIR}/.git" "${EGIT_DIR}.bare"
-			export GIT_DIR="${EGIT_DIR}.bare"
-			git config core.bare true > /dev/null
-			returnstate=$?
-			unset GIT_DIR
-			rm -rf "${EGIT_DIR}"
-			mv "${EGIT_DIR}.bare" "${EGIT_DIR}"
-			eend ${returnstate}
-		elif [[ ! ${bare} && ! -d ${EGIT_DIR}/.git ]]; then
-			debug-print "${FUNCNAME}: converting \"${EGIT_DIR}\" to non-bare copy"
-
-			ebegin "Converting \"${EGIT_DIR}\" from bare to non-bare copy"
-			git clone -l "${EGIT_DIR}" "${EGIT_DIR}.nonbare" > /dev/null
-			returnstate=$?
-			rm -rf "${EGIT_DIR}"
-			mv "${EGIT_DIR}.nonbare" "${EGIT_DIR}"
-			eend ${returnstate}
-		fi
-	fi
-	if [[ ${returnstate} -ne 0 ]]; then
-		debug-print "${FUNCNAME}: converting \"${EGIT_DIR}\" failed, removing to start from scratch"
-
-		# migration failed, remove the EGIT_DIR to play it safe
-		einfo "Migration failed, removing \"${EGIT_DIR}\" to start from scratch."
-		rm -rf "${EGIT_DIR}"
-	fi
-
-	# set various options to work with both targets
-	if [[ ${bare} ]]; then
-		debug-print "${FUNCNAME}: working in bare repository for \"${EGIT_DIR}\""
-		EGIT_LOCAL_OPTIONS+="${EGIT_OPTIONS} --bare"
-		MOVE_COMMAND="git clone -l -s -n ${EGIT_DIR// /\\ }"
-		EGIT_UPDATE_CMD="git fetch -t -f -u origin ${EGIT_BRANCH}:${EGIT_BRANCH}"
-		UPSTREAM_BRANCH="${EGIT_BRANCH}"
-		EGIT_LOCAL_NONBARE=
-	else
-		debug-print "${FUNCNAME}: working in bare repository for non-bare \"${EGIT_DIR}\""
-		MOVE_COMMAND="cp -pPR ."
-		EGIT_LOCAL_OPTIONS="${EGIT_OPTIONS}"
-		EGIT_UPDATE_CMD="git pull -f -u ${EGIT_OPTIONS}"
-		UPSTREAM_BRANCH="origin/${EGIT_BRANCH}"
-		EGIT_LOCAL_NONBARE="true"
-	fi
-}
-
-# @FUNCTION: git-2_cleanup
-# @INTERNAL
-# @DESCRIPTION:
-# Internal function cleaning up all the global variables
-# that are not required after the unpack has been done.
-git-2_cleanup() {
-	debug-print-function ${FUNCNAME} "$@"
-
-	# Here we can unset only variables that are GLOBAL
-	# defined by the eclass, BUT NOT subject to change
-	# by user (like EGIT_PROJECT).
-	# If ebuild writer polutes his environment it is
-	# his problem only.
-	unset EGIT_DIR
-	unset MOVE_COMMAND
-	unset EGIT_LOCAL_OPTIONS
-	unset EGIT_UPDATE_CMD
-	unset UPSTREAM_BRANCH
-	unset EGIT_LOCAL_NONBARE
-}
-
-# @FUNCTION: git-2_src_unpack
-# @DESCRIPTION:
-# Default git src_unpack function.
-git-2_src_unpack() {
-	debug-print-function ${FUNCNAME} "$@"
-
-	git-2_init_variables
-	git-2_prepare_storedir
-	git-2_migrate_repository
-	git-2_fetch "$@"
-	git-2_gc
-	git-2_submodules
-	git-2_move_source
-	git-2_branch
-	git-2_bootstrap
-	git-2_cleanup
-	echo ">>> Unpacked to ${EGIT_SOURCEDIR}"
-
-	# Users can specify some SRC_URI and we should
-	# unpack the files too.
-	if [[ ! ${EGIT_NOUNPACK} ]]; then
-		if has ${EAPI:-0} 0 1; then
-			[[ ${A} ]] && unpack ${A}
-		else
-			default_src_unpack
-		fi
-	fi
-}

diff --git a/eclass/subversion.eclass b/eclass/subversion.eclass
deleted file mode 100644
index 4d5f8677..00000000
--- a/eclass/subversion.eclass
+++ /dev/null
@@ -1,551 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-# @ECLASS: subversion.eclass
-# @MAINTAINER:
-# Akinori Hattori <hattya@gentoo.org>
-# @AUTHOR:
-# Original Author: Akinori Hattori <hattya@gentoo.org>
-# @SUPPORTED_EAPIS: 0 1 2 3 4 5 6 7
-# @BLURB: Fetch software sources from subversion repositories
-# @DESCRIPTION:
-# The subversion eclass provides functions to fetch, patch and bootstrap
-# software sources from subversion repositories.
-
-ESVN="${ECLASS}"
-
-case ${EAPI:-0} in
-	0|1)
-		inherit eutils
-		EXPORT_FUNCTIONS src_unpack pkg_preinst
-		;;
-	2|3|4|5)
-		inherit eutils
-		EXPORT_FUNCTIONS src_unpack src_prepare pkg_preinst
-		;;
-	6|7)
-		inherit estack
-		EXPORT_FUNCTIONS src_unpack pkg_preinst
-		;;
-	*)
-		die "${ESVN}: EAPI ${EAPI:-0} is not supported"
-		;;
-esac
-
-PROPERTIES+=" live"
-
-case ${EAPI:-0} in
-	0|1) DEPEND="dev-vcs/subversion" ;;
-	*)   DEPEND="|| ( dev-vcs/subversion[http]
-				dev-vcs/subversion[webdav-neon]
-				dev-vcs/subversion[webdav-serf]	)" ;;
-esac
-DEPEND+=" net-misc/rsync"
-
-case ${EAPI} in
-	0|1|2|3|4|5|6) ;;
-	*) BDEPEND="${DEPEND}"; DEPEND="" ;;
-esac
-
-# @ECLASS-VARIABLE: ESVN_STORE_DIR
-# @DESCRIPTION:
-# subversion sources store directory. Users may override this in /etc/portage/make.conf
-[[ -z ${ESVN_STORE_DIR} ]] && ESVN_STORE_DIR="${PORTAGE_ACTUAL_DISTDIR:-${DISTDIR}}/svn-src"
-
-# @ECLASS-VARIABLE: ESVN_FETCH_CMD
-# @DESCRIPTION:
-# subversion checkout command
-ESVN_FETCH_CMD="svn checkout"
-
-# @ECLASS-VARIABLE: ESVN_UPDATE_CMD
-# @DESCRIPTION:
-# subversion update command
-ESVN_UPDATE_CMD="svn update"
-
-# @ECLASS-VARIABLE: ESVN_SWITCH_CMD
-# @DESCRIPTION:
-# subversion switch command
-ESVN_SWITCH_CMD="svn switch"
-
-# @ECLASS-VARIABLE: ESVN_OPTIONS
-# @DESCRIPTION:
-# the options passed to checkout or update. If you want a specific revision see
-# ESVN_REPO_URI instead of using -rREV.
-ESVN_OPTIONS="${ESVN_OPTIONS:-}"
-
-# @ECLASS-VARIABLE: ESVN_REPO_URI
-# @DESCRIPTION:
-# repository uri
-#
-# e.g. http://foo/trunk, svn://bar/trunk, svn://bar/branch/foo@1234
-#
-# supported URI schemes:
-#   http://
-#   https://
-#   svn://
-#   svn+ssh://
-#   file://
-#
-# to peg to a specific revision, append @REV to the repo's uri
-ESVN_REPO_URI="${ESVN_REPO_URI:-}"
-
-# @ECLASS-VARIABLE: ESVN_REVISION
-# @DESCRIPTION:
-# User configurable revision checkout or update to from the repository
-#
-# Useful for live svn or trunk svn ebuilds allowing the user to peg
-# to a specific revision
-#
-# Note: This should never be set in an ebuild!
-ESVN_REVISION="${ESVN_REVISION:-}"
-
-# @ECLASS-VARIABLE: ESVN_USER
-# @DESCRIPTION:
-# User name
-ESVN_USER="${ESVN_USER:-}"
-
-# @ECLASS-VARIABLE: ESVN_PASSWORD
-# @DESCRIPTION:
-# Password
-ESVN_PASSWORD="${ESVN_PASSWORD:-}"
-
-# @ECLASS-VARIABLE: ESVN_PROJECT
-# @DESCRIPTION:
-# project name of your ebuild (= name space)
-#
-# subversion eclass will check out the subversion repository like:
-#
-#   ${ESVN_STORE_DIR}/${ESVN_PROJECT}/${ESVN_REPO_URI##*/}
-#
-# so if you define ESVN_REPO_URI as http://svn.collab.net/repo/svn/trunk or
-# http://svn.collab.net/repo/svn/trunk/. and PN is subversion-svn.
-# it will check out like:
-#
-#   ${ESVN_STORE_DIR}/subversion/trunk
-#
-# this is not used in order to declare the name of the upstream project.
-# so that you can declare this like:
-#
-#   # jakarta commons-loggin
-#   ESVN_PROJECT=commons/logging
-#
-# default: ${PN/-svn}.
-ESVN_PROJECT="${ESVN_PROJECT:-${PN/-svn}}"
-
-# @ECLASS-VARIABLE: ESVN_BOOTSTRAP
-# @DESCRIPTION:
-# Bootstrap script or command like autogen.sh or etc..
-# Removed in EAPI 6 and later.
-ESVN_BOOTSTRAP="${ESVN_BOOTSTRAP:-}"
-
-# @ECLASS-VARIABLE: ESVN_PATCHES
-# @DESCRIPTION:
-# subversion eclass can apply patches in subversion_bootstrap().
-# you can use regexp in this variable like *.diff or *.patch or etc.
-# NOTE: patches will be applied before ESVN_BOOTSTRAP is processed.
-#
-# Patches are searched both in ${PWD} and ${FILESDIR}, if not found in either
-# location, the installation dies.
-#
-# Removed in EAPI 6 and later, use PATCHES instead.
-ESVN_PATCHES="${ESVN_PATCHES:-}"
-
-# @ECLASS-VARIABLE: ESVN_RESTRICT
-# @DESCRIPTION:
-# this should be a space delimited list of subversion eclass features to
-# restrict.
-#   export)
-#     don't export the working copy to S.
-ESVN_RESTRICT="${ESVN_RESTRICT:-}"
-
-# @ECLASS-VARIABLE: ESVN_OFFLINE
-# @DESCRIPTION:
-# Set this variable to a non-empty value to disable the automatic updating of
-# an svn source tree. This is intended to be set outside the subversion source
-# tree by users.
-ESVN_OFFLINE="${ESVN_OFFLINE:-${EVCS_OFFLINE}}"
-
-# @ECLASS-VARIABLE: ESVN_UMASK
-# @DESCRIPTION:
-# Set this variable to a custom umask. This is intended to be set by users.
-# By setting this to something like 002, it can make life easier for people
-# who do development as non-root (but are in the portage group), and then
-# switch over to building with FEATURES=userpriv.  Or vice-versa.  Shouldn't
-# be a security issue here as anyone who has portage group write access
-# already can screw the system over in more creative ways.
-ESVN_UMASK="${ESVN_UMASK:-${EVCS_UMASK}}"
-
-# @ECLASS-VARIABLE: ESVN_UP_FREQ
-# @DESCRIPTION:
-# Set the minimum number of hours between svn up'ing in any given svn module. This is particularly
-# useful for split KDE ebuilds where we want to ensure that all submodules are compiled for the same
-# revision. It should also be kept user overrideable.
-ESVN_UP_FREQ="${ESVN_UP_FREQ:=}"
-
-# @ECLASS-VARIABLE: ESCM_LOGDIR
-# @DESCRIPTION:
-# User configuration variable. If set to a path such as e.g. /var/log/scm any
-# package inheriting from subversion.eclass will record svn revision to
-# ${CATEGORY}/${PN}.log in that path in pkg_preinst. This is not supposed to be
-# set by ebuilds/eclasses. It defaults to empty so users need to opt in.
-ESCM_LOGDIR="${ESCM_LOGDIR:=}"
-
-# @FUNCTION: subversion_fetch
-# @USAGE: [repo_uri] [destination]
-# @DESCRIPTION:
-# Wrapper function to fetch sources from subversion via svn checkout or svn update,
-# depending on whether there is an existing working copy in ${ESVN_STORE_DIR}.
-#
-# Can take two optional parameters:
-#   repo_uri    - a repository URI. default is ESVN_REPO_URI.
-#   destination - a check out path in S.
-subversion_fetch() {
-	local repo_uri="$(subversion__get_repository_uri "${1:-${ESVN_REPO_URI}}")"
-	local revision="$(subversion__get_peg_revision "${1:-${ESVN_REPO_URI}}")"
-	local S_dest="${2}"
-
-	if [[ -z ${repo_uri} ]]; then
-		die "${ESVN}: ESVN_REPO_URI (or specified URI) is empty."
-	fi
-
-	[[ -n "${ESVN_REVISION}" ]] && revision="${ESVN_REVISION}"
-
-	# check for the scheme
-	local scheme="${repo_uri%%:*}"
-	case "${scheme}" in
-		http|https)
-			;;
-		svn|svn+ssh)
-			;;
-		file)
-			;;
-		*)
-			die "${ESVN}: fetch from '${scheme}' is not yet implemented."
-			;;
-	esac
-
-	addread "/etc/subversion"
-	addwrite "${ESVN_STORE_DIR}"
-
-	if [[ -n "${ESVN_UMASK}" ]]; then
-		eumask_push "${ESVN_UMASK}"
-	fi
-
-	if [[ ! -d ${ESVN_STORE_DIR} ]]; then
-		debug-print "${FUNCNAME}: initial checkout. creating subversion directory"
-		mkdir -m 775 -p "${ESVN_STORE_DIR}" || die "${ESVN}: can't mkdir ${ESVN_STORE_DIR}."
-	fi
-
-	pushd "${ESVN_STORE_DIR}" >/dev/null || die "${ESVN}: can't chdir to ${ESVN_STORE_DIR}"
-
-	local wc_path="$(subversion__get_wc_path "${repo_uri}")"
-	local options="${ESVN_OPTIONS} --config-dir ${ESVN_STORE_DIR}/.subversion"
-
-	[[ -n "${revision}" ]] && options="${options} -r ${revision}"
-
-	if [[ "${ESVN_OPTIONS}" = *-r* ]]; then
-		ewarn "\${ESVN_OPTIONS} contains -r, this usage is unsupported. Please"
-		ewarn "see \${ESVN_REPO_URI}"
-	fi
-
-	if has_version ">=dev-vcs/subversion-1.6.0"; then
-		options="${options} --config-option=config:auth:password-stores="
-	fi
-
-	debug-print "${FUNCNAME}: wc_path = \"${wc_path}\""
-	debug-print "${FUNCNAME}: ESVN_OPTIONS = \"${ESVN_OPTIONS}\""
-	debug-print "${FUNCNAME}: options = \"${options}\""
-
-	if [[ ! -d ${wc_path}/.svn ]]; then
-		if [[ -n ${ESVN_OFFLINE} ]]; then
-			ewarn "ESVN_OFFLINE cannot be used when there is no existing checkout."
-		fi
-		# first check out
-		einfo "subversion check out start -->"
-		einfo "     repository: ${repo_uri}${revision:+@}${revision}"
-
-		debug-print "${FUNCNAME}: ${ESVN_FETCH_CMD} ${options} ${repo_uri}"
-
-		mkdir -m 775 -p "${ESVN_PROJECT}" || die "${ESVN}: can't mkdir ${ESVN_PROJECT}."
-		cd "${ESVN_PROJECT}" || die "${ESVN}: can't chdir to ${ESVN_PROJECT}"
-		if [[ -n "${ESVN_USER}" ]]; then
-			${ESVN_FETCH_CMD} ${options} --username "${ESVN_USER}" --password "${ESVN_PASSWORD}" "${repo_uri}" || die "${ESVN}: can't fetch to ${wc_path} from ${repo_uri}."
-		else
-			${ESVN_FETCH_CMD} ${options} "${repo_uri}" || die "${ESVN}: can't fetch to ${wc_path} from ${repo_uri}."
-		fi
-
-	elif [[ -n ${ESVN_OFFLINE} ]]; then
-		svn upgrade "${wc_path}" &>/dev/null
-		svn cleanup "${wc_path}" &>/dev/null
-		subversion_wc_info "${repo_uri}" || die "${ESVN}: unknown problem occurred while accessing working copy."
-
-		if [[ -n ${ESVN_REVISION} && ${ESVN_REVISION} != ${ESVN_WC_REVISION} ]]; then
-			die "${ESVN}: You requested off-line updating and revision ${ESVN_REVISION} but only revision ${ESVN_WC_REVISION} is available locally."
-		fi
-		einfo "Fetching disabled: Using existing repository copy at revision ${ESVN_WC_REVISION}."
-	else
-		svn upgrade "${wc_path}" &>/dev/null
-		svn cleanup "${wc_path}" &>/dev/null
-		subversion_wc_info "${repo_uri}" || die "${ESVN}: unknown problem occurred while accessing working copy."
-
-		local esvn_up_freq=
-		if [[ -n ${ESVN_UP_FREQ} ]]; then
-			if [[ -n ${ESVN_UP_FREQ//[[:digit:]]} ]]; then
-				die "${ESVN}: ESVN_UP_FREQ must be an integer value corresponding to the minimum number of hours between svn up."
-			elif [[ -z $(find "${wc_path}/.svn/entries" -mmin "+$((ESVN_UP_FREQ*60))") ]]; then
-				einfo "Fetching disabled since ${ESVN_UP_FREQ} hours has not passed since last update."
-				einfo "Using existing repository copy at revision ${ESVN_WC_REVISION}."
-				esvn_up_freq=no_update
-			fi
-		fi
-
-		if [[ -z ${esvn_up_freq} ]]; then
-			if [[ ${ESVN_WC_UUID} != $(subversion__svn_info "${repo_uri}" "Repository UUID") ]]; then
-				# UUID mismatch. Delete working copy and check out it again.
-				einfo "subversion recheck out start -->"
-				einfo "     old UUID: ${ESVN_WC_UUID}"
-				einfo "     new UUID: $(subversion__svn_info "${repo_uri}" "Repository UUID")"
-				einfo "     repository: ${repo_uri}${revision:+@}${revision}"
-
-				rm -fr "${ESVN_PROJECT}" || die
-
-				debug-print "${FUNCNAME}: ${ESVN_FETCH_CMD} ${options} ${repo_uri}"
-
-				mkdir -m 775 -p "${ESVN_PROJECT}" || die "${ESVN}: can't mkdir ${ESVN_PROJECT}."
-				cd "${ESVN_PROJECT}" || die "${ESVN}: can't chdir to ${ESVN_PROJECT}"
-				if [[ -n "${ESVN_USER}" ]]; then
-					${ESVN_FETCH_CMD} ${options} --username "${ESVN_USER}" --password "${ESVN_PASSWORD}" "${repo_uri}" || die "${ESVN}: can't fetch to ${wc_path} from ${repo_uri}."
-				else
-					${ESVN_FETCH_CMD} ${options} "${repo_uri}" || die "${ESVN}: can't fetch to ${wc_path} from ${repo_uri}."
-				fi
-			elif [[ ${ESVN_WC_URL} != $(subversion__get_repository_uri "${repo_uri}") ]]; then
-				einfo "subversion switch start -->"
-				einfo "     old repository: ${ESVN_WC_URL}@${ESVN_WC_REVISION}"
-				einfo "     new repository: ${repo_uri}${revision:+@}${revision}"
-
-				debug-print "${FUNCNAME}: ${ESVN_SWITCH_CMD} ${options} ${repo_uri}"
-
-				cd "${wc_path}" || die "${ESVN}: can't chdir to ${wc_path}"
-				if [[ -n "${ESVN_USER}" ]]; then
-					${ESVN_SWITCH_CMD} ${options} --username "${ESVN_USER}" --password "${ESVN_PASSWORD}" ${repo_uri} || die "${ESVN}: can't update ${wc_path} from ${repo_uri}."
-				else
-					${ESVN_SWITCH_CMD} ${options} ${repo_uri} || die "${ESVN}: can't update ${wc_path} from ${repo_uri}."
-				fi
-			else
-				# update working copy
-				einfo "subversion update start -->"
-				einfo "     repository: ${repo_uri}${revision:+@}${revision}"
-
-				debug-print "${FUNCNAME}: ${ESVN_UPDATE_CMD} ${options}"
-
-				cd "${wc_path}" || die "${ESVN}: can't chdir to ${wc_path}"
-				if [[ -n "${ESVN_USER}" ]]; then
-					${ESVN_UPDATE_CMD} ${options} --username "${ESVN_USER}" --password "${ESVN_PASSWORD}" || die "${ESVN}: can't update ${wc_path} from ${repo_uri}."
-				else
-					${ESVN_UPDATE_CMD} ${options} || die "${ESVN}: can't update ${wc_path} from ${repo_uri}."
-				fi
-			fi
-
-			# export updated information for the working copy
-			subversion_wc_info "${repo_uri}" || die "${ESVN}: unknown problem occurred while accessing working copy."
-		fi
-	fi
-
-	if [[ -n "${ESVN_UMASK}" ]]; then
-		eumask_pop
-	fi
-
-	einfo "   working copy: ${wc_path}"
-
-	if ! has "export" ${ESVN_RESTRICT}; then
-		cd "${wc_path}" || die "${ESVN}: can't chdir to ${wc_path}"
-
-		local S="${S}/${S_dest}"
-		mkdir -p "${S}"
-
-		# export to the ${WORKDIR}
-		#*  "svn export" has a bug.  see https://bugs.gentoo.org/119236
-		#* svn export . "${S}" || die "${ESVN}: can't export to ${S}."
-		rsync -rlpgo --exclude=".svn/" . "${S}" || die "${ESVN}: can't export to ${S}."
-	fi
-
-	popd >/dev/null
-	echo
-}
-
-# @FUNCTION: subversion_bootstrap
-# @DESCRIPTION:
-# Apply patches in ${ESVN_PATCHES} and run ${ESVN_BOOTSTRAP} if specified.
-# Removed in EAPI 6 and later.
-subversion_bootstrap() {
-	[[ ${EAPI} == [012345] ]] || die "${FUNCNAME} is removed from subversion.eclass in EAPI 6 and later"
-
-	if has "export" ${ESVN_RESTRICT}; then
-		return
-	fi
-
-	cd "${S}"
-
-	if [[ -n ${ESVN_PATCHES} ]]; then
-		local patch fpatch
-		einfo "apply patches -->"
-		for patch in ${ESVN_PATCHES}; do
-			if [[ -f ${patch} ]]; then
-				epatch "${patch}"
-			else
-				for fpatch in ${FILESDIR}/${patch}; do
-					if [[ -f ${fpatch} ]]; then
-						epatch "${fpatch}"
-					else
-						die "${ESVN}: ${patch} not found"
-					fi
-				done
-			fi
-		done
-		echo
-	fi
-
-	if [[ -n ${ESVN_BOOTSTRAP} ]]; then
-		einfo "begin bootstrap -->"
-		if [[ -f ${ESVN_BOOTSTRAP} && -x ${ESVN_BOOTSTRAP} ]]; then
-			einfo "   bootstrap with a file: ${ESVN_BOOTSTRAP}"
-			eval "./${ESVN_BOOTSTRAP}" || die "${ESVN}: can't execute ESVN_BOOTSTRAP."
-		else
-			einfo "   bootstrap with command: ${ESVN_BOOTSTRAP}"
-			eval "${ESVN_BOOTSTRAP}" || die "${ESVN}: can't eval ESVN_BOOTSTRAP."
-		fi
-	fi
-}
-
-# @FUNCTION: subversion_wc_info
-# @USAGE: [repo_uri]
-# @RETURN: ESVN_WC_URL, ESVN_WC_ROOT, ESVN_WC_UUID, ESVN_WC_REVISION and ESVN_WC_PATH
-# @DESCRIPTION:
-# Get svn info for the specified repo_uri. The default repo_uri is ESVN_REPO_URI.
-#
-# The working copy information on the specified repository URI are set to
-# ESVN_WC_* variables.
-subversion_wc_info() {
-	local repo_uri="$(subversion__get_repository_uri "${1:-${ESVN_REPO_URI}}")"
-	local wc_path="$(subversion__get_wc_path "${repo_uri}")"
-
-	debug-print "${FUNCNAME}: repo_uri = ${repo_uri}"
-	debug-print "${FUNCNAME}: wc_path = ${wc_path}"
-
-	if [[ ! -d ${wc_path} ]]; then
-		return 1
-	fi
-
-	export ESVN_WC_URL="$(subversion__svn_info "${wc_path}" "URL")"
-	export ESVN_WC_ROOT="$(subversion__svn_info "${wc_path}" "Repository Root")"
-	export ESVN_WC_UUID="$(subversion__svn_info "${wc_path}" "Repository UUID")"
-	export ESVN_WC_REVISION="$(subversion__svn_info "${wc_path}" "Revision")"
-	export ESVN_WC_PATH="${wc_path}"
-}
-
-# @FUNCTION: subversion_src_unpack
-# @DESCRIPTION:
-# Default src_unpack. Fetch and, in older EAPIs, bootstrap.
-subversion_src_unpack() {
-	subversion_fetch || die "${ESVN}: unknown problem occurred in subversion_fetch."
-	if has "${EAPI:-0}" 0 1; then
-		subversion_bootstrap || die "${ESVN}: unknown problem occurred in subversion_bootstrap."
-	fi
-}
-
-# @FUNCTION: subversion_src_prepare
-# @DESCRIPTION:
-# Default src_prepare. Bootstrap.
-# Removed in EAPI 6 and later.
-subversion_src_prepare() {
-	[[ ${EAPI} == [012345] ]] || die "${FUNCNAME} is removed from subversion.eclass in EAPI 6 and later"
-	subversion_bootstrap || die "${ESVN}: unknown problem occurred in subversion_bootstrap."
-}
-
-# @FUNCTION: subversion_pkg_preinst
-# @USAGE: [repo_uri]
-# @DESCRIPTION:
-# Log the svn revision of source code. Doing this in pkg_preinst because we
-# want the logs to stick around if packages are uninstalled without messing with
-# config protection.
-subversion_pkg_preinst() {
-	has "${EAPI:-0}" 0 1 2 && ! use prefix && EROOT="${ROOT}"
-	local pkgdate=$(date "+%Y%m%d %H:%M:%S")
-	if [[ -n ${ESCM_LOGDIR} ]]; then
-		local dir="${EROOT%/}${ESCM_LOGDIR}/${CATEGORY}"
-		if [[ ! -d ${dir} ]]; then
-			mkdir -p "${dir}" || eerror "Failed to create '${dir}' for logging svn revision"
-		fi
-		local logmessage="svn: ${pkgdate} - ${PF}:${SLOT} was merged at revision ${ESVN_WC_REVISION}"
-		if [[ -d ${dir} ]]; then
-			echo "${logmessage}" >>"${dir}/${PN}.log"
-		else
-			eerror "Could not log the message '${logmessage}' to '${dir}/${PN}.log'"
-		fi
-	fi
-}
-
-## -- Private Functions
-
-## -- subversion__svn_info() ------------------------------------------------- #
-#
-# param $1 - a target.
-# param $2 - a key name.
-#
-subversion__svn_info() {
-	local target="${1}"
-	local key="${2}"
-
-	env LC_ALL=C svn info ${options} --username "${ESVN_USER}" --password "${ESVN_PASSWORD}" "${target}" \
-		| grep -i "^${key}" \
-		| cut -d" " -f2-
-}
-
-## -- subversion__get_repository_uri() --------------------------------------- #
-#
-# param $1 - a repository URI.
-subversion__get_repository_uri() {
-	local repo_uri="${1}"
-
-	debug-print "${FUNCNAME}: repo_uri = ${repo_uri}"
-	if [[ -z ${repo_uri} ]]; then
-		die "${ESVN}: ESVN_REPO_URI (or specified URI) is empty."
-	fi
-	# delete trailing slash
-	if [[ -z ${repo_uri##*/} ]]; then
-		repo_uri="${repo_uri%/}"
-	fi
-	repo_uri="${repo_uri%@*}"
-
-	echo "${repo_uri}"
-}
-
-## -- subversion__get_wc_path() ---------------------------------------------- #
-#
-# param $1 - a repository URI.
-subversion__get_wc_path() {
-	local repo_uri="$(subversion__get_repository_uri "${1}")"
-
-	debug-print "${FUNCNAME}: repo_uri = ${repo_uri}"
-
-	echo "${ESVN_STORE_DIR}/${ESVN_PROJECT}/${repo_uri##*/}"
-}
-
-## -- subversion__get_peg_revision() ----------------------------------------- #
-#
-# param $1 - a repository URI.
-subversion__get_peg_revision() {
-	local repo_uri="${1}"
-	local peg_rev=
-
-	debug-print "${FUNCNAME}: repo_uri = ${repo_uri}"
-	# repo_uri has peg revision?
-	if [[ ${repo_uri} = *@* ]]; then
-		peg_rev="${repo_uri##*@}"
-		debug-print "${FUNCNAME}: peg_rev = ${peg_rev}"
-	else
-		debug-print "${FUNCNAME}: repo_uri does not have a peg revision."
-	fi
-
-	echo "${peg_rev}"
-}


^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [gentoo-commits] proj/lisp:master commit in: eclass/
@ 2022-03-13 20:27 Ulrich Müller
  0 siblings, 0 replies; 32+ messages in thread
From: Ulrich Müller @ 2022-03-13 20:27 UTC (permalink / raw
  To: gentoo-commits

commit:     b69efa80e5ad2fca719f98c054539863cec2e8d2
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Sun Mar 13 20:26:24 2022 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Sun Mar 13 20:26:24 2022 +0000
URL:        https://gitweb.gentoo.org/proj/lisp.git/commit/?id=b69efa80

eclass: Drop elisp*.eclass

Old versions, hopelessly outdated. Not working either because
virtual/emacs is gone.

Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>

 eclass/elisp-common.eclass | 414 ---------------------------------------------
 eclass/elisp.eclass        | 218 ------------------------
 2 files changed, 632 deletions(-)

diff --git a/eclass/elisp-common.eclass b/eclass/elisp-common.eclass
deleted file mode 100644
index 05b03f49..00000000
--- a/eclass/elisp-common.eclass
+++ /dev/null
@@ -1,414 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-# @ECLASS: elisp-common.eclass
-# @MAINTAINER:
-# Gentoo GNU Emacs project <gnu-emacs@gentoo.org>
-# @AUTHOR:
-# Matthew Kennedy <mkennedy@gentoo.org>
-# Jeremy Maitin-Shepard <jbms@attbi.com>
-# Mamoru Komachi <usata@gentoo.org>
-# Christian Faulhammer <fauli@gentoo.org>
-# Ulrich Müller <ulm@gentoo.org>
-# @BLURB: Emacs-related installation utilities
-# @DESCRIPTION:
-#
-# Usually you want to use this eclass for (optional) GNU Emacs support
-# of your package.  This is NOT for XEmacs!
-#
-# 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 emacs USE flag, you need to add
-#
-# @CODE
-# 	emacs? ( virtual/emacs )
-# @CODE
-#
-# to your DEPEND/RDEPEND line and use the functions provided here to
-# bring the files to the correct locations.
-#
-# If your package requires a minimum Emacs version, e.g. Emacs 24, then
-# the dependency should be on >=virtual/emacs-24 instead.  Because the
-# user can select the Emacs executable with eselect, you should also
-# make sure that the active Emacs version is sufficient.  This can be
-# tested with function elisp-need-emacs(), which would typically be
-# called from pkg_setup(), as in the following example:
-#
-# @CODE
-# 	elisp-need-emacs 24 || die "Emacs version too low"
-# @CODE
-#
-# Please note that such tests should be limited to packages that are
-# known to fail with lower Emacs versions; the standard case is to
-# depend on virtual/emacs without version.
-#
-# @ROFF .SS
-# src_compile() usage:
-#
-# An elisp file is compiled by the elisp-compile() function defined
-# here and simply takes the source files as arguments.  The case of
-# interdependent elisp files is also supported, since the current
-# directory is added to the load-path which makes sure that all files
-# are loadable.
-#
-# @CODE
-# 	elisp-compile *.el
-# @CODE
-#
-# Function elisp-make-autoload-file() can be used to generate a file
-# with autoload definitions for the lisp functions.  It takes the output
-# file name (default: "${PN}-autoloads.el") and a list of directories
-# (default: working directory) as its arguments.  Use of this function
-# requires that the elisp source files contain magic ";;;###autoload"
-# comments.  See the Emacs 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/share/emacs/site-lisp/ which is named after the first argument
-# of elisp-install().  The following parameters are the files to be put
-# in that directory.  Usually the subdirectory should be ${PN}, you can
-# choose something else, but remember to tell elisp-site-file-install()
-# (see below) the change, as it defaults to ${PN}.
-#
-# @CODE
-# 	elisp-install ${PN} *.el *.elc
-# @CODE
-#
-# To let the Emacs support be activated by Emacs 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:
-#
-# @CODE
-# 	(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)
-# @CODE
-#
-# If your Emacs support files are installed in a subdirectory of
-# /usr/share/emacs/site-lisp/ (which is strongly recommended), you need
-# to extend Emacs' load-path as shown in the first non-comment line.
-# The elisp-site-file-install() function of this eclass will replace
-# "@SITELISP@" and "@SITEETC@" by the actual paths.
-#
-# The next line tells Emacs 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 Emacs 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 guiding principle is that emerging your package should not by
-# itself cause a change of standard Emacs behaviour.
-#
-# 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 Emacs
-# 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):
-#
-# @CODE
-# 	SITEFILE="50${PN}-gentoo.el"
-# @CODE
-#
-# Which is then installed by
-#
-# @CODE
-# 	elisp-site-file-install "${FILESDIR}/${SITEFILE}"
-# @CODE
-#
-# 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.
-#
-# @ROFF .SS
-# pkg_postinst() / pkg_postrm() usage:
-#
-# After that you need to recreate the start-up file of Emacs after
-# emerging and unmerging by using
-#
-# @CODE
-# 	pkg_postinst() {
-# 		elisp-site-regen
-# 	}
-#
-# 	pkg_postrm() {
-# 		elisp-site-regen
-# 	}
-# @CODE
-#
-# When having optional Emacs support, you should prepend "use emacs &&"
-# to above calls of elisp-site-regen().
-# Don't use "has_version virtual/emacs"!  When unmerging the state of
-# the emacs USE flag is taken from the package database and not from the
-# environment, so it is no problem when you unset USE=emacs between
-# merge and unmerge of a package.
-
-# @ECLASS-VARIABLE: SITELISP
-# @DESCRIPTION:
-# Directory where packages install Emacs Lisp files.
-SITELISP=/usr/share/emacs/site-lisp
-
-# @ECLASS-VARIABLE: SITEETC
-# @DESCRIPTION:
-# Directory where packages install miscellaneous (not Lisp) files.
-SITEETC=/usr/share/emacs/etc
-
-# @ECLASS-VARIABLE: EMACS
-# @DESCRIPTION:
-# Path of Emacs executable.
-EMACS=${EPREFIX}/usr/bin/emacs
-
-# @ECLASS-VARIABLE: EMACSFLAGS
-# @DESCRIPTION:
-# Flags for executing Emacs in batch mode.
-# These work for Emacs versions 18-24, so don't change them.
-EMACSFLAGS="-batch -q --no-site-file"
-
-# @ECLASS-VARIABLE: BYTECOMPFLAGS
-# @DESCRIPTION:
-# Emacs flags used for byte-compilation in elisp-compile().
-BYTECOMPFLAGS="-L ."
-
-# @FUNCTION: elisp-emacs-version
-# @RETURN: exit status of Emacs
-# @DESCRIPTION:
-# Output version of currently active Emacs.
-
-elisp-emacs-version() {
-	local version ret
-	# The following will work for at least versions 18-24.
-	echo "(princ emacs-version)" >"${T}"/emacs-version.el
-	version=$(
-		# EMACS could be a microemacs variant that ignores the -batch
-		# option and would therefore hang, waiting for user interaction.
-		# Redirecting stdin and unsetting TERM and DISPLAY will cause
-		# most of them to exit with an error.
-		unset TERM DISPLAY
-		${EMACS} ${EMACSFLAGS} -l "${T}"/emacs-version.el </dev/null
-	)
-	ret=$?
-	rm -f "${T}"/emacs-version.el
-	if [[ ${ret} -ne 0 ]]; then
-		eerror "elisp-emacs-version: Failed to run ${EMACS}"
-		return ${ret}
-	fi
-	if [[ -z ${version} ]]; then
-		eerror "elisp-emacs-version: Could not determine Emacs version"
-		return 1
-	fi
-	echo "${version}"
-}
-
-# @FUNCTION: elisp-need-emacs
-# @USAGE: <version>
-# @RETURN: 0 if true, 1 if false, 2 if trouble
-# @DESCRIPTION:
-# Test if the eselected Emacs version is at least the major version
-# of GNU Emacs specified as argument.
-
-elisp-need-emacs() {
-	local need_emacs=$1 have_emacs
-	have_emacs=$(elisp-emacs-version) || return 2
-	einfo "Emacs version: ${have_emacs}"
-	if [[ ${have_emacs} =~ XEmacs|Lucid ]]; then
-		eerror "This package needs GNU Emacs."
-		return 1
-	fi
-	if ! [[ ${have_emacs%%.*} -ge ${need_emacs%%.*} ]]; then
-		eerror "This package needs at least Emacs ${need_emacs%%.*}."
-		eerror "Use \"eselect emacs\" to select the active version."
-		return 1
-	fi
-	return 0
-}
-
-# @FUNCTION: elisp-compile
-# @USAGE: <list of elisp files>
-# @DESCRIPTION:
-# Byte-compile Emacs Lisp files.
-#
-# This function uses GNU Emacs to byte-compile all ".el" specified by
-# its arguments.  The resulting byte-code (".elc") files are placed in
-# the same directory as their corresponding source file.
-#
-# The current directory is added to the load-path.  This will ensure
-# that interdependent Emacs Lisp files are visible between themselves,
-# in case they require or load one another.
-
-elisp-compile() {
-	ebegin "Compiling GNU Emacs Elisp files"
-	${EMACS} ${EMACSFLAGS} ${BYTECOMPFLAGS} -f batch-byte-compile "$@"
-	eend $? "elisp-compile: batch-byte-compile failed" || die
-}
-
-# @FUNCTION: elisp-make-autoload-file
-# @USAGE: [output file] [list of directories]
-# @DESCRIPTION:
-# Generate a file with autoload definitions for the lisp functions.
-
-elisp-make-autoload-file() {
-	local f="${1:-${PN}-autoloads.el}" null="" page=$'\f'
-	shift
-	ebegin "Generating autoload file for GNU Emacs"
-
-	cat >"${f}" <<-EOF
-	;;; ${f##*/} --- autoloads for ${PN}
-
-	;;; Commentary:
-	;; Automatically generated by elisp-common.eclass
-	;; DO NOT EDIT THIS FILE
-
-	;;; Code:
-	${page}
-	;; Local ${null}Variables:
-	;; version-control: never
-	;; no-byte-compile: t
-	;; no-update-autoloads: t
-	;; End:
-
-	;;; ${f##*/} ends here
-	EOF
-
-	${EMACS} ${EMACSFLAGS} \
-		--eval "(setq make-backup-files nil)" \
-		--eval "(setq generated-autoload-file (expand-file-name \"${f}\"))" \
-		-f batch-update-autoloads "${@-.}"
-
-	eend $? "elisp-make-autoload-file: batch-update-autoloads failed" || die
-}
-
-# @FUNCTION: elisp-install
-# @USAGE: <subdirectory> <list of files>
-# @DESCRIPTION:
-# Install files in SITELISP directory.
-
-elisp-install() {
-	local subdir="$1"
-	shift
-	ebegin "Installing Elisp files for GNU Emacs support"
-	( # subshell to avoid pollution of calling environment
-		insinto "${SITELISP}/${subdir}"
-		doins "$@"
-	)
-	eend $? "elisp-install: doins failed" || die
-}
-
-# @FUNCTION: elisp-site-file-install
-# @USAGE: <site-init file> [subdirectory]
-# @DESCRIPTION:
-# Install Emacs site-init file in SITELISP directory.  Automatically
-# inserts a standard comment header with the name of the package (unless
-# it is already present).  Tokens @SITELISP@ and @SITEETC@ are replaced
-# by the path to the package's subdirectory in SITELISP and SITEETC,
-# respectively.
-
-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 "elisp-site-file-install: bad name of site-init file"
-	[[ ${sf%-gentoo*.el} != "${sf}" ]] && sf="${sf%-gentoo*.el}-gentoo.el"
-	sf="${T}/${sf}"
-	ebegin "Installing site initialisation file for GNU Emacs"
-	[[ $1 = "${sf}" ]] || cp "$1" "${sf}"
-	sed -i -e "1{:x;/^\$/{n;bx;};/^;.*${PN}/I!s:^:${header}\n\n:;1s:^:\n:;}" \
-		-e "s:@SITELISP@:${EPREFIX}${SITELISP}/${my_pn}:g" \
-		-e "s:@SITEETC@:${EPREFIX}${SITEETC}/${my_pn}:g;\$q" "${sf}"
-	( # subshell to avoid pollution of calling environment
-		insinto "${SITELISP}/site-gentoo.d"
-		doins "${sf}"
-	)
-	ret=$?
-	rm -f "${sf}"
-	eend ${ret} "elisp-site-file-install: doins failed" || die
-}
-
-# @FUNCTION: elisp-site-regen
-# @DESCRIPTION:
-# Regenerate the site-gentoo.el file, based on packages' site
-# initialisation files in the /usr/share/emacs/site-lisp/site-gentoo.d/
-# directory.
-
-elisp-site-regen() {
-	local sitelisp=${ROOT%/}${EPREFIX}${SITELISP}
-	local sf i ret=0 null="" page=$'\f'
-	local -a sflist
-
-	if [[ ${EBUILD_PHASE} = *rm && ! -e ${sitelisp}/site-gentoo.el ]]; then
-		ewarn "Refusing to create site-gentoo.el in ${EBUILD_PHASE} phase."
-		return 0
-	fi
-
-	[[ -d ${sitelisp} ]] \
-		|| die "elisp-site-regen: Directory ${sitelisp} does not exist"
-
-	[[ -d ${T} ]] \
-		|| die "elisp-site-regen: Temporary directory ${T} does not exist"
-
-	ebegin "Regenerating site-gentoo.el for GNU Emacs (${EBUILD_PHASE})"
-
-	for sf in "${sitelisp}"/site-gentoo.d/[0-9][0-9]*.el; do
-		[[ -r ${sf} ]] && sflist+=("${sf}")
-	done
-
-	cat <<-EOF >"${T}"/site-gentoo.el || ret=$?
-	;;; site-gentoo.el --- site initialisation for Gentoo-installed packages
-
-	;;; Commentary:
-	;; Automatically generated by 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 || ret=$?
-	cat <<-EOF >>"${T}"/site-gentoo.el || ret=$?
-
-	${page}
-	(provide 'site-gentoo)
-
-	;; Local ${null}Variables:
-	;; no-byte-compile: t
-	;; buffer-read-only: t
-	;; End:
-
-	;;; site-gentoo.el ends here
-	EOF
-
-	if [[ ${ret} -ne 0 ]]; then
-		eend ${ret} "elisp-site-regen: Writing site-gentoo.el failed."
-		die
-	elif 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
-		eend
-		einfo "... no changes."
-	else
-		mv "${T}"/site-gentoo.el "${sitelisp}"/site-gentoo.el
-		eend $? "elisp-site-regen: Replacing site-gentoo.el failed" || die
-		case ${#sflist[@]} in
-			0) [[ ${PN} = emacs-common-gentoo ]] \
-				|| 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/elisp.eclass b/eclass/elisp.eclass
deleted file mode 100644
index 0f07a3ef..00000000
--- a/eclass/elisp.eclass
+++ /dev/null
@@ -1,218 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-# @ECLASS: elisp.eclass
-# @MAINTAINER:
-# Gentoo GNU Emacs project <gnu-emacs@gentoo.org>
-# @AUTHOR:
-# Matthew Kennedy <mkennedy@gentoo.org>
-# Jeremy Maitin-Shepard <jbms@attbi.com>
-# Christian Faulhammer <fauli@gentoo.org>
-# Ulrich Müller <ulm@gentoo.org>
-# @BLURB: Eclass for Emacs Lisp packages
-# @DESCRIPTION:
-#
-# This eclass is designed to install elisp files of Emacs related
-# packages into the site-lisp directory.  The majority of elisp packages
-# will only need to define the standard ebuild variables (like SRC_URI)
-# and optionally SITEFILE for successful installation.
-#
-# Emacs support for other than pure elisp packages is handled by
-# elisp-common.eclass where you won't have a dependency on Emacs itself.
-# All elisp-* functions are documented there.
-#
-# If the package's source is a single (in whatever way) compressed elisp
-# file with the file name ${P}.el, then this eclass will move ${P}.el to
-# ${PN}.el in src_unpack().
-
-# @ECLASS-VARIABLE: NEED_EMACS
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# If you need anything different from Emacs 23, use the NEED_EMACS
-# variable before inheriting elisp.eclass.  Set it to the major version
-# your package uses and the dependency will be adjusted.
-
-# @ECLASS-VARIABLE: ELISP_PATCHES
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# Space separated list of patches to apply after unpacking the sources.
-# Patch files are searched for in the current working dir, WORKDIR, and
-# FILESDIR.
-
-# @ECLASS-VARIABLE: ELISP_REMOVE
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# Space separated list of files to remove after unpacking the sources.
-
-# @ECLASS-VARIABLE: SITEFILE
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# Name of package's site-init file.  The filename must match the shell
-# pattern "[1-8][0-9]*-gentoo.el"; numbers below 10 and above 89 are
-# reserved for internal use.  "50${PN}-gentoo.el" is a reasonable choice
-# in most cases.
-
-# @ECLASS-VARIABLE: ELISP_TEXINFO
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# Space separated list of Texinfo sources.  Respective GNU Info files
-# will be generated in src_compile() and installed in src_install().
-
-# @ECLASS-VARIABLE: DOCS
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# DOCS="blah.txt ChangeLog" is automatically used to install the given
-# files by dodoc in src_install().
-
-inherit elisp-common
-case ${EAPI:-0} in
-	0|1|2|3|4|5) inherit epatch ;;
-	6|7) ;;
-	*) die "${ECLASS}: EAPI ${EAPI} not supported" ;;
-esac
-
-case ${EAPI:-0} in
-	0|1) EXPORT_FUNCTIONS src_{unpack,compile,install} \
-			pkg_{setup,postinst,postrm} ;;
-	*) EXPORT_FUNCTIONS src_{unpack,prepare,configure,compile,install} \
-			pkg_{setup,postinst,postrm} ;;
-esac
-
-RDEPEND=">=virtual/emacs-${NEED_EMACS:-23}"
-case ${EAPI:-0} in
-	0|1|2|3|4|5|6) DEPEND="${RDEPEND}" ;;
-	*) BDEPEND="${RDEPEND}" ;;
-esac
-
-# @FUNCTION: elisp_pkg_setup
-# @DESCRIPTION:
-# Test if the eselected Emacs version is sufficient to fulfil the major
-# version requirement of the NEED_EMACS variable.
-
-elisp_pkg_setup() {
-	elisp-need-emacs "${NEED_EMACS:-23}"
-	case $? in
-		0) ;;
-		1) die "Emacs version too low" ;;
-		*) die "Could not determine Emacs version" ;;
-	esac
-}
-
-# @FUNCTION: elisp_src_unpack
-# @DESCRIPTION:
-# Unpack the sources; also handle the case of a single *.el file in
-# WORKDIR for packages distributed that way.  For EAPIs without
-# src_prepare, call elisp_src_prepare.
-
-elisp_src_unpack() {
-	[[ -n ${A} ]] && unpack ${A}
-	if [[ -f ${P}.el ]]; then
-		# the "simple elisp" case with a single *.el file in WORKDIR
-		mv ${P}.el ${PN}.el || die
-		[[ -d ${S} ]] || S=${WORKDIR}
-	fi
-
-	case ${EAPI:-0} in
-		0|1) [[ -d ${S} ]] && cd "${S}"
-			elisp_src_prepare ;;
-	esac
-}
-
-# @FUNCTION: elisp_src_prepare
-# @DESCRIPTION:
-# Apply any patches listed in ELISP_PATCHES.  Patch files are searched
-# for in the current working dir, WORKDIR, and FILESDIR.
-
-elisp_src_prepare() {
-	local patch file
-	for patch in ${ELISP_PATCHES}; do
-		if [[ -f ${patch} ]]; then
-			file="${patch}"
-		elif [[ -f ${WORKDIR}/${patch} ]]; then
-			file="${WORKDIR}/${patch}"
-		elif [[ -f ${FILESDIR}/${patch} ]]; then
-			file="${FILESDIR}/${patch}"
-		else
-			die "Cannot find ${patch}"
-		fi
-		case ${EAPI:-0} in
-			0|1|2|3|4|5) epatch "${file}" ;;
-			*) eapply "${file}" ;;
-		esac
-	done
-
-	# apply any user patches
-	case ${EAPI:-0} in
-		0|1|2|3|4|5) epatch_user ;;
-		*) eapply_user ;;
-	esac
-
-	if [[ -n ${ELISP_REMOVE} ]]; then
-		rm ${ELISP_REMOVE} || die
-	fi
-}
-
-# @FUNCTION: elisp_src_configure
-# @DESCRIPTION:
-# Do nothing, because Emacs packages seldomly bring a full build system.
-
-elisp_src_configure() { :; }
-
-# @FUNCTION: elisp_src_compile
-# @DESCRIPTION:
-# Call elisp-compile to byte-compile all Emacs Lisp (*.el) files.
-# If ELISP_TEXINFO lists any Texinfo sources, call makeinfo to generate
-# GNU Info files from them.
-
-elisp_src_compile() {
-	elisp-compile *.el
-	if [[ -n ${ELISP_TEXINFO} ]]; then
-		makeinfo ${ELISP_TEXINFO} || die
-	fi
-}
-
-# @FUNCTION: elisp_src_install
-# @DESCRIPTION:
-# Call elisp-install to install all Emacs Lisp (*.el and *.elc) files.
-# If the SITEFILE variable specifies a site-init file, install it with
-# elisp-site-file-install.  Also install any GNU Info files listed in
-# ELISP_TEXINFO and documentation listed in the DOCS variable.
-
-elisp_src_install() {
-	elisp-install ${PN} *.el *.elc
-	if [[ -n ${SITEFILE} ]]; then
-		elisp-site-file-install "${FILESDIR}/${SITEFILE}"
-	fi
-	if [[ -n ${ELISP_TEXINFO} ]]; then
-		set -- ${ELISP_TEXINFO}
-		set -- ${@##*/}
-		doinfo ${@/%.*/.info*} || die
-	fi
-	if [[ -n ${DOCS} ]]; then
-		dodoc ${DOCS} || die
-	fi
-	if declare -f readme.gentoo_create_doc >/dev/null; then
-		readme.gentoo_create_doc
-	fi
-}
-
-# @FUNCTION: elisp_pkg_postinst
-# @DESCRIPTION:
-# Call elisp-site-regen, in order to collect the site initialisation for
-# all installed Emacs Lisp packages in the site-gentoo.el file.
-
-elisp_pkg_postinst() {
-	elisp-site-regen
-	if declare -f readme.gentoo_print_elog >/dev/null; then
-		readme.gentoo_print_elog
-	fi
-}
-
-# @FUNCTION: elisp_pkg_postrm
-# @DESCRIPTION:
-# Call elisp-site-regen, in order to collect the site initialisation for
-# all installed Emacs Lisp packages in the site-gentoo.el file.
-
-elisp_pkg_postrm() {
-	elisp-site-regen
-}


^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [gentoo-commits] proj/lisp:master commit in: eclass/
@ 2022-03-24  6:54 Ulrich Müller
  0 siblings, 0 replies; 32+ messages in thread
From: Ulrich Müller @ 2022-03-24  6:54 UTC (permalink / raw
  To: gentoo-commits

commit:     ca24b2c4238c768de46269a806dddd4842725afe
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Thu Mar 24 06:54:32 2022 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Thu Mar 24 06:54:32 2022 +0000
URL:        https://gitweb.gentoo.org/proj/lisp.git/commit/?id=ca24b2c4

common-lisp-3.eclass: Sync eclass documentation from gentoo repository

Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>

 eclass/common-lisp-3.eclass | 22 ++++++++++++----------
 1 file changed, 12 insertions(+), 10 deletions(-)

diff --git a/eclass/common-lisp-3.eclass b/eclass/common-lisp-3.eclass
index ae229491..d68b4250 100644
--- a/eclass/common-lisp-3.eclass
+++ b/eclass/common-lisp-3.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 # @ECLASS: common-lisp-3.eclass
@@ -11,25 +11,25 @@
 
 inherit eutils
 
-# @ECLASS-VARIABLE: CLIMPLEMENTATIONS
+# @ECLASS_VARIABLE: CLIMPLEMENTATIONS
 # @DESCRIPTION:
 # Common Lisp implementations
 CLIMPLEMENTATIONS="sbcl clisp clozurecl cmucl ecls gcl abcl"
 
-# @ECLASS-VARIABLE: CLSOURCEROOT
+# @ECLASS_VARIABLE: CLSOURCEROOT
 # @DESCRIPTION:
 # Default path of Common Lisp libraries sources. Sources will
 # be installed into ${CLSOURCEROOT}/${CLPACKAGE}.
 CLSOURCEROOT="${ROOT%/}"/usr/share/common-lisp/source
 
-# @ECLASS-VARIABLE: CLSYSTEMROOT
+# @ECLASS_VARIABLE: CLSYSTEMROOT
 # @DESCRIPTION:
 # Default path to find any asdf file. Any asdf files will be
 # symlinked in ${CLSYSTEMROOT}/${CLSYSTEM} as they may be in
 # an arbitrarily deeply nested directory under ${CLSOURCEROOT}/${CLPACKAGE}.
 CLSYSTEMROOT="${ROOT%/}"/usr/share/common-lisp/systems
 
-# @ECLASS-VARIABLE: CLPACKAGE
+# @ECLASS_VARIABLE: CLPACKAGE
 # @DESCRIPTION:
 # Default package name. To override, set these after inheriting this eclass.
 CLPACKAGE="${PN}"
@@ -75,6 +75,7 @@ common-lisp-install-one-source() {
 }
 
 # @FUNCTION: lisp-file-p
+# @USAGE: <file>
 # @DESCRIPTION:
 # Returns true if ${1} is lisp source file.
 lisp-file-p() {
@@ -84,6 +85,7 @@ lisp-file-p() {
 }
 
 # @FUNCTION: common-lisp-get-fpredicate
+# @USAGE: <type>
 # @DESCRIPTION:
 # Outputs the corresponding predicate to check files of type ${1}.
 common-lisp-get-fpredicate() {
@@ -98,7 +100,7 @@ common-lisp-get-fpredicate() {
 }
 
 # @FUNCTION: common-lisp-install-sources
-# @USAGE: common-lisp-install-sources path [<other_paths>...]
+# @USAGE: <path> [...]
 # @DESCRIPTION:
 # Recursively install lisp sources of type ${2} if ${1} is -t or
 # Lisp by default. When given a directory, it will be recursively
@@ -126,6 +128,7 @@ common-lisp-install-sources() {
 }
 
 # @FUNCTION: common-lisp-install-one-asdf
+# @USAGE: <file>
 # @DESCRIPTION:
 # Installs ${1} asdf file in CLSOURCEROOT/CLPACKAGE and symlinks it in
 # CLSYSTEMROOT.
@@ -140,7 +143,7 @@ common-lisp-install-one-asdf() {
 }
 
 # @FUNCTION: common-lisp-install-asdf
-# @USAGE: common-lisp-install-asdf path [<other_paths>...]
+# @USAGE: <path> [...]
 # @DESCRIPTION:
 # Installs all ASDF files and creates symlinks in CLSYSTEMROOT.
 # When given a directory, it will be recursively scanned for ASDF
@@ -157,7 +160,7 @@ common-lisp-install-asdf() {
 
 # @FUNCTION: common-lisp-3_src_install
 # @DESCRIPTION:
-# Recursively install Lisp sources, asdf files and most common doc files.
+# Recursively install Lisp sources, asdf files and doc files.
 common-lisp-3_src_install() {
 	common-lisp-install-sources .
 	common-lisp-install-asdf
@@ -167,7 +170,6 @@ common-lisp-3_src_install() {
 }
 
 # @FUNCTION: common-lisp-find-lisp-impl
-# @USAGE: common-lisp-find-lisp-impl
 # @DESCRIPTION:
 # Outputs an installed Common Lisp implementation. Transverses
 # CLIMPLEMENTATIONS to find it.
@@ -179,7 +181,7 @@ common-lisp-find-lisp-impl() {
 }
 
 # @FUNCTION: common-lisp-export-impl-args
-# @USAGE: common-lisp-export-impl-args <lisp-implementation>
+# @USAGE: <lisp-implementation>
 # @DESCRIPTION:
 # Export a few variables containing the switches necessary
 # to make the CL implementation perform basic functions:


^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [gentoo-commits] proj/lisp:master commit in: eclass/
@ 2022-03-26 17:29 Ulrich Müller
  0 siblings, 0 replies; 32+ messages in thread
From: Ulrich Müller @ 2022-03-26 17:29 UTC (permalink / raw
  To: gentoo-commits

commit:     2624d89c0e221fa5acd9a5202cfd8e1a5c2922fe
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Sat Mar 26 17:28:05 2022 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Sat Mar 26 17:28:05 2022 +0000
URL:        https://gitweb.gentoo.org/proj/lisp.git/commit/?id=2624d89c

bash-completion-r1.eclass: Remove

This is an outdated copy of the eclass in the gentoo repository.

Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>

 eclass/bash-completion-r1.eclass | 135 ---------------------------------------
 1 file changed, 135 deletions(-)

diff --git a/eclass/bash-completion-r1.eclass b/eclass/bash-completion-r1.eclass
deleted file mode 100644
index eff5e68c..00000000
--- a/eclass/bash-completion-r1.eclass
+++ /dev/null
@@ -1,135 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-# @ECLASS: bash-completion-r1.eclass
-# @MAINTAINER:
-# mgorny@gentoo.org
-# @BLURB: A few quick functions to install bash-completion files
-# @EXAMPLE:
-#
-# @CODE
-# EAPI=5
-#
-# src_configure() {
-# 	econf \
-#		--with-bash-completion-dir="$(get_bashcompdir)"
-# }
-#
-# src_install() {
-# 	default
-#
-# 	newbashcomp contrib/${PN}.bash-completion ${PN}
-# }
-# @CODE
-
-inherit toolchain-funcs
-
-case ${EAPI:-0} in
-	0|1|2|3|4|5|6|7) ;;
-	*) die "EAPI ${EAPI} unsupported (yet)."
-esac
-
-# @FUNCTION: _bash-completion-r1_get_bashdir
-# @INTERNAL
-# @DESCRIPTION:
-# First argument is name of the string in bash-completion.pc
-# Second argument is the fallback directory if the string is not found
-# @EXAMPLE:
-# _bash-completion-r1_get_bashdir completionsdir /usr/share/bash-completion
-_bash-completion-r1_get_bashdir() {
-	debug-print-function ${FUNCNAME} "${@}"
-
-	if $(tc-getPKG_CONFIG) --exists bash-completion &>/dev/null; then
-		local path
-		path=$($(tc-getPKG_CONFIG) --variable="${1}" bash-completion) || die
-		# we need to return unprefixed, so strip from what pkg-config returns
-		# to us, bug #477692
-		echo "${path#${EPREFIX}}"
-	else
-		echo "${2}"
-	fi
-}
-
-# @FUNCTION: _bash-completion-r1_get_bashcompdir
-# @INTERNAL
-# @DESCRIPTION:
-# Get unprefixed bash-completion completions directory.
-_bash-completion-r1_get_bashcompdir() {
-	debug-print-function ${FUNCNAME} "${@}"
-
-	_bash-completion-r1_get_bashdir completionsdir /usr/share/bash-completion/completions
-}
-
-# @FUNCTION: _bash-completion-r1_get_helpersdir
-# @INTERNAL
-# @DESCRIPTION:
-# Get unprefixed bash-completion helpers directory.
-_bash-completion-r1_get_bashhelpersdir() {
-	debug-print-function ${FUNCNAME} "${@}"
-
-	_bash-completion-r1_get_bashdir helpersdir /usr/share/bash-completion/helpers
-}
-
-# @FUNCTION: get_bashcompdir
-# @DESCRIPTION:
-# Get the bash-completion completions directory.
-get_bashcompdir() {
-	debug-print-function ${FUNCNAME} "${@}"
-
-	echo "${EPREFIX}$(_bash-completion-r1_get_bashcompdir)"
-}
-
-# @FUNCTION: get_bashhelpersdir
-# @INTERNAL
-# @DESCRIPTION:
-# Get the bash-completion helpers directory.
-get_bashhelpersdir() {
-	debug-print-function ${FUNCNAME} "${@}"
-
-	echo "${EPREFIX}$(_bash-completion-r1_get_bashhelpersdir)"
-}
-
-# @FUNCTION: dobashcomp
-# @USAGE: file [...]
-# @DESCRIPTION:
-# Install bash-completion files passed as args. Has EAPI-dependant failure
-# behavior (like doins).
-dobashcomp() {
-	debug-print-function ${FUNCNAME} "${@}"
-
-	(
-		insinto "$(_bash-completion-r1_get_bashcompdir)"
-		doins "${@}"
-	)
-}
-
-# @FUNCTION: newbashcomp
-# @USAGE: file newname
-# @DESCRIPTION:
-# Install bash-completion file under a new name. Has EAPI-dependant failure
-# behavior (like newins).
-newbashcomp() {
-	debug-print-function ${FUNCNAME} "${@}"
-
-	(
-		insinto "$(_bash-completion-r1_get_bashcompdir)"
-		newins "${@}"
-	)
-}
-
-# @FUNCTION: bashcomp_alias
-# @USAGE: <basename> <alias>...
-# @DESCRIPTION:
-# Alias <basename> completion to one or more commands (<alias>es).
-bashcomp_alias() {
-	debug-print-function ${FUNCNAME} "${@}"
-
-	[[ ${#} -lt 2 ]] && die "Usage: ${FUNCNAME} <basename> <alias>..."
-	local base=${1} f
-	shift
-
-	for f; do
-		dosym "${base}" "$(_bash-completion-r1_get_bashcompdir)/${f}" \
-			|| return
-	done
-}


^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [gentoo-commits] proj/lisp:master commit in: eclass/
@ 2022-04-01 11:12 Ulrich Müller
  0 siblings, 0 replies; 32+ messages in thread
From: Ulrich Müller @ 2022-04-01 11:12 UTC (permalink / raw
  To: gentoo-commits

commit:     40631c50150421f596445d04d897d9ecd40338ae
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Jul 25 01:27:34 2021 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Fri Apr  1 10:40:23 2022 +0000
URL:        https://gitweb.gentoo.org/proj/lisp.git/commit/?id=40631c50

darcs.eclass: Copy last version from gentoo repository

Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>

 eclass/darcs.eclass | 223 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 223 insertions(+)

diff --git a/eclass/darcs.eclass b/eclass/darcs.eclass
new file mode 100644
index 00000000..1ed886fb
--- /dev/null
+++ b/eclass/darcs.eclass
@@ -0,0 +1,223 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# @ECLASS: darcs.eclass
+# @MAINTAINER:
+# "Gentoo's Haskell Language team" <haskell@gentoo.org>
+# Sergei Trofimovich <slyfox@gentoo.org>
+# @AUTHOR:
+# Original Author: Jeffrey Yasskin <jyasskin@mail.utexas.edu>
+#               <rphillips@gentoo.org> (tla eclass author)
+# Andres Loeh   <kosmikus@gentoo.org> (darcs.eclass author)
+# Alexander Vershilov <alexander.vershilov@gmail.com> (various contributions)
+# @BLURB: This eclass provides functions for fetch and unpack darcs repositories
+# @DEPRECATED: none
+# @DESCRIPTION:
+# This eclass provides the generic darcs fetching functions.
+#
+# Define the EDARCS_REPOSITORY variable at least.
+# The ${S} variable is set to ${WORKDIR}/${P}.
+
+# TODO:
+
+# support for tags
+
+# eshopts_{push,pop}
+case "${EAPI:-0}" in
+	4|5|6) inherit eutils ;;
+	7)     inherit estack ;;
+	*) ;;
+esac
+
+# Don't download anything other than the darcs repository
+SRC_URI=""
+
+# You shouldn't change these settings yourself! The ebuild/eclass inheriting
+# this eclass will take care of that.
+
+# --- begin ebuild-configurable settings
+
+# darcs command to run
+# @ECLASS-VARIABLE: EDARCS_DARCS_CMD
+# @DESCRIPTION:
+# Path to darcs binary.
+: ${EDARCS_DARCS_CMD:=darcs}
+
+# darcs commands with command-specific options
+
+# @ECLASS-VARIABLE: EDARCS_GET_CMD
+# @DESCRIPTION:
+# First fetch darcs command.
+: ${EDARCS_GET_CMD:=get --lazy}
+
+# @ECLASS-VARIABLE: EDARCS_UPDATE_CMD
+# @DESCRIPTION:
+# Repo update darcs command.
+: ${EDARCS_UPDATE_CMD:=pull}
+
+# @ECLASS-VARIABLE: EDARCS_OPTIONS
+# @DESCRIPTION:
+# Options to pass to both the "get" and "update" commands
+: ${EDARCS_OPTIONS:=--set-scripts-executable}
+
+# @ECLASS-VARIABLE: EDARCS_TOP_DIR
+# @DESCRIPTION:
+# Where the darcs repositories are stored/accessed
+: ${EDARCS_TOP_DIR:=${PORTAGE_ACTUAL_DISTDIR-${DISTDIR}}/darcs-src}
+
+# @ECLASS-VARIABLE: EDARCS_REPOSITORY
+# @DESCRIPTION:
+# The URI to the repository.
+: ${EDARCS_REPOSITORY:=}
+
+# @ECLASS-VARIABLE: EDARCS_OFFLINE
+# @USER_VARIABLE
+# @DESCRIPTION:
+# Set this variable to a non-empty value to disable the automatic updating of
+# a darcs repository. This is intended to be set outside the darcs source
+# tree by users. Defaults to EVCS_OFFLINE value.
+: ${EDARCS_OFFLINE:=${EVCS_OFFLINE}}
+
+# @ECLASS-VARIABLE: EDARCS_CLEAN
+# @DESCRIPTION:
+# Set this to something to get a clean copy when updating
+# (removes the working directory, then uses EDARCS_GET_CMD to
+# re-download it.)
+: ${EDARCS_CLEAN:=}
+
+# --- end ebuild-configurable settings ---
+
+PROPERTIES+=" live"
+
+case ${EAPI:-0} in
+	[0-6]) # no need to care about 5-HDEPEND and similar
+		DEPEND="dev-vcs/darcs
+			net-misc/rsync"
+		;;
+	*)
+		BDEPEND="dev-vcs/darcs
+			net-misc/rsync"
+		;;
+esac
+
+# @FUNCTION: darcs_patchcount
+# @INTERNAL
+# @DESCRIPTION:
+# Internal function to determine amount of patches in repository.
+darcs_patchcount() {
+	set -- $(HOME="${EDARCS_TOP_DIR}" ${EDARCS_DARCS_CMD} show repo --repodir="${EDARCS_TOP_DIR}/${EDARCS_LOCALREPO}" | grep "Num Patches")
+	# handle string like: "    Num Patches: 3860"
+	echo ${3}
+}
+
+# @FUNCTION: darcs_fetch
+# @INTERNAL
+# @DESCRIPTION:
+# Internal function is called from darcs_src_unpack
+darcs_fetch() {
+	# The local directory to store the repository (useful to ensure a
+	# unique local name); relative to EDARCS_TOP_DIR
+	[[ -z ${EDARCS_LOCALREPO} ]] && [[ -n ${EDARCS_REPOSITORY} ]] \
+		&& EDARCS_LOCALREPO=${EDARCS_REPOSITORY%/} \
+		&& EDARCS_LOCALREPO=${EDARCS_LOCALREPO##*/}
+
+	debug-print-function ${FUNCNAME} $*
+
+	if [[ -n ${EDARCS_CLEAN} ]]; then
+		addwrite "${EDARCS_TOP_DIR}/${EDARCS_LOCALREPO}"
+		rm -rf "${EDARCS_TOP_DIR}/${EDARCS_LOCALREPO}"
+	fi
+
+	# create the top dir if needed
+	if [[ ! -d ${EDARCS_TOP_DIR} ]]; then
+		# note that the addwrite statements in this block are only there to allow creating EDARCS_TOP_DIR;
+		# we've already allowed writing inside it
+		# this is because it's simpler than trying to find out the parent path of the directory, which
+		# would need to be the real path and not a symlink for things to work (so we can't just remove
+		# the last path element in the string)
+		debug-print "${FUNCNAME}: checkout mode. creating darcs directory"
+		addwrite /foobar
+		addwrite /
+		mkdir -p "${EDARCS_TOP_DIR}"
+		export SANDBOX_WRITE="${SANDBOX_WRITE//:\/foobar:\/}"
+	fi
+
+	# in case EDARCS_DARCS_DIR is a symlink to a dir, get the real
+	# dir's path, otherwise addwrite() doesn't work.
+	pushd . || die
+	cd -P "${EDARCS_TOP_DIR}" > /dev/null
+	EDARCS_TOP_DIR="`/bin/pwd`"
+
+	# disable the sandbox for this dir
+	addwrite "${EDARCS_TOP_DIR}"
+
+	# determine checkout or update mode and change to the right directory.
+	if [[ ! -d "${EDARCS_TOP_DIR}/${EDARCS_LOCALREPO}/_darcs" ]]; then
+		mode=get
+		cd "${EDARCS_TOP_DIR}"
+	else
+		mode=update
+		cd "${EDARCS_TOP_DIR}/${EDARCS_LOCALREPO}"
+	fi
+
+	# commands to run
+	local    cmdget="${EDARCS_DARCS_CMD} ${EDARCS_GET_CMD}          ${EDARCS_OPTIONS} --repo-name=${EDARCS_LOCALREPO} ${EDARCS_REPOSITORY}"
+	local cmdupdate="${EDARCS_DARCS_CMD} ${EDARCS_UPDATE_CMD} --all ${EDARCS_OPTIONS}                                 ${EDARCS_REPOSITORY}"
+
+	if [[ ${mode} == "get" ]]; then
+		einfo "Running ${cmdget}"
+		HOME="${EDARCS_TOP_DIR}" ${cmdget} || die "darcs get command failed"
+	elif [[ -n ${EDARCS_OFFLINE} ]] ; then
+		einfo "Offline update"
+	elif [[ ${mode} == "update" ]]; then
+		einfo "Running ${cmdupdate}"
+		HOME="${EDARCS_TOP_DIR}" ${cmdupdate} || die "darcs update command failed"
+	fi
+
+	export EDARCS_PATCHCOUNT=$(darcs_patchcount)
+	einfo "    patches in repo: ${EDARCS_PATCHCOUNT}"
+
+	popd || die
+}
+
+# @FUNCTION: darcs_src_unpack
+# @DESCRIPTION:
+# src_upack function
+darcs_src_unpack() {
+	# The local directory to store the repository (useful to ensure a
+	# unique local name); relative to EDARCS_TOP_DIR
+	[[ -z ${EDARCS_LOCALREPO} ]] && [[ -n ${EDARCS_REPOSITORY} ]] \
+		&& EDARCS_LOCALREPO=${EDARCS_REPOSITORY%/} \
+		&& EDARCS_LOCALREPO=${EDARCS_LOCALREPO##*/}
+
+	debug-print-function ${FUNCNAME} $*
+
+	debug-print "${FUNCNAME}: init:
+	EDARCS_DARCS_CMD=${EDARCS_DARCS_CMD}
+	EDARCS_GET_CMD=${EDARCS_GET_CMD}
+	EDARCS_UPDATE_CMD=${EDARCS_UPDATE_CMD}
+	EDARCS_OPTIONS=${EDARCS_OPTIONS}
+	EDARCS_TOP_DIR=${EDARCS_TOP_DIR}
+	EDARCS_REPOSITORY=${EDARCS_REPOSITORY}
+	EDARCS_LOCALREPO=${EDARCS_LOCALREPO}
+	EDARCS_CLEAN=${EDARCS_CLEAN}"
+
+	einfo "Fetching darcs repository ${EDARCS_REPOSITORY} into ${EDARCS_TOP_DIR}..."
+	darcs_fetch
+
+	einfo "Copying ${EDARCS_LOCALREPO} from ${EDARCS_TOP_DIR}..."
+	debug-print "Copying ${EDARCS_LOCALREPO} from ${EDARCS_TOP_DIR}..."
+
+	# probably redundant, but best to make sure
+	# Use ${WORKDIR}/${P} rather than ${S} so user can point ${S} to something inside.
+	mkdir -p "${WORKDIR}/${P}"
+
+	eshopts_push -s dotglob	# get any dotfiles too.
+	rsync -rlpgo "${EDARCS_TOP_DIR}/${EDARCS_LOCALREPO}"/* "${WORKDIR}/${P}"
+	eshopts_pop
+
+	einfo "Darcs repository contents are now in ${WORKDIR}/${P}"
+
+}
+
+EXPORT_FUNCTIONS src_unpack


^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [gentoo-commits] proj/lisp:master commit in: eclass/
@ 2022-04-03 17:56 Ulrich Müller
  0 siblings, 0 replies; 32+ messages in thread
From: Ulrich Müller @ 2022-04-03 17:56 UTC (permalink / raw
  To: gentoo-commits

commit:     911f6f5857051b7ebdd4e04284bf22bbc5686d34
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Sun Apr  3 17:56:03 2022 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Sun Apr  3 17:56:03 2022 +0000
URL:        https://gitweb.gentoo.org/proj/lisp.git/commit/?id=911f6f58

darcs.eclass: @ECLASS-VARIABLE renamed to @ECLASS_VARIABLE

Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>

 eclass/darcs.eclass | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/eclass/darcs.eclass b/eclass/darcs.eclass
index 1ed886fb..6728f3c2 100644
--- a/eclass/darcs.eclass
+++ b/eclass/darcs.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 # @ECLASS: darcs.eclass
@@ -38,39 +38,39 @@ SRC_URI=""
 # --- begin ebuild-configurable settings
 
 # darcs command to run
-# @ECLASS-VARIABLE: EDARCS_DARCS_CMD
+# @ECLASS_VARIABLE: EDARCS_DARCS_CMD
 # @DESCRIPTION:
 # Path to darcs binary.
 : ${EDARCS_DARCS_CMD:=darcs}
 
 # darcs commands with command-specific options
 
-# @ECLASS-VARIABLE: EDARCS_GET_CMD
+# @ECLASS_VARIABLE: EDARCS_GET_CMD
 # @DESCRIPTION:
 # First fetch darcs command.
 : ${EDARCS_GET_CMD:=get --lazy}
 
-# @ECLASS-VARIABLE: EDARCS_UPDATE_CMD
+# @ECLASS_VARIABLE: EDARCS_UPDATE_CMD
 # @DESCRIPTION:
 # Repo update darcs command.
 : ${EDARCS_UPDATE_CMD:=pull}
 
-# @ECLASS-VARIABLE: EDARCS_OPTIONS
+# @ECLASS_VARIABLE: EDARCS_OPTIONS
 # @DESCRIPTION:
 # Options to pass to both the "get" and "update" commands
 : ${EDARCS_OPTIONS:=--set-scripts-executable}
 
-# @ECLASS-VARIABLE: EDARCS_TOP_DIR
+# @ECLASS_VARIABLE: EDARCS_TOP_DIR
 # @DESCRIPTION:
 # Where the darcs repositories are stored/accessed
 : ${EDARCS_TOP_DIR:=${PORTAGE_ACTUAL_DISTDIR-${DISTDIR}}/darcs-src}
 
-# @ECLASS-VARIABLE: EDARCS_REPOSITORY
+# @ECLASS_VARIABLE: EDARCS_REPOSITORY
 # @DESCRIPTION:
 # The URI to the repository.
 : ${EDARCS_REPOSITORY:=}
 
-# @ECLASS-VARIABLE: EDARCS_OFFLINE
+# @ECLASS_VARIABLE: EDARCS_OFFLINE
 # @USER_VARIABLE
 # @DESCRIPTION:
 # Set this variable to a non-empty value to disable the automatic updating of
@@ -78,7 +78,7 @@ SRC_URI=""
 # tree by users. Defaults to EVCS_OFFLINE value.
 : ${EDARCS_OFFLINE:=${EVCS_OFFLINE}}
 
-# @ECLASS-VARIABLE: EDARCS_CLEAN
+# @ECLASS_VARIABLE: EDARCS_CLEAN
 # @DESCRIPTION:
 # Set this to something to get a clean copy when updating
 # (removes the working directory, then uses EDARCS_GET_CMD to


^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [gentoo-commits] proj/lisp:master commit in: eclass/
@ 2023-06-16 10:42 Ulrich Müller
  0 siblings, 0 replies; 32+ messages in thread
From: Ulrich Müller @ 2023-06-16 10:42 UTC (permalink / raw
  To: gentoo-commits

commit:     a71b6049cec777cc4091d4587dcfce17b5fba18e
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Fri Jun 16 10:40:20 2023 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Fri Jun 16 10:40:52 2023 +0000
URL:        https://gitweb.gentoo.org/proj/lisp.git/commit/?id=a71b6049

common-lisp-3.eclass: Sync from gentoo repository

Keep inheriting eutils in EAPI 6 for now.

Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>

 eclass/common-lisp-3.eclass | 37 ++++++++++++++++++++++++++++---------
 1 file changed, 28 insertions(+), 9 deletions(-)

diff --git a/eclass/common-lisp-3.eclass b/eclass/common-lisp-3.eclass
index d68b4250..0c4d1d0c 100644
--- a/eclass/common-lisp-3.eclass
+++ b/eclass/common-lisp-3.eclass
@@ -1,15 +1,23 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 # @ECLASS: common-lisp-3.eclass
 # @MAINTAINER:
 # Common Lisp project <common-lisp@gentoo.org>
+# @SUPPORTED_EAPIS: 6 7
 # @BLURB: functions to support the installation of Common Lisp libraries
 # @DESCRIPTION:
 # Since Common Lisp libraries share similar structure, this eclass aims
 # to provide a simple way to write ebuilds with these characteristics.
 
-inherit eutils
+case ${EAPI} in
+	6) inherit eutils ;;
+	7) ;;
+	*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
+esac
+
+if [[ -z ${_COMMON_LISP_3_ECLASS} ]]; then
+_COMMON_LISP_3_ECLASS=1
 
 # @ECLASS_VARIABLE: CLIMPLEMENTATIONS
 # @DESCRIPTION:
@@ -36,8 +44,6 @@ CLPACKAGE="${PN}"
 
 PDEPEND="virtual/commonlisp"
 
-EXPORT_FUNCTIONS src_compile src_install
-
 # @FUNCTION: common-lisp-3_src_compile
 # @DESCRIPTION:
 # Since there's nothing to build in most cases, default doesn't do
@@ -120,7 +126,17 @@ common-lisp-install-sources() {
 		if [[ -f ${path} ]] ; then
 			common-lisp-install-one-source ${fpredicate} "${path}" "$(dirname "${path}")"
 		elif [[ -d ${path} ]] ; then
-			common-lisp-install-sources -t ${ftype} $(find "${path}" -type f)
+			local files
+			# test can be dropped in EAPI 8 which guarantees bash-5.0
+			if [[ ${BASH_VERSINFO[0]} -ge 5 ]]; then
+				readarray -d '' files < <(find "${path}" -type f -print0 \
+											|| die "cannot traverse ${path}")
+			else
+				# readarray has no -d option in bash-4.2
+				readarray -t files < <(find "${path}" -type f -print \
+											|| die "cannot traverse ${path}" )
+			fi
+			common-lisp-install-sources -t ${ftype} "${files[@]}"
 		else
 			die "${path} is neither a regular file nor a directory"
 		fi
@@ -136,7 +152,7 @@ common-lisp-install-one-asdf() {
 	[[ $# != 1 ]] && die "${FUNCNAME[0]} must receive exactly one argument"
 
 	# the suffix «.asd» is optional
-	local source=${1/.asd}.asd
+	local source=${1%.asd}.asd
 	common-lisp-install-one-source true "${source}" "$(dirname "${source}")"
 	local target="${CLSOURCEROOT%/}/${CLPACKAGE}/${source}"
 	dosym "${target}" "${CLSYSTEMROOT%/}/$(basename ${target})"
@@ -164,9 +180,7 @@ common-lisp-install-asdf() {
 common-lisp-3_src_install() {
 	common-lisp-install-sources .
 	common-lisp-install-asdf
-	for i in AUTHORS README* HEADER TODO* CHANGELOG Change[lL]og CHANGES BUGS CONTRIBUTORS *NEWS* ; do
-		[[ -f ${i} ]] && dodoc ${i}
-	done
+	einstalldocs
 }
 
 # @FUNCTION: common-lisp-find-lisp-impl
@@ -197,6 +211,7 @@ common-lisp-export-impl-args() {
 	CL_BINARY="${1}"
 	case "${CL_BINARY}" in
 		sbcl)
+			CL_BINARY="${CL_BINARY} --non-interactive"
 			CL_NORC="--sysinit /dev/null --userinit /dev/null"
 			CL_LOAD="--load"
 			CL_EVAL="--eval"
@@ -234,3 +249,7 @@ common-lisp-export-impl-args() {
 	esac
 	export CL_BINARY CL_NORC CL_LOAD CL_EVAL
 }
+
+fi
+
+EXPORT_FUNCTIONS src_compile src_install


^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [gentoo-commits] proj/lisp:master commit in: eclass/
@ 2023-06-16 18:19 Ulrich Müller
  0 siblings, 0 replies; 32+ messages in thread
From: Ulrich Müller @ 2023-06-16 18:19 UTC (permalink / raw
  To: gentoo-commits

commit:     bcbae3ec398b3ce5f0785b56a84601f1819ad610
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Fri Jun 16 10:40:20 2023 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Fri Jun 16 18:19:09 2023 +0000
URL:        https://gitweb.gentoo.org/proj/lisp.git/commit/?id=bcbae3ec

common-lisp-3.eclass: Sync from gentoo repository

Keep inheriting eutils in EAPI 6 for now.

Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>

 eclass/common-lisp-3.eclass | 40 +++++++++++++++++++++++++++++++---------
 1 file changed, 31 insertions(+), 9 deletions(-)

diff --git a/eclass/common-lisp-3.eclass b/eclass/common-lisp-3.eclass
index d68b4250..7afb63bd 100644
--- a/eclass/common-lisp-3.eclass
+++ b/eclass/common-lisp-3.eclass
@@ -1,15 +1,26 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 # @ECLASS: common-lisp-3.eclass
 # @MAINTAINER:
 # Common Lisp project <common-lisp@gentoo.org>
+# @SUPPORTED_EAPIS: 6 7
 # @BLURB: functions to support the installation of Common Lisp libraries
 # @DESCRIPTION:
 # Since Common Lisp libraries share similar structure, this eclass aims
 # to provide a simple way to write ebuilds with these characteristics.
 
-inherit eutils
+case ${EAPI} in
+	6|7) ;;
+	*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
+esac
+
+if [[ -z ${_COMMON_LISP_3_ECLASS} ]]; then
+_COMMON_LISP_3_ECLASS=1
+
+case ${EAPI} in
+	6) inherit eutils ;;
+esac
 
 # @ECLASS_VARIABLE: CLIMPLEMENTATIONS
 # @DESCRIPTION:
@@ -36,8 +47,6 @@ CLPACKAGE="${PN}"
 
 PDEPEND="virtual/commonlisp"
 
-EXPORT_FUNCTIONS src_compile src_install
-
 # @FUNCTION: common-lisp-3_src_compile
 # @DESCRIPTION:
 # Since there's nothing to build in most cases, default doesn't do
@@ -120,7 +129,17 @@ common-lisp-install-sources() {
 		if [[ -f ${path} ]] ; then
 			common-lisp-install-one-source ${fpredicate} "${path}" "$(dirname "${path}")"
 		elif [[ -d ${path} ]] ; then
-			common-lisp-install-sources -t ${ftype} $(find "${path}" -type f)
+			local files
+			# test can be dropped in EAPI 8 which guarantees bash-5.0
+			if [[ ${BASH_VERSINFO[0]} -ge 5 ]]; then
+				readarray -d '' files < <(find "${path}" -type f -print0 \
+											|| die "cannot traverse ${path}")
+			else
+				# readarray has no -d option in bash-4.2
+				readarray -t files < <(find "${path}" -type f -print \
+											|| die "cannot traverse ${path}")
+			fi
+			common-lisp-install-sources -t ${ftype} "${files[@]}"
 		else
 			die "${path} is neither a regular file nor a directory"
 		fi
@@ -136,7 +155,7 @@ common-lisp-install-one-asdf() {
 	[[ $# != 1 ]] && die "${FUNCNAME[0]} must receive exactly one argument"
 
 	# the suffix «.asd» is optional
-	local source=${1/.asd}.asd
+	local source=${1%.asd}.asd
 	common-lisp-install-one-source true "${source}" "$(dirname "${source}")"
 	local target="${CLSOURCEROOT%/}/${CLPACKAGE}/${source}"
 	dosym "${target}" "${CLSYSTEMROOT%/}/$(basename ${target})"
@@ -164,9 +183,7 @@ common-lisp-install-asdf() {
 common-lisp-3_src_install() {
 	common-lisp-install-sources .
 	common-lisp-install-asdf
-	for i in AUTHORS README* HEADER TODO* CHANGELOG Change[lL]og CHANGES BUGS CONTRIBUTORS *NEWS* ; do
-		[[ -f ${i} ]] && dodoc ${i}
-	done
+	einstalldocs
 }
 
 # @FUNCTION: common-lisp-find-lisp-impl
@@ -197,6 +214,7 @@ common-lisp-export-impl-args() {
 	CL_BINARY="${1}"
 	case "${CL_BINARY}" in
 		sbcl)
+			CL_BINARY="${CL_BINARY} --non-interactive"
 			CL_NORC="--sysinit /dev/null --userinit /dev/null"
 			CL_LOAD="--load"
 			CL_EVAL="--eval"
@@ -234,3 +252,7 @@ common-lisp-export-impl-args() {
 	esac
 	export CL_BINARY CL_NORC CL_LOAD CL_EVAL
 }
+
+fi
+
+EXPORT_FUNCTIONS src_compile src_install


^ permalink raw reply related	[flat|nested] 32+ messages in thread

end of thread, other threads:[~2023-06-16 18:19 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-16 18:19 [gentoo-commits] proj/lisp:master commit in: eclass/ Ulrich Müller
  -- strict thread matches above, loose matches on Subject: below --
2023-06-16 10:42 Ulrich Müller
2022-04-03 17:56 Ulrich Müller
2022-04-01 11:12 Ulrich Müller
2022-03-26 17:29 Ulrich Müller
2022-03-24  6:54 Ulrich Müller
2022-03-13 20:27 Ulrich Müller
2022-03-13 20:21 Ulrich Müller
2020-02-11 21:25 Ulrich Müller
2019-08-08 21:24 Ulrich Müller
2019-08-08 21:24 Ulrich Müller
2018-06-21 14:40 José María Alonso
2018-05-31 16:10 José María Alonso
2018-05-31 16:08 José María Alonso
2018-05-19 14:01 José María Alonso
2018-05-18 19:56 José María Alonso
2018-03-17 21:30 José María Alonso
2017-12-10 19:56 José María Alonso
2017-10-28 14:29 José María Alonso
2017-10-28 14:27 José María Alonso
2017-10-28 14:25 José María Alonso
2017-10-06 21:21 José María Alonso
2017-08-29 15:23 José María Alonso
2017-08-22 21:36 José María Alonso
2017-08-22 21:33 José María Alonso
2017-08-22 21:32 José María Alonso
2017-08-22 21:28 José María Alonso
2016-11-30 14:25 José María Alonso
2016-11-29 22:43 José María Alonso
2016-06-17 16:01 José María Alonso
2015-08-18 21:24 José María Alonso
2013-04-04 19:10 Stelian Ionescu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox