public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2020-04-06 18:26 Andrew Ammerlaan
  0 siblings, 0 replies; 180+ messages in thread
From: Andrew Ammerlaan @ 2020-04-06 18:26 UTC (permalink / raw
  To: gentoo-commits

commit:     86aaf699516ed9815f3f8df4ae232603d8b6dadd
Author:     Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net>
AuthorDate: Mon Apr  6 18:13:07 2020 +0000
Commit:     Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net>
CommitDate: Mon Apr  6 18:13:07 2020 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=86aaf699

eclass/docs: WIP: mkdocs/sphinx doc building

A small eclass for building documentation. Currently supports
building documentation with mkdocs or sphinx. Should work
togheter with distutils-r1 eclass, though this is not required.

The aim is to make it easy to add additional doc builders to the
eclass, just add an setup and compile function for it.
Distutils-r1 eclass also supports sphinx doc building, but this
eclass should also allow sphinx doc building for non-python
packages.

Please feel free to test this eclass on your ebuilds that
use mkdocs doc building or non-pyhton sphinx doc building.
See the in-file documentation on how to use it. That being
said this is still experimental: If the documentation is
unclear, or if you encouter issues, please let me know.

Package-Manager: Portage-2.3.96, Repoman-2.3.22
Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> riseup.net>

 eclass/docs.eclass | 306 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 306 insertions(+)

diff --git a/eclass/docs.eclass b/eclass/docs.eclass
new file mode 100644
index 0000000..618d8a5
--- /dev/null
+++ b/eclass/docs.eclass
@@ -0,0 +1,306 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# @ECLASS: docs.eclass
+# @MAINTAINER:
+# Andrew Ammerlaan <andrewammerlaan@riseup.net>
+# @AUTHOR:
+# Author: Andrew Ammerlaan <andrewammerlaan@riseup.net>
+# Based on the work of: Michał Górny <mgorny@gentoo.org>
+# @SUPPORTED_EAPIS: 5 6 7
+# @BLURB: A simple eclass to build documentation.
+# @DESCRIPTION:
+# A simple eclass providing functions to build documentation.
+#
+# Please note that docs sets RDEPEND and DEPEND unconditionally
+# for you.
+#
+# This eclass also appends "doc" to IUSE, and sets HTML_DOCS
+# to the location of the compiled documentation
+#
+# The aim of this eclass is to make it easy to add additional
+# doc builders. To do this, add a <DOCBUILDER>-setup and
+# <DOCBUILDER>-build function for your doc builder.
+# For python based doc builders you can use the 
+# python_append_deps function to append [${PYTHON_USEDEP}]
+# automatically to additional dependencies
+#
+# For more information, please see the Python Guide:
+# https://dev.gentoo.org/~mgorny/python-guide/
+
+case "${EAPI:-0}" in
+	0|1|2|3|4)
+		die "Unsupported EAPI=${EAPI:-0} (too old) for ${ECLASS}"
+		;;
+	5|6|7)
+		;;
+	*)
+		die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}"
+		;;
+esac
+
+# @ECLASS-VARIABLE: DOCBUILDER
+# @REQUIRED
+# @PRE_INHERIT
+# @DESCRIPTION:
+# Sets the doc builder to use, currently supports
+# sphinx and mkdocs
+
+# @ECLASS-VARIABLE: DOCDIR
+# @DESCRIPTION:
+# Sets the location of the doc builder config file.
+#
+# For sphinx this is the location of "conf.py"
+# For mkdocs this is the location of "mkdocs.yml"
+#
+# Note that mkdocs.yml often does not reside
+# in the same directory as the actual doc files
+#
+# Defaults to ${S}
+
+# @ECLASS-VARIABLE: DOCDEPEND
+# @DEFAULT_UNSET
+# @PRE_INHERIT
+# @DESCRIPTION:
+# Sets additional dependencies to build docs.
+# For sphinx and mkdocs these dependencies should
+# be specified without [${PYTHON_USEDEP}], this
+# is added by the eclass. E.g. to depend on mkdocs-material:
+#
+# DOCDEPEND="dev-python/mkdocs-material"
+
+# @ECLASS-VARIABLE: AUTODOC
+# @PRE_INHERIT
+# @DESCRIPTION:
+# Sets whether to use sphinx.ext.autodoc/mkautodoc
+# Defaults to 1 (True) for sphinx, and 0 (False) for mkdocs
+
+# @ECLASS-VARIABLE: OUTDIR
+# @DESCRIPTION:
+# Sets where the compiled files will be put.
+# There's no real reason to change this, but this
+# variable is useful if you want to overwrite the HTML_DOCS
+# added by this eclass. E.g.:
+#
+# HTML_DOCS=( "${yourdocs}" "${OUTDIR}/." )
+#
+# Defaults to ${DOCDIR}/_build/html
+
+# If PYHTON_COMPAT is not defined this is not a python
+# package, if it is defined, odds are that either
+# distutils-r1 or python-r1 is inherited as well
+# in this case we cannot inherit python-any-r1
+# because these eclasses are incompatible.
+# We also need to set 'something' to be able
+# to inherit python-any-r1 at all
+if [[ ! ${PYTHON_COMPAT} ]]; then
+	PYTHON_COMPAT=( python3_{6,7,8} )
+	inherit python-any-r1
+else
+	inherit python-r1
+fi
+
+# @FUNCTION: python_check_deps
+# @DESCRIPTION:
+# Check if the dependencies are valid
+python_check_deps() {
+	debug-print-function ${FUNCNAME}
+	use doc || return 0
+
+	local dep
+	for dep in ${DOCDEPEND[@]}; do
+		has_version "${dep}[${PYTHON_USEDEP}]" || return 1
+	done
+}
+
+# @FUNCTION: python_append_dep
+# @DESCRIPTION:
+# Appends [\${PYTHON_USEDEP}] to all dependencies
+# for python based DOCBUILDERs such as mkdocs or
+# sphinx.
+python_append_deps() {
+	debug-print-function ${FUNCNAME}
+
+	local temp=()
+	local dep
+	for dep in ${DOCDEPEND[@]}; do
+		temp+=" ${dep}"
+	done
+	DOCDEPEND=${temp}
+}
+
+# @FUNCTION: sphinx_setup
+# @DESCRIPTION:
+# Sets dependencies for sphinx
+sphinx_setup() {
+	debug-print-function ${FUNCNAME}
+
+	: ${AUTODOC:=1}
+
+	if [[ ! ${AUTODOC} == 1 && -n ${DEPS} ]]; then
+		die "${FUNCNAME}: do not set autodoc to 0 if external plugins are used"
+	fi
+	if [[ ${AUTODOC} == 1 ]]; then
+		deps="$(python_gen_any_dep "
+			dev-python/sphinx[\${PYTHON_USEDEP}]
+			${DOCDEPEND}")"
+
+	else
+		deps="dev-python/sphinx"
+	fi
+}
+
+# @FUNCTION: sphinx_compile
+# @DESCRIPTION:
+# Calls sphinx to build docs.
+#
+# If you overwrite src_compile or python_compile_all
+# do not call this function, call docs_compile instead
+sphinx_compile() {
+	debug-print-function ${FUNCNAME}
+	use doc || return
+
+	local confpy=${DOCDIR}/conf.py
+	[[ -f ${confpy} ]] ||
+		die "${confpy} not found, distutils_enable_sphinx call wrong"
+
+	if [[ ${AUTODOC} == 0 ]]; then
+		if grep -F -q 'sphinx.ext.autodoc' "${confpy}"; then
+			die "distutils_enable_sphinx: autodoc disabled but sphinx.ext.autodoc found in ${confpy}"
+		fi
+	elif [[ -z ${DEPS[@]} ]]; then
+		if ! grep -F -q 'sphinx.ext.autodoc' "${confpy}"; then
+			die "distutils_enable_sphinx: sphinx.ext.autodoc not found in ${confpy}, set AUTODOC=0"
+		fi
+	fi
+	
+	sed -i -e 's:^intersphinx_mapping:disabled_&:' \
+		"${DOCDIR}"/conf.py || die
+	# not all packages include the Makefile in pypi tarball
+	sphinx-build -b html -d "${DOCDIR}"/_build/doctrees "${DOCDIR}" \
+	"${OUTDIR}" || die
+}
+
+# @FUNCTION: mkdocs_setup
+# @DESCRIPTION:
+# Sets dependencies for mkdocs
+mkdocs_setup() {
+	debug-print-function ${FUNCNAME}
+
+	: ${AUTODOC:=0}
+
+	if [[ ${AUTODOC} == 1 ]]; then
+		deps="$(python_gen_any_dep "
+			dev-python/mkdocs[\${PYTHON_USEDEP}]
+			dev-python/mkautodoc[\${PYTHON_USEDEP}]
+		${DOCDEPEND}")"
+	else
+		deps="$(python_gen_any_dep "
+			dev-python/mkdocs[\${PYTHON_USEDEP}]
+			${DOCDEPEND}")"
+	fi
+}
+
+# @FUNCTION: mkdocs_compile
+# @DESCRIPTION:
+# Calls mkdocs to build docs.
+#
+# If you overwrite src_compile or python_compile_all
+# do not call this function, call docs_compile instead
+mkdocs_compile() {
+	debug-print-function ${FUNCNAME}
+	use doc || return
+
+	local mkdocsyml=${DOCDIR}/mkdocs.yml
+	[[ -f ${mkdocsyml} ]] ||
+		die "${mkdocsyml} not found, distutils_enable_mkdocs call wrong"
+
+	pushd "${DOCDIR}"
+	mkdocs build -d "${OUTDIR}" || die
+	popd
+
+	# remove generated .gz variants
+	# mkdocs currently has no option to disable this
+	# and portage complains: "Colliding files found by ecompress"
+	rm "${OUTDIR}"/*.gz || die
+}
+
+# @FUNCTION: docs_compile
+# @DESCRIPTION:
+# Calls DOCBUILDER and sets HTML_DOCS
+#
+# This function must be called in global scope.  Take care not to
+# overwrite the variables set by it. Has support for distutils-r1
+# eclass, but only if this eclass is inherited *after*
+# distutils-r1. If you need to extend src_compile() or
+# python_compile_all(), you can call the original implementation
+# as docs_compile.
+docs_compile() {
+	debug-print-function ${FUNCNAME}
+	use doc || return
+
+	# Set a sensible default as DOCDIR
+	: ${DOCDIR:="${S}"}
+
+	# Where to put the compiled files?
+	: ${OUTDIR:="${DOCDIR}/_build/html"}
+
+	case "${DOCBUILDER}" in
+		"sphinx")
+			sphinx_compile
+			;;
+		"mkdocs")
+			mkdocs_compile
+			;;
+		"")
+			die "DOCBUILDER unset, should be set to use ${ECLASS}"
+			;;
+		*)
+			die "Unsupported DOCBUILDER=${DOCBUILDER} (unknown) for ${ECLASS}"
+			;;
+	esac
+
+	HTML_DOCS+=( "${OUTDIR}/." )
+
+	# we need to ensure successful return in case we're called last,
+	# otherwise Portage may wrongly assume sourcing failed
+	return 0
+}
+
+
+# This is where we setup the USE/(B)DEPEND variables
+# and call the doc builder specific setup functions
+IUSE+=" doc"
+
+# Call the correct setup function
+case "${DOCBUILDER}" in
+	"sphinx")
+		python_append_deps
+		sphinx_setup
+		;;
+	"mkdocs")
+		python_append_deps
+		mkdocs_setup
+		;;
+	"")
+		die "DOCBUILDER unset, should be set to use ${ECLASS}"
+		;;
+	*)
+		die "Unsupported DOCBUILDER=${DOCBUILDER} (unknown) for ${ECLASS}"
+		;;
+esac
+
+if [[ ${EAPI} == [56] ]]; then
+	DEPEND+=" doc? ( ${deps} )"
+else
+	BDEPEND+=" doc? ( ${deps} )"
+fi
+
+# If this is a python package using distutils-r1
+# then put the compile function in the specific
+# python function, else just put it in src_compile
+if [[ ${DISTUTILS_USE_SETUPTOOLS} ]]; then
+	python_compile_all() { docs_compile; }
+else
+	src_compile() { docs_compile; }
+fi


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
  2020-04-07  7:42 [gentoo-commits] repo/proj/guru:master " Andrew Ammerlaan
@ 2020-04-06 18:45 ` Andrew Ammerlaan
  0 siblings, 0 replies; 180+ messages in thread
From: Andrew Ammerlaan @ 2020-04-06 18:45 UTC (permalink / raw
  To: gentoo-commits

commit:     fc93a7a89a63b07e103b38e640185b510c18b7c3
Author:     Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net>
AuthorDate: Mon Apr  6 18:44:36 2020 +0000
Commit:     Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net>
CommitDate: Mon Apr  6 18:44:36 2020 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=fc93a7a8

eclass/docs: small fixes

Package-Manager: Portage-2.3.96, Repoman-2.3.22
Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> riseup.net>

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

diff --git a/eclass/docs.eclass b/eclass/docs.eclass
index 618d8a5..e3eaaa3 100644
--- a/eclass/docs.eclass
+++ b/eclass/docs.eclass
@@ -93,7 +93,7 @@ esac
 # because these eclasses are incompatible.
 # We also need to set 'something' to be able
 # to inherit python-any-r1 at all
-if [[ ! ${PYTHON_COMPAT} ]]; then
+if [[ -z "${PYTHON_COMPAT}" ]]; then
 	PYTHON_COMPAT=( python3_{6,7,8} )
 	inherit python-any-r1
 else
@@ -299,7 +299,7 @@ fi
 # If this is a python package using distutils-r1
 # then put the compile function in the specific
 # python function, else just put it in src_compile
-if [[ ${DISTUTILS_USE_SETUPTOOLS} ]]; then
+if [[ -n "${DISTUTILS_USE_SETUPTOOLS}" ]]; then
 	python_compile_all() { docs_compile; }
 else
 	src_compile() { docs_compile; }


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
  2020-04-07  7:42 [gentoo-commits] repo/proj/guru:master " Andrew Ammerlaan
@ 2020-04-06 19:36 ` Andrew Ammerlaan
  0 siblings, 0 replies; 180+ messages in thread
From: Andrew Ammerlaan @ 2020-04-06 19:36 UTC (permalink / raw
  To: gentoo-commits

commit:     764e4b954b8df8d9f1393fe514425c736f03aaf6
Author:     Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net>
AuthorDate: Mon Apr  6 19:35:11 2020 +0000
Commit:     Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net>
CommitDate: Mon Apr  6 19:35:47 2020 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=764e4b95

eclass/docs: USE these handy _ECLASS variables

to check if python-(any)-r1 has been inherited

Package-Manager: Portage-2.3.96, Repoman-2.3.22
Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> riseup.net>

 eclass/docs.eclass | 38 +++++++++++++++++++++++---------------
 1 file changed, 23 insertions(+), 15 deletions(-)

diff --git a/eclass/docs.eclass b/eclass/docs.eclass
index e3eaaa3..2f243bd 100644
--- a/eclass/docs.eclass
+++ b/eclass/docs.eclass
@@ -86,18 +86,23 @@ esac
 #
 # Defaults to ${DOCDIR}/_build/html
 
-# If PYHTON_COMPAT is not defined this is not a python
-# package, if it is defined, odds are that either
-# distutils-r1 or python-r1 is inherited as well
-# in this case we cannot inherit python-any-r1
-# because these eclasses are incompatible.
-# We also need to set 'something' to be able
-# to inherit python-any-r1 at all
-if [[ -z "${PYTHON_COMPAT}" ]]; then
-	PYTHON_COMPAT=( python3_{6,7,8} )
-	inherit python-any-r1
-else
-	inherit python-r1
+if [[ ! ${_DOCS} ]]; then
+
+# For the python based DOCBUILDERS we need to inherit python-any-r1
+if [[ "${DOCBUILDER}"=="sphinx" || "${DOCBUILDER}"=="mkdocs" ]]; then
+	# If this is not a python package then
+	# this is not already set, so we need
+	# to set this to inherit python-any-r1
+	if [[ -z "${PYTHON_COMPAT}" ]]; then
+		PYTHON_COMPAT=( python3_{6,7,8} )
+	fi
+
+	# Inherit python-any-r1 if neither python-any-r1 nor
+	# python-r1 have been inherited, because we need the
+	# python_gen_any_dep function
+	if [[ ! ${_PYTHON_R1} && ! ${_PYTHON_ANY_R1} ]]; then
+		inherit python-any-r1
+	fi
 fi
 
 # @FUNCTION: python_check_deps
@@ -162,7 +167,7 @@ sphinx_compile() {
 
 	local confpy=${DOCDIR}/conf.py
 	[[ -f ${confpy} ]] ||
-		die "${confpy} not found, distutils_enable_sphinx call wrong"
+		die "${confpy} not found, DOCDIR=${DOCDIR} call wrong"
 
 	if [[ ${AUTODOC} == 0 ]]; then
 		if grep -F -q 'sphinx.ext.autodoc' "${confpy}"; then
@@ -213,7 +218,7 @@ mkdocs_compile() {
 
 	local mkdocsyml=${DOCDIR}/mkdocs.yml
 	[[ -f ${mkdocsyml} ]] ||
-		die "${mkdocsyml} not found, distutils_enable_mkdocs call wrong"
+		die "${mkdocsyml} not found, DOCDIR=${DOCDIR} wrong"
 
 	pushd "${DOCDIR}"
 	mkdocs build -d "${OUTDIR}" || die
@@ -299,8 +304,11 @@ fi
 # If this is a python package using distutils-r1
 # then put the compile function in the specific
 # python function, else just put it in src_compile
-if [[ -n "${DISTUTILS_USE_SETUPTOOLS}" ]]; then
+if [[ ${_DISTUTILS_R1} ]]; then
 	python_compile_all() { docs_compile; }
 else
 	src_compile() { docs_compile; }
 fi
+
+_DOCS=1
+fi


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2020-04-07  7:16 Andrew Ammerlaan
  0 siblings, 0 replies; 180+ messages in thread
From: Andrew Ammerlaan @ 2020-04-07  7:16 UTC (permalink / raw
  To: gentoo-commits

commit:     316e8573d3edb2936364e24c4c02286453ba5cca
Author:     Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net>
AuthorDate: Tue Apr  7 07:15:30 2020 +0000
Commit:     Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net>
CommitDate: Tue Apr  7 07:16:46 2020 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=316e8573

eclass/docs: many fixes, should work now

Package-Manager: Portage-2.3.96, Repoman-2.3.22
Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> riseup.net>

 eclass/docs.eclass | 77 +++++++++++++++++++++++++++---------------------------
 1 file changed, 39 insertions(+), 38 deletions(-)

diff --git a/eclass/docs.eclass b/eclass/docs.eclass
index 2f243bd..6e4ceea 100644
--- a/eclass/docs.eclass
+++ b/eclass/docs.eclass
@@ -68,6 +68,9 @@ esac
 # is added by the eclass. E.g. to depend on mkdocs-material:
 #
 # DOCDEPEND="dev-python/mkdocs-material"
+#
+# This eclass appends to this variable, so you can
+# call it later in your ebuild again if necessary.
 
 # @ECLASS-VARIABLE: AUTODOC
 # @PRE_INHERIT
@@ -89,21 +92,29 @@ esac
 if [[ ! ${_DOCS} ]]; then
 
 # For the python based DOCBUILDERS we need to inherit python-any-r1
-if [[ "${DOCBUILDER}"=="sphinx" || "${DOCBUILDER}"=="mkdocs" ]]; then
-	# If this is not a python package then
-	# this is not already set, so we need
-	# to set this to inherit python-any-r1
-	if [[ -z "${PYTHON_COMPAT}" ]]; then
-		PYTHON_COMPAT=( python3_{6,7,8} )
-	fi
+case "${DOCBUILDER}" in
+	"sphinx"|"mkdocs")
+		# If this is not a python package then
+		# this is not already set, so we need
+		# to set this to inherit python-any-r1
+		if [[ -z "${PYTHON_COMPAT}" ]]; then
+			PYTHON_COMPAT=( python3_{6,7,8} )
+		fi
 
-	# Inherit python-any-r1 if neither python-any-r1 nor
-	# python-r1 have been inherited, because we need the
-	# python_gen_any_dep function
-	if [[ ! ${_PYTHON_R1} && ! ${_PYTHON_ANY_R1} ]]; then
-		inherit python-any-r1
-	fi
-fi
+		# Inherit python-any-r1 if neither python-any-r1 nor
+		# python-r1 have been inherited, because we need the
+		# python_gen_any_dep function
+		if [[ ! ${_PYTHON_R1} && ! ${_PYTHON_ANY_R1} ]]; then
+			inherit python-any-r1
+		fi
+		;;
+	"")
+		die "DOCBUILDER unset, should be set to use ${ECLASS}"
+		;;
+	*)
+		die "Unsupported DOCBUILDER=${DOCBUILDER} (unknown) for ${ECLASS}"
+		;;
+esac
 
 # @FUNCTION: python_check_deps
 # @DESCRIPTION:
@@ -113,10 +124,12 @@ python_check_deps() {
 	use doc || return 0
 
 	local dep
-	for dep in ${DOCDEPEND[@]}; do
+	for dep in ${check_deps[@]}; do
 		has_version "${dep}[${PYTHON_USEDEP}]" || return 1
 	done
 }
+# Save this before we start manipulating it
+check_deps=${DOCDEPEND}
 
 # @FUNCTION: python_append_dep
 # @DESCRIPTION:
@@ -129,7 +142,7 @@ python_append_deps() {
 	local temp=()
 	local dep
 	for dep in ${DOCDEPEND[@]}; do
-		temp+=" ${dep}"
+		temp+=" ${dep}[\${PYTHON_USEDEP}]"
 	done
 	DOCDEPEND=${temp}
 }
@@ -142,16 +155,16 @@ sphinx_setup() {
 
 	: ${AUTODOC:=1}
 
-	if [[ ! ${AUTODOC} == 1 && -n ${DEPS} ]]; then
+	if [[ ${AUTODOC} == 0 && -n "${DOCDEPEND}" ]]; then
 		die "${FUNCNAME}: do not set autodoc to 0 if external plugins are used"
 	fi
 	if [[ ${AUTODOC} == 1 ]]; then
-		deps="$(python_gen_any_dep "
+		DOCDEPEND="$(python_gen_any_dep "
 			dev-python/sphinx[\${PYTHON_USEDEP}]
 			${DOCDEPEND}")"
 
 	else
-		deps="dev-python/sphinx"
+		DOCDEPEND="dev-python/sphinx"
 	fi
 }
 
@@ -171,11 +184,11 @@ sphinx_compile() {
 
 	if [[ ${AUTODOC} == 0 ]]; then
 		if grep -F -q 'sphinx.ext.autodoc' "${confpy}"; then
-			die "distutils_enable_sphinx: autodoc disabled but sphinx.ext.autodoc found in ${confpy}"
+			die "${FUNCNAME}: autodoc disabled but sphinx.ext.autodoc found in ${confpy}"
 		fi
-	elif [[ -z ${DEPS[@]} ]]; then
+	elif [[ -z ${DOCDEPEND[@]} ]]; then
 		if ! grep -F -q 'sphinx.ext.autodoc' "${confpy}"; then
-			die "distutils_enable_sphinx: sphinx.ext.autodoc not found in ${confpy}, set AUTODOC=0"
+			die "${FUNCNAME}: sphinx.ext.autodoc not found in ${confpy}, set AUTODOC=0"
 		fi
 	fi
 	
@@ -195,12 +208,12 @@ mkdocs_setup() {
 	: ${AUTODOC:=0}
 
 	if [[ ${AUTODOC} == 1 ]]; then
-		deps="$(python_gen_any_dep "
+		DOCDEPEND="$(python_gen_any_dep "
 			dev-python/mkdocs[\${PYTHON_USEDEP}]
 			dev-python/mkautodoc[\${PYTHON_USEDEP}]
 		${DOCDEPEND}")"
 	else
-		deps="$(python_gen_any_dep "
+		DOCDEPEND="$(python_gen_any_dep "
 			dev-python/mkdocs[\${PYTHON_USEDEP}]
 			${DOCDEPEND}")"
 	fi
@@ -257,12 +270,6 @@ docs_compile() {
 		"mkdocs")
 			mkdocs_compile
 			;;
-		"")
-			die "DOCBUILDER unset, should be set to use ${ECLASS}"
-			;;
-		*)
-			die "Unsupported DOCBUILDER=${DOCBUILDER} (unknown) for ${ECLASS}"
-			;;
 	esac
 
 	HTML_DOCS+=( "${OUTDIR}/." )
@@ -287,18 +294,12 @@ case "${DOCBUILDER}" in
 		python_append_deps
 		mkdocs_setup
 		;;
-	"")
-		die "DOCBUILDER unset, should be set to use ${ECLASS}"
-		;;
-	*)
-		die "Unsupported DOCBUILDER=${DOCBUILDER} (unknown) for ${ECLASS}"
-		;;
 esac
 
 if [[ ${EAPI} == [56] ]]; then
-	DEPEND+=" doc? ( ${deps} )"
+	DEPEND+=" doc? ( ${DOCDEPEND} )"
 else
-	BDEPEND+=" doc? ( ${deps} )"
+	BDEPEND+=" doc? ( ${DOCDEPEND} )"
 fi
 
 # If this is a python package using distutils-r1


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2020-04-07  7:27 Andrew Ammerlaan
  0 siblings, 0 replies; 180+ messages in thread
From: Andrew Ammerlaan @ 2020-04-07  7:27 UTC (permalink / raw
  To: gentoo-commits

commit:     94cae4d90a900be26cc13732bbc8c41cb2c47f20
Author:     Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net>
AuthorDate: Tue Apr  7 07:27:24 2020 +0000
Commit:     Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net>
CommitDate: Tue Apr  7 07:27:24 2020 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=94cae4d9

eclass/docs: one more bug fix

Package-Manager: Portage-2.3.96, Repoman-2.3.22
Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> riseup.net>

 eclass/docs.eclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eclass/docs.eclass b/eclass/docs.eclass
index 6e4ceea..c3fb6e3 100644
--- a/eclass/docs.eclass
+++ b/eclass/docs.eclass
@@ -186,7 +186,7 @@ sphinx_compile() {
 		if grep -F -q 'sphinx.ext.autodoc' "${confpy}"; then
 			die "${FUNCNAME}: autodoc disabled but sphinx.ext.autodoc found in ${confpy}"
 		fi
-	elif [[ -z ${DOCDEPEND[@]} ]]; then
+	elif [[ ${AUTODOC} == 1 ]]; then
 		if ! grep -F -q 'sphinx.ext.autodoc' "${confpy}"; then
 			die "${FUNCNAME}: sphinx.ext.autodoc not found in ${confpy}, set AUTODOC=0"
 		fi


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
  2020-04-21 10:20 [gentoo-commits] repo/proj/guru:master " Andrew Ammerlaan
@ 2020-04-21 10:20 ` Andrew Ammerlaan
  0 siblings, 0 replies; 180+ messages in thread
From: Andrew Ammerlaan @ 2020-04-21 10:20 UTC (permalink / raw
  To: gentoo-commits

commit:     117147f43ceec694083a3c4749a6ecde64f76ade
Author:     Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net>
AuthorDate: Tue Apr 21 10:18:08 2020 +0000
Commit:     Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net>
CommitDate: Tue Apr 21 10:18:08 2020 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=117147f4

eclass/docs: add doxygen support

Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> riseup.net>

 eclass/docs.eclass | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 54 insertions(+), 1 deletion(-)

diff --git a/eclass/docs.eclass b/eclass/docs.eclass
index c3fb6e3..b97f346 100644
--- a/eclass/docs.eclass
+++ b/eclass/docs.eclass
@@ -89,6 +89,15 @@ esac
 #
 # Defaults to ${DOCDIR}/_build/html
 
+# @ECLASS-VARIABLE: DOCS_CONFIG_NAME
+# @DESCRIPTION:
+# Name of the doc builder config file.
+#
+# Only relevant for doxygen, as it allows
+# config files with non-standard names
+#
+# Defaults to Doxyfile for doxygen
+
 if [[ ! ${_DOCS} ]]; then
 
 # For the python based DOCBUILDERS we need to inherit python-any-r1
@@ -108,6 +117,10 @@ case "${DOCBUILDER}" in
 			inherit python-any-r1
 		fi
 		;;
+	"doxygen")
+		# do not need to inherit anything for doxygen
+		true
+		;;
 	"")
 		die "DOCBUILDER unset, should be set to use ${ECLASS}"
 		;;
@@ -243,6 +256,40 @@ mkdocs_compile() {
 	rm "${OUTDIR}"/*.gz || die
 }
 
+# @FUNCTION: doxygen_setup
+# @DESCRIPTION:
+# Sets dependencies for doxygen
+doxygen_setup() {
+	debug-print-function ${FUNCNAME}
+
+	DOCDEPEND="app-doc/doxygen
+			${DOCDEPEND}"
+}
+
+# @FUNCTION: mkdocs_compile
+# @DESCRIPTION:
+# Calls mkdocs to build docs.
+#
+# If you overwrite src_compile or python_compile_all
+# do not call this function, call docs_compile instead
+doxygen_compile() {
+	debug-print-function ${FUNCNAME}
+	use doc || return
+
+	: ${DOCS_CONFIG_NAME:="Doxyfile"}
+
+	local doxyfile=${DOCDIR}/${DOCS_CONFIG_NAME}
+	[[ -f ${doxyfile} ]] ||
+		die "${doxyfile} not found, DOCDIR=${DOCDIR} or DOCS_CONFIG_NAME=${DOCS_CONFIG_NAME} wrong"
+
+	# doxygen wants the HTML_OUTPUT dir to already exist
+	mkdir -p "${OUTDIR}"
+
+	pushd "${DOCDIR}"
+	(cat "${doxyfile}" ; echo "HTML_OUTPUT=${OUTDIR}") | doxygen - || die
+	popd
+}
+
 # @FUNCTION: docs_compile
 # @DESCRIPTION:
 # Calls DOCBUILDER and sets HTML_DOCS
@@ -270,6 +317,9 @@ docs_compile() {
 		"mkdocs")
 			mkdocs_compile
 			;;
+		"doxygen")
+			doxygen_compile
+			;;
 	esac
 
 	HTML_DOCS+=( "${OUTDIR}/." )
@@ -294,6 +344,9 @@ case "${DOCBUILDER}" in
 		python_append_deps
 		mkdocs_setup
 		;;
+	"doxygen")
+		doxygen_setup
+		;;
 esac
 
 if [[ ${EAPI} == [56] ]]; then
@@ -305,7 +358,7 @@ fi
 # If this is a python package using distutils-r1
 # then put the compile function in the specific
 # python function, else just put it in src_compile
-if [[ ${_DISTUTILS_R1} ]]; then
+if [[ ${_DISTUTILS_R1} && ( ${DOCBUILDER}="mkdocs" || ${DOCBUILDER}="sphinx" ) ]]; then
 	python_compile_all() { docs_compile; }
 else
 	src_compile() { docs_compile; }


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
  2020-04-21 10:23 [gentoo-commits] repo/proj/guru:master " Andrew Ammerlaan
@ 2020-04-21 10:22 ` Andrew Ammerlaan
  0 siblings, 0 replies; 180+ messages in thread
From: Andrew Ammerlaan @ 2020-04-21 10:22 UTC (permalink / raw
  To: gentoo-commits

commit:     5f91e34dcdf6a0bc0b893caccb03c389a1b163d6
Author:     Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net>
AuthorDate: Tue Apr 21 10:22:03 2020 +0000
Commit:     Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net>
CommitDate: Tue Apr 21 10:22:03 2020 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=5f91e34d

eclass/docs: fix comment

Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> riseup.net>

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

diff --git a/eclass/docs.eclass b/eclass/docs.eclass
index b97f346..e537447 100644
--- a/eclass/docs.eclass
+++ b/eclass/docs.eclass
@@ -266,9 +266,9 @@ doxygen_setup() {
 			${DOCDEPEND}"
 }
 
-# @FUNCTION: mkdocs_compile
+# @FUNCTION: doxygen_compile
 # @DESCRIPTION:
-# Calls mkdocs to build docs.
+# Calls doxygen to build docs.
 #
 # If you overwrite src_compile or python_compile_all
 # do not call this function, call docs_compile instead


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
  2020-04-28  7:44 [gentoo-commits] repo/proj/guru:master " Andrew Ammerlaan
@ 2020-04-28  7:44 ` Andrew Ammerlaan
  0 siblings, 0 replies; 180+ messages in thread
From: Andrew Ammerlaan @ 2020-04-28  7:44 UTC (permalink / raw
  To: gentoo-commits

commit:     624b0488addb5c3e1e2b4e700a40a9c7fb98637d
Author:     Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net>
AuthorDate: Tue Apr 28 07:43:18 2020 +0000
Commit:     Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net>
CommitDate: Tue Apr 28 07:43:18 2020 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=624b0488

eclass/docs: documentation fixes

Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> riseup.net>

 eclass/docs.eclass | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/eclass/docs.eclass b/eclass/docs.eclass
index e537447..f3d4eb2 100644
--- a/eclass/docs.eclass
+++ b/eclass/docs.eclass
@@ -23,10 +23,7 @@
 # <DOCBUILDER>-build function for your doc builder.
 # For python based doc builders you can use the 
 # python_append_deps function to append [${PYTHON_USEDEP}]
-# automatically to additional dependencies
-#
-# For more information, please see the Python Guide:
-# https://dev.gentoo.org/~mgorny/python-guide/
+# automatically to additional dependencies.
 
 case "${EAPI:-0}" in
 	0|1|2|3|4)
@@ -48,7 +45,7 @@ esac
 
 # @ECLASS-VARIABLE: DOCDIR
 # @DESCRIPTION:
-# Sets the location of the doc builder config file.
+# Path containing the doc builder config file(s).
 #
 # For sphinx this is the location of "conf.py"
 # For mkdocs this is the location of "mkdocs.yml"


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
  2020-04-28  8:01 [gentoo-commits] repo/proj/guru:master " Andrew Ammerlaan
@ 2020-04-28  8:00 ` Andrew Ammerlaan
  0 siblings, 0 replies; 180+ messages in thread
From: Andrew Ammerlaan @ 2020-04-28  8:00 UTC (permalink / raw
  To: gentoo-commits

commit:     bedac61ec6083747cb9f8746f7270a89a0084bcb
Author:     Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net>
AuthorDate: Tue Apr 28 07:59:59 2020 +0000
Commit:     Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net>
CommitDate: Tue Apr 28 07:59:59 2020 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=bedac61e

eclass/docs: more documentation fixes

Package-Manager: Portage-2.3.98, Repoman-2.3.22
Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> riseup.net>

 eclass/docs.eclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eclass/docs.eclass b/eclass/docs.eclass
index f3d4eb2..b05145b 100644
--- a/eclass/docs.eclass
+++ b/eclass/docs.eclass
@@ -41,7 +41,7 @@ esac
 # @PRE_INHERIT
 # @DESCRIPTION:
 # Sets the doc builder to use, currently supports
-# sphinx and mkdocs
+# sphinx, mkdocs and doxygen
 
 # @ECLASS-VARIABLE: DOCDIR
 # @DESCRIPTION:


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2020-05-01 11:45 Kurt Kanzenbach
  0 siblings, 0 replies; 180+ messages in thread
From: Kurt Kanzenbach @ 2020-05-01 11:45 UTC (permalink / raw
  To: gentoo-commits

commit:     fc06fbb6979e1cb303048b0770024af202897a4f
Author:     Kurt Kanzenbach <kurt <AT> kmk-computers <DOT> de>
AuthorDate: Fri May  1 11:34:27 2020 +0000
Commit:     Kurt Kanzenbach <kurt <AT> kmk-computers <DOT> de>
CommitDate: Fri May  1 11:34:27 2020 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=fc06fbb6

eclass: docs: Remove trailing whitespaces

Package-Manager: Portage-2.3.89, Repoman-2.3.20
Signed-off-by: Kurt Kanzenbach <kurt <AT> kmk-computers.de>

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

diff --git a/eclass/docs.eclass b/eclass/docs.eclass
index b05145b..773c006 100644
--- a/eclass/docs.eclass
+++ b/eclass/docs.eclass
@@ -21,7 +21,7 @@
 # The aim of this eclass is to make it easy to add additional
 # doc builders. To do this, add a <DOCBUILDER>-setup and
 # <DOCBUILDER>-build function for your doc builder.
-# For python based doc builders you can use the 
+# For python based doc builders you can use the
 # python_append_deps function to append [${PYTHON_USEDEP}]
 # automatically to additional dependencies.
 
@@ -201,7 +201,7 @@ sphinx_compile() {
 			die "${FUNCNAME}: sphinx.ext.autodoc not found in ${confpy}, set AUTODOC=0"
 		fi
 	fi
-	
+
 	sed -i -e 's:^intersphinx_mapping:disabled_&:' \
 		"${DOCDIR}"/conf.py || die
 	# not all packages include the Makefile in pypi tarball


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2020-05-06 23:36 Alessandro Barbieri
  0 siblings, 0 replies; 180+ messages in thread
From: Alessandro Barbieri @ 2020-05-06 23:36 UTC (permalink / raw
  To: gentoo-commits

commit:     fec5f391149ee6a33d09753127246374fafa7486
Author:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
AuthorDate: Wed May  6 23:35:03 2020 +0000
Commit:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
CommitDate: Wed May  6 23:35:56 2020 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=fec5f391

R-eclass-guru, update copyright

Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>

 eclass/R-packages-guru.eclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eclass/R-packages-guru.eclass b/eclass/R-packages-guru.eclass
index e365b03..0f28749 100644
--- a/eclass/R-packages-guru.eclass
+++ b/eclass/R-packages-guru.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 inherit eutils


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2020-05-06 23:36 Alessandro Barbieri
  0 siblings, 0 replies; 180+ messages in thread
From: Alessandro Barbieri @ 2020-05-06 23:36 UTC (permalink / raw
  To: gentoo-commits

commit:     bdffb505eca41fccdac6625b586f7a7ed05159b4
Author:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
AuthorDate: Wed May  6 23:28:47 2020 +0000
Commit:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
CommitDate: Wed May  6 23:35:55 2020 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=bdffb505

new eclass for R packages, taken from the R_Overlay

Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>

 eclass/R-packages-guru.eclass | 54 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 54 insertions(+)

diff --git a/eclass/R-packages-guru.eclass b/eclass/R-packages-guru.eclass
new file mode 100644
index 0000000..e365b03
--- /dev/null
+++ b/eclass/R-packages-guru.eclass
@@ -0,0 +1,54 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+inherit eutils
+
+EXPORT_FUNCTIONS src_unpack src_prepare src_compile src_install pkg_postinst
+
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="byte-compile"
+
+DEPEND="dev-lang/R"
+RDEPEND="${DEPEND}"
+
+R-packages-guru_src_unpack() {
+	unpack ${A}
+	if [[ -d "${PN//_/.}" ]] && [[ ! -d "${P}" ]]; then
+		mv ${PN//_/.} "${P}"
+	fi
+}
+
+if has "${EAPI:-0}" 0 1 2 3 4 5; then
+	R-packages-guru_src_prepare() {
+		epatch_user
+	}
+else
+	R-packages-guru_src_prepare() {
+		default
+	}
+fi
+
+R-packages-guru_src_compile() {
+	MAKEFLAGS="CFLAGS=${CFLAGS// /\\ } CXXFLAGS=${CXXFLAGS// /\\ } FFLAGS=${FFLAGS// /\\ } FCFLAGS=${FCFLAGS// /\\ } LDFLAGS=${LDFLAGS// /\\ }" \
+		R CMD INSTALL . -l "${WORKDIR}" $(use byte-compile && echo "--byte-compile")
+}
+
+R-packages-guru_src_install() {
+	insinto /usr/$(get_libdir)/R/site-library
+	doins -r "${WORKDIR}"/${PN//_/.}
+}
+
+R-packages-guru_pkg_postinst() {
+	if [[ "${_UNRESOLVABLE_PACKAGES:-}" ]]; then
+		# _UNRESOLVABLE_PACKAGES is only set if it has more than zero items
+		local _max=${#_UNRESOLVABLE_PACKAGES[*]} i=
+
+		einfo "Dependency(-ies):"
+		for (( i=0; i<"${_max}"; i++ )); do
+			einfo "- ${_UNRESOLVABLE_PACKAGES[$i]}"
+		done
+		einfo 'are (is) suggested by upstream but could not be found.'
+		einfo 'Please install it manually from the R interpreter if you need it.'
+	fi
+}


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2020-12-06 10:46 Andrew Ammerlaan
  0 siblings, 0 replies; 180+ messages in thread
From: Andrew Ammerlaan @ 2020-12-06 10:46 UTC (permalink / raw
  To: gentoo-commits

commit:     bba19fbc646bdafc6a94e2ee6c40de85d6776175
Author:     Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net>
AuthorDate: Sun Dec  6 10:13:25 2020 +0000
Commit:     Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net>
CommitDate: Sun Dec  6 10:45:49 2020 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=bba19fbc

eclass/docs: moved to ::gentoo

Package-Manager: Portage-3.0.11, Repoman-3.0.2
Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> riseup.net>

 eclass/docs.eclass | 365 -----------------------------------------------------
 1 file changed, 365 deletions(-)

diff --git a/eclass/docs.eclass b/eclass/docs.eclass
deleted file mode 100644
index 773c0065..00000000
--- a/eclass/docs.eclass
+++ /dev/null
@@ -1,365 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-# @ECLASS: docs.eclass
-# @MAINTAINER:
-# Andrew Ammerlaan <andrewammerlaan@riseup.net>
-# @AUTHOR:
-# Author: Andrew Ammerlaan <andrewammerlaan@riseup.net>
-# Based on the work of: Michał Górny <mgorny@gentoo.org>
-# @SUPPORTED_EAPIS: 5 6 7
-# @BLURB: A simple eclass to build documentation.
-# @DESCRIPTION:
-# A simple eclass providing functions to build documentation.
-#
-# Please note that docs sets RDEPEND and DEPEND unconditionally
-# for you.
-#
-# This eclass also appends "doc" to IUSE, and sets HTML_DOCS
-# to the location of the compiled documentation
-#
-# The aim of this eclass is to make it easy to add additional
-# doc builders. To do this, add a <DOCBUILDER>-setup and
-# <DOCBUILDER>-build function for your doc builder.
-# For python based doc builders you can use the
-# python_append_deps function to append [${PYTHON_USEDEP}]
-# automatically to additional dependencies.
-
-case "${EAPI:-0}" in
-	0|1|2|3|4)
-		die "Unsupported EAPI=${EAPI:-0} (too old) for ${ECLASS}"
-		;;
-	5|6|7)
-		;;
-	*)
-		die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}"
-		;;
-esac
-
-# @ECLASS-VARIABLE: DOCBUILDER
-# @REQUIRED
-# @PRE_INHERIT
-# @DESCRIPTION:
-# Sets the doc builder to use, currently supports
-# sphinx, mkdocs and doxygen
-
-# @ECLASS-VARIABLE: DOCDIR
-# @DESCRIPTION:
-# Path containing the doc builder config file(s).
-#
-# For sphinx this is the location of "conf.py"
-# For mkdocs this is the location of "mkdocs.yml"
-#
-# Note that mkdocs.yml often does not reside
-# in the same directory as the actual doc files
-#
-# Defaults to ${S}
-
-# @ECLASS-VARIABLE: DOCDEPEND
-# @DEFAULT_UNSET
-# @PRE_INHERIT
-# @DESCRIPTION:
-# Sets additional dependencies to build docs.
-# For sphinx and mkdocs these dependencies should
-# be specified without [${PYTHON_USEDEP}], this
-# is added by the eclass. E.g. to depend on mkdocs-material:
-#
-# DOCDEPEND="dev-python/mkdocs-material"
-#
-# This eclass appends to this variable, so you can
-# call it later in your ebuild again if necessary.
-
-# @ECLASS-VARIABLE: AUTODOC
-# @PRE_INHERIT
-# @DESCRIPTION:
-# Sets whether to use sphinx.ext.autodoc/mkautodoc
-# Defaults to 1 (True) for sphinx, and 0 (False) for mkdocs
-
-# @ECLASS-VARIABLE: OUTDIR
-# @DESCRIPTION:
-# Sets where the compiled files will be put.
-# There's no real reason to change this, but this
-# variable is useful if you want to overwrite the HTML_DOCS
-# added by this eclass. E.g.:
-#
-# HTML_DOCS=( "${yourdocs}" "${OUTDIR}/." )
-#
-# Defaults to ${DOCDIR}/_build/html
-
-# @ECLASS-VARIABLE: DOCS_CONFIG_NAME
-# @DESCRIPTION:
-# Name of the doc builder config file.
-#
-# Only relevant for doxygen, as it allows
-# config files with non-standard names
-#
-# Defaults to Doxyfile for doxygen
-
-if [[ ! ${_DOCS} ]]; then
-
-# For the python based DOCBUILDERS we need to inherit python-any-r1
-case "${DOCBUILDER}" in
-	"sphinx"|"mkdocs")
-		# If this is not a python package then
-		# this is not already set, so we need
-		# to set this to inherit python-any-r1
-		if [[ -z "${PYTHON_COMPAT}" ]]; then
-			PYTHON_COMPAT=( python3_{6,7,8} )
-		fi
-
-		# Inherit python-any-r1 if neither python-any-r1 nor
-		# python-r1 have been inherited, because we need the
-		# python_gen_any_dep function
-		if [[ ! ${_PYTHON_R1} && ! ${_PYTHON_ANY_R1} ]]; then
-			inherit python-any-r1
-		fi
-		;;
-	"doxygen")
-		# do not need to inherit anything for doxygen
-		true
-		;;
-	"")
-		die "DOCBUILDER unset, should be set to use ${ECLASS}"
-		;;
-	*)
-		die "Unsupported DOCBUILDER=${DOCBUILDER} (unknown) for ${ECLASS}"
-		;;
-esac
-
-# @FUNCTION: python_check_deps
-# @DESCRIPTION:
-# Check if the dependencies are valid
-python_check_deps() {
-	debug-print-function ${FUNCNAME}
-	use doc || return 0
-
-	local dep
-	for dep in ${check_deps[@]}; do
-		has_version "${dep}[${PYTHON_USEDEP}]" || return 1
-	done
-}
-# Save this before we start manipulating it
-check_deps=${DOCDEPEND}
-
-# @FUNCTION: python_append_dep
-# @DESCRIPTION:
-# Appends [\${PYTHON_USEDEP}] to all dependencies
-# for python based DOCBUILDERs such as mkdocs or
-# sphinx.
-python_append_deps() {
-	debug-print-function ${FUNCNAME}
-
-	local temp=()
-	local dep
-	for dep in ${DOCDEPEND[@]}; do
-		temp+=" ${dep}[\${PYTHON_USEDEP}]"
-	done
-	DOCDEPEND=${temp}
-}
-
-# @FUNCTION: sphinx_setup
-# @DESCRIPTION:
-# Sets dependencies for sphinx
-sphinx_setup() {
-	debug-print-function ${FUNCNAME}
-
-	: ${AUTODOC:=1}
-
-	if [[ ${AUTODOC} == 0 && -n "${DOCDEPEND}" ]]; then
-		die "${FUNCNAME}: do not set autodoc to 0 if external plugins are used"
-	fi
-	if [[ ${AUTODOC} == 1 ]]; then
-		DOCDEPEND="$(python_gen_any_dep "
-			dev-python/sphinx[\${PYTHON_USEDEP}]
-			${DOCDEPEND}")"
-
-	else
-		DOCDEPEND="dev-python/sphinx"
-	fi
-}
-
-# @FUNCTION: sphinx_compile
-# @DESCRIPTION:
-# Calls sphinx to build docs.
-#
-# If you overwrite src_compile or python_compile_all
-# do not call this function, call docs_compile instead
-sphinx_compile() {
-	debug-print-function ${FUNCNAME}
-	use doc || return
-
-	local confpy=${DOCDIR}/conf.py
-	[[ -f ${confpy} ]] ||
-		die "${confpy} not found, DOCDIR=${DOCDIR} call wrong"
-
-	if [[ ${AUTODOC} == 0 ]]; then
-		if grep -F -q 'sphinx.ext.autodoc' "${confpy}"; then
-			die "${FUNCNAME}: autodoc disabled but sphinx.ext.autodoc found in ${confpy}"
-		fi
-	elif [[ ${AUTODOC} == 1 ]]; then
-		if ! grep -F -q 'sphinx.ext.autodoc' "${confpy}"; then
-			die "${FUNCNAME}: sphinx.ext.autodoc not found in ${confpy}, set AUTODOC=0"
-		fi
-	fi
-
-	sed -i -e 's:^intersphinx_mapping:disabled_&:' \
-		"${DOCDIR}"/conf.py || die
-	# not all packages include the Makefile in pypi tarball
-	sphinx-build -b html -d "${DOCDIR}"/_build/doctrees "${DOCDIR}" \
-	"${OUTDIR}" || die
-}
-
-# @FUNCTION: mkdocs_setup
-# @DESCRIPTION:
-# Sets dependencies for mkdocs
-mkdocs_setup() {
-	debug-print-function ${FUNCNAME}
-
-	: ${AUTODOC:=0}
-
-	if [[ ${AUTODOC} == 1 ]]; then
-		DOCDEPEND="$(python_gen_any_dep "
-			dev-python/mkdocs[\${PYTHON_USEDEP}]
-			dev-python/mkautodoc[\${PYTHON_USEDEP}]
-		${DOCDEPEND}")"
-	else
-		DOCDEPEND="$(python_gen_any_dep "
-			dev-python/mkdocs[\${PYTHON_USEDEP}]
-			${DOCDEPEND}")"
-	fi
-}
-
-# @FUNCTION: mkdocs_compile
-# @DESCRIPTION:
-# Calls mkdocs to build docs.
-#
-# If you overwrite src_compile or python_compile_all
-# do not call this function, call docs_compile instead
-mkdocs_compile() {
-	debug-print-function ${FUNCNAME}
-	use doc || return
-
-	local mkdocsyml=${DOCDIR}/mkdocs.yml
-	[[ -f ${mkdocsyml} ]] ||
-		die "${mkdocsyml} not found, DOCDIR=${DOCDIR} wrong"
-
-	pushd "${DOCDIR}"
-	mkdocs build -d "${OUTDIR}" || die
-	popd
-
-	# remove generated .gz variants
-	# mkdocs currently has no option to disable this
-	# and portage complains: "Colliding files found by ecompress"
-	rm "${OUTDIR}"/*.gz || die
-}
-
-# @FUNCTION: doxygen_setup
-# @DESCRIPTION:
-# Sets dependencies for doxygen
-doxygen_setup() {
-	debug-print-function ${FUNCNAME}
-
-	DOCDEPEND="app-doc/doxygen
-			${DOCDEPEND}"
-}
-
-# @FUNCTION: doxygen_compile
-# @DESCRIPTION:
-# Calls doxygen to build docs.
-#
-# If you overwrite src_compile or python_compile_all
-# do not call this function, call docs_compile instead
-doxygen_compile() {
-	debug-print-function ${FUNCNAME}
-	use doc || return
-
-	: ${DOCS_CONFIG_NAME:="Doxyfile"}
-
-	local doxyfile=${DOCDIR}/${DOCS_CONFIG_NAME}
-	[[ -f ${doxyfile} ]] ||
-		die "${doxyfile} not found, DOCDIR=${DOCDIR} or DOCS_CONFIG_NAME=${DOCS_CONFIG_NAME} wrong"
-
-	# doxygen wants the HTML_OUTPUT dir to already exist
-	mkdir -p "${OUTDIR}"
-
-	pushd "${DOCDIR}"
-	(cat "${doxyfile}" ; echo "HTML_OUTPUT=${OUTDIR}") | doxygen - || die
-	popd
-}
-
-# @FUNCTION: docs_compile
-# @DESCRIPTION:
-# Calls DOCBUILDER and sets HTML_DOCS
-#
-# This function must be called in global scope.  Take care not to
-# overwrite the variables set by it. Has support for distutils-r1
-# eclass, but only if this eclass is inherited *after*
-# distutils-r1. If you need to extend src_compile() or
-# python_compile_all(), you can call the original implementation
-# as docs_compile.
-docs_compile() {
-	debug-print-function ${FUNCNAME}
-	use doc || return
-
-	# Set a sensible default as DOCDIR
-	: ${DOCDIR:="${S}"}
-
-	# Where to put the compiled files?
-	: ${OUTDIR:="${DOCDIR}/_build/html"}
-
-	case "${DOCBUILDER}" in
-		"sphinx")
-			sphinx_compile
-			;;
-		"mkdocs")
-			mkdocs_compile
-			;;
-		"doxygen")
-			doxygen_compile
-			;;
-	esac
-
-	HTML_DOCS+=( "${OUTDIR}/." )
-
-	# we need to ensure successful return in case we're called last,
-	# otherwise Portage may wrongly assume sourcing failed
-	return 0
-}
-
-
-# This is where we setup the USE/(B)DEPEND variables
-# and call the doc builder specific setup functions
-IUSE+=" doc"
-
-# Call the correct setup function
-case "${DOCBUILDER}" in
-	"sphinx")
-		python_append_deps
-		sphinx_setup
-		;;
-	"mkdocs")
-		python_append_deps
-		mkdocs_setup
-		;;
-	"doxygen")
-		doxygen_setup
-		;;
-esac
-
-if [[ ${EAPI} == [56] ]]; then
-	DEPEND+=" doc? ( ${DOCDEPEND} )"
-else
-	BDEPEND+=" doc? ( ${DOCDEPEND} )"
-fi
-
-# If this is a python package using distutils-r1
-# then put the compile function in the specific
-# python function, else just put it in src_compile
-if [[ ${_DISTUTILS_R1} && ( ${DOCBUILDER}="mkdocs" || ${DOCBUILDER}="sphinx" ) ]]; then
-	python_compile_all() { docs_compile; }
-else
-	src_compile() { docs_compile; }
-fi
-
-_DOCS=1
-fi


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2021-03-14 22:49 Alessandro Barbieri
  0 siblings, 0 replies; 180+ messages in thread
From: Alessandro Barbieri @ 2021-03-14 22:49 UTC (permalink / raw
  To: gentoo-commits

commit:     2f3797d95a55a13ae749f9050d17438a460f0049
Author:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
AuthorDate: Sun Mar 14 22:48:48 2021 +0000
Commit:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
CommitDate: Sun Mar 14 22:48:48 2021 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=2f3797d9

eclass: old g-octave eclass

Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>

 eclass/octaveforge.eclass | 105 ++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 105 insertions(+)

diff --git a/eclass/octaveforge.eclass b/eclass/octaveforge.eclass
new file mode 100644
index 00000000..d5492e89
--- /dev/null
+++ b/eclass/octaveforge.eclass
@@ -0,0 +1,105 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+#
+# Original Author: Rafael G. Martins <rafael@rafaelmartins.eng.br>
+# Purpose: octaveforge helper eclass.
+#
+
+# @ECLASS-VARIABLE: OCTAVEFORGE_CAT
+# @DESCRIPTION:
+# the octave-forge category of the package.
+OCTAVEFORGE_CAT="${OCTAVEFORGE_CAT:-main}"
+
+
+REPO_URI="http://svn.code.sf.net/p/octave/code/trunk/octave-forge"
+if [[ "${PV}" = 9999* ]]; then
+	inherit subversion autotools
+	ESVN_REPO_URI="${REPO_URI}/${OCTAVEFORGE_CAT}/${PN}"
+else
+	inherit autotools
+	SRC_URI="mirror://sourceforge/octave/${P}.tar.gz"
+fi
+
+SRC_URI="
+	${SRC_URI}
+	${REPO_URI}/packages/package_Makefile.in -> octaveforge_Makefile
+	${REPO_URI}/packages/package_configure.in -> octaveforge_configure
+"
+SLOT="0"
+
+# defining some paths
+OCT_ROOT="/usr/share/octave"
+OCT_PKGDIR="${OCT_ROOT}/packages"
+OCT_BIN="$(type -p octave)"
+
+EXPORT_FUNCTIONS src_unpack src_prepare src_install pkg_postinst pkg_prerm pkg_postrm
+
+octaveforge_src_unpack() {
+	default
+	if [ ! -d "${WORKDIR}/${P}" ]; then
+		S="${WORKDIR}/${PN}"
+		cd "${S}"
+	fi
+}
+
+octaveforge_src_prepare() {
+	[[ "${PV}" = 9999* ]] && subversion_src_prepare
+	for filename in Makefile configure; do
+		cp "${DISTDIR}/octaveforge_${filename}" "${S}/${filename}"
+	done
+
+	#octave_config_info is deprecated in octave5
+	sed -i 's|octave_config_info|__octave_config_info__|g' Makefile || die
+
+	chmod 0755 "${S}/configure"
+	if [ -e "${S}"/src/autogen.sh ]; then
+		cd "${S}"/src && ./autogen.sh || die 'failed to run autogen.sh'
+	fi
+	if [ -e "${S}/src/Makefile" ]; then
+		sed -i 's/ -s / /g' "${S}/src/Makefile" || die 'sed failed.'
+	fi
+	eapply_user
+}
+
+octaveforge_src_install() {
+	emake DESTDIR="${D}" DISTPKG='Gentoo' install
+	if [ -d doc/ ]; then
+		insinto "/usr/share/doc/${PF}"
+		doins -r doc/* || die 'failed to install the docs'
+	fi
+}
+
+octaveforge_pkg_postinst() {
+	einfo "Registering ${CATEGORY}/${PF} on the Octave package database."
+	[ -d "${OCT_PKGDIR}" ] || mkdir -p "${OCT_PKGDIR}"
+	"${OCT_BIN}" -H -q --no-site-file --eval "pkg('rebuild');" \
+		&> /dev/null || die 'failed to register the package.'
+}
+
+octaveforge_pkg_prerm() {
+	einfo 'Running on_uninstall routines to prepare the package to remove.'
+	local pkgdir=$(
+		"${OCT_BIN}" -H -q --no-site-file --eval "
+			pkg('rebuild');
+			l = pkg('list');
+			disp(l{cellfun(@(x)strcmp(x.name,'${PN}'),l)}.dir);
+		"
+	)
+	rm -f "${pkgdir}"/packinfo/on_uninstall.m
+	if [ -e "${pkgdir}"/packinfo/on_uninstall.m.orig ]; then
+		mv "$pkgdir"/packinfo/on_uninstall.m{.orig,}
+		cd "$pkgdir"/packinfo
+		"${OCT_BIN}" -H -q --no-site-file --eval "
+			l = pkg('list');
+			on_uninstall(l{cellfun(@(x)strcmp(x.name,'${PN}'), l)});
+		" &> /dev/null || die 'failed to remove the package'
+	fi
+}
+
+octaveforge_pkg_postrm() {
+	einfo 'Rebuilding the Octave package database.'
+	[ -d "${OCT_PKGDIR}" ] || mkdir -p "${OCT_PKGDIR}"
+	"${OCT_BIN}" -H --silent --eval 'pkg rebuild' \
+		&> /dev/null || die 'failed to rebuild the package database'
+}


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2021-03-14 22:58 Alessandro Barbieri
  0 siblings, 0 replies; 180+ messages in thread
From: Alessandro Barbieri @ 2021-03-14 22:58 UTC (permalink / raw
  To: gentoo-commits

commit:     c061b7e28839e7747df90df1cb77aee61cd53849
Author:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
AuthorDate: Sun Mar 14 22:57:48 2021 +0000
Commit:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
CommitDate: Sun Mar 14 22:57:48 2021 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=c061b7e2

eclass: no live ebuilds, dodoc, minor style things, || die

Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>

 eclass/octaveforge.eclass | 43 +++++++++++++++++--------------------------
 1 file changed, 17 insertions(+), 26 deletions(-)

diff --git a/eclass/octaveforge.eclass b/eclass/octaveforge.eclass
index d5492e89..8a7fe039 100644
--- a/eclass/octaveforge.eclass
+++ b/eclass/octaveforge.eclass
@@ -11,15 +11,10 @@
 # the octave-forge category of the package.
 OCTAVEFORGE_CAT="${OCTAVEFORGE_CAT:-main}"
 
-
 REPO_URI="http://svn.code.sf.net/p/octave/code/trunk/octave-forge"
-if [[ "${PV}" = 9999* ]]; then
-	inherit subversion autotools
-	ESVN_REPO_URI="${REPO_URI}/${OCTAVEFORGE_CAT}/${PN}"
-else
-	inherit autotools
-	SRC_URI="mirror://sourceforge/octave/${P}.tar.gz"
-fi
+
+inherit autotools
+SRC_URI="mirror://sourceforge/octave/${P}.tar.gz"
 
 SRC_URI="
 	${SRC_URI}
@@ -39,22 +34,21 @@ octaveforge_src_unpack() {
 	default
 	if [ ! -d "${WORKDIR}/${P}" ]; then
 		S="${WORKDIR}/${PN}"
-		cd "${S}"
+		cd "${S}" || die
 	fi
 }
 
 octaveforge_src_prepare() {
-	[[ "${PV}" = 9999* ]] && subversion_src_prepare
 	for filename in Makefile configure; do
-		cp "${DISTDIR}/octaveforge_${filename}" "${S}/${filename}"
+		cp "${DISTDIR}/octaveforge_${filename}" "${S}/${filename}" || die
 	done
 
 	#octave_config_info is deprecated in octave5
 	sed -i 's|octave_config_info|__octave_config_info__|g' Makefile || die
 
-	chmod 0755 "${S}/configure"
-	if [ -e "${S}"/src/autogen.sh ]; then
-		cd "${S}"/src && ./autogen.sh || die 'failed to run autogen.sh'
+	chmod 0755 "${S}/configure" || die
+	if [ -e "${S}/src/autogen.sh" ]; then
+		cd "${S}/src" && ./autogen.sh || die 'failed to run autogen.sh'
 	fi
 	if [ -e "${S}/src/Makefile" ]; then
 		sed -i 's/ -s / /g' "${S}/src/Makefile" || die 'sed failed.'
@@ -65,16 +59,14 @@ octaveforge_src_prepare() {
 octaveforge_src_install() {
 	emake DESTDIR="${D}" DISTPKG='Gentoo' install
 	if [ -d doc/ ]; then
-		insinto "/usr/share/doc/${PF}"
-		doins -r doc/* || die 'failed to install the docs'
+		dodoc -r doc/*
 	fi
 }
 
 octaveforge_pkg_postinst() {
 	einfo "Registering ${CATEGORY}/${PF} on the Octave package database."
-	[ -d "${OCT_PKGDIR}" ] || mkdir -p "${OCT_PKGDIR}"
-	"${OCT_BIN}" -H -q --no-site-file --eval "pkg('rebuild');" \
-		&> /dev/null || die 'failed to register the package.'
+	[ -d "${OCT_PKGDIR}" ] || mkdir -p "${OCT_PKGDIR}" || die
+	"${OCT_BIN}" -H -q --no-site-file --eval "pkg('rebuild');" &> /dev/null || die 'failed to register the package.'
 }
 
 octaveforge_pkg_prerm() {
@@ -86,10 +78,10 @@ octaveforge_pkg_prerm() {
 			disp(l{cellfun(@(x)strcmp(x.name,'${PN}'),l)}.dir);
 		"
 	)
-	rm -f "${pkgdir}"/packinfo/on_uninstall.m
-	if [ -e "${pkgdir}"/packinfo/on_uninstall.m.orig ]; then
-		mv "$pkgdir"/packinfo/on_uninstall.m{.orig,}
-		cd "$pkgdir"/packinfo
+	rm -f "${pkgdir}/packinfo/on_uninstall.m" || die
+	if [ -e "${pkgdir}/packinfo/on_uninstall.m.orig" ]; then
+		mv "$pkgdir"/packinfo/on_uninstall.m{.orig,} || die
+		cd "$pkgdir/packinfo" || die
 		"${OCT_BIN}" -H -q --no-site-file --eval "
 			l = pkg('list');
 			on_uninstall(l{cellfun(@(x)strcmp(x.name,'${PN}'), l)});
@@ -99,7 +91,6 @@ octaveforge_pkg_prerm() {
 
 octaveforge_pkg_postrm() {
 	einfo 'Rebuilding the Octave package database.'
-	[ -d "${OCT_PKGDIR}" ] || mkdir -p "${OCT_PKGDIR}"
-	"${OCT_BIN}" -H --silent --eval 'pkg rebuild' \
-		&> /dev/null || die 'failed to rebuild the package database'
+	[ -d "${OCT_PKGDIR}" ] || mkdir -p "${OCT_PKGDIR}" || die
+	"${OCT_BIN}" -H --silent --eval 'pkg rebuild' &> /dev/null || die 'failed to rebuild the package database'
 }


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2021-03-16  0:55 Alessandro Barbieri
  0 siblings, 0 replies; 180+ messages in thread
From: Alessandro Barbieri @ 2021-03-16  0:55 UTC (permalink / raw
  To: gentoo-commits

commit:     34cd25319d156c12ba87f238e3c3fe4ab495788e
Author:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
AuthorDate: Tue Mar 16 00:54:37 2021 +0000
Commit:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
CommitDate: Tue Mar 16 00:55:18 2021 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=34cd2531

eclass: install documentation in DOCDIR

Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>

 eclass/R-packages-guru.eclass | 37 ++++++++++++++++++++++++++++---------
 1 file changed, 28 insertions(+), 9 deletions(-)

diff --git a/eclass/R-packages-guru.eclass b/eclass/R-packages-guru.eclass
index 6419cfec..8475f975 100644
--- a/eclass/R-packages-guru.eclass
+++ b/eclass/R-packages-guru.eclass
@@ -11,6 +11,13 @@ IUSE="byte-compile"
 DEPEND="dev-lang/R"
 RDEPEND="${DEPEND}"
 
+dodocrm() {
+	if [ -e "${1}" ]; then
+		dodoc -r "${1}"
+		rm -rf "${1}" || die
+	fi
+}
+
 R-packages-guru_src_unpack() {
 	unpack ${A}
 	if [[ -d "${PN//_/.}" ]] && [[ ! -d "${P}" ]]; then
@@ -18,15 +25,11 @@ R-packages-guru_src_unpack() {
 	fi
 }
 
-if has "${EAPI:-0}" 0 1 2 3 4 5; then
-	R-packages-guru_src_prepare() {
-		epatch_user
-	}
-else
-	R-packages-guru_src_prepare() {
-		default
-	}
-fi
+R-packages-guru_src_prepare() {
+	rm -f LICENSE || die
+	default
+}
+
 
 R-packages-guru_src_compile() {
 	MAKEFLAGS="CFLAGS=${CFLAGS// /\\ } CXXFLAGS=${CXXFLAGS// /\\ } FFLAGS=${FFLAGS// /\\ } FCFLAGS=${FCFLAGS// /\\ } LDFLAGS=${LDFLAGS// /\\ }" \
@@ -34,6 +37,22 @@ R-packages-guru_src_compile() {
 }
 
 R-packages-guru_src_install() {
+	cd "${WORKDIR}"/${PN//_/.} || die
+
+	dodocrm examples || die
+#	dodocrm DESCRIPTION || die #keep this
+	dodocrm NEWS.md || die
+	dodocrm README.md || die
+	dodocrm html || die
+	docinto "${DOCSDIR}/html"
+	if [ -e doc ]; then
+		ls doc/*.html &>/dev/null && dodoc -r doc/*.html
+		rm -rf doc/*.html || die
+		docinto "${DOCSDIR}"
+		dodoc -r doc/.
+		rm -rf doc
+	fi
+
 	insinto /usr/$(get_libdir)/R/site-library
 	doins -r "${WORKDIR}"/${PN//_/.}
 }


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2021-05-17 10:16 Alessandro Barbieri
  0 siblings, 0 replies; 180+ messages in thread
From: Alessandro Barbieri @ 2021-05-17 10:16 UTC (permalink / raw
  To: gentoo-commits

commit:     ca2efddff82c08b87f8936dec44e740846e51c06
Author:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
AuthorDate: Mon May 17 10:07:08 2021 +0000
Commit:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
CommitDate: Mon May 17 10:16:27 2021 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=ca2efddf

Import go eclasses from go-overlay

Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>

 eclass/golang-common.eclass | 1027 +++++++++++++++++++++++++++++++++++++++++++
 eclass/golang-single.eclass |  180 ++++++++
 2 files changed, 1207 insertions(+)

diff --git a/eclass/golang-common.eclass b/eclass/golang-common.eclass
new file mode 100644
index 000000000..85dac9d25
--- /dev/null
+++ b/eclass/golang-common.eclass
@@ -0,0 +1,1027 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# @ECLASS: golang-utils.eclass
+# @MAINTAINER:
+#
+# @AUTHOR:
+# Mauro Toffanin <toffanin.mauro@gmail.com>
+# @BLURB: Base eclass for GoLang packages
+# @SUPPORTED_EAPIS: 7
+# @DESCRIPTION:
+# This eclass provides functionalities which are used by golang-single.eclass,
+# golang-live.eclass, and as well as from ebuilds.
+#
+# This eclass should not be inherited directly from an ebuild.
+# Instead, you should inherit golang-single or golang-live for GoLang packages.
+
+inherit eutils multiprocessing
+
+if [[ -z ${_GOLANG_BASE_ECLASS} ]]; then
+_GOLANG_BASE_ECLASS=1
+
+# Silences repoman warnings.
+case "${EAPI:-0}" in
+	7)
+		case "${GOLANG_PKG_DEPEND_ON_GO_SUBSLOT:-yes}" in
+			yes)
+				GO_DEPEND="dev-lang/go:0="
+				;;
+			*)
+				GO_DEPEND="dev-lang/go:*"
+				;;
+		esac
+		;;
+	*)
+		die "${ECLASS}: EAPI=${EAPI:-0} is not supported" ;;
+esac
+
+DEPEND+=" ${GO_DEPEND}"
+
+RESTRICT+=" strip"
+
+QA_FLAGS_IGNORED="
+	usr/bin/.*
+	usr/sbin/.*
+"
+QA_PRESTRIPPED="
+	usr/bin/.*
+	usr/sbin/.*
+"
+
+# @ECLASS-VARIABLE: GOLANG_PKG_NAME
+# @DESCRIPTION:
+# Sets the GoLang name for the generated package.
+# GOLANG_PKG_NAME="${PN}"
+GOLANG_PKG_NAME="${GOLANG_PKG_NAME:-${PN}}"
+
+# @ECLASS-VARIABLE: GOLANG_PKG_VERSION
+# @DESCRIPTION:
+# Sets the GoLang version for the generated package.
+# GOLANG_PKG_VERSION="${PV}"
+GOLANG_PKG_VERSION="${GOLANG_PKG_VERSION:-${PV/_pre/.pre}}"
+
+# @ECLASS-VARIABLE: GOLANG_PKG_IMPORTPATH
+# @DESCRIPTION:
+# Sets the remote import path for the generated package.
+# GOLANG_PKG_IMPORTPATH="github.com/captObvious/"
+GOLANG_PKG_IMPORTPATH="${GOLANG_PKG_IMPORTPATH:-}"
+
+# @ECLASS-VARIABLE: GOLANG_PKG_IMPORTPATH_ALIAS
+# @DESCRIPTION:
+# Sets an alias of the remote import path for the generated package.
+# GOLANG_PKG_IMPORTPATH_ALIAS="privaterepo.com/captObvious/"
+GOLANG_PKG_IMPORTPATH_ALIAS="${GOLANG_PKG_IMPORTPATH_ALIAS:=${GOLANG_PKG_IMPORTPATH}}"
+
+# @ECLASS-VARIABLE: GOLANG_PKG_ARCHIVEPREFIX
+# @DESCRIPTION:
+# Sets the archive prefix for the file URI of the package.
+# Most projects hosted on GitHub's mirrors provide archives with prefix as
+# 'v' or 'source-', other hosted services offer different archive formats.
+# This eclass defaults to an empty prefix.
+GOLANG_PKG_ARCHIVEPREFIX="${GOLANG_PKG_ARCHIVEPREFIX:-}"
+
+# @ECLASS-VARIABLE: GOLANG_PKG_ARCHIVESUFFIX
+# @DESCRIPTION:
+# Sets the archive suffix for the file URI of the package.
+# Most projects hosted on GitHub's mirrors provide archives with suffix as
+# '.tar.gz' or '.zip', other hosted services offer different archive formats.
+# This eclass defaults to '.tar.gz'.
+GOLANG_PKG_ARCHIVESUFFIX="${GOLANG_PKG_ARCHIVESUFFIX:=".tar.gz"}"
+
+# @ECLASS-VARIABLE: GOLANG_PKG_OUTPUT_NAME
+# @DESCRIPTION:
+# Specifies the output file name of the package.
+# If not set, it derives from the name of the package, such as $GOLANG_PKG_NAME.
+# This eclass defaults to $PN.
+GOLANG_PKG_OUTPUT_NAME="${GOLANG_PKG_OUTPUT_NAME:=${PN}}"
+
+# @ECLASS-VARIABLE: GOLANG_PKG_BUILDPATH
+# @DESCRIPTION:
+# Specifies a go source file to be compiled as a single main package.
+# This eclass defaults to an empty value.
+# This eclass defaults to "/..." when the user declares GOLANG_PKG_IS_MULTIPLE=1
+GOLANG_PKG_BUILDPATH="${GOLANG_PKG_BUILDPATH:-}"
+
+# @ECLASS-VARIABLE: GOLANG_PKG_INSTALLPATH
+# @DESCRIPTION:
+# Sets the root path into which a binary, or a list of binaries, will be
+# installed (e.x.: ${GOLANG_PKG_INSTALLPATH}/bin).
+# This eclass defaults to "/usr"
+GOLANG_PKG_INSTALLPATH="${GOLANG_PKG_INSTALLPATH:="/usr"}"
+
+# @ECLASS-VARIABLE: GOLANG_PKG_INSTALLSUFFIX
+# @DESCRIPTION:
+# Sets a suffix to use in the name of the package installation directory.
+# This eclass defaults to an empty install suffix.
+GOLANG_PKG_INSTALLSUFFIX="${GOLANG_PKG_INSTALLSUFFIX:-}"
+
+# @ECLASS-VARIABLE: GOLANG_PKG_IS_MULTIPLE
+# @DESCRIPTION:
+# Set to enable the building of multiple packages from a single import path.
+
+# @ECLASS-VARIABLE: GOLANG_PKG_HAVE_TEST
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# Set to enable the execution of automated testing.
+
+# @ECLASS-VARIABLE: GOLANG_PKG_HAVE_TEST_RACE
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# Set to enable the execution of automated testing with support for
+# data race detection.
+
+# @ECLASS-VARIABLE: GOLANG_PKG_USE_CGO
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# Set to enable the compilation of the package with CGO.
+
+# @ECLASS-VARIABLE: GOLANG_PKG_USE_GENERATE
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# Set to run commands described by directives within existing golang files.
+
+# @ECLASS-VARIABLE: GOLANG_PKG_DEPEND_ON_GO_SUBSLOT
+# @DESCRIPTION:
+# Set to ensure the package does depend on the dev-lang/go subslot value.
+# Possible values: {yes,no}
+# This eclass defaults to "no"
+GOLANG_PKG_DEPEND_ON_GO_SUBSLOT=${GOLANG_PKG_DEPEND_ON_GO_SUBSLOT:="no"}
+
+# @ECLASS-VARIABLE: GOLANG_PKG_LDFLAGS
+# @DESCRIPTION:
+# Sets the linker arguments to pass to 5l, 6l, or 8l.
+# This eclass defaults to an empty list.
+GOLANG_PKG_LDFLAGS="${GOLANG_PKG_LDFLAGS:-}"
+
+# @ECLASS-VARIABLE: GOLANG_PKG_TAGS
+# @DESCRIPTION:
+# Sets the list of build tags during the build.
+# This eclass defaults to an empty list.
+GOLANG_PKG_TAGS="${GOLANG_PKG_TAGS:-}"
+
+# @ECLASS-VARIABLE: GOLANG_PKG_VENDOR
+# @DESCRIPTION:
+# Sets additional standard Go workspaces to be appended to the environment
+# variable GOPATH, as described in http://golang.org/doc/code.html.
+# This eclass defaults to an empty list.
+GOLANG_PKG_VENDOR=()
+
+# @ECLASS-VARIABLE: GOLANG_PKG_STATIK
+# @DESCRIPTION:
+# Sets the arguments to pass to dev-go/statik.
+# This eclass defaults to an empty list.
+GOLANG_PKG_STATIK="${GOLANG_PKG_STATIK:-}"
+
+# @ECLASS-VARIABLE: GOLANG_PKG_USE_MODULES
+# @DESCRIPTION:
+# Set to enable the compilation of the package with Go modules support.
+
+# @ECLASS-VARIABLE: GO
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# The absolute path to the current GoLang interpreter.
+#
+# This variable is set automatically after calling golang_setup().
+#
+# Default value:
+# @CODE
+# /usr/bin/go
+# @CODE
+
+# @ECLASS-VARIABLE: EGO
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# The executable name of the current GoLang interpreter.
+#
+# This variable is set automatically after calling golang_setup().
+#
+# Default value:
+# @CODE
+# go
+# @CODE
+
+# @ECLASS-VARIABLE: PATCHES
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# Array variable containing all the patches to be applied. This variable
+# is expected to be defined in the global scope of ebuilds. Make sure to
+# specify the full path. This variable is used in src_prepare phase.
+#
+# Example:
+# @CODE
+#	PATCHES=(
+#		"${FILESDIR}/mypatch.patch"
+#		"${FILESDIR}/mypatch2.patch"
+#	)
+# @CODE
+
+# Adds gccgo as a compile-time dependency when GOLANG_PKG_USE_CGO is set.
+#[[ -n ${GOLANG_PKG_USE_CGO} ]] && DEPEND+=" >=sys-devel/gcc-4.8.4[go]"
+
+# Adds dev-go/statik as a compile-time dependency when GOLANG_PKG_STATIK is set.
+[[ -n ${GOLANG_PKG_STATIK} ]] && DEPEND+=" dev-go/statik"
+
+# Validates GOLANG_PKG_IMPORTPATH.
+if [[ -z ${GOLANG_PKG_IMPORTPATH} ]]; then
+	eerror "The remote import path for this package has not been declared"
+	die "Mandatory variable GOLANG_PKG_IMPORTPATH is unset"
+fi
+
+# Forces a multiple package build when user specifies GOLANG_PKG_IS_MULTIPLE=1.
+if [[ -n ${GOLANG_PKG_IS_MULTIPLE} && -z ${GOLANG_PKG_BUILDPATH} ]]; then
+	GOLANG_PKG_BUILDPATH="/..."
+fi
+
+# Validates use of GOLANG_PKG_BUILDPATH combined with GOLANG_PKG_IS_MULTIPLE
+# FIX: makes sure user isn't overriding GOLANG_PKG_BUILDPATH with inane values.
+if [[ -n ${GOLANG_PKG_IS_MULTIPLE} && ${GOLANG_PKG_BUILDPATH##*/} != "..." ]]; then
+	ewarn "Ebuild ${CATEGORY}/${PF} specifies GOLANG_PKG_IS_MULTIPLE=1,"
+	ewarn "but then GOLANG_PKG_BUILDPATH is overridden with \"${GOLANG_PKG_BUILDPATH}\"."
+	ewarn "Please, fix it by appending \"/...\" to your GOLANG_PKG_BUILDPATH."
+	ewarn "If in doubt, remove GOLANG_PKG_BUILDPATH entirely."
+fi
+
+# Even though xz-utils are in @system, they must still be added to DEPEND; see
+# http://archives.gentoo.org/gentoo-dev/msg_a0d4833eb314d1be5d5802a3b710e0a4.xml
+if [[ ${GOLANG_PKG_ARCHIVESUFFIX/.*} == "xz" ]]; then
+	DEPEND+=" app-arch/xz-utils"
+fi
+
+# Defines common USE flags
+IUSE="${IUSE} debug pie"
+# Enables USE 'test' when required by GOLANG_PKG_HAVE_TEST.
+if [[ -n ${GOLANG_PKG_HAVE_TEST} ]]; then
+	IUSE+=" test"
+fi
+
+# Defines HOMEPAGE.
+[ -z "$HOMEPAGE" ] && HOMEPAGE="https://${GOLANG_PKG_IMPORTPATH}/${PN}"
+
+# Defines SOURCE directory.
+S="${WORKDIR}/gopath/src/${GOLANG_PKG_IMPORTPATH_ALIAS}/${GOLANG_PKG_NAME}"
+
+
+# @FUNCTION: _factorize_dependency_entities
+# @INTERNAL
+# @DESCRIPTION:
+# Factorizes the dependency declaration in specific tokens such as the import
+# path, the import path alias, the host name, the author name, the project name,
+# and the revision tag.
+_factorize_dependency_entities() {
+	debug-print-function ${FUNCNAME} "${@}"
+
+	local -A dependency=()
+	local key_list=(importpathalias importpath host project_name author_name revision)
+
+	# Strips all the white spaces from the supplied argument.
+	local raw_dependency="${1//\ /}"
+
+	# Determines the alias of the import path (if present).
+	dependency[importpathalias]="${raw_dependency##*->}"
+
+	# Strips the import path alias from the supplied argument.
+	raw_dependency="${raw_dependency%%->*}"
+
+	# Determines the import path.
+	dependency[importpath]="${raw_dependency%:*}"
+
+	# When the importpath alias is not specified, then this eclass sets the
+	# alias as equal to the import path minus the project name.
+	if [[ "${raw_dependency}" == "${dependency[importpathalias]}" ]]; then
+		dependency[importpathalias]="${dependency[importpath]%/*}"
+	fi
+
+	# Determines the host.
+	dependency[host]="${dependency[importpath]%%/*}"
+
+	# Determines the project name.
+	dependency[project_name]="${dependency[importpath]##*/}"
+
+	# Determines the author name.
+	dependency[author_name]="${dependency[importpath]#*/}"
+	dependency[author_name]="${dependency[author_name]%/*}"
+
+	# Determines the revision.
+	dependency[revision]="${raw_dependency#*:}"
+
+	# Exports all the dependency tokens as an associated list.
+	for key in ${key_list[@]}; do
+		echo "${key} ${dependency[${key}]}"
+	done
+}
+
+# @FUNCTION: golang_setup
+# @DESCRIPTION:
+# Determines where is the GoLang implementation and then set-up the
+# GoLang build environment.
+golang_setup() {
+	debug-print-function ${FUNCNAME} "${@}"
+
+	# NOTE: Keep /usr/bin/go as index [0] and never overwrite it,
+	#       always append other binary paths after the index [0]
+	local GOLANG_BINS=(
+		/usr/bin/go
+		/usr/bin/gofmt
+	)
+
+	[[ -n ${GOLANG_PKG_STATIK} ]] && GOLANG_BINS+=(/usr/bin/statik)
+
+	# Reset GoLang environment variables
+	unset EGO
+	unset EGOFMT
+	unset ESTATIK
+	unset GO
+	unset GOPATH
+	unset GOBIN
+
+	# Determine is the GoLang interpreter is working
+	local IS_EXECUTABLE=1
+	for binary in "${GOLANG_BINS[@]}"; do
+		debug-print "${FUNCNAME}: Checking ... ${binary}"
+
+		[[ -x "${EPREFIX}/${binary}" ]] && continue
+		IS_EXECUTABLE=0
+		ewarn "It seems that the binary '${binary}' is not executable."
+	done
+
+	# dev-lang/go isn't installed or one of its binaries aren't executable.
+	# Either way, the Gentoo box is screwed; no need to set up the GoLang environment
+	[[ ${IS_EXECUTABLE} == 0 ]] && exit
+
+	# dev-lang/go is available and working.
+	# Exports GO/EGO/EGOFMT global variables.
+	export GO="${GOLANG_BINS[0]}"
+	export EGO="${GOLANG_BINS[0]##*/}"
+	export EGOFMT="${GOLANG_BINS[1]}"
+
+	# dev-go/statik is available and working.
+	# Exports ESTATIK global variable.
+	[[ -n ${GOLANG_PKG_STATIK} ]] && export ESTATIK="${GOLANG_BINS[2]##*/}"
+
+	debug-print "${FUNCNAME}: GO = ${GO}"
+	debug-print "${FUNCNAME}: EGO = ${EGO}"
+	debug-print "${FUNCNAME}: EGOFMT = ${EGOFMT}"
+	debug-print "${FUNCNAME}: ESTATIK = ${ESTATIK}"
+
+	# Determines go interpreter version.
+	GOLANG_VERSION="$( ${GO} version )"
+	GOLANG_VERSION="${GOLANG_VERSION/go\ version\ go}"
+	export GOLANG_VERSION="${GOLANG_VERSION%\ *}"
+	einfo "Found GoLang version: ${GOLANG_VERSION}"
+
+	# Determines statik interpreter version.
+	# TODO: add version detection when statik will provide a -version option.
+	if [[ -n ${GOLANG_PKG_STATIK} ]]; then
+		local STATIK_VERSION=""
+		einfo "Found statik version: ${STATIK_VERSION}"
+	fi
+
+	# Enable/Disable frame pointers
+    local GOEXPERIMENT="noframepointer"
+    use debug && GOEXPERIMENT="framepointer"
+
+	# Sets the build environment inside Portage's WORKDIR.
+	ebegin "Setting up GoLang build environment"
+
+		# Prepares CGO_ENABLED.
+		CGO_ENABLED=0
+		[[ -z ${GOLANG_PKG_USE_CGO} ]] || CGO_ENABLED=1
+		use pie && CGO_ENABLED=1 # PIE requires CGO
+
+		# Prepares gopath / gobin directories inside WORKDIR.
+		local _GOPATH="${WORKDIR}/gopath"
+		local _GOBIN="${WORKDIR}/gobin"
+		mkdir -p "${_GOBIN}" || die
+		mkdir -p "${_GOPATH}"/src || die
+
+		# Exports special env variable EGO_SRC.
+		export EGO_SRC="${_GOPATH}/src"
+
+		# Exports GoLang env variables.
+		export GOPATH="$_GOPATH"
+		export GOBIN="$_GOBIN"
+		export CGO_ENABLED
+		#export GOEXPERIMENT
+		#export GO15VENDOREXPERIMENT=0
+
+		GO111MODULE="off"
+		[[ -z ${GOLANG_PKG_USE_MODULES} ]] || GO111MODULE="on"
+		export GO111MODULE
+
+		debug-print "${FUNCNAME}: GOPATH = ${GOPATH}"
+		debug-print "${FUNCNAME}: GOBIN = ${GOBIN}"
+		debug-print "${FUNCNAME}: EGO_SRC = ${EGO_SRC}"
+		debug-print "${FUNCNAME}: CGO_ENABLED = ${CGO_ENABLED}"
+	eend
+}
+
+# @FUNCTION: golang-common_src_prepare
+# @DESCRIPTION:
+# Prepare source code.
+golang-common_src_prepare() {
+	debug-print-function ${FUNCNAME} "${@}"
+
+	pushd "${WORKDIR}" > /dev/null || die
+		einfo "Preparing GoLang build environment in ${GOPATH}/src"
+
+		# If the ebuild declares an importpath alias, then its path was
+		# already created during the src_unpack phase. That means the eclass
+		# needs to create the missing original import path (GOLANG_PKG_IMPORTPATH)
+		# as a simbolic link pointing to the alias.
+		if [[ "${GOLANG_PKG_IMPORTPATH}" != "${GOLANG_PKG_IMPORTPATH_ALIAS}" ]]; then
+
+			# If the ebuild declares a GOLANG_PKG_NAME different from PN, then
+			# the latter will be used as the simbolic link target.
+			local TARGET="${GOLANG_PKG_NAME}"
+			[[ "${PN}" != "${GOLANG_PKG_NAME}" ]] && TARGET="${PN}"
+
+			golang_fix_importpath_alias \
+				"${GOLANG_PKG_IMPORTPATH_ALIAS}/${TARGET}" \
+				"${GOLANG_PKG_IMPORTPATH}/${GOLANG_PKG_NAME}"
+		fi
+
+		# If the ebuild declares some GoLang dependencies, then they need to be
+		# correctly installed into the sand-boxed GoLang build environment which
+		# was set up automatically during src_unpack) phase.
+		if [[ ${#GOLANG_PKG_DEPENDENCIES[@]} -gt 0 ]]; then
+
+			for i in ${!GOLANG_PKG_DEPENDENCIES[@]} ; do
+
+				# Collects all the tokens of the dependency.
+				local -A DEPENDENCY=()
+				while read -r -d $'\n' key value; do
+					[[ -z ${key} ]] && continue
+					DEPENDENCY[$key]="${value}"
+				done <<-EOF
+					$( _factorize_dependency_entities "${GOLANG_PKG_DEPENDENCIES[$i]}" )
+				EOF
+
+				# Debug
+				debug-print "${FUNCNAME}: DEPENDENCY      = ${GOLANG_PKG_DEPENDENCIES[$i]}"
+				debug-print "${FUNCNAME}: importpath      = ${DEPENDENCY[importpath]}"
+				debug-print "${FUNCNAME}: importpathalias = ${DEPENDENCY[importpathalias]}"
+				debug-print "${FUNCNAME}: host            = ${DEPENDENCY[host]}"
+				debug-print "${FUNCNAME}: author          = ${DEPENDENCY[author_name]}"
+				debug-print "${FUNCNAME}: project         = ${DEPENDENCY[project_name]}"
+				debug-print "${FUNCNAME}: revision        = ${DEPENDENCY[revision]}"
+
+				local message="Importing ${DEPENDENCY[importpath]}"
+				local destdir
+
+				# Prepares GOPATH structure.
+				case ${DEPENDENCY[importpathalias]} in
+					gopkg.in*)
+						message+=" as ${DEPENDENCY[importpathalias]}"
+						destdir="${DEPENDENCY[importpathalias]}"
+
+						# Creates the import path in GOPATH.
+						mkdir -p "${GOPATH}/src/${DEPENDENCY[importpathalias]%/*}" || die
+						#einfo "\n${GOPATH}/src/${DEPENDENCY[importpathalias]%/*}"
+						;;
+					*)
+						[[ "${DEPENDENCY[importpath]}" != "${DEPENDENCY[importpathalias]}/${DEPENDENCY[project_name]}" ]] && message+=" as ${DEPENDENCY[importpathalias]}/${DEPENDENCY[project_name]}"
+						destdir="${DEPENDENCY[importpathalias]}/${DEPENDENCY[project_name]}"
+
+						# Creates the import path in GOPATH.
+						mkdir -p "${GOPATH}/src/${DEPENDENCY[importpathalias]}" || die
+						#einfo "\n${GOPATH}/src/${DEPENDENCY[importpathalias]}"
+						;;
+				esac
+
+				# Moves sources from WORKDIR into GOPATH.
+				case ${DEPENDENCY[host]} in
+					github*)
+						ebegin "${message}"
+							mv ${DEPENDENCY[project_name]}-${DEPENDENCY[revision]}* "${GOPATH}"/src/${destdir} || die
+						eend
+
+						# FIX: sometimes the source code inside an importpath alias
+						#      (such as gopkg.in/mylib.v1) invokes imports from
+						#      the original import path instead of using the alias,
+						#      thus we need a symbolic link between the alias and
+						#      the original import path to avoid compilation issues.
+						#      Example: gopkg.in/Shopify/sarama.v1 erroneously
+						#      invokes imports from github.com/shopify/sarama
+						if [[ ${destdir} != ${DEPENDENCY[importpath]} ]]; then
+							golang_fix_importpath_alias ${destdir} ${DEPENDENCY[importpath]}
+						fi
+						;;
+					bitbucket*)
+						#einfo "path: ${DEPENDENCY[author_name]}-${DEPENDENCY[project_name]}-${DEPENDENCY[revision]}"
+						ebegin "${message}"
+							mv ${DEPENDENCY[author_name]}-${DEPENDENCY[project_name]}-${DEPENDENCY[revision]}* "${GOPATH}"/src/${destdir} || die
+						eend
+						;;
+					code.google*)
+						ebegin "${message}"
+							mv ${DEPENDENCY[project_name]}-${DEPENDENCY[revision]}* "${GOPATH}"/src/${destdir} || die
+						eend
+						;;
+					*) die "Function 'golang-common_src_prepare' doesn't support '${DEPENDENCY[importpath]}'" ;;
+				esac
+			done
+
+		fi
+
+	popd > /dev/null || die
+
+	# Auto-detects the presence of Go's vendored
+	# dependencies inside $S/vendor.
+	local VENDOR="${S}/vendor"
+	if [[ -d "${VENDOR}" ]]; then
+		golang_add_vendor "${VENDOR}"
+		export GO15VENDOREXPERIMENT=1
+	fi
+
+	# Auto-detects the presence of Go's vendored
+	# dependencies inside $S/*/vendor
+	if [[ -n ${GOLANG_PKG_BUILDPATH} && ${GOLANG_PKG_BUILDPATH##*/} != "..." ]]; then
+		while read -r -d $' ' path; do
+			# Trims leading slash (if any).
+			path="${path/\//}"
+
+			# Extracts the root path.
+			path="${path%%/*}"
+
+			# Ignores $path when it's empty or a string of white spaces.
+			[[ -n $path ]] || continue
+
+			local vendor="${S}/${path}/vendor"
+			if [[ -d "${vendor}" ]]; then
+				golang_add_vendor "${vendor}"
+			fi
+		done <<< "$( echo ${GOLANG_PKG_BUILDPATH}) "
+	fi
+
+
+	# Auto-detects the presence of Godep's workspace
+	# (see github.com/tools/godep for more infos).
+	VENDOR="${S}/Godeps/_workspace"
+	if [[ -d "${VENDOR}" ]]; then
+		golang_add_vendor "${VENDOR}"
+	fi
+
+	# Evaluates PATCHES array.
+	default_src_prepare
+}
+
+# @FUNCTION: golang-common_src_configure
+# @DESCRIPTION:
+# Configure the package.
+golang-common_src_configure() {
+	debug-print-function ${FUNCNAME} "${@}"
+
+	[[ ${EGO} ]] || die "No GoLang implementation set (golang_setup not called?)."
+
+	# Defines the level of verbosity.
+	local EGO_VERBOSE="-v"
+	[[ -z ${PORTAGE_VERBOSE} ]] || EGO_VERBOSE+=" -x"
+
+	# GoLang doesn't have a configure phase,
+	# so instead this eclass prints the output of 'go env'.
+	local -a GOLANG_ENV=()
+	while read -r line; do
+		GOLANG_ENV+=("${line}")
+	done <<-EOF
+		$( ${GO} env )
+	EOF
+
+	# Prints an error when 'go env' output is missing.
+	if [[ ${#GOLANG_ENV[@]} -eq 1 ]]; then
+		eerror "Your GoLang environment should be more verbose"
+	fi
+
+	# Prints GoLang environment summary.
+	einfo " ${EGO} env"
+	for env in "${GOLANG_ENV[@]}"; do
+		einfo " - ${env}"
+	done
+
+
+	# Removes GoLang object files from package source directories (pkg/)
+	# and temporary directories (_obj/ _test*/).
+	local EGO_SUBPACKAGES="${GOLANG_PKG_IMPORTPATH_ALIAS}/${GOLANG_PKG_NAME}"
+	case $( ver_cut 1-2 ${GOLANG_VERSION} ) in
+		1.4*) ;;
+		*)
+			EGO_SUBPACKAGES+="/..."
+			;;
+	esac
+#	einfo "${EGO} clean -i ${EGO_VERBOSE} ${EGO_SUBPACKAGES}"
+#	${EGO} clean -i \
+#		${EGO_VERBOSE} \
+#		"${EGO_SUBPACKAGES}" \
+#		|| die
+
+	# Removes GoLang objects files from all the dependencies too.
+#	if [[ ${#GOLANG_PKG_DEPENDENCIES[@]} -gt 0 ]]; then
+#
+#		for i in ${!GOLANG_PKG_DEPENDENCIES[@]} ; do
+#
+#			# Collects all the tokens of the dependency.
+#			local -A DEPENDENCY=()
+#			while read -r -d $'\n' key value; do
+#				[[ -z ${key} ]] && continue
+#				DEPENDENCY[$key]="${value}"
+#			done <<-EOF
+#				$( _factorize_dependency_entities "${GOLANG_PKG_DEPENDENCIES[$i]}" )
+#			EOF
+#
+#			[[ ! -d ${DEPENDENCY[importpath]} ]] && continue
+#
+#			# Debug
+#			debug-print "${FUNCNAME}: DEPENDENCY = ${GOLANG_PKG_DEPENDENCIES[$i]}"
+#			debug-print "${FUNCNAME}: importpath = ${DEPENDENCY[importpath]}"
+#
+#			# Cleans object files of the dependency.
+#			einfo "${EGO} clean -i ${EGO_VERBOSE} ${DEPENDENCY[importpath]}"
+#			${EGO} clean \
+#				-i ${EGO_VERBOSE} \
+#				"${DEPENDENCY[importpath]}" \
+#				|| die
+#		done
+#	fi
+
+	# Before to compile Godep's dependencies it's wise to wipe out
+	# all pre-built object files from Godep's package source directories.
+	if [[ -d "${S}"/Godeps/_workspace/pkg ]]; then
+		ebegin "Cleaning up pre-built object files in Godep workspace"
+			rm -r "${S}"/Godeps/_workspace/pkg || die
+		eend
+	fi
+	if [[ -d "${S}"/Godeps/_workspace/bin ]]; then
+		ebegin "Cleaning up executables in Godep workspace"
+			rm -r "${S}"/Godeps/_workspace/bin || die
+		eend
+	fi
+
+
+	# Executes 'go generate'.
+	# NOTE: generate should never run automatically. It must be run explicitly.
+	if [[ -n ${GOLANG_PKG_USE_GENERATE} ]]; then
+		pushd "${GOPATH}/src/${GOLANG_PKG_IMPORTPATH_ALIAS}/${GOLANG_PKG_NAME}" > /dev/null || die
+			einfo "${EGO} generate ${EGO_VERBOSE} ${GOLANG_PKG_IMPORTPATH_ALIAS}/${GOLANG_PKG_NAME}/..."
+			${EGO} generate \
+				${EGO_VERBOSE} \
+				./... \
+				|| die
+		popd > /dev/null || die
+	fi
+
+
+	# Executes 'statik' when explicitly asked.
+	if [[ -n ${GOLANG_PKG_STATIK} ]]; then
+		ebegin "${ESTATIK} $GOLANG_PKG_STATIK"
+			${ESTATIK} $GOLANG_PKG_STATIK || die
+		eend
+	fi
+}
+
+# @FUNCTION: golang-common_src_compile
+# @DESCRIPTION:
+# Compiles the package.
+golang-common_src_compile() {
+	debug-print-function ${FUNCNAME} "${@}"
+
+	[[ ${EGO} ]] || die "No GoLang implementation set (golang_setup not called?)."
+
+	# Populates env variable GOPATH with vendored workspaces (if present).
+	if [[ -n ${GOLANG_PKG_VENDOR} ]]; then
+		einfo "Using vendored dependencies from:"
+
+		for path in "${GOLANG_PKG_VENDOR[@]}"; do
+			[ -d ${path} ] || continue
+
+			if [[ ${path//${S}\//} == "vendor" ]]; then
+				einfo "- vendor/ (native vendoring support)"
+				continue
+			fi
+
+			debug-print "$FUNCNAME: GOPATH: Adding vendor path ${path}"
+			ebegin "- ${path//${S}\//}"
+				GOPATH="${GOPATH}:$( echo ${path} )"
+			eend
+		done
+
+		export GOPATH
+	fi
+
+	# Enables position-independent executables (PIE)
+	local EGO_PIE
+	use pie && EGO_PIE="-buildmode=pie"
+
+	# Defines the install suffix.
+	local EGO_INSTALLSUFFIX
+	[[ -z ${GOLANG_PKG_INSTALLSUFFIX} ]] || EGO_INSTALLSUFFIX="-installsuffix=${GOLANG_PKG_INSTALLSUFFIX}"
+
+	# Defines the level of verbosity.
+	local EGO_VERBOSE="-v"
+	[[ -z ${PORTAGE_VERBOSE} ]] || EGO_VERBOSE+=" -x"
+
+	# Defines the number of builds that can be run in parallel.
+	local EGO_PARALLEL="-p $(makeopts_jobs)"
+
+	# Defines extra options.
+	local EGO_EXTRA_OPTIONS="-a"
+
+	# Prepares build flags for the go toolchain.
+	local EGO_BUILD_FLAGS="$( echo ${EGO_VERBOSE} ) $( echo ${EGO_PARALLEL} ) $( echo ${EGO_EXTRA_OPTIONS} ) $( echo ${EGO_PIE} )"
+	[[ -n ${EGO_INSTALLSUFFIX} ]] && EGO_BUILD_FLAGS+=" $( echo ${EGO_INSTALLSUFFIX} )"
+
+	# Detects the total number of packages.
+	local pkgs=0 ifs_save=${IFS} IFS=$' '
+	for path in ${GOLANG_PKG_BUILDPATH[@]} ; do
+		pkgs=$(( $pkgs + 1 ))
+	done
+	[[ ${pkgs} -eq 0 ]] && pkgs=1 # there is always at least 1 package
+	IFS=${ifs_save}
+
+	# Builds the package
+	einfo "Compiling ${pkgs} package(s):"
+	if [[ -n ${GOLANG_PKG_BUILDPATH} && ${GOLANG_PKG_BUILDPATH##*/} != "..." && ${pkgs} -gt 1 ]]; then
+
+		# NOTE: This eclass trims all leading and trailing white spaces from the
+		#       input of the following 'while read' loop, then appends an extra
+		#       trailing space; this is necessary to avoid undefined behaviours
+		#       within the loop when GOLANG_PKG_BUILDPATH is populated with only
+		#       a single element.
+		while read -r -d $' ' cmd; do
+			# Ignores $cmd when it's empty or a string of white spaces
+			#einfo "cmd: |$cmd| cmd: |${cmd##*/}|"
+			[[ -n $cmd ]] || continue
+
+			golang_do_build \
+				${EGO_BUILD_FLAGS} \
+				-o "${GOBIN}/${cmd##*/}" \
+				"${GOLANG_PKG_IMPORTPATH_ALIAS}/${GOLANG_PKG_NAME}${cmd}"
+		done <<< "$( echo ${GOLANG_PKG_BUILDPATH}) "
+	else
+		# If the package is a multiple package (/...)
+		# then this eclass doesn't specify the output name.
+		[[ ${GOLANG_PKG_BUILDPATH##*/} != "..." ]] && EGO_BUILD_FLAGS+=" -o ${GOBIN}/${GOLANG_PKG_OUTPUT_NAME}"
+
+		golang_do_build \
+			${EGO_BUILD_FLAGS} \
+			"${GOLANG_PKG_IMPORTPATH_ALIAS}/${GOLANG_PKG_NAME}${GOLANG_PKG_BUILDPATH}"
+	fi
+}
+
+# @FUNCTION: golang-common_src_install
+# @DESCRIPTION:
+# Installs binaries and documents from DOCS or HTML_DOCS arrays.
+golang-common_src_install() {
+	debug-print-function ${FUNCNAME} "${@}"
+
+	[[ ${EGO} ]] || die "No GoLang implementation set (golang_setup not called?)."
+
+	# Enables position-independent executables (PIE)
+	local EGO_PIE
+	use pie && EGO_PIE="-buildmode=pie"
+
+	# Defines the install suffix.
+	local EGO_INSTALLSUFFIX
+	[[ -z ${GOLANG_PKG_INSTALLSUFFIX} ]] || EGO_INSTALLSUFFIX="-installsuffix=${GOLANG_PKG_INSTALLSUFFIX}"
+
+	# Defines the level of verbosity.
+	local EGO_VERBOSE="-v"
+	[[ -z ${PORTAGE_VERBOSE} ]] || EGO_VERBOSE+=" -x"
+
+	# Defines the number of builds that can be run in parallel.
+	local EGO_PARALLEL="-p $(makeopts_jobs)"
+
+	# Defines extra options.
+	local EGO_EXTRA_OPTIONS
+
+	# Prepares build flags for the go toolchain.
+	local EGO_BUILD_FLAGS="$( echo ${EGO_VERBOSE} ) $( echo ${EGO_PARALLEL} ) $( echo ${EGO_EXTRA_OPTIONS} ) $( echo ${EGO_PIE} )"
+	[[ -n ${EGO_INSTALLSUFFIX} ]] && EGO_BUILD_FLAGS+=" $( echo ${EGO_INSTALLSUFFIX} )"
+
+	# Defines sub-packages.
+	local EGO_SUBPACKAGES="${GOLANG_PKG_IMPORTPATH_ALIAS}/${GOLANG_PKG_NAME}${GOLANG_PKG_BUILDPATH}"
+
+	# Executes the pre-install phase (go install).
+	if [[ -n ${GOLANG_PKG_IS_MULTIPLE} ]]; then
+		einfo "${EGO} install -ldflags '$GOLANG_PKG_LDFLAGS' -tags '$GOLANG_PKG_TAGS' ${EGO_BUILD_FLAGS} ${EGO_SUBPACKAGES}"
+		${EGO} install \
+			-ldflags "${GOLANG_PKG_LDFLAGS}" \
+			-tags "${GOLANG_PKG_TAGS}" \
+			${EGO_BUILD_FLAGS} \
+			"${EGO_SUBPACKAGES}" \
+			|| die
+	fi
+
+	# Installs binaries.
+	into ${GOLANG_PKG_INSTALLPATH}
+	for bin in "${GOBIN}"/* ; do
+		dobin ${bin}
+	done
+
+	# Installs documentation.
+	einstalldocs
+}
+
+# @FUNCTION: golang-common_src_test
+# @DESCRIPTION:
+# Runs the unit tests for the main package.
+golang-common_src_test() {
+	debug-print-function ${FUNCNAME} "${@}"
+
+	[[ ${EGO} ]] || die "No GoLang implementation set (golang_setup not called?)."
+
+	# Appends S and GOBIN to exported main paths.
+	# FIX: this is necessary for unit tests that need to invoke bins from
+	#       $GOBIN or from within $S/bin.
+	export PATH="${S}/bin:${GOBIN}:${PATH}"
+
+	# Defines the level of verbosity.
+	local EGO_VERBOSE="-v"
+	[[ -z ${PORTAGE_VERBOSE} ]] || EGO_VERBOSE+=" -x"
+
+	# Defines the number of builds that can be run in parallel.
+	local EGO_PARALLEL="-p $(makeopts_jobs)"
+
+	# Defines extra options.
+	#local EGO_EXTRA_OPTIONS="-a"
+
+	# Enables data race detection.
+	local EGO_RACE
+	[[ -n ${GOLANG_PKG_HAVE_TEST_RACE} ]] && EGO_RACE=" -race"
+
+	# Prepares build flags for the go toolchain.
+	local EGO_BUILD_FLAGS="$( echo ${EGO_VERBOSE} ) $( echo ${EGO_PARALLEL} ) $( echo ${EGO_EXTRA_OPTIONS} )"
+	[[ -n ${EGO_RACE} ]] && EGO_BUILD_FLAGS+=" $( echo ${EGO_RACE} )"
+
+	# Sanitizes vars from entra white spaces.
+    GOLANG_PKG_LDFLAGS="$( echo ${GOLANG_PKG_LDFLAGS} )"
+    GOLANG_PKG_TAGS="$( echo ${GOLANG_PKG_TAGS} )"
+
+	# Defines sub-packages.
+	local EGO_SUBPACKAGES="${GOLANG_PKG_IMPORTPATH_ALIAS}/${GOLANG_PKG_NAME}${GOLANG_PKG_BUILDPATH}"
+	[[ -z ${GOLANG_PKG_IS_MULTIPLE} ]] || EGO_SUBPACKAGES="./..."
+
+	# Detects the total number of packages.
+	local pkgs=0 ifs_save=${IFS} IFS=$' '
+	for path in ${GOLANG_PKG_BUILDPATH[@]} ; do
+		pkgs=$(( $pkgs + 1 ))
+	done
+	[[ ${pkgs} -eq 0 ]] && pkgs=1 # there is always at least 1 package
+	IFS=${ifs_save}
+
+	# Runs the Unit Tests
+	einfo "Testing ${pkgs} package(s):"
+	if [[ -n ${GOLANG_PKG_BUILDPATH} && ${GOLANG_PKG_BUILDPATH##*/} != "..." && ${pkgs} -gt 1 ]]; then
+
+		# NOTE: This eclass trims all leading and trailing white spaces from the
+		#       input of the following 'while read' loop, then appends an extra
+		#       trailing space; this is necessary to avoid undefined behaviours
+		#       within the loop when GOLANG_PKG_BUILDPATH is populated with only
+		#       a single element.
+		while read -r -d $' ' cmd; do
+			# Ignores $cmd when it's empty or a string of white spaces
+			#einfo "cmd: |$cmd| cmd: |${cmd##*/}|"
+			[[ -n $cmd ]] || continue
+
+			einfo "${EGO} test -ldflags '$GOLANG_PKG_LDFLAGS' -tags '$GOLANG_PKG_TAGS' ${EGO_BUILD_FLAGS} ${GOLANG_PKG_IMPORTPATH_ALIAS}/${GOLANG_PKG_NAME}${cmd}/..."
+			${EGO} test \
+				-ldflags "${GOLANG_PKG_LDFLAGS}" \
+				-tags "${GOLANG_PKG_TAGS}" \
+				${EGO_BUILD_FLAGS} \
+				"${GOLANG_PKG_IMPORTPATH_ALIAS}/${GOLANG_PKG_NAME}${cmd}/..." \
+				|| die
+       done <<< "$( echo ${GOLANG_PKG_BUILDPATH}) "
+	else
+		# It's a single package
+		einfo "${EGO} test -ldflags '$GOLANG_PKG_LDFLAGS' -tags '$GOLANG_PKG_TAGS' ${EGO_BUILD_FLAGS} ${EGO_SUBPACKAGES}"
+		${EGO} test \
+			-ldflags "${GOLANG_PKG_LDFLAGS}" \
+			-tags "${GOLANG_PKG_TAGS}" \
+			${EGO_BUILD_FLAGS} \
+			"${EGO_SUBPACKAGES}" \
+			|| die
+	fi
+}
+
+# @FUNCTION: golang_do_build
+# @INTERNAL
+# @USAGE: <flags> <buildpath>
+# @DESCRIPTION:
+#
+# @CODE
+# Example:
+#   GOLANG_PKG_LDFLAGS="-extldflags=-static"
+#   GOLANG_PKG_TAGS="netgo"
+#
+#	golang_do_build ${EGO_BUILD_FLAGS} ${GOLANG_PKG_IMPORTPATH}/${GOLANG_PKG_NAME}${GOLANG_PKG_BUILDPATH}
+# @CODE
+golang_do_build() {
+	debug-print-function ${FUNCNAME} $*
+
+	[[ ${GOLANG_VERSION} ]] || die "No GoLang implementation set (golang_setup not called?)."
+
+	# Filters "=" chars from ldflags declaration.
+	# NOTE: from go1.5+ linker syntax is no more compatible with <go1.4;
+	#       this hack ensures that the old behaviour is honoured.
+	if [[ $( ver_cut 1-2 ${GOLANG_VERSION} ) == "1.4" ]]; then
+		GOLANG_PKG_LDFLAGS="${GOLANG_PKG_LDFLAGS//=/ }"
+	fi
+
+	# Disables debug symbols (DWARF) when not required.
+	if ! use debug; then
+		case "${GOLANG_PKG_LDFLAGS}" in
+			*-s*|*-w*)
+			    # Do nothing
+			;;
+			*)
+				GOLANG_PKG_LDFLAGS+=" -s -w"
+		esac
+	fi
+
+	# Sanitizes vars from entra white spaces.
+	GOLANG_PKG_LDFLAGS="$( echo ${GOLANG_PKG_LDFLAGS} )"
+	GOLANG_PKG_TAGS="$( echo ${GOLANG_PKG_TAGS} )"
+
+	einfo "${EGO} build -ldflags '$GOLANG_PKG_LDFLAGS' -tags '$GOLANG_PKG_TAGS' $*"
+	${EGO} build \
+		-ldflags "${GOLANG_PKG_LDFLAGS}" \
+		-tags "${GOLANG_PKG_TAGS}" \
+		$( echo $* ) \
+		|| die
+}
+
+# @FUNCTION: golang_add_vendor
+# @INTERNAL
+# @USAGE: <path>
+# @DESCRIPTION:
+#
+# @CODE
+# Example
+#
+#   golang_add_vendor "${S}"/vendor
+#   golang_add_vendor "${S}"/${PN}/vendor
+# @CODE
+golang_add_vendor() {
+	debug-print-function ${FUNCNAME} $*
+
+	[[ ${1} ]] || die "${FUNCNAME}: no paths given"
+
+	[[ ${GOLANG_VERSION} ]] || die "No Golang implementation set (golang_setup not called?)."
+
+	[[ ! -d "${1}" ]] && return
+
+	# NOTE: this hack is required by Go v1.4 and older versions.
+	#if [[ ! -d "${1}"/src ]]; then
+	#	ebegin "Fixing $1"
+	#		ln -s "${1}" "${1}"/src || die
+	#	eend
+	#fi
+
+	GOLANG_PKG_VENDOR+=(${1})
+}
+
+
+# @FUNCTION: golang_fix_importpath_alias
+# @USAGE: <target> <alias>
+# @DESCRIPTION:
+# Helper functions for generating a symbolic link for import path <target> as
+# <alias>.
+#
+# WARNING: Use this function only if GOLANG_PKG_DEPENDENCIES declaration of
+# import path aliases doesn't work (e.g.: the package name differs from both the
+# import path and the alias, or if the package name is case sensitive but the
+# import path is not).
+#
+# @CODE
+# Example:
+#
+#   src_prepare() {
+#   	golang-single_src_prepare
+#
+#   	golang_fix_importpath_alias \
+#   		"github.com/GoogleCloudPlatform/gcloud-golang" \
+#   		"google.golang.org/cloud"
+#   }
+# @CODE
+golang_fix_importpath_alias() {
+	debug-print-function ${FUNCNAME} "${@}"
+
+	[[ ${1} ]] || die "${FUNCNAME}: no target specified"
+	[[ ${2} ]] || die "${FUNCNAME}: no alias specified"
+
+	[[ ${EGO} ]] || die "No GoLang implementation set (golang_setup not called?)."
+
+
+	local TARGET="${1}"
+	local ALIAS="${2}"
+
+	if [[ ${ALIAS%/*} != ${ALIAS} ]]; then
+		mkdir -p "${GOPATH}/src/${ALIAS%/*}" || die
+	fi
+	ebegin "Linking ${TARGET} as ${ALIAS}"
+		ln -s "${GOPATH}/src/${TARGET}" \
+			"${GOPATH}/src/${ALIAS}" \
+			|| die
+	eend
+}
+
+fi

diff --git a/eclass/golang-single.eclass b/eclass/golang-single.eclass
new file mode 100644
index 000000000..692918bd9
--- /dev/null
+++ b/eclass/golang-single.eclass
@@ -0,0 +1,180 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# @ECLASS: golang-single.eclass
+# @MAINTAINER:
+#
+# @AUTHOR:
+# Mauro Toffanin <toffanin.mauro@gmail.com>
+# @BLURB: An eclass for GoLang packages not installed inside GOPATH/GOBIN.
+# @DESCRIPTION:
+# This eclass allows to install arbitrary packages written in GoLang which
+# don't support being installed inside the Go environment.
+# This mostly includes traditional packages (C/C++/GUI) embedding tools written
+# in GoLang, and GoLang packages that need to be compiled with GCC instead of
+# the standard Go interpreter.
+#
+# @EXAMPLE:
+# Typical ebuild using golang-single.eclass:
+#
+# @CODE
+# EAPI=5
+#
+# GOLANG_PKG_IMPORTPATH="github.com/captObvious"
+# GOLANG_PKG_ARCHIVESUFFIX=".zip"
+# GOLANG_PKG_HAVE_TEST
+# inherit golang-single qt4-r2
+#
+# DESCRIPTION="Foo bar application"
+# HOMEPAGE="http://example.org/foo/"
+#
+# LICENSE="MIT"
+# KEYWORDS="~amd64 ~x86"
+# SLOT="0"
+# IUSE="doc qt4"
+#
+# CDEPEND="
+#   qt4? (
+#       dev-qt/qtcore:4
+#       dev-qt/qtgui:4
+#   )"
+# RDEPEND="${CDEPEND}
+#   !media-gfx/bar"
+# DEPEND="${CDEPEND}
+#   doc? ( app-doc/doxygen )"
+#
+# DOCS=(AUTHORS ChangeLog README "Read me.txt" TODO)
+#
+# PATCHES=(
+#   "${FILESDIR}/${P}-qt4.patch" # bug 123458
+#   "${FILESDIR}/${P}-as-needed.patch"
+# )
+#
+# src_install() {
+#   use doc && HTML_DOCS=("${BUILD_DIR}/apidocs/html/")
+#   autotools-utils_src_install
+#   if use examples; then
+#       dobin "${BUILD_DIR}"/foo_example{1,2,3} \\
+#           || die 'dobin examples failed'
+#   fi
+# }
+#
+# @CODE
+
+inherit golang-common
+
+EXPORT_FUNCTIONS src_prepare src_unpack src_configure src_compile src_install src_test
+
+if [[ -z ${_GOLANG_SINGLE_ECLASS} ]]; then
+_GOLANG_SINGLE_ECLASS=1
+
+# This eclass uses GOLANG_PKG_IMPORTPATH to populate SRC_URI.
+SRC_URI="${SRC_URI:="https://${GOLANG_PKG_IMPORTPATH}/${GOLANG_PKG_NAME}/archive/${GOLANG_PKG_ARCHIVEPREFIX}${GOLANG_PKG_VERSION}${GOLANG_PKG_ARCHIVESUFFIX} -> ${P}${GOLANG_PKG_ARCHIVESUFFIX}"}"
+
+# This eclass uses GOLANG_PKG_DEPENDENCIES associative array to populate SRC_URI
+# with the required snapshots of the supplied GoLang dependencies.
+if [[ ${#GOLANG_PKG_DEPENDENCIES[@]} -gt 0 ]]; then
+
+	for i in ${!GOLANG_PKG_DEPENDENCIES[@]} ; do
+
+		# Collects all the tokens of the dependency.
+		local -A DEPENDENCY=()
+		while read -d $'\n' key value; do
+			[[ -z ${key} ]] && continue
+			DEPENDENCY[$key]="${value}"
+		done <<-EOF
+			$( _factorize_dependency_entities "${GOLANG_PKG_DEPENDENCIES[$i]}" )
+		EOF
+
+		# Debug
+		debug-print "${FUNCNAME}: DEPENDENCY = ${GOLANG_PKG_DEPENDENCIES[$i]}"
+		debug-print "${FUNCNAME}: importpath = ${DEPENDENCY[importpath]}"
+		debug-print "${FUNCNAME}: revision   = ${DEPENDENCY[revision]}"
+
+		# Downloads the archive.
+		case ${DEPENDENCY[importpath]} in
+			github*)
+				SRC_URI+=" https://${DEPENDENCY[importpath]}/archive/${DEPENDENCY[revision]}${GOLANG_PKG_ARCHIVESUFFIX} -> ${DEPENDENCY[importpath]//\//-}-${DEPENDENCY[revision]}${GOLANG_PKG_ARCHIVESUFFIX}"
+				;;
+			bitbucket*)
+				SRC_URI+=" https://${DEPENDENCY[importpath]}/get/${DEPENDENCY[revision]}.zip -> ${DEPENDENCY[importpath]//\//-}-${DEPENDENCY[revision]}.zip"
+				;;
+			code.google*)
+				SRC_URI+=" https://${DEPENDENCY[project_name]}.googlecode.com/archive/${DEPENDENCY[revision]}.tar.gz -> ${DEPENDENCY[importpath]//\//-}-${DEPENDENCY[revision]}.tar.gz"
+				;;
+			*) die "This eclass doesn't support '${DEPENDENCY[importpath]}'" ;;
+		esac
+
+	done
+fi
+
+# @FUNCTION: golang-single_src_unpack
+# @DESCRIPTION:
+# Unpack the source archive.
+golang-single_src_unpack() {
+	debug-print-function ${FUNCNAME} "${@}"
+
+	default
+
+	# Creates S.
+	mkdir -p "${S%/*}" || die
+
+	# Moves main GoLang package from WORKDIR into GOPATH.
+	if [[ "${GOLANG_PKG_IMPORTPATH}" != "${GOLANG_PKG_IMPORTPATH_ALIAS}" ]]; then
+		local alias_abspath="${WORKDIR}/gopath/src/${GOLANG_PKG_IMPORTPATH_ALIAS}/${GOLANG_PKG_NAME}"
+		mkdir -p "${alias_abspath%/*}" || die
+		mv "${GOLANG_PKG_NAME}-${GOLANG_PKG_VERSION}" "${alias_abspath}"/ || die
+	else
+		mv "${GOLANG_PKG_NAME}-${GOLANG_PKG_VERSION}" "${S}"/ || die
+	fi
+}
+
+# @FUNCTION: golang-single_src_prepare
+# @DESCRIPTION:
+# Prepare source code.
+golang-single_src_prepare() {
+	debug-print-function ${FUNCNAME} "$@"
+
+	# Sets up GoLang build environment.
+	golang_setup
+
+	golang-common_src_prepare
+}
+
+# @FUNCTION: golang-single_src_configure
+# @DESCRIPTION:
+# Configure the package.
+golang-single_src_configure() {
+	debug-print-function ${FUNCNAME} "$@"
+
+	golang-common_src_configure
+}
+
+# @FUNCTION: golang-single_src_compile
+# @DESCRIPTION:
+# Compiles the package.
+golang-single_src_compile() {
+	debug-print-function ${FUNCNAME} "$@"
+
+	golang-common_src_compile
+}
+
+# @FUNCTION: golang-single_src_install
+# @DESCRIPTION:
+# Installs binaries and documents from DOCS or HTML_DOCS arrays.
+golang-single_src_install() {
+	debug-print-function ${FUNCNAME} "$@"
+
+	golang-common_src_install
+}
+
+# @FUNCTION: golang-single_src_test
+# @DESCRIPTION:
+# Runs the unit tests for the main package.
+golang-single_src_test() {
+	debug-print-function ${FUNCNAME} "$@"
+
+	golang-common_src_test
+}
+
+fi


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2021-05-24 14:49 Alessandro Barbieri
  0 siblings, 0 replies; 180+ messages in thread
From: Alessandro Barbieri @ 2021-05-24 14:49 UTC (permalink / raw
  To: gentoo-commits

commit:     55604b91a81e9e391253623c7b3ce40f57eec0b0
Author:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
AuthorDate: Mon May 24 14:48:21 2021 +0000
Commit:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
CommitDate: Mon May 24 14:49:55 2021 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=55604b91

eclass: remove unused eclasses

Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>

 eclass/golang-common.eclass | 1027 -------------------------------------------
 eclass/golang-single.eclass |  180 --------
 2 files changed, 1207 deletions(-)

diff --git a/eclass/golang-common.eclass b/eclass/golang-common.eclass
deleted file mode 100644
index 85dac9d25..000000000
--- a/eclass/golang-common.eclass
+++ /dev/null
@@ -1,1027 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-# @ECLASS: golang-utils.eclass
-# @MAINTAINER:
-#
-# @AUTHOR:
-# Mauro Toffanin <toffanin.mauro@gmail.com>
-# @BLURB: Base eclass for GoLang packages
-# @SUPPORTED_EAPIS: 7
-# @DESCRIPTION:
-# This eclass provides functionalities which are used by golang-single.eclass,
-# golang-live.eclass, and as well as from ebuilds.
-#
-# This eclass should not be inherited directly from an ebuild.
-# Instead, you should inherit golang-single or golang-live for GoLang packages.
-
-inherit eutils multiprocessing
-
-if [[ -z ${_GOLANG_BASE_ECLASS} ]]; then
-_GOLANG_BASE_ECLASS=1
-
-# Silences repoman warnings.
-case "${EAPI:-0}" in
-	7)
-		case "${GOLANG_PKG_DEPEND_ON_GO_SUBSLOT:-yes}" in
-			yes)
-				GO_DEPEND="dev-lang/go:0="
-				;;
-			*)
-				GO_DEPEND="dev-lang/go:*"
-				;;
-		esac
-		;;
-	*)
-		die "${ECLASS}: EAPI=${EAPI:-0} is not supported" ;;
-esac
-
-DEPEND+=" ${GO_DEPEND}"
-
-RESTRICT+=" strip"
-
-QA_FLAGS_IGNORED="
-	usr/bin/.*
-	usr/sbin/.*
-"
-QA_PRESTRIPPED="
-	usr/bin/.*
-	usr/sbin/.*
-"
-
-# @ECLASS-VARIABLE: GOLANG_PKG_NAME
-# @DESCRIPTION:
-# Sets the GoLang name for the generated package.
-# GOLANG_PKG_NAME="${PN}"
-GOLANG_PKG_NAME="${GOLANG_PKG_NAME:-${PN}}"
-
-# @ECLASS-VARIABLE: GOLANG_PKG_VERSION
-# @DESCRIPTION:
-# Sets the GoLang version for the generated package.
-# GOLANG_PKG_VERSION="${PV}"
-GOLANG_PKG_VERSION="${GOLANG_PKG_VERSION:-${PV/_pre/.pre}}"
-
-# @ECLASS-VARIABLE: GOLANG_PKG_IMPORTPATH
-# @DESCRIPTION:
-# Sets the remote import path for the generated package.
-# GOLANG_PKG_IMPORTPATH="github.com/captObvious/"
-GOLANG_PKG_IMPORTPATH="${GOLANG_PKG_IMPORTPATH:-}"
-
-# @ECLASS-VARIABLE: GOLANG_PKG_IMPORTPATH_ALIAS
-# @DESCRIPTION:
-# Sets an alias of the remote import path for the generated package.
-# GOLANG_PKG_IMPORTPATH_ALIAS="privaterepo.com/captObvious/"
-GOLANG_PKG_IMPORTPATH_ALIAS="${GOLANG_PKG_IMPORTPATH_ALIAS:=${GOLANG_PKG_IMPORTPATH}}"
-
-# @ECLASS-VARIABLE: GOLANG_PKG_ARCHIVEPREFIX
-# @DESCRIPTION:
-# Sets the archive prefix for the file URI of the package.
-# Most projects hosted on GitHub's mirrors provide archives with prefix as
-# 'v' or 'source-', other hosted services offer different archive formats.
-# This eclass defaults to an empty prefix.
-GOLANG_PKG_ARCHIVEPREFIX="${GOLANG_PKG_ARCHIVEPREFIX:-}"
-
-# @ECLASS-VARIABLE: GOLANG_PKG_ARCHIVESUFFIX
-# @DESCRIPTION:
-# Sets the archive suffix for the file URI of the package.
-# Most projects hosted on GitHub's mirrors provide archives with suffix as
-# '.tar.gz' or '.zip', other hosted services offer different archive formats.
-# This eclass defaults to '.tar.gz'.
-GOLANG_PKG_ARCHIVESUFFIX="${GOLANG_PKG_ARCHIVESUFFIX:=".tar.gz"}"
-
-# @ECLASS-VARIABLE: GOLANG_PKG_OUTPUT_NAME
-# @DESCRIPTION:
-# Specifies the output file name of the package.
-# If not set, it derives from the name of the package, such as $GOLANG_PKG_NAME.
-# This eclass defaults to $PN.
-GOLANG_PKG_OUTPUT_NAME="${GOLANG_PKG_OUTPUT_NAME:=${PN}}"
-
-# @ECLASS-VARIABLE: GOLANG_PKG_BUILDPATH
-# @DESCRIPTION:
-# Specifies a go source file to be compiled as a single main package.
-# This eclass defaults to an empty value.
-# This eclass defaults to "/..." when the user declares GOLANG_PKG_IS_MULTIPLE=1
-GOLANG_PKG_BUILDPATH="${GOLANG_PKG_BUILDPATH:-}"
-
-# @ECLASS-VARIABLE: GOLANG_PKG_INSTALLPATH
-# @DESCRIPTION:
-# Sets the root path into which a binary, or a list of binaries, will be
-# installed (e.x.: ${GOLANG_PKG_INSTALLPATH}/bin).
-# This eclass defaults to "/usr"
-GOLANG_PKG_INSTALLPATH="${GOLANG_PKG_INSTALLPATH:="/usr"}"
-
-# @ECLASS-VARIABLE: GOLANG_PKG_INSTALLSUFFIX
-# @DESCRIPTION:
-# Sets a suffix to use in the name of the package installation directory.
-# This eclass defaults to an empty install suffix.
-GOLANG_PKG_INSTALLSUFFIX="${GOLANG_PKG_INSTALLSUFFIX:-}"
-
-# @ECLASS-VARIABLE: GOLANG_PKG_IS_MULTIPLE
-# @DESCRIPTION:
-# Set to enable the building of multiple packages from a single import path.
-
-# @ECLASS-VARIABLE: GOLANG_PKG_HAVE_TEST
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# Set to enable the execution of automated testing.
-
-# @ECLASS-VARIABLE: GOLANG_PKG_HAVE_TEST_RACE
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# Set to enable the execution of automated testing with support for
-# data race detection.
-
-# @ECLASS-VARIABLE: GOLANG_PKG_USE_CGO
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# Set to enable the compilation of the package with CGO.
-
-# @ECLASS-VARIABLE: GOLANG_PKG_USE_GENERATE
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# Set to run commands described by directives within existing golang files.
-
-# @ECLASS-VARIABLE: GOLANG_PKG_DEPEND_ON_GO_SUBSLOT
-# @DESCRIPTION:
-# Set to ensure the package does depend on the dev-lang/go subslot value.
-# Possible values: {yes,no}
-# This eclass defaults to "no"
-GOLANG_PKG_DEPEND_ON_GO_SUBSLOT=${GOLANG_PKG_DEPEND_ON_GO_SUBSLOT:="no"}
-
-# @ECLASS-VARIABLE: GOLANG_PKG_LDFLAGS
-# @DESCRIPTION:
-# Sets the linker arguments to pass to 5l, 6l, or 8l.
-# This eclass defaults to an empty list.
-GOLANG_PKG_LDFLAGS="${GOLANG_PKG_LDFLAGS:-}"
-
-# @ECLASS-VARIABLE: GOLANG_PKG_TAGS
-# @DESCRIPTION:
-# Sets the list of build tags during the build.
-# This eclass defaults to an empty list.
-GOLANG_PKG_TAGS="${GOLANG_PKG_TAGS:-}"
-
-# @ECLASS-VARIABLE: GOLANG_PKG_VENDOR
-# @DESCRIPTION:
-# Sets additional standard Go workspaces to be appended to the environment
-# variable GOPATH, as described in http://golang.org/doc/code.html.
-# This eclass defaults to an empty list.
-GOLANG_PKG_VENDOR=()
-
-# @ECLASS-VARIABLE: GOLANG_PKG_STATIK
-# @DESCRIPTION:
-# Sets the arguments to pass to dev-go/statik.
-# This eclass defaults to an empty list.
-GOLANG_PKG_STATIK="${GOLANG_PKG_STATIK:-}"
-
-# @ECLASS-VARIABLE: GOLANG_PKG_USE_MODULES
-# @DESCRIPTION:
-# Set to enable the compilation of the package with Go modules support.
-
-# @ECLASS-VARIABLE: GO
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# The absolute path to the current GoLang interpreter.
-#
-# This variable is set automatically after calling golang_setup().
-#
-# Default value:
-# @CODE
-# /usr/bin/go
-# @CODE
-
-# @ECLASS-VARIABLE: EGO
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# The executable name of the current GoLang interpreter.
-#
-# This variable is set automatically after calling golang_setup().
-#
-# Default value:
-# @CODE
-# go
-# @CODE
-
-# @ECLASS-VARIABLE: PATCHES
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# Array variable containing all the patches to be applied. This variable
-# is expected to be defined in the global scope of ebuilds. Make sure to
-# specify the full path. This variable is used in src_prepare phase.
-#
-# Example:
-# @CODE
-#	PATCHES=(
-#		"${FILESDIR}/mypatch.patch"
-#		"${FILESDIR}/mypatch2.patch"
-#	)
-# @CODE
-
-# Adds gccgo as a compile-time dependency when GOLANG_PKG_USE_CGO is set.
-#[[ -n ${GOLANG_PKG_USE_CGO} ]] && DEPEND+=" >=sys-devel/gcc-4.8.4[go]"
-
-# Adds dev-go/statik as a compile-time dependency when GOLANG_PKG_STATIK is set.
-[[ -n ${GOLANG_PKG_STATIK} ]] && DEPEND+=" dev-go/statik"
-
-# Validates GOLANG_PKG_IMPORTPATH.
-if [[ -z ${GOLANG_PKG_IMPORTPATH} ]]; then
-	eerror "The remote import path for this package has not been declared"
-	die "Mandatory variable GOLANG_PKG_IMPORTPATH is unset"
-fi
-
-# Forces a multiple package build when user specifies GOLANG_PKG_IS_MULTIPLE=1.
-if [[ -n ${GOLANG_PKG_IS_MULTIPLE} && -z ${GOLANG_PKG_BUILDPATH} ]]; then
-	GOLANG_PKG_BUILDPATH="/..."
-fi
-
-# Validates use of GOLANG_PKG_BUILDPATH combined with GOLANG_PKG_IS_MULTIPLE
-# FIX: makes sure user isn't overriding GOLANG_PKG_BUILDPATH with inane values.
-if [[ -n ${GOLANG_PKG_IS_MULTIPLE} && ${GOLANG_PKG_BUILDPATH##*/} != "..." ]]; then
-	ewarn "Ebuild ${CATEGORY}/${PF} specifies GOLANG_PKG_IS_MULTIPLE=1,"
-	ewarn "but then GOLANG_PKG_BUILDPATH is overridden with \"${GOLANG_PKG_BUILDPATH}\"."
-	ewarn "Please, fix it by appending \"/...\" to your GOLANG_PKG_BUILDPATH."
-	ewarn "If in doubt, remove GOLANG_PKG_BUILDPATH entirely."
-fi
-
-# Even though xz-utils are in @system, they must still be added to DEPEND; see
-# http://archives.gentoo.org/gentoo-dev/msg_a0d4833eb314d1be5d5802a3b710e0a4.xml
-if [[ ${GOLANG_PKG_ARCHIVESUFFIX/.*} == "xz" ]]; then
-	DEPEND+=" app-arch/xz-utils"
-fi
-
-# Defines common USE flags
-IUSE="${IUSE} debug pie"
-# Enables USE 'test' when required by GOLANG_PKG_HAVE_TEST.
-if [[ -n ${GOLANG_PKG_HAVE_TEST} ]]; then
-	IUSE+=" test"
-fi
-
-# Defines HOMEPAGE.
-[ -z "$HOMEPAGE" ] && HOMEPAGE="https://${GOLANG_PKG_IMPORTPATH}/${PN}"
-
-# Defines SOURCE directory.
-S="${WORKDIR}/gopath/src/${GOLANG_PKG_IMPORTPATH_ALIAS}/${GOLANG_PKG_NAME}"
-
-
-# @FUNCTION: _factorize_dependency_entities
-# @INTERNAL
-# @DESCRIPTION:
-# Factorizes the dependency declaration in specific tokens such as the import
-# path, the import path alias, the host name, the author name, the project name,
-# and the revision tag.
-_factorize_dependency_entities() {
-	debug-print-function ${FUNCNAME} "${@}"
-
-	local -A dependency=()
-	local key_list=(importpathalias importpath host project_name author_name revision)
-
-	# Strips all the white spaces from the supplied argument.
-	local raw_dependency="${1//\ /}"
-
-	# Determines the alias of the import path (if present).
-	dependency[importpathalias]="${raw_dependency##*->}"
-
-	# Strips the import path alias from the supplied argument.
-	raw_dependency="${raw_dependency%%->*}"
-
-	# Determines the import path.
-	dependency[importpath]="${raw_dependency%:*}"
-
-	# When the importpath alias is not specified, then this eclass sets the
-	# alias as equal to the import path minus the project name.
-	if [[ "${raw_dependency}" == "${dependency[importpathalias]}" ]]; then
-		dependency[importpathalias]="${dependency[importpath]%/*}"
-	fi
-
-	# Determines the host.
-	dependency[host]="${dependency[importpath]%%/*}"
-
-	# Determines the project name.
-	dependency[project_name]="${dependency[importpath]##*/}"
-
-	# Determines the author name.
-	dependency[author_name]="${dependency[importpath]#*/}"
-	dependency[author_name]="${dependency[author_name]%/*}"
-
-	# Determines the revision.
-	dependency[revision]="${raw_dependency#*:}"
-
-	# Exports all the dependency tokens as an associated list.
-	for key in ${key_list[@]}; do
-		echo "${key} ${dependency[${key}]}"
-	done
-}
-
-# @FUNCTION: golang_setup
-# @DESCRIPTION:
-# Determines where is the GoLang implementation and then set-up the
-# GoLang build environment.
-golang_setup() {
-	debug-print-function ${FUNCNAME} "${@}"
-
-	# NOTE: Keep /usr/bin/go as index [0] and never overwrite it,
-	#       always append other binary paths after the index [0]
-	local GOLANG_BINS=(
-		/usr/bin/go
-		/usr/bin/gofmt
-	)
-
-	[[ -n ${GOLANG_PKG_STATIK} ]] && GOLANG_BINS+=(/usr/bin/statik)
-
-	# Reset GoLang environment variables
-	unset EGO
-	unset EGOFMT
-	unset ESTATIK
-	unset GO
-	unset GOPATH
-	unset GOBIN
-
-	# Determine is the GoLang interpreter is working
-	local IS_EXECUTABLE=1
-	for binary in "${GOLANG_BINS[@]}"; do
-		debug-print "${FUNCNAME}: Checking ... ${binary}"
-
-		[[ -x "${EPREFIX}/${binary}" ]] && continue
-		IS_EXECUTABLE=0
-		ewarn "It seems that the binary '${binary}' is not executable."
-	done
-
-	# dev-lang/go isn't installed or one of its binaries aren't executable.
-	# Either way, the Gentoo box is screwed; no need to set up the GoLang environment
-	[[ ${IS_EXECUTABLE} == 0 ]] && exit
-
-	# dev-lang/go is available and working.
-	# Exports GO/EGO/EGOFMT global variables.
-	export GO="${GOLANG_BINS[0]}"
-	export EGO="${GOLANG_BINS[0]##*/}"
-	export EGOFMT="${GOLANG_BINS[1]}"
-
-	# dev-go/statik is available and working.
-	# Exports ESTATIK global variable.
-	[[ -n ${GOLANG_PKG_STATIK} ]] && export ESTATIK="${GOLANG_BINS[2]##*/}"
-
-	debug-print "${FUNCNAME}: GO = ${GO}"
-	debug-print "${FUNCNAME}: EGO = ${EGO}"
-	debug-print "${FUNCNAME}: EGOFMT = ${EGOFMT}"
-	debug-print "${FUNCNAME}: ESTATIK = ${ESTATIK}"
-
-	# Determines go interpreter version.
-	GOLANG_VERSION="$( ${GO} version )"
-	GOLANG_VERSION="${GOLANG_VERSION/go\ version\ go}"
-	export GOLANG_VERSION="${GOLANG_VERSION%\ *}"
-	einfo "Found GoLang version: ${GOLANG_VERSION}"
-
-	# Determines statik interpreter version.
-	# TODO: add version detection when statik will provide a -version option.
-	if [[ -n ${GOLANG_PKG_STATIK} ]]; then
-		local STATIK_VERSION=""
-		einfo "Found statik version: ${STATIK_VERSION}"
-	fi
-
-	# Enable/Disable frame pointers
-    local GOEXPERIMENT="noframepointer"
-    use debug && GOEXPERIMENT="framepointer"
-
-	# Sets the build environment inside Portage's WORKDIR.
-	ebegin "Setting up GoLang build environment"
-
-		# Prepares CGO_ENABLED.
-		CGO_ENABLED=0
-		[[ -z ${GOLANG_PKG_USE_CGO} ]] || CGO_ENABLED=1
-		use pie && CGO_ENABLED=1 # PIE requires CGO
-
-		# Prepares gopath / gobin directories inside WORKDIR.
-		local _GOPATH="${WORKDIR}/gopath"
-		local _GOBIN="${WORKDIR}/gobin"
-		mkdir -p "${_GOBIN}" || die
-		mkdir -p "${_GOPATH}"/src || die
-
-		# Exports special env variable EGO_SRC.
-		export EGO_SRC="${_GOPATH}/src"
-
-		# Exports GoLang env variables.
-		export GOPATH="$_GOPATH"
-		export GOBIN="$_GOBIN"
-		export CGO_ENABLED
-		#export GOEXPERIMENT
-		#export GO15VENDOREXPERIMENT=0
-
-		GO111MODULE="off"
-		[[ -z ${GOLANG_PKG_USE_MODULES} ]] || GO111MODULE="on"
-		export GO111MODULE
-
-		debug-print "${FUNCNAME}: GOPATH = ${GOPATH}"
-		debug-print "${FUNCNAME}: GOBIN = ${GOBIN}"
-		debug-print "${FUNCNAME}: EGO_SRC = ${EGO_SRC}"
-		debug-print "${FUNCNAME}: CGO_ENABLED = ${CGO_ENABLED}"
-	eend
-}
-
-# @FUNCTION: golang-common_src_prepare
-# @DESCRIPTION:
-# Prepare source code.
-golang-common_src_prepare() {
-	debug-print-function ${FUNCNAME} "${@}"
-
-	pushd "${WORKDIR}" > /dev/null || die
-		einfo "Preparing GoLang build environment in ${GOPATH}/src"
-
-		# If the ebuild declares an importpath alias, then its path was
-		# already created during the src_unpack phase. That means the eclass
-		# needs to create the missing original import path (GOLANG_PKG_IMPORTPATH)
-		# as a simbolic link pointing to the alias.
-		if [[ "${GOLANG_PKG_IMPORTPATH}" != "${GOLANG_PKG_IMPORTPATH_ALIAS}" ]]; then
-
-			# If the ebuild declares a GOLANG_PKG_NAME different from PN, then
-			# the latter will be used as the simbolic link target.
-			local TARGET="${GOLANG_PKG_NAME}"
-			[[ "${PN}" != "${GOLANG_PKG_NAME}" ]] && TARGET="${PN}"
-
-			golang_fix_importpath_alias \
-				"${GOLANG_PKG_IMPORTPATH_ALIAS}/${TARGET}" \
-				"${GOLANG_PKG_IMPORTPATH}/${GOLANG_PKG_NAME}"
-		fi
-
-		# If the ebuild declares some GoLang dependencies, then they need to be
-		# correctly installed into the sand-boxed GoLang build environment which
-		# was set up automatically during src_unpack) phase.
-		if [[ ${#GOLANG_PKG_DEPENDENCIES[@]} -gt 0 ]]; then
-
-			for i in ${!GOLANG_PKG_DEPENDENCIES[@]} ; do
-
-				# Collects all the tokens of the dependency.
-				local -A DEPENDENCY=()
-				while read -r -d $'\n' key value; do
-					[[ -z ${key} ]] && continue
-					DEPENDENCY[$key]="${value}"
-				done <<-EOF
-					$( _factorize_dependency_entities "${GOLANG_PKG_DEPENDENCIES[$i]}" )
-				EOF
-
-				# Debug
-				debug-print "${FUNCNAME}: DEPENDENCY      = ${GOLANG_PKG_DEPENDENCIES[$i]}"
-				debug-print "${FUNCNAME}: importpath      = ${DEPENDENCY[importpath]}"
-				debug-print "${FUNCNAME}: importpathalias = ${DEPENDENCY[importpathalias]}"
-				debug-print "${FUNCNAME}: host            = ${DEPENDENCY[host]}"
-				debug-print "${FUNCNAME}: author          = ${DEPENDENCY[author_name]}"
-				debug-print "${FUNCNAME}: project         = ${DEPENDENCY[project_name]}"
-				debug-print "${FUNCNAME}: revision        = ${DEPENDENCY[revision]}"
-
-				local message="Importing ${DEPENDENCY[importpath]}"
-				local destdir
-
-				# Prepares GOPATH structure.
-				case ${DEPENDENCY[importpathalias]} in
-					gopkg.in*)
-						message+=" as ${DEPENDENCY[importpathalias]}"
-						destdir="${DEPENDENCY[importpathalias]}"
-
-						# Creates the import path in GOPATH.
-						mkdir -p "${GOPATH}/src/${DEPENDENCY[importpathalias]%/*}" || die
-						#einfo "\n${GOPATH}/src/${DEPENDENCY[importpathalias]%/*}"
-						;;
-					*)
-						[[ "${DEPENDENCY[importpath]}" != "${DEPENDENCY[importpathalias]}/${DEPENDENCY[project_name]}" ]] && message+=" as ${DEPENDENCY[importpathalias]}/${DEPENDENCY[project_name]}"
-						destdir="${DEPENDENCY[importpathalias]}/${DEPENDENCY[project_name]}"
-
-						# Creates the import path in GOPATH.
-						mkdir -p "${GOPATH}/src/${DEPENDENCY[importpathalias]}" || die
-						#einfo "\n${GOPATH}/src/${DEPENDENCY[importpathalias]}"
-						;;
-				esac
-
-				# Moves sources from WORKDIR into GOPATH.
-				case ${DEPENDENCY[host]} in
-					github*)
-						ebegin "${message}"
-							mv ${DEPENDENCY[project_name]}-${DEPENDENCY[revision]}* "${GOPATH}"/src/${destdir} || die
-						eend
-
-						# FIX: sometimes the source code inside an importpath alias
-						#      (such as gopkg.in/mylib.v1) invokes imports from
-						#      the original import path instead of using the alias,
-						#      thus we need a symbolic link between the alias and
-						#      the original import path to avoid compilation issues.
-						#      Example: gopkg.in/Shopify/sarama.v1 erroneously
-						#      invokes imports from github.com/shopify/sarama
-						if [[ ${destdir} != ${DEPENDENCY[importpath]} ]]; then
-							golang_fix_importpath_alias ${destdir} ${DEPENDENCY[importpath]}
-						fi
-						;;
-					bitbucket*)
-						#einfo "path: ${DEPENDENCY[author_name]}-${DEPENDENCY[project_name]}-${DEPENDENCY[revision]}"
-						ebegin "${message}"
-							mv ${DEPENDENCY[author_name]}-${DEPENDENCY[project_name]}-${DEPENDENCY[revision]}* "${GOPATH}"/src/${destdir} || die
-						eend
-						;;
-					code.google*)
-						ebegin "${message}"
-							mv ${DEPENDENCY[project_name]}-${DEPENDENCY[revision]}* "${GOPATH}"/src/${destdir} || die
-						eend
-						;;
-					*) die "Function 'golang-common_src_prepare' doesn't support '${DEPENDENCY[importpath]}'" ;;
-				esac
-			done
-
-		fi
-
-	popd > /dev/null || die
-
-	# Auto-detects the presence of Go's vendored
-	# dependencies inside $S/vendor.
-	local VENDOR="${S}/vendor"
-	if [[ -d "${VENDOR}" ]]; then
-		golang_add_vendor "${VENDOR}"
-		export GO15VENDOREXPERIMENT=1
-	fi
-
-	# Auto-detects the presence of Go's vendored
-	# dependencies inside $S/*/vendor
-	if [[ -n ${GOLANG_PKG_BUILDPATH} && ${GOLANG_PKG_BUILDPATH##*/} != "..." ]]; then
-		while read -r -d $' ' path; do
-			# Trims leading slash (if any).
-			path="${path/\//}"
-
-			# Extracts the root path.
-			path="${path%%/*}"
-
-			# Ignores $path when it's empty or a string of white spaces.
-			[[ -n $path ]] || continue
-
-			local vendor="${S}/${path}/vendor"
-			if [[ -d "${vendor}" ]]; then
-				golang_add_vendor "${vendor}"
-			fi
-		done <<< "$( echo ${GOLANG_PKG_BUILDPATH}) "
-	fi
-
-
-	# Auto-detects the presence of Godep's workspace
-	# (see github.com/tools/godep for more infos).
-	VENDOR="${S}/Godeps/_workspace"
-	if [[ -d "${VENDOR}" ]]; then
-		golang_add_vendor "${VENDOR}"
-	fi
-
-	# Evaluates PATCHES array.
-	default_src_prepare
-}
-
-# @FUNCTION: golang-common_src_configure
-# @DESCRIPTION:
-# Configure the package.
-golang-common_src_configure() {
-	debug-print-function ${FUNCNAME} "${@}"
-
-	[[ ${EGO} ]] || die "No GoLang implementation set (golang_setup not called?)."
-
-	# Defines the level of verbosity.
-	local EGO_VERBOSE="-v"
-	[[ -z ${PORTAGE_VERBOSE} ]] || EGO_VERBOSE+=" -x"
-
-	# GoLang doesn't have a configure phase,
-	# so instead this eclass prints the output of 'go env'.
-	local -a GOLANG_ENV=()
-	while read -r line; do
-		GOLANG_ENV+=("${line}")
-	done <<-EOF
-		$( ${GO} env )
-	EOF
-
-	# Prints an error when 'go env' output is missing.
-	if [[ ${#GOLANG_ENV[@]} -eq 1 ]]; then
-		eerror "Your GoLang environment should be more verbose"
-	fi
-
-	# Prints GoLang environment summary.
-	einfo " ${EGO} env"
-	for env in "${GOLANG_ENV[@]}"; do
-		einfo " - ${env}"
-	done
-
-
-	# Removes GoLang object files from package source directories (pkg/)
-	# and temporary directories (_obj/ _test*/).
-	local EGO_SUBPACKAGES="${GOLANG_PKG_IMPORTPATH_ALIAS}/${GOLANG_PKG_NAME}"
-	case $( ver_cut 1-2 ${GOLANG_VERSION} ) in
-		1.4*) ;;
-		*)
-			EGO_SUBPACKAGES+="/..."
-			;;
-	esac
-#	einfo "${EGO} clean -i ${EGO_VERBOSE} ${EGO_SUBPACKAGES}"
-#	${EGO} clean -i \
-#		${EGO_VERBOSE} \
-#		"${EGO_SUBPACKAGES}" \
-#		|| die
-
-	# Removes GoLang objects files from all the dependencies too.
-#	if [[ ${#GOLANG_PKG_DEPENDENCIES[@]} -gt 0 ]]; then
-#
-#		for i in ${!GOLANG_PKG_DEPENDENCIES[@]} ; do
-#
-#			# Collects all the tokens of the dependency.
-#			local -A DEPENDENCY=()
-#			while read -r -d $'\n' key value; do
-#				[[ -z ${key} ]] && continue
-#				DEPENDENCY[$key]="${value}"
-#			done <<-EOF
-#				$( _factorize_dependency_entities "${GOLANG_PKG_DEPENDENCIES[$i]}" )
-#			EOF
-#
-#			[[ ! -d ${DEPENDENCY[importpath]} ]] && continue
-#
-#			# Debug
-#			debug-print "${FUNCNAME}: DEPENDENCY = ${GOLANG_PKG_DEPENDENCIES[$i]}"
-#			debug-print "${FUNCNAME}: importpath = ${DEPENDENCY[importpath]}"
-#
-#			# Cleans object files of the dependency.
-#			einfo "${EGO} clean -i ${EGO_VERBOSE} ${DEPENDENCY[importpath]}"
-#			${EGO} clean \
-#				-i ${EGO_VERBOSE} \
-#				"${DEPENDENCY[importpath]}" \
-#				|| die
-#		done
-#	fi
-
-	# Before to compile Godep's dependencies it's wise to wipe out
-	# all pre-built object files from Godep's package source directories.
-	if [[ -d "${S}"/Godeps/_workspace/pkg ]]; then
-		ebegin "Cleaning up pre-built object files in Godep workspace"
-			rm -r "${S}"/Godeps/_workspace/pkg || die
-		eend
-	fi
-	if [[ -d "${S}"/Godeps/_workspace/bin ]]; then
-		ebegin "Cleaning up executables in Godep workspace"
-			rm -r "${S}"/Godeps/_workspace/bin || die
-		eend
-	fi
-
-
-	# Executes 'go generate'.
-	# NOTE: generate should never run automatically. It must be run explicitly.
-	if [[ -n ${GOLANG_PKG_USE_GENERATE} ]]; then
-		pushd "${GOPATH}/src/${GOLANG_PKG_IMPORTPATH_ALIAS}/${GOLANG_PKG_NAME}" > /dev/null || die
-			einfo "${EGO} generate ${EGO_VERBOSE} ${GOLANG_PKG_IMPORTPATH_ALIAS}/${GOLANG_PKG_NAME}/..."
-			${EGO} generate \
-				${EGO_VERBOSE} \
-				./... \
-				|| die
-		popd > /dev/null || die
-	fi
-
-
-	# Executes 'statik' when explicitly asked.
-	if [[ -n ${GOLANG_PKG_STATIK} ]]; then
-		ebegin "${ESTATIK} $GOLANG_PKG_STATIK"
-			${ESTATIK} $GOLANG_PKG_STATIK || die
-		eend
-	fi
-}
-
-# @FUNCTION: golang-common_src_compile
-# @DESCRIPTION:
-# Compiles the package.
-golang-common_src_compile() {
-	debug-print-function ${FUNCNAME} "${@}"
-
-	[[ ${EGO} ]] || die "No GoLang implementation set (golang_setup not called?)."
-
-	# Populates env variable GOPATH with vendored workspaces (if present).
-	if [[ -n ${GOLANG_PKG_VENDOR} ]]; then
-		einfo "Using vendored dependencies from:"
-
-		for path in "${GOLANG_PKG_VENDOR[@]}"; do
-			[ -d ${path} ] || continue
-
-			if [[ ${path//${S}\//} == "vendor" ]]; then
-				einfo "- vendor/ (native vendoring support)"
-				continue
-			fi
-
-			debug-print "$FUNCNAME: GOPATH: Adding vendor path ${path}"
-			ebegin "- ${path//${S}\//}"
-				GOPATH="${GOPATH}:$( echo ${path} )"
-			eend
-		done
-
-		export GOPATH
-	fi
-
-	# Enables position-independent executables (PIE)
-	local EGO_PIE
-	use pie && EGO_PIE="-buildmode=pie"
-
-	# Defines the install suffix.
-	local EGO_INSTALLSUFFIX
-	[[ -z ${GOLANG_PKG_INSTALLSUFFIX} ]] || EGO_INSTALLSUFFIX="-installsuffix=${GOLANG_PKG_INSTALLSUFFIX}"
-
-	# Defines the level of verbosity.
-	local EGO_VERBOSE="-v"
-	[[ -z ${PORTAGE_VERBOSE} ]] || EGO_VERBOSE+=" -x"
-
-	# Defines the number of builds that can be run in parallel.
-	local EGO_PARALLEL="-p $(makeopts_jobs)"
-
-	# Defines extra options.
-	local EGO_EXTRA_OPTIONS="-a"
-
-	# Prepares build flags for the go toolchain.
-	local EGO_BUILD_FLAGS="$( echo ${EGO_VERBOSE} ) $( echo ${EGO_PARALLEL} ) $( echo ${EGO_EXTRA_OPTIONS} ) $( echo ${EGO_PIE} )"
-	[[ -n ${EGO_INSTALLSUFFIX} ]] && EGO_BUILD_FLAGS+=" $( echo ${EGO_INSTALLSUFFIX} )"
-
-	# Detects the total number of packages.
-	local pkgs=0 ifs_save=${IFS} IFS=$' '
-	for path in ${GOLANG_PKG_BUILDPATH[@]} ; do
-		pkgs=$(( $pkgs + 1 ))
-	done
-	[[ ${pkgs} -eq 0 ]] && pkgs=1 # there is always at least 1 package
-	IFS=${ifs_save}
-
-	# Builds the package
-	einfo "Compiling ${pkgs} package(s):"
-	if [[ -n ${GOLANG_PKG_BUILDPATH} && ${GOLANG_PKG_BUILDPATH##*/} != "..." && ${pkgs} -gt 1 ]]; then
-
-		# NOTE: This eclass trims all leading and trailing white spaces from the
-		#       input of the following 'while read' loop, then appends an extra
-		#       trailing space; this is necessary to avoid undefined behaviours
-		#       within the loop when GOLANG_PKG_BUILDPATH is populated with only
-		#       a single element.
-		while read -r -d $' ' cmd; do
-			# Ignores $cmd when it's empty or a string of white spaces
-			#einfo "cmd: |$cmd| cmd: |${cmd##*/}|"
-			[[ -n $cmd ]] || continue
-
-			golang_do_build \
-				${EGO_BUILD_FLAGS} \
-				-o "${GOBIN}/${cmd##*/}" \
-				"${GOLANG_PKG_IMPORTPATH_ALIAS}/${GOLANG_PKG_NAME}${cmd}"
-		done <<< "$( echo ${GOLANG_PKG_BUILDPATH}) "
-	else
-		# If the package is a multiple package (/...)
-		# then this eclass doesn't specify the output name.
-		[[ ${GOLANG_PKG_BUILDPATH##*/} != "..." ]] && EGO_BUILD_FLAGS+=" -o ${GOBIN}/${GOLANG_PKG_OUTPUT_NAME}"
-
-		golang_do_build \
-			${EGO_BUILD_FLAGS} \
-			"${GOLANG_PKG_IMPORTPATH_ALIAS}/${GOLANG_PKG_NAME}${GOLANG_PKG_BUILDPATH}"
-	fi
-}
-
-# @FUNCTION: golang-common_src_install
-# @DESCRIPTION:
-# Installs binaries and documents from DOCS or HTML_DOCS arrays.
-golang-common_src_install() {
-	debug-print-function ${FUNCNAME} "${@}"
-
-	[[ ${EGO} ]] || die "No GoLang implementation set (golang_setup not called?)."
-
-	# Enables position-independent executables (PIE)
-	local EGO_PIE
-	use pie && EGO_PIE="-buildmode=pie"
-
-	# Defines the install suffix.
-	local EGO_INSTALLSUFFIX
-	[[ -z ${GOLANG_PKG_INSTALLSUFFIX} ]] || EGO_INSTALLSUFFIX="-installsuffix=${GOLANG_PKG_INSTALLSUFFIX}"
-
-	# Defines the level of verbosity.
-	local EGO_VERBOSE="-v"
-	[[ -z ${PORTAGE_VERBOSE} ]] || EGO_VERBOSE+=" -x"
-
-	# Defines the number of builds that can be run in parallel.
-	local EGO_PARALLEL="-p $(makeopts_jobs)"
-
-	# Defines extra options.
-	local EGO_EXTRA_OPTIONS
-
-	# Prepares build flags for the go toolchain.
-	local EGO_BUILD_FLAGS="$( echo ${EGO_VERBOSE} ) $( echo ${EGO_PARALLEL} ) $( echo ${EGO_EXTRA_OPTIONS} ) $( echo ${EGO_PIE} )"
-	[[ -n ${EGO_INSTALLSUFFIX} ]] && EGO_BUILD_FLAGS+=" $( echo ${EGO_INSTALLSUFFIX} )"
-
-	# Defines sub-packages.
-	local EGO_SUBPACKAGES="${GOLANG_PKG_IMPORTPATH_ALIAS}/${GOLANG_PKG_NAME}${GOLANG_PKG_BUILDPATH}"
-
-	# Executes the pre-install phase (go install).
-	if [[ -n ${GOLANG_PKG_IS_MULTIPLE} ]]; then
-		einfo "${EGO} install -ldflags '$GOLANG_PKG_LDFLAGS' -tags '$GOLANG_PKG_TAGS' ${EGO_BUILD_FLAGS} ${EGO_SUBPACKAGES}"
-		${EGO} install \
-			-ldflags "${GOLANG_PKG_LDFLAGS}" \
-			-tags "${GOLANG_PKG_TAGS}" \
-			${EGO_BUILD_FLAGS} \
-			"${EGO_SUBPACKAGES}" \
-			|| die
-	fi
-
-	# Installs binaries.
-	into ${GOLANG_PKG_INSTALLPATH}
-	for bin in "${GOBIN}"/* ; do
-		dobin ${bin}
-	done
-
-	# Installs documentation.
-	einstalldocs
-}
-
-# @FUNCTION: golang-common_src_test
-# @DESCRIPTION:
-# Runs the unit tests for the main package.
-golang-common_src_test() {
-	debug-print-function ${FUNCNAME} "${@}"
-
-	[[ ${EGO} ]] || die "No GoLang implementation set (golang_setup not called?)."
-
-	# Appends S and GOBIN to exported main paths.
-	# FIX: this is necessary for unit tests that need to invoke bins from
-	#       $GOBIN or from within $S/bin.
-	export PATH="${S}/bin:${GOBIN}:${PATH}"
-
-	# Defines the level of verbosity.
-	local EGO_VERBOSE="-v"
-	[[ -z ${PORTAGE_VERBOSE} ]] || EGO_VERBOSE+=" -x"
-
-	# Defines the number of builds that can be run in parallel.
-	local EGO_PARALLEL="-p $(makeopts_jobs)"
-
-	# Defines extra options.
-	#local EGO_EXTRA_OPTIONS="-a"
-
-	# Enables data race detection.
-	local EGO_RACE
-	[[ -n ${GOLANG_PKG_HAVE_TEST_RACE} ]] && EGO_RACE=" -race"
-
-	# Prepares build flags for the go toolchain.
-	local EGO_BUILD_FLAGS="$( echo ${EGO_VERBOSE} ) $( echo ${EGO_PARALLEL} ) $( echo ${EGO_EXTRA_OPTIONS} )"
-	[[ -n ${EGO_RACE} ]] && EGO_BUILD_FLAGS+=" $( echo ${EGO_RACE} )"
-
-	# Sanitizes vars from entra white spaces.
-    GOLANG_PKG_LDFLAGS="$( echo ${GOLANG_PKG_LDFLAGS} )"
-    GOLANG_PKG_TAGS="$( echo ${GOLANG_PKG_TAGS} )"
-
-	# Defines sub-packages.
-	local EGO_SUBPACKAGES="${GOLANG_PKG_IMPORTPATH_ALIAS}/${GOLANG_PKG_NAME}${GOLANG_PKG_BUILDPATH}"
-	[[ -z ${GOLANG_PKG_IS_MULTIPLE} ]] || EGO_SUBPACKAGES="./..."
-
-	# Detects the total number of packages.
-	local pkgs=0 ifs_save=${IFS} IFS=$' '
-	for path in ${GOLANG_PKG_BUILDPATH[@]} ; do
-		pkgs=$(( $pkgs + 1 ))
-	done
-	[[ ${pkgs} -eq 0 ]] && pkgs=1 # there is always at least 1 package
-	IFS=${ifs_save}
-
-	# Runs the Unit Tests
-	einfo "Testing ${pkgs} package(s):"
-	if [[ -n ${GOLANG_PKG_BUILDPATH} && ${GOLANG_PKG_BUILDPATH##*/} != "..." && ${pkgs} -gt 1 ]]; then
-
-		# NOTE: This eclass trims all leading and trailing white spaces from the
-		#       input of the following 'while read' loop, then appends an extra
-		#       trailing space; this is necessary to avoid undefined behaviours
-		#       within the loop when GOLANG_PKG_BUILDPATH is populated with only
-		#       a single element.
-		while read -r -d $' ' cmd; do
-			# Ignores $cmd when it's empty or a string of white spaces
-			#einfo "cmd: |$cmd| cmd: |${cmd##*/}|"
-			[[ -n $cmd ]] || continue
-
-			einfo "${EGO} test -ldflags '$GOLANG_PKG_LDFLAGS' -tags '$GOLANG_PKG_TAGS' ${EGO_BUILD_FLAGS} ${GOLANG_PKG_IMPORTPATH_ALIAS}/${GOLANG_PKG_NAME}${cmd}/..."
-			${EGO} test \
-				-ldflags "${GOLANG_PKG_LDFLAGS}" \
-				-tags "${GOLANG_PKG_TAGS}" \
-				${EGO_BUILD_FLAGS} \
-				"${GOLANG_PKG_IMPORTPATH_ALIAS}/${GOLANG_PKG_NAME}${cmd}/..." \
-				|| die
-       done <<< "$( echo ${GOLANG_PKG_BUILDPATH}) "
-	else
-		# It's a single package
-		einfo "${EGO} test -ldflags '$GOLANG_PKG_LDFLAGS' -tags '$GOLANG_PKG_TAGS' ${EGO_BUILD_FLAGS} ${EGO_SUBPACKAGES}"
-		${EGO} test \
-			-ldflags "${GOLANG_PKG_LDFLAGS}" \
-			-tags "${GOLANG_PKG_TAGS}" \
-			${EGO_BUILD_FLAGS} \
-			"${EGO_SUBPACKAGES}" \
-			|| die
-	fi
-}
-
-# @FUNCTION: golang_do_build
-# @INTERNAL
-# @USAGE: <flags> <buildpath>
-# @DESCRIPTION:
-#
-# @CODE
-# Example:
-#   GOLANG_PKG_LDFLAGS="-extldflags=-static"
-#   GOLANG_PKG_TAGS="netgo"
-#
-#	golang_do_build ${EGO_BUILD_FLAGS} ${GOLANG_PKG_IMPORTPATH}/${GOLANG_PKG_NAME}${GOLANG_PKG_BUILDPATH}
-# @CODE
-golang_do_build() {
-	debug-print-function ${FUNCNAME} $*
-
-	[[ ${GOLANG_VERSION} ]] || die "No GoLang implementation set (golang_setup not called?)."
-
-	# Filters "=" chars from ldflags declaration.
-	# NOTE: from go1.5+ linker syntax is no more compatible with <go1.4;
-	#       this hack ensures that the old behaviour is honoured.
-	if [[ $( ver_cut 1-2 ${GOLANG_VERSION} ) == "1.4" ]]; then
-		GOLANG_PKG_LDFLAGS="${GOLANG_PKG_LDFLAGS//=/ }"
-	fi
-
-	# Disables debug symbols (DWARF) when not required.
-	if ! use debug; then
-		case "${GOLANG_PKG_LDFLAGS}" in
-			*-s*|*-w*)
-			    # Do nothing
-			;;
-			*)
-				GOLANG_PKG_LDFLAGS+=" -s -w"
-		esac
-	fi
-
-	# Sanitizes vars from entra white spaces.
-	GOLANG_PKG_LDFLAGS="$( echo ${GOLANG_PKG_LDFLAGS} )"
-	GOLANG_PKG_TAGS="$( echo ${GOLANG_PKG_TAGS} )"
-
-	einfo "${EGO} build -ldflags '$GOLANG_PKG_LDFLAGS' -tags '$GOLANG_PKG_TAGS' $*"
-	${EGO} build \
-		-ldflags "${GOLANG_PKG_LDFLAGS}" \
-		-tags "${GOLANG_PKG_TAGS}" \
-		$( echo $* ) \
-		|| die
-}
-
-# @FUNCTION: golang_add_vendor
-# @INTERNAL
-# @USAGE: <path>
-# @DESCRIPTION:
-#
-# @CODE
-# Example
-#
-#   golang_add_vendor "${S}"/vendor
-#   golang_add_vendor "${S}"/${PN}/vendor
-# @CODE
-golang_add_vendor() {
-	debug-print-function ${FUNCNAME} $*
-
-	[[ ${1} ]] || die "${FUNCNAME}: no paths given"
-
-	[[ ${GOLANG_VERSION} ]] || die "No Golang implementation set (golang_setup not called?)."
-
-	[[ ! -d "${1}" ]] && return
-
-	# NOTE: this hack is required by Go v1.4 and older versions.
-	#if [[ ! -d "${1}"/src ]]; then
-	#	ebegin "Fixing $1"
-	#		ln -s "${1}" "${1}"/src || die
-	#	eend
-	#fi
-
-	GOLANG_PKG_VENDOR+=(${1})
-}
-
-
-# @FUNCTION: golang_fix_importpath_alias
-# @USAGE: <target> <alias>
-# @DESCRIPTION:
-# Helper functions for generating a symbolic link for import path <target> as
-# <alias>.
-#
-# WARNING: Use this function only if GOLANG_PKG_DEPENDENCIES declaration of
-# import path aliases doesn't work (e.g.: the package name differs from both the
-# import path and the alias, or if the package name is case sensitive but the
-# import path is not).
-#
-# @CODE
-# Example:
-#
-#   src_prepare() {
-#   	golang-single_src_prepare
-#
-#   	golang_fix_importpath_alias \
-#   		"github.com/GoogleCloudPlatform/gcloud-golang" \
-#   		"google.golang.org/cloud"
-#   }
-# @CODE
-golang_fix_importpath_alias() {
-	debug-print-function ${FUNCNAME} "${@}"
-
-	[[ ${1} ]] || die "${FUNCNAME}: no target specified"
-	[[ ${2} ]] || die "${FUNCNAME}: no alias specified"
-
-	[[ ${EGO} ]] || die "No GoLang implementation set (golang_setup not called?)."
-
-
-	local TARGET="${1}"
-	local ALIAS="${2}"
-
-	if [[ ${ALIAS%/*} != ${ALIAS} ]]; then
-		mkdir -p "${GOPATH}/src/${ALIAS%/*}" || die
-	fi
-	ebegin "Linking ${TARGET} as ${ALIAS}"
-		ln -s "${GOPATH}/src/${TARGET}" \
-			"${GOPATH}/src/${ALIAS}" \
-			|| die
-	eend
-}
-
-fi

diff --git a/eclass/golang-single.eclass b/eclass/golang-single.eclass
deleted file mode 100644
index 692918bd9..000000000
--- a/eclass/golang-single.eclass
+++ /dev/null
@@ -1,180 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-# @ECLASS: golang-single.eclass
-# @MAINTAINER:
-#
-# @AUTHOR:
-# Mauro Toffanin <toffanin.mauro@gmail.com>
-# @BLURB: An eclass for GoLang packages not installed inside GOPATH/GOBIN.
-# @DESCRIPTION:
-# This eclass allows to install arbitrary packages written in GoLang which
-# don't support being installed inside the Go environment.
-# This mostly includes traditional packages (C/C++/GUI) embedding tools written
-# in GoLang, and GoLang packages that need to be compiled with GCC instead of
-# the standard Go interpreter.
-#
-# @EXAMPLE:
-# Typical ebuild using golang-single.eclass:
-#
-# @CODE
-# EAPI=5
-#
-# GOLANG_PKG_IMPORTPATH="github.com/captObvious"
-# GOLANG_PKG_ARCHIVESUFFIX=".zip"
-# GOLANG_PKG_HAVE_TEST
-# inherit golang-single qt4-r2
-#
-# DESCRIPTION="Foo bar application"
-# HOMEPAGE="http://example.org/foo/"
-#
-# LICENSE="MIT"
-# KEYWORDS="~amd64 ~x86"
-# SLOT="0"
-# IUSE="doc qt4"
-#
-# CDEPEND="
-#   qt4? (
-#       dev-qt/qtcore:4
-#       dev-qt/qtgui:4
-#   )"
-# RDEPEND="${CDEPEND}
-#   !media-gfx/bar"
-# DEPEND="${CDEPEND}
-#   doc? ( app-doc/doxygen )"
-#
-# DOCS=(AUTHORS ChangeLog README "Read me.txt" TODO)
-#
-# PATCHES=(
-#   "${FILESDIR}/${P}-qt4.patch" # bug 123458
-#   "${FILESDIR}/${P}-as-needed.patch"
-# )
-#
-# src_install() {
-#   use doc && HTML_DOCS=("${BUILD_DIR}/apidocs/html/")
-#   autotools-utils_src_install
-#   if use examples; then
-#       dobin "${BUILD_DIR}"/foo_example{1,2,3} \\
-#           || die 'dobin examples failed'
-#   fi
-# }
-#
-# @CODE
-
-inherit golang-common
-
-EXPORT_FUNCTIONS src_prepare src_unpack src_configure src_compile src_install src_test
-
-if [[ -z ${_GOLANG_SINGLE_ECLASS} ]]; then
-_GOLANG_SINGLE_ECLASS=1
-
-# This eclass uses GOLANG_PKG_IMPORTPATH to populate SRC_URI.
-SRC_URI="${SRC_URI:="https://${GOLANG_PKG_IMPORTPATH}/${GOLANG_PKG_NAME}/archive/${GOLANG_PKG_ARCHIVEPREFIX}${GOLANG_PKG_VERSION}${GOLANG_PKG_ARCHIVESUFFIX} -> ${P}${GOLANG_PKG_ARCHIVESUFFIX}"}"
-
-# This eclass uses GOLANG_PKG_DEPENDENCIES associative array to populate SRC_URI
-# with the required snapshots of the supplied GoLang dependencies.
-if [[ ${#GOLANG_PKG_DEPENDENCIES[@]} -gt 0 ]]; then
-
-	for i in ${!GOLANG_PKG_DEPENDENCIES[@]} ; do
-
-		# Collects all the tokens of the dependency.
-		local -A DEPENDENCY=()
-		while read -d $'\n' key value; do
-			[[ -z ${key} ]] && continue
-			DEPENDENCY[$key]="${value}"
-		done <<-EOF
-			$( _factorize_dependency_entities "${GOLANG_PKG_DEPENDENCIES[$i]}" )
-		EOF
-
-		# Debug
-		debug-print "${FUNCNAME}: DEPENDENCY = ${GOLANG_PKG_DEPENDENCIES[$i]}"
-		debug-print "${FUNCNAME}: importpath = ${DEPENDENCY[importpath]}"
-		debug-print "${FUNCNAME}: revision   = ${DEPENDENCY[revision]}"
-
-		# Downloads the archive.
-		case ${DEPENDENCY[importpath]} in
-			github*)
-				SRC_URI+=" https://${DEPENDENCY[importpath]}/archive/${DEPENDENCY[revision]}${GOLANG_PKG_ARCHIVESUFFIX} -> ${DEPENDENCY[importpath]//\//-}-${DEPENDENCY[revision]}${GOLANG_PKG_ARCHIVESUFFIX}"
-				;;
-			bitbucket*)
-				SRC_URI+=" https://${DEPENDENCY[importpath]}/get/${DEPENDENCY[revision]}.zip -> ${DEPENDENCY[importpath]//\//-}-${DEPENDENCY[revision]}.zip"
-				;;
-			code.google*)
-				SRC_URI+=" https://${DEPENDENCY[project_name]}.googlecode.com/archive/${DEPENDENCY[revision]}.tar.gz -> ${DEPENDENCY[importpath]//\//-}-${DEPENDENCY[revision]}.tar.gz"
-				;;
-			*) die "This eclass doesn't support '${DEPENDENCY[importpath]}'" ;;
-		esac
-
-	done
-fi
-
-# @FUNCTION: golang-single_src_unpack
-# @DESCRIPTION:
-# Unpack the source archive.
-golang-single_src_unpack() {
-	debug-print-function ${FUNCNAME} "${@}"
-
-	default
-
-	# Creates S.
-	mkdir -p "${S%/*}" || die
-
-	# Moves main GoLang package from WORKDIR into GOPATH.
-	if [[ "${GOLANG_PKG_IMPORTPATH}" != "${GOLANG_PKG_IMPORTPATH_ALIAS}" ]]; then
-		local alias_abspath="${WORKDIR}/gopath/src/${GOLANG_PKG_IMPORTPATH_ALIAS}/${GOLANG_PKG_NAME}"
-		mkdir -p "${alias_abspath%/*}" || die
-		mv "${GOLANG_PKG_NAME}-${GOLANG_PKG_VERSION}" "${alias_abspath}"/ || die
-	else
-		mv "${GOLANG_PKG_NAME}-${GOLANG_PKG_VERSION}" "${S}"/ || die
-	fi
-}
-
-# @FUNCTION: golang-single_src_prepare
-# @DESCRIPTION:
-# Prepare source code.
-golang-single_src_prepare() {
-	debug-print-function ${FUNCNAME} "$@"
-
-	# Sets up GoLang build environment.
-	golang_setup
-
-	golang-common_src_prepare
-}
-
-# @FUNCTION: golang-single_src_configure
-# @DESCRIPTION:
-# Configure the package.
-golang-single_src_configure() {
-	debug-print-function ${FUNCNAME} "$@"
-
-	golang-common_src_configure
-}
-
-# @FUNCTION: golang-single_src_compile
-# @DESCRIPTION:
-# Compiles the package.
-golang-single_src_compile() {
-	debug-print-function ${FUNCNAME} "$@"
-
-	golang-common_src_compile
-}
-
-# @FUNCTION: golang-single_src_install
-# @DESCRIPTION:
-# Installs binaries and documents from DOCS or HTML_DOCS arrays.
-golang-single_src_install() {
-	debug-print-function ${FUNCNAME} "$@"
-
-	golang-common_src_install
-}
-
-# @FUNCTION: golang-single_src_test
-# @DESCRIPTION:
-# Runs the unit tests for the main package.
-golang-single_src_test() {
-	debug-print-function ${FUNCNAME} "$@"
-
-	golang-common_src_test
-}
-
-fi


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2021-05-31 23:15 Alessandro Barbieri
  0 siblings, 0 replies; 180+ messages in thread
From: Alessandro Barbieri @ 2021-05-31 23:15 UTC (permalink / raw
  To: gentoo-commits

commit:     9fd80923195264194a8c1394ed79c8564f9fb5c4
Author:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
AuthorDate: Mon May 31 23:15:27 2021 +0000
Commit:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
CommitDate: Mon May 31 23:15:27 2021 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=9fd80923

R-packages.eclass: split string

Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>

 eclass/R-packages.eclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eclass/R-packages.eclass b/eclass/R-packages.eclass
index 9fba5d5c2..4afcde26f 100644
--- a/eclass/R-packages.eclass
+++ b/eclass/R-packages.eclass
@@ -34,7 +34,7 @@ R-packages_src_prepare() {
 
 
 R-packages_src_compile() {
-	MAKEFLAGS="CFLAGS=${CFLAGS// /\\ } CXXFLAGS=${CXXFLAGS// /\\ } FFLAGS=${FFLAGS// /\\ } FCFLAGS=${FCFLAGS// /\\ } LDFLAGS=${LDFLAGS// /\\ }" R CMD INSTALL . -l "${WORKDIR} --byte-compile"
+	MAKEFLAGS="CFLAGS=${CFLAGS// /\\ } CXXFLAGS=${CXXFLAGS// /\\ } FFLAGS=${FFLAGS// /\\ } FCFLAGS=${FCFLAGS// /\\ } LDFLAGS=${LDFLAGS// /\\ }" R CMD INSTALL . -l "${WORKDIR}" "--byte-compile"
 }
 
 R-packages_src_install() {


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2021-06-17 16:01 Alessandro Barbieri
  0 siblings, 0 replies; 180+ messages in thread
From: Alessandro Barbieri @ 2021-06-17 16:01 UTC (permalink / raw
  To: gentoo-commits

commit:     dd9177aecb84a314b4f9b8c11f7988f5f90d8869
Author:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
AuthorDate: Thu Jun 17 15:56:01 2021 +0000
Commit:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
CommitDate: Thu Jun 17 16:01:51 2021 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=dd9177ae

R-packages.eclass: quoting, more || die, docompress -x html

Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>

 eclass/R-packages.eclass | 25 +++++++++++++++----------
 1 file changed, 15 insertions(+), 10 deletions(-)

diff --git a/eclass/R-packages.eclass b/eclass/R-packages.eclass
index 4afcde26f..5e1d6bccc 100644
--- a/eclass/R-packages.eclass
+++ b/eclass/R-packages.eclass
@@ -23,7 +23,7 @@ dodocrm() {
 R-packages_src_unpack() {
 	unpack ${A}
 	if [[ -d "${PN//_/.}" ]] && [[ ! -d "${P}" ]]; then
-		mv ${PN//_/.} "${P}"
+		mv "${PN//_/.}" "${P}" || die
 	fi
 }
 
@@ -34,26 +34,31 @@ R-packages_src_prepare() {
 
 
 R-packages_src_compile() {
-	MAKEFLAGS="CFLAGS=${CFLAGS// /\\ } CXXFLAGS=${CXXFLAGS// /\\ } FFLAGS=${FFLAGS// /\\ } FCFLAGS=${FCFLAGS// /\\ } LDFLAGS=${LDFLAGS// /\\ }" R CMD INSTALL . -l "${WORKDIR}" "--byte-compile"
+	MAKEFLAGS="CFLAGS=${CFLAGS// /\\ } CXXFLAGS=${CXXFLAGS// /\\ } FFLAGS=${FFLAGS// /\\ } FCFLAGS=${FCFLAGS// /\\ } LDFLAGS=${LDFLAGS// /\\ }" R CMD INSTALL . -l "${WORKDIR}" "--byte-compile" || die
 }
 
 R-packages_src_install() {
-	cd "${WORKDIR}"/${PN//_/.} || die
+	cd "${WORKDIR}/${PN//_/.}" || die
 
 	dodocrm examples || die
-#	dodocrm DESCRIPTION || die #keep this
+	#dodocrm DESCRIPTION || die #keep this
 	dodocrm NEWS.md || die
 	dodocrm README.md || die
 	dodocrm html || die
-	docinto "${DOCSDIR}/html"
+
 	if [ -e doc ]; then
-		ls doc/*.html &>/dev/null && dodoc -r doc/*.html
-		rm -rf doc/*.html || die
+		if [ -e doc/html ]; then
+			docinto "${DOCSDIR}/html"
+			dodoc -r doc/*.html
+			rm -r doc/*.html || die
+			docompress -x "${DOCSDIR}/html"
+		fi
+
 		docinto "${DOCSDIR}"
 		dodoc -r doc/.
-		rm -rf doc
+		rm -r doc || die
 	fi
 
-	insinto /usr/$(get_libdir)/R/site-library
-	doins -r "${WORKDIR}"/${PN//_/.}
+	insinto "/usr/$(get_libdir)/R/site-library"
+	doins -r "${WORKDIR}/${PN//_/.}"
 }


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2021-07-22  8:29 Anna Vyalkova
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Vyalkova @ 2021-07-22  8:29 UTC (permalink / raw
  To: gentoo-commits

commit:     1aeb74d3fa80f3c5076dc86f84a4588e7ee4d4c5
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Thu Jul 22 08:10:21 2021 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Thu Jul 22 08:27:39 2021 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=1aeb74d3

boinc-app.eclass: new eclass

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 eclass/boinc-app.eclass | 308 ++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 308 insertions(+)

diff --git a/eclass/boinc-app.eclass b/eclass/boinc-app.eclass
new file mode 100644
index 000000000..d62c8a91f
--- /dev/null
+++ b/eclass/boinc-app.eclass
@@ -0,0 +1,308 @@
+# Copyright 2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# @ECLASS: boinc-app.eclass
+# @MAINTAINER:
+# Anna Vyalkova <cyber+gentoo@sysrq.in>
+# @SUPPORTED_EAPIS: 8
+# @BLURB: Eclass that provides base functions for installing BOINC applications.
+# @DESCRIPTION:
+# This eclass provides base functions for installation of software developed
+# for the BOINC platform.
+#
+# Do not package *-bin applications as BOINC can handle them itself better.
+#
+# Note that BOINC won't detect a custom application unless you provide it with
+# app_info.xml file (see https://boinc.berkeley.edu/wiki/Anonymous_platform).
+# Attach to a project of your interest and use values from
+# /var/lib/boinc/client_state.xml to write the file.
+#
+# BOINC.Italy did a great job discovering sources of many BOINC applications:
+# https://www.boincitaly.org/progetti/sorgenti-progetti.html
+
+case ${EAPI} in
+	8) ;;
+	*) die "${ECLASS}: EAPI ${EAPI} unsupported."
+esac
+
+# @ECLASS-VARIABLE: BOINC_APP_OPTIONAL
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# If set to a non-null value, BOINC part in the ebuild will be
+# considered optional and no phase functions will be exported.
+#
+# If you enable BOINC_APP_OPTIONAL, you have to call boinc-app
+# default phase functions and add dependencies manually.
+
+if [[ ! ${BOINC_APP_OPTIONAL} ]]; then
+	EXPORT_FUNCTIONS pkg_postinst pkg_postrm
+fi
+
+if [[ ! ${_BOINC_APP_ECLASS} ]]; then
+
+# @ECLASS-VARIABLE: BOINC_MASTER_URL
+# @REQUIRED
+# @DESCRIPTION:
+# Each project is publicly identified by a master URL. It also serves
+# as the home page of the project.
+#
+# You need to look it up using the following command:
+# @CODE
+#	grep "<master_url>" /var/lib/boinc/client_state.xml
+# @CODE
+
+# @ECLASS-VARIABLE: BOINC_INVITATION_CODE
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# Some projects restrict account creation to those who present an
+# "invitation code". Write it to BOINC_INVITATION_CODE variable if
+# it's published on project's website.
+
+# @ECLASS-VARIABLE: HOMEPAGE
+# @DESCRIPTION:
+# This variable defines the HOMEPAGE for BOINC projects if BOINC_MASTER_URL
+# was set before inherit.
+: ${HOMEPAGE:=${BOINC_MASTER_URL}}
+
+# @ECLASS-VARIABLE: BOINC_APP_HELPTEXT
+# @DESCRIPTION:
+# Help message to display during the pkg_postinst phase
+: ${BOINC_APP_HELPTEXT:=\
+You have to attach to the corresponding project
+in order to use this application with BOINC.}
+
+# @FUNCTION: boinc-app_add_deps
+# @USAGE: [--wrapper]
+# @DESCRIPTION:
+# Generate appropriate (R)DEPEND for wrapper-enabled or
+# native application.
+boinc-app_add_deps() {
+	if [[ $1 == "--wrapper" ]]; then
+		RDEPEND="sci-misc/boinc-wrapper"
+	else
+		DEPEND="sci-misc/boinc"
+		RDEPEND="sci-misc/boinc"
+	fi
+}
+
+# @FUNCTION: boinc_master_url_check
+# @USAGE:
+# @DESCRIPTION:
+# Make sure BOINC_MASTER_URL has a value.
+boinc_master_url_check() {
+	[[ ! ${BOINC_MASTER_URL} ]] && \
+		die "BOINC_MASTER_URL is not set"
+	return 0
+}
+
+# @FUNCTION: get_boincdir
+# @USAGE:
+# @RETURN: non-prefixed default BOINC runtime directory
+get_boincdir() {
+	echo /var/lib/boinc
+}
+
+# @FUNCTION: get_project_dirname
+# @INTERNAL
+# @USAGE:
+# @RETURN: project's dirname, derived from BOINC_MASTER_URL
+# @DESCRIPTION:
+# Example:
+#
+# @CODE
+# BOINC_MASTER_URL="https://boinc.berkeley.edu/example/"
+# get_project_dirname
+# -> boinc.berkeley.edu_example
+# @CODE
+get_project_dirname() {
+	boinc_master_url_check
+
+	local dirname
+	dirname=${BOINC_MASTER_URL#*://}	# strip http[s]://
+	dirname=${dirname%/}			# strip trailing slash
+	dirname=${dirname////_}			# replace '/' with '_'
+
+	echo "${dirname}"
+}
+
+# @FUNCTION: get_project_root
+# @USAGE:
+# @RETURN: non-prefixed directory where applications and files should be installed
+get_project_root() {
+	echo "$(get_boincdir)/projects/$(get_project_dirname)"
+}
+
+# @FUNCTION: boinc-app_appinfo_prepare
+# @USAGE: <writable app_info.xml>
+# @DESCRIPTION:
+# The default appinfo_prepare(). It replaces all occurences
+# of @PV@ with its corresponding value.
+boinc-app_appinfo_prepare() {
+	sed -i "$1" \
+		-e "s:%PV%:${PV}:g" \
+		|| die "app_info.xml sed failed"
+}
+
+# @FUNCTION: doappinfo
+# @USAGE: <app_info.xml>
+# @DESCRIPTION:
+# Installs given app_info.xml file to the project root.
+#
+# Tip: implement appinfo_prepare() function for all your sed hacks.
+# It should recognize first argument as a file and edit it in place.
+#
+# Example:
+# @CODE
+# appinfo_prepare() {
+# 	if ! use cuda; then
+# 		sed "/<plan_class>cuda/d" -i "$1" || die
+# 	fi
+# 	boinc-app_appinfo_prepare "$1"
+# }
+#
+# src_install() {
+# 	doappinfo "${FILESDIR}"/app_info_${PV}.xml
+#
+#	exeinto $(get_project_root)
+# 	exeopts -m 0755 --owner boinc --group boinc
+# 	newexe bin/${PN} example_app_v${PV}
+# }
+# @CODE
+doappinfo() {
+	(( $# == 1 )) || \
+		die "${FUNCNAME} takes exactly one argument"
+
+	cp "$1" "${T}"/app_info.xml || die
+
+	if declare -f appinfo_prepare >/dev/null; then
+		appinfo_prepare "${T}"/app_info.xml
+	else
+		boinc-app_appinfo_prepare "${T}"/app_info.xml
+	fi
+
+	( # subshell to avoid pollution of calling environment
+		insinto $(get_project_root)
+		insopts -m 0644 --owner boinc --group boinc
+		doins "${T}"/app_info.xml
+	) || die "failed to install app_info.xml"
+}
+
+# @FUNCTION: boinc-wrapper_foreach_wrapper_job
+# @USAGE: <job.xml>
+# @DESCRIPTION:
+# The default foreach_wrapper_job(). It replaces all occurences
+# of @PV@, @EPREFIX@ and @LIBDIR@ strings with their corresponding values.
+boinc-wrapper_foreach_wrapper_job() {
+	sed -i "$1" \
+		-e "s:@PV@:${PV}:g" \
+		-e "s:@EPREFIX@:${EPREFIX}:g" \
+		-e "s:@LIBDIR@:$(get_libdir):g" \
+		|| die "$(basename "$1") sed failed"
+}
+
+# @FUNCTION: dowrapper
+# @USAGE: <app> [more apps...]
+# @DESCRIPTION:
+# This function provides a uniform way to install wrapper applications
+# for BOINC projects. It makes symlinks to the BOINC wrapper and also
+# installs respective job.xml files.
+#
+# When sci-misc/boinc-example-1.0 calls `dowrapper boinc-example` it:
+#
+# 1. Installs boinc-example_job_1.0.xml from ebuild's files/ directory
+#    to project's root directory
+#
+# 2. Installs boinc-example_wrapper_1.0 symlink, which points
+#    to /usr/bin/boinc-wrapper, to project's root directory
+#
+# Example:
+# @CODE
+# src_install() {
+# 	meson_src_install
+#
+# 	dowrapper boinc-example boinc-sample
+#	doappinfo "${FILESDIR}"/app_info_${PV}.xml
+# }
+# @CODE
+#
+# Keep your job.xml files in sync with app_info.xml!
+dowrapper() {
+	for app in "$@"; do
+		local wrapperjob="${app}_job_${PV}.xml"
+		local wrapperexe="${app}_wrapper_${PV}"
+
+		[[ -f "${FILESDIR}/${wrapperjob}" ]] || \
+			die "${wrapperjob} not found in ebuild's files/ directory"
+
+		cp "${FILESDIR}/${wrapperjob}" "${T}" || die
+
+		if declare -f foreach_wrapper_job >/dev/null; then
+			foreach_wrapper_job "${T}/${wrapperjob}"
+		else
+			boinc-wrapper_foreach_wrapper_job "${T}/${wrapperjob}"
+		fi
+
+		( # subshell to avoid pollution of calling environment
+			insinto $(get_project_root)
+			insopts -m 0644 --owner boinc --group boinc
+			doins "${T}"/${wrapperjob}
+			dosym -r /usr/bin/boinc-wrapper "$(get_project_root)/${wrapperexe}"
+		) || die "failed to install '${app}' wrapper app"
+	done
+}
+
+# @FUNCTION: boinc-app_pkg_postinst
+# @DESCRIPTION:
+# Display helpful instructions on how to make the BOINC client use installed
+# applications.
+boinc-app_pkg_postinst() {
+	if [[ -f "${EROOT}$(get_boincdir)/master_$(get_project_dirname).xml" ]]; then
+		if [[ ! ${REPLACING_VERSIONS} ]]; then
+			# most likely replacing applications downloaded
+			# by the BOINC client from project's website
+			elog "Restart the BOINC daemon for changes to take place:"
+			elog "# rc-service boinc restart"
+			return
+		else
+			# applications are already in use
+			return
+		fi
+	fi
+
+	elog
+	while read h; do
+		elog "${h}"
+	done <<<"${BOINC_APP_HELPTEXT}"
+	elog
+
+	if [[ ! ${BOINC_INVITATION_CODE} ]]; then
+		elog "# rc-service boinc attach"
+		elog "    Enter the Project URL: ${BOINC_MASTER_URL}"
+	else
+		elog "- Master URL: ${BOINC_MASTER_URL}"
+		elog "- Invitation code: ${BOINC_INVITATION_CODE}"
+	fi
+}
+
+# @FUNCTION: boinc-app_pkg_postrm
+# @DESCRIPTION:
+# Display helpful instructions on how to cleanly uninstall unmerged
+# applications.
+boinc-app_pkg_postrm() {
+	if [[ ! ${REPLACED_BY_VERSION} ]]; then
+		local gui_rpc_auth="$(get_boincdir)/gui_rpc_auth.cfg"
+		local passwd=$(cat "${EROOT}${gui_rpc_auth}")
+		if [[ ! ${passwd} ]]; then
+			passwd="\$(cat ${gui_rpc_auth})"
+		fi
+
+		elog
+		elog "You should detach this project from the BOINC client"
+		elog "to stop current tasks and delete remaining project files:"
+		elog
+		elog "$ boinccmd --passwd ${passwd} --project ${BOINC_MASTER_URL} detach"
+	fi
+}
+
+_BOINC_APP_ECLASS=1
+fi


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2021-07-22  8:29 Anna Vyalkova
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Vyalkova @ 2021-07-22  8:29 UTC (permalink / raw
  To: gentoo-commits

commit:     708b16c5bb904fd2f07a47982c9632c767580fb0
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Thu Jul 22 08:10:46 2021 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Thu Jul 22 08:27:39 2021 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=708b16c5

boinc.eclass: new eclass

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 eclass/boinc.eclass | 200 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 200 insertions(+)

diff --git a/eclass/boinc.eclass b/eclass/boinc.eclass
new file mode 100644
index 000000000..d16d6e250
--- /dev/null
+++ b/eclass/boinc.eclass
@@ -0,0 +1,200 @@
+# Copyright 2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# @ECLASS: boinc.eclass
+# @MAINTAINER:
+# Anna Vyalkova <cyber+gentoo@sysrq.in>
+# @SUPPORTED_EAPIS: 8
+# @BLURB: An eclass to build BOINC applications and libraries.
+# @DESCRIPTION:
+# This eclass provides helper functions to build BOINC applications and libraries.
+
+inherit toolchain-funcs
+
+case ${EAPI} in
+	8) ;;
+	*) die "${ECLASS}: EAPI ${EAPI} unsupported."
+esac
+
+# @ECLASS-VARIABLE: BOINC_SUBMODULE
+# @PRE_INHERIT
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# Set this variable to a subdirectory relative to BOINC source repository,
+# if software cannot be built outside it (for example, if some required
+# headers are missing in sci-misc/boinc).
+#
+# If unset, no functions will be exported.
+
+# @ECLASS-VARIABLE: BOINC_S
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# If defined this variable determines the source directory name after
+# unpacking. This defaults to package name and version. Note that this
+# variable supports a wildcard mechanism to help with github tarballs
+# that contain the commit hash as part of the directory name.
+
+if [[ ${BOINC_SUBMODULE} ]]; then
+	EXPORT_FUNCTIONS src_unpack src_prepare src_configure
+fi
+
+if [[ ! ${_BOINC_ECLASS} ]]; then
+
+# @FUNCTION: get_boinc_src
+# @USAGE: <SRC_URI|S> <release> [client|server]
+# @RETURN: SRC_URI snippet or temporary build directory for given BOINC release
+get_boinc_src() {
+	local query_var=${1}
+	local RELEASE_PATCH=${2}
+	local RELEASE_MINOR=$(ver_cut 1-2 ${RELEASE_PATCH})
+	local RELEASE_TYPE=${3:-client}
+
+	local SUFFIX=
+	case ${RELEASE_TYPE} in
+		server) SUFFIX="-server" ;;
+		client) ;;
+		*) die "${FUNCNAME}: unknown release type '${RELEASE_TYPE}'"
+	esac
+
+	local _SRC_URI="https://github.com/BOINC/boinc/archive"
+	_SRC_URI+="${RELEASE_TYPE}_release/${RELEASE_MINOR}/${RELEASE_PATCH}.tar.gz"
+	_SRC_URI+=" -> boinc${SUFFIX}-${RELEASE_PATCH}.tar.gz"
+
+	local _S="${WORKDIR}/boinc-${RELEASE_TYPE}_release-${RELEASE_MINOR}-${RELEASE_PATCH}"
+
+	case ${query_var} in
+		SRC_URI) echo "${_SRC_URI}" ;;
+		S) echo "${_S}" ;;
+		*) die "${FUNCNAME}: unknown variable to query (${query_var})"
+	esac
+
+}
+
+# @ECLASS-VARIABLE: BOINC_BUILD_DIR
+# @OUTPUT_VARIABLE
+# @DESCRIPTION:
+# Temporary build directory, where BOINC sources are located.
+
+# @FUNCTION: boinc_require_source
+# @USAGE: [boinc version] [client|server]
+# @DESCRIPTION:
+# Set up SRC_URI and S for building application within BOINC source tree.
+#
+# This function must be called in global scope, after BOINC_SUBMODULE
+# and SRC_URI have been declared. Take care not to overwrite the variables
+# set by it.
+#
+# If no BOINC version is given, this function assumes it equal to client
+# release $PV.
+boinc_require_source() {
+	local boinc_version=${1:-${PV}}
+	SRC_URI+=" $(get_boinc_src SRC_URI ${boinc_version} ${2})"
+
+	readonly BOINC_BUILD_DIR="$(get_boinc_src S ${boinc_version} ${2})"
+	S="${BOINC_BUILD_DIR}/${BOINC_SUBMODULE}"
+}
+
+# @FUNCTION: boinc_enable_autotools
+# @USAGE: [econf args...]
+# @DESCRIPTION:
+# Configure BOINC source tree using autotools.
+#
+# If no arguments are given, econf will be called
+# with --enable-pkg-devel flag.
+#
+# This function must be called in global scope.
+boinc_enable_autotools() {
+	inherit autotools
+	_BOINC_RUN_AUTOTOOLS=1
+	_BOINC_ECONF_ARGS=${@:---enable-pkg-devel}
+}
+
+# @FUNCTION: boinc_override_config
+# @USAGE: <config.h>
+# @DESCRIPTION:
+# Some applications do not need autotools to build but
+# use a few HAVE_* defines.
+
+# If you want to save ~40 seconds and really know what
+# to do, pass prepared config.h to this function.
+#
+# This function must be called in global scope.
+boinc_override_config() {
+	_BOINC_CONFIG_OVERRIDE="${1}"
+}
+
+# @FUNCTION: boinc_builddir_check
+# @USAGE:
+# @DESCRIPTION:
+# Make sure BOINC_BUILD_DIR has a value.
+boinc_builddir_check() {
+	if [[ ! ${BOINC_BUILD_DIR} ]]; then
+		eerror "BOINC_BUILD_DIR is not set."
+		die "Did you forget to call boinc_require_source?"
+	fi
+
+	mkdir -p ${BOINC_BUILD_DIR} || die
+}
+
+boinc_src_unpack() {
+	default_src_unpack
+	boinc_builddir_check
+
+	[[ -d ${S} ]] && \
+		return
+
+	# Special case, for the always-lovely GitHub fetches. With this,
+	# we allow the star glob to just expand to whatever directory it's
+	# called.
+	if [[ "${BOINC_S:=${P}}" = *"*"* ]]; then
+		pushd "${WORKDIR}" >/dev/null || die
+		local shopt_save=$(shopt -p nullglob)
+		shopt -s nullglob
+
+		# use an array to trigger filename expansion
+		BOINC_S=( ${BOINC_S} )
+		if [[ ${#BOINC_S[@]} -gt 1 ]]; then
+			die "BOINC_S did expand to multiple paths: ${BOINC_S[*]}"
+		fi
+
+		${shopt_save}
+		popd >/dev/null || die
+	fi
+
+	mkdir -p "$(dirname "${S}")" || die
+	mv "${WORKDIR}/${BOINC_S}" "${S}" || die
+}
+
+boinc_src_prepare() {
+	boinc_builddir_check
+	default_src_prepare
+
+	if [[ ${_BOINC_RUN_AUTOTOOLS} ]]; then
+		pushd "${BOINC_BUILD_DIR}" >/dev/null || die
+		eautoreconf
+		popd >/dev/null || die
+	fi
+}
+
+boinc_src_configure() {
+	boinc_builddir_check
+	pushd "${BOINC_BUILD_DIR}" >/dev/null || die
+
+	bash ./generate_svn_version.sh || \
+		die "generating svn_version.h failed"
+
+	if [[ ${_BOINC_RUN_AUTOTOOLS} ]]; then
+		econf "${_BOINC_ECONF_ARGS[@]}"
+	else
+		tc-export AR CC CPP CXX LD OBJDUMP RANLIB
+	fi
+
+	if [[ ${_BOINC_CONFIG_OVERRIDE} ]]; then
+		cp "${_BOINC_CONFIG_OVERRIDE}" config.h || die
+	fi
+
+	popd >/dev/null || die
+}
+
+_BOINC_ECLASS=1
+fi


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2021-07-25 18:15 Anna Vyalkova
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Vyalkova @ 2021-07-25 18:15 UTC (permalink / raw
  To: gentoo-commits

commit:     7550cd50ab0c998a6b0630c1a153bb891640a475
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Sun Jul 25 17:54:13 2021 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Sun Jul 25 17:54:13 2021 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=7550cd50

boinc.eclass: add missing slash in download URL

Closes: https://bugs.gentoo.org/803902
Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 eclass/boinc.eclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eclass/boinc.eclass b/eclass/boinc.eclass
index d16d6e250..80281c69d 100644
--- a/eclass/boinc.eclass
+++ b/eclass/boinc.eclass
@@ -56,7 +56,7 @@ get_boinc_src() {
 		*) die "${FUNCNAME}: unknown release type '${RELEASE_TYPE}'"
 	esac
 
-	local _SRC_URI="https://github.com/BOINC/boinc/archive"
+	local _SRC_URI="https://github.com/BOINC/boinc/archive/"
 	_SRC_URI+="${RELEASE_TYPE}_release/${RELEASE_MINOR}/${RELEASE_PATCH}.tar.gz"
 	_SRC_URI+=" -> boinc${SUFFIX}-${RELEASE_PATCH}.tar.gz"
 


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2021-09-08 10:46 Alessandro Barbieri
  0 siblings, 0 replies; 180+ messages in thread
From: Alessandro Barbieri @ 2021-09-08 10:46 UTC (permalink / raw
  To: gentoo-commits

commit:     9ac9f8dfc1decbcd2b10565935252c72da807d51
Author:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
AuthorDate: Wed Sep  8 10:43:25 2021 +0000
Commit:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
CommitDate: Wed Sep  8 10:46:18 2021 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=9ac9f8df

R-packages.eclass: pass AR via MAKEFLAGS

Closes: https://bugs.gentoo.org/812113
Closes: https://bugs.gentoo.org/812110
Closes: https://bugs.gentoo.org/812107
Closes: https://bugs.gentoo.org/812104
Closes: https://bugs.gentoo.org/812101
Closes: https://bugs.gentoo.org/812098
Closes: https://bugs.gentoo.org/812095
Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>

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

diff --git a/eclass/R-packages.eclass b/eclass/R-packages.eclass
index 5e1d6bccc..a072e5cc2 100644
--- a/eclass/R-packages.eclass
+++ b/eclass/R-packages.eclass
@@ -1,7 +1,7 @@
 # Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-inherit eutils
+inherit eutils toolchain-funcs
 
 EXPORT_FUNCTIONS src_unpack src_prepare src_compile src_install
 
@@ -34,7 +34,7 @@ R-packages_src_prepare() {
 
 
 R-packages_src_compile() {
-	MAKEFLAGS="CFLAGS=${CFLAGS// /\\ } CXXFLAGS=${CXXFLAGS// /\\ } FFLAGS=${FFLAGS// /\\ } FCFLAGS=${FCFLAGS// /\\ } LDFLAGS=${LDFLAGS// /\\ }" R CMD INSTALL . -l "${WORKDIR}" "--byte-compile" || die
+	MAKEFLAGS="AR=$(tc-getAR) CFLAGS=${CFLAGS// /\\ } CXXFLAGS=${CXXFLAGS// /\\ } FFLAGS=${FFLAGS// /\\ } FCFLAGS=${FCFLAGS// /\\ } LDFLAGS=${LDFLAGS// /\\ }" R CMD INSTALL . -l "${WORKDIR}" "--byte-compile" || die
 }
 
 R-packages_src_install() {


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2021-09-29 13:08 Alessandro Barbieri
  0 siblings, 0 replies; 180+ messages in thread
From: Alessandro Barbieri @ 2021-09-29 13:08 UTC (permalink / raw
  To: gentoo-commits

commit:     cdfa791730db5da61da7bb4df88f8fede81e7711
Author:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
AuthorDate: Wed Sep 29 13:05:40 2021 +0000
Commit:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
CommitDate: Wed Sep 29 13:08:27 2021 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=cdfa7917

node.eclass: new eclass

Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>

 eclass/node.eclass | 135 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 135 insertions(+)

diff --git a/eclass/node.eclass b/eclass/node.eclass
new file mode 100644
index 000000000..aeff2f3c7
--- /dev/null
+++ b/eclass/node.eclass
@@ -0,0 +1,135 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# @ECLASS: node.eclass
+# @MAINTAINER: Alessandro Barbieri
+# @AUTHOR:
+# Alessandro Barbieri
+# msirabella
+# @BLURB: Eclass used to create and maintain node based packages
+# @DESCRIPTION: Node eclass for nodejs' based packages
+
+EXPORT_FUNCTIONS src_prepare src_compile src_install src_test src_configure
+
+SLOT="0"
+PN_LEFT="${PN%%+*}"
+PN_RIGHT="${PN#*+}"
+NODEJS_DEPEND="net-libs/nodejs"
+NODEJS_RDEPEND="${NODEJS_DEPEND}"
+NODEJS_BDEPEND="
+	app-misc/jq
+	net-misc/rsync
+
+	net-libs/nodejs[npm]
+"
+#	|| ( net-libs/nodejs[npm] dev-node/npm )
+
+DEPEND="${NODEJS_DEPEND}"
+RDEPEND="${NODEJS_RDEPEND}"
+BDEPEND="${NODEJS_BDEPEND}"
+
+NODE_MODULE_PREFIX="${T}/prefix"
+NPM="npm"
+#NPM_FLAGS=""
+
+case "${PN}" in
+	*+*)
+	SRC_URI="mirror://npm/@${PN_LEFT}/${PN_RIGHT}/-/${PN_RIGHT}-${PV}.tgz -> ${P}.tgz"
+	;;
+
+	*)
+	SRC_URI="mirror://npm/${PN}/-/${P}.tgz"
+	;;
+esac
+case "${PN}" in
+	*types+*)
+	S="${WORKDIR}/${PN_RIGHT}"
+	;;
+
+	*)
+	S="${WORKDIR}/package"
+	;;
+esac
+
+node_src_prepare() {
+	#remove version constraints on dependencies
+	jq 'if .dependencies? then .dependencies[] = "*" else . end' package.json > package.json.temp || die
+	mv package.json.temp package.json || die
+	jq 'if .devDependencies? then .devDependencies[] = "*" else . end' package.json > package.json.temp || die
+	mv package.json.temp package.json || die
+
+	#here we trick npm into believing there are no dependencies so it will not try to fetch them
+	jq 'with_entries(if .key == "dependencies" then .key = "deps" else . end)' package.json > package.json.temp || die
+	mv package.json.temp package.json || die
+	jq 'with_entries(if .key == "devDependencies" then .key = "devDeps" else . end)' package.json > package.json.temp || die
+	mv package.json.temp package.json || die
+
+	# are those useful?
+	rm -fv npm-shrinkwrap.json package-lock.json yarn.lock pnpm-lock.yaml || die
+
+	#delete some trash
+	find . -iname 'code-of-conduct*' -maxdepth 1 -exec rm -rv "{}" \; || die
+	find . -iname 'code_of_conduct*' -maxdepth 1 -exec rm -rv "{}" \; || die
+	find . -iname 'contributing*' -maxdepth 1 -exec rm -rv "{}" \; || die
+	find . -iname 'contribution*' -maxdepth 1 -exec rm -rv "{}" \; || die
+	find . -iname 'dockerfile*' -maxdepth 1 -exec rm -rv "{}" \; || die
+	find . -iname 'issue_template*' -maxdepth 1 -exec rm -rv "{}" \; || die
+	find . -iname 'license*' -maxdepth 1 -exec rm -rv "{}" \; || die
+	find . -iname 'licence*' -maxdepth 1 -exec rm -rv "{}" \; || die
+	find . -iname 'pull_request_template*' -maxdepth 1 -exec rm -rv "{}" \; || die
+
+	default
+}
+
+node_src_configure() {
+	export PATH="${PATH}:/opt/node-debian/usr/bin"
+	#path to the modules
+	export NODE_PATH="/usr/$(get_libdir)/node_modules:/opt/node-debian/usr/share/nodejs"
+	export npm_config_prefix="${NODE_MODULE_PREFIX}"
+	#path to the headers needed by node-gyp
+	export npm_config_nodedir="/usr/include/node"
+#	export npm_config_tmp="${T}"
+
+	in_iuse test || export NODE_ENV="production"
+
+	"${NPM}" config set offline true || die
+	"${NPM}" config set audit false || die
+	"${NPM}" config set fund false || die
+}
+
+node_src_compile() {
+	"${NPM}" install ${NPM_FLAGS} --global || die
+}
+
+node_src_install() {
+	#restore original package.json
+	jq 'with_entries(if .key == "deps" then .key = "dependencies" else . end)' package.json > package.json.temp || die
+	mv package.json.temp package.json || die
+	jq 'with_entries(if .key == "devDeps" then .key = "devDependencies" else . end)' package.json > package.json.temp || die
+	mv package.json.temp package.json || die
+
+	#should I delete all the dotfiles?
+	rm -rvf $(find . -iname ".[!.]*") || die
+
+	#install some files in the docdir
+	find . -iname "authors*" -maxdepth 1 -exec dodoc "{}" \; -exec rm "{}" \; || die
+	find . -iname "changelog*" -maxdepth 1 -exec dodoc "{}" \; -exec rm "{}" \; || die
+	find . -iname "changes*" -maxdepth 1 -exec dodoc "{}" \; -exec rm "{}" \; || die
+	find . -iname "copyright*" -maxdepth 1 -exec dodoc "{}" \; -exec rm "{}" \; || die
+	find . -iname "history*" -maxdepth 1 -exec dodoc "{}" \; -exec rm "{}" \; || die
+	find . -iname "notice*" -maxdepth 1 -exec dodoc "{}" \; -exec rm "{}" \; || die
+	find . -iname "readme*" -maxdepth 1 -exec dodoc "{}" \; -exec rm "{}" \; || die
+	find . -iname "security*" -maxdepth 1 -exec dodoc "{}" \; -exec rm "{}" \; || die
+
+	#copy files instead of symlinks
+	rsync -aLAX "${NODE_MODULE_PREFIX}/" "${ED}/usr" --exclude /bin || die
+
+	if [ -d "${NODE_MODULE_PREFIX}/bin" ] ; then
+		#keep the symlinks
+		rsync -aAX "${NODE_MODULE_PREFIX}/bin/" "${ED}/usr/bin" || die
+	fi
+}
+
+node_src_test() {
+	npm test || die
+}


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2021-09-29 13:14 Alessandro Barbieri
  0 siblings, 0 replies; 180+ messages in thread
From: Alessandro Barbieri @ 2021-09-29 13:14 UTC (permalink / raw
  To: gentoo-commits

commit:     601610833831462786c12893b87ec8a9ccc50fda
Author:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
AuthorDate: Wed Sep 29 13:13:36 2021 +0000
Commit:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
CommitDate: Wed Sep 29 13:13:36 2021 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=60161083

node.eclass: remove /opt from paths

Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>

 eclass/node.eclass | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/eclass/node.eclass b/eclass/node.eclass
index aeff2f3c7..47b7a57b1 100644
--- a/eclass/node.eclass
+++ b/eclass/node.eclass
@@ -82,9 +82,8 @@ node_src_prepare() {
 }
 
 node_src_configure() {
-	export PATH="${PATH}:/opt/node-debian/usr/bin"
 	#path to the modules
-	export NODE_PATH="/usr/$(get_libdir)/node_modules:/opt/node-debian/usr/share/nodejs"
+	export NODE_PATH="/usr/$(get_libdir)/node_modules"
 	export npm_config_prefix="${NODE_MODULE_PREFIX}"
 	#path to the headers needed by node-gyp
 	export npm_config_nodedir="/usr/include/node"


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2021-10-05 21:24 Alessandro Barbieri
  0 siblings, 0 replies; 180+ messages in thread
From: Alessandro Barbieri @ 2021-10-05 21:24 UTC (permalink / raw
  To: gentoo-commits

commit:     fcc3d7d78eda6e965820a39b9bbcb062cbd1549d
Author:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
AuthorDate: Tue Oct  5 21:23:30 2021 +0000
Commit:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
CommitDate: Tue Oct  5 21:24:13 2021 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=fcc3d7d7

R-packages.eclass: add SUGGESTED_PACKAGES optfeature

Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>

 eclass/R-packages.eclass | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/eclass/R-packages.eclass b/eclass/R-packages.eclass
index a072e5cc2..6cbf9d7d3 100644
--- a/eclass/R-packages.eclass
+++ b/eclass/R-packages.eclass
@@ -1,9 +1,9 @@
 # Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-inherit eutils toolchain-funcs
+inherit eutils optfeature toolchain-funcs
 
-EXPORT_FUNCTIONS src_unpack src_prepare src_compile src_install
+EXPORT_FUNCTIONS src_unpack src_prepare src_compile src_install pkg_postinst
 
 SRC_URI="mirror://cran/src/contrib/${PN}_${PV}.tar.gz"
 HOMEPAGE="https://cran.r-project.org/package=${PN}"
@@ -32,7 +32,6 @@ R-packages_src_prepare() {
 	default
 }
 
-
 R-packages_src_compile() {
 	MAKEFLAGS="AR=$(tc-getAR) CFLAGS=${CFLAGS// /\\ } CXXFLAGS=${CXXFLAGS// /\\ } FFLAGS=${FFLAGS// /\\ } FCFLAGS=${FCFLAGS// /\\ } LDFLAGS=${LDFLAGS// /\\ }" R CMD INSTALL . -l "${WORKDIR}" "--byte-compile" || die
 }
@@ -62,3 +61,9 @@ R-packages_src_install() {
 	insinto "/usr/$(get_libdir)/R/site-library"
 	doins -r "${WORKDIR}/${PN//_/.}"
 }
+
+R-packages_pkg_postinst() {
+	if [ -v SUGGESTED_PACKAGES ]; then
+		optfeature "having the upstream suggested packages" "${SUGGESTED_PACKAGES}"
+	fi
+}


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2022-02-17 21:11 Anna Vyalkova
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Vyalkova @ 2022-02-17 21:11 UTC (permalink / raw
  To: gentoo-commits

commit:     d7ab16c621c6dfa45e7a09bcf39c09b34750f180
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Mon Feb 14 15:22:22 2022 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Thu Feb 17 21:11:15 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=d7ab16c6

boinc-app.eclass: add debug-print-function calls

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 eclass/boinc-app.eclass | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/eclass/boinc-app.eclass b/eclass/boinc-app.eclass
index d62c8a91f..8a92447a2 100644
--- a/eclass/boinc-app.eclass
+++ b/eclass/boinc-app.eclass
@@ -77,6 +77,8 @@ in order to use this application with BOINC.}
 # Generate appropriate (R)DEPEND for wrapper-enabled or
 # native application.
 boinc-app_add_deps() {
+	debug-print-function ${FUNCNAME} "${@}"]
+
 	if [[ $1 == "--wrapper" ]]; then
 		RDEPEND="sci-misc/boinc-wrapper"
 	else
@@ -90,6 +92,8 @@ boinc-app_add_deps() {
 # @DESCRIPTION:
 # Make sure BOINC_MASTER_URL has a value.
 boinc_master_url_check() {
+	debug-print-function ${FUNCNAME} "${@}"]
+
 	[[ ! ${BOINC_MASTER_URL} ]] && \
 		die "BOINC_MASTER_URL is not set"
 	return 0
@@ -99,6 +103,8 @@ boinc_master_url_check() {
 # @USAGE:
 # @RETURN: non-prefixed default BOINC runtime directory
 get_boincdir() {
+	debug-print-function ${FUNCNAME} "${@}"]
+
 	echo /var/lib/boinc
 }
 
@@ -115,6 +121,8 @@ get_boincdir() {
 # -> boinc.berkeley.edu_example
 # @CODE
 get_project_dirname() {
+	debug-print-function ${FUNCNAME} "${@}"]
+
 	boinc_master_url_check
 
 	local dirname
@@ -129,6 +137,8 @@ get_project_dirname() {
 # @USAGE:
 # @RETURN: non-prefixed directory where applications and files should be installed
 get_project_root() {
+	debug-print-function ${FUNCNAME} "${@}"]
+
 	echo "$(get_boincdir)/projects/$(get_project_dirname)"
 }
 
@@ -138,6 +148,8 @@ get_project_root() {
 # The default appinfo_prepare(). It replaces all occurences
 # of @PV@ with its corresponding value.
 boinc-app_appinfo_prepare() {
+	debug-print-function ${FUNCNAME} "${@}"]
+
 	sed -i "$1" \
 		-e "s:%PV%:${PV}:g" \
 		|| die "app_info.xml sed failed"
@@ -169,6 +181,8 @@ boinc-app_appinfo_prepare() {
 # }
 # @CODE
 doappinfo() {
+	debug-print-function ${FUNCNAME} "${@}"]
+
 	(( $# == 1 )) || \
 		die "${FUNCNAME} takes exactly one argument"
 
@@ -193,6 +207,8 @@ doappinfo() {
 # The default foreach_wrapper_job(). It replaces all occurences
 # of @PV@, @EPREFIX@ and @LIBDIR@ strings with their corresponding values.
 boinc-wrapper_foreach_wrapper_job() {
+	debug-print-function ${FUNCNAME} "${@}"]
+
 	sed -i "$1" \
 		-e "s:@PV@:${PV}:g" \
 		-e "s:@EPREFIX@:${EPREFIX}:g" \
@@ -227,6 +243,8 @@ boinc-wrapper_foreach_wrapper_job() {
 #
 # Keep your job.xml files in sync with app_info.xml!
 dowrapper() {
+	debug-print-function ${FUNCNAME} "${@}"]
+
 	for app in "$@"; do
 		local wrapperjob="${app}_job_${PV}.xml"
 		local wrapperexe="${app}_wrapper_${PV}"
@@ -256,6 +274,8 @@ dowrapper() {
 # Display helpful instructions on how to make the BOINC client use installed
 # applications.
 boinc-app_pkg_postinst() {
+	debug-print-function ${FUNCNAME} "${@}"]
+
 	if [[ -f "${EROOT}$(get_boincdir)/master_$(get_project_dirname).xml" ]]; then
 		if [[ ! ${REPLACING_VERSIONS} ]]; then
 			# most likely replacing applications downloaded
@@ -289,6 +309,8 @@ boinc-app_pkg_postinst() {
 # Display helpful instructions on how to cleanly uninstall unmerged
 # applications.
 boinc-app_pkg_postrm() {
+	debug-print-function ${FUNCNAME} "${@}"]
+
 	if [[ ! ${REPLACED_BY_VERSION} ]]; then
 		local gui_rpc_auth="$(get_boincdir)/gui_rpc_auth.cfg"
 		local passwd=$(cat "${EROOT}${gui_rpc_auth}")


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2022-02-17 21:11 Anna Vyalkova
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Vyalkova @ 2022-02-17 21:11 UTC (permalink / raw
  To: gentoo-commits

commit:     7efa176f5dcd69d978f2d110251117a9e1437069
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Mon Feb 14 15:21:13 2022 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Thu Feb 17 21:11:15 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=7efa176f

boinc.eclass: add debug-print-function calls

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 eclass/boinc.eclass | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)

diff --git a/eclass/boinc.eclass b/eclass/boinc.eclass
index 80281c69d..f2c28b628 100644
--- a/eclass/boinc.eclass
+++ b/eclass/boinc.eclass
@@ -9,7 +9,7 @@
 # @DESCRIPTION:
 # This eclass provides helper functions to build BOINC applications and libraries.
 
-inherit toolchain-funcs
+inherit autotools toolchain-funcs
 
 case ${EAPI} in
 	8) ;;
@@ -44,6 +44,8 @@ if [[ ! ${_BOINC_ECLASS} ]]; then
 # @USAGE: <SRC_URI|S> <release> [client|server]
 # @RETURN: SRC_URI snippet or temporary build directory for given BOINC release
 get_boinc_src() {
+	debug-print-function ${FUNCNAME} "${@}"]
+
 	local query_var=${1}
 	local RELEASE_PATCH=${2}
 	local RELEASE_MINOR=$(ver_cut 1-2 ${RELEASE_PATCH})
@@ -87,6 +89,8 @@ get_boinc_src() {
 # If no BOINC version is given, this function assumes it equal to client
 # release $PV.
 boinc_require_source() {
+	debug-print-function ${FUNCNAME} "${@}"]
+
 	local boinc_version=${1:-${PV}}
 	SRC_URI+=" $(get_boinc_src SRC_URI ${boinc_version} ${2})"
 
@@ -104,7 +108,8 @@ boinc_require_source() {
 #
 # This function must be called in global scope.
 boinc_enable_autotools() {
-	inherit autotools
+	debug-print-function ${FUNCNAME} "${@}"]
+
 	_BOINC_RUN_AUTOTOOLS=1
 	_BOINC_ECONF_ARGS=${@:---enable-pkg-devel}
 }
@@ -120,6 +125,8 @@ boinc_enable_autotools() {
 #
 # This function must be called in global scope.
 boinc_override_config() {
+	debug-print-function ${FUNCNAME} "${@}"]
+
 	_BOINC_CONFIG_OVERRIDE="${1}"
 }
 
@@ -128,6 +135,8 @@ boinc_override_config() {
 # @DESCRIPTION:
 # Make sure BOINC_BUILD_DIR has a value.
 boinc_builddir_check() {
+	debug-print-function ${FUNCNAME} "${@}"]
+
 	if [[ ! ${BOINC_BUILD_DIR} ]]; then
 		eerror "BOINC_BUILD_DIR is not set."
 		die "Did you forget to call boinc_require_source?"
@@ -137,6 +146,8 @@ boinc_builddir_check() {
 }
 
 boinc_src_unpack() {
+	debug-print-function ${FUNCNAME} "${@}"]
+
 	default_src_unpack
 	boinc_builddir_check
 
@@ -166,6 +177,8 @@ boinc_src_unpack() {
 }
 
 boinc_src_prepare() {
+	debug-print-function ${FUNCNAME} "${@}"]
+
 	boinc_builddir_check
 	default_src_prepare
 
@@ -177,6 +190,8 @@ boinc_src_prepare() {
 }
 
 boinc_src_configure() {
+	debug-print-function ${FUNCNAME} "${@}"]
+
 	boinc_builddir_check
 	pushd "${BOINC_BUILD_DIR}" >/dev/null || die
 


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2022-03-31  7:24 Anna Vyalkova
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Vyalkova @ 2022-03-31  7:24 UTC (permalink / raw
  To: gentoo-commits

commit:     bd38be65c80afe2e7ec56e4cc05b5e8388170fa3
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Thu Mar 31 01:56:33 2022 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Thu Mar 31 01:57:38 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=bd38be65

qbs.eclass: new eclass

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 eclass/qbs.eclass | 186 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 186 insertions(+)

diff --git a/eclass/qbs.eclass b/eclass/qbs.eclass
new file mode 100644
index 000000000..6c3f06310
--- /dev/null
+++ b/eclass/qbs.eclass
@@ -0,0 +1,186 @@
+# Copyright 2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# @ECLASS: qbs.eclass
+# @AUTHOR:
+# Anna Vyalkova <cyber+gentoo@sysrq.in>
+# @MAINTAINER:
+# Anna Vyalkova <cyber+gentoo@sysrq.in>
+# @SUPPORTED_EAPIS: 8
+# @PROVIDES: qmake-utils
+# @BLURB: eclass to build qbs-based packages
+# @DESCRIPTION:
+# Utility eclass providing wrapper functions for Qbs build system.
+
+if [[ ! ${_QBS_ECLASS} ]]; then
+
+case ${EAPI} in
+	8) ;;
+	*) die "${ECLASS}: EAPI ${EAPI} unsupported."
+esac
+
+inherit multiprocessing toolchain-funcs qmake-utils
+
+# @ECLASS-VARIABLE: QBS_COMMAND_ECHO_MODE
+# @USER_VARIABLE
+# @DESCRIPTION:
+# Determines what kind of output to show when executing commands.  Possible
+# values are:
+#
+# - silent
+#
+# - summary
+#
+# - command-line (the default)
+#
+# - command-line-with-environment
+: ${QBS_COMMAND_ECHO_MODE:=command-line}
+
+BDEPEND="dev-util/qbs"
+
+EXPORT_FUNCTIONS src_configure src_compile src_install
+
+# @FUNCTION: eqbs
+# @USAGE: [<qbs args>...]
+# @DESCRIPTION:
+# Run Qbs. This command dies on failure.
+eqbs() {
+	debug-print-function ${FUNCNAME} "${@}"
+
+	set -- qbs "${@}"
+	einfo "${@}"
+	"${@}" || die -n
+
+	local ret=${?}
+	return ${ret}
+}
+
+# @FUNCTION: _flags_to_js_array
+# @INTERNAL
+# @USAGE: [<flags>...]
+# @RETURN: arguments quoted and separated by comma
+_flags_to_js_array() {
+	if [[ ! ${@} ]]; then
+		echo "[]"
+	else
+		local -a array
+		printf -v array "'%s', " "${@}"
+		echo "[${array%, }]"
+	fi
+}
+
+# @FUNCTION: _filter_ldflags
+# @INTERNAL
+# @USAGE: [<ldflags>...]
+# @RETURN: flags for the linker (with -Wl and -Xlinker removed)
+_filter_ldflags() {
+	local -a flags
+	while [[ ${@} ]]; do
+		if [[ ${1} == -Wl,* ]]; then
+			IFS=, read -ra flags <<< "${1#-Wl,}"
+			printf "%s " "${flags[@]}"
+		elif [[ ${1} == -Xlinker ]]; then
+			shift
+			printf "%s " "${1}"
+		fi
+		shift
+	done
+}
+
+# @FUNCTION: qbs_src_configure
+# @DESCRIPTION:
+# Setup toolchain and Qt for the "gentoo" profile.
+# Set Qbs preferences to match user settings. Configure build flags and
+# installation prefix.
+qbs_src_configure() {
+	debug-print-function ${FUNCNAME} "${@}"
+
+	eqbs setup-toolchains "$(tc-getCC)" gentooToolchain
+	eqbs config profiles.gentooToolchain.archiverPath "$(tc-getAR)"
+	eqbs config profiles.gentooToolchain.assemblerPath "$(tc-getAS)"
+	eqbs config profiles.gentooToolchain.nmPath "$(tc-getNM)"
+	eqbs config profiles.gentooToolchain.objcopyPath "$(tc-getOBJCOPY)"
+	eqbs config profiles.gentooToolchain.stripPath "$(tc-getSTRIP)"
+
+	eqbs setup-qt "$(qt5_get_bindir)/qmake" gentoo
+	qbs_config baseProfile gentooToolchain
+
+	qbs_config preferences.jobs "$(makeopts_jobs)"
+	if [[ "${NOCOLOR}" == true || "${NOCOLOR}" == yes ]]; then
+		qbs_config preferences.useColoredOutput false
+	fi
+
+	qbs_config qbs.installPrefix "${EPREFIX}/usr"
+	qbs_config qbs.sysroot "${ESYSROOT}"
+	qbs_config qbs.optimization ""  # don't add unwanted flags
+
+	qbs_config cpp.cFlags "$(_flags_to_js_array ${CFLAGS})"
+	qbs_config cpp.cppFlags "$(_flags_to_js_array ${CPPFLAGS})"
+	qbs_config cpp.cxxFlags "$(_flags_to_js_array ${CXXFLAGS})"
+	qbs_config cpp.linkerFlags "$(_flags_to_js_array $(_filter_ldflags ${LDFLAGS}))"
+}
+
+# @FUNCTION: qbs_config
+# @USAGE: <key> <value>
+# @DESCRIPTION:
+# Set a preference for the "gentoo" profile.
+qbs_config() {
+	debug-print-function ${FUNCNAME} "${@}"
+
+	(( $# == 2 )) || \
+		die "${FUNCNAME} takes exactly two arguments"
+
+	local key=${1}
+	local value=${2}
+
+	eqbs config "profiles.gentoo.${key}" "${value}"
+}
+
+# @FUNCTION: qbs_src_compile
+# @USAGE: [<qbs args>...]
+# @DESCRIPTION:
+# General function for compiling with qbs. All arguments are passed
+# to qbs_build.
+qbs_src_compile() {
+	debug-print-function ${FUNCNAME} "${@}"
+
+	qbs_build "${@}"
+}
+
+# @FUNCTION: qbs_build
+# @USAGE: [<qbs args>...]
+# @DESCRIPTION:
+# Build the package using qbs build.
+qbs_build() {
+	debug-print-function ${FUNCNAME} "${@}"
+
+	local qbsargs=(
+		--no-install
+		--command-echo-mode "${QBS_COMMAND_ECHO_MODE}"
+		profile:gentoo
+		config:release
+	)
+
+	eqbs build "${@}" "${qbsargs[@]}"
+}
+
+# @FUNCTION: qbs_src_install
+# @USAGE: [<qbs args>...]
+# @DESCRIPTION:
+# Install the package using qbs install.
+qbs_src_install() {
+	debug-print-function ${FUNCNAME} "${@}"
+
+	local qbsargs=(
+		--no-build
+		--install-root "${D}"
+		--command-echo-mode "${QBS_COMMAND_ECHO_MODE}"
+		profile:gentoo
+		config:release
+	)
+
+	eqbs install "${@}" "${qbsargs[@]}"
+}
+
+_QBS_ECLASS=1
+fi


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2022-04-11  9:41 Anna Vyalkova
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Vyalkova @ 2022-04-11  9:41 UTC (permalink / raw
  To: gentoo-commits

commit:     4db76ea2163a20dff8df6ac054d054eb01e93293
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Fri Apr  8 13:19:47 2022 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Mon Apr 11 09:40:03 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=4db76ea2

boinc-app.eclass: rename @ECLASS_VARIABLE

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 eclass/boinc-app.eclass | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/eclass/boinc-app.eclass b/eclass/boinc-app.eclass
index 8a92447a2..496dbb337 100644
--- a/eclass/boinc-app.eclass
+++ b/eclass/boinc-app.eclass
@@ -25,7 +25,7 @@ case ${EAPI} in
 	*) die "${ECLASS}: EAPI ${EAPI} unsupported."
 esac
 
-# @ECLASS-VARIABLE: BOINC_APP_OPTIONAL
+# @ECLASS_VARIABLE: BOINC_APP_OPTIONAL
 # @DEFAULT_UNSET
 # @DESCRIPTION:
 # If set to a non-null value, BOINC part in the ebuild will be
@@ -40,7 +40,7 @@ fi
 
 if [[ ! ${_BOINC_APP_ECLASS} ]]; then
 
-# @ECLASS-VARIABLE: BOINC_MASTER_URL
+# @ECLASS_VARIABLE: BOINC_MASTER_URL
 # @REQUIRED
 # @DESCRIPTION:
 # Each project is publicly identified by a master URL. It also serves
@@ -51,20 +51,20 @@ if [[ ! ${_BOINC_APP_ECLASS} ]]; then
 #	grep "<master_url>" /var/lib/boinc/client_state.xml
 # @CODE
 
-# @ECLASS-VARIABLE: BOINC_INVITATION_CODE
+# @ECLASS_VARIABLE: BOINC_INVITATION_CODE
 # @DEFAULT_UNSET
 # @DESCRIPTION:
 # Some projects restrict account creation to those who present an
 # "invitation code". Write it to BOINC_INVITATION_CODE variable if
 # it's published on project's website.
 
-# @ECLASS-VARIABLE: HOMEPAGE
+# @ECLASS_VARIABLE: HOMEPAGE
 # @DESCRIPTION:
 # This variable defines the HOMEPAGE for BOINC projects if BOINC_MASTER_URL
 # was set before inherit.
 : ${HOMEPAGE:=${BOINC_MASTER_URL}}
 
-# @ECLASS-VARIABLE: BOINC_APP_HELPTEXT
+# @ECLASS_VARIABLE: BOINC_APP_HELPTEXT
 # @DESCRIPTION:
 # Help message to display during the pkg_postinst phase
 : ${BOINC_APP_HELPTEXT:=\


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2022-04-11  9:41 Anna Vyalkova
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Vyalkova @ 2022-04-11  9:41 UTC (permalink / raw
  To: gentoo-commits

commit:     3931b905b44d3728eebfba8097ef6030fc1beac3
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Fri Apr  8 13:21:55 2022 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Mon Apr 11 09:40:03 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=3931b905

boinc.eclass: fix inherit guard usage

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 eclass/boinc.eclass | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/eclass/boinc.eclass b/eclass/boinc.eclass
index f2c28b628..cf5cd8515 100644
--- a/eclass/boinc.eclass
+++ b/eclass/boinc.eclass
@@ -9,14 +9,12 @@
 # @DESCRIPTION:
 # This eclass provides helper functions to build BOINC applications and libraries.
 
-inherit autotools toolchain-funcs
-
 case ${EAPI} in
 	8) ;;
 	*) die "${ECLASS}: EAPI ${EAPI} unsupported."
 esac
 
-# @ECLASS-VARIABLE: BOINC_SUBMODULE
+# @ECLASS_VARIABLE: BOINC_SUBMODULE
 # @PRE_INHERIT
 # @DEFAULT_UNSET
 # @DESCRIPTION:
@@ -26,7 +24,7 @@ esac
 #
 # If unset, no functions will be exported.
 
-# @ECLASS-VARIABLE: BOINC_S
+# @ECLASS_VARIABLE: BOINC_S
 # @DEFAULT_UNSET
 # @DESCRIPTION:
 # If defined this variable determines the source directory name after
@@ -34,6 +32,12 @@ esac
 # variable supports a wildcard mechanism to help with github tarballs
 # that contain the commit hash as part of the directory name.
 
+if [[ ! ${_BOINC_ECLASS} ]]; then
+
+inherit autotools toolchain-funcs
+
+fi
+
 if [[ ${BOINC_SUBMODULE} ]]; then
 	EXPORT_FUNCTIONS src_unpack src_prepare src_configure
 fi
@@ -72,7 +76,7 @@ get_boinc_src() {
 
 }
 
-# @ECLASS-VARIABLE: BOINC_BUILD_DIR
+# @ECLASS_VARIABLE: BOINC_BUILD_DIR
 # @OUTPUT_VARIABLE
 # @DESCRIPTION:
 # Temporary build directory, where BOINC sources are located.


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2022-04-11  9:41 Anna Vyalkova
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Vyalkova @ 2022-04-11  9:41 UTC (permalink / raw
  To: gentoo-commits

commit:     6d8aacbe58de94ea8ed04e6078b5c159907f99b4
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Fri Apr  8 13:15:56 2022 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Mon Apr 11 09:40:03 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=6d8aacbe

qbs.eclass: fix inherit guard usage

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 eclass/qbs.eclass | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)

diff --git a/eclass/qbs.eclass b/eclass/qbs.eclass
index 6c3f06310..af5709e26 100644
--- a/eclass/qbs.eclass
+++ b/eclass/qbs.eclass
@@ -12,16 +12,22 @@
 # @DESCRIPTION:
 # Utility eclass providing wrapper functions for Qbs build system.
 
-if [[ ! ${_QBS_ECLASS} ]]; then
-
-case ${EAPI} in
+case ${EAPI:-0} in
 	8) ;;
-	*) die "${ECLASS}: EAPI ${EAPI} unsupported."
+	*) die "${ECLASS}: EAPI ${EAPI:-0} unsupported."
 esac
 
+if [[ ! ${_QBS_ECLASS} ]]; then
+
 inherit multiprocessing toolchain-funcs qmake-utils
 
-# @ECLASS-VARIABLE: QBS_COMMAND_ECHO_MODE
+fi
+
+EXPORT_FUNCTIONS src_configure src_compile src_install
+
+if [[ ! ${_QBS_ECLASS} ]]; then
+
+# @ECLASS_VARIABLE: QBS_COMMAND_ECHO_MODE
 # @USER_VARIABLE
 # @DESCRIPTION:
 # Determines what kind of output to show when executing commands.  Possible
@@ -38,8 +44,6 @@ inherit multiprocessing toolchain-funcs qmake-utils
 
 BDEPEND="dev-util/qbs"
 
-EXPORT_FUNCTIONS src_configure src_compile src_install
-
 # @FUNCTION: eqbs
 # @USAGE: [<qbs args>...]
 # @DESCRIPTION:


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2022-04-14  9:26 Nicola Smaniotto
  0 siblings, 0 replies; 180+ messages in thread
From: Nicola Smaniotto @ 2022-04-14  9:26 UTC (permalink / raw
  To: gentoo-commits

commit:     ce3b957642e8aff38a6c923b8a5bc79ef9f20729
Author:     Nicola Smaniotto <smaniotto.nicola <AT> gmail <DOT> com>
AuthorDate: Thu Apr 14 09:13:00 2022 +0000
Commit:     Nicola Smaniotto <smaniotto.nicola <AT> gmail <DOT> com>
CommitDate: Thu Apr 14 09:26:30 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=ce3b9576

mpv-plugin.eclass: new eclass

Signed-off-by: Nicola Smaniotto <smaniotto.nicola <AT> gmail.com>

 eclass/mpv-plugin.eclass | 128 +++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 128 insertions(+)

diff --git a/eclass/mpv-plugin.eclass b/eclass/mpv-plugin.eclass
new file mode 100644
index 000000000..01212adec
--- /dev/null
+++ b/eclass/mpv-plugin.eclass
@@ -0,0 +1,128 @@
+# Copyright 2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# @ECLASS: mpv-plugin.eclass
+# @MAINTAINER:
+# Nicola Smaniotto <smaniotto.nicola@gmail.com>
+# @AUTHOR:
+# Nicola Smaniotto <smaniotto.nicola@gmail.com>
+# @SUPPORTED_EAPIS: 8
+# @BLURB: install mpv plugins
+# @DESCRIPTION:
+# This eclass simplifies the installation of mpv plugins into system-wide
+# directories.  Also handles the mpv dependency and provides an USE flag
+# for automatic loading of the plugin.
+
+case ${EAPI:-0} in
+	8) ;;
+	*) die "${ECLASS}: EAPI ${EAPI:-0} unsupported."
+esac
+
+EXPORT_FUNCTIONS src_install pkg_postinst
+
+# @ECLASS_VARIABLE: USE_MPV
+# @DEFAULT_UNSET
+# @PRE_INHERIT
+# @DESCRIPTION:
+# Controls adding media-video/mpv dependency.  The allowed values are:
+#
+# - rdepend -- add it to RDEPEND
+#
+# - depend -- add it to DEPEND+RDEPEND with the binding slot operator (the
+# default)
+
+# @ECLASS_VARIABLE: MPV_REQ_USE
+# @DEFAULT_UNSET
+# @PRE_INHERIT
+# @DESCRIPTION:
+# The list of USE flags required to be enabled on mpv, formed as a
+# USE-dependency string.
+#
+# Example:
+# @CODE@
+# MPV_REQ_USE="lua"
+# @CODE@
+
+if [[ ! ${_MPV_PLUGIN_ECLASS} ]]; then
+
+# @FUNCTION: _mpv-plugin_set_globals
+# @INTERNAL
+# @USAGE:
+# @DESCRIPTION:
+# Sets all the global output variables provided by this eclass.
+# This function must be called once, in global scope.
+_mpv-plugin_set_globals() {
+	local MPV_PKG_DEP
+
+	SLOT="0"
+	IUSE="+autoload"
+
+	MPV_PKG_DEP="media-video/mpv"
+	case ${USE_MPV:-depend} in
+		 rdepend)
+			  ;;
+		 depend)
+			  MPV_PKG_DEP+=":="
+			  ;;
+		 *)
+			  die "Invalid USE_MPV=${USE_MPV}"
+			  ;;
+	esac
+	if [ ${MPV_REQ_USE} ]; then
+		 MPV_PKG_DEP+="[${MPV_REQ_USE}]"
+	fi
+
+	RDEPEND="${MPV_PKG_DEP}"
+	if [[ ${USE_MPV} == depend ]]; then
+		 DEPEND="${MPV_PKG_DEP}"
+	fi
+}
+_mpv-plugin_set_globals
+
+# @ECLASS_VARIABLE: MPV_PLUGIN_FILES
+# @DEFAULT_UNSET
+# @REQUIRED
+# @DESCRIPTION:
+# Array containing the list of files to be installed.
+
+# @FUNCTION: mpv-plugin_src_install
+# @USAGE:
+# @DESCRIPTION:
+# Install the specified files in ${D} and symlink them if the autoload flag is
+# set.
+# The ebuild must specify the file list in the MPV_PLUGIN_FILES array.
+mpv-plugin_src_install() {
+	if [[ ! ${MPV_PLUGIN_FILES} ]]; then
+		 die "${ECLASS}: no files specified in MPV_PLUGIN_FILES, cannot install"
+	fi
+
+	insinto /usr/$(get_libdir)/mpv
+	for f in "${MPV_PLUGIN_FILES[@]}"; do
+		 doins "${f}"
+		 use autoload && dosym -r "/usr/$(get_libdir)/mpv/${f}" "/etc/mpv/scripts/${f}"
+	done
+
+	einstalldocs
+}
+
+# @FUNCTION: mpv-plugin_pkg_postinst
+# @USAGE:
+# @DESCRIPTION:
+# Warns the user of the existence of the autoload use flag.
+mpv-plugin_pkg_postinst() {
+	if ! use autoload; then
+		 elog
+		 elog "The plugin has not been installed to /etc/mpv/scripts for autoloading."
+		 elog "You have to activate it manually by passing"
+		 for f in "${MPV_PLUGIN_FILES[@]}"; do
+			  elog "  \"${EPREFIX}/usr/$(get_libdir)/mpv/${f}\""
+		 done
+		 elog "as script option to mpv or symlinking the library to \"scripts/\" in your mpv"
+		 elog "config directory."
+		 elog "Alternatively, activate the autoload use flag."
+		 elog
+	fi
+}
+
+_MPV_PLUGIN_ECLASS=1
+fi


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2022-04-15 20:34 Alessandro Barbieri
  0 siblings, 0 replies; 180+ messages in thread
From: Alessandro Barbieri @ 2022-04-15 20:34 UTC (permalink / raw
  To: gentoo-commits

commit:     4ec6a5d7055d7197a3eb9f8b9ab95a0c9a9e1b83
Author:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
AuthorDate: Fri Apr 15 17:46:55 2022 +0000
Commit:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
CommitDate: Fri Apr 15 20:34:21 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=4ec6a5d7

R-packages.eclass: add documentation comments

Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>

 eclass/R-packages.eclass | 120 ++++++++++++++++++++++++++++++++++++++---------
 1 file changed, 97 insertions(+), 23 deletions(-)

diff --git a/eclass/R-packages.eclass b/eclass/R-packages.eclass
index 6cbf9d7d3..51765af2b 100644
--- a/eclass/R-packages.eclass
+++ b/eclass/R-packages.eclass
@@ -1,9 +1,25 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
+# @ECLASS: R-packages.eclass
+# @AUTHOR:
+# André Erdmann <dywi@mailerd.de>
+# Denis Dupeyron <calchan@gentoo.org>
+# Benda Xu <heroxbd@gentoo.org>
+# Alessandro Barbieri <lssndrbarbieri@gmail.com>
+# @BLURB: eclass to build R packages
+# @MAINTAINER:
+# Alessandro Barbieri <lssndrbarbieri@gmail.com>
+# @SUPPORTED_EAPIS: 7
+
 inherit eutils optfeature toolchain-funcs
 
-EXPORT_FUNCTIONS src_unpack src_prepare src_compile src_install pkg_postinst
+case ${EAPI} in
+	7) ;;
+	*) die "${ECLASS}: EAPI ${EAPI} unsupported."
+esac
+
+EXPORT_FUNCTIONS src_unpack src_prepare src_configure src_compile src_install pkg_postinst
 
 SRC_URI="mirror://cran/src/contrib/${PN}_${PV}.tar.gz"
 HOMEPAGE="https://cran.r-project.org/package=${PN}"
@@ -12,14 +28,24 @@ SLOT="0"
 
 DEPEND="dev-lang/R"
 RDEPEND="${DEPEND}"
+BDEPEND="sys-apps/pkgcore"
 
-dodocrm() {
+# @FUNCTION: _movelink
+# @INTERNAL
+# @USAGE: [<source> <dest>]
+# @DESCRIPTION:
+# <dest> will contain symlinks to everything in <source>
+_movelink() {
 	if [ -e "${1}" ]; then
-		dodoc -r "${1}"
-		rm -rf "${1}" || die
+		local rp1="$(realpath ${1})" || die
+		mv "${rp1}" "${2}" || die
+		cp -rsf "${2}" "${rp1}" || die
 	fi
 }
 
+# @FUNCTION: R-packages_src_unpack
+# @DESCRIPTION:
+# function to unpack R packages into the right folder
 R-packages_src_unpack() {
 	unpack ${A}
 	if [[ -d "${PN//_/.}" ]] && [[ ! -d "${P}" ]]; then
@@ -27,43 +53,91 @@ R-packages_src_unpack() {
 	fi
 }
 
+# @FUNCTION: R-packages_src_prepare
+# @DESCRIPTION:
+# function to remove unwanted files from the sources
 R-packages_src_prepare() {
 	rm -f LICENSE || die
 	default
 }
 
+# @FUNCTION: R-packages_src_configure
+# @DESCRIPTION:
+# dummy function to disable configure
+R-packages_src_configure() { :; }
+
+# @FUNCTION: R-packages_src_compile
+# @DESCRIPTION:
+# function that will pass some environment variables to R and then build/install the package
 R-packages_src_compile() {
-	MAKEFLAGS="AR=$(tc-getAR) CFLAGS=${CFLAGS// /\\ } CXXFLAGS=${CXXFLAGS// /\\ } FFLAGS=${FFLAGS// /\\ } FCFLAGS=${FCFLAGS// /\\ } LDFLAGS=${LDFLAGS// /\\ }" R CMD INSTALL . -l "${WORKDIR}" "--byte-compile" || die
+	MAKEFLAGS=" \
+		${MAKEFLAGS// /\\ } \
+		AR=$(tc-getAR) \
+		CC=$(tc-getCC) \
+		CPP=$(tc-getCPP) \
+		CXX=$(tc-getCXX) \
+		FC=$(tc-getFC) \
+		LD=$(tc-getLD) \
+		NM=$(tc-getNM) \
+		RANLIB=$(tc-getRANLIB) \
+		CFLAGS=${CFLAGS// /\\ } \
+		CPPFLAGS=${CPPFLAGS// /\\ } \
+		CXXFLAGS=${CXXFLAGS// /\\ } \
+		FFLAGS=${FFLAGS// /\\ } \
+		FCFLAGS=${FCFLAGS// /\\ } \
+		LDFLAGS=${LDFLAGS// /\\ } \
+		MAKEOPTS=${MAKEOPTS// /\\ } \
+	" \
+	R CMD INSTALL . -l "${WORKDIR}" "--byte-compile" || die
 }
 
+
+# @FUNCTION: R-packages_src_install
+# @DESCRIPTION:
+# function to move the files in the right folders
+# documentation and examples to docsdir, symlinked back to R site-library (to allow access from within R)
+# everything else to R site-library
 R-packages_src_install() {
-	cd "${WORKDIR}/${PN//_/.}" || die
+	pushd "${WORKDIR}/${PN//_/.}" || die
 
-	dodocrm examples || die
-	#dodocrm DESCRIPTION || die #keep this
-	dodocrm NEWS.md || die
-	dodocrm README.md || die
-	dodocrm html || die
+	local DOCS_DIR="${ED}/usr/share/doc/${PF}"
 
+	mkdir -p "${DOCS_DIR}" || die
+
+	for i in NEWS.md README.md DESCRIPTION examples ; do
+		_movelink "${i}" "${DOCS_DIR}/${i}" || die
+	done
+
+	if [ -e html ]; then
+		_movelink html "${DOCS_DIR}/html" || die
+		docompress -x "${DOCS_DIR}/html"
+	fi
 	if [ -e doc ]; then
-		if [ -e doc/html ]; then
-			docinto "${DOCSDIR}/html"
-			dodoc -r doc/*.html
-			rm -r doc/*.html || die
-			docompress -x "${DOCSDIR}/html"
-		fi
-
-		docinto "${DOCSDIR}"
-		dodoc -r doc/.
-		rm -r doc || die
+		pushd doc || die
+		for i in * ; do
+			_movelink "${i}" "${DOCS_DIR}/${i}" || die
+		done
+		popd || die
+	fi
+	if [ -e doc/html ]; then
+		docompress -x "${DOCS_DIR}/html"
 	fi
+	docompress -x "${DOCS_DIR}"
 
 	insinto "/usr/$(get_libdir)/R/site-library"
 	doins -r "${WORKDIR}/${PN//_/.}"
 }
 
+# @FUNCTION: R-packages_pkg_postinst
+# @DESCRIPTION:
+# function that will prompt to install the suggested packages if they exist
 R-packages_pkg_postinst() {
 	if [ -v SUGGESTED_PACKAGES ]; then
-		optfeature "having the upstream suggested packages" "${SUGGESTED_PACKAGES}"
+		for p in ${SUGGESTED_PACKAGES} ; do
+			pexist=$(pquery -n1 "${p}" 2>/dev/null) || die
+			if [ -n "${pexist}" ]; then
+				optfeature "having the upstream suggested package" "${p}"
+			fi
+		done
 	fi
 }


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2022-04-15 20:34 Alessandro Barbieri
  0 siblings, 0 replies; 180+ messages in thread
From: Alessandro Barbieri @ 2022-04-15 20:34 UTC (permalink / raw
  To: gentoo-commits

commit:     b2710c1d1c0ff01dbe02764a127291b55331b455
Author:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
AuthorDate: Fri Apr 15 17:47:32 2022 +0000
Commit:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
CommitDate: Fri Apr 15 20:34:21 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=b2710c1d

octaveforge.eclass: add documentation comments

Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>

 eclass/octaveforge.eclass | 86 ++++++++++++++++++++++++++++++++++++-----------
 1 file changed, 67 insertions(+), 19 deletions(-)

diff --git a/eclass/octaveforge.eclass b/eclass/octaveforge.eclass
index 8a7fe0396..b9303884c 100644
--- a/eclass/octaveforge.eclass
+++ b/eclass/octaveforge.eclass
@@ -1,43 +1,72 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-#
-# Original Author: Rafael G. Martins <rafael@rafaelmartins.eng.br>
-# Purpose: octaveforge helper eclass.
-#
+# @ECLASS: octaveforge.eclass
+# @AUTHOR:
+# Rafael G. Martins <rafael@rafaelmartins.eng.br>
+# Alessandro Barbieri <lssndrbarbieri@gmail.com>
+# @BLURB: octaveforge helper eclass.
+# @MAINTAINER:
+# Alessandro Barbieri <lssndrbarbieri@gmail.com>
+# @SUPPORTED_EAPIS: 8
+
+inherit autotools
+
+case ${EAPI} in
+	8) ;;
+	*) die "${ECLASS}: EAPI ${EAPI} unsupported."
+esac
+
+EXPORT_FUNCTIONS src_unpack src_prepare src_install pkg_postinst pkg_prerm pkg_postrm
 
 # @ECLASS-VARIABLE: OCTAVEFORGE_CAT
 # @DESCRIPTION:
 # the octave-forge category of the package.
 OCTAVEFORGE_CAT="${OCTAVEFORGE_CAT:-main}"
 
+# @ECLASS-VARIABLE: REPO_URI
+# @DESCRIPTION:
+# URI to the sourceforge octave-forge repository
 REPO_URI="http://svn.code.sf.net/p/octave/code/trunk/octave-forge"
 
-inherit autotools
-SRC_URI="mirror://sourceforge/octave/${P}.tar.gz"
+# defining some paths
+
+# @ECLASS-VARIABLE: OCT_ROOT
+# @DESCRIPTION:
+# full path to octave share
+OCT_ROOT="/usr/share/octave"
+
+# @ECLASS-VARIABLE: OCT_PKGDIR
+# @DESCRIPTION:
+# path to octave pkgdir
+OCT_PKGDIR="${OCT_ROOT}/packages"
+
+# @ECLASS-VARIABLE: OCT_BIN
+# @DESCRIPTION:
+# full path to octave binary
+OCT_BIN="$(type -p octave)"
 
 SRC_URI="
-	${SRC_URI}
+	mirror://sourceforge/octave/${P}.tar.gz
 	${REPO_URI}/packages/package_Makefile.in -> octaveforge_Makefile
 	${REPO_URI}/packages/package_configure.in -> octaveforge_configure
 "
 SLOT="0"
 
-# defining some paths
-OCT_ROOT="/usr/share/octave"
-OCT_PKGDIR="${OCT_ROOT}/packages"
-OCT_BIN="$(type -p octave)"
-
-EXPORT_FUNCTIONS src_unpack src_prepare src_install pkg_postinst pkg_prerm pkg_postrm
-
+# @FUNCTION: octaveforge_src_unpack
+# @DESCRIPTION:
+# function to unpack and set the correct S
 octaveforge_src_unpack() {
 	default
 	if [ ! -d "${WORKDIR}/${P}" ]; then
 		S="${WORKDIR}/${PN}"
-		cd "${S}" || die
+		pushd "${S}" || die
 	fi
 }
 
+# @FUNCTION: octaveforge_src_prepare
+# @DESCRIPTION:
+# function to add octaveforge specific makefile and configure and run autogen.sh if available
 octaveforge_src_prepare() {
 	for filename in Makefile configure; do
 		cp "${DISTDIR}/octaveforge_${filename}" "${S}/${filename}" || die
@@ -48,7 +77,9 @@ octaveforge_src_prepare() {
 
 	chmod 0755 "${S}/configure" || die
 	if [ -e "${S}/src/autogen.sh" ]; then
-		cd "${S}/src" && ./autogen.sh || die 'failed to run autogen.sh'
+		pushd "${S}/src" || die
+		 ./autogen.sh || die 'failed to run autogen.sh'
+		popd || die
 	fi
 	if [ -e "${S}/src/Makefile" ]; then
 		sed -i 's/ -s / /g' "${S}/src/Makefile" || die 'sed failed.'
@@ -56,6 +87,10 @@ octaveforge_src_prepare() {
 	eapply_user
 }
 
+# @FUNCTION: octaveforge_src_install
+# @DESCRIPTION:
+# function to install the octave package
+# documentation to docsdir
 octaveforge_src_install() {
 	emake DESTDIR="${D}" DISTPKG='Gentoo' install
 	if [ -d doc/ ]; then
@@ -63,12 +98,20 @@ octaveforge_src_install() {
 	fi
 }
 
+# @FUNCTION: octaveforge_pkg_postinst
+# @DESCRIPTION:
+# function that will rebuild the octave package database
 octaveforge_pkg_postinst() {
 	einfo "Registering ${CATEGORY}/${PF} on the Octave package database."
-	[ -d "${OCT_PKGDIR}" ] || mkdir -p "${OCT_PKGDIR}" || die
+	if [ ! -d "${OCT_PKGDIR}" ] ; then
+		mkdir -p "${OCT_PKGDIR}" || die
+	fi
 	"${OCT_BIN}" -H -q --no-site-file --eval "pkg('rebuild');" &> /dev/null || die 'failed to register the package.'
 }
 
+# @FUNCTION: octaveforge_pkg_prerm
+# @DESCRIPTION:
+# function that will run on_uninstall routines to prepare the package to remove
 octaveforge_pkg_prerm() {
 	einfo 'Running on_uninstall routines to prepare the package to remove.'
 	local pkgdir=$(
@@ -89,8 +132,13 @@ octaveforge_pkg_prerm() {
 	fi
 }
 
+# @FUNCTION: octaveforge_pkg_postrm
+# @DESCRIPTION:
+# function that will rebuild the octave package database
 octaveforge_pkg_postrm() {
 	einfo 'Rebuilding the Octave package database.'
-	[ -d "${OCT_PKGDIR}" ] || mkdir -p "${OCT_PKGDIR}" || die
+	if [ ! -d "${OCT_PKGDIR}" ] ; then
+		mkdir -p "${OCT_PKGDIR}" || die
+	fi
 	"${OCT_BIN}" -H --silent --eval 'pkg rebuild' &> /dev/null || die 'failed to rebuild the package database'
 }


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2022-04-16 16:20 Alessandro Barbieri
  0 siblings, 0 replies; 180+ messages in thread
From: Alessandro Barbieri @ 2022-04-16 16:20 UTC (permalink / raw
  To: gentoo-commits

commit:     47cf61d5137d8b159c3a2c43653c4f7af1797f27
Author:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
AuthorDate: Sat Apr 16 15:52:30 2022 +0000
Commit:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
CommitDate: Sat Apr 16 16:20:07 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=47cf61d5

R-packages.eclass: do not compress docs, build in T

Closes: https://bugs.gentoo.org/838832
Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>

 eclass/R-packages.eclass | 21 ++++++++++++---------
 1 file changed, 12 insertions(+), 9 deletions(-)

diff --git a/eclass/R-packages.eclass b/eclass/R-packages.eclass
index 51765af2b..0399d4f19 100644
--- a/eclass/R-packages.eclass
+++ b/eclass/R-packages.eclass
@@ -59,6 +59,7 @@ R-packages_src_unpack() {
 R-packages_src_prepare() {
 	rm -f LICENSE || die
 	default
+	mkdir -p "${T}/R" || die
 }
 
 # @FUNCTION: R-packages_src_configure
@@ -88,7 +89,7 @@ R-packages_src_compile() {
 		LDFLAGS=${LDFLAGS// /\\ } \
 		MAKEOPTS=${MAKEOPTS// /\\ } \
 	" \
-	R CMD INSTALL . -l "${WORKDIR}" "--byte-compile" || die
+	R CMD INSTALL . -d -l "${T}/R" "--byte-compile" || die
 }
 
 
@@ -98,24 +99,26 @@ R-packages_src_compile() {
 # documentation and examples to docsdir, symlinked back to R site-library (to allow access from within R)
 # everything else to R site-library
 R-packages_src_install() {
-	pushd "${WORKDIR}/${PN//_/.}" || die
+	pushd "${T}/R/${PN//_/.}" || die
 
-	local DOCS_DIR="${ED}/usr/share/doc/${PF}"
+	local DOCS_DIR="/usr/share/doc/${PF}"
 
-	mkdir -p "${DOCS_DIR}" || die
+	mkdir -p "${ED}/${DOCS_DIR}" || die
 
-	for i in NEWS.md README.md DESCRIPTION examples ; do
-		_movelink "${i}" "${DOCS_DIR}/${i}" || die
+	for i in NEWS.md README.md DESCRIPTION examples CITATION INDEX NEWS WORDLIST News.Rd ; do
+		_movelink "${i}" "${ED}${DOCS_DIR}/${i}" || die
+		docompress -x "${DOCS_DIR}/${i}"
 	done
 
 	if [ -e html ]; then
-		_movelink html "${DOCS_DIR}/html" || die
+		_movelink html "${ED}${DOCS_DIR}/html" || die
 		docompress -x "${DOCS_DIR}/html"
 	fi
 	if [ -e doc ]; then
 		pushd doc || die
 		for i in * ; do
-			_movelink "${i}" "${DOCS_DIR}/${i}" || die
+			_movelink "${i}" "${ED}${DOCS_DIR}/${i}" || die
+			docompress -x "${DOCS_DIR}/${i}"
 		done
 		popd || die
 	fi
@@ -125,7 +128,7 @@ R-packages_src_install() {
 	docompress -x "${DOCS_DIR}"
 
 	insinto "/usr/$(get_libdir)/R/site-library"
-	doins -r "${WORKDIR}/${PN//_/.}"
+	doins -r "${T}/R/${PN//_/.}"
 }
 
 # @FUNCTION: R-packages_pkg_postinst


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2022-04-19 18:31 Alessandro Barbieri
  0 siblings, 0 replies; 180+ messages in thread
From: Alessandro Barbieri @ 2022-04-19 18:31 UTC (permalink / raw
  To: gentoo-commits

commit:     24e92498a71ccdd1130f1082b473b75b8ba89ab3
Author:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
AuthorDate: Tue Apr 19 13:46:38 2022 +0000
Commit:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
CommitDate: Tue Apr 19 18:31:28 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=24e92498

R-packages.eclass: also remove tests

Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>

 eclass/R-packages.eclass | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/eclass/R-packages.eclass b/eclass/R-packages.eclass
index 0399d4f19..1412ba802 100644
--- a/eclass/R-packages.eclass
+++ b/eclass/R-packages.eclass
@@ -127,6 +127,8 @@ R-packages_src_install() {
 	fi
 	docompress -x "${DOCS_DIR}"
 
+	rm -rf tests test || die
+
 	insinto "/usr/$(get_libdir)/R/site-library"
 	doins -r "${T}/R/${PN//_/.}"
 }


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2022-04-24 16:46 Nicola Smaniotto
  0 siblings, 0 replies; 180+ messages in thread
From: Nicola Smaniotto @ 2022-04-24 16:46 UTC (permalink / raw
  To: gentoo-commits

commit:     2e47c02ef7a5d60b4dc5a42bd0ca80b21bb8b88d
Author:     Nicola Smaniotto <smaniotto.nicola <AT> gmail <DOT> com>
AuthorDate: Sun Apr 24 16:43:02 2022 +0000
Commit:     Nicola Smaniotto <smaniotto.nicola <AT> gmail <DOT> com>
CommitDate: Sun Apr 24 16:46:46 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=2e47c02e

mpv-plugin.eclass: handle multi-file scripts

The eclass behaves differently if a "main" file is present, since mpv
should only execute that one.

Also fix indentation to use tabs only.

Signed-off-by: Nicola Smaniotto <smaniotto.nicola <AT> gmail.com>

 eclass/mpv-plugin.eclass | 74 ++++++++++++++++++++++++++++++++----------------
 1 file changed, 50 insertions(+), 24 deletions(-)

diff --git a/eclass/mpv-plugin.eclass b/eclass/mpv-plugin.eclass
index 01212adec..5c077e6d1 100644
--- a/eclass/mpv-plugin.eclass
+++ b/eclass/mpv-plugin.eclass
@@ -59,22 +59,22 @@ _mpv-plugin_set_globals() {
 
 	MPV_PKG_DEP="media-video/mpv"
 	case ${USE_MPV:-depend} in
-		 rdepend)
-			  ;;
-		 depend)
-			  MPV_PKG_DEP+=":="
-			  ;;
-		 *)
-			  die "Invalid USE_MPV=${USE_MPV}"
-			  ;;
+		rdepend)
+			;;
+		depend)
+			MPV_PKG_DEP+=":="
+			;;
+		*)
+			die "Invalid USE_MPV=${USE_MPV}"
+			;;
 	esac
 	if [ ${MPV_REQ_USE} ]; then
-		 MPV_PKG_DEP+="[${MPV_REQ_USE}]"
+		MPV_PKG_DEP+="[${MPV_REQ_USE}]"
 	fi
 
 	RDEPEND="${MPV_PKG_DEP}"
 	if [[ ${USE_MPV} == depend ]]; then
-		 DEPEND="${MPV_PKG_DEP}"
+		DEPEND="${MPV_PKG_DEP}"
 	fi
 }
 _mpv-plugin_set_globals
@@ -85,6 +85,16 @@ _mpv-plugin_set_globals
 # @DESCRIPTION:
 # Array containing the list of files to be installed.
 
+# @FUNCTION: _mpv-plugin_has_main
+# @INTERNAL
+# @USAGE:
+# @DESCRIPTION:
+# Checks for the existance of a file named main. This means the plugin needs
+# all files to be installed together, and mpv will only run the one called main.
+_mpv-plugin_has_main() {
+	[[ " ${MPV_PLUGIN_FILES[*]} " =~ " main."[[:alnum:]]+" " ]]
+}
+
 # @FUNCTION: mpv-plugin_src_install
 # @USAGE:
 # @DESCRIPTION:
@@ -93,15 +103,27 @@ _mpv-plugin_set_globals
 # The ebuild must specify the file list in the MPV_PLUGIN_FILES array.
 mpv-plugin_src_install() {
 	if [[ ! ${MPV_PLUGIN_FILES} ]]; then
-		 die "${ECLASS}: no files specified in MPV_PLUGIN_FILES, cannot install"
+		die "${ECLASS}: no files specified in MPV_PLUGIN_FILES, cannot install"
 	fi
 
-	insinto /usr/$(get_libdir)/mpv
+	local MPV_INSTALL_DIR="/usr/$(get_libdir)/mpv"
+	if _mpv-plugin_has_main; then
+		MPV_INSTALL_DIR+="/${PN}"
+	fi
+	insinto "${MPV_INSTALL_DIR}"
+
 	for f in "${MPV_PLUGIN_FILES[@]}"; do
-		 doins "${f}"
-		 use autoload && dosym -r "/usr/$(get_libdir)/mpv/${f}" "/etc/mpv/scripts/${f}"
+		doins "${f}"
 	done
 
+	use autoload && if _mpv-plugin_has_main; then
+		dosym -r "${MPV_INSTALL_DIR}" "/etc/mpv/scripts/${PN}"
+	else
+		for f in "${MPV_PLUGIN_FILES[@]}"; do
+			dosym -r "${MPV_INSTALL_DIR}/${f}" "/etc/mpv/scripts/${f}"
+		done
+	fi
+
 	einstalldocs
 }
 
@@ -111,16 +133,20 @@ mpv-plugin_src_install() {
 # Warns the user of the existence of the autoload use flag.
 mpv-plugin_pkg_postinst() {
 	if ! use autoload; then
-		 elog
-		 elog "The plugin has not been installed to /etc/mpv/scripts for autoloading."
-		 elog "You have to activate it manually by passing"
-		 for f in "${MPV_PLUGIN_FILES[@]}"; do
-			  elog "  \"${EPREFIX}/usr/$(get_libdir)/mpv/${f}\""
-		 done
-		 elog "as script option to mpv or symlinking the library to \"scripts/\" in your mpv"
-		 elog "config directory."
-		 elog "Alternatively, activate the autoload use flag."
-		 elog
+		elog
+		elog "The plugin has not been installed to /etc/mpv/scripts for autoloading."
+		elog "You have to activate it manually by passing"
+		if _mpv-plugin_has_main; then
+			elog "  \"${EPREFIX}/usr/$(get_libdir)/mpv/${PN}\""
+		else
+			for f in "${MPV_PLUGIN_FILES[@]}"; do
+				elog "  \"${EPREFIX}/usr/$(get_libdir)/mpv/${f}\""
+			done
+		fi
+		elog "as script option to mpv or symlinking the library to \"scripts/\" in your mpv"
+		elog "config directory."
+		elog "Alternatively, activate the autoload use flag."
+		elog
 	fi
 }
 


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2022-05-05  7:32 Alessandro Barbieri
  0 siblings, 0 replies; 180+ messages in thread
From: Alessandro Barbieri @ 2022-05-05  7:32 UTC (permalink / raw
  To: gentoo-commits

commit:     14617d41adcaac22702439046b5dad6a5979ac94
Author:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
AuthorDate: Thu May  5 07:24:49 2022 +0000
Commit:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
CommitDate: Thu May  5 07:32:17 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=14617d41

octaveforge.eclass: move octaveforge makefile logic into the eclass

Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>

 eclass/octaveforge.eclass | 128 +++++++++++++++++++++++++++++++++++-----------
 1 file changed, 99 insertions(+), 29 deletions(-)

diff --git a/eclass/octaveforge.eclass b/eclass/octaveforge.eclass
index 590f21a1c..7f5f38dee 100644
--- a/eclass/octaveforge.eclass
+++ b/eclass/octaveforge.eclass
@@ -17,12 +17,7 @@ case ${EAPI} in
 	*) die "${ECLASS}: EAPI ${EAPI} unsupported."
 esac
 
-EXPORT_FUNCTIONS src_unpack src_prepare src_install pkg_postinst pkg_prerm pkg_postrm
-
-# @ECLASS-VARIABLE: OCTAVEFORGE_CAT
-# @DESCRIPTION:
-# the octave-forge category of the package.
-OCTAVEFORGE_CAT="${OCTAVEFORGE_CAT:-main}"
+EXPORT_FUNCTIONS src_unpack src_prepare src_compile src_install pkg_postinst pkg_prerm pkg_postrm
 
 # @ECLASS-VARIABLE: REPO_URI
 # @DESCRIPTION:
@@ -48,7 +43,6 @@ OCT_BIN="$(type -p octave)"
 
 SRC_URI="
 	mirror://sourceforge/octave/${P}.tar.gz
-	${REPO_URI}/packages/package_Makefile.in -> octaveforge_Makefile
 	${REPO_URI}/packages/package_configure.in -> octaveforge_configure
 "
 SLOT="0"
@@ -68,12 +62,7 @@ octaveforge_src_unpack() {
 # @DESCRIPTION:
 # function to add octaveforge specific makefile and configure and run autogen.sh if available
 octaveforge_src_prepare() {
-	for filename in Makefile configure; do
-		cp "${DISTDIR}/octaveforge_${filename}" "${S}/${filename}" || die
-	done
-
-	#octave_config_info is deprecated in octave5
-	sed -i 's|octave_config_info|__octave_config_info__|g' Makefile || die
+	cp "${DISTDIR}/octaveforge_configure" "${S}/configure" || die
 
 	chmod 0755 "${S}/configure" || die
 	if [[ -e "${S}/src/autogen.sh" ]]; then
@@ -87,12 +76,87 @@ octaveforge_src_prepare() {
 	eapply_user
 }
 
+octaveforge_src_compile() {
+	PKGDIR="$(pwd | sed -e 's|^.*/||' || die)"
+	export OCT_PACKAGE="${TMPDIR}/${PKGDIR}.tar.gz"
+	export OCT_PKG=$(echo "${PKGDIR}" | sed -e 's|^\(.*\)-.*|\1|' || die)
+	export MKOCTFILE="mkoctfile -v"
+
+	cmd="disp(__octave_config_info__('octlibdir'));"
+	OCTLIBDIR=$(octavecommand "${cmd}" || die)
+	export LFLAGS="-L${OCTLIBDIR}"
+
+	if [[ -e src/Makefile ]]; then
+		emake -C src all
+	fi
+
+	if [[ -e src/Makefile ]]; then
+		mv src/Makefile src/Makefile.disable || die
+	fi
+	if [[ -e src/configure ]]; then
+		mv src/configure src/configure.disable || die
+	fi
+
+	pushd .. || die
+	tar -czf "${OCT_PACKAGE}" "${PKGDIR}" || die
+}
+
 # @FUNCTION: octaveforge_src_install
 # @DESCRIPTION:
 # function to install the octave package
 # documentation to docsdir
 octaveforge_src_install() {
-	emake DESTDIR="${D}" DISTPKG='Gentoo' install
+	TMPDIR="${T}"
+	DESTDIR="${D}"
+	DISTPKG='Gentoo'
+
+	pushd ../ || die
+	if [[ "X${DISTPKG}X" != "XX" ]]; then
+		stripcmd="
+			unlink(pkg('local_list'));
+			unlink(pkg('global_list'));
+		"
+	fi
+	if [[ "X${DESTDIR}X" = "XX" ]]; then
+		cmd="
+			warning('off','all');
+			pkg('install','${OCT_PACKAGE}');l=pkg('list');
+			disp(l{cellfun(@(x)strcmp(x.name,'${OCT_PKG}'),l)}.dir);
+		"
+		oct_pkgdir=$(octavecommand "${cmd}${stripcmd}" || die)
+	else
+		cmd="disp(fullfile(OCTAVE_HOME(),'share','octave'));"
+		shareprefix=${DESTDIR}/$(octavecommand "${cmd}" || die)
+		cmd="disp(fullfile(__octave_config_info__('libexecdir'),'octave'));"
+		libexecprefix=${DESTDIR}/$(octavecommand "${cmd}" || die)
+		octprefix="${shareprefix}/packages" || die
+		archprefix="${libexecprefix}/packages" || die
+		if [[ ! -e "${octprefix}" ]]; then
+			mkdir -p "${octprefix}" || die
+		fi
+		if [[ ! -e "${archprefix}" ]]; then
+			mkdir -p "${archprefix}" || die
+		fi
+		cmd="
+			warning('off','all');
+			pkg('prefix','${octprefix}','${archprefix}');
+			pkg('global_list',fullfile('${shareprefix}','octave_packages'));
+			pkg('local_list',fullfile('${shareprefix}','octave_packages'));
+			pkg('install','-nodeps','-verbose','${OCT_PACKAGE}');
+		"
+		octavecommand "${cmd}" || die
+		cmd="
+			warning('off','all');
+			pkg('prefix','${octprefix}','${archprefix}');
+			pkg('global_list',fullfile('${shareprefix}','octave_packages'));
+			pkg('local_list',fullfile('${shareprefix}','octave_packages'));
+			l=pkg('list');
+			disp(l{cellfun(@(x)strcmp(x.name,'${OCT_PKG}'),l)}.dir);
+		"
+		oct_pkgdir=$(octavecommand "${cmd}${stripcmd}" || die)
+	fi
+	export oct_pkgdir
+
 	if [[ -d doc/ ]]; then
 		dodoc -r doc/*
 	fi
@@ -106,7 +170,8 @@ octaveforge_pkg_postinst() {
 	if [[ ! -d "${OCT_PKGDIR}" ]] ; then
 		mkdir -p "${OCT_PKGDIR}" || die
 	fi
-	"${OCT_BIN}" -H -q --no-site-file --eval "pkg('rebuild');" &> /dev/null || die 'failed to register the package.'
+	cmd="pkg('rebuild');"
+	octavecommand "${cmd}" || die 'failed to register the package.'
 }
 
 # @FUNCTION: octaveforge_pkg_prerm
@@ -114,21 +179,21 @@ octaveforge_pkg_postinst() {
 # function that will run on_uninstall routines to prepare the package to remove
 octaveforge_pkg_prerm() {
 	einfo 'Running on_uninstall routines to prepare the package to remove.'
-	local pkgdir=$(
-		"${OCT_BIN}" -H -q --no-site-file --eval "
-			pkg('rebuild');
-			l = pkg('list');
-			disp(l{cellfun(@(x)strcmp(x.name,'${PN}'),l)}.dir);
-		"
-	)
-	rm -f "${pkgdir}/packinfo/on_uninstall.m" || die
-	if [[ -e "${pkgdir}/packinfo/on_uninstall.m.orig" ]]; then
-		mv "$pkgdir"/packinfo/on_uninstall.m{.orig,} || die
-		cd "$pkgdir/packinfo" || die
-		"${OCT_BIN}" -H -q --no-site-file --eval "
+	cmd="
+		pkg('rebuild');
+		l = pkg('list');
+		disp(l{cellfun(@(x)strcmp(x.name,'${PN}'),l)}.dir);
+	"
+	oct_pkgdir=$(octavecommand "${cmd}" || die)
+	rm -f "${oct_pkgdir}/packinfo/on_uninstall.m" || die
+	if [[ -e "${oct_pkgdir}/packinfo/on_uninstall.m.orig" ]]; then
+		mv "$oct_pkgdir"/packinfo/on_uninstall.m{.orig,} || die
+		pushd "$oct_pkgdir/packinfo" || die
+		cmd="
 			l = pkg('list');
 			on_uninstall(l{cellfun(@(x)strcmp(x.name,'${PN}'), l)});
-		" &> /dev/null || die 'failed to remove the package'
+		"
+		octavecommand "${cmd}" || die 'failed to remove the package'
 	fi
 }
 
@@ -140,5 +205,10 @@ octaveforge_pkg_postrm() {
 	if [[ ! -d "${OCT_PKGDIR}" ]] ; then
 		mkdir -p "${OCT_PKGDIR}" || die
 	fi
-	"${OCT_BIN}" -H --silent --eval 'pkg rebuild' &> /dev/null || die 'failed to rebuild the package database'
+	cmd="pkg('rebuild');"
+	"${OCT_BIN}" -H --silent "${cmd}" || die 'failed to rebuild the package database'
+}
+
+octavecommand() {
+	"${OCT_BIN}" -H -q --no-site-file --eval "$1"
 }


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2022-05-05  7:32 Alessandro Barbieri
  0 siblings, 0 replies; 180+ messages in thread
From: Alessandro Barbieri @ 2022-05-05  7:32 UTC (permalink / raw
  To: gentoo-commits

commit:     450bc33de335b67a9ea402faa2395d2e5b10a4a1
Author:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
AuthorDate: Wed May  4 20:11:42 2022 +0000
Commit:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
CommitDate: Thu May  5 07:32:17 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=450bc33d

R-packages.eclass: use bash style tests

Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>

 eclass/R-packages.eclass | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/eclass/R-packages.eclass b/eclass/R-packages.eclass
index 1412ba802..0be59a20c 100644
--- a/eclass/R-packages.eclass
+++ b/eclass/R-packages.eclass
@@ -36,7 +36,7 @@ BDEPEND="sys-apps/pkgcore"
 # @DESCRIPTION:
 # <dest> will contain symlinks to everything in <source>
 _movelink() {
-	if [ -e "${1}" ]; then
+	if [[ -e "${1}" ]]; then
 		local rp1="$(realpath ${1})" || die
 		mv "${rp1}" "${2}" || die
 		cp -rsf "${2}" "${rp1}" || die
@@ -110,11 +110,11 @@ R-packages_src_install() {
 		docompress -x "${DOCS_DIR}/${i}"
 	done
 
-	if [ -e html ]; then
+	if [[ -e html ]]; then
 		_movelink html "${ED}${DOCS_DIR}/html" || die
 		docompress -x "${DOCS_DIR}/html"
 	fi
-	if [ -e doc ]; then
+	if [[ -e doc ]]; then
 		pushd doc || die
 		for i in * ; do
 			_movelink "${i}" "${ED}${DOCS_DIR}/${i}" || die
@@ -122,7 +122,7 @@ R-packages_src_install() {
 		done
 		popd || die
 	fi
-	if [ -e doc/html ]; then
+	if [[ -e doc/html ]]; then
 		docompress -x "${DOCS_DIR}/html"
 	fi
 	docompress -x "${DOCS_DIR}"
@@ -137,10 +137,10 @@ R-packages_src_install() {
 # @DESCRIPTION:
 # function that will prompt to install the suggested packages if they exist
 R-packages_pkg_postinst() {
-	if [ -v SUGGESTED_PACKAGES ]; then
+	if [[ -v SUGGESTED_PACKAGES ]]; then
 		for p in ${SUGGESTED_PACKAGES} ; do
 			pexist=$(pquery -n1 "${p}" 2>/dev/null) || die
-			if [ -n "${pexist}" ]; then
+			if [[ -n "${pexist}" ]]; then
 				optfeature "having the upstream suggested package" "${p}"
 			fi
 		done


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2022-05-05  7:32 Alessandro Barbieri
  0 siblings, 0 replies; 180+ messages in thread
From: Alessandro Barbieri @ 2022-05-05  7:32 UTC (permalink / raw
  To: gentoo-commits

commit:     f16593b366ff0061d602f4dc792a2e2a26006733
Author:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
AuthorDate: Wed May  4 20:12:03 2022 +0000
Commit:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
CommitDate: Thu May  5 07:32:17 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=f16593b3

octaveforge.eclass: use bash style tests

Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>

 eclass/octaveforge.eclass | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/eclass/octaveforge.eclass b/eclass/octaveforge.eclass
index b9303884c..590f21a1c 100644
--- a/eclass/octaveforge.eclass
+++ b/eclass/octaveforge.eclass
@@ -58,7 +58,7 @@ SLOT="0"
 # function to unpack and set the correct S
 octaveforge_src_unpack() {
 	default
-	if [ ! -d "${WORKDIR}/${P}" ]; then
+	if [[ ! -d "${WORKDIR}/${P}" ]]; then
 		S="${WORKDIR}/${PN}"
 		pushd "${S}" || die
 	fi
@@ -76,12 +76,12 @@ octaveforge_src_prepare() {
 	sed -i 's|octave_config_info|__octave_config_info__|g' Makefile || die
 
 	chmod 0755 "${S}/configure" || die
-	if [ -e "${S}/src/autogen.sh" ]; then
+	if [[ -e "${S}/src/autogen.sh" ]]; then
 		pushd "${S}/src" || die
 		 ./autogen.sh || die 'failed to run autogen.sh'
 		popd || die
 	fi
-	if [ -e "${S}/src/Makefile" ]; then
+	if [[ -e "${S}/src/Makefile" ]]; then
 		sed -i 's/ -s / /g' "${S}/src/Makefile" || die 'sed failed.'
 	fi
 	eapply_user
@@ -93,7 +93,7 @@ octaveforge_src_prepare() {
 # documentation to docsdir
 octaveforge_src_install() {
 	emake DESTDIR="${D}" DISTPKG='Gentoo' install
-	if [ -d doc/ ]; then
+	if [[ -d doc/ ]]; then
 		dodoc -r doc/*
 	fi
 }
@@ -103,7 +103,7 @@ octaveforge_src_install() {
 # function that will rebuild the octave package database
 octaveforge_pkg_postinst() {
 	einfo "Registering ${CATEGORY}/${PF} on the Octave package database."
-	if [ ! -d "${OCT_PKGDIR}" ] ; then
+	if [[ ! -d "${OCT_PKGDIR}" ]] ; then
 		mkdir -p "${OCT_PKGDIR}" || die
 	fi
 	"${OCT_BIN}" -H -q --no-site-file --eval "pkg('rebuild');" &> /dev/null || die 'failed to register the package.'
@@ -122,7 +122,7 @@ octaveforge_pkg_prerm() {
 		"
 	)
 	rm -f "${pkgdir}/packinfo/on_uninstall.m" || die
-	if [ -e "${pkgdir}/packinfo/on_uninstall.m.orig" ]; then
+	if [[ -e "${pkgdir}/packinfo/on_uninstall.m.orig" ]]; then
 		mv "$pkgdir"/packinfo/on_uninstall.m{.orig,} || die
 		cd "$pkgdir/packinfo" || die
 		"${OCT_BIN}" -H -q --no-site-file --eval "
@@ -137,7 +137,7 @@ octaveforge_pkg_prerm() {
 # function that will rebuild the octave package database
 octaveforge_pkg_postrm() {
 	einfo 'Rebuilding the Octave package database.'
-	if [ ! -d "${OCT_PKGDIR}" ] ; then
+	if [[ ! -d "${OCT_PKGDIR}" ]] ; then
 		mkdir -p "${OCT_PKGDIR}" || die
 	fi
 	"${OCT_BIN}" -H --silent --eval 'pkg rebuild' &> /dev/null || die 'failed to rebuild the package database'


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2022-05-06 16:34 Alessandro Barbieri
  0 siblings, 0 replies; 180+ messages in thread
From: Alessandro Barbieri @ 2022-05-06 16:34 UTC (permalink / raw
  To: gentoo-commits

commit:     c54bb93fd56acecbee47e0126019df980000a983
Author:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
AuthorDate: Fri May  6 16:25:31 2022 +0000
Commit:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
CommitDate: Fri May  6 16:25:31 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=c54bb93f

octaveforge.eclass: install arch dependent files in libdir

Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>

 eclass/octaveforge.eclass | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/eclass/octaveforge.eclass b/eclass/octaveforge.eclass
index 7f5f38dee..022d89b33 100644
--- a/eclass/octaveforge.eclass
+++ b/eclass/octaveforge.eclass
@@ -125,12 +125,12 @@ octaveforge_src_install() {
 		"
 		oct_pkgdir=$(octavecommand "${cmd}${stripcmd}" || die)
 	else
-		cmd="disp(fullfile(OCTAVE_HOME(),'share','octave'));"
+		cmd="disp(fullfile(__octave_config_info__('sharedir'),'octave'));"
 		shareprefix=${DESTDIR}/$(octavecommand "${cmd}" || die)
-		cmd="disp(fullfile(__octave_config_info__('libexecdir'),'octave'));"
-		libexecprefix=${DESTDIR}/$(octavecommand "${cmd}" || die)
+		cmd="disp(fullfile(__octave_config_info__('libdir'),'octave'));"
+		libprefix=${DESTDIR}/$(octavecommand "${cmd}" || die)
 		octprefix="${shareprefix}/packages" || die
-		archprefix="${libexecprefix}/packages" || die
+		archprefix="${libprefix}/packages" || die
 		if [[ ! -e "${octprefix}" ]]; then
 			mkdir -p "${octprefix}" || die
 		fi


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2022-05-07  0:48 Alessandro Barbieri
  0 siblings, 0 replies; 180+ messages in thread
From: Alessandro Barbieri @ 2022-05-07  0:48 UTC (permalink / raw
  To: gentoo-commits

commit:     ed21e2c5c9580c3053eb76f90c6fa7d7a2d7750e
Author:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
AuthorDate: Fri May  6 22:54:27 2022 +0000
Commit:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
CommitDate: Fri May  6 23:44:10 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=ed21e2c5

octaveforge.eclass: query datadir

Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>

 eclass/octaveforge.eclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eclass/octaveforge.eclass b/eclass/octaveforge.eclass
index 022d89b33..8f8def97a 100644
--- a/eclass/octaveforge.eclass
+++ b/eclass/octaveforge.eclass
@@ -125,7 +125,7 @@ octaveforge_src_install() {
 		"
 		oct_pkgdir=$(octavecommand "${cmd}${stripcmd}" || die)
 	else
-		cmd="disp(fullfile(__octave_config_info__('sharedir'),'octave'));"
+		cmd="disp(fullfile(__octave_config_info__('datadir'),'octave'));"
 		shareprefix=${DESTDIR}/$(octavecommand "${cmd}" || die)
 		cmd="disp(fullfile(__octave_config_info__('libdir'),'octave'));"
 		libprefix=${DESTDIR}/$(octavecommand "${cmd}" || die)


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2022-05-07  0:48 Alessandro Barbieri
  0 siblings, 0 replies; 180+ messages in thread
From: Alessandro Barbieri @ 2022-05-07  0:48 UTC (permalink / raw
  To: gentoo-commits

commit:     e511f5d6560ada25deb2db350a87be446fd9ceb4
Author:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
AuthorDate: Sat May  7 00:48:07 2022 +0000
Commit:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
CommitDate: Sat May  7 00:48:07 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=e511f5d6

octaveforge.eclass: use PN instead of OCT_PKG

Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>

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

diff --git a/eclass/octaveforge.eclass b/eclass/octaveforge.eclass
index 8f8def97a..ed609cd8c 100644
--- a/eclass/octaveforge.eclass
+++ b/eclass/octaveforge.eclass
@@ -79,7 +79,6 @@ octaveforge_src_prepare() {
 octaveforge_src_compile() {
 	PKGDIR="$(pwd | sed -e 's|^.*/||' || die)"
 	export OCT_PACKAGE="${TMPDIR}/${PKGDIR}.tar.gz"
-	export OCT_PKG=$(echo "${PKGDIR}" | sed -e 's|^\(.*\)-.*|\1|' || die)
 	export MKOCTFILE="mkoctfile -v"
 
 	cmd="disp(__octave_config_info__('octlibdir'));"
@@ -120,10 +119,12 @@ octaveforge_src_install() {
 	if [[ "X${DESTDIR}X" = "XX" ]]; then
 		cmd="
 			warning('off','all');
-			pkg('install','${OCT_PACKAGE}');l=pkg('list');
-			disp(l{cellfun(@(x)strcmp(x.name,'${OCT_PKG}'),l)}.dir);
+			pkg('install','${OCT_PACKAGE}');
+			l=pkg('list');
+			disp(l{cellfun(@(x)strcmp(x.name,'${PN}'),l)}.dir);
+			${stripcmd}
 		"
-		oct_pkgdir=$(octavecommand "${cmd}${stripcmd}" || die)
+		oct_pkgdir=$(octavecommand "${cmd}" || die)
 	else
 		cmd="disp(fullfile(__octave_config_info__('datadir'),'octave'));"
 		shareprefix=${DESTDIR}/$(octavecommand "${cmd}" || die)
@@ -151,9 +152,10 @@ octaveforge_src_install() {
 			pkg('global_list',fullfile('${shareprefix}','octave_packages'));
 			pkg('local_list',fullfile('${shareprefix}','octave_packages'));
 			l=pkg('list');
-			disp(l{cellfun(@(x)strcmp(x.name,'${OCT_PKG}'),l)}.dir);
+			disp(l{cellfun(@(x)strcmp(x.name,'${PN}'),l)}.dir);
+			${stripcmd}
 		"
-		oct_pkgdir=$(octavecommand "${cmd}${stripcmd}" || die)
+		oct_pkgdir=$(octavecommand "${cmd}" || die)
 	fi
 	export oct_pkgdir
 


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2022-05-07  2:11 Alessandro Barbieri
  0 siblings, 0 replies; 180+ messages in thread
From: Alessandro Barbieri @ 2022-05-07  2:11 UTC (permalink / raw
  To: gentoo-commits

commit:     77c09ccb1adcbfc1828e61f46df8b53965aaf8e5
Author:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
AuthorDate: Sat May  7 01:09:54 2022 +0000
Commit:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
CommitDate: Sat May  7 02:11:21 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=77c09ccb

octaveforge.eclass: remove 'all' target from emake

Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>

 eclass/octaveforge.eclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eclass/octaveforge.eclass b/eclass/octaveforge.eclass
index 70185a6c7..25ac74efc 100644
--- a/eclass/octaveforge.eclass
+++ b/eclass/octaveforge.eclass
@@ -87,7 +87,7 @@ octaveforge_src_compile() {
 	export LDFLAGS="${LDFLAGS} -L${OCTLIBDIR}"
 
 	if [[ -e src/Makefile ]]; then
-		emake -C src all
+		emake -C src
 	fi
 
 	if [[ -e src/Makefile ]]; then


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2022-05-07  2:11 Alessandro Barbieri
  0 siblings, 0 replies; 180+ messages in thread
From: Alessandro Barbieri @ 2022-05-07  2:11 UTC (permalink / raw
  To: gentoo-commits

commit:     2a6aba0363b87968b0e77af0a178f4daaa6d464e
Author:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
AuthorDate: Sat May  7 00:55:25 2022 +0000
Commit:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
CommitDate: Sat May  7 02:11:21 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=2a6aba03

octaveforge.eclass: export LDFLAGS

Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>

 eclass/octaveforge.eclass | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/eclass/octaveforge.eclass b/eclass/octaveforge.eclass
index ed609cd8c..70185a6c7 100644
--- a/eclass/octaveforge.eclass
+++ b/eclass/octaveforge.eclass
@@ -83,7 +83,8 @@ octaveforge_src_compile() {
 
 	cmd="disp(__octave_config_info__('octlibdir'));"
 	OCTLIBDIR=$(octavecommand "${cmd}" || die)
-	export LFLAGS="-L${OCTLIBDIR}"
+	export LFLAGS="${LFLAGS} -L${OCTLIBDIR}"
+	export LDFLAGS="${LDFLAGS} -L${OCTLIBDIR}"
 
 	if [[ -e src/Makefile ]]; then
 		emake -C src all


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2022-05-07  2:11 Alessandro Barbieri
  0 siblings, 0 replies; 180+ messages in thread
From: Alessandro Barbieri @ 2022-05-07  2:11 UTC (permalink / raw
  To: gentoo-commits

commit:     5259d23ea883b3dd7b79f43f6dd29c3357d2858d
Author:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
AuthorDate: Sat May  7 02:10:44 2022 +0000
Commit:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
CommitDate: Sat May  7 02:11:22 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=5259d23e

octaveforge.eclass: add missing --no-gui, --eval

Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>

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

diff --git a/eclass/octaveforge.eclass b/eclass/octaveforge.eclass
index 25ac74efc..d02072fd5 100644
--- a/eclass/octaveforge.eclass
+++ b/eclass/octaveforge.eclass
@@ -209,9 +209,9 @@ octaveforge_pkg_postrm() {
 		mkdir -p "${OCT_PKGDIR}" || die
 	fi
 	cmd="pkg('rebuild');"
-	"${OCT_BIN}" -H --silent "${cmd}" || die 'failed to rebuild the package database'
+	"${OCT_BIN}" -H --silent --no-gui --eval "${cmd}" || die 'failed to rebuild the package database'
 }
 
 octavecommand() {
-	"${OCT_BIN}" -H -q --no-site-file --eval "$1"
+	"${OCT_BIN}" -H -q --no-site-file --no-gui --eval "$1"
 }


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2022-05-07  7:25 Alessandro Barbieri
  0 siblings, 0 replies; 180+ messages in thread
From: Alessandro Barbieri @ 2022-05-07  7:25 UTC (permalink / raw
  To: gentoo-commits

commit:     1ff3993d8f1a6f32f498c9077232f0da87b0a7ae
Author:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
AuthorDate: Sat May  7 07:22:50 2022 +0000
Commit:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
CommitDate: Sat May  7 07:22:50 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=1ff3993d

octaveforge.eclass: inline configure, eautoreconf

Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>

 eclass/octaveforge.eclass | 30 ++++++++++++++++++++----------
 1 file changed, 20 insertions(+), 10 deletions(-)

diff --git a/eclass/octaveforge.eclass b/eclass/octaveforge.eclass
index d02072fd5..67eb8aece 100644
--- a/eclass/octaveforge.eclass
+++ b/eclass/octaveforge.eclass
@@ -41,10 +41,7 @@ OCT_PKGDIR="${OCT_ROOT}/packages"
 # full path to octave binary
 OCT_BIN="$(type -p octave)"
 
-SRC_URI="
-	mirror://sourceforge/octave/${P}.tar.gz
-	${REPO_URI}/packages/package_configure.in -> octaveforge_configure
-"
+SRC_URI="mirror://sourceforge/octave/${P}.tar.gz"
 SLOT="0"
 
 # @FUNCTION: octaveforge_src_unpack
@@ -60,16 +57,17 @@ octaveforge_src_unpack() {
 
 # @FUNCTION: octaveforge_src_prepare
 # @DESCRIPTION:
-# function to add octaveforge specific makefile and configure and run autogen.sh if available
+# function to add octaveforge specific makefile and configure and reconfigure if possible
 octaveforge_src_prepare() {
-	cp "${DISTDIR}/octaveforge_configure" "${S}/configure" || die
+	_generate_configure
 
-	chmod 0755 "${S}/configure" || die
-	if [[ -e "${S}/src/autogen.sh" ]]; then
-		pushd "${S}/src" || die
+	pushd "${S}/src" || die
+	if [[ -e "${S}/src/configure.ac" ]]; then
+		eautoreconf
+	elif [[ -e "${S}/src/autogen.sh" ]]; then
 		 ./autogen.sh || die 'failed to run autogen.sh'
-		popd || die
 	fi
+	popd || die
 	if [[ -e "${S}/src/Makefile" ]]; then
 		sed -i 's/ -s / /g' "${S}/src/Makefile" || die 'sed failed.'
 	fi
@@ -215,3 +213,15 @@ octaveforge_pkg_postrm() {
 octavecommand() {
 	"${OCT_BIN}" -H -q --no-site-file --no-gui --eval "$1"
 }
+
+_generate_configure() {
+	cat << EOF > configure || die
+#! /bin/sh -f
+
+if [ -e src/configure ]; then
+  cd src
+  ./configure $*
+fi
+EOF
+	chmod 0755 "configure" || die
+}


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2022-05-08  1:58 Alessandro Barbieri
  0 siblings, 0 replies; 180+ messages in thread
From: Alessandro Barbieri @ 2022-05-08  1:58 UTC (permalink / raw
  To: gentoo-commits

commit:     95b85988993f04b6be454b7ef8effe91aa028320
Author:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
AuthorDate: Sun May  8 01:04:45 2022 +0000
Commit:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
CommitDate: Sun May  8 01:58:08 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=95b85988

octaveforge.eclass: fix some issues while moving in folders

Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>

 eclass/octaveforge.eclass | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/eclass/octaveforge.eclass b/eclass/octaveforge.eclass
index 67eb8aece..fb708e3a7 100644
--- a/eclass/octaveforge.eclass
+++ b/eclass/octaveforge.eclass
@@ -51,7 +51,6 @@ octaveforge_src_unpack() {
 	default
 	if [[ ! -d "${WORKDIR}/${P}" ]]; then
 		S="${WORKDIR}/${PN}"
-		pushd "${S}" || die
 	fi
 }
 
@@ -61,13 +60,15 @@ octaveforge_src_unpack() {
 octaveforge_src_prepare() {
 	_generate_configure
 
-	pushd "${S}/src" || die
 	if [[ -e "${S}/src/configure.ac" ]]; then
+		pushd "${S}/src" || die
 		eautoreconf
+		popd || die
 	elif [[ -e "${S}/src/autogen.sh" ]]; then
+		pushd "${S}/src" || die
 		 ./autogen.sh || die 'failed to run autogen.sh'
+		popd || die
 	fi
-	popd || die
 	if [[ -e "${S}/src/Makefile" ]]; then
 		sed -i 's/ -s / /g' "${S}/src/Makefile" || die 'sed failed.'
 	fi


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2022-05-11 11:29 Alessandro Barbieri
  0 siblings, 0 replies; 180+ messages in thread
From: Alessandro Barbieri @ 2022-05-11 11:29 UTC (permalink / raw
  To: gentoo-commits

commit:     5778e18ce802eadc134be8da814893287fd06d8c
Author:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
AuthorDate: Wed May 11 10:18:19 2022 +0000
Commit:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
CommitDate: Wed May 11 11:29:17 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=5778e18c

octaveforge.eclass: add octaveforge_src_test()

Closes: https://bugs.gentoo.org/843536
Closes: https://bugs.gentoo.org/843521
Closes: https://bugs.gentoo.org/843518
Closes: https://bugs.gentoo.org/843515
Closes: https://bugs.gentoo.org/843512
Closes: https://bugs.gentoo.org/843509
Closes: https://bugs.gentoo.org/843503
Closes: https://bugs.gentoo.org/843500
Closes: https://bugs.gentoo.org/843497

Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>

 eclass/octaveforge.eclass | 125 +++++++++++++++++++++++++---------------------
 1 file changed, 68 insertions(+), 57 deletions(-)

diff --git a/eclass/octaveforge.eclass b/eclass/octaveforge.eclass
index fb708e3a7..bb6176be9 100644
--- a/eclass/octaveforge.eclass
+++ b/eclass/octaveforge.eclass
@@ -17,7 +17,7 @@ case ${EAPI} in
 	*) die "${ECLASS}: EAPI ${EAPI} unsupported."
 esac
 
-EXPORT_FUNCTIONS src_unpack src_prepare src_compile src_install pkg_postinst pkg_prerm pkg_postrm
+EXPORT_FUNCTIONS src_unpack src_prepare src_compile src_install src_test pkg_postinst pkg_prerm pkg_postrm
 
 # @ECLASS-VARIABLE: REPO_URI
 # @DESCRIPTION:
@@ -103,65 +103,21 @@ octaveforge_src_compile() {
 # @FUNCTION: octaveforge_src_install
 # @DESCRIPTION:
 # function to install the octave package
-# documentation to docsdir
 octaveforge_src_install() {
-	TMPDIR="${T}"
-	DESTDIR="${D}"
-	DISTPKG='Gentoo'
+	DESTDIR="${D}" _octaveforge_pkg_install || die
+}
 
-	pushd ../ || die
-	if [[ "X${DISTPKG}X" != "XX" ]]; then
-		stripcmd="
-			unlink(pkg('local_list'));
-			unlink(pkg('global_list'));
-		"
-	fi
-	if [[ "X${DESTDIR}X" = "XX" ]]; then
-		cmd="
-			warning('off','all');
-			pkg('install','${OCT_PACKAGE}');
-			l=pkg('list');
-			disp(l{cellfun(@(x)strcmp(x.name,'${PN}'),l)}.dir);
-			${stripcmd}
-		"
-		oct_pkgdir=$(octavecommand "${cmd}" || die)
-	else
-		cmd="disp(fullfile(__octave_config_info__('datadir'),'octave'));"
-		shareprefix=${DESTDIR}/$(octavecommand "${cmd}" || die)
-		cmd="disp(fullfile(__octave_config_info__('libdir'),'octave'));"
-		libprefix=${DESTDIR}/$(octavecommand "${cmd}" || die)
-		octprefix="${shareprefix}/packages" || die
-		archprefix="${libprefix}/packages" || die
-		if [[ ! -e "${octprefix}" ]]; then
-			mkdir -p "${octprefix}" || die
-		fi
-		if [[ ! -e "${archprefix}" ]]; then
-			mkdir -p "${archprefix}" || die
-		fi
-		cmd="
-			warning('off','all');
-			pkg('prefix','${octprefix}','${archprefix}');
-			pkg('global_list',fullfile('${shareprefix}','octave_packages'));
-			pkg('local_list',fullfile('${shareprefix}','octave_packages'));
-			pkg('install','-nodeps','-verbose','${OCT_PACKAGE}');
-		"
-		octavecommand "${cmd}" || die
-		cmd="
-			warning('off','all');
-			pkg('prefix','${octprefix}','${archprefix}');
-			pkg('global_list',fullfile('${shareprefix}','octave_packages'));
-			pkg('local_list',fullfile('${shareprefix}','octave_packages'));
-			l=pkg('list');
-			disp(l{cellfun(@(x)strcmp(x.name,'${PN}'),l)}.dir);
-			${stripcmd}
-		"
-		oct_pkgdir=$(octavecommand "${cmd}" || die)
-	fi
-	export oct_pkgdir
+octaveforge_src_test() {
+	DESTDIR="${T}" _octaveforge_pkg_install || die
 
-	if [[ -d doc/ ]]; then
-		dodoc -r doc/*
-	fi
+	# cargo culted from Fedora
+	cmd="
+		pkg('load','${PN}');
+		oruntests('${oct_pkgdir}');
+		unlink(pkg('local_list'));
+		unlink(pkg('global_list'));
+	"
+	octavecommand "${cmd}" || die 'failed testing'
 }
 
 # @FUNCTION: octaveforge_pkg_postinst
@@ -226,3 +182,58 @@ fi
 EOF
 	chmod 0755 "configure" || die
 }
+
+_octaveforge_pkg_install() {
+	TMPDIR="${T}"
+	DISTPKG='Gentoo'
+
+	pushd ../ || die
+	if [[ "X${DISTPKG}X" != "XX" ]]; then
+		stripcmd="
+			unlink(pkg('local_list'));
+			unlink(pkg('global_list'));
+		"
+	fi
+	if [[ "X${DESTDIR}X" = "XX" ]]; then
+		cmd="
+			warning('off','all');
+			pkg('install','${OCT_PACKAGE}');
+			l=pkg('list');
+			disp(l{cellfun(@(x)strcmp(x.name,'${PN}'),l)}.dir);
+			${stripcmd}
+		"
+		oct_pkgdir=$(octavecommand "${cmd}" || die)
+	else
+		cmd="disp(fullfile(__octave_config_info__('datadir'),'octave'));"
+		shareprefix=${DESTDIR}/$(octavecommand "${cmd}" || die)
+		cmd="disp(fullfile(__octave_config_info__('libdir'),'octave'));"
+		libprefix=${DESTDIR}/$(octavecommand "${cmd}" || die)
+		octprefix="${shareprefix}/packages" || die
+		archprefix="${libprefix}/packages" || die
+		if [[ ! -e "${octprefix}" ]]; then
+			mkdir -p "${octprefix}" || die
+		fi
+		if [[ ! -e "${archprefix}" ]]; then
+			mkdir -p "${archprefix}" || die
+		fi
+		cmd="
+			warning('off','all');
+			pkg('prefix','${octprefix}','${archprefix}');
+			pkg('global_list',fullfile('${shareprefix}','octave_packages'));
+			pkg('local_list',fullfile('${shareprefix}','octave_packages'));
+			pkg('install','-nodeps','-verbose','${OCT_PACKAGE}');
+		"
+		octavecommand "${cmd}" || die
+		cmd="
+			warning('off','all');
+			pkg('prefix','${octprefix}','${archprefix}');
+			pkg('global_list',fullfile('${shareprefix}','octave_packages'));
+			pkg('local_list',fullfile('${shareprefix}','octave_packages'));
+			l=pkg('list');
+			disp(l{cellfun(@(x)strcmp(x.name,'${PN}'),l)}.dir);
+			${stripcmd}
+		"
+		oct_pkgdir=$(octavecommand "${cmd}" || die)
+	fi
+	export oct_pkgdir
+}


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2022-05-28 21:19 Alessandro Barbieri
  0 siblings, 0 replies; 180+ messages in thread
From: Alessandro Barbieri @ 2022-05-28 21:19 UTC (permalink / raw
  To: gentoo-commits

commit:     9b26012dff909ece8a5392ae0447842677dcc80f
Author:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
AuthorDate: Sat May 28 21:08:10 2022 +0000
Commit:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
CommitDate: Sat May 28 21:19:44 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=9b26012d

octaveforge.eclass: patch before moving things

Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>

 eclass/octaveforge.eclass | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/eclass/octaveforge.eclass b/eclass/octaveforge.eclass
index 9f0f12dda..337d21e45 100644
--- a/eclass/octaveforge.eclass
+++ b/eclass/octaveforge.eclass
@@ -58,6 +58,8 @@ octaveforge_src_unpack() {
 # @DESCRIPTION:
 # function to add octaveforge specific makefile and configure and reconfigure if possible
 octaveforge_src_prepare() {
+	default
+
 	_generate_configure
 
 	if [[ -e "${S}/src/configure.ac" ]]; then
@@ -72,7 +74,6 @@ octaveforge_src_prepare() {
 	if [[ -e "${S}/src/Makefile" ]]; then
 		sed -i 's/ -s / /g' "${S}/src/Makefile" || die 'sed failed.'
 	fi
-	default
 }
 
 octaveforge_src_compile() {


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2022-05-31 13:14 Nicola Smaniotto
  0 siblings, 0 replies; 180+ messages in thread
From: Nicola Smaniotto @ 2022-05-31 13:14 UTC (permalink / raw
  To: gentoo-commits

commit:     9c439330e6b0c1bb9f503185f429d97f7c1991d7
Author:     Nicola Smaniotto <smaniotto.nicola <AT> gmail <DOT> com>
AuthorDate: Tue May 31 13:03:20 2022 +0000
Commit:     Nicola Smaniotto <smaniotto.nicola <AT> gmail <DOT> com>
CommitDate: Tue May 31 13:13:21 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=9c439330

mpv-plugin.eclass: recursive doins

Some plugins, like mpv_sponsorblock, install a folder

Signed-off-by: Nicola Smaniotto <smaniotto.nicola <AT> gmail.com>

 eclass/mpv-plugin.eclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eclass/mpv-plugin.eclass b/eclass/mpv-plugin.eclass
index 5c077e6d1..cdc7bb1c2 100644
--- a/eclass/mpv-plugin.eclass
+++ b/eclass/mpv-plugin.eclass
@@ -113,7 +113,7 @@ mpv-plugin_src_install() {
 	insinto "${MPV_INSTALL_DIR}"
 
 	for f in "${MPV_PLUGIN_FILES[@]}"; do
-		doins "${f}"
+		doins -r "${f}"
 	done
 
 	use autoload && if _mpv-plugin_has_main; then


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2022-06-02  1:23 Alessandro Barbieri
  0 siblings, 0 replies; 180+ messages in thread
From: Alessandro Barbieri @ 2022-06-02  1:23 UTC (permalink / raw
  To: gentoo-commits

commit:     f0050229316e49800e17c87ba49a7b8bda372bef
Author:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
AuthorDate: Tue May 31 17:47:33 2022 +0000
Commit:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
CommitDate: Thu Jun  2 01:23:29 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=f0050229

octaveforge.eclass: use edo for all commands

Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>

 eclass/octaveforge.eclass | 74 +++++++++++++++++++++++------------------------
 1 file changed, 37 insertions(+), 37 deletions(-)

diff --git a/eclass/octaveforge.eclass b/eclass/octaveforge.eclass
index 337d21e45..31e1f270d 100644
--- a/eclass/octaveforge.eclass
+++ b/eclass/octaveforge.eclass
@@ -10,7 +10,7 @@
 # Alessandro Barbieri <lssndrbarbieri@gmail.com>
 # @SUPPORTED_EAPIS: 8
 
-inherit autotools
+inherit autotools edo
 
 case ${EAPI} in
 	8) ;;
@@ -63,16 +63,16 @@ octaveforge_src_prepare() {
 	_generate_configure
 
 	if [[ -e "${S}/src/configure.ac" ]]; then
-		pushd "${S}/src" || die
+		edo pushd "${S}/src"
 		eautoreconf
-		popd || die
+		edo popd
 	elif [[ -e "${S}/src/autogen.sh" ]]; then
-		pushd "${S}/src" || die
-		 ./autogen.sh || die 'failed to run autogen.sh'
-		popd || die
+		edo pushd "${S}/src"
+		edo ./autogen.sh
+		edo popd
 	fi
 	if [[ -e "${S}/src/Makefile" ]]; then
-		sed -i 's/ -s / /g' "${S}/src/Makefile" || die 'sed failed.'
+		edo sed -i 's/ -s / /g' "${S}/src/Makefile"
 	fi
 }
 
@@ -82,7 +82,7 @@ octaveforge_src_compile() {
 	export MKOCTFILE="mkoctfile -v"
 
 	cmd="disp(__octave_config_info__('octlibdir'));"
-	OCTLIBDIR=$(octavecommand "${cmd}" || die)
+	OCTLIBDIR=$(edo octavecommand "${cmd}")
 	export LFLAGS="${LFLAGS} -L${OCTLIBDIR}"
 	export LDFLAGS="${LDFLAGS} -L${OCTLIBDIR}"
 
@@ -91,25 +91,25 @@ octaveforge_src_compile() {
 	fi
 
 	if [[ -e src/Makefile ]]; then
-		mv src/Makefile src/Makefile.disable || die
+		edo mv src/Makefile src/Makefile.disable
 	fi
 	if [[ -e src/configure ]]; then
-		mv src/configure src/configure.disable || die
+		edo mv src/configure src/configure.disable
 	fi
 
-	pushd .. || die
-	tar -czf "${OCT_PACKAGE}" "${PKGDIR}" || die
+	edo pushd ..
+	edo tar -czf "${OCT_PACKAGE}" "${PKGDIR}"
 }
 
 # @FUNCTION: octaveforge_src_install
 # @DESCRIPTION:
 # function to install the octave package
 octaveforge_src_install() {
-	DESTDIR="${D}" _octaveforge_pkg_install || die
+	DESTDIR="${D}" edo _octaveforge_pkg_install
 }
 
 octaveforge_src_test() {
-	DESTDIR="${T}" _octaveforge_pkg_install || die
+	DESTDIR="${T}" edo _octaveforge_pkg_install
 
 	# cargo culted from Fedora
 	cmd="
@@ -118,7 +118,7 @@ octaveforge_src_test() {
 		unlink(pkg('local_list'));
 		unlink(pkg('global_list'));
 	"
-	octavecommand "${cmd}" || die 'failed testing'
+	edo octavecommand "${cmd}"
 }
 
 # @FUNCTION: octaveforge_pkg_postinst
@@ -127,10 +127,10 @@ octaveforge_src_test() {
 octaveforge_pkg_postinst() {
 	einfo "Registering ${CATEGORY}/${PF} on the Octave package database."
 	if [[ ! -d "${OCT_PKGDIR}" ]] ; then
-		mkdir -p "${OCT_PKGDIR}" || die
+		edo mkdir -p "${OCT_PKGDIR}"
 	fi
 	cmd="pkg('rebuild');"
-	octavecommand "${cmd}" || die 'failed to register the package.'
+	edo octavecommand "${cmd}"
 }
 
 # @FUNCTION: octaveforge_pkg_prerm
@@ -143,16 +143,16 @@ octaveforge_pkg_prerm() {
 		l = pkg('list');
 		disp(l{cellfun(@(x)strcmp(x.name,'${PN}'),l)}.dir);
 	"
-	oct_pkgdir=$(octavecommand "${cmd}" || die)
-	rm -f "${oct_pkgdir}/packinfo/on_uninstall.m" || die
+	oct_pkgdir=$(edo octavecommand "${cmd}")
+	edo rm -f "${oct_pkgdir}/packinfo/on_uninstall.m"
 	if [[ -e "${oct_pkgdir}/packinfo/on_uninstall.m.orig" ]]; then
-		mv "$oct_pkgdir"/packinfo/on_uninstall.m{.orig,} || die
-		pushd "$oct_pkgdir/packinfo" || die
+		edo mv "$oct_pkgdir"/packinfo/on_uninstall.m{.orig,}
+		edo pushd "$oct_pkgdir/packinfo"
 		cmd="
 			l = pkg('list');
 			on_uninstall(l{cellfun(@(x)strcmp(x.name,'${PN}'), l)});
 		"
-		octavecommand "${cmd}" || die 'failed to remove the package'
+		edo octavecommand "${cmd}"
 	fi
 }
 
@@ -162,18 +162,18 @@ octaveforge_pkg_prerm() {
 octaveforge_pkg_postrm() {
 	einfo 'Rebuilding the Octave package database.'
 	if [[ ! -d "${OCT_PKGDIR}" ]] ; then
-		mkdir -p "${OCT_PKGDIR}" || die
+		edo mkdir -p "${OCT_PKGDIR}"
 	fi
 	cmd="pkg('rebuild');"
-	"${OCT_BIN}" -H --silent --no-gui --eval "${cmd}" || die 'failed to rebuild the package database'
+	edo "${OCT_BIN}" -H --silent --no-gui --eval "${cmd}"
 }
 
 octavecommand() {
-	"${OCT_BIN}" -H -q --no-site-file --no-gui --eval "$1"
+	edo "${OCT_BIN}" -H -q --no-site-file --no-gui --eval "$1"
 }
 
 _generate_configure() {
-	cat << EOF > configure || die
+	edo cat << EOF > configure
 #! /bin/sh -f
 
 if [ -e src/configure ]; then
@@ -181,14 +181,14 @@ if [ -e src/configure ]; then
   ./configure $*
 fi
 EOF
-	chmod 0755 "configure" || die
+	edo chmod 0755 "configure"
 }
 
 _octaveforge_pkg_install() {
 	TMPDIR="${T}"
 	DISTPKG='Gentoo'
 
-	pushd ../ || die
+	edo pushd ../
 	if [[ "X${DISTPKG}X" != "XX" ]]; then
 		stripcmd="
 			unlink(pkg('local_list'));
@@ -203,19 +203,19 @@ _octaveforge_pkg_install() {
 			disp(l{cellfun(@(x)strcmp(x.name,'${PN}'),l)}.dir);
 			${stripcmd}
 		"
-		oct_pkgdir=$(octavecommand "${cmd}" || die)
+		edo oct_pkgdir=$(edo octavecommand "${cmd}")
 	else
 		cmd="disp(fullfile(__octave_config_info__('datadir'),'octave'));"
-		shareprefix=${DESTDIR}/$(octavecommand "${cmd}" || die)
+		shareprefix=${DESTDIR}/$(edo octavecommand "${cmd}")
 		cmd="disp(fullfile(__octave_config_info__('libdir'),'octave'));"
-		libprefix=${DESTDIR}/$(octavecommand "${cmd}" || die)
-		octprefix="${shareprefix}/packages" || die
-		archprefix="${libprefix}/packages" || die
+		libprefix=${DESTDIR}/$(edo octavecommand "${cmd}")
+		octprefix="${shareprefix}/packages"
+		archprefix="${libprefix}/packages"
 		if [[ ! -e "${octprefix}" ]]; then
-			mkdir -p "${octprefix}" || die
+			edo mkdir -p "${octprefix}"
 		fi
 		if [[ ! -e "${archprefix}" ]]; then
-			mkdir -p "${archprefix}" || die
+			edo mkdir -p "${archprefix}"
 		fi
 		cmd="
 			warning('off','all');
@@ -224,7 +224,7 @@ _octaveforge_pkg_install() {
 			pkg('local_list',fullfile('${shareprefix}','octave_packages'));
 			pkg('install','-nodeps','-verbose','${OCT_PACKAGE}');
 		"
-		octavecommand "${cmd}" || die
+		edo octavecommand "${cmd}"
 		cmd="
 			warning('off','all');
 			pkg('prefix','${octprefix}','${archprefix}');
@@ -234,7 +234,7 @@ _octaveforge_pkg_install() {
 			disp(l{cellfun(@(x)strcmp(x.name,'${PN}'),l)}.dir);
 			${stripcmd}
 		"
-		oct_pkgdir=$(octavecommand "${cmd}" || die)
+		oct_pkgdir=$(edo octavecommand "${cmd}")
 	fi
 	export oct_pkgdir
 }


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2022-06-02  1:23 Alessandro Barbieri
  0 siblings, 0 replies; 180+ messages in thread
From: Alessandro Barbieri @ 2022-06-02  1:23 UTC (permalink / raw
  To: gentoo-commits

commit:     f16ca432c7b1c33c7a30fe63ffc162b7f7e6fd0d
Author:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
AuthorDate: Tue May 31 17:52:57 2022 +0000
Commit:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
CommitDate: Thu Jun  2 01:23:29 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=f16ca432

R-packages.eclass: use edo for all the commands

Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>

 eclass/R-packages.eclass | 34 +++++++++++++++++-----------------
 1 file changed, 17 insertions(+), 17 deletions(-)

diff --git a/eclass/R-packages.eclass b/eclass/R-packages.eclass
index 0be59a20c..4c4b16fd9 100644
--- a/eclass/R-packages.eclass
+++ b/eclass/R-packages.eclass
@@ -12,7 +12,7 @@
 # Alessandro Barbieri <lssndrbarbieri@gmail.com>
 # @SUPPORTED_EAPIS: 7
 
-inherit eutils optfeature toolchain-funcs
+inherit edo eutils optfeature toolchain-funcs
 
 case ${EAPI} in
 	7) ;;
@@ -37,9 +37,9 @@ BDEPEND="sys-apps/pkgcore"
 # <dest> will contain symlinks to everything in <source>
 _movelink() {
 	if [[ -e "${1}" ]]; then
-		local rp1="$(realpath ${1})" || die
-		mv "${rp1}" "${2}" || die
-		cp -rsf "${2}" "${rp1}" || die
+		local rp1="$(edo realpath ${1})"
+		edo mv "${rp1}" "${2}"
+		edo cp -rsf "${2}" "${rp1}"
 	fi
 }
 
@@ -49,7 +49,7 @@ _movelink() {
 R-packages_src_unpack() {
 	unpack ${A}
 	if [[ -d "${PN//_/.}" ]] && [[ ! -d "${P}" ]]; then
-		mv "${PN//_/.}" "${P}" || die
+		edo mv "${PN//_/.}" "${P}"
 	fi
 }
 
@@ -57,9 +57,9 @@ R-packages_src_unpack() {
 # @DESCRIPTION:
 # function to remove unwanted files from the sources
 R-packages_src_prepare() {
-	rm -f LICENSE || die
+	edo rm -f LICENSE
 	default
-	mkdir -p "${T}/R" || die
+	edo mkdir -p "${T}/R"
 }
 
 # @FUNCTION: R-packages_src_configure
@@ -89,7 +89,7 @@ R-packages_src_compile() {
 		LDFLAGS=${LDFLAGS// /\\ } \
 		MAKEOPTS=${MAKEOPTS// /\\ } \
 	" \
-	R CMD INSTALL . -d -l "${T}/R" "--byte-compile" || die
+	edo R CMD INSTALL . -d -l "${T}/R" "--byte-compile"
 }
 
 
@@ -99,35 +99,35 @@ R-packages_src_compile() {
 # documentation and examples to docsdir, symlinked back to R site-library (to allow access from within R)
 # everything else to R site-library
 R-packages_src_install() {
-	pushd "${T}/R/${PN//_/.}" || die
+	edo pushd "${T}/R/${PN//_/.}"
 
 	local DOCS_DIR="/usr/share/doc/${PF}"
 
-	mkdir -p "${ED}/${DOCS_DIR}" || die
+	edo mkdir -p "${ED}/${DOCS_DIR}"
 
 	for i in NEWS.md README.md DESCRIPTION examples CITATION INDEX NEWS WORDLIST News.Rd ; do
-		_movelink "${i}" "${ED}${DOCS_DIR}/${i}" || die
+		edo _movelink "${i}" "${ED}${DOCS_DIR}/${i}"
 		docompress -x "${DOCS_DIR}/${i}"
 	done
 
 	if [[ -e html ]]; then
-		_movelink html "${ED}${DOCS_DIR}/html" || die
+		edo _movelink html "${ED}${DOCS_DIR}/html"
 		docompress -x "${DOCS_DIR}/html"
 	fi
 	if [[ -e doc ]]; then
-		pushd doc || die
+		edo pushd doc
 		for i in * ; do
-			_movelink "${i}" "${ED}${DOCS_DIR}/${i}" || die
+			edo _movelink "${i}" "${ED}${DOCS_DIR}/${i}"
 			docompress -x "${DOCS_DIR}/${i}"
 		done
-		popd || die
+		edo popd
 	fi
 	if [[ -e doc/html ]]; then
 		docompress -x "${DOCS_DIR}/html"
 	fi
 	docompress -x "${DOCS_DIR}"
 
-	rm -rf tests test || die
+	edo rm -rf tests test
 
 	insinto "/usr/$(get_libdir)/R/site-library"
 	doins -r "${T}/R/${PN//_/.}"
@@ -139,7 +139,7 @@ R-packages_src_install() {
 R-packages_pkg_postinst() {
 	if [[ -v SUGGESTED_PACKAGES ]]; then
 		for p in ${SUGGESTED_PACKAGES} ; do
-			pexist=$(pquery -n1 "${p}" 2>/dev/null) || die
+			pexist=$(edo pquery -n1 "${p}" 2>/dev/null)
 			if [[ -n "${pexist}" ]]; then
 				optfeature "having the upstream suggested package" "${p}"
 			fi


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2022-06-07  6:26 Anna Vyalkova
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Vyalkova @ 2022-06-07  6:26 UTC (permalink / raw
  To: gentoo-commits

commit:     3358a8f78e1177010e6653fa2eb084b02b0f4ead
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Mon Jun  6 10:05:42 2022 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Tue Jun  7 06:26:03 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=3358a8f7

build2.eclass: new eclass

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 eclass/build2.eclass | 150 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 150 insertions(+)

diff --git a/eclass/build2.eclass b/eclass/build2.eclass
new file mode 100644
index 000000000..002b08c6e
--- /dev/null
+++ b/eclass/build2.eclass
@@ -0,0 +1,150 @@
+# Copyright 2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# @ECLASS: build2.eclass
+# @MAINTAINER:
+# Anna Vyalkova <cyber+gentoo@sysrq.in>
+# @AUTHOR:
+# Anna Vyalkova <cyber+gentoo@sysrq.in>
+# @SUPPORTED_EAPIS: 8
+# @BLURB: eclass for packages using build2
+# @DESCRIPTION:
+# Utility eclass providing wrapper functions for the build2 build system along
+# with default phase functions.
+
+case ${EAPI:-0} in
+	8) ;;
+	*) die "${ECLASS}: EAPI ${EAPI:-0} unsupported."
+esac
+
+if [[ ! ${_BUILD2_ECLASS} ]]; then
+
+inherit edo multiprocessing toolchain-funcs
+
+fi
+
+EXPORT_FUNCTIONS src_configure src_compile src_test src_install
+
+if [[ ! ${_BUILD2_ECLASS} ]]; then
+
+# @ECLASS_VARIABLE: BUILD2_VERBOSITY
+# @USER_VARIABLE
+# @DESCRIPTION:
+# Determines what kind of output to show when executing commands.  All possible
+# options are listed in b(1).
+: ${BUILD2_VERBOSITY:=2}
+
+BDEPEND="dev-util/build2"
+
+# @FUNCTION: build2_src_configure
+# @DESCRIPTION:
+# Set build2 preferences to match user settings.  Configure toolchain, build
+# flags and installation prefix.
+build2_src_configure() {
+	debug-print-function ${FUNCNAME} "${@}"
+
+	[[ -z ${mybargs} ]] && declare -a mybargs=()
+	local mybargstype=$(declare -p mybargs 2>&-)
+	if [[ "${mybargstype}" != "declare -a mybargs="* ]]; then
+		die "mybargs must be declared as array"
+	fi
+
+	local bargs=(
+		config.cxx="$(tc-getCXX)"
+		config.cxx.coptions="${CXXFLAGS}"
+		config.cxx.loptions="${LDFLAGS}"
+		config.c="$(tc-getCC)"
+		config.cc.coptions="${CFLAGS}"
+		config.cc.loptions="${LDFLAGS}"
+		config.bin.ar="$(tc-getAR)"
+		config.bin.ranlib="$(tc-getRANLIB)"
+		config.bin.lib=shared
+		config.install.root="${EPREFIX}"/usr
+		config.install.lib="${EPREFIX}"/usr/$(get_libdir)
+		config.install.doc="${EPREFIX}"/usr/share/doc/${PF}
+		"${mybargs[@]}"
+		--jobs $(makeopts_jobs)
+		--verbose "${BUILD2_VERBOSITY}"
+	)
+
+	edo b configure "${bargs[@]}"
+}
+
+# @FUNCTION: build2_src_compile
+# @USAGE: [<b args>...]
+# @DESCRIPTION:
+# General function for compiling with build2.  Tests are built conditionally.
+build2_src_compile() {
+	debug-print-function ${FUNCNAME} "${@}"
+
+	local build_tests=no
+	local bargs=(
+		"${@}"
+		--jobs $(makeopts_jobs)
+		--verbose "${BUILD2_VERBOSITY}"
+	)
+
+	edo b update-for-install "${bargs[@]}"
+	has test ${FEATURES} && edo b update-for-test "${bargs[@]}"
+}
+
+# @FUNCTION: build2_src_test
+# @USAGE: [<b args>...]
+# @DESCRIPTION:
+# Test the package using "b test".
+build2_src_test() {
+	debug-print-function ${FUNCNAME} "${@}"
+
+	local bargs=(
+		"${@}"
+		--jobs $(makeopts_jobs)
+		--verbose "${BUILD2_VERBOSITY}"
+	)
+
+	edo b test "${bargs[@]}"
+}
+
+# @FUNCTION: build2_src_install
+# @USAGE: [<b args>...]
+# @DESCRIPTION:
+# Install the package using "b install".
+build2_src_install() {
+	debug-print-function ${FUNCNAME} "${@}"
+
+	local bargs=(
+		config.install.chroot="${D}"
+		"${@}"
+		--jobs $(makeopts_jobs)
+		--verbose "${BUILD2_VERBOSITY}"
+	)
+
+	edo b install "${bargs[@]}"
+	einstalldocs
+}
+
+# @FUNCTION: build2_pkg_die
+# @INTERNAL
+# @DESCRIPTION:
+# EBUILD_DEATH_HOOK function to display a warning if ccache is enabled.
+
+if ! has build2_pkg_die ${EBUILD_DEATH_HOOKS}; then
+	EBUILD_DEATH_HOOKS="${EBUILD_DEATH_HOOKS} build2_pkg_die"
+fi
+
+build2_pkg_die() {
+	if [[ "${EBUILD_PHASE}" != "compile" ]]; then
+		return
+	fi
+
+	if has ccache ${FEATURES}; then
+		# build2 doesn't support ccache:
+		# https://github.com/build2/build2/issues/86#issuecomment-647401742
+		ewarn
+		ewarn "!!! You have enabled ccache. Please try disabling ccache"
+		ewarn "!!! before reporting a bug."
+		ewarn
+	fi
+}
+
+_BUILD2_ECLASS=1
+fi


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2022-06-14  8:00 Alessandro Barbieri
  0 siblings, 0 replies; 180+ messages in thread
From: Alessandro Barbieri @ 2022-06-14  8:00 UTC (permalink / raw
  To: gentoo-commits

commit:     0a8c734ce06415d1ace17665675de9c2fa0e33a9
Author:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
AuthorDate: Tue Jun 14 01:14:48 2022 +0000
Commit:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
CommitDate: Tue Jun 14 08:00:25 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=0a8c734c

R-packages.eclass: remove unneeded edo

Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>

 eclass/R-packages.eclass | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/eclass/R-packages.eclass b/eclass/R-packages.eclass
index 4c4b16fd9..1aa612403 100644
--- a/eclass/R-packages.eclass
+++ b/eclass/R-packages.eclass
@@ -37,9 +37,9 @@ BDEPEND="sys-apps/pkgcore"
 # <dest> will contain symlinks to everything in <source>
 _movelink() {
 	if [[ -e "${1}" ]]; then
-		local rp1="$(edo realpath ${1})"
-		edo mv "${rp1}" "${2}"
-		edo cp -rsf "${2}" "${rp1}"
+		local rp1="$(realpath ${1} || die)"
+		mv "${rp1}" "${2}" || die
+		cp -rsf "${2}" "${rp1}" || die
 	fi
 }
 
@@ -49,7 +49,7 @@ _movelink() {
 R-packages_src_unpack() {
 	unpack ${A}
 	if [[ -d "${PN//_/.}" ]] && [[ ! -d "${P}" ]]; then
-		edo mv "${PN//_/.}" "${P}"
+		mv "${PN//_/.}" "${P}" || die
 	fi
 }
 
@@ -57,9 +57,9 @@ R-packages_src_unpack() {
 # @DESCRIPTION:
 # function to remove unwanted files from the sources
 R-packages_src_prepare() {
-	edo rm -f LICENSE
+	rm -f LICENSE || die
 	default
-	edo mkdir -p "${T}/R"
+	mkdir -p "${T}/R" || die
 }
 
 # @FUNCTION: R-packages_src_configure
@@ -99,35 +99,35 @@ R-packages_src_compile() {
 # documentation and examples to docsdir, symlinked back to R site-library (to allow access from within R)
 # everything else to R site-library
 R-packages_src_install() {
-	edo pushd "${T}/R/${PN//_/.}"
+	pushd "${T}/R/${PN//_/.}" || die
 
 	local DOCS_DIR="/usr/share/doc/${PF}"
 
-	edo mkdir -p "${ED}/${DOCS_DIR}"
+	mkdir -p "${ED}/${DOCS_DIR}" || die
 
 	for i in NEWS.md README.md DESCRIPTION examples CITATION INDEX NEWS WORDLIST News.Rd ; do
-		edo _movelink "${i}" "${ED}${DOCS_DIR}/${i}"
+		_movelink "${i}" "${ED}${DOCS_DIR}/${i}" || die
 		docompress -x "${DOCS_DIR}/${i}"
 	done
 
 	if [[ -e html ]]; then
-		edo _movelink html "${ED}${DOCS_DIR}/html"
+		_movelink html "${ED}${DOCS_DIR}/html" || die
 		docompress -x "${DOCS_DIR}/html"
 	fi
 	if [[ -e doc ]]; then
-		edo pushd doc
+		pushd doc || die
 		for i in * ; do
-			edo _movelink "${i}" "${ED}${DOCS_DIR}/${i}"
+			_movelink "${i}" "${ED}${DOCS_DIR}/${i}" || die
 			docompress -x "${DOCS_DIR}/${i}"
 		done
-		edo popd
+		popd || die
 	fi
 	if [[ -e doc/html ]]; then
 		docompress -x "${DOCS_DIR}/html"
 	fi
 	docompress -x "${DOCS_DIR}"
 
-	edo rm -rf tests test
+	rm -rf tests test || die
 
 	insinto "/usr/$(get_libdir)/R/site-library"
 	doins -r "${T}/R/${PN//_/.}"
@@ -139,7 +139,7 @@ R-packages_src_install() {
 R-packages_pkg_postinst() {
 	if [[ -v SUGGESTED_PACKAGES ]]; then
 		for p in ${SUGGESTED_PACKAGES} ; do
-			pexist=$(edo pquery -n1 "${p}" 2>/dev/null)
+			pexist="$(pquery -n1 ${p} 2>/dev/null || die)"
 			if [[ -n "${pexist}" ]]; then
 				optfeature "having the upstream suggested package" "${p}"
 			fi


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2022-06-14  8:00 Alessandro Barbieri
  0 siblings, 0 replies; 180+ messages in thread
From: Alessandro Barbieri @ 2022-06-14  8:00 UTC (permalink / raw
  To: gentoo-commits

commit:     8dc69248dca0f9f9420b8650c3bdef6cd8307bb0
Author:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
AuthorDate: Tue Jun 14 01:22:00 2022 +0000
Commit:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
CommitDate: Tue Jun 14 08:00:25 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=8dc69248

octaveforge.eclass: remove unneeded edo

Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>

 eclass/octaveforge.eclass | 66 +++++++++++++++++++++++------------------------
 1 file changed, 33 insertions(+), 33 deletions(-)

diff --git a/eclass/octaveforge.eclass b/eclass/octaveforge.eclass
index 31e1f270d..6f74951a6 100644
--- a/eclass/octaveforge.eclass
+++ b/eclass/octaveforge.eclass
@@ -39,7 +39,7 @@ OCT_PKGDIR="${OCT_ROOT}/packages"
 # @ECLASS-VARIABLE: OCT_BIN
 # @DESCRIPTION:
 # full path to octave binary
-OCT_BIN="$(type -p octave)"
+OCT_BIN="$(type -p octave || die)"
 
 SRC_URI="mirror://sourceforge/octave/${P}.tar.gz"
 SLOT="0"
@@ -60,19 +60,19 @@ octaveforge_src_unpack() {
 octaveforge_src_prepare() {
 	default
 
-	_generate_configure
+	_generate_configure || die
 
 	if [[ -e "${S}/src/configure.ac" ]]; then
-		edo pushd "${S}/src"
+		pushd "${S}/src" || die
 		eautoreconf
-		edo popd
+		popd || die
 	elif [[ -e "${S}/src/autogen.sh" ]]; then
-		edo pushd "${S}/src"
+		pushd "${S}/src" || die
 		edo ./autogen.sh
-		edo popd
+		popd || die
 	fi
 	if [[ -e "${S}/src/Makefile" ]]; then
-		edo sed -i 's/ -s / /g' "${S}/src/Makefile"
+		sed -i 's/ -s / /g' "${S}/src/Makefile" || die
 	fi
 }
 
@@ -82,7 +82,7 @@ octaveforge_src_compile() {
 	export MKOCTFILE="mkoctfile -v"
 
 	cmd="disp(__octave_config_info__('octlibdir'));"
-	OCTLIBDIR=$(edo octavecommand "${cmd}")
+	OCTLIBDIR=$(octavecommand "${cmd}" || die)
 	export LFLAGS="${LFLAGS} -L${OCTLIBDIR}"
 	export LDFLAGS="${LDFLAGS} -L${OCTLIBDIR}"
 
@@ -91,25 +91,25 @@ octaveforge_src_compile() {
 	fi
 
 	if [[ -e src/Makefile ]]; then
-		edo mv src/Makefile src/Makefile.disable
+		mv src/Makefile src/Makefile.disable || die
 	fi
 	if [[ -e src/configure ]]; then
-		edo mv src/configure src/configure.disable
+		mv src/configure src/configure.disable || die
 	fi
 
-	edo pushd ..
-	edo tar -czf "${OCT_PACKAGE}" "${PKGDIR}"
+	pushd .. || die
+	tar -czf "${OCT_PACKAGE}" "${PKGDIR}" || die
 }
 
 # @FUNCTION: octaveforge_src_install
 # @DESCRIPTION:
 # function to install the octave package
 octaveforge_src_install() {
-	DESTDIR="${D}" edo _octaveforge_pkg_install
+	DESTDIR="${D}" _octaveforge_pkg_install || die
 }
 
 octaveforge_src_test() {
-	DESTDIR="${T}" edo _octaveforge_pkg_install
+	DESTDIR="${T}" _octaveforge_pkg_install || die
 
 	# cargo culted from Fedora
 	cmd="
@@ -118,7 +118,7 @@ octaveforge_src_test() {
 		unlink(pkg('local_list'));
 		unlink(pkg('global_list'));
 	"
-	edo octavecommand "${cmd}"
+	octavecommand "${cmd}" || die
 }
 
 # @FUNCTION: octaveforge_pkg_postinst
@@ -127,10 +127,10 @@ octaveforge_src_test() {
 octaveforge_pkg_postinst() {
 	einfo "Registering ${CATEGORY}/${PF} on the Octave package database."
 	if [[ ! -d "${OCT_PKGDIR}" ]] ; then
-		edo mkdir -p "${OCT_PKGDIR}"
+		mkdir -p "${OCT_PKGDIR}" || die
 	fi
 	cmd="pkg('rebuild');"
-	edo octavecommand "${cmd}"
+	octavecommand "${cmd}" || die
 }
 
 # @FUNCTION: octaveforge_pkg_prerm
@@ -143,16 +143,16 @@ octaveforge_pkg_prerm() {
 		l = pkg('list');
 		disp(l{cellfun(@(x)strcmp(x.name,'${PN}'),l)}.dir);
 	"
-	oct_pkgdir=$(edo octavecommand "${cmd}")
-	edo rm -f "${oct_pkgdir}/packinfo/on_uninstall.m"
+	oct_pkgdir=$(octavecommand "${cmd}" || die)
+	rm -f "${oct_pkgdir}/packinfo/on_uninstall.m" || die
 	if [[ -e "${oct_pkgdir}/packinfo/on_uninstall.m.orig" ]]; then
-		edo mv "$oct_pkgdir"/packinfo/on_uninstall.m{.orig,}
-		edo pushd "$oct_pkgdir/packinfo"
+		mv "$oct_pkgdir"/packinfo/on_uninstall.m{.orig,} || die
+		pushd "$oct_pkgdir/packinfo" || die
 		cmd="
 			l = pkg('list');
 			on_uninstall(l{cellfun(@(x)strcmp(x.name,'${PN}'), l)});
 		"
-		edo octavecommand "${cmd}"
+		octavecommand "${cmd}" || die
 	fi
 }
 
@@ -162,7 +162,7 @@ octaveforge_pkg_prerm() {
 octaveforge_pkg_postrm() {
 	einfo 'Rebuilding the Octave package database.'
 	if [[ ! -d "${OCT_PKGDIR}" ]] ; then
-		edo mkdir -p "${OCT_PKGDIR}"
+		mkdir -p "${OCT_PKGDIR}" || die
 	fi
 	cmd="pkg('rebuild');"
 	edo "${OCT_BIN}" -H --silent --no-gui --eval "${cmd}"
@@ -173,7 +173,7 @@ octavecommand() {
 }
 
 _generate_configure() {
-	edo cat << EOF > configure
+	cat << EOF > configure || die
 #! /bin/sh -f
 
 if [ -e src/configure ]; then
@@ -181,14 +181,14 @@ if [ -e src/configure ]; then
   ./configure $*
 fi
 EOF
-	edo chmod 0755 "configure"
+	chmod 0755 "configure" || die
 }
 
 _octaveforge_pkg_install() {
 	TMPDIR="${T}"
 	DISTPKG='Gentoo'
 
-	edo pushd ../
+	pushd ../ || die
 	if [[ "X${DISTPKG}X" != "XX" ]]; then
 		stripcmd="
 			unlink(pkg('local_list'));
@@ -203,19 +203,19 @@ _octaveforge_pkg_install() {
 			disp(l{cellfun(@(x)strcmp(x.name,'${PN}'),l)}.dir);
 			${stripcmd}
 		"
-		edo oct_pkgdir=$(edo octavecommand "${cmd}")
+		oct_pkgdir=$(octavecommand "${cmd}" || die)
 	else
 		cmd="disp(fullfile(__octave_config_info__('datadir'),'octave'));"
-		shareprefix=${DESTDIR}/$(edo octavecommand "${cmd}")
+		shareprefix=${DESTDIR}/$(octavecommand "${cmd}" || die)
 		cmd="disp(fullfile(__octave_config_info__('libdir'),'octave'));"
-		libprefix=${DESTDIR}/$(edo octavecommand "${cmd}")
+		libprefix=${DESTDIR}/$(octavecommand "${cmd}" || die)
 		octprefix="${shareprefix}/packages"
 		archprefix="${libprefix}/packages"
 		if [[ ! -e "${octprefix}" ]]; then
-			edo mkdir -p "${octprefix}"
+			mkdir -p "${octprefix}" || die
 		fi
 		if [[ ! -e "${archprefix}" ]]; then
-			edo mkdir -p "${archprefix}"
+			mkdir -p "${archprefix}" || die
 		fi
 		cmd="
 			warning('off','all');
@@ -224,7 +224,7 @@ _octaveforge_pkg_install() {
 			pkg('local_list',fullfile('${shareprefix}','octave_packages'));
 			pkg('install','-nodeps','-verbose','${OCT_PACKAGE}');
 		"
-		edo octavecommand "${cmd}"
+		octavecommand "${cmd}" || die
 		cmd="
 			warning('off','all');
 			pkg('prefix','${octprefix}','${archprefix}');
@@ -234,7 +234,7 @@ _octaveforge_pkg_install() {
 			disp(l{cellfun(@(x)strcmp(x.name,'${PN}'),l)}.dir);
 			${stripcmd}
 		"
-		oct_pkgdir=$(edo octavecommand "${cmd}")
+		oct_pkgdir=$(octavecommand "${cmd}" || die)
 	fi
 	export oct_pkgdir
 }


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2022-06-14  9:12 Alessandro Barbieri
  0 siblings, 0 replies; 180+ messages in thread
From: Alessandro Barbieri @ 2022-06-14  9:12 UTC (permalink / raw
  To: gentoo-commits

commit:     390cdd54fada331960fa08571194e5e9fba960e9
Author:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
AuthorDate: Tue Jun 14 09:10:58 2022 +0000
Commit:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
CommitDate: Tue Jun 14 09:10:58 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=390cdd54

octaveforge.eclass: remove octave detection

Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>

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

diff --git a/eclass/octaveforge.eclass b/eclass/octaveforge.eclass
index 6f74951a6..0e2c16604 100644
--- a/eclass/octaveforge.eclass
+++ b/eclass/octaveforge.eclass
@@ -38,8 +38,8 @@ OCT_PKGDIR="${OCT_ROOT}/packages"
 
 # @ECLASS-VARIABLE: OCT_BIN
 # @DESCRIPTION:
-# full path to octave binary
-OCT_BIN="$(type -p octave || die)"
+# octave binary name
+OCT_BIN="octave"
 
 SRC_URI="mirror://sourceforge/octave/${P}.tar.gz"
 SLOT="0"


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2022-06-15 22:41 Alessandro Barbieri
  0 siblings, 0 replies; 180+ messages in thread
From: Alessandro Barbieri @ 2022-06-15 22:41 UTC (permalink / raw
  To: gentoo-commits

commit:     41174ff1268cc6585e7a770dc4f61b8ee4a77335
Author:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
AuthorDate: Wed Jun 15 22:40:41 2022 +0000
Commit:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
CommitDate: Wed Jun 15 22:40:41 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=41174ff1

R-packages.eclass: only suggest packages on non binary merge

Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>

 eclass/R-packages.eclass | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/eclass/R-packages.eclass b/eclass/R-packages.eclass
index 1aa612403..aed8cce84 100644
--- a/eclass/R-packages.eclass
+++ b/eclass/R-packages.eclass
@@ -137,12 +137,14 @@ R-packages_src_install() {
 # @DESCRIPTION:
 # function that will prompt to install the suggested packages if they exist
 R-packages_pkg_postinst() {
-	if [[ -v SUGGESTED_PACKAGES ]]; then
-		for p in ${SUGGESTED_PACKAGES} ; do
-			pexist="$(pquery -n1 ${p} 2>/dev/null || die)"
-			if [[ -n "${pexist}" ]]; then
-				optfeature "having the upstream suggested package" "${p}"
-			fi
-		done
+	if [[ ${MERGE_TYPE} != binary ]]; then
+		if [[ -v SUGGESTED_PACKAGES ]]; then
+			for p in ${SUGGESTED_PACKAGES} ; do
+				pexist="$(pquery -n1 ${p} 2>/dev/null || die)"
+				if [[ -n "${pexist}" ]]; then
+					optfeature "having the upstream suggested package" "${p}"
+				fi
+			done
+		fi
 	fi
 }


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2022-06-25 17:43 Anna Vyalkova
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Vyalkova @ 2022-06-25 17:43 UTC (permalink / raw
  To: gentoo-commits

commit:     598d011fca2332523f6a2bf506647fc44f2f031d
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Sat Jun 25 15:46:59 2022 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Sat Jun 25 17:42:15 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=598d011f

boinc-app.eclass: fix paths and permissions

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 eclass/boinc-app.eclass | 36 +++++++++++++++++++++++++++---------
 1 file changed, 27 insertions(+), 9 deletions(-)

diff --git a/eclass/boinc-app.eclass b/eclass/boinc-app.eclass
index 496dbb337..8478c373d 100644
--- a/eclass/boinc-app.eclass
+++ b/eclass/boinc-app.eclass
@@ -1,4 +1,4 @@
-# Copyright 2021 Gentoo Authors
+# Copyright 2021-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 # @ECLASS: boinc-app.eclass
@@ -142,6 +142,21 @@ get_project_root() {
 	echo "$(get_boincdir)/projects/$(get_project_dirname)"
 }
 
+# @FUNCTION: _boinc-app_fix_permissions
+# @USAGE:
+# @INTERNAL
+# @DESCRIPTION:
+# Fix owner and permissions for the project root.
+_boinc-app_fix_permissions() {
+	local paths=(
+		$(get_boincdir)
+		$(get_boincdir)/projects
+		$(get_project_root)
+	)
+	fowners boinc:boinc "${paths[@]}"
+	fperms 0771 "${paths[@]}"
+}
+
 # @FUNCTION: boinc-app_appinfo_prepare
 # @USAGE: <writable app_info.xml>
 # @DESCRIPTION:
@@ -151,7 +166,7 @@ boinc-app_appinfo_prepare() {
 	debug-print-function ${FUNCNAME} "${@}"]
 
 	sed -i "$1" \
-		-e "s:%PV%:${PV}:g" \
+		-e "s:@PV@:${PV}:g" \
 		|| die "app_info.xml sed failed"
 }
 
@@ -199,6 +214,8 @@ doappinfo() {
 		insopts -m 0644 --owner boinc --group boinc
 		doins "${T}"/app_info.xml
 	) || die "failed to install app_info.xml"
+
+	_boinc-app_fix_permissions
 }
 
 # @FUNCTION: boinc-wrapper_foreach_wrapper_job
@@ -263,10 +280,12 @@ dowrapper() {
 		( # subshell to avoid pollution of calling environment
 			insinto $(get_project_root)
 			insopts -m 0644 --owner boinc --group boinc
-			doins "${T}"/${wrapperjob}
+			doins "${T}/${wrapperjob}"
 			dosym -r /usr/bin/boinc-wrapper "$(get_project_root)/${wrapperexe}"
 		) || die "failed to install '${app}' wrapper app"
 	done
+
+	_boinc-app_fix_permissions
 }
 
 # @FUNCTION: boinc-app_pkg_postinst
@@ -276,8 +295,8 @@ dowrapper() {
 boinc-app_pkg_postinst() {
 	debug-print-function ${FUNCNAME} "${@}"]
 
-	if [[ -f "${EROOT}$(get_boincdir)/master_$(get_project_dirname).xml" ]]; then
-		if [[ ! ${REPLACING_VERSIONS} ]]; then
+	if [[ -f "${EROOT}/$(get_boincdir)/master_$(get_project_dirname).xml" ]]; then
+		if [[ -z ${REPLACING_VERSIONS} ]]; then
 			# most likely replacing applications downloaded
 			# by the BOINC client from project's website
 			elog "Restart the BOINC daemon for changes to take place:"
@@ -311,14 +330,13 @@ boinc-app_pkg_postinst() {
 boinc-app_pkg_postrm() {
 	debug-print-function ${FUNCNAME} "${@}"]
 
-	if [[ ! ${REPLACED_BY_VERSION} ]]; then
+	if [[ -z ${REPLACING_VERSIONS} ]]; then
 		local gui_rpc_auth="$(get_boincdir)/gui_rpc_auth.cfg"
-		local passwd=$(cat "${EROOT}${gui_rpc_auth}")
-		if [[ ! ${passwd} ]]; then
+		local passwd=$(cat "${EROOT}/${gui_rpc_auth}" 2>/dev/null)
+		if [[ -z ${passwd} ]]; then
 			passwd="\$(cat ${gui_rpc_auth})"
 		fi
 
-		elog
 		elog "You should detach this project from the BOINC client"
 		elog "to stop current tasks and delete remaining project files:"
 		elog


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2022-06-25 17:43 Anna Vyalkova
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Vyalkova @ 2022-06-25 17:43 UTC (permalink / raw
  To: gentoo-commits

commit:     47f2165f2a6d508043fcaef37bb94d36ca4eaf10
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Sat Jun 25 15:57:08 2022 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Sat Jun 25 17:42:16 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=47f2165f

boinc.eclass: use edo eclass

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 eclass/boinc.eclass | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/eclass/boinc.eclass b/eclass/boinc.eclass
index cf5cd8515..73aa24fe7 100644
--- a/eclass/boinc.eclass
+++ b/eclass/boinc.eclass
@@ -1,4 +1,4 @@
-# Copyright 2021 Gentoo Authors
+# Copyright 2021-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 # @ECLASS: boinc.eclass
@@ -34,7 +34,7 @@ esac
 
 if [[ ! ${_BOINC_ECLASS} ]]; then
 
-inherit autotools toolchain-funcs
+inherit autotools edo toolchain-funcs
 
 fi
 
@@ -199,8 +199,7 @@ boinc_src_configure() {
 	boinc_builddir_check
 	pushd "${BOINC_BUILD_DIR}" >/dev/null || die
 
-	bash ./generate_svn_version.sh || \
-		die "generating svn_version.h failed"
+	edo bash ./generate_svn_version.sh
 
 	if [[ ${_BOINC_RUN_AUTOTOOLS} ]]; then
 		econf "${_BOINC_ECONF_ARGS[@]}"


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2022-06-25 19:42 Anna Vyalkova
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Vyalkova @ 2022-06-25 19:42 UTC (permalink / raw
  To: gentoo-commits

commit:     4edaff1836f43fc50d07deaf7e4b26fc80608c80
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Sat Jun 25 19:16:00 2022 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Sat Jun 25 19:40:35 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=4edaff18

boinc-app.eclass: set owner to root

Don't let BOINC client remove our files.

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 eclass/boinc-app.eclass | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/eclass/boinc-app.eclass b/eclass/boinc-app.eclass
index 8478c373d..2b6fc5e40 100644
--- a/eclass/boinc-app.eclass
+++ b/eclass/boinc-app.eclass
@@ -191,7 +191,7 @@ boinc-app_appinfo_prepare() {
 # 	doappinfo "${FILESDIR}"/app_info_${PV}.xml
 #
 #	exeinto $(get_project_root)
-# 	exeopts -m 0755 --owner boinc --group boinc
+# 	exeopts -m 0755 --owner root --group boinc
 # 	newexe bin/${PN} example_app_v${PV}
 # }
 # @CODE
@@ -211,7 +211,7 @@ doappinfo() {
 
 	( # subshell to avoid pollution of calling environment
 		insinto $(get_project_root)
-		insopts -m 0644 --owner boinc --group boinc
+		insopts -m 0644 --owner root --group boinc
 		doins "${T}"/app_info.xml
 	) || die "failed to install app_info.xml"
 
@@ -279,7 +279,7 @@ dowrapper() {
 
 		( # subshell to avoid pollution of calling environment
 			insinto $(get_project_root)
-			insopts -m 0644 --owner boinc --group boinc
+			insopts -m 0644 --owner root --group boinc
 			doins "${T}/${wrapperjob}"
 			dosym -r /usr/bin/boinc-wrapper "$(get_project_root)/${wrapperexe}"
 		) || die "failed to install '${app}' wrapper app"
@@ -330,7 +330,7 @@ boinc-app_pkg_postinst() {
 boinc-app_pkg_postrm() {
 	debug-print-function ${FUNCNAME} "${@}"]
 
-	if [[ -z ${REPLACING_VERSIONS} ]]; then
+	if [[ -z ${REPLACED_BY_VERSION} ]]; then
 		local gui_rpc_auth="$(get_boincdir)/gui_rpc_auth.cfg"
 		local passwd=$(cat "${EROOT}/${gui_rpc_auth}" 2>/dev/null)
 		if [[ -z ${passwd} ]]; then
@@ -341,6 +341,7 @@ boinc-app_pkg_postrm() {
 		elog "to stop current tasks and delete remaining project files:"
 		elog
 		elog "$ boinccmd --passwd ${passwd} --project ${BOINC_MASTER_URL} detach"
+		elog
 	fi
 }
 


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2022-06-26  2:36 Alessandro Barbieri
  0 siblings, 0 replies; 180+ messages in thread
From: Alessandro Barbieri @ 2022-06-26  2:36 UTC (permalink / raw
  To: gentoo-commits

commit:     1a5c41863841d242001fd2d398f054fa6de807e0
Author:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
AuthorDate: Wed Jun 22 02:44:38 2022 +0000
Commit:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
CommitDate: Sun Jun 26 02:29:44 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=1a5c4186

cannadic.eclass: add cannadic eclass

Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>

 eclass/cannadic.eclass | 149 +++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 149 insertions(+)

diff --git a/eclass/cannadic.eclass b/eclass/cannadic.eclass
new file mode 100644
index 000000000..4e8914f39
--- /dev/null
+++ b/eclass/cannadic.eclass
@@ -0,0 +1,149 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# @ECLASS: cannadic.eclass
+# @MAINTAINER:
+# Alessandro Barbieri <lssndrbarbieri@gmail.com>
+# @AUTHOR:
+# Mamoru KOMACHI <usata@gentoo.org>
+# @SUPPORTED_EAPIS: 8
+# @BLURB: Function for Canna compatible dictionaries
+# @DESCRIPTION:
+# The cannadic eclass is used for installation and setup of Canna
+# compatible dictionaries.
+
+case ${EAPI} in
+	8) ;;
+	*) die "EAPI=${EAPI:-0} is not supported" ;;
+esac
+
+EXPORT_FUNCTIONS src_install pkg_postinst pkg_postrm
+
+if [[ -z ${_CANNADIC_ECLASS} ]]; then
+_CANNADIC_ECLASS=1
+
+SRC_URI="mirror://gentoo/${P}.tar.gz"
+
+# You don't need to modify these
+readonly _CANNADIC_CANNA_DIR="/var/lib/canna/dic/canna"
+readonly _CANNADIC_DICS_DIR="/etc/canna/dics.dir.d/"
+
+# @FUNCTION: cannadic-install
+# @DESCRIPTION:
+# Installs dictionaries to ${EPREFIX}/var/lib/canna/dic/canna
+cannadic-install() {
+	insinto ${_CANNADIC_CANNA_DIR}
+	insopts -m 0664 -o canna -g canna
+	doins "${@}"
+}
+
+# @FUNCTION: dicsdir-install
+# @DESCRIPTION:
+# Installs dics.dir from ${DICSDIRFILE}
+dicsdir-install() {
+	insinto ${_CANNADIC_DICS_DIR}
+	doins ${DICSDIRFILE}
+}
+
+# @FUNCTION: cannadic_src_install
+# @DESCRIPTION:
+# Installs all dictionaries under ${WORKDIR}
+# plus dics.dir and docs
+cannadic_src_install() {
+	keepdir ${_CANNADIC_CANNA_DIR}
+	fowners canna:canna ${_CANNADIC_CANNA_DIR}
+	fperms 0775 ${_CANNADIC_CANNA_DIR}
+
+	local f
+	for f in *.c[btl]d *.t; do
+		if [[ -s ${f} ]]; then
+			cannadic-install "${f}"
+		fi
+	done 2> /dev/null
+
+	dicsdir-install
+
+	einstalldocs
+}
+
+# @FUNCTION: update-cannadic-dir
+# @DESCRIPTION:
+# Updates dics.dir for Canna Server, script for this part taken from Debian GNU/Linux
+#
+#  compiles dics.dir files for Canna Server
+#  Copyright 2001 ISHIKAWA Mutsumi
+#  Licensed under the GNU General Public License, version 2.  See the file
+#  /usr/portage/license/GPL-2 or <http://www.gnu.org/copyleft/gpl.txt>.
+update-cannadic-dir() {
+	einfo
+	einfo "Updating dics.dir for Canna ..."
+	einfo
+
+	# write new dics.dir file in case we are interrupted
+	cat <<-EOF > "${EROOT}${_CANNADIC_CANNA_DIR}/dics.dir.update-new" || die
+		# dics.dir -- automatically generated file by Portage.
+		# DO NOT EDIT BY HAND.
+	EOF
+
+	local f
+	for f in "${EROOT}${_CANNADIC_DICS_DIR}"/*.dics.dir; do
+		echo "# ${f}" >> "${EROOT}${_CANNADIC_CANNA_DIR}/dics.dir.update-new" || die
+		cat "${f}" >> "${EROOT}${_CANNADIC_CANNA_DIR}/dics.dir.update-new" || die
+		einfo "Added ${f}."
+	done
+
+	mv "${EROOT}${_CANNADIC_CANNA_DIR}/dics.dir.update-new" "${EROOT}${_CANNADIC_CANNA_DIR}/dics.dir" || die
+
+	einfo
+	einfo "Done."
+	einfo
+}
+
+# @FUNCTION: cannadic_pkg_postinst
+# @DESCRIPTION:
+# Updates dics.dir and print out notice after install
+cannadic_pkg_postinst() {
+	debug-print-function ${FUNCNAME} "${@}"
+
+	update-cannadic-dir
+
+	einfo "Please restart cannaserver for changes to propagate."
+	einfo "You need to modify your config file (~/.canna) to enable dictionaries."
+
+	if [[ -n ${CANNADICS} ]]; then
+		einfo "e.g) add"
+		einfo
+		einfo "  $(IFS=' ' ; echo ${CANNADICS[*]})"
+		einfo
+		einfo "to section use-dictionary()."
+		einfo "For details, see documents under ${EROOT}/usr/share/doc/${PF}."
+	fi
+
+	einfo "If you do not have ~/.canna, you can find sample files in ${EROOT}/usr/share/canna."
+	ewarn "If you are upgrading from existing dictionary, you may need to recreate"
+	ewarn "user dictionary if you have one."
+}
+
+# @FUNCTION: cannadic_pkg_postrm
+# @DESCRIPTION:
+# Updates dics.dir and print out notice after uninstall
+cannadic_pkg_postrm() {
+	debug-print-function ${FUNCNAME} "${@}"
+
+	update-cannadic-dir
+
+	einfo "Please restart cannaserver for changes to propagate."
+	einfo "and modify your config file (~/.canna) to disable dictionary."
+
+	if [[ -n ${CANNADICS} ]]; then
+		einfo "e.g) delete"
+		einfo
+		einfo "  $(IFS=' ' ; echo ${CANNADICS[*]})"
+		einfo
+		einfo "from section use-dictionary()."
+	fi
+
+	einfo
+}
+
+fi


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2022-06-29 11:52 Anna Vyalkova
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Vyalkova @ 2022-06-29 11:52 UTC (permalink / raw
  To: gentoo-commits

commit:     d34b616bfc616418be86dab44d53f9397665a7bc
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Wed Jun 29 07:13:20 2022 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Wed Jun 29 11:52:26 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=d34b616b

eclass/nim-utils.eclass: new eclass

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 eclass/nim-utils.eclass | 115 ++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 115 insertions(+)

diff --git a/eclass/nim-utils.eclass b/eclass/nim-utils.eclass
new file mode 100644
index 000000000..12b077452
--- /dev/null
+++ b/eclass/nim-utils.eclass
@@ -0,0 +1,115 @@
+# Copyright 2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# @ECLASS: nim-utils.eclass
+# @MAINTAINER:
+# Anna Vyalkova <cyber+gentoo@sysrq.in>
+# @AUTHOR:
+# Anna Vyalkova <cyber+gentoo@sysrq.in>
+# @SUPPORTED_EAPIS: 8
+# @BLURB: utility functions for Nim packages
+# @DESCRIPTION:
+# A utility eclass providing functions to call and configure Nim.
+#
+# This eclass does not set any metadata variables nor export any phase
+# functions. It can be inherited safely.
+
+case ${EAPI} in
+	8) ;;
+	*) die "${ECLASS}: EAPI ${EAPI} unsupported."
+esac
+
+if [[ ! ${_NIM_UTILS_ECLASS} ]]; then
+
+# @ECLASS_VARIABLE: NIMFLAGS
+# @USER_VARIABLE
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# Flags for the Nim compiler.
+
+# @ECLASS_VARIABLE: TESTAMENT_DISABLE_MEGATEST
+# @USER_VARIABLE
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# If set, pass '--megatest:off' to testament.
+
+# @VARIABLE: ETESTAMENT_DESELECT
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# Specifies an array of test files to be deselected via testament's --skipFrom
+# parameter, when calling etestament.
+
+inherit multiprocessing toolchain-funcs xdg-utils
+
+# @FUNCTION: enim
+# @USAGE: [<args>...]
+# @DESCRIPTION:
+# Call nim, passing the supplied arguments.
+# This function dies if nim fails. It also supports being called via 'nonfatal'.
+# If you need to call nim directly in your ebuilds, this is the way it should
+# be done.
+enim() {
+	debug-print-function ${FUNCNAME} "${@}"
+
+	set -- nim "${@}"
+	echo "$@" >&2
+	"$@" || die -n "${*} failed"
+}
+
+# @FUNCTION: etestament
+# @USAGE: [<args>...]
+# @DESCRIPTION:
+# Call testament, passing the supplied arguments.
+# This function dies if testament fails.
+etestament() {
+	debug-print-function ${FUNCNAME} "${@}"
+
+	local -a testament_args=()
+	[[ ${TESTAMENT_DISABLE_MEGATEST} ]] && \
+		testament_args+=( --megatest:off )
+
+	[[ "${NOCOLOR}" == true || "${NOCOLOR}" == yes ]] && \
+		testament_args+=( --colors:off )
+
+	if [[ ${ETESTAMENT_DESELECT} ]]; then
+		local skipfile="${T}"/testament.skipfile
+		for t in "${ETESTAMENT_DESELECT[@]}"; do
+			echo "${t}" >> "${skipfile}"
+		done
+		testament_args+=( --skipFrom:"${skipfile}" )
+	fi
+
+	set -- testament "${testament_args[@]}" "${@}"
+	echo "$@" >&2
+	"$@" || die -n "${*} failed"
+}
+
+# @FUNCTION: nim_gen_config
+# @USAGE:
+# @DESCRIPTION:
+# Generate the ${WORKDIR}/nim.cfg to respect user's toolchain and preferences.
+nim_gen_config() {
+	debug-print-function ${FUNCNAME} "${@}"
+
+	xdg_environment_reset
+
+	cat > "${WORKDIR}/nim.cfg" <<- EOF || die "Failed to create Nim config"
+	cc:"gcc"
+	gcc.exe:"$(tc-getCC)"
+	gcc.linkerexe:"$(tc-getCC)"
+	gcc.cpp.exe:"$(tc-getCXX)"
+	gcc.cpp.linkerexe:"$(tc-getCXX)"
+	gcc.options.always:"${CFLAGS} ${CPPFLAGS}"
+	gcc.options.linker:"${LDFLAGS}"
+	gcc.cpp.options.always:"${CFLAGS} ${CPPFLAGS}"
+	gcc.cpp.options.linker:"${LDFLAGS}"
+
+	$([[ "${NOCOLOR}" == true || "${NOCOLOR}" == yes ]] && echo '--colors:"off"')
+	-d:"release"
+	--parallelBuild:"$(makeopts_jobs)"
+	$(printf "%s\n" ${NIMFLAGS})
+	EOF
+}
+
+_NIM_UTILS_ECLASS=1
+fi


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2022-06-29 11:52 Anna Vyalkova
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Vyalkova @ 2022-06-29 11:52 UTC (permalink / raw
  To: gentoo-commits

commit:     56b12ae84dcc932450abcab8e2099582cf4e22c0
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Wed Jun 29 08:18:03 2022 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Wed Jun 29 11:52:32 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=56b12ae8

eclass/nimble.eclass: new eclass

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 eclass/nimble.eclass | 169 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 169 insertions(+)

diff --git a/eclass/nimble.eclass b/eclass/nimble.eclass
new file mode 100644
index 000000000..177a2fbd4
--- /dev/null
+++ b/eclass/nimble.eclass
@@ -0,0 +1,169 @@
+# Copyright 2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# @ECLASS: nimble.eclass
+# @MAINTAINER:
+# Anna Vyalkova <cyber+gentoo@sysrq.in>
+# @AUTHOR:
+# Anna Vyalkova <cyber+gentoo@sysrq.in>
+# @SUPPORTED_EAPIS: 8
+# @PROVIDES: nim-utils
+# @BLURB: eclass to build Nim packages that use nimble as a build system
+# @EXAMPLE:
+# Typical ebuild for a Nim application:
+#
+# EAPI=8
+#
+# inherit nimble
+#
+# ...
+#
+# src_compile() {
+# 	nimble_src_compile
+# 	nimble_build scss
+# }
+#
+# ...
+#
+#
+# Typical ebuild for a Nim library:
+#
+# EAPI=8
+#
+# inherit nimble
+#
+# ...
+# SLOT=${PV}
+#
+# set_package_url "https://github.com/example/example"
+
+
+case ${EAPI} in
+	8) ;;
+	*) die "${ECLASS}: EAPI ${EAPI} unsupported."
+esac
+
+if [[ ! ${_NIMBLE_ECLASS} ]]; then
+
+# @ECLASS_VARIABLE: BUILD_DIR
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# Build directory, location where all generated files should be placed.
+# If this isn't set, it defaults to ${WORKDIR}/${P}-build.
+
+inherit edo nim-utils ninja-utils
+
+BDEPEND="${NINJA_DEPEND}
+	dev-lang/nim
+	dev-nim/nimbus
+"
+
+# @FUNCTION: set_package_url
+# @USAGE: <url>
+# @DESCRIPTION:
+# If this function is called, nimbus will generate and install a nimblemeta.json
+# file.  Some packages specify their dependencies using URLs and nimbus is
+# unable to find them unless a metadata file exists.
+set_package_url() {
+	debug-print-function ${FUNCNAME} "${@}"
+
+	(( $# == 1 )) || \
+		die "${FUNCNAME} takes exactly one argument"
+
+	_PACKAGE_URL="${1}"
+}
+
+# @FUNCTION: get_package_url
+# @USAGE:
+# @INTERNAL
+# @RETURN: package URL
+get_package_url() {
+	echo "${_PACKAGE_URL}"
+}
+
+# @FUNCTION: nimble_src_configure
+# @USAGE:
+# @DESCRIPTION:
+# Configure the package with nimbus.  This will start an out-of-source build.
+# Passes arguments to Nim by reading from an optionally pre-defined local
+# mynimargs bash array.
+# @CODE
+# src_configure() {
+#       local mynimargs=(
+#               --threads:on
+#       )
+#       nimble_src_configure
+# }
+# @CODE
+nimble_src_configure() {
+	debug-print-function ${FUNCNAME} "${@}"
+
+	[[ -n "${NINJA_DEPEND}" ]] || \
+		ewarn "Unknown value '${NINJA}' for \${NINJA}"
+
+	BUILD_DIR="${BUILD_DIR:-${WORKDIR}/${P}-build}"
+
+	[[ -z ${mynimargs} ]] && local -a mynimargs=()
+	local mynimargstype=$(declare -p mynimargs 2>&-)
+	if [[ "${mynimargstype}" != "declare -a mynimargs="* ]]; then
+		die "mynimargs must be declared as array"
+	fi
+
+	nim_gen_config
+
+	local nimbusargs=(
+		--nimbleDir:"${EPREFIX}"/opt/nimble
+		--binDir:"${EPREFIX}"/usr/bin
+		--url:"$(get_package_url)"
+		"${mynimargs[@]}"
+	)
+
+	edo nimbus "${nimbusargs[@]}" "${S}" "${BUILD_DIR}"
+}
+
+# @FUNCTION: nimble_build
+# @USAGE: [ninja args...]
+# @DESCRIPTION:
+# Function for building the package.  All arguments are passed to eninja.
+nimble_build() {
+	debug-print-function ${FUNCNAME} "${@}"
+
+	eninja -C "${BUILD_DIR}" "${@}"
+}
+
+# @FUNCTION: nimble_src_compile
+# @USAGE: [ninja args...]
+# @DESCRIPTION:
+# Build the package with Ninja.  All arguments are passed to nimble_build.
+nimble_src_compile() {
+	debug-print-function ${FUNCNAME} "${@}"
+
+	nimble_build "${@}"
+}
+
+# @FUNCTION: nimble_src_test
+# @USAGE: [ninja args...]
+# @DESCRIPTION:
+# Test the package.  All arguments are passed to nimble_build.
+nimble_src_test() {
+	debug-print-function ${FUNCNAME} "${@}"
+
+	if nonfatal nimble_build test -n &> /dev/null; then
+		nimble_build test "${@}"
+	fi
+}
+
+# @FUNCTION: nimble_src_install
+# @DESCRIPTION:
+# Install the package with Ninja.  All arguments are passed to nimble_build.
+nimble_src_install() {
+	debug-print-function ${FUNCNAME} "${@}"
+
+	DESTDIR="${D}" nimble_build install "${@}"
+	einstalldocs
+}
+
+_NIMBLE_ECLASS=1
+fi
+
+EXPORT_FUNCTIONS src_configure src_compile src_test src_install


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2022-06-30  6:01 Anna Vyalkova
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Vyalkova @ 2022-06-30  6:01 UTC (permalink / raw
  To: gentoo-commits

commit:     b7324e1773240c86b267b5086afed0dae91d1144
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Wed Jun 29 19:20:52 2022 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Thu Jun 30 06:00:02 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=b7324e17

nimble.eclass: force ninja

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 eclass/nimble.eclass | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/eclass/nimble.eclass b/eclass/nimble.eclass
index 177a2fbd4..1a6dc24af 100644
--- a/eclass/nimble.eclass
+++ b/eclass/nimble.eclass
@@ -51,6 +51,12 @@ if [[ ! ${_NIMBLE_ECLASS} ]]; then
 # Build directory, location where all generated files should be placed.
 # If this isn't set, it defaults to ${WORKDIR}/${P}-build.
 
+# @ECLASS_VARIABLE: NINJA
+# @INTERNAL
+# @DESCRIPTION:
+# Force ninja because samu doesn't work correctly.
+NINJA="ninja"
+
 inherit edo nim-utils ninja-utils
 
 BDEPEND="${NINJA_DEPEND}


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2022-06-30  6:01 Anna Vyalkova
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Vyalkova @ 2022-06-30  6:01 UTC (permalink / raw
  To: gentoo-commits

commit:     9228cc58d0ff44a3c82fee30c56fbf9d4aae540e
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Wed Jun 29 20:26:52 2022 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Thu Jun 30 06:00:04 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=9228cc58

nimble.eclass: drop edo

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

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

diff --git a/eclass/nimble.eclass b/eclass/nimble.eclass
index 60bd28689..4c80bd2a9 100644
--- a/eclass/nimble.eclass
+++ b/eclass/nimble.eclass
@@ -57,7 +57,7 @@ if [[ ! ${_NIMBLE_ECLASS} ]]; then
 # Force ninja because samu doesn't work correctly.
 NINJA="ninja"
 
-inherit edo nim-utils ninja-utils
+inherit nim-utils ninja-utils
 
 BDEPEND="${NINJA_DEPEND}
 	dev-lang/nim
@@ -138,7 +138,9 @@ nimble_src_configure() {
 		"${mynimargs[@]}"
 	)
 
-	edo nimbus "${nimbusargs[@]}" "${S}" "${BUILD_DIR}"
+	set -- nimbus "${nimbusargs[@]}" "${S}" "${BUILD_DIR}"
+	echo "${@}" >&2
+	"${@}" || die "${*} failed"
 }
 
 # @FUNCTION: nimble_build


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2022-06-30  6:01 Anna Vyalkova
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Vyalkova @ 2022-06-30  6:01 UTC (permalink / raw
  To: gentoo-commits

commit:     c4c4ee8ac824c1f83c963e9ca9c0055a2d3ec5bb
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Wed Jun 29 19:52:19 2022 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Thu Jun 30 06:00:03 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=c4c4ee8a

nimble.eclass: add nimble_comment_requires

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 eclass/nimble.eclass | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/eclass/nimble.eclass b/eclass/nimble.eclass
index 1a6dc24af..60bd28689 100644
--- a/eclass/nimble.eclass
+++ b/eclass/nimble.eclass
@@ -87,6 +87,20 @@ get_package_url() {
 	echo "${_PACKAGE_URL}"
 }
 
+# @FUNCTION: nimble_comment_requires
+# @USAGE: <dep...>
+# @DESCRIPTION:
+# Comment out one or more 'requires' calls in the Nimble file.
+nimble_comment_requires() {
+	debug-print-function ${FUNCNAME} "${@}"
+
+	local dep
+	for dep in "${@}"; do
+		dep=${dep//\//\\/}
+		sed "/requires[[:space:]]*\"${dep}\>.*\"/ s/^/#/" -i *.nimble || die
+	done
+}
+
 # @FUNCTION: nimble_src_configure
 # @USAGE:
 # @DESCRIPTION:


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2022-07-05 20:09 Anna Vyalkova
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Vyalkova @ 2022-07-05 20:09 UTC (permalink / raw
  To: gentoo-commits

commit:     e37134486b981ff92ac029b08eb5f0284ce8f8ef
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Mon Jul  4 02:53:43 2022 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Tue Jul  5 20:02:20 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=e3713448

nim-utils.eclass: create testament skipfile once

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 eclass/nim-utils.eclass | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/eclass/nim-utils.eclass b/eclass/nim-utils.eclass
index 12b077452..eb03c0fc5 100644
--- a/eclass/nim-utils.eclass
+++ b/eclass/nim-utils.eclass
@@ -73,9 +73,11 @@ etestament() {
 
 	if [[ ${ETESTAMENT_DESELECT} ]]; then
 		local skipfile="${T}"/testament.skipfile
-		for t in "${ETESTAMENT_DESELECT[@]}"; do
-			echo "${t}" >> "${skipfile}"
-		done
+		if [[ ! -f ${skipfile} ]]; then
+			for t in "${ETESTAMENT_DESELECT[@]}"; do
+				echo "${t}" >> "${skipfile}"
+			done
+		fi
 		testament_args+=( --skipFrom:"${skipfile}" )
 	fi
 


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2022-07-05 20:09 Anna Vyalkova
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Vyalkova @ 2022-07-05 20:09 UTC (permalink / raw
  To: gentoo-commits

commit:     fc290a76fe3d1b2fb5f7c1cdfb77bf14e2290ac9
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Sat Jul  2 11:43:56 2022 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Tue Jul  5 20:02:19 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=fc290a76

qbs.eclass: use raw-ldflags from flag-o-matic

* use meson-format-array instead of bash function
* move EXPORT_FUNCTIONS at the end of file

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 eclass/qbs.eclass | 43 +++++++++----------------------------------
 1 file changed, 9 insertions(+), 34 deletions(-)

diff --git a/eclass/qbs.eclass b/eclass/qbs.eclass
index af5709e26..c2c892440 100644
--- a/eclass/qbs.eclass
+++ b/eclass/qbs.eclass
@@ -19,13 +19,7 @@ esac
 
 if [[ ! ${_QBS_ECLASS} ]]; then
 
-inherit multiprocessing toolchain-funcs qmake-utils
-
-fi
-
-EXPORT_FUNCTIONS src_configure src_compile src_install
-
-if [[ ! ${_QBS_ECLASS} ]]; then
+inherit flag-o-matic multiprocessing toolchain-funcs qmake-utils
 
 # @ECLASS_VARIABLE: QBS_COMMAND_ECHO_MODE
 # @USER_VARIABLE
@@ -42,7 +36,10 @@ if [[ ! ${_QBS_ECLASS} ]]; then
 # - command-line-with-environment
 : ${QBS_COMMAND_ECHO_MODE:=command-line}
 
-BDEPEND="dev-util/qbs"
+BDEPEND="
+	dev-util/meson-format-array
+	dev-util/qbs
+"
 
 # @FUNCTION: eqbs
 # @USAGE: [<qbs args>...]
@@ -64,31 +61,7 @@ eqbs() {
 # @USAGE: [<flags>...]
 # @RETURN: arguments quoted and separated by comma
 _flags_to_js_array() {
-	if [[ ! ${@} ]]; then
-		echo "[]"
-	else
-		local -a array
-		printf -v array "'%s', " "${@}"
-		echo "[${array%, }]"
-	fi
-}
-
-# @FUNCTION: _filter_ldflags
-# @INTERNAL
-# @USAGE: [<ldflags>...]
-# @RETURN: flags for the linker (with -Wl and -Xlinker removed)
-_filter_ldflags() {
-	local -a flags
-	while [[ ${@} ]]; do
-		if [[ ${1} == -Wl,* ]]; then
-			IFS=, read -ra flags <<< "${1#-Wl,}"
-			printf "%s " "${flags[@]}"
-		elif [[ ${1} == -Xlinker ]]; then
-			shift
-			printf "%s " "${1}"
-		fi
-		shift
-	done
+	meson-format-array "${@}" || die
 }
 
 # @FUNCTION: qbs_src_configure
@@ -121,7 +94,7 @@ qbs_src_configure() {
 	qbs_config cpp.cFlags "$(_flags_to_js_array ${CFLAGS})"
 	qbs_config cpp.cppFlags "$(_flags_to_js_array ${CPPFLAGS})"
 	qbs_config cpp.cxxFlags "$(_flags_to_js_array ${CXXFLAGS})"
-	qbs_config cpp.linkerFlags "$(_flags_to_js_array $(_filter_ldflags ${LDFLAGS}))"
+	qbs_config cpp.linkerFlags "$(_flags_to_js_array $(raw-ldflags))"
 }
 
 # @FUNCTION: qbs_config
@@ -188,3 +161,5 @@ qbs_src_install() {
 
 _QBS_ECLASS=1
 fi
+
+EXPORT_FUNCTIONS src_configure src_compile src_install


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2022-07-05 20:09 Anna Vyalkova
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Vyalkova @ 2022-07-05 20:09 UTC (permalink / raw
  To: gentoo-commits

commit:     0a28bb60561f9c947c4641355832ddef2cfc870a
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Mon Jul  4 04:50:42 2022 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Tue Jul  5 20:08:56 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=0a28bb60

nimble.eclass: fixup for blank package URL

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 eclass/nimble.eclass | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/eclass/nimble.eclass b/eclass/nimble.eclass
index 4c80bd2a9..20e9f5a5a 100644
--- a/eclass/nimble.eclass
+++ b/eclass/nimble.eclass
@@ -134,10 +134,12 @@ nimble_src_configure() {
 	local nimbusargs=(
 		--nimbleDir:"${EPREFIX}"/opt/nimble
 		--binDir:"${EPREFIX}"/usr/bin
-		--url:"$(get_package_url)"
 		"${mynimargs[@]}"
 	)
 
+	[[ -n "$(get_package_url)" ]] && \
+		nimbusargs+=( --url:"$(get_package_url)" )
+
 	set -- nimbus "${nimbusargs[@]}" "${S}" "${BUILD_DIR}"
 	echo "${@}" >&2
 	"${@}" || die "${*} failed"


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2022-07-10  3:36 Anna Vyalkova
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Vyalkova @ 2022-07-10  3:36 UTC (permalink / raw
  To: gentoo-commits

commit:     88cc11da55f9224341be015595d62397bc535b4d
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Sun Jul 10 03:36:07 2022 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Sun Jul 10 03:36:07 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=88cc11da

boinc-app.eclass: add acct-user deps

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 eclass/boinc-app.eclass | 29 ++++++++++++++++-------------
 1 file changed, 16 insertions(+), 13 deletions(-)

diff --git a/eclass/boinc-app.eclass b/eclass/boinc-app.eclass
index 2b6fc5e40..540fc8ea0 100644
--- a/eclass/boinc-app.eclass
+++ b/eclass/boinc-app.eclass
@@ -5,7 +5,7 @@
 # @MAINTAINER:
 # Anna Vyalkova <cyber+gentoo@sysrq.in>
 # @SUPPORTED_EAPIS: 8
-# @BLURB: Eclass that provides base functions for installing BOINC applications.
+# @BLURB: base functions for installing BOINC applications
 # @DESCRIPTION:
 # This eclass provides base functions for installation of software developed
 # for the BOINC platform.
@@ -77,7 +77,7 @@ in order to use this application with BOINC.}
 # Generate appropriate (R)DEPEND for wrapper-enabled or
 # native application.
 boinc-app_add_deps() {
-	debug-print-function ${FUNCNAME} "${@}"]
+	debug-print-function ${FUNCNAME} "${@}"
 
 	if [[ $1 == "--wrapper" ]]; then
 		RDEPEND="sci-misc/boinc-wrapper"
@@ -85,6 +85,9 @@ boinc-app_add_deps() {
 		DEPEND="sci-misc/boinc"
 		RDEPEND="sci-misc/boinc"
 	fi
+
+	DEPEND="${DEPEND} acct-user/boinc"
+	RDEPEND="${RDEPEND} acct-user/boinc"
 }
 
 # @FUNCTION: boinc_master_url_check
@@ -92,9 +95,9 @@ boinc-app_add_deps() {
 # @DESCRIPTION:
 # Make sure BOINC_MASTER_URL has a value.
 boinc_master_url_check() {
-	debug-print-function ${FUNCNAME} "${@}"]
+	debug-print-function ${FUNCNAME} "${@}"
 
-	[[ ! ${BOINC_MASTER_URL} ]] && \
+	[[ -n ${BOINC_MASTER_URL} ]] || \
 		die "BOINC_MASTER_URL is not set"
 	return 0
 }
@@ -103,7 +106,7 @@ boinc_master_url_check() {
 # @USAGE:
 # @RETURN: non-prefixed default BOINC runtime directory
 get_boincdir() {
-	debug-print-function ${FUNCNAME} "${@}"]
+	debug-print-function ${FUNCNAME} "${@}"
 
 	echo /var/lib/boinc
 }
@@ -121,7 +124,7 @@ get_boincdir() {
 # -> boinc.berkeley.edu_example
 # @CODE
 get_project_dirname() {
-	debug-print-function ${FUNCNAME} "${@}"]
+	debug-print-function ${FUNCNAME} "${@}"
 
 	boinc_master_url_check
 
@@ -137,7 +140,7 @@ get_project_dirname() {
 # @USAGE:
 # @RETURN: non-prefixed directory where applications and files should be installed
 get_project_root() {
-	debug-print-function ${FUNCNAME} "${@}"]
+	debug-print-function ${FUNCNAME} "${@}"
 
 	echo "$(get_boincdir)/projects/$(get_project_dirname)"
 }
@@ -163,7 +166,7 @@ _boinc-app_fix_permissions() {
 # The default appinfo_prepare(). It replaces all occurences
 # of @PV@ with its corresponding value.
 boinc-app_appinfo_prepare() {
-	debug-print-function ${FUNCNAME} "${@}"]
+	debug-print-function ${FUNCNAME} "${@}"
 
 	sed -i "$1" \
 		-e "s:@PV@:${PV}:g" \
@@ -196,7 +199,7 @@ boinc-app_appinfo_prepare() {
 # }
 # @CODE
 doappinfo() {
-	debug-print-function ${FUNCNAME} "${@}"]
+	debug-print-function ${FUNCNAME} "${@}"
 
 	(( $# == 1 )) || \
 		die "${FUNCNAME} takes exactly one argument"
@@ -224,7 +227,7 @@ doappinfo() {
 # The default foreach_wrapper_job(). It replaces all occurences
 # of @PV@, @EPREFIX@ and @LIBDIR@ strings with their corresponding values.
 boinc-wrapper_foreach_wrapper_job() {
-	debug-print-function ${FUNCNAME} "${@}"]
+	debug-print-function ${FUNCNAME} "${@}"
 
 	sed -i "$1" \
 		-e "s:@PV@:${PV}:g" \
@@ -260,7 +263,7 @@ boinc-wrapper_foreach_wrapper_job() {
 #
 # Keep your job.xml files in sync with app_info.xml!
 dowrapper() {
-	debug-print-function ${FUNCNAME} "${@}"]
+	debug-print-function ${FUNCNAME} "${@}"
 
 	for app in "$@"; do
 		local wrapperjob="${app}_job_${PV}.xml"
@@ -293,7 +296,7 @@ dowrapper() {
 # Display helpful instructions on how to make the BOINC client use installed
 # applications.
 boinc-app_pkg_postinst() {
-	debug-print-function ${FUNCNAME} "${@}"]
+	debug-print-function ${FUNCNAME} "${@}"
 
 	if [[ -f "${EROOT}/$(get_boincdir)/master_$(get_project_dirname).xml" ]]; then
 		if [[ -z ${REPLACING_VERSIONS} ]]; then
@@ -328,7 +331,7 @@ boinc-app_pkg_postinst() {
 # Display helpful instructions on how to cleanly uninstall unmerged
 # applications.
 boinc-app_pkg_postrm() {
-	debug-print-function ${FUNCNAME} "${@}"]
+	debug-print-function ${FUNCNAME} "${@}"
 
 	if [[ -z ${REPLACED_BY_VERSION} ]]; then
 		local gui_rpc_auth="$(get_boincdir)/gui_rpc_auth.cfg"


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2022-07-12 12:06 Robert Greener
  0 siblings, 0 replies; 180+ messages in thread
From: Robert Greener @ 2022-07-12 12:06 UTC (permalink / raw
  To: gentoo-commits

commit:     5c61b9e3558712d0ac800e56eb0347c66ae51582
Author:     Robert Greener <me <AT> r0bert <DOT> dev>
AuthorDate: Wed Jul  6 12:21:39 2022 +0000
Commit:     Robert Greener <me <AT> r0bert <DOT> dev>
CommitDate: Tue Jul 12 12:05:31 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=5c61b9e3

eclass/R-packages: Add CRAN_PV

Add a variable CRAN_PV which defaults to PV, but can be overridden in
the ebuild. This is useful for the case where the version number is
something like "1.2-24" as it often is with R packages, this would mean
that a variable like "CRAN_PV=$(ver_rs 2 -)" could be defined in the
ebuild, which is used in the SRC_URI of the eclass. If CRAN_PV isn't
defined, it just defaults to PV.

Signed-off-by: Robert Greener <me <AT> r0bert.dev>

 eclass/R-packages.eclass | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/eclass/R-packages.eclass b/eclass/R-packages.eclass
index aed8cce84..982920f43 100644
--- a/eclass/R-packages.eclass
+++ b/eclass/R-packages.eclass
@@ -21,7 +21,9 @@ esac
 
 EXPORT_FUNCTIONS src_unpack src_prepare src_configure src_compile src_install pkg_postinst
 
-SRC_URI="mirror://cran/src/contrib/${PN}_${PV}.tar.gz"
+CRAN_PV=${CRAN_PV:-$PV}
+
+SRC_URI="mirror://cran/src/contrib/${PN}_${CRAN_PV}.tar.gz"
 HOMEPAGE="https://cran.r-project.org/package=${PN}"
 
 SLOT="0"


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2022-07-12 12:06 Robert Greener
  0 siblings, 0 replies; 180+ messages in thread
From: Robert Greener @ 2022-07-12 12:06 UTC (permalink / raw
  To: gentoo-commits

commit:     4d1f8fd68327ea9eb6cf3ec4623dbfb0fc4d526c
Author:     Robert Greener <me <AT> r0bert <DOT> dev>
AuthorDate: Wed Jul  6 12:21:41 2022 +0000
Commit:     Robert Greener <me <AT> r0bert <DOT> dev>
CommitDate: Tue Jul 12 12:05:31 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=4d1f8fd6

eclass/R-packages: Add CRAN_SNAPSHOT_DATE and use MRAN.

The current SRC_URI searches all the CRAN mirrors for
/src/contrib/${PN}_${PV}.tar.gz. This is problematic. Once a package is updated
on CRAN, the package is removed from this path and moved to
/src/contrib/Archive/${PN}/${PN}_${PV}.tar.gz. The effect of this is
that once a package goes out-of-date on CRAN, the ebuild will no longer
build. This significantly increases the maintenance burden of dev-R/*
packages, as it requires that they be up-to-date at all times.

The proposal here, is to use the snapshots of CRAN provided by
Microsoft. This requires an additional variable set in the ebuilds, the
update date. This can just be set to the date that the ebuild is
updated. By setting this, out of date packages will continue to build.

Signed-off-by: Robert Greener <me <AT> r0bert.dev>

 eclass/R-packages.eclass | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/eclass/R-packages.eclass b/eclass/R-packages.eclass
index 1665203d1..ec730a9a3 100644
--- a/eclass/R-packages.eclass
+++ b/eclass/R-packages.eclass
@@ -24,7 +24,15 @@ EXPORT_FUNCTIONS src_unpack src_prepare src_configure src_compile src_install pk
 CRAN_PV=${CRAN_PV:-$PV}
 CRAN_PN=${CRAN_PN:-${PN//_/.}}
 
-SRC_URI="mirror://cran/src/contrib/${CRAN_PN}_${CRAN_PV}.tar.gz"
+# Set CRAN_SNAPSHOT_DATE to the date the ebuild was updated in the ebuild
+
+if [[ ${CRAN_SNAPSHOT_DATE} ]]; then
+	SRC_URI="https://cran.microsoft.com/snapshot/${CRAN_SNAPSHOT_DATE}"
+else
+	SRC_URI="mirror://cran"
+fi
+SRC_URI+="/src/contrib/${CRAN_PN}_${CRAN_PV}.tar.gz"
+
 HOMEPAGE="https://cran.r-project.org/package=${CRAN_PN}"
 
 SLOT="0"


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2022-07-12 12:06 Robert Greener
  0 siblings, 0 replies; 180+ messages in thread
From: Robert Greener @ 2022-07-12 12:06 UTC (permalink / raw
  To: gentoo-commits

commit:     e21f5c3ad3a7fa683e2f95939dbb2c08d361e44c
Author:     Robert Greener <me <AT> r0bert <DOT> dev>
AuthorDate: Wed Jul  6 12:21:42 2022 +0000
Commit:     Robert Greener <me <AT> r0bert <DOT> dev>
CommitDate: Tue Jul 12 12:05:31 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=e21f5c3a

eclass/R-packages: Add Robert Greener (myself) as author

Signed-off-by: Robert Greener <me <AT> r0bert.dev>

 eclass/R-packages.eclass | 1 +
 1 file changed, 1 insertion(+)

diff --git a/eclass/R-packages.eclass b/eclass/R-packages.eclass
index ec730a9a3..55febf2ba 100644
--- a/eclass/R-packages.eclass
+++ b/eclass/R-packages.eclass
@@ -7,6 +7,7 @@
 # Denis Dupeyron <calchan@gentoo.org>
 # Benda Xu <heroxbd@gentoo.org>
 # Alessandro Barbieri <lssndrbarbieri@gmail.com>
+# Robert Greener <me@r0bert.dev>
 # @BLURB: eclass to build R packages
 # @MAINTAINER:
 # Alessandro Barbieri <lssndrbarbieri@gmail.com>


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2022-07-12 12:06 Robert Greener
  0 siblings, 0 replies; 180+ messages in thread
From: Robert Greener @ 2022-07-12 12:06 UTC (permalink / raw
  To: gentoo-commits

commit:     632562820965f4181b281852b7b4943c6fbdbf1a
Author:     Robert Greener <me <AT> r0bert <DOT> dev>
AuthorDate: Wed Jul  6 12:21:40 2022 +0000
Commit:     Robert Greener <me <AT> r0bert <DOT> dev>
CommitDate: Tue Jul 12 12:05:31 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=63256282

eclass/R-packages: Add CRAN_PN variable

This can be overridden in the ebuilds, but if its not defined it is the
package name with _ substituted with periods. This maintains the
existing behaviour.

Signed-off-by: Robert Greener <me <AT> r0bert.dev>

 eclass/R-packages.eclass | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/eclass/R-packages.eclass b/eclass/R-packages.eclass
index 982920f43..1665203d1 100644
--- a/eclass/R-packages.eclass
+++ b/eclass/R-packages.eclass
@@ -22,9 +22,10 @@ esac
 EXPORT_FUNCTIONS src_unpack src_prepare src_configure src_compile src_install pkg_postinst
 
 CRAN_PV=${CRAN_PV:-$PV}
+CRAN_PN=${CRAN_PN:-${PN//_/.}}
 
-SRC_URI="mirror://cran/src/contrib/${PN}_${CRAN_PV}.tar.gz"
-HOMEPAGE="https://cran.r-project.org/package=${PN}"
+SRC_URI="mirror://cran/src/contrib/${CRAN_PN}_${CRAN_PV}.tar.gz"
+HOMEPAGE="https://cran.r-project.org/package=${CRAN_PN}"
 
 SLOT="0"
 
@@ -50,8 +51,8 @@ _movelink() {
 # function to unpack R packages into the right folder
 R-packages_src_unpack() {
 	unpack ${A}
-	if [[ -d "${PN//_/.}" ]] && [[ ! -d "${P}" ]]; then
-		mv "${PN//_/.}" "${P}" || die
+	if [[ -d "${CRAN_PN}" ]] && [[ ! -d "${P}" ]]; then
+		mv "${CRAN_PN}" "${P}" || die
 	fi
 }
 
@@ -101,7 +102,7 @@ R-packages_src_compile() {
 # documentation and examples to docsdir, symlinked back to R site-library (to allow access from within R)
 # everything else to R site-library
 R-packages_src_install() {
-	pushd "${T}/R/${PN//_/.}" || die
+	pushd "${T}/R/${CRAN_PN}" || die
 
 	local DOCS_DIR="/usr/share/doc/${PF}"
 
@@ -132,7 +133,7 @@ R-packages_src_install() {
 	rm -rf tests test || die
 
 	insinto "/usr/$(get_libdir)/R/site-library"
-	doins -r "${T}/R/${PN//_/.}"
+	doins -r "${T}/R/${CRAN_PN}"
 }
 
 # @FUNCTION: R-packages_pkg_postinst


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2022-07-13  2:31 Anna Vyalkova
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Vyalkova @ 2022-07-13  2:31 UTC (permalink / raw
  To: gentoo-commits

commit:     241e405c26ffa4f415358a23448ca7e57aab2ea9
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Wed Jul 13 00:46:10 2022 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Wed Jul 13 00:58:36 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=241e405c

R-packages.eclass: simplify pkg_postinst

optfeature already checks whether a package has been installed.

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 eclass/R-packages.eclass | 25 +++++++++++++------------
 1 file changed, 13 insertions(+), 12 deletions(-)

diff --git a/eclass/R-packages.eclass b/eclass/R-packages.eclass
index 55febf2ba..32bbce52d 100644
--- a/eclass/R-packages.eclass
+++ b/eclass/R-packages.eclass
@@ -22,6 +22,13 @@ esac
 
 EXPORT_FUNCTIONS src_unpack src_prepare src_configure src_compile src_install pkg_postinst
 
+# @ECLASS_VARIABLE: SUGGESTED_PACKAGES
+# @DEPRECATED: none
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# String variable containing the list of upstream suggested packages.  Consider
+# using optfeature directly instead for more concise descriptions.
+
 CRAN_PV=${CRAN_PV:-$PV}
 CRAN_PN=${CRAN_PN:-${PN//_/.}}
 
@@ -40,7 +47,6 @@ SLOT="0"
 
 DEPEND="dev-lang/R"
 RDEPEND="${DEPEND}"
-BDEPEND="sys-apps/pkgcore"
 
 # @FUNCTION: _movelink
 # @INTERNAL
@@ -146,17 +152,12 @@ R-packages_src_install() {
 }
 
 # @FUNCTION: R-packages_pkg_postinst
+# @DEPRECATED: optfeature
 # @DESCRIPTION:
-# function that will prompt to install the suggested packages if they exist
+# Prompt to install the upstream suggested packages (if they exist).  Consider
+# calling "optfeature" directly instead for concise descriptions.
 R-packages_pkg_postinst() {
-	if [[ ${MERGE_TYPE} != binary ]]; then
-		if [[ -v SUGGESTED_PACKAGES ]]; then
-			for p in ${SUGGESTED_PACKAGES} ; do
-				pexist="$(pquery -n1 ${p} 2>/dev/null || die)"
-				if [[ -n "${pexist}" ]]; then
-					optfeature "having the upstream suggested package" "${p}"
-				fi
-			done
-		fi
-	fi
+	for p in ${SUGGESTED_PACKAGES}; do
+		optfeature "having the upstream suggested package" "${p}"
+	done
 }


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2022-07-13  2:31 Anna Vyalkova
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Vyalkova @ 2022-07-13  2:31 UTC (permalink / raw
  To: gentoo-commits

commit:     0f61fe1fa5aeded2608f47d688bfadfcc3f09fb5
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Wed Jul 13 01:00:16 2022 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Wed Jul 13 01:00:16 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=0f61fe1f

R-packages.eclass: document CRAN_PV

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 eclass/R-packages.eclass | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/eclass/R-packages.eclass b/eclass/R-packages.eclass
index d399da9b0..f18c23e8d 100644
--- a/eclass/R-packages.eclass
+++ b/eclass/R-packages.eclass
@@ -29,7 +29,11 @@ inherit edo eutils optfeature toolchain-funcs
 # String variable containing the list of upstream suggested packages.  Consider
 # using optfeature directly instead for more concise descriptions.
 
-CRAN_PV=${CRAN_PV:-$PV}
+# @ECLASS_VARIABLE: CRAN_PV
+# @DESCRIPTION:
+# Package version to use for fetching distfiles from CRAN.
+: ${CRAN_PV:=${PV}}
+
 CRAN_PN=${CRAN_PN:-${PN//_/.}}
 
 # Set CRAN_SNAPSHOT_DATE to the date the ebuild was updated in the ebuild


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2022-07-13  2:31 Anna Vyalkova
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Vyalkova @ 2022-07-13  2:31 UTC (permalink / raw
  To: gentoo-commits

commit:     8ece3a840b18eda8a9ade86c93765b7dc154ba2a
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Wed Jul 13 00:57:29 2022 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Wed Jul 13 00:58:36 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=8ece3a84

R-packages.eclass: EAPI 8 support

Add inherit guard.

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 eclass/R-packages.eclass | 19 ++++++++++++-------
 1 file changed, 12 insertions(+), 7 deletions(-)

diff --git a/eclass/R-packages.eclass b/eclass/R-packages.eclass
index 32bbce52d..d399da9b0 100644
--- a/eclass/R-packages.eclass
+++ b/eclass/R-packages.eclass
@@ -3,24 +3,24 @@
 
 # @ECLASS: R-packages.eclass
 # @AUTHOR:
+# Alessandro Barbieri <lssndrbarbieri@gmail.com>
 # André Erdmann <dywi@mailerd.de>
-# Denis Dupeyron <calchan@gentoo.org>
 # Benda Xu <heroxbd@gentoo.org>
-# Alessandro Barbieri <lssndrbarbieri@gmail.com>
+# Denis Dupeyron <calchan@gentoo.org>
 # Robert Greener <me@r0bert.dev>
 # @BLURB: eclass to build R packages
 # @MAINTAINER:
 # Alessandro Barbieri <lssndrbarbieri@gmail.com>
-# @SUPPORTED_EAPIS: 7
-
-inherit edo eutils optfeature toolchain-funcs
+# @SUPPORTED_EAPIS: 7 8
 
 case ${EAPI} in
-	7) ;;
+	7|8) ;;
 	*) die "${ECLASS}: EAPI ${EAPI} unsupported."
 esac
 
-EXPORT_FUNCTIONS src_unpack src_prepare src_configure src_compile src_install pkg_postinst
+if [ ! ${_R_PACKAGES_ECLASS} ]; then
+
+inherit edo eutils optfeature toolchain-funcs
 
 # @ECLASS_VARIABLE: SUGGESTED_PACKAGES
 # @DEPRECATED: none
@@ -161,3 +161,8 @@ R-packages_pkg_postinst() {
 		optfeature "having the upstream suggested package" "${p}"
 	done
 }
+
+_R_PACKAGES_ECLASS=1
+fi
+
+EXPORT_FUNCTIONS src_unpack src_prepare src_configure src_compile src_install pkg_postinst


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2022-07-13  2:31 Anna Vyalkova
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Vyalkova @ 2022-07-13  2:31 UTC (permalink / raw
  To: gentoo-commits

commit:     0856cd9540a57e9af56ccc6f456b00d50db7f3bb
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Wed Jul 13 02:08:52 2022 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Wed Jul 13 02:08:52 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=0856cd95

R-packages.eclass: create ${T}/R in src_configure

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 eclass/R-packages.eclass | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/eclass/R-packages.eclass b/eclass/R-packages.eclass
index 2f1ad3368..d701a9e5e 100644
--- a/eclass/R-packages.eclass
+++ b/eclass/R-packages.eclass
@@ -89,17 +89,19 @@ R-packages_src_unpack() {
 
 # @FUNCTION: R-packages_src_prepare
 # @DESCRIPTION:
-# function to remove unwanted files from the sources
+# Remove unwanted files from the sources.
 R-packages_src_prepare() {
+	default_src_prepare
+
 	rm -f LICENSE || die
-	default
-	mkdir -p "${T}/R" || die
 }
 
 # @FUNCTION: R-packages_src_configure
 # @DESCRIPTION:
-# dummy function to disable configure
-R-packages_src_configure() { :; }
+# Set up temporary directories.
+R-packages_src_configure() {
+	mkdir "${T}"/R || die
+}
 
 # @FUNCTION: R-packages_src_compile
 # @DESCRIPTION:


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2022-07-13  2:31 Anna Vyalkova
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Vyalkova @ 2022-07-13  2:31 UTC (permalink / raw
  To: gentoo-commits

commit:     e98af0285b14fd83da83642401f68c7cf2e807b1
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Wed Jul 13 01:10:05 2022 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Wed Jul 13 01:10:05 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=e98af028

R-packages.eclass: document CRAN_SNAPSHOT_DATE

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 eclass/R-packages.eclass | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/eclass/R-packages.eclass b/eclass/R-packages.eclass
index c8b5329f6..ad76d1206 100644
--- a/eclass/R-packages.eclass
+++ b/eclass/R-packages.eclass
@@ -29,6 +29,12 @@ inherit edo eutils optfeature toolchain-funcs
 # String variable containing the list of upstream suggested packages.  Consider
 # using optfeature directly instead for more concise descriptions.
 
+# @ECLASS_VARIABLE: CRAN_SNAPSHOT_DATE
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# The date the ebuild was updated in YYYY-MM-DD format used to fetch distfiles
+# from Microsoft CRAN mirror.  This will be required in the future.
+
 # @ECLASS_VARIABLE: CRAN_PN
 # @DESCRIPTION:
 # Package name to use for fetching distfiles from CRAN.
@@ -39,8 +45,6 @@ inherit edo eutils optfeature toolchain-funcs
 # Package version to use for fetching distfiles from CRAN.
 : ${CRAN_PV:=${PV}}
 
-# Set CRAN_SNAPSHOT_DATE to the date the ebuild was updated in the ebuild
-
 if [[ ${CRAN_SNAPSHOT_DATE} ]]; then
 	SRC_URI="https://cran.microsoft.com/snapshot/${CRAN_SNAPSHOT_DATE}"
 else


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2022-07-13  2:31 Anna Vyalkova
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Vyalkova @ 2022-07-13  2:31 UTC (permalink / raw
  To: gentoo-commits

commit:     4db1815c13016850709599100c0416edb55aa3f1
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Wed Jul 13 01:01:41 2022 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Wed Jul 13 01:01:41 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=4db1815c

R-packages.eclass: document CRAN_PN

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 eclass/R-packages.eclass | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/eclass/R-packages.eclass b/eclass/R-packages.eclass
index f18c23e8d..c8b5329f6 100644
--- a/eclass/R-packages.eclass
+++ b/eclass/R-packages.eclass
@@ -29,13 +29,16 @@ inherit edo eutils optfeature toolchain-funcs
 # String variable containing the list of upstream suggested packages.  Consider
 # using optfeature directly instead for more concise descriptions.
 
+# @ECLASS_VARIABLE: CRAN_PN
+# @DESCRIPTION:
+# Package name to use for fetching distfiles from CRAN.
+: ${CRAN_PN:=${PN//_/.}}
+
 # @ECLASS_VARIABLE: CRAN_PV
 # @DESCRIPTION:
 # Package version to use for fetching distfiles from CRAN.
 : ${CRAN_PV:=${PV}}
 
-CRAN_PN=${CRAN_PN:-${PN//_/.}}
-
 # Set CRAN_SNAPSHOT_DATE to the date the ebuild was updated in the ebuild
 
 if [[ ${CRAN_SNAPSHOT_DATE} ]]; then


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2022-07-13  2:31 Anna Vyalkova
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Vyalkova @ 2022-07-13  2:31 UTC (permalink / raw
  To: gentoo-commits

commit:     bf247008c6a8fec5737d5d517277faef5706c12a
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Wed Jul 13 02:29:22 2022 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Wed Jul 13 02:29:22 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=bf247008

R-packages.eclass: src_prepare is no-op now

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 eclass/R-packages.eclass | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/eclass/R-packages.eclass b/eclass/R-packages.eclass
index 08d472a59..ed63cff46 100644
--- a/eclass/R-packages.eclass
+++ b/eclass/R-packages.eclass
@@ -88,12 +88,13 @@ R-packages_src_unpack() {
 }
 
 # @FUNCTION: R-packages_src_prepare
+# @DEPRECATED: none
 # @DESCRIPTION:
 # Remove unwanted files from the sources.
 R-packages_src_prepare() {
 	default_src_prepare
-
-	rm -f LICENSE || die
+	eqawarn "This ebuild uses R-packages_src_prepare which is no-op."
+	eqawarn "You can safely remove it."
 }
 
 # @FUNCTION: R-packages_src_configure
@@ -168,6 +169,7 @@ R-packages_src_install() {
 		popd || die
 	fi
 
+	rm -f LICENSE || die
 	rm -rf tests test || die
 
 	insinto /usr/$(get_libdir)/R/site-library
@@ -188,4 +190,4 @@ R-packages_pkg_postinst() {
 _R_PACKAGES_ECLASS=1
 fi
 
-EXPORT_FUNCTIONS src_unpack src_prepare src_configure src_compile src_install pkg_postinst
+EXPORT_FUNCTIONS src_unpack src_configure src_compile src_install pkg_postinst


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2022-07-13  2:31 Anna Vyalkova
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Vyalkova @ 2022-07-13  2:31 UTC (permalink / raw
  To: gentoo-commits

commit:     efa65ff5d83023ad9ae667b820eb49865930e017
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Wed Jul 13 02:04:43 2022 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Wed Jul 13 02:04:43 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=efa65ff5

R-packages.eclass: deprecate src_unpack

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 eclass/R-packages.eclass | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/eclass/R-packages.eclass b/eclass/R-packages.eclass
index cf59fcaf9..2f1ad3368 100644
--- a/eclass/R-packages.eclass
+++ b/eclass/R-packages.eclass
@@ -75,10 +75,13 @@ _movelink() {
 }
 
 # @FUNCTION: R-packages_src_unpack
+# @DEPRECATED: none
 # @DESCRIPTION:
-# function to unpack R packages into the right folder
+# Unpack R packages into the right folder.  Consider setting ${S} to appropriate
+# value instead.
 R-packages_src_unpack() {
-	unpack ${A}
+	default_src_unpack
+
 	if [[ -d "${CRAN_PN}" ]] && [[ ! -d "${P}" ]]; then
 		mv "${CRAN_PN}" "${P}" || die
 	fi


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2022-07-13  2:31 Anna Vyalkova
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Vyalkova @ 2022-07-13  2:31 UTC (permalink / raw
  To: gentoo-commits

commit:     3a3c39c62b98ba076f8c69368f183db69d4b0cae
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Wed Jul 13 02:14:43 2022 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Wed Jul 13 02:14:43 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=3a3c39c6

R-packages.eclass: use array in src_compile

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 eclass/R-packages.eclass | 43 +++++++++++++++++++++++--------------------
 1 file changed, 23 insertions(+), 20 deletions(-)

diff --git a/eclass/R-packages.eclass b/eclass/R-packages.eclass
index d701a9e5e..a9a275a22 100644
--- a/eclass/R-packages.eclass
+++ b/eclass/R-packages.eclass
@@ -105,27 +105,30 @@ R-packages_src_configure() {
 
 # @FUNCTION: R-packages_src_compile
 # @DESCRIPTION:
-# function that will pass some environment variables to R and then build/install the package
+# Pass build-related environment variables to R and then build/install the
+# package.
 R-packages_src_compile() {
-	MAKEFLAGS=" \
-		${MAKEFLAGS// /\\ } \
-		AR=$(tc-getAR) \
-		CC=$(tc-getCC) \
-		CPP=$(tc-getCPP) \
-		CXX=$(tc-getCXX) \
-		FC=$(tc-getFC) \
-		LD=$(tc-getLD) \
-		NM=$(tc-getNM) \
-		RANLIB=$(tc-getRANLIB) \
-		CFLAGS=${CFLAGS// /\\ } \
-		CPPFLAGS=${CPPFLAGS// /\\ } \
-		CXXFLAGS=${CXXFLAGS// /\\ } \
-		FFLAGS=${FFLAGS// /\\ } \
-		FCFLAGS=${FCFLAGS// /\\ } \
-		LDFLAGS=${LDFLAGS// /\\ } \
-		MAKEOPTS=${MAKEOPTS// /\\ } \
-	" \
-	edo R CMD INSTALL . -d -l "${T}/R" "--byte-compile"
+	local -a mymakeflags=(
+		"${MAKEFLAGS}"
+		AR="$(tc-getAR)"
+		CC="$(tc-getCC)"
+		CPP="$(tc-getCPP)"
+		CXX="$(tc-getCXX)"
+		FC="$(tc-getFC)"
+		LD="$(tc-getLD)"
+		NM="$(tc-getNM)"
+		RANLIB="$(tc-getRANLIB)"
+		CFLAGS="${CFLAGS}"
+		CPPFLAGS="${CPPFLAGS}"
+		CXXFLAGS="${CXXFLAGS}"
+		FFLAGS="${FFLAGS}"
+		FCFLAGS="${FCFLAGS}"
+		LDFLAGS="${LDFLAGS}"
+		MAKEOPTS="${MAKEOPTS}"
+	)
+
+	MAKEFLAGS="${mymakeflags[@]// /\\ }" \
+		edo R CMD INSTALL . -d -l "${T}"/R --byte-compile
 }
 
 


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2022-07-13  2:31 Anna Vyalkova
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Vyalkova @ 2022-07-13  2:31 UTC (permalink / raw
  To: gentoo-commits

commit:     dddaef5cdd914e9542fbed2ba24fd0ee167e4ae2
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Wed Jul 13 02:01:06 2022 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Wed Jul 13 02:01:45 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=dddaef5c

R-packages.eclass: name variables in _movelink

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 eclass/R-packages.eclass | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/eclass/R-packages.eclass b/eclass/R-packages.eclass
index ad76d1206..cf59fcaf9 100644
--- a/eclass/R-packages.eclass
+++ b/eclass/R-packages.eclass
@@ -61,14 +61,16 @@ RDEPEND="${DEPEND}"
 
 # @FUNCTION: _movelink
 # @INTERNAL
-# @USAGE: [<source> <dest>]
+# @USAGE: <source> <dest>
 # @DESCRIPTION:
 # <dest> will contain symlinks to everything in <source>
 _movelink() {
-	if [[ -e "${1}" ]]; then
-		local rp1="$(realpath ${1} || die)"
-		mv "${rp1}" "${2}" || die
-		cp -rsf "${2}" "${rp1}" || die
+	local source=${1}
+	local dest=${2}
+	if [[ -e "${source}" ]]; then
+		local rp_source="$(realpath ${source} || die)"
+		mv "${rp_source}" "${dest}" || die
+		cp -rsf "${dest}" "${rp_source}" || die
 	fi
 }
 


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2022-07-13  2:31 Anna Vyalkova
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Vyalkova @ 2022-07-13  2:31 UTC (permalink / raw
  To: gentoo-commits

commit:     6b49a5cb3c68c86754c229e5baa19c89fbe19e11
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Wed Jul 13 02:26:23 2022 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Wed Jul 13 02:26:23 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=6b49a5cb

R-packages.eclass: src_install improvements

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 eclass/R-packages.eclass | 44 +++++++++++++++++++++++---------------------
 1 file changed, 23 insertions(+), 21 deletions(-)

diff --git a/eclass/R-packages.eclass b/eclass/R-packages.eclass
index a9a275a22..08d472a59 100644
--- a/eclass/R-packages.eclass
+++ b/eclass/R-packages.eclass
@@ -134,42 +134,44 @@ R-packages_src_compile() {
 
 # @FUNCTION: R-packages_src_install
 # @DESCRIPTION:
-# function to move the files in the right folders
-# documentation and examples to docsdir, symlinked back to R site-library (to allow access from within R)
-# everything else to R site-library
+# Move files into right folders.
+#
+# Documentation and examples is moved to docdir, symlinked back to R
+# site-library (to allow access from within R).
+#
+# Everything else is moved to the R site-library.
 R-packages_src_install() {
-	pushd "${T}/R/${CRAN_PN}" || die
+	cd "${T}"/R/${CRAN_PN} || die
 
-	local DOCS_DIR="/usr/share/doc/${PF}"
+	local DOCDIR="/usr/share/doc/${PF}"
+	local EDOCDIR="${ED}${DOCDIR}"
+	mkdir -p "${EDOCDIR}" || die
 
-	mkdir -p "${ED}/${DOCS_DIR}" || die
-
-	for i in NEWS.md README.md DESCRIPTION examples CITATION INDEX NEWS WORDLIST News.Rd ; do
-		_movelink "${i}" "${ED}${DOCS_DIR}/${i}" || die
-		docompress -x "${DOCS_DIR}/${i}"
+	for i in {NEWS,README}.md DESCRIPTION CITATION INDEX NEWS WORDLIST News.Rd; do
+		_movelink "${i}" "${EDOCDIR}/${i}"
 	done
 
 	if [[ -e html ]]; then
-		_movelink html "${ED}${DOCS_DIR}/html" || die
-		docompress -x "${DOCS_DIR}/html"
+		_movelink html "${EDOCDIR}"/html
+	fi
+
+	if [[ -e examples ]]; then
+		_movelink examples "${EDOCDIR}"/examples
+		docompress -x "${DOCDIR}"/examples
 	fi
+
 	if [[ -e doc ]]; then
 		pushd doc || die
-		for i in * ; do
-			_movelink "${i}" "${ED}${DOCS_DIR}/${i}" || die
-			docompress -x "${DOCS_DIR}/${i}"
+		for i in *; do
+			_movelink "${i}" "${EDOCDIR}/${i}"
 		done
 		popd || die
 	fi
-	if [[ -e doc/html ]]; then
-		docompress -x "${DOCS_DIR}/html"
-	fi
-	docompress -x "${DOCS_DIR}"
 
 	rm -rf tests test || die
 
-	insinto "/usr/$(get_libdir)/R/site-library"
-	doins -r "${T}/R/${CRAN_PN}"
+	insinto /usr/$(get_libdir)/R/site-library
+	doins -r "${T}"/R/${CRAN_PN}
 }
 
 # @FUNCTION: R-packages_pkg_postinst


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2022-07-16 13:44 Anna Vyalkova
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Vyalkova @ 2022-07-16 13:44 UTC (permalink / raw
  To: gentoo-commits

commit:     c27eb43e0a473feba6038f4845881534047338ba
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Sat Jul 16 07:05:02 2022 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Sat Jul 16 13:44:07 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=c27eb43e

nim-utils.eclass: refine nim.cfg options

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 eclass/nim-utils.eclass | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/eclass/nim-utils.eclass b/eclass/nim-utils.eclass
index eb03c0fc5..951234d1b 100644
--- a/eclass/nim-utils.eclass
+++ b/eclass/nim-utils.eclass
@@ -101,9 +101,15 @@ nim_gen_config() {
 	gcc.linkerexe:"$(tc-getCC)"
 	gcc.cpp.exe:"$(tc-getCXX)"
 	gcc.cpp.linkerexe:"$(tc-getCXX)"
-	gcc.options.always:"${CFLAGS} ${CPPFLAGS}"
+	gcc.options.speed:"${CFLAGS}"
+	gcc.options.size:"${CFLAGS}"
+	gcc.options.debug:"${CFLAGS}"
+	gcc.options.always:"${CPPFLAGS}"
 	gcc.options.linker:"${LDFLAGS}"
-	gcc.cpp.options.always:"${CFLAGS} ${CPPFLAGS}"
+	gcc.cpp.options.speed:"${CXXFLAGS}"
+	gcc.cpp.options.size:"${CXXFLAGS}"
+	gcc.cpp.options.debug:"${CXXFLAGS}"
+	gcc.cpp.options.always:"${CPPFLAGS}"
 	gcc.cpp.options.linker:"${LDFLAGS}"
 
 	$([[ "${NOCOLOR}" == true || "${NOCOLOR}" == yes ]] && echo '--colors:"off"')


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2022-07-16 13:44 Anna Vyalkova
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Vyalkova @ 2022-07-16 13:44 UTC (permalink / raw
  To: gentoo-commits

commit:     96fbc7996e3eaa6775a0f8efc2122e3a3ba903df
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Sat Jul 16 07:11:41 2022 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Sat Jul 16 13:44:07 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=96fbc799

nim-utils.eclass: add NIMFLAGS example

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 eclass/nim-utils.eclass | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/eclass/nim-utils.eclass b/eclass/nim-utils.eclass
index 0106d9dfa..b85bba1d8 100644
--- a/eclass/nim-utils.eclass
+++ b/eclass/nim-utils.eclass
@@ -25,7 +25,12 @@ if [[ ! ${_NIM_UTILS_ECLASS} ]]; then
 # @USER_VARIABLE
 # @DEFAULT_UNSET
 # @DESCRIPTION:
-# Flags for the Nim compiler.
+# Flags for the Nim compiler.  All values (if any) must be double-quoted.
+# Example:
+#
+# @CODE@
+# # NIMFLAGS='-d:myFlag -d:myOpt:"value"' emerge category/package
+# @CODE@
 
 # @ECLASS_VARIABLE: TESTAMENT_DISABLE_MEGATEST
 # @USER_VARIABLE


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2022-07-16 13:44 Anna Vyalkova
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Vyalkova @ 2022-07-16 13:44 UTC (permalink / raw
  To: gentoo-commits

commit:     329f81b55286f9a72341b2402078fc4f0c46c8f9
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Sat Jul 16 07:26:33 2022 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Sat Jul 16 13:44:08 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=329f81b5

nim-utils.eclass: beautify NOCOLOR stuff

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 eclass/nim-utils.eclass | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/eclass/nim-utils.eclass b/eclass/nim-utils.eclass
index cdf1d78e3..2cc241ac3 100644
--- a/eclass/nim-utils.eclass
+++ b/eclass/nim-utils.eclass
@@ -104,6 +104,18 @@ nim_get_buildtype() {
 	fi
 }
 
+# @FUNCTION: nim_get_colors
+# @USAGE:
+# @RETURN: "off" if colors should be disabled, "on" otherwise
+nim_get_colors() {
+	debug-print-function ${FUNCNAME} "${@}"
+
+	case ${NOCOLOR} in
+		true|yes) echo "off" ;;
+		*)        echo "on" ;;
+	esac
+}
+
 # @FUNCTION: nim_gen_config
 # @USAGE: [<dir>]
 # @DESCRIPTION:
@@ -133,8 +145,8 @@ nim_gen_config() {
 	gcc.cpp.options.always:"${CPPFLAGS}"
 	gcc.cpp.options.linker:"${LDFLAGS}"
 
-	$([[ "${NOCOLOR}" == true || "${NOCOLOR}" == yes ]] && echo '--colors:"off"')
 	-d:"$(nim_get_buildtype)"
+	--colors:"$(nim_get_colors)"
 	--parallelBuild:"$(makeopts_jobs)"
 	$(printf "%s\n" ${NIMFLAGS})
 	EOF


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2022-07-16 13:44 Anna Vyalkova
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Vyalkova @ 2022-07-16 13:44 UTC (permalink / raw
  To: gentoo-commits

commit:     1f634424c72fad7a56f4a68716568bf13196a77c
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Sat Jul 16 07:29:15 2022 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Sat Jul 16 13:44:08 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=1f634424

nim-utils.eclass: beautify skipfile handling

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

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

diff --git a/eclass/nim-utils.eclass b/eclass/nim-utils.eclass
index 2cc241ac3..b5ce4d6b0 100644
--- a/eclass/nim-utils.eclass
+++ b/eclass/nim-utils.eclass
@@ -79,9 +79,9 @@ etestament() {
 	if [[ ${ETESTAMENT_DESELECT} ]]; then
 		local skipfile="${T}"/testament.skipfile
 		if [[ ! -f ${skipfile} ]]; then
-			for t in "${ETESTAMENT_DESELECT[@]}"; do
-				echo "${t}" >> "${skipfile}"
-			done
+			printf "%s\n" "${ETESTAMENT_DESELECT[@]}" > "${skipfile}"
+		else
+			debug-print "${skipfile} already exists, not overwriting"
 		fi
 		testament_args+=( --skipFrom:"${skipfile}" )
 	fi


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2022-07-16 13:44 Anna Vyalkova
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Vyalkova @ 2022-07-16 13:44 UTC (permalink / raw
  To: gentoo-commits

commit:     79aaa2458e6edc64df0e2e3f81135d7436cefa29
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Sat Jul 16 07:15:22 2022 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Sat Jul 16 13:44:08 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=79aaa245

nim-utils.eclass: allow debug builds

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 eclass/nim-utils.eclass | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/eclass/nim-utils.eclass b/eclass/nim-utils.eclass
index b85bba1d8..cdf1d78e3 100644
--- a/eclass/nim-utils.eclass
+++ b/eclass/nim-utils.eclass
@@ -91,6 +91,19 @@ etestament() {
 	"$@" || die -n "${*} failed"
 }
 
+# @FUNCTION: nim_get_buildtype
+# @USAGE:
+# @RETURN: build type (debug or release) based on USE flags
+nim_get_buildtype() {
+	debug-print-function ${FUNCNAME} "${@}"
+
+	if has debug ${IUSE}; then
+		echo $(usex debug "debug" "release")
+	else
+		echo "release"
+	fi
+}
+
 # @FUNCTION: nim_gen_config
 # @USAGE: [<dir>]
 # @DESCRIPTION:
@@ -121,7 +134,7 @@ nim_gen_config() {
 	gcc.cpp.options.linker:"${LDFLAGS}"
 
 	$([[ "${NOCOLOR}" == true || "${NOCOLOR}" == yes ]] && echo '--colors:"off"')
-	-d:"release"
+	-d:"$(nim_get_buildtype)"
 	--parallelBuild:"$(makeopts_jobs)"
 	$(printf "%s\n" ${NIMFLAGS})
 	EOF


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2022-07-16 13:44 Anna Vyalkova
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Vyalkova @ 2022-07-16 13:44 UTC (permalink / raw
  To: gentoo-commits

commit:     b70ece6ec5263b28ef71f9881759dfc2fa7ad4e0
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Sat Jul 16 07:08:16 2022 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Sat Jul 16 13:44:07 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=b70ece6e

nim-utils.eclass: allow generating nim.cfg in custom dir

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

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

diff --git a/eclass/nim-utils.eclass b/eclass/nim-utils.eclass
index 951234d1b..0106d9dfa 100644
--- a/eclass/nim-utils.eclass
+++ b/eclass/nim-utils.eclass
@@ -87,15 +87,18 @@ etestament() {
 }
 
 # @FUNCTION: nim_gen_config
-# @USAGE:
+# @USAGE: [<dir>]
 # @DESCRIPTION:
-# Generate the ${WORKDIR}/nim.cfg to respect user's toolchain and preferences.
+# Generate a nim.cfg file in <dir> (default: $WORKDIR) to respect user's
+# toolchain and preferences.
 nim_gen_config() {
 	debug-print-function ${FUNCNAME} "${@}"
 
 	xdg_environment_reset
 
-	cat > "${WORKDIR}/nim.cfg" <<- EOF || die "Failed to create Nim config"
+	local dir=${1:-${WORKDIR}}
+
+	cat > "${dir}"/nim.cfg <<- EOF || die "Failed to create Nim config"
 	cc:"gcc"
 	gcc.exe:"$(tc-getCC)"
 	gcc.linkerexe:"$(tc-getCC)"


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2022-07-16 21:08 Anna Vyalkova
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Vyalkova @ 2022-07-16 21:08 UTC (permalink / raw
  To: gentoo-commits

commit:     5c6cf732a610b270318ee0d9546f145d1bd48881
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Sat Jul 16 21:08:14 2022 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Sat Jul 16 21:08:14 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=5c6cf732

nim-utils.eclass: add ekoch helper

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 eclass/nim-utils.eclass | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/eclass/nim-utils.eclass b/eclass/nim-utils.eclass
index b5ce4d6b0..fae8bb292 100644
--- a/eclass/nim-utils.eclass
+++ b/eclass/nim-utils.eclass
@@ -61,6 +61,30 @@ enim() {
 	"$@" || die -n "${*} failed"
 }
 
+# @FUNCTION: ekoch
+# @USAGE: [<args>...]
+# @DESCRIPTION:
+# Call koch, passing the supplied arguments.  Used only for building compilers
+# that originate from Nim.
+# This function dies if koch fails.
+ekoch() {
+	debug-print-function ${FUNCNAME} "${@}"
+
+	local koch
+	case "${CATEGORY}/${PN}" in
+		dev-lang/nim)
+			koch="./koch"
+			[[ -e ${koch} ]] || enim c koch
+			;;
+		*)
+			eerror "${FUNCNAME} is not implemented for ${CATEGORY}/${PN}" ;;
+	esac
+
+	set -- ${koch} "${@}"
+	echo "$@" >&2
+	"$@" || die -n "${*} failed"
+}
+
 # @FUNCTION: etestament
 # @USAGE: [<args>...]
 # @DESCRIPTION:


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2022-07-19  6:07 Anna Vyalkova
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Vyalkova @ 2022-07-19  6:07 UTC (permalink / raw
  To: gentoo-commits

commit:     183aa05bdca90107022edf7ee1cbcccd07fc893b
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Tue Jul 19 06:07:06 2022 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Tue Jul 19 06:07:06 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=183aa05b

nim-utils.eclass: link bug

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 eclass/nim-utils.eclass | 1 +
 1 file changed, 1 insertion(+)

diff --git a/eclass/nim-utils.eclass b/eclass/nim-utils.eclass
index fae8bb292..743aa9877 100644
--- a/eclass/nim-utils.eclass
+++ b/eclass/nim-utils.eclass
@@ -148,6 +148,7 @@ nim_get_colors() {
 nim_gen_config() {
 	debug-print-function ${FUNCNAME} "${@}"
 
+	# bug 667182
 	xdg_environment_reset
 
 	local dir=${1:-${WORKDIR}}


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2022-07-19  6:07 Anna Vyalkova
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Vyalkova @ 2022-07-19  6:07 UTC (permalink / raw
  To: gentoo-commits

commit:     d7803c78b4f9b2a711a66a56378e1ce6df150afe
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Sun Jul 17 13:19:59 2022 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Tue Jul 19 05:57:46 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=d7803c78

nimble.eclass: use depfiles

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 eclass/nimble.eclass | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/eclass/nimble.eclass b/eclass/nimble.eclass
index 20e9f5a5a..e08c2840e 100644
--- a/eclass/nimble.eclass
+++ b/eclass/nimble.eclass
@@ -60,8 +60,8 @@ NINJA="ninja"
 inherit nim-utils ninja-utils
 
 BDEPEND="${NINJA_DEPEND}
-	dev-lang/nim
-	dev-nim/nimbus
+	dev-lang/nim[experimental(-)]
+	>=dev-nim/nimbus-1.0.0
 "
 
 # @FUNCTION: set_package_url
@@ -134,6 +134,7 @@ nimble_src_configure() {
 	local nimbusargs=(
 		--nimbleDir:"${EPREFIX}"/opt/nimble
 		--binDir:"${EPREFIX}"/usr/bin
+		--useDepfile
 		"${mynimargs[@]}"
 	)
 


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2022-07-19  6:33 Anna Vyalkova
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Vyalkova @ 2022-07-19  6:33 UTC (permalink / raw
  To: gentoo-commits

commit:     dd644b2fb8960c0481c41efe0215eb109bd29ffd
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Tue Jul 19 06:29:36 2022 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Tue Jul 19 06:33:01 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=dd644b2f

nim-utils.eclass: don't write NIMFLAGS to the config file

There are issues with strings containing spaces.

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 eclass/nim-utils.eclass | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/eclass/nim-utils.eclass b/eclass/nim-utils.eclass
index 743aa9877..bab1a55f4 100644
--- a/eclass/nim-utils.eclass
+++ b/eclass/nim-utils.eclass
@@ -25,11 +25,11 @@ if [[ ! ${_NIM_UTILS_ECLASS} ]]; then
 # @USER_VARIABLE
 # @DEFAULT_UNSET
 # @DESCRIPTION:
-# Flags for the Nim compiler.  All values (if any) must be double-quoted.
+# Flags for the Nim compiler.  Spaces need to be quoted or shell-escaped.
 # Example:
 #
 # @CODE@
-# # NIMFLAGS='-d:myFlag -d:myOpt:"value"' emerge category/package
+# # NIMFLAGS="-d:myFlag -d:myOpt:'my value'" emerge category/package
 # @CODE@
 
 # @ECLASS_VARIABLE: TESTAMENT_DISABLE_MEGATEST
@@ -49,14 +49,14 @@ inherit multiprocessing toolchain-funcs xdg-utils
 # @FUNCTION: enim
 # @USAGE: [<args>...]
 # @DESCRIPTION:
-# Call nim, passing the supplied arguments.
+# Call nim, passing the supplied arguments and NIMFLAGS.
 # This function dies if nim fails. It also supports being called via 'nonfatal'.
 # If you need to call nim directly in your ebuilds, this is the way it should
 # be done.
 enim() {
 	debug-print-function ${FUNCNAME} "${@}"
 
-	set -- nim "${@}"
+	set -- nim "${@}" ${NIMFLAGS}
 	echo "$@" >&2
 	"$@" || die -n "${*} failed"
 }
@@ -173,7 +173,6 @@ nim_gen_config() {
 	-d:"$(nim_get_buildtype)"
 	--colors:"$(nim_get_colors)"
 	--parallelBuild:"$(makeopts_jobs)"
-	$(printf "%s\n" ${NIMFLAGS})
 	EOF
 }
 


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2022-07-20  9:33 Anna Vyalkova
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Vyalkova @ 2022-07-20  9:33 UTC (permalink / raw
  To: gentoo-commits

commit:     16dab572c817e91990e26752a9734160062d974c
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Wed Jul 20 09:33:36 2022 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Wed Jul 20 09:33:36 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=16dab572

nim-utils.eclass: "|| die"

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 eclass/nim-utils.eclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eclass/nim-utils.eclass b/eclass/nim-utils.eclass
index bab1a55f4..61f25905b 100644
--- a/eclass/nim-utils.eclass
+++ b/eclass/nim-utils.eclass
@@ -103,7 +103,7 @@ etestament() {
 	if [[ ${ETESTAMENT_DESELECT} ]]; then
 		local skipfile="${T}"/testament.skipfile
 		if [[ ! -f ${skipfile} ]]; then
-			printf "%s\n" "${ETESTAMENT_DESELECT[@]}" > "${skipfile}"
+			printf "%s\n" "${ETESTAMENT_DESELECT[@]}" > "${skipfile}" || die
 		else
 			debug-print "${skipfile} already exists, not overwriting"
 		fi


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2022-11-05 14:41 Anna Vyalkova
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Vyalkova @ 2022-11-05 14:41 UTC (permalink / raw
  To: gentoo-commits

commit:     f0252164166f2b5005476664dd8c40f75afd9cba
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Fri Nov  4 06:25:56 2022 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Sat Nov  5 14:41:31 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=f0252164

databases.eclass: new eclass for running databases

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 eclass/databases.eclass | 480 ++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 480 insertions(+)

diff --git a/eclass/databases.eclass b/eclass/databases.eclass
new file mode 100644
index 000000000..fbf653435
--- /dev/null
+++ b/eclass/databases.eclass
@@ -0,0 +1,480 @@
+# Copyright 2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# @ECLASS: databases.eclass
+# @MAINTAINER:
+# Anna <cyber+gentoo@sysrq.in>
+# @AUTHOR:
+# Anna <cyber+gentoo@sysrq.in>
+# @SUPPORTED_EAPIS: 8
+# @BLURB: eclass to test packages against databases
+# @DESCRIPTION:
+# A utility eclass providing functions for running databases.
+#
+# This eclass does not set any metadata variables nor export any phase, so it
+# can be inherited safely.
+#
+# @SUBSECTION Supported databases
+#
+# - memcached (via "ememcached" helper)
+#
+# - MongoDB (via "emongod" helper)
+#
+# - MySQL/MariaDB/ (via "emysql" helper)
+#
+# - PostgreSQL (via "epostgres" helper)
+#
+# - Redis (via "eredis" helper)
+#
+# @SUBSECTION Helper usage
+#
+# --die [msg...]
+#
+#	Prints the path to the server's log file to the console and aborts the
+#	current merge process with the given message.
+#
+# --get-dbpath
+#
+# 	Returns the directory where the server stores database files.
+#
+# --get-depend
+#
+# 	Returns a dependency string (to be included in BDEPEND).
+#
+# --get-logfile
+#
+# 	Returns the path to the server's log file.
+#
+# --get-pidfile
+#
+# 	Returns the path to the server's PID file.
+#
+# --get-sockdir
+#
+# 	Returns the directory where the server's sockets are located.
+#
+# --get-sockfile
+#
+# 	Returns the path to the server's socket file.
+#
+# --start
+#
+# 	Starts the server on the default port.
+#
+# --start <port>
+#
+# 	Starts the server on the given port.
+#
+# --stop
+#
+# 	Stops the server.
+#
+# @EXAMPLE:
+#
+# @CODE
+# EAPI=8
+#
+# ...
+#
+# inherit databases distutils-r1
+#
+# ...
+#
+# BDEPEND="$(eredis --get-depend)"
+#
+# distutils_enable_tests pytest
+#
+# src_test() {
+# 	eredis --start 16739
+# 	distutils-r1_src_test
+# 	eredis --stop
+# }
+# @CODE
+
+case ${EAPI} in
+	8) ;;
+	*) die "${ECLASS}: EAPI ${EAPI} unsupported."
+esac
+
+if [[ ! ${_DATABASES_ECLASS} ]]; then
+_DATABASES_ECLASS=1
+
+# ==============================================================================
+# GENERIC FUNCTIONS
+# ==============================================================================
+
+# @FUNCTION: _databases_gen_depend
+# @USAGE: <funcname>
+# @INTERNAL
+# @DESCRIPTION:
+# Get a dependency string for the given helper function.
+_databases_gen_depend() {
+	local srvname=${1:1}
+	case ${srvname} in
+		memcached)
+			echo "net-misc/memcached"
+			;;
+		mongod)
+			echo "dev-db/mongodb"
+			;;
+		mysql)
+			echo "virtual/mysql[server]"
+			;;
+		postgres)
+			echo "dev-db/postgresql[server]"
+			;;
+		redis)
+			echo "dev-db/redis"
+			;;
+		*)
+			die "${ECLASS}: unknown database: ${srvname}"
+	esac
+}
+
+# @FUNCTION: _databases_die
+# @USAGE: <funcname> [msg]
+# @INTERNAL
+# @DESCRIPTION:
+# Print the given message and the path to the server's log file to the console
+# and die.
+#
+# This function supports being called via "nonfatal".
+_databases_die() {
+	local funcname=${1?}
+	shift
+
+	eerror "See the server log for details:"
+	eerror "	$(${funcname} --get-logfile)"
+	die -n "${@}"
+}
+
+# @FUNCTION: _databases_stop_service
+# @USAGE: <funcname>
+# @INTERNAL
+# @DESCRIPTION:
+# Default function to stop servers.  Reads PID from a file and sends the TERM
+# signal.
+_databases_stop_service() {
+	debug-print-function "${FUNCNAME}" "${@}"
+
+	local funcname=${1?}
+	local srvname=${funcname:1}
+	local pidfile="$(${funcname} --get-pidfile)"
+
+	ebegin "Stopping ${srvname}"
+	kill "$(<"${pidfile}")"
+	eend $? || ${funcname} --die "Stopping ${srvname} failed"
+}
+
+# @FUNCTION: _databases_dispatch
+# @USAGE: <funcname> <cmd> [args...]
+# @INTERNAL
+# @DESCRIPTION:
+# Process the given command with its options.
+#
+# If "--start" command is used, `_${funcname}_start` function must be defined.
+# Note that directories will be created automatically.
+#
+# If `_${funcname}_stop` function is not declared, the internal
+# `_databases_stop_service` function will be used instead.
+#
+# No `--get` function can be overloaded.
+_databases_dispatch() {
+	local funcname=${1?}
+	local cmd=${2?}
+	shift; shift
+
+	case ${cmd} in
+		--die)
+			_databases_die ${funcname} "${@}"
+			;;
+		--get-depend)
+			_databases_gen_depend ${funcname}
+			;;
+		--get-dbpath)
+			echo "${T}"/${funcname}/db/
+			;;
+		--get-logfile)
+			echo "${T}"/${funcname}/${funcname}.log
+			;;
+		--get-pidfile)
+			echo "${T}"/${funcname}/${funcname}.pid
+			;;
+		--get-sockdir)
+			echo "${T}"/${funcname}/
+			;;
+		--get-sockfile)
+			echo "${T}"/${funcname}/${funcname}.sock
+			;;
+		--start)
+			local port=${1}
+			local start_fn=( _${funcname}_start ${port} )
+			if ! declare -f "${start_fn[0]}" >/dev/null; then
+				die "${ECLASS}: function not declared: ${start_fn[0]}"
+			fi
+
+			mkdir -p "${T}"/${funcname}/db/ || die "Creating database directory failed"
+			"${start_fn[@]}"
+			;;
+		--stop)
+			local stop_fn=( _${funcname}_stop )
+			if ! declare -f "${stop_fn[0]}" >/dev/null; then
+				# fall back to the default implementation
+				stop_fn=( _databases_stop_service ${funcname} )
+			fi
+
+			"${stop_fn[@]}"
+			;;
+		*) die "${funcname}: invalid command: ${cmd}" ;;
+	esac
+}
+
+# ==============================================================================
+# MEMCACHED
+# ==============================================================================
+
+# @FUNCTION: _ememcached_start
+# @USAGE: [port]
+# @INTERNAL
+# @DESCRIPTION:
+# Start memcached server.
+_ememcached_start() {
+	debug-print-function "${FUNCNAME}" "${@}"
+
+	local port=${1:-11211}
+
+	local myargs=(
+		--daemon
+		--port=${port}
+		--user=nobody
+		--listen=127.0.0.1
+		--pidfile=$(ememcached --get-pidfile)
+	)
+
+	ebegin "Spawning memcached"
+	memcached "${myargs[@]}" &>> $(ememcached --get-logfile)
+	eend $? || ememcached --die "Spawning memcached failed"
+}
+
+# @FUNCTION: ememcached
+# @USAGE: <cmd> [args...]
+# @DESCRIPTION:
+# Manage memcached server on the given port (default: 11211).
+ememcached() {
+	_databases_dispatch "${FUNCNAME}" "${@}"
+}
+
+# ==============================================================================
+# MONGODB
+# ==============================================================================
+
+# @FUNCTION: _emongod_start
+# @USAGE: [port]
+# @INTERNAL
+# @DESCRIPTION:
+# Start MongoDB server.
+_emongod_start() {
+	debug-print-function "${FUNCNAME}" "${@}"
+
+	local port=${1:-27017}
+	local logfile=$(emongod --get-logfile)
+
+	local myargs=(
+		--dbpath="$(emongod --get-dbpath)"
+		--nojournal
+		--bind-ip=127.0.0.1
+		--port=${port}
+		--unixSocketPrefix="$(emongod --get-sockdir)"
+		--logpath="${logfile}"
+		--fork
+	)
+
+	ebegin "Spawning mongodb"
+	LC_ALL=C mongod "${myargs[@]}" &>> "${logfile}"
+	eend $? || emongod --die "Spawning mongod failed"
+}
+
+# @FUNCTION: _emongod_stop
+# @INTERNAL
+# @DESCRIPTION:
+# Stop MongoDB server.
+_emongod_stop() {
+	debug-print-function "${FUNCNAME}" "${@}"
+
+	local myargs=(
+		--dbpath="$(emongod --get-dbpath)"
+		--shutdown
+	)
+
+	ebegin "Stopping mongodb"
+	mongod "${myargs[@]}" &>> "${logfile}"
+	eend $? || emongod --die "Stopping mongod failed"
+}
+
+# @FUNCTION: emongod
+# @USAGE: <cmd> [args...]
+# @DESCRIPTION:
+# Manage MongoDB server on the given port (default: 27017).
+emongod() {
+	_databases_dispatch "${FUNCNAME}" "${@}"
+}
+
+# ==============================================================================
+# MYSQL
+# ==============================================================================
+
+# @FUNCTION: _emysql_start
+# @USAGE: [port]
+# @INTERNAL
+# @DESCRIPTION:
+# Create a new MySQL database and start MySQL server.
+_emysql_start() {
+	debug-print-function "${FUNCNAME}" "${@}"
+
+	local port=${1:-3306}
+	local dbpath=$(emysql --get-dbpath)
+	local logfile=$(emysql --get-logfile)
+	local sockfile=$(emysql --get-sockfile)
+
+	local myinstallargs=(
+		--no-defaults
+		--auth-root-authentication-method=normal
+		--basedir="${BROOT}/usr"
+		--datadir="${dbpath}"
+	)
+
+	ebegin "Initializing mysql database"
+	mysql_install_db "${myinstallargs[@]}" &>> "${logfile}"
+	eend $? || emysql --die "Initializing mysql database failed"
+
+	local myargs=(
+		--no-defaults
+		--character-set-server=utf8
+		--pid-file="$(emysql --get-pidfile)"
+		--socket="${sockfile}"
+		--bind-address=127.0.0.1
+		--port=${port}
+		--datadir="${dbpath}"
+		--general-log-file="${logfile}"
+		--log-error="${logfile}"
+	)
+
+	einfo "Spawning mysql"
+	mysqld "${myargs[@]}" &>> "${logfile}" &
+
+	einfo "Waiting for mysqld to accept connections"
+	local timeout=30
+	while ! mysqladmin ping --socket="${sockfile}" --silent; do
+		sleep 1
+		let timeout-=1
+		[[ ${timeout} -eq 0 ]] && emysql --die "Timed out"
+	done
+}
+
+# @FUNCTION: emysql
+# @USAGE: <cmd> [args...]
+# @DESCRIPTION:
+# Manage MySQL server on the given port (default: 3306).
+emysql() {
+	_databases_dispatch "${FUNCNAME}" "${@}"
+}
+
+# ==============================================================================
+# POSTGRESQL
+# ==============================================================================
+
+# @FUNCTION: _epostgres_start
+# @USAGE: [port]
+# @INTERNAL
+# @DESCRIPTION:
+# Create a new PostgreSQL database and start PostgreSQL server.
+_epostgres_start() {
+	debug-print-function "${FUNCNAME}" "${@}"
+
+	local port=${1:-5432}
+	local dbpath=$(epostgres --get-dbpath)
+	local logfile=$(epostgres --get-logfile)
+
+	local myinstallargs=(
+		--pgdata="${dbpath}"
+		--user=postgres
+	)
+
+	ebegin "Initializing postgresql database"
+	initdb "${myinstallargs[@]}" &>> "${logfile}"
+	eend $? || epostgres --die "Initializing postgresql database failed"
+
+	local myargs=(
+		--pgdata="${dbpath}"
+		--log="${logfile}"
+		--options="-h '127.0.0.1' -p ${port} -k '$(epostgres --get-sockdir)'"
+		--wait
+	)
+
+	ebegin "Spawning postgresql"
+	pg_ctl "${myargs[@]}" start &>> "${logfile}"
+	eend $? || epostgres --die "Spawning postgresql failed"
+}
+
+# @FUNCTION: _epostgres_stop
+# @INTERNAL
+# @DESCRIPTION:
+# Stop PosgreSQL server.
+_epostgres_stop() {
+	debug-print-function "${FUNCNAME}" "${@}"
+
+	local myargs=(
+		--pgdata="$(epostgres --get-dbpath)"
+		--wait
+	)
+
+	ebegin "Stopping postgresql"
+	pg_ctl "${myargs[@]}" stop &>> "$(epostgres --get-logfile)"
+	eend $? || epostgres --die "Stopping postgresql failed"
+}
+
+# @FUNCTION: epostgres
+# @USAGE: <cmd> [args...]
+# @DESCRIPTION:
+# Manage PostgreSQL server on the given port (default: 5432).
+epostgres() {
+	_databases_dispatch "${FUNCNAME}" "${@}"
+}
+
+# ==============================================================================
+# REDIS
+# ==============================================================================
+
+# @FUNCTION: _eredis_start
+# @USAGE: [args...]
+# @INTERNAL
+# @DESCRIPTION:
+# Start Redis server.
+_eredis_start() {
+	debug-print-function "${FUNCNAME}" "${@}"
+
+	local port=${1:-6379}
+	local logfile="$(eredis --get-logfile)"
+
+	ebegin "Spawning redis"
+	redis-server - <<- EOF &>> "${logfile}"
+		daemonize yes
+		pidfile "$(eredis --get-pidfile)"
+		port ${port}
+		bind 127.0.0.1
+		unixsocket "$(eredis --get-sockfile)"
+		dir "$(eredis --get-dbpath)"
+		logfile "${logfile}"
+	EOF
+	eend $? || eredis --die "Spawning redis failed"
+}
+
+# @FUNCTION: eredis
+# @USAGE: <cmd> [args...]
+# @DESCRIPTION:
+# Manage Redis server on the given port (default: 6379).
+eredis() {
+	_databases_dispatch "${FUNCNAME}" "${@}"
+}
+
+fi


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2022-11-08 17:55 Anna Vyalkova
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Vyalkova @ 2022-11-08 17:55 UTC (permalink / raw
  To: gentoo-commits

commit:     2b2b50543122b1e068cac963f70de19cc3f50dd4
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Tue Nov  8 16:12:14 2022 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Tue Nov  8 17:11:30 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=2b2b5054

crystal-utils.eclass: new eclass

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 eclass/crystal-utils.eclass | 124 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 124 insertions(+)

diff --git a/eclass/crystal-utils.eclass b/eclass/crystal-utils.eclass
new file mode 100644
index 000000000..cb67682a6
--- /dev/null
+++ b/eclass/crystal-utils.eclass
@@ -0,0 +1,124 @@
+# Copyright 2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# @ECLASS: crystal-utils.eclass
+# @MAINTAINER:
+# Anna <cyber+gentoo@sysrq.in>
+# @AUTHOR:
+# Anna <cyber+gentoo@sysrq.in>
+# @SUPPORTED_EAPIS: 8
+# @BLURB: utility functions for Crystal packages
+# @DESCRIPTION:
+# A utility eclass providing functions to invoke Crystal.
+#
+# This eclass does not set any metadata variables nor export any phase, so it
+# can be inherited safely.
+#
+# All helper functions die on failure and support being called via 'nonfatal'.
+
+case ${EAPI} in
+	8) ;;
+	*) die "${ECLASS}: EAPI ${EAPI} unsupported."
+esac
+
+if [[ ! ${_CRYSTAL_UTILS_ECLASS} ]]; then
+_CRYSTAL_UTILS_ECLASS=1
+
+inherit edo flag-o-matic
+
+# @ECLASS_VARIABLE: CRYSTAL_DEPS
+# @OUTPUT_VARIABLE
+# @DESCRIPTION:
+# This is an eclass-generated Crystal dependency string.
+CRYSTAL_DEPS="
+	|| (
+		dev-lang/crystal
+		dev-lang/crystal-bin
+	)
+"
+
+# @FUNCTION: _crystal_get_colors_opt
+# @INTERNAL
+# @RETURN: "--no-color" if colors should be disabled, empty string otherwise
+_crystal_get_colors_opt() {
+	if [[ ${NOCOLOR} == "true" || ${NOCOLOR} == "yes" ]]; then
+		echo "--no-color"
+	fi
+}
+
+# @FUNCTION: _crystal_get_debug_opt
+# @INTERNAL
+# @RETURN: "--debug" if USE=debug, "--no-debug" otherwise
+_crystal_get_debug_opt() {
+	if has debug ${IUSE} && use debug; then
+		echo "--debug"
+	else
+		echo "--no-debug"
+	fi
+}
+
+# @FUNCTION: crystal_configure
+# @DESCRIPTION:
+# Set Crystal environment variables to match user settings.
+#
+# Must be run or ecrystal/eshards will fail.
+crystal_configure() {
+	debug-print-function ${FUNCNAME} "${@}"
+
+	# avoid possible sandbox violation
+	export CRYSTAL_CACHE_DIR="${T}/crystal"
+	export SHARDS_CACHE_PATH="${T}/shards"
+
+	local args=(
+		--link-flags="\"${LDFLAGS}\""
+		--release
+		--progress
+		$(_crystal_get_debug_opt)
+		$(_crystal_get_colors_opt)
+		$(is-flagq -mcpu && echo "--mcpu=$(get-flag mcpu)")
+		$(is-flagq -mcmodel && echo "--mcmodel=$(get-flag mcmodel)")
+		# TODO: --mattr
+	)
+
+	export CRYSTAL_OPTS="${args[@]}"
+
+	_CRYSTAL_CONFIGURE_HAS_RUN=1
+}
+
+# @FUNCTION: ecrystal
+# @USAGE: [<args>...]
+# @DESCRIPTION:
+# Call crystal, passing supplied arguments.
+ecrystal() {
+	debug-print-function ${FUNCNAME} "${@}"
+
+	[[ ${_CRYSTAL_CONFIGURE_HAS_RUN} ]] || \
+		die "${FUNCNAME}: crystal_configure has not been run"
+
+	mkdir -p "${CRYSTAL_CACHE_DIR}" || die "Creating Crystal cache dir failed"
+	edo crystal "${@}"
+}
+
+# @FUNCTION: eshards
+# @USAGE: [<args>...]
+# @DESCRIPTION:
+# Call shards, passing the standard set of options, then supplied arguments.
+eshards() {
+	debug-print-function ${FUNCNAME} "${@}"
+
+	[[ ${_CRYSTAL_CONFIGURE_HAS_RUN} ]] || \
+		die "${FUNCNAME}: crystal_configure has not been run"
+
+	mkdir -p "${CRYSTAL_CACHE_DIR}" || die "Creating Crystal cache dir failed"
+	mkdir -p "${SHARDS_CACHE_PATH}" || die "Creating Shards cache dir failed"
+
+	local args=(
+		--local
+		--without-development
+		$(_crystal_get_colors_opt)
+	)
+
+	edo shards "${args[@]}" "${@}"
+}
+
+fi


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2022-11-08 17:55 Anna Vyalkova
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Vyalkova @ 2022-11-08 17:55 UTC (permalink / raw
  To: gentoo-commits

commit:     af71c1f7c459d3372295b424457f759838cb3e7f
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Tue Nov  8 16:14:52 2022 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Tue Nov  8 17:11:31 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=af71c1f7

shards.eclass: new eclass

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 eclass/shards.eclass | 126 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 126 insertions(+)

diff --git a/eclass/shards.eclass b/eclass/shards.eclass
new file mode 100644
index 000000000..548c86bce
--- /dev/null
+++ b/eclass/shards.eclass
@@ -0,0 +1,126 @@
+# Copyright 2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# @ECLASS: shards.eclass
+# @MAINTAINER:
+# Anna <cyber+gentoo@sysrq.in>
+# @AUTHOR:
+# Anna <cyber+gentoo@sysrq.in>
+# @SUPPORTED_EAPIS: 8
+# @PROVIDES: crystal-utils
+# @BLURB: eclass to build Crystal packages using Shards
+# @DESCRIPTION:
+# This eclass contains the default phase function for packages which use Crystal
+# Shards as a build system.
+#
+# If the package has no shard.yml(5) file, use crystal-utils.eclass(5) instead.
+
+case ${EAPI} in
+	8) ;;
+	*) die "${ECLASS}: EAPI ${EAPI} unsupported."
+esac
+
+if [[ ! ${_SHARDS_ECLASS} ]]; then
+_SHARDS_ECLASS=1
+
+inherit crystal-utils multiprocessing toolchain-funcs
+
+BDEPEND="
+	${CRYSTAL_DEPS}
+	dev-util/gshards
+"
+IUSE="debug doc"
+
+# Crystal packages do not use CFLAGS
+QA_FLAGS_IGNORED='.*'
+
+# @FUNCTION: shards_get_libdir
+# @RETURN: the library path for Crystal packages
+shards_get_libdir() {
+	echo "${BROOT}"/usr/lib/shards
+}
+
+# @FUNCTION: shards_get_pkgname
+# @RETURN: the package name as specified in shard.yml
+shards_get_pkgname() {
+	debug-print-function ${FUNCNAME} "${@}"
+
+	gshards-get-pkgname || die "Parsing package name failed"
+}
+
+# @FUNCTION: shards_src_configure
+# @DESCRIPTION:
+# Function for configuring Crystal to match user settings.
+shards_src_configure() {
+	debug-print-function ${FUNCNAME} "${@}"
+
+	crystal_configure
+	einfo "CRYSTAL_OPTS='${CRYSTAL_OPTS}'"
+
+	export CRYSTAL_PATH="$(shards_get_libdir):$(crystal env CRYSTAL_PATH || die "'crystal env' failed")"
+	einfo "CRYSTAL_PATH='${CRYSTAL_PATH}'"
+
+	tc-export CC
+}
+
+# @FUNCTION: shards_src_compile
+# @USAGE: [<args>...]
+# @DESCRIPTION:
+# General function for building packages using Shards.
+shards_src_compile() {
+	debug-print-function ${FUNCNAME} "${@}"
+
+	local build_args=(
+		--threads=$(makeopts_jobs)
+		--verbose
+		"${@}"
+	)
+
+	if gshards-has-targets; then
+		eshards build "${build_args[@]}"
+	fi
+
+	if use doc; then
+		ecrystal docs
+		HTML_DOCS=( docs/. )
+	fi
+
+	return 0
+}
+
+# @FUNCTION: shards_src_test
+# @USAGE: [<args>...]
+# @DESCRIPTION:
+# Function for testing the package.
+shards_src_test() {
+	debug-print-function ${FUNCNAME} "${@}"
+
+	if [[ -d "spec" ]]; then
+		ecrystal spec "${@}" || die "Tests failed"
+	fi
+
+	return 0
+}
+
+# @FUNCTION: shards_src_install
+# @DESCRIPTION:
+# Function for installing the package.
+shards_src_install() {
+	debug-print-function ${FUNCNAME} "${@}"
+
+	if [[ -d "bin" ]]; then
+		dobin bin/*
+	fi
+
+	if [[ -d "src" ]]; then
+		insinto "$(shards_get_libdir)/$(shards_get_pkgname)"
+		doins -r src
+		doins shard.yml
+	fi
+
+	einstalldocs
+}
+
+fi
+
+EXPORT_FUNCTIONS src_configure src_compile src_test src_install


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2022-11-08 19:20 Anna Vyalkova
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Vyalkova @ 2022-11-08 19:20 UTC (permalink / raw
  To: gentoo-commits

commit:     c958cef13ebc9f6c9ecc1d763833bc9a00cc07cb
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Tue Nov  8 18:40:10 2022 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Tue Nov  8 18:40:10 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=c958cef1

shards.eclass: fix double EPREFIX

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

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

diff --git a/eclass/shards.eclass b/eclass/shards.eclass
index 548c86bce..95fe26226 100644
--- a/eclass/shards.eclass
+++ b/eclass/shards.eclass
@@ -37,7 +37,7 @@ QA_FLAGS_IGNORED='.*'
 # @FUNCTION: shards_get_libdir
 # @RETURN: the library path for Crystal packages
 shards_get_libdir() {
-	echo "${BROOT}"/usr/lib/shards
+	echo /usr/lib/shards
 }
 
 # @FUNCTION: shards_get_pkgname
@@ -57,7 +57,7 @@ shards_src_configure() {
 	crystal_configure
 	einfo "CRYSTAL_OPTS='${CRYSTAL_OPTS}'"
 
-	export CRYSTAL_PATH="$(shards_get_libdir):$(crystal env CRYSTAL_PATH || die "'crystal env' failed")"
+	export CRYSTAL_PATH="${BROOT}$(shards_get_libdir):$(crystal env CRYSTAL_PATH || die "'crystal env' failed")"
 	einfo "CRYSTAL_PATH='${CRYSTAL_PATH}'"
 
 	tc-export CC
@@ -113,7 +113,7 @@ shards_src_install() {
 	fi
 
 	if [[ -d "src" ]]; then
-		insinto "$(shards_get_libdir)/$(shards_get_pkgname)"
+		insinto $(shards_get_libdir)/$(shards_get_pkgname)
 		doins -r src
 		doins shard.yml
 	fi


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2022-11-09  9:25 Anna Vyalkova
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Vyalkova @ 2022-11-09  9:25 UTC (permalink / raw
  To: gentoo-commits

commit:     2946a0ea45c40df19cf06c128ebdba892df4404e
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Wed Nov  9 07:32:49 2022 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Wed Nov  9 07:32:49 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=2946a0ea

crystal-utils.eclass: introduce mycrystalargs

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 eclass/crystal-utils.eclass | 19 +++++++++++++++++++
 eclass/shards.eclass        |  2 --
 2 files changed, 19 insertions(+), 2 deletions(-)

diff --git a/eclass/crystal-utils.eclass b/eclass/crystal-utils.eclass
index cb67682a6..8f8df3cc3 100644
--- a/eclass/crystal-utils.eclass
+++ b/eclass/crystal-utils.eclass
@@ -61,7 +61,19 @@ _crystal_get_debug_opt() {
 # @DESCRIPTION:
 # Set Crystal environment variables to match user settings.
 #
+# Passes arguments to Crystal by reading from an optionally pre-defined local
+# mycrystalargs bash array.
+#
 # Must be run or ecrystal/eshards will fail.
+#
+# @CODE
+# src_configure() {
+#       local mycrystalargs=(
+#               -Dfoo
+#       )
+#       crystal_configure
+# }
+# @CODE
 crystal_configure() {
 	debug-print-function ${FUNCNAME} "${@}"
 
@@ -69,6 +81,12 @@ crystal_configure() {
 	export CRYSTAL_CACHE_DIR="${T}/crystal"
 	export SHARDS_CACHE_PATH="${T}/shards"
 
+	[[ -z ${mycrystalargs} ]] && local -a mycrystalargs=()
+	local mycrystalargstype=$(declare -p mycrystalargs 2>&-)
+	if [[ "${mycrystalargstype}" != "declare -a mycrystalargs="* ]]; then
+		die "mycrystalargs must be declared as array"
+	fi
+
 	local args=(
 		--link-flags="\"${LDFLAGS}\""
 		--release
@@ -78,6 +96,7 @@ crystal_configure() {
 		$(is-flagq -mcpu && echo "--mcpu=$(get-flag mcpu)")
 		$(is-flagq -mcmodel && echo "--mcmodel=$(get-flag mcmodel)")
 		# TODO: --mattr
+		"${mycrystalargs[@]}"
 	)
 
 	export CRYSTAL_OPTS="${args[@]}"

diff --git a/eclass/shards.eclass b/eclass/shards.eclass
index 95fe26226..756fdf335 100644
--- a/eclass/shards.eclass
+++ b/eclass/shards.eclass
@@ -64,7 +64,6 @@ shards_src_configure() {
 }
 
 # @FUNCTION: shards_src_compile
-# @USAGE: [<args>...]
 # @DESCRIPTION:
 # General function for building packages using Shards.
 shards_src_compile() {
@@ -73,7 +72,6 @@ shards_src_compile() {
 	local build_args=(
 		--threads=$(makeopts_jobs)
 		--verbose
-		"${@}"
 	)
 
 	if gshards-has-targets; then


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2022-11-10  0:50 Anna Figueiredo Gomes
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Figueiredo Gomes @ 2022-11-10  0:50 UTC (permalink / raw
  To: gentoo-commits

commit:     bff17eaa33fa048bf6eca18d658b2cf5bea8d375
Author:     Anna Figueiredo Gomes <anna-cli <AT> tutanota <DOT> com>
AuthorDate: Thu Nov 10 00:41:49 2022 +0000
Commit:     Anna Figueiredo Gomes <anna-cli <AT> tutanota <DOT> com>
CommitDate: Thu Nov 10 00:42:53 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=bff17eaa

dotnet-utils.eclass: Utilities for net6.0 packages

Functions for generating nuget uris and restoring
them in dotnet.

Signed-off-by: Anna Figueiredo Gomes <anna-cli <AT> tutanota.com>

 eclass/dotnet-utils.eclass | 154 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 154 insertions(+)

diff --git a/eclass/dotnet-utils.eclass b/eclass/dotnet-utils.eclass
new file mode 100644
index 000000000..26a968035
--- /dev/null
+++ b/eclass/dotnet-utils.eclass
@@ -0,0 +1,154 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# @ECLASS: dotnet-utils.eclass
+# @MAINTAINER:
+# anna-cli@tutanota.com
+# @AUTHOR:
+# Anna Figueiredo Gomes <anna-cli@tutanota.com>
+# @SUPPORTED_EAPIS: 7 8
+# @BLURB: common functions and variables for dotnet builds
+
+case "${EAPI:-0}" in
+	7|8)
+		;;
+	*)
+		die "Unsupported EAPI=${EAPI} for ${ECLASS}"
+		;;
+esac
+
+inherit multiprocessing
+
+BDEPEND=">=virtual/dotnet-sdk-6.0"
+EXPORT_FUNCTIONS src_unpack src_prepare src_compile
+
+# @ECLASS_VARIABLE: DOTNET_CLI_TELEMETRY_OPTOUT
+# @DESCRIPTION:
+# Disables telemetry on dotnet.
+export DOTNET_CLI_TELEMETRY_OPTOUT=1
+# @ECLASS_VARIABLE: MSBUILDDISABLENODEREUSE
+# @DESCRIPTION:
+# Stops the dotnet node from not stopping after the build is done.
+export MSBUILDDISABLENODEREUSE=1
+# @ECLASS_VARIABLE: DOTNET_NOLOGO
+# @DESCRIPTION:
+# Disables the header logo when running dotnet commands.
+export DOTNET_NOLOGO=1
+
+# Needed otherwise the binaries break
+RESTRICT="strip"
+
+# @ECLASS_VARIABLE: NUGETS
+# @DEFAULT_UNSET
+# @PRE_INHERIT
+# @DESCRIPTION:
+# bash string containing all nuget package wants to download
+# used by nuget_uris()
+# Example:
+# @CODE
+# NUGETS="
+# ImGui.NET-1.87.2
+# Config.Net-4.19.0
+# "
+# inherit nuget
+# ...
+# SRC_URI="$(nuget_uris)"
+# @CODE
+
+# @FUNCTION: nuget_uris
+# @DESCRIPTION:
+# Generates the URIs to put in SRC_URI to help fetch dependencies.
+# Uses first argument as nuget list.
+# If no argument provided, uses NUGETS variable.
+nuget_uris() {
+	local -r regex='^([a-zA-Z0-9_.-]+)-([0-9]+\.[0-9]+\.[0-9]+.*)$'
+	local nuget nugets
+
+	if [[ -n ${@} ]]; then
+		nugets="$@"
+	elif [[ -n ${NUGETS} ]]; then
+		nugets="${NUGETS}"
+	else
+		eerror "NUGETS variable is not defined and nothing passed as argument"
+		die "Can't generate SRC_URI from empty input"
+	fi
+
+	for nuget in ${nugets}; do
+		local name version url
+		[[ $nuget =~ $regex ]] || die "Could not parse name and version from nuget: $nuget"
+		name="${BASH_REMATCH[1]}"
+		version="${BASH_REMATCH[2]}"
+		url="https://api.nuget.org/v3-flatcontainer/${name}/${version}/${name}.${version}.nupkg"
+		echo "${url}"
+	done
+}
+
+# @FUNCTION: edotnet
+# @USAGE: [[command] <args> ...]
+# @DESCRIPTION:
+# Call dotnet, passing the supplied arguments.
+# @RETURN: dotnet exit code
+edotnet() {
+	debug-print-function ${FUNCNAME} "$@"
+
+	local ret
+
+	set -- dotnet "${@}" -maxcpucount:$(makeopts_jobs)
+	echo "${@}" >&2
+	"${@}"
+	ret=${?}
+
+	if [[ ${ret} -ne 0 ]]; then
+		die -n "edotnet failed"
+	fi
+
+	return ${ret}
+}
+
+# @FUNCTION: dotnet-utils_src_unpack
+# @DESCRIPTION:
+# Unpacks the package
+dotnet-utils_src_unpack() {
+	debug-print-function ${FUNCNAME} "$@"
+
+	local archive
+	for archive in ${A}; do
+		case "${archive}" in
+			*.nupkg)
+				;;
+			*)
+				unpack ${archive}
+				;;
+		esac
+	done
+}
+
+# @FUNCTION: dotnet-utils_src_prepare
+# @DESCRIPTION:
+# Restores the packages
+
+dotnet-utils_src_prepare() {
+	debug-print-function ${FUNCNAME} "$@"
+	edotnet restore \
+		--runtime linux-x64 \
+		--source "${DISTDIR}" || die
+	default
+}
+
+# @FUNCTION: dotnet-utils_src_compile
+# @DESCRIPTION:
+# Build the package using dotnet publish
+dotnet-utils_src_compile() {
+	debug-print-function ${FUNCNAME} "$@"
+
+	addpredict /opt/dotnet-sdk-bin-6.0/metadata
+
+	edotnet publish \
+		--nologo \
+		--no-restore \
+		--configuration Release \
+		--runtime linux-x64 \
+		"-p:Version=${PV}" \
+		-p:DebugType=embedded \
+		--self-contained || die
+}


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2022-11-16 14:30 Anna Vyalkova
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Vyalkova @ 2022-11-16 14:30 UTC (permalink / raw
  To: gentoo-commits

commit:     3a363993304d35e57ce64df95fc8b4f271fc13fa
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Wed Nov 16 14:29:57 2022 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Wed Nov 16 14:30:25 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=3a363993

shards.eclass: add SHARDS_DEPS

Closes: https://bugs.gentoo.org/881485
Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 eclass/shards.eclass | 1 +
 1 file changed, 1 insertion(+)

diff --git a/eclass/shards.eclass b/eclass/shards.eclass
index 756fdf335..a78d792ba 100644
--- a/eclass/shards.eclass
+++ b/eclass/shards.eclass
@@ -27,6 +27,7 @@ inherit crystal-utils multiprocessing toolchain-funcs
 
 BDEPEND="
 	${CRYSTAL_DEPS}
+	${SHARDS_DEPS}
 	dev-util/gshards
 "
 IUSE="debug doc"


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2022-11-16 14:30 Anna Vyalkova
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Vyalkova @ 2022-11-16 14:30 UTC (permalink / raw
  To: gentoo-commits

commit:     d622daae90169366a97059c3dc4cf0f9661bb662
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Wed Nov 16 14:28:47 2022 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Wed Nov 16 14:30:25 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=d622daae

crystal-utils.eclass: add SHARDS_DEPS

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 eclass/crystal-utils.eclass | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/eclass/crystal-utils.eclass b/eclass/crystal-utils.eclass
index 8f8df3cc3..09a4049a4 100644
--- a/eclass/crystal-utils.eclass
+++ b/eclass/crystal-utils.eclass
@@ -37,6 +37,17 @@ CRYSTAL_DEPS="
 	)
 "
 
+# @ECLASS_VARIABLE: SHARDS_DEPS
+# @OUTPUT_VARIABLE
+# @DESCRIPTION:
+# This is an eclass-generated Shards dependency string.
+SHARDS_DEPS="
+	|| (
+		dev-util/shards
+		dev-lang/crystal-bin
+	)
+"
+
 # @FUNCTION: _crystal_get_colors_opt
 # @INTERNAL
 # @RETURN: "--no-color" if colors should be disabled, empty string otherwise


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2022-11-16 15:09 Anna Vyalkova
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Vyalkova @ 2022-11-16 15:09 UTC (permalink / raw
  To: gentoo-commits

commit:     e03f20522f819495ef8decd2a80261da3abacd68
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Wed Nov 16 14:43:10 2022 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Wed Nov 16 14:43:10 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=e03f2052

databases.eclass: add "required use" stuff

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 eclass/databases.eclass | 28 +++++++++++++++++++---------
 1 file changed, 19 insertions(+), 9 deletions(-)

diff --git a/eclass/databases.eclass b/eclass/databases.eclass
index fbf653435..079325a90 100644
--- a/eclass/databases.eclass
+++ b/eclass/databases.eclass
@@ -28,7 +28,7 @@
 #
 # @SUBSECTION Helper usage
 #
-# --die [msg...]
+# --die [msg]
 #
 #	Prints the path to the server's log file to the console and aborts the
 #	current merge process with the given message.
@@ -37,7 +37,7 @@
 #
 # 	Returns the directory where the server stores database files.
 #
-# --get-depend
+# --get-depend [use1,use2,...]
 #
 # 	Returns a dependency string (to be included in BDEPEND).
 #
@@ -104,31 +104,41 @@ _DATABASES_ECLASS=1
 # ==============================================================================
 
 # @FUNCTION: _databases_gen_depend
-# @USAGE: <funcname>
+# @USAGE: <funcname> <required use>
 # @INTERNAL
 # @DESCRIPTION:
 # Get a dependency string for the given helper function.
 _databases_gen_depend() {
 	local srvname=${1:1}
+	local req_use=${2}
+
+	local pkg_dep
 	case ${srvname} in
 		memcached)
-			echo "net-misc/memcached"
+			pkg_dep="net-misc/memcached"
 			;;
 		mongod)
-			echo "dev-db/mongodb"
+			pkg_dep="dev-db/mongodb"
 			;;
 		mysql)
-			echo "virtual/mysql[server]"
+			pkg_dep="virtual/mysql"
+			req_use="server,${req_use}"
 			;;
 		postgres)
-			echo "dev-db/postgresql[server]"
+			pkg_dep="dev-db/postgresql"
+			req_use="server,${req_use}"
 			;;
 		redis)
-			echo "dev-db/redis"
+			pkg_dep="dev-db/redis"
 			;;
 		*)
 			die "${ECLASS}: unknown database: ${srvname}"
 	esac
+
+	req_use=${req_use%,}  # strip trailing comma
+	printf "%s" "${pkg_dep}"
+	[[ ${req_use} ]] && \
+		printf "[%s]" "${req_use}"
 }
 
 # @FUNCTION: _databases_die
@@ -189,7 +199,7 @@ _databases_dispatch() {
 			_databases_die ${funcname} "${@}"
 			;;
 		--get-depend)
-			_databases_gen_depend ${funcname}
+			_databases_gen_depend ${funcname} "${@}"
 			;;
 		--get-dbpath)
 			echo "${T}"/${funcname}/db/


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2022-11-25  2:38 Anna Figueiredo Gomes
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Figueiredo Gomes @ 2022-11-25  2:38 UTC (permalink / raw
  To: gentoo-commits

commit:     637fee59f92658dcacab882c31237635a79ff53f
Author:     Anna (navi) Figueiredo Gomes <anna <AT> navirc <DOT> com>
AuthorDate: Fri Nov 25 02:34:07 2022 +0000
Commit:     Anna Figueiredo Gomes <anna-cli <AT> tutanota <DOT> com>
CommitDate: Fri Nov 25 02:34:07 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=637fee59

dotnet-utils.eclass: SLOT and runtime ARCH support

Signed-off-by: Anna (navi) Figueiredo Gomes <anna <AT> navirc.com>

 eclass/dotnet-utils.eclass | 56 +++++++++++++++++++++++++++++++++++++---------
 1 file changed, 45 insertions(+), 11 deletions(-)

diff --git a/eclass/dotnet-utils.eclass b/eclass/dotnet-utils.eclass
index 26a968035..61ccf8f11 100644
--- a/eclass/dotnet-utils.eclass
+++ b/eclass/dotnet-utils.eclass
@@ -3,9 +3,9 @@
 
 # @ECLASS: dotnet-utils.eclass
 # @MAINTAINER:
-# anna-cli@tutanota.com
+# anna@navirc.com
 # @AUTHOR:
-# Anna Figueiredo Gomes <anna-cli@tutanota.com>
+# Anna Figueiredo Gomes <anna@navirc.com>
 # @SUPPORTED_EAPIS: 7 8
 # @BLURB: common functions and variables for dotnet builds
 
@@ -19,8 +19,23 @@ esac
 
 inherit multiprocessing
 
-BDEPEND=">=virtual/dotnet-sdk-6.0"
-EXPORT_FUNCTIONS src_unpack src_prepare src_compile
+# @ECLASS_VARIABLE: DOTNET_SLOT
+# @DESCRIPTION:
+# Allows for choosing a slot for dotnet
+# @DEFAULT_UNSET
+
+if [[ -z "${DOTNET_SLOT}" ]]; then
+	die "DOTNET_SLOT not set."
+fi
+
+# Temporary, use the virtual once you can have multiple virtuals installed at once
+BDEPEND+=" || ( dev-dotnet/dotnet-sdk:${DOTNET_SLOT} dev-dotnet/dotnet-sdk-bin:${DOTNET_SLOT} )"
+EXPORT_FUNCTIONS src_unpack src_prepare src_compile pkg_setup
+
+# @ECLASS_VARIABLE: DOTNET_EXECUTABLE
+# @DESCRIPTION:
+# Holds the right executable name
+# @DEFAULT_UNSET
 
 # @ECLASS_VARIABLE: DOTNET_CLI_TELEMETRY_OPTOUT
 # @DESCRIPTION:
@@ -36,7 +51,7 @@ export MSBUILDDISABLENODEREUSE=1
 export DOTNET_NOLOGO=1
 
 # Needed otherwise the binaries break
-RESTRICT="strip"
+RESTRICT+=" strip"
 
 # @ECLASS_VARIABLE: NUGETS
 # @DEFAULT_UNSET
@@ -83,6 +98,30 @@ nuget_uris() {
 	done
 }
 
+dotnet-utils_pkg_setup() {
+	case "${ARCH}" in
+		*amd64)
+			DOTNET_RUNTIME="linux-x64"
+			;;
+		*arm)
+			DOTNET_RUNTIME="linux-arm"
+			;;
+		*arm64)
+			DOTNET_RUNTIME="linux-arm64"
+			;;
+		*)
+			die "Unsupported arch: ${ARCH}"
+			;;
+	esac
+
+	for _dotnet in dotnet-{${DOTNET_SLOT},bin-${DOTNET_SLOT}}; do
+		if type $_dotnet 1> /dev/null 2>&1; then
+			DOTNET_EXECUTABLE=$_dotnet
+			break
+		fi
+	done
+}
+
 # @FUNCTION: edotnet
 # @USAGE: [[command] <args> ...]
 # @DESCRIPTION:
@@ -93,7 +132,7 @@ edotnet() {
 
 	local ret
 
-	set -- dotnet "${@}" -maxcpucount:$(makeopts_jobs)
+	set -- "$DOTNET_EXECUTABLE" "${@}" --runtime "${DOTNET_RUNTIME}" -maxcpucount:$(makeopts_jobs)
 	echo "${@}" >&2
 	"${@}"
 	ret=${?}
@@ -130,7 +169,6 @@ dotnet-utils_src_unpack() {
 dotnet-utils_src_prepare() {
 	debug-print-function ${FUNCNAME} "$@"
 	edotnet restore \
-		--runtime linux-x64 \
 		--source "${DISTDIR}" || die
 	default
 }
@@ -141,13 +179,9 @@ dotnet-utils_src_prepare() {
 dotnet-utils_src_compile() {
 	debug-print-function ${FUNCNAME} "$@"
 
-	addpredict /opt/dotnet-sdk-bin-6.0/metadata
-
 	edotnet publish \
-		--nologo \
 		--no-restore \
 		--configuration Release \
-		--runtime linux-x64 \
 		"-p:Version=${PV}" \
 		-p:DebugType=embedded \
 		--self-contained || die


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2022-11-25  2:44 Anna Figueiredo Gomes
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Figueiredo Gomes @ 2022-11-25  2:44 UTC (permalink / raw
  To: gentoo-commits

commit:     aca09be8b1882d68e999469827e85f4ca825e9c3
Author:     Anna (navi) Figueiredo Gomes <anna <AT> navirc <DOT> com>
AuthorDate: Fri Nov 25 02:41:21 2022 +0000
Commit:     Anna Figueiredo Gomes <anna-cli <AT> tutanota <DOT> com>
CommitDate: Fri Nov 25 02:43:53 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=aca09be8

dotnet-utils.eclass: Forgot a function description

Signed-off-by: Anna (navi) Figueiredo Gomes <anna <AT> navirc.com>

 eclass/dotnet-utils.eclass | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/eclass/dotnet-utils.eclass b/eclass/dotnet-utils.eclass
index 61ccf8f11..93f163c25 100644
--- a/eclass/dotnet-utils.eclass
+++ b/eclass/dotnet-utils.eclass
@@ -98,6 +98,9 @@ nuget_uris() {
 	done
 }
 
+# @FUNCTION: dotnet-utils_pkg_setup
+# @DESCRIPTION:
+# Sets up DOTNET_RUNTIME and DOTNET_EXECUTABLE variables for later use in edotnet.
 dotnet-utils_pkg_setup() {
 	case "${ARCH}" in
 		*amd64)


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2022-11-25 11:37 Anna Vyalkova
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Vyalkova @ 2022-11-25 11:37 UTC (permalink / raw
  To: gentoo-commits

commit:     a1cca7e4aa93042fe25047fe4367a2e6ae53d707
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Fri Nov 25 11:36:39 2022 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Fri Nov 25 11:37:02 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=a1cca7e4

dotnet-utils.eclass: use array for src_compile args

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 eclass/dotnet-utils.eclass | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

diff --git a/eclass/dotnet-utils.eclass b/eclass/dotnet-utils.eclass
index 7be67d216..d035a95da 100644
--- a/eclass/dotnet-utils.eclass
+++ b/eclass/dotnet-utils.eclass
@@ -167,7 +167,7 @@ dotnet-utils_src_unpack() {
 dotnet-utils_src_prepare() {
 	debug-print-function ${FUNCNAME} "${@}"
 
-	edotnet restore --source "${DISTDIR}" || die "Restore failed"
+	edotnet restore --source "${DISTDIR}" || die "'dotnet restore' failed"
 	default_src_prepare
 }
 
@@ -177,12 +177,15 @@ dotnet-utils_src_prepare() {
 dotnet-utils_src_compile() {
 	debug-print-function ${FUNCNAME} "${@}"
 
-	edotnet publish \
-		--no-restore \
-		--configuration Release \
-		"-p:Version=${PV}" \
-		-p:DebugType=embedded \
-		--self-contained || die
+	local publist_args=(
+		--no-restore
+		--configuration Release
+		-p:Version=${PV}
+		-p:DebugType=embedded
+		--self-contained
+	)
+
+	edotnet publish "${publish_args}" || die "'dotnet publish' failed"
 }
 
 fi


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2022-11-25 11:37 Anna Vyalkova
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Vyalkova @ 2022-11-25 11:37 UTC (permalink / raw
  To: gentoo-commits

commit:     357b53a29786d1edac47aa85417c6f281f48430c
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Fri Nov 25 11:12:41 2022 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Fri Nov 25 11:37:00 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=357b53a2

dotnet-utils.eclass: use standard eapi guard

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

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

diff --git a/eclass/dotnet-utils.eclass b/eclass/dotnet-utils.eclass
index 93f163c25..f7f84dde3 100644
--- a/eclass/dotnet-utils.eclass
+++ b/eclass/dotnet-utils.eclass
@@ -9,12 +9,9 @@
 # @SUPPORTED_EAPIS: 7 8
 # @BLURB: common functions and variables for dotnet builds
 
-case "${EAPI:-0}" in
-	7|8)
-		;;
-	*)
-		die "Unsupported EAPI=${EAPI} for ${ECLASS}"
-		;;
+case ${EAPI} in
+	7|8) ;;
+	*) die "${ECLASS}: EAPI ${EAPI} unsupported." ;;
 esac
 
 inherit multiprocessing


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2022-11-25 11:37 Anna Vyalkova
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Vyalkova @ 2022-11-25 11:37 UTC (permalink / raw
  To: gentoo-commits

commit:     032cdad38dc59e27721f499261daef09832e0aa4
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Fri Nov 25 11:34:34 2022 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Fri Nov 25 11:37:01 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=032cdad3

dotnet-utils.eclass: fix src_prepare

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 eclass/dotnet-utils.eclass | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/eclass/dotnet-utils.eclass b/eclass/dotnet-utils.eclass
index 17c2c685a..7be67d216 100644
--- a/eclass/dotnet-utils.eclass
+++ b/eclass/dotnet-utils.eclass
@@ -163,13 +163,12 @@ dotnet-utils_src_unpack() {
 
 # @FUNCTION: dotnet-utils_src_prepare
 # @DESCRIPTION:
-# Restores the packages
+# Restore the packages using 'dotnet restore'
 dotnet-utils_src_prepare() {
 	debug-print-function ${FUNCNAME} "${@}"
 
-	edotnet restore \
-		--source "${DISTDIR}" || die
-	default
+	edotnet restore --source "${DISTDIR}" || die "Restore failed"
+	default_src_prepare
 }
 
 # @FUNCTION: dotnet-utils_src_compile


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2022-11-25 11:37 Anna Vyalkova
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Vyalkova @ 2022-11-25 11:37 UTC (permalink / raw
  To: gentoo-commits

commit:     d39cc4f19da2e3fc1a58665aa26156e4608455a5
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Fri Nov 25 11:25:07 2022 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Fri Nov 25 11:37:00 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=d39cc4f1

dotnet-utils.eclass: small improvements

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 eclass/dotnet-utils.eclass | 55 +++++++++++++++++++++++++++-------------------
 1 file changed, 32 insertions(+), 23 deletions(-)

diff --git a/eclass/dotnet-utils.eclass b/eclass/dotnet-utils.eclass
index e5c5d3c8f..745676186 100644
--- a/eclass/dotnet-utils.eclass
+++ b/eclass/dotnet-utils.eclass
@@ -20,31 +20,37 @@ _DOTNET_UTILS_ECLASS=1
 inherit multiprocessing
 
 # @ECLASS_VARIABLE: DOTNET_SLOT
+# @REQUIRED
+# @PRE_INHERIT
 # @DESCRIPTION:
-# Allows for choosing a slot for dotnet
-# @DEFAULT_UNSET
+# Allows to choose a slot for dotnet
 
-if [[ -z "${DOTNET_SLOT}" ]]; then
-	die "DOTNET_SLOT not set."
+if [[ ! ${DOTNET_SLOT} ]]; then
+	die "${ECLASS}: DOTNET_SLOT not set"
 fi
 
 # Temporary, use the virtual once you can have multiple virtuals installed at once
 BDEPEND+=" || ( dev-dotnet/dotnet-sdk:${DOTNET_SLOT} dev-dotnet/dotnet-sdk-bin:${DOTNET_SLOT} )"
 
 # @ECLASS_VARIABLE: DOTNET_EXECUTABLE
-# @DESCRIPTION:
-# Holds the right executable name
 # @DEFAULT_UNSET
+# @DESCRIPTION:
+# Sets the right executable name.
 
 # @ECLASS_VARIABLE: DOTNET_CLI_TELEMETRY_OPTOUT
+# @OUTPUT_VARIABLE
 # @DESCRIPTION:
 # Disables telemetry on dotnet.
 export DOTNET_CLI_TELEMETRY_OPTOUT=1
+
 # @ECLASS_VARIABLE: MSBUILDDISABLENODEREUSE
+# @OUTPUT_VARIABLE
 # @DESCRIPTION:
-# Stops the dotnet node from not stopping after the build is done.
+# Stops the dotnet node after the build is done.
 export MSBUILDDISABLENODEREUSE=1
+
 # @ECLASS_VARIABLE: DOTNET_NOLOGO
+# @OUTPUT_VARIABLE
 # @DESCRIPTION:
 # Disables the header logo when running dotnet commands.
 export DOTNET_NOLOGO=1
@@ -54,37 +60,40 @@ RESTRICT+=" strip"
 
 # @ECLASS_VARIABLE: NUGETS
 # @DEFAULT_UNSET
-# @PRE_INHERIT
 # @DESCRIPTION:
-# bash string containing all nuget package wants to download
-# used by nuget_uris()
+# String containing all nuget packages that need to be downloaded.  Used by
+# the 'nuget_uris' function.
+#
 # Example:
 # @CODE
 # NUGETS="
-# ImGui.NET-1.87.2
-# Config.Net-4.19.0
+# 	ImGui.NET-1.87.2
+# 	Config.Net-4.19.0
 # "
-# inherit nuget
+#
+# inherit dotnet-utils
+#
 # ...
+#
 # SRC_URI="$(nuget_uris)"
 # @CODE
 
 # @FUNCTION: nuget_uris
+# @USAGE: <nuget...>
 # @DESCRIPTION:
 # Generates the URIs to put in SRC_URI to help fetch dependencies.
-# Uses first argument as nuget list.
-# If no argument provided, uses NUGETS variable.
+# If no arguments provided, uses NUGETS variable.
 nuget_uris() {
 	local -r regex='^([a-zA-Z0-9_.-]+)-([0-9]+\.[0-9]+\.[0-9]+.*)$'
 	local nuget nugets
 
-	if [[ -n ${@} ]]; then
-		nugets="$@"
-	elif [[ -n ${NUGETS} ]]; then
+	if (( $# != 0 )); then
+		nugets="${@}"
+	elif [[ ${NUGETS} ]]; then
 		nugets="${NUGETS}"
 	else
 		eerror "NUGETS variable is not defined and nothing passed as argument"
-		die "Can't generate SRC_URI from empty input"
+		die "${FUNCNAME}: Can't generate SRC_URI from empty input"
 	fi
 
 	for nuget in ${nugets}; do
@@ -150,7 +159,7 @@ edotnet() {
 # @DESCRIPTION:
 # Unpacks the package
 dotnet-utils_src_unpack() {
-	debug-print-function ${FUNCNAME} "$@"
+	debug-print-function ${FUNCNAME} "${@}"
 
 	local archive
 	for archive in ${A}; do
@@ -167,9 +176,9 @@ dotnet-utils_src_unpack() {
 # @FUNCTION: dotnet-utils_src_prepare
 # @DESCRIPTION:
 # Restores the packages
-
 dotnet-utils_src_prepare() {
-	debug-print-function ${FUNCNAME} "$@"
+	debug-print-function ${FUNCNAME} "${@}"
+
 	edotnet restore \
 		--source "${DISTDIR}" || die
 	default
@@ -179,7 +188,7 @@ dotnet-utils_src_prepare() {
 # @DESCRIPTION:
 # Build the package using dotnet publish
 dotnet-utils_src_compile() {
-	debug-print-function ${FUNCNAME} "$@"
+	debug-print-function ${FUNCNAME} "${@}"
 
 	edotnet publish \
 		--no-restore \


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2022-11-25 11:37 Anna Vyalkova
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Vyalkova @ 2022-11-25 11:37 UTC (permalink / raw
  To: gentoo-commits

commit:     20ac305c615fa9f437476ce1c42db6171b6fc48b
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Fri Nov 25 11:30:29 2022 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Fri Nov 25 11:37:01 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=20ac305c

dotnet-utils.eclass: match use-flags instead of ${ARCH}

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 eclass/dotnet-utils.eclass | 34 +++++++++++++++-------------------
 1 file changed, 15 insertions(+), 19 deletions(-)

diff --git a/eclass/dotnet-utils.eclass b/eclass/dotnet-utils.eclass
index 9e15fb08c..ea7c6591e 100644
--- a/eclass/dotnet-utils.eclass
+++ b/eclass/dotnet-utils.eclass
@@ -97,7 +97,7 @@ nuget_uris() {
 
 	for nuget in ${nugets}; do
 		local name version url
-		[[ $nuget =~ $regex ]] || die "Could not parse name and version from nuget: $nuget"
+		[[ ${nuget} =~ ${regex} ]] || die "Could not parse name and version from nuget: $nuget"
 		name="${BASH_REMATCH[1]}"
 		version="${BASH_REMATCH[2]}"
 		url="https://api.nuget.org/v3-flatcontainer/${name}/${version}/${name}.${version}.nupkg"
@@ -109,24 +109,20 @@ nuget_uris() {
 # @DESCRIPTION:
 # Sets up DOTNET_RUNTIME and DOTNET_EXECUTABLE variables for later use in edotnet.
 dotnet-utils_pkg_setup() {
-	case "${ARCH}" in
-		*amd64)
-			DOTNET_RUNTIME="linux-x64"
-			;;
-		*arm)
-			DOTNET_RUNTIME="linux-arm"
-			;;
-		*arm64)
-			DOTNET_RUNTIME="linux-arm64"
-			;;
-		*)
-			die "Unsupported arch: ${ARCH}"
-			;;
-	esac
-
-	for _dotnet in dotnet-{${DOTNET_SLOT},bin-${DOTNET_SLOT}}; do
-		if type $_dotnet 1> /dev/null 2>&1; then
-			DOTNET_EXECUTABLE=$_dotnet
+	if use amd64; then
+		DOTNET_RUNTIME="linux-x64"
+	elif use arm; then
+		DOTNET_RUNTIME="linux-arm"
+	elif use arm64; then
+		DOTNET_RUNTIME="linux-arm64"
+	else
+		die "Unsupported arch: ${ARCH}"
+	fi
+
+	local _dotnet
+	for _dotnet in dotnet{,-bin}-${DOTNET_SLOT}; do
+		if type ${_dotnet} 1> /dev/null 2>&1; then
+			DOTNET_EXECUTABLE=${_dotnet}
 			break
 		fi
 	done


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2022-11-25 11:37 Anna Vyalkova
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Vyalkova @ 2022-11-25 11:37 UTC (permalink / raw
  To: gentoo-commits

commit:     2e00acb8c29cc4d92a42fb374ff25de3b01bffd1
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Fri Nov 25 11:13:57 2022 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Fri Nov 25 11:37:00 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=2e00acb8

dotnet-utils.eclass: add inherit guard

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 eclass/dotnet-utils.eclass | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/eclass/dotnet-utils.eclass b/eclass/dotnet-utils.eclass
index f7f84dde3..e5c5d3c8f 100644
--- a/eclass/dotnet-utils.eclass
+++ b/eclass/dotnet-utils.eclass
@@ -14,6 +14,9 @@ case ${EAPI} in
 	*) die "${ECLASS}: EAPI ${EAPI} unsupported." ;;
 esac
 
+if [[ ! ${_DOTNET_UTILS_ECLASS} ]]; then
+_DOTNET_UTILS_ECLASS=1
+
 inherit multiprocessing
 
 # @ECLASS_VARIABLE: DOTNET_SLOT
@@ -27,7 +30,6 @@ fi
 
 # Temporary, use the virtual once you can have multiple virtuals installed at once
 BDEPEND+=" || ( dev-dotnet/dotnet-sdk:${DOTNET_SLOT} dev-dotnet/dotnet-sdk-bin:${DOTNET_SLOT} )"
-EXPORT_FUNCTIONS src_unpack src_prepare src_compile pkg_setup
 
 # @ECLASS_VARIABLE: DOTNET_EXECUTABLE
 # @DESCRIPTION:
@@ -186,3 +188,7 @@ dotnet-utils_src_compile() {
 		-p:DebugType=embedded \
 		--self-contained || die
 }
+
+fi
+
+EXPORT_FUNCTIONS pkg_setup src_unpack src_prepare src_compile


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2022-11-25 11:37 Anna Vyalkova
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Vyalkova @ 2022-11-25 11:37 UTC (permalink / raw
  To: gentoo-commits

commit:     3191567b7af405031ab9a2e4e5a01daad14293b2
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Fri Nov 25 11:33:26 2022 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Fri Nov 25 11:37:01 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=3191567b

dotnet-utils.eclass: use "edo"

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 eclass/dotnet-utils.eclass | 23 ++++++++---------------
 1 file changed, 8 insertions(+), 15 deletions(-)

diff --git a/eclass/dotnet-utils.eclass b/eclass/dotnet-utils.eclass
index ea7c6591e..17c2c685a 100644
--- a/eclass/dotnet-utils.eclass
+++ b/eclass/dotnet-utils.eclass
@@ -17,7 +17,7 @@ esac
 if [[ ! ${_DOTNET_UTILS_ECLASS} ]]; then
 _DOTNET_UTILS_ECLASS=1
 
-inherit multiprocessing
+inherit edo multiprocessing
 
 # @ECLASS_VARIABLE: DOTNET_SLOT
 # @REQUIRED
@@ -129,25 +129,18 @@ dotnet-utils_pkg_setup() {
 }
 
 # @FUNCTION: edotnet
-# @USAGE: [[command] <args> ...]
+# @USAGE: <command> [args...]
 # @DESCRIPTION:
 # Call dotnet, passing the supplied arguments.
-# @RETURN: dotnet exit code
 edotnet() {
-	debug-print-function ${FUNCNAME} "$@"
-
-	local ret
-
-	set -- "$DOTNET_EXECUTABLE" "${@}" --runtime "${DOTNET_RUNTIME}" -maxcpucount:$(makeopts_jobs)
-	echo "${@}" >&2
-	"${@}"
-	ret=${?}
+	debug-print-function ${FUNCNAME} "${@}"
 
-	if [[ ${ret} -ne 0 ]]; then
-		die -n "edotnet failed"
-	fi
+	local dotnet_args=(
+		--runtime "${DOTNET_RUNTIME}"
+		-maxcpucount:$(makeopts_jobs)
+	)
 
-	return ${ret}
+	edo "${DOTNET_EXECUTABLE}" "${@}" "${dotnet_args[@]}"
 }
 
 # @FUNCTION: dotnet-utils_src_unpack


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2022-11-25 11:37 Anna Vyalkova
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Vyalkova @ 2022-11-25 11:37 UTC (permalink / raw
  To: gentoo-commits

commit:     13541aa6d02056b862fa4960b9e98c0f8a2e1408
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Fri Nov 25 11:26:03 2022 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Fri Nov 25 11:37:01 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=13541aa6

dotnet-utils.eclass: depend on virtual

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 eclass/dotnet-utils.eclass | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/eclass/dotnet-utils.eclass b/eclass/dotnet-utils.eclass
index 745676186..9e15fb08c 100644
--- a/eclass/dotnet-utils.eclass
+++ b/eclass/dotnet-utils.eclass
@@ -29,8 +29,7 @@ if [[ ! ${DOTNET_SLOT} ]]; then
 	die "${ECLASS}: DOTNET_SLOT not set"
 fi
 
-# Temporary, use the virtual once you can have multiple virtuals installed at once
-BDEPEND+=" || ( dev-dotnet/dotnet-sdk:${DOTNET_SLOT} dev-dotnet/dotnet-sdk-bin:${DOTNET_SLOT} )"
+BDEPEND="virtual/dotnet-sdk:${DOTNET_SLOT}"
 
 # @ECLASS_VARIABLE: DOTNET_EXECUTABLE
 # @DEFAULT_UNSET


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2022-11-25 17:54 Anna Vyalkova
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Vyalkova @ 2022-11-25 17:54 UTC (permalink / raw
  To: gentoo-commits

commit:     b54ed838ce8548a24d20c7192ae36747ff78de66
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Fri Nov 25 17:54:44 2022 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Fri Nov 25 17:54:44 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=b54ed838

Revert "dotnet-utils.eclass: depend on virtual"

This reverts commit 13541aa6d02056b862fa4960b9e98c0f8a2e1408.

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 eclass/dotnet-utils.eclass | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/eclass/dotnet-utils.eclass b/eclass/dotnet-utils.eclass
index d035a95da..be3953b89 100644
--- a/eclass/dotnet-utils.eclass
+++ b/eclass/dotnet-utils.eclass
@@ -29,7 +29,8 @@ if [[ ! ${DOTNET_SLOT} ]]; then
 	die "${ECLASS}: DOTNET_SLOT not set"
 fi
 
-BDEPEND="virtual/dotnet-sdk:${DOTNET_SLOT}"
+# Temporary, use the virtual once you can have multiple virtuals installed at once
+BDEPEND+=" || ( dev-dotnet/dotnet-sdk:${DOTNET_SLOT} dev-dotnet/dotnet-sdk-bin:${DOTNET_SLOT} )"
 
 # @ECLASS_VARIABLE: DOTNET_EXECUTABLE
 # @DEFAULT_UNSET


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2022-11-26 13:51 Anna Vyalkova
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Vyalkova @ 2022-11-26 13:51 UTC (permalink / raw
  To: gentoo-commits

commit:     cae492830d1fab28d9df55d6786d5ec0ff87b011
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Sat Nov 26 12:08:43 2022 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Sat Nov 26 12:27:24 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=cae49283

nim-utils.eclass: use "edo"

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 eclass/nim-utils.eclass | 58 ++++++++++++++++++++-----------------------------
 1 file changed, 23 insertions(+), 35 deletions(-)

diff --git a/eclass/nim-utils.eclass b/eclass/nim-utils.eclass
index 61f25905b..e72eb1bb5 100644
--- a/eclass/nim-utils.eclass
+++ b/eclass/nim-utils.eclass
@@ -44,7 +44,7 @@ if [[ ! ${_NIM_UTILS_ECLASS} ]]; then
 # Specifies an array of test files to be deselected via testament's --skipFrom
 # parameter, when calling etestament.
 
-inherit multiprocessing toolchain-funcs xdg-utils
+inherit edo multiprocessing toolchain-funcs xdg-utils
 
 # @FUNCTION: enim
 # @USAGE: [<args>...]
@@ -56,9 +56,7 @@ inherit multiprocessing toolchain-funcs xdg-utils
 enim() {
 	debug-print-function ${FUNCNAME} "${@}"
 
-	set -- nim "${@}" ${NIMFLAGS}
-	echo "$@" >&2
-	"$@" || die -n "${*} failed"
+	edo nim "${@}" ${NIMFLAGS}
 }
 
 # @FUNCTION: ekoch
@@ -80,9 +78,7 @@ ekoch() {
 			eerror "${FUNCNAME} is not implemented for ${CATEGORY}/${PN}" ;;
 	esac
 
-	set -- ${koch} "${@}"
-	echo "$@" >&2
-	"$@" || die -n "${*} failed"
+	edo ${koch} "${@}"
 }
 
 # @FUNCTION: etestament
@@ -110,17 +106,12 @@ etestament() {
 		testament_args+=( --skipFrom:"${skipfile}" )
 	fi
 
-	set -- testament "${testament_args[@]}" "${@}"
-	echo "$@" >&2
-	"$@" || die -n "${*} failed"
+	edo testament "${testament_args[@]}" "${@}"
 }
 
 # @FUNCTION: nim_get_buildtype
-# @USAGE:
 # @RETURN: build type (debug or release) based on USE flags
 nim_get_buildtype() {
-	debug-print-function ${FUNCNAME} "${@}"
-
 	if has debug ${IUSE}; then
 		echo $(usex debug "debug" "release")
 	else
@@ -129,11 +120,8 @@ nim_get_buildtype() {
 }
 
 # @FUNCTION: nim_get_colors
-# @USAGE:
 # @RETURN: "off" if colors should be disabled, "on" otherwise
 nim_get_colors() {
-	debug-print-function ${FUNCNAME} "${@}"
-
 	case ${NOCOLOR} in
 		true|yes) echo "off" ;;
 		*)        echo "on" ;;
@@ -154,25 +142,25 @@ nim_gen_config() {
 	local dir=${1:-${WORKDIR}}
 
 	cat > "${dir}"/nim.cfg <<- EOF || die "Failed to create Nim config"
-	cc:"gcc"
-	gcc.exe:"$(tc-getCC)"
-	gcc.linkerexe:"$(tc-getCC)"
-	gcc.cpp.exe:"$(tc-getCXX)"
-	gcc.cpp.linkerexe:"$(tc-getCXX)"
-	gcc.options.speed:"${CFLAGS}"
-	gcc.options.size:"${CFLAGS}"
-	gcc.options.debug:"${CFLAGS}"
-	gcc.options.always:"${CPPFLAGS}"
-	gcc.options.linker:"${LDFLAGS}"
-	gcc.cpp.options.speed:"${CXXFLAGS}"
-	gcc.cpp.options.size:"${CXXFLAGS}"
-	gcc.cpp.options.debug:"${CXXFLAGS}"
-	gcc.cpp.options.always:"${CPPFLAGS}"
-	gcc.cpp.options.linker:"${LDFLAGS}"
-
-	-d:"$(nim_get_buildtype)"
-	--colors:"$(nim_get_colors)"
-	--parallelBuild:"$(makeopts_jobs)"
+		cc:"gcc"
+		gcc.exe:"$(tc-getCC)"
+		gcc.linkerexe:"$(tc-getCC)"
+		gcc.cpp.exe:"$(tc-getCXX)"
+		gcc.cpp.linkerexe:"$(tc-getCXX)"
+		gcc.options.speed:"${CFLAGS}"
+		gcc.options.size:"${CFLAGS}"
+		gcc.options.debug:"${CFLAGS}"
+		gcc.options.always:"${CPPFLAGS}"
+		gcc.options.linker:"${LDFLAGS}"
+		gcc.cpp.options.speed:"${CXXFLAGS}"
+		gcc.cpp.options.size:"${CXXFLAGS}"
+		gcc.cpp.options.debug:"${CXXFLAGS}"
+		gcc.cpp.options.always:"${CPPFLAGS}"
+		gcc.cpp.options.linker:"${LDFLAGS}"
+
+		-d:"$(nim_get_buildtype)"
+		--colors:"$(nim_get_colors)"
+		--parallelBuild:"$(makeopts_jobs)"
 	EOF
 }
 


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2022-11-26 13:51 Anna Vyalkova
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Vyalkova @ 2022-11-26 13:51 UTC (permalink / raw
  To: gentoo-commits

commit:     f2f1718ac9d14ace6bd402c697d663cec774d36c
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Sat Nov 26 00:22:51 2022 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Sat Nov 26 12:27:24 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=f2f1718a

nimble.eclass: add depends examples

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 eclass/nimble.eclass | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/eclass/nimble.eclass b/eclass/nimble.eclass
index e08c2840e..08dd8493c 100644
--- a/eclass/nimble.eclass
+++ b/eclass/nimble.eclass
@@ -18,6 +18,8 @@
 #
 # ...
 #
+# DEPEND="dev-nim/foo"
+#
 # src_compile() {
 # 	nimble_src_compile
 # 	nimble_build scss
@@ -35,6 +37,11 @@
 # ...
 # SLOT=${PV}
 #
+# RDEPEND="
+# 	dev-nim/bar
+# 	dev-nim/baz
+# "
+#
 # set_package_url "https://github.com/example/example"
 
 


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2022-11-26 13:51 Anna Vyalkova
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Vyalkova @ 2022-11-26 13:51 UTC (permalink / raw
  To: gentoo-commits

commit:     d1da0d842dbf704a8cac7d8ea95647d5ab132657
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Sat Nov 26 13:50:36 2022 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Sat Nov 26 13:50:36 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=d1da0d84

nim-utils.eclass: print filenames being processed

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 eclass/nim-utils.eclass | 1 +
 1 file changed, 1 insertion(+)

diff --git a/eclass/nim-utils.eclass b/eclass/nim-utils.eclass
index eba7e5f5e..61cb4b45e 100644
--- a/eclass/nim-utils.eclass
+++ b/eclass/nim-utils.eclass
@@ -161,6 +161,7 @@ nim_gen_config() {
 		-d:"$(nim_get_buildtype)"
 		--colors:"$(nim_get_colors)"
 		--parallelBuild:"$(makeopts_jobs)"
+		--processing:filenames
 	EOF
 }
 


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2022-11-26 13:51 Anna Vyalkova
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Vyalkova @ 2022-11-26 13:51 UTC (permalink / raw
  To: gentoo-commits

commit:     6ae35c4bc3580abc411e055c52cd6f610cd31555
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Sat Nov 26 12:11:48 2022 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Sat Nov 26 12:27:24 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=6ae35c4b

nim-utils.eclass: use "nim_get_colors" in etestament

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 eclass/nim-utils.eclass | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/eclass/nim-utils.eclass b/eclass/nim-utils.eclass
index e72eb1bb5..eba7e5f5e 100644
--- a/eclass/nim-utils.eclass
+++ b/eclass/nim-utils.eclass
@@ -89,13 +89,13 @@ ekoch() {
 etestament() {
 	debug-print-function ${FUNCNAME} "${@}"
 
-	local -a testament_args=()
+	local testament_args=(
+		--colors:$(nim_get_colors)
+	)
+
 	[[ ${TESTAMENT_DISABLE_MEGATEST} ]] && \
 		testament_args+=( --megatest:off )
 
-	[[ "${NOCOLOR}" == true || "${NOCOLOR}" == yes ]] && \
-		testament_args+=( --colors:off )
-
 	if [[ ${ETESTAMENT_DESELECT} ]]; then
 		local skipfile="${T}"/testament.skipfile
 		if [[ ! -f ${skipfile} ]]; then


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2022-12-08 17:02 Anna Figueiredo Gomes
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Figueiredo Gomes @ 2022-12-08 17:02 UTC (permalink / raw
  To: gentoo-commits

commit:     c2df2fac2e785537f9f826ca9cec158c2a492c5c
Author:     Anna (navi) Figueiredo Gomes <anna <AT> navirc <DOT> com>
AuthorDate: Thu Dec  8 16:53:29 2022 +0000
Commit:     Anna Figueiredo Gomes <anna-cli <AT> tutanota <DOT> com>
CommitDate: Thu Dec  8 16:53:29 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=c2df2fac

dotnet-utils.eclass: Typo in default src_compile

Signed-off-by: Anna (navi) Figueiredo Gomes <anna <AT> navirc.com>

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

diff --git a/eclass/dotnet-utils.eclass b/eclass/dotnet-utils.eclass
index be3953b89..deeb4c3c0 100644
--- a/eclass/dotnet-utils.eclass
+++ b/eclass/dotnet-utils.eclass
@@ -178,7 +178,7 @@ dotnet-utils_src_prepare() {
 dotnet-utils_src_compile() {
 	debug-print-function ${FUNCNAME} "${@}"
 
-	local publist_args=(
+	local publish_args=(
 		--no-restore
 		--configuration Release
 		-p:Version=${PV}
@@ -186,7 +186,7 @@ dotnet-utils_src_compile() {
 		--self-contained
 	)
 
-	edotnet publish "${publish_args}" || die "'dotnet publish' failed"
+	edotnet publish "${publish_args[@]}" || die "'dotnet publish' failed"
 }
 
 fi


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2023-01-08  2:17 Anna Vyalkova
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Vyalkova @ 2023-01-08  2:17 UTC (permalink / raw
  To: gentoo-commits

commit:     993876f59fe1d91fdbef62ae37292730a7da1c7d
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Sat Jan  7 13:55:38 2023 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Sun Jan  8 02:17:24 2023 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=993876f5

nim-utils.eclass: rename testament-skipfile.txt

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

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

diff --git a/eclass/nim-utils.eclass b/eclass/nim-utils.eclass
index 61cb4b45e..03df41014 100644
--- a/eclass/nim-utils.eclass
+++ b/eclass/nim-utils.eclass
@@ -1,4 +1,4 @@
-# Copyright 2022 Gentoo Authors
+# Copyright 2022-2023 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 # @ECLASS: nim-utils.eclass
@@ -97,7 +97,7 @@ etestament() {
 		testament_args+=( --megatest:off )
 
 	if [[ ${ETESTAMENT_DESELECT} ]]; then
-		local skipfile="${T}"/testament.skipfile
+		local skipfile="${T}"/testament-skipfile.txt
 		if [[ ! -f ${skipfile} ]]; then
 			printf "%s\n" "${ETESTAMENT_DESELECT[@]}" > "${skipfile}" || die
 		else


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2023-01-15 15:14 Anna Figueiredo Gomes
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Figueiredo Gomes @ 2023-01-15 15:14 UTC (permalink / raw
  To: gentoo-commits

commit:     dd2e4188aa28813331c3ab46827a993369425fc2
Author:     Anna (navi) Figueiredo Gomes <anna <AT> navirc <DOT> com>
AuthorDate: Sun Jan 15 15:11:44 2023 +0000
Commit:     Anna Figueiredo Gomes <anna-cli <AT> tutanota <DOT> com>
CommitDate: Sun Jan 15 15:11:44 2023 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=dd2e4188

dotnet-utils.eclass: Reorder sdk dependency

Since the virtual is still limited to a single version and dotnet-sdk
does not exist yet, reodering so that dotnet-sdk-bin takes priority.

Signed-off-by: Anna (navi) Figueiredo Gomes <anna <AT> navirc.com>

 eclass/dotnet-utils.eclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eclass/dotnet-utils.eclass b/eclass/dotnet-utils.eclass
index deeb4c3c0..a055168f2 100644
--- a/eclass/dotnet-utils.eclass
+++ b/eclass/dotnet-utils.eclass
@@ -30,7 +30,7 @@ if [[ ! ${DOTNET_SLOT} ]]; then
 fi
 
 # Temporary, use the virtual once you can have multiple virtuals installed at once
-BDEPEND+=" || ( dev-dotnet/dotnet-sdk:${DOTNET_SLOT} dev-dotnet/dotnet-sdk-bin:${DOTNET_SLOT} )"
+BDEPEND+=" || ( dev-dotnet/dotnet-sdk-bin:${DOTNET_SLOT} dev-dotnet/dotnet-sdk:${DOTNET_SLOT} )"
 
 # @ECLASS_VARIABLE: DOTNET_EXECUTABLE
 # @DEFAULT_UNSET


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2023-02-27  3:42 Anna Vyalkova
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Vyalkova @ 2023-02-27  3:42 UTC (permalink / raw
  To: gentoo-commits

commit:     611cc98f39adc9826d679dbea08cb569bb201cdd
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Mon Feb 27 03:20:04 2023 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Mon Feb 27 03:22:29 2023 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=611cc98f

shards.eclass: enable verbose test runner

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 eclass/shards.eclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eclass/shards.eclass b/eclass/shards.eclass
index a78d792ba..5c4ae2c82 100644
--- a/eclass/shards.eclass
+++ b/eclass/shards.eclass
@@ -95,7 +95,7 @@ shards_src_test() {
 	debug-print-function ${FUNCNAME} "${@}"
 
 	if [[ -d "spec" ]]; then
-		ecrystal spec "${@}" || die "Tests failed"
+		ecrystal spec --verbose "${@}" || die "Tests failed"
 	fi
 
 	return 0


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2023-02-27  3:42 Anna Vyalkova
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Vyalkova @ 2023-02-27  3:42 UTC (permalink / raw
  To: gentoo-commits

commit:     f8621872924609016acb5639ef26369fe51ad673
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Mon Feb 27 03:32:34 2023 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Mon Feb 27 03:32:34 2023 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=f8621872

shards.eclass: don't print env in src_configure

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

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

diff --git a/eclass/shards.eclass b/eclass/shards.eclass
index 5c4ae2c82..0958709e3 100644
--- a/eclass/shards.eclass
+++ b/eclass/shards.eclass
@@ -56,10 +56,10 @@ shards_src_configure() {
 	debug-print-function ${FUNCNAME} "${@}"
 
 	crystal_configure
-	einfo "CRYSTAL_OPTS='${CRYSTAL_OPTS}'"
+	debug-print "CRYSTAL_OPTS='${CRYSTAL_OPTS}'"
 
 	export CRYSTAL_PATH="${BROOT}$(shards_get_libdir):$(crystal env CRYSTAL_PATH || die "'crystal env' failed")"
-	einfo "CRYSTAL_PATH='${CRYSTAL_PATH}'"
+	debug-print "CRYSTAL_PATH='${CRYSTAL_PATH}'"
 
 	tc-export CC
 }


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2023-03-31 18:14 Jonas Frei
  0 siblings, 0 replies; 180+ messages in thread
From: Jonas Frei @ 2023-03-31 18:14 UTC (permalink / raw
  To: gentoo-commits

commit:     e8b38584b1308aa123c3b60278d0f683f2331628
Author:     Jonas Frei <freijon <AT> pm <DOT> me>
AuthorDate: Fri Mar 31 18:13:03 2023 +0000
Commit:     Jonas Frei <freijon <AT> pm <DOT> me>
CommitDate: Fri Mar 31 18:13:03 2023 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=e8b38584

shell-completion.eclass: New eclass

Signed-off-by: Jonas Frei <freijon <AT> pm.me>

 eclass/shell-completion.eclass | 119 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 119 insertions(+)

diff --git a/eclass/shell-completion.eclass b/eclass/shell-completion.eclass
new file mode 100644
index 000000000..271378c51
--- /dev/null
+++ b/eclass/shell-completion.eclass
@@ -0,0 +1,119 @@
+# Copyright 2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# @ECLASS: shell-completion.eclass
+# @SUPPORTED_EAPIS: 6 7 8
+# @MAINTAINER:
+# Jonas Frei <freijon@pm.me>
+# @BLURB: A few quick functions to install various shell completion files
+# @DESCRIPTION:
+# This eclass provides a standardised way to install shell completions 
+# for popular shells. It inherits the already widely adopted
+# `bash-completion-r1`, thus extending on its functionality. 
+
+if [[ ! ${_SHELL_COMPLETION_ECLASS} ]]; then
+_SHELL_COMPLETION_ECLASS=1
+
+# Extend bash-completion-r1
+inherit bash-completion-r1
+
+case ${EAPI} in
+	6|7|8) ;;
+	*) die "${ECLASS}: EAPI ${EAPI} unsupported."
+esac
+
+# @FUNCTION: _shell-completion_get_fishcompdir
+# @INTERNAL
+# @DESCRIPTION:
+# Get unprefixed fish completions directory
+_shell-completion_get_fishcompdir() {
+	debug-print-function ${FUNCNAME} "${@}"
+
+	echo "/usr/share/fish/vendor_completions.d"
+}
+
+# @FUNCTION: _shell-completion_get_zshcompdir
+# @INTERNAL
+# @DESCRIPTION:
+# Get unprefixed zsh completions directory
+_shell-completion_get_zshcompdir() {
+	debug-print-function ${FUNCNAME} "${@}"
+
+	echo "/usr/share/zsh/site-functions"
+}
+
+# @FUNCTION: get_fishcompdir
+# @DESCRIPTION:
+# Get the fish completions directory.
+get_fishcompdir() {
+	debug-print-function ${FUNCNAME} "${@}"
+
+	echo "${EPREFIX}$(_get_fishcompdir)"
+}
+
+# @FUNCTION: get_zshcompdir
+# @DESCRIPTION:
+# Get the zsh completions directory.
+get_zshcompdir() {
+	debug-print-function ${FUNCNAME} "${@}"
+
+	echo "${EPREFIX}$(_get_zshcompdir)"
+}
+
+# @FUNCTION: dofishcomp
+# @USAGE: <file> [...]
+# @DESCRIPTION:
+# Install fish completion files passed as args.
+dofishcomp() {
+	debug-print-function ${FUNCNAME} "${@}"
+
+	(
+		insopts -m 0644
+		insinto "$(_shell-completion_get_fishcompdir)"
+		doins "${@}"
+	)
+}
+
+# @FUNCTION: dozshcomp
+# @USAGE: <file> [...]
+# @DESCRIPTION:
+# Install zsh completion files passed as args.
+dozshcomp() {
+	debug-print-function ${FUNCNAME} "${@}"
+
+	(
+		insopts -m 0644
+		insinto "$(_shell-completion_get_zshcompdir)"
+		doins "${@}"
+	)
+}
+
+# @FUNCTION: newfishcomp
+# @USAGE: <file> <newname>
+# @DESCRIPTION:
+# Install fish file under a new name.
+newfishcomp() {
+	debug-print-function ${FUNCNAME} "${@}"
+
+	(
+		insopts -m 0644
+		insinto "$(_shell-completion_get_fishcompdir)"
+		newins "${@}"
+	)
+}
+
+# @FUNCTION: newzshcomp
+# @USAGE: <file> <newname>
+# @DESCRIPTION:
+# Install zsh file under a new name.
+newzshcomp() {
+	debug-print-function ${FUNCNAME} "${@}"
+
+	(
+		insopts -m 0644
+		insinto "$(_shell-completion_get_zshcompdir)"
+		newins "${@}"
+	)
+}
+
+fi


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2023-03-31 18:48 Anna Vyalkova
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Vyalkova @ 2023-03-31 18:48 UTC (permalink / raw
  To: gentoo-commits

commit:     5c938acd334d8d33bbdb5a116fd11a7d885aaa40
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Fri Mar 31 18:39:54 2023 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Fri Mar 31 18:39:54 2023 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=5c938acd

shell-completion.eclass: move EAPI guard

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 eclass/shell-completion.eclass | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/eclass/shell-completion.eclass b/eclass/shell-completion.eclass
index 271378c51..008c1c0a0 100644
--- a/eclass/shell-completion.eclass
+++ b/eclass/shell-completion.eclass
@@ -11,17 +11,17 @@
 # for popular shells. It inherits the already widely adopted
 # `bash-completion-r1`, thus extending on its functionality. 
 
+case ${EAPI} in
+	8) ;;
+	*) die "${ECLASS}: EAPI ${EAPI:-0} not supported"
+esac
+
 if [[ ! ${_SHELL_COMPLETION_ECLASS} ]]; then
 _SHELL_COMPLETION_ECLASS=1
 
 # Extend bash-completion-r1
 inherit bash-completion-r1
 
-case ${EAPI} in
-	6|7|8) ;;
-	*) die "${ECLASS}: EAPI ${EAPI} unsupported."
-esac
-
 # @FUNCTION: _shell-completion_get_fishcompdir
 # @INTERNAL
 # @DESCRIPTION:


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2023-03-31 18:48 Anna Vyalkova
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Vyalkova @ 2023-03-31 18:48 UTC (permalink / raw
  To: gentoo-commits

commit:     02350e141d89bb1415f0452188dbab8aebdb3083
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Fri Mar 31 18:45:20 2023 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Fri Mar 31 18:47:58 2023 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=02350e14

shell-completion.eclass: small fixes

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 eclass/shell-completion.eclass | 35 ++++++++++++++---------------------
 1 file changed, 14 insertions(+), 21 deletions(-)

diff --git a/eclass/shell-completion.eclass b/eclass/shell-completion.eclass
index 008c1c0a0..aa7c7bab7 100644
--- a/eclass/shell-completion.eclass
+++ b/eclass/shell-completion.eclass
@@ -2,14 +2,15 @@
 # Distributed under the terms of the GNU General Public License v2
 
 # @ECLASS: shell-completion.eclass
-# @SUPPORTED_EAPIS: 6 7 8
+# @SUPPORTED_EAPIS: 8
+# @PROVIDES: bash-completion-r1
 # @MAINTAINER:
 # Jonas Frei <freijon@pm.me>
-# @BLURB: A few quick functions to install various shell completion files
+# @BLURB: a few quick functions to install various shell completion files
 # @DESCRIPTION:
-# This eclass provides a standardised way to install shell completions 
-# for popular shells. It inherits the already widely adopted
-# `bash-completion-r1`, thus extending on its functionality. 
+# This eclass provides a standardised way to install shell completions
+# for popular shells.  It inherits the already widely adopted
+# 'bash-completion-r1', thus extending on its functionality.
 
 case ${EAPI} in
 	8) ;;
@@ -24,44 +25,36 @@ inherit bash-completion-r1
 
 # @FUNCTION: _shell-completion_get_fishcompdir
 # @INTERNAL
-# @DESCRIPTION:
-# Get unprefixed fish completions directory
+# @RETURN: unprefixed fish completions directory
 _shell-completion_get_fishcompdir() {
-	debug-print-function ${FUNCNAME} "${@}"
-
 	echo "/usr/share/fish/vendor_completions.d"
 }
 
 # @FUNCTION: _shell-completion_get_zshcompdir
 # @INTERNAL
-# @DESCRIPTION:
-# Get unprefixed zsh completions directory
+# @RETURN: unprefixed zsh completions directory
 _shell-completion_get_zshcompdir() {
-	debug-print-function ${FUNCNAME} "${@}"
-
 	echo "/usr/share/zsh/site-functions"
 }
 
 # @FUNCTION: get_fishcompdir
-# @DESCRIPTION:
-# Get the fish completions directory.
+# @RETURN: the fish completions directory (with EPREFIX)
 get_fishcompdir() {
 	debug-print-function ${FUNCNAME} "${@}"
 
-	echo "${EPREFIX}$(_get_fishcompdir)"
+	echo "${EPREFIX}$(_shell-completion_get_fishcompdir)"
 }
 
 # @FUNCTION: get_zshcompdir
-# @DESCRIPTION:
-# Get the zsh completions directory.
+# @RETURN: the zsh completions directory (with EPREFIX)
 get_zshcompdir() {
 	debug-print-function ${FUNCNAME} "${@}"
 
-	echo "${EPREFIX}$(_get_zshcompdir)"
+	echo "${EPREFIX}$(_shell-completion_get_zshcompdir)"
 }
 
 # @FUNCTION: dofishcomp
-# @USAGE: <file> [...]
+# @USAGE: <file...>
 # @DESCRIPTION:
 # Install fish completion files passed as args.
 dofishcomp() {
@@ -75,7 +68,7 @@ dofishcomp() {
 }
 
 # @FUNCTION: dozshcomp
-# @USAGE: <file> [...]
+# @USAGE: <file...>
 # @DESCRIPTION:
 # Install zsh completion files passed as args.
 dozshcomp() {


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2023-04-06 14:09 Anna Vyalkova
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Vyalkova @ 2023-04-06 14:09 UTC (permalink / raw
  To: gentoo-commits

commit:     b23d08e5a23afd91df710807d66097b4daf2b677
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Thu Apr  6 13:05:33 2023 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Thu Apr  6 13:08:46 2023 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=b23d08e5

boinc.eclass: update boinc_require_source

* Add 'wrapper' and 'vboxwrapper' to release types
* Clean up code

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

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

diff --git a/eclass/boinc.eclass b/eclass/boinc.eclass
index 73aa24fe7..a90f19dd7 100644
--- a/eclass/boinc.eclass
+++ b/eclass/boinc.eclass
@@ -45,7 +45,7 @@ fi
 if [[ ! ${_BOINC_ECLASS} ]]; then
 
 # @FUNCTION: get_boinc_src
-# @USAGE: <SRC_URI|S> <release> [client|server]
+# @USAGE: <SRC_URI|S> <release> [client|server|vboxwrapper|wrapper]
 # @RETURN: SRC_URI snippet or temporary build directory for given BOINC release
 get_boinc_src() {
 	debug-print-function ${FUNCNAME} "${@}"]
@@ -55,18 +55,20 @@ get_boinc_src() {
 	local RELEASE_MINOR=$(ver_cut 1-2 ${RELEASE_PATCH})
 	local RELEASE_TYPE=${3:-client}
 
-	local SUFFIX=
+	local TAG
 	case ${RELEASE_TYPE} in
-		server) SUFFIX="-server" ;;
-		client) ;;
-		*) die "${FUNCNAME}: unknown release type '${RELEASE_TYPE}'"
+		client|server)
+			TAG="${RELEASE_TYPE}_release/${RELEASE_MINOR}/${RELEASE_PATCH}" ;;
+		vboxwrapper|wrapper)
+			TAG="${RELEASE_TYPE}/${RELEASE_PATCH}" ;;
+		*)
+			die "${FUNCNAME}: unknown release type '${RELEASE_TYPE}'"
 	esac
 
-	local _SRC_URI="https://github.com/BOINC/boinc/archive/"
-	_SRC_URI+="${RELEASE_TYPE}_release/${RELEASE_MINOR}/${RELEASE_PATCH}.tar.gz"
-	_SRC_URI+=" -> boinc${SUFFIX}-${RELEASE_PATCH}.tar.gz"
+	local _SRC_URI="https://github.com/BOINC/boinc/archive/refs/tags/${TAG}.tar.gz"
+	_SRC_URI+=" -> boinc-${RELEASE_TYPE}-${RELEASE_PATCH}.tar.gz"
 
-	local _S="${WORKDIR}/boinc-${RELEASE_TYPE}_release-${RELEASE_MINOR}-${RELEASE_PATCH}"
+	local _S="${WORKDIR}/boinc-${TAG////-}"
 
 	case ${query_var} in
 		SRC_URI) echo "${_SRC_URI}" ;;
@@ -82,7 +84,7 @@ get_boinc_src() {
 # Temporary build directory, where BOINC sources are located.
 
 # @FUNCTION: boinc_require_source
-# @USAGE: [boinc version] [client|server]
+# @USAGE: [boinc version] [client|server|vboxwrapper|wrapper]
 # @DESCRIPTION:
 # Set up SRC_URI and S for building application within BOINC source tree.
 #


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2023-04-06 14:09 Anna Vyalkova
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Vyalkova @ 2023-04-06 14:09 UTC (permalink / raw
  To: gentoo-commits

commit:     64d25327b6b2e1986fb31d61b938101f06623eba
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Thu Apr  6 13:22:55 2023 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Thu Apr  6 13:59:36 2023 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=64d25327

boinc.eclass: add --enable-static and --disable-fcgi to default flags

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 eclass/boinc.eclass | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/eclass/boinc.eclass b/eclass/boinc.eclass
index a90f19dd7..56d972b66 100644
--- a/eclass/boinc.eclass
+++ b/eclass/boinc.eclass
@@ -109,15 +109,15 @@ boinc_require_source() {
 # @DESCRIPTION:
 # Configure BOINC source tree using autotools.
 #
-# If no arguments are given, econf will be called
-# with --enable-pkg-devel flag.
+# If no arguments are given, econf will be called with
+# '--enable-static --enable-pkg-devel --disable-fcgi' flags.
 #
 # This function must be called in global scope.
 boinc_enable_autotools() {
 	debug-print-function ${FUNCNAME} "${@}"]
 
 	_BOINC_RUN_AUTOTOOLS=1
-	_BOINC_ECONF_ARGS=${@:---enable-pkg-devel}
+	_BOINC_ECONF_ARGS=${@:---enable-static --enable-pkg-devel --disable-fcgi}
 }
 
 # @FUNCTION: boinc_override_config
@@ -204,7 +204,7 @@ boinc_src_configure() {
 	edo bash ./generate_svn_version.sh
 
 	if [[ ${_BOINC_RUN_AUTOTOOLS} ]]; then
-		econf "${_BOINC_ECONF_ARGS[@]}"
+		econf ${_BOINC_ECONF_ARGS}
 	else
 		tc-export AR CC CPP CXX LD OBJDUMP RANLIB
 	fi


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2023-04-12 18:44 Jonas Frei
  0 siblings, 0 replies; 180+ messages in thread
From: Jonas Frei @ 2023-04-12 18:44 UTC (permalink / raw
  To: gentoo-commits

commit:     01245d2fcbce7ecdf0a900774b711eabc7541c36
Author:     Jonas Frei <freijon <AT> pm <DOT> me>
AuthorDate: Wed Apr 12 18:42:30 2023 +0000
Commit:     Jonas Frei <freijon <AT> pm <DOT> me>
CommitDate: Wed Apr 12 18:42:30 2023 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=01245d2f

shell-completion.eclass: Credit to original author

cc: @parona-source
Signed-off-by: Jonas Frei <freijon <AT> pm.me>

 eclass/shell-completion.eclass | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/eclass/shell-completion.eclass b/eclass/shell-completion.eclass
index aa7c7bab7..b7b59802a 100644
--- a/eclass/shell-completion.eclass
+++ b/eclass/shell-completion.eclass
@@ -4,6 +4,8 @@
 # @ECLASS: shell-completion.eclass
 # @SUPPORTED_EAPIS: 8
 # @PROVIDES: bash-completion-r1
+# @AUTHOR:
+# Alfred Wingate <parona@protonmail.com>
 # @MAINTAINER:
 # Jonas Frei <freijon@pm.me>
 # @BLURB: a few quick functions to install various shell completion files


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2023-05-06 15:55 Anna Vyalkova
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Vyalkova @ 2023-05-06 15:55 UTC (permalink / raw
  To: gentoo-commits

commit:     6383edfebfa9fe59deb54a6616ea90aeca0e0c14
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Sat May  6 15:54:26 2023 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Sat May  6 15:54:26 2023 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=6383edfe

nimble.eclass: update build deps

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 eclass/nimble.eclass | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/eclass/nimble.eclass b/eclass/nimble.eclass
index 08dd8493c..c7a16c754 100644
--- a/eclass/nimble.eclass
+++ b/eclass/nimble.eclass
@@ -67,8 +67,7 @@ NINJA="ninja"
 inherit nim-utils ninja-utils
 
 BDEPEND="${NINJA_DEPEND}
-	dev-lang/nim[experimental(-)]
-	>=dev-nim/nimbus-1.0.0
+	>=dev-nim/nimbus-1.1.0
 "
 
 # @FUNCTION: set_package_url


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2023-05-06 17:52 Anna Vyalkova
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Vyalkova @ 2023-05-06 17:52 UTC (permalink / raw
  To: gentoo-commits

commit:     640a3d77c0c933519c9f2d567f12377b0ddf07f1
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Sat May  6 17:51:21 2023 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Sat May  6 17:51:21 2023 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=640a3d77

nimble.eclass: disable --useDepfile option

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 eclass/nimble.eclass | 1 -
 1 file changed, 1 deletion(-)

diff --git a/eclass/nimble.eclass b/eclass/nimble.eclass
index c7a16c754..03d72266e 100644
--- a/eclass/nimble.eclass
+++ b/eclass/nimble.eclass
@@ -140,7 +140,6 @@ nimble_src_configure() {
 	local nimbusargs=(
 		--nimbleDir:"${EPREFIX}"/opt/nimble
 		--binDir:"${EPREFIX}"/usr/bin
-		--useDepfile
 		"${mynimargs[@]}"
 	)
 


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2023-05-06 18:00 Anna Vyalkova
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Vyalkova @ 2023-05-06 18:00 UTC (permalink / raw
  To: gentoo-commits

commit:     55bbe18bdd3ee23ce8d070894a51dee954f956bc
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Sat May  6 18:00:01 2023 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Sat May  6 18:00:01 2023 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=55bbe18b

nimble.eclass: allow samu

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 eclass/nimble.eclass | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/eclass/nimble.eclass b/eclass/nimble.eclass
index 03d72266e..410b94932 100644
--- a/eclass/nimble.eclass
+++ b/eclass/nimble.eclass
@@ -58,12 +58,6 @@ if [[ ! ${_NIMBLE_ECLASS} ]]; then
 # Build directory, location where all generated files should be placed.
 # If this isn't set, it defaults to ${WORKDIR}/${P}-build.
 
-# @ECLASS_VARIABLE: NINJA
-# @INTERNAL
-# @DESCRIPTION:
-# Force ninja because samu doesn't work correctly.
-NINJA="ninja"
-
 inherit nim-utils ninja-utils
 
 BDEPEND="${NINJA_DEPEND}


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2023-05-08 16:45 Anna Vyalkova
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Vyalkova @ 2023-05-08 16:45 UTC (permalink / raw
  To: gentoo-commits

commit:     bb912a87ffbad30352a2ee689e222daa55adcdcd
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Mon May  8 16:31:32 2023 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Mon May  8 16:31:32 2023 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=bb912a87

nimble.eclass: force ninja again

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 eclass/nimble.eclass | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/eclass/nimble.eclass b/eclass/nimble.eclass
index 410b94932..a393ee263 100644
--- a/eclass/nimble.eclass
+++ b/eclass/nimble.eclass
@@ -58,6 +58,12 @@ if [[ ! ${_NIMBLE_ECLASS} ]]; then
 # Build directory, location where all generated files should be placed.
 # If this isn't set, it defaults to ${WORKDIR}/${P}-build.
 
+# @ECLASS_VARIABLE: NINJA
+# @INTERNAL
+# @DESCRIPTION:
+# Force ninja because samu doesn't work correctly ('-n' flag is required).
+NINJA="ninja"
+
 inherit nim-utils ninja-utils
 
 BDEPEND="${NINJA_DEPEND}


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2023-05-09 15:43 Anna Vyalkova
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Vyalkova @ 2023-05-09 15:43 UTC (permalink / raw
  To: gentoo-commits

commit:     ec1443faebbc71275ac1d107074d4ab4255574dc
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Mon May  8 17:25:56 2023 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Tue May  9 15:42:46 2023 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=ec1443fa

shards.eclass: set SHARDS_INSTALL_PATH

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 eclass/shards.eclass | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/eclass/shards.eclass b/eclass/shards.eclass
index 0958709e3..f17f93cb9 100644
--- a/eclass/shards.eclass
+++ b/eclass/shards.eclass
@@ -58,7 +58,8 @@ shards_src_configure() {
 	crystal_configure
 	debug-print "CRYSTAL_OPTS='${CRYSTAL_OPTS}'"
 
-	export CRYSTAL_PATH="${BROOT}$(shards_get_libdir):$(crystal env CRYSTAL_PATH || die "'crystal env' failed")"
+	export SHARDS_INSTALL_PATH="${BROOT}$(shards_get_libdir)"
+	export CRYSTAL_PATH="${SHARDS_INSTALL_PATH}:$(crystal env CRYSTAL_PATH || die "'crystal env' failed")"
 	debug-print "CRYSTAL_PATH='${CRYSTAL_PATH}'"
 
 	tc-export CC


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2023-05-09 15:43 Anna Vyalkova
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Vyalkova @ 2023-05-09 15:43 UTC (permalink / raw
  To: gentoo-commits

commit:     a908862549f4504fd88bfbe5305dd3c34101ea77
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Mon May  8 18:51:48 2023 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Tue May  9 15:42:47 2023 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=a9088625

crystal-utils.eclass: add crystal_build function

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 eclass/crystal-utils.eclass | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/eclass/crystal-utils.eclass b/eclass/crystal-utils.eclass
index 09a4049a4..3c0b7d48a 100644
--- a/eclass/crystal-utils.eclass
+++ b/eclass/crystal-utils.eclass
@@ -24,7 +24,7 @@ esac
 if [[ ! ${_CRYSTAL_UTILS_ECLASS} ]]; then
 _CRYSTAL_UTILS_ECLASS=1
 
-inherit edo flag-o-matic
+inherit edo flag-o-matic multiprocessing
 
 # @ECLASS_VARIABLE: CRYSTAL_DEPS
 # @OUTPUT_VARIABLE
@@ -151,4 +151,17 @@ eshards() {
 	edo shards "${args[@]}" "${@}"
 }
 
+# @FUNCTION: crystal_build
+# @USAGE: <args>...
+# @DESCRIPTION:
+# Function for building a target.  All arguments are passed to crystal.
+crystal_build() {
+	local build_args=(
+		--threads=$(makeopts_jobs)
+		--verbose
+	)
+
+	ecrystal build "${build_args[@]}" "${@}"
+}
+
 fi


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2023-05-09 15:43 Anna Vyalkova
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Vyalkova @ 2023-05-09 15:43 UTC (permalink / raw
  To: gentoo-commits

commit:     8a943f0dd2fb8c23968fdddd2c43b5d7fe0bca29
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Mon May  8 18:50:50 2023 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Tue May  9 15:42:46 2023 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=8a943f0d

shards.eclass: do not use 'shards build'

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 eclass/shards.eclass | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/eclass/shards.eclass b/eclass/shards.eclass
index f17f93cb9..122464cc5 100644
--- a/eclass/shards.eclass
+++ b/eclass/shards.eclass
@@ -67,19 +67,10 @@ shards_src_configure() {
 
 # @FUNCTION: shards_src_compile
 # @DESCRIPTION:
-# General function for building packages using Shards.
+# Function for building the package's documentation.
 shards_src_compile() {
 	debug-print-function ${FUNCNAME} "${@}"
 
-	local build_args=(
-		--threads=$(makeopts_jobs)
-		--verbose
-	)
-
-	if gshards-has-targets; then
-		eshards build "${build_args[@]}"
-	fi
-
 	if use doc; then
 		ecrystal docs
 		HTML_DOCS=( docs/. )


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2023-05-09 15:43 Anna Vyalkova
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Vyalkova @ 2023-05-09 15:43 UTC (permalink / raw
  To: gentoo-commits

commit:     471145080920d7798f2e00a1001f7d454b29f02f
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Mon May  8 18:53:50 2023 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Tue May  9 15:42:47 2023 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=47114508

crystal-utils.eclass: add crystal_spec function

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 eclass/crystal-utils.eclass | 8 ++++++++
 eclass/shards.eclass        | 2 +-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/eclass/crystal-utils.eclass b/eclass/crystal-utils.eclass
index 3c0b7d48a..8456c5af6 100644
--- a/eclass/crystal-utils.eclass
+++ b/eclass/crystal-utils.eclass
@@ -164,4 +164,12 @@ crystal_build() {
 	ecrystal build "${build_args[@]}" "${@}"
 }
 
+# @FUNCTION: crystal_spec
+# @USAGE: [<args>...]
+# @DESCRIPTION:
+# Function for running tests.  All arguments are passed to crystal.
+crystal_spec() {
+	ecrystal spec --verbose "${@}" || die -n "Tests failed"
+}
+
 fi

diff --git a/eclass/shards.eclass b/eclass/shards.eclass
index 122464cc5..5fd9f6c10 100644
--- a/eclass/shards.eclass
+++ b/eclass/shards.eclass
@@ -87,7 +87,7 @@ shards_src_test() {
 	debug-print-function ${FUNCNAME} "${@}"
 
 	if [[ -d "spec" ]]; then
-		ecrystal spec --verbose "${@}" || die "Tests failed"
+		crystal_spec "${@}"
 	fi
 
 	return 0


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2023-05-09 19:30 Anna Vyalkova
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Vyalkova @ 2023-05-09 19:30 UTC (permalink / raw
  To: gentoo-commits

commit:     68db6d9b906fc6c0efecfdbc797aa286bc155546
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Tue May  9 19:28:54 2023 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Tue May  9 19:30:07 2023 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=68db6d9b

shards.eclass: detect build targets using gshards

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 eclass/shards.eclass | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/eclass/shards.eclass b/eclass/shards.eclass
index 5fd9f6c10..0de0deb47 100644
--- a/eclass/shards.eclass
+++ b/eclass/shards.eclass
@@ -28,7 +28,7 @@ inherit crystal-utils multiprocessing toolchain-funcs
 BDEPEND="
 	${CRYSTAL_DEPS}
 	${SHARDS_DEPS}
-	dev-util/gshards
+	>=dev-util/gshards-0.2
 "
 IUSE="debug doc"
 
@@ -67,10 +67,15 @@ shards_src_configure() {
 
 # @FUNCTION: shards_src_compile
 # @DESCRIPTION:
-# Function for building the package's documentation.
+# Function for building the package's executables and documentation.
 shards_src_compile() {
 	debug-print-function ${FUNCNAME} "${@}"
 
+	local args
+	gshards-print-targets | while read -r args; do
+		crystal_build "${@}" ${args}
+	done
+
 	if use doc; then
 		ecrystal docs
 		HTML_DOCS=( docs/. )
@@ -95,14 +100,10 @@ shards_src_test() {
 
 # @FUNCTION: shards_src_install
 # @DESCRIPTION:
-# Function for installing the package.
+# Function for installing the package's source.
 shards_src_install() {
 	debug-print-function ${FUNCNAME} "${@}"
 
-	if [[ -d "bin" ]]; then
-		dobin bin/*
-	fi
-
 	if [[ -d "src" ]]; then
 		insinto $(shards_get_libdir)/$(shards_get_pkgname)
 		doins -r src


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2023-05-21 16:27 Anna Vyalkova
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Vyalkova @ 2023-05-21 16:27 UTC (permalink / raw
  To: gentoo-commits

commit:     e75c73870af006070292d631e1fe4e7490b0a5ec
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Sun May 21 16:17:52 2023 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Sun May 21 16:19:55 2023 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=e75c7387

crystal-utils.eclass: add CRYSTAL_DEFINES var

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 eclass/crystal-utils.eclass | 15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)

diff --git a/eclass/crystal-utils.eclass b/eclass/crystal-utils.eclass
index 8456c5af6..57325a993 100644
--- a/eclass/crystal-utils.eclass
+++ b/eclass/crystal-utils.eclass
@@ -48,6 +48,11 @@ SHARDS_DEPS="
 	)
 "
 
+# @ECLASS_VARIABLE: CRYSTAL_DEFINES
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# List of compile-time defines.  Used by 'crystal build' and 'crystal docs'.
+
 # @FUNCTION: _crystal_get_colors_opt
 # @INTERNAL
 # @RETURN: "--no-color" if colors should be disabled, empty string otherwise
@@ -76,15 +81,6 @@ _crystal_get_debug_opt() {
 # mycrystalargs bash array.
 #
 # Must be run or ecrystal/eshards will fail.
-#
-# @CODE
-# src_configure() {
-#       local mycrystalargs=(
-#               -Dfoo
-#       )
-#       crystal_configure
-# }
-# @CODE
 crystal_configure() {
 	debug-print-function ${FUNCNAME} "${@}"
 
@@ -107,6 +103,7 @@ crystal_configure() {
 		$(is-flagq -mcpu && echo "--mcpu=$(get-flag mcpu)")
 		$(is-flagq -mcmodel && echo "--mcmodel=$(get-flag mcmodel)")
 		# TODO: --mattr
+		"${CRYSTAL_DEFINES[@]}"
 		"${mycrystalargs[@]}"
 	)
 


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2023-05-21 16:27 Anna Vyalkova
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Vyalkova @ 2023-05-21 16:27 UTC (permalink / raw
  To: gentoo-commits

commit:     a5f49bbc8a320932ab708e68eb86d9666ec48ded
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Sun May 21 16:18:29 2023 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Sun May 21 16:19:55 2023 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=a5f49bbc

shards.eclass: pass CRYSTAL_DEFINES to docs cmd

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 eclass/shards.eclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eclass/shards.eclass b/eclass/shards.eclass
index 0de0deb47..3258cea48 100644
--- a/eclass/shards.eclass
+++ b/eclass/shards.eclass
@@ -77,7 +77,7 @@ shards_src_compile() {
 	done
 
 	if use doc; then
-		ecrystal docs
+		ecrystal docs "${CRYSTAL_DEFINES[@]}"
 		HTML_DOCS=( docs/. )
 	fi
 


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2023-06-24 19:22 Haelwenn Monnier
  0 siblings, 0 replies; 180+ messages in thread
From: Haelwenn Monnier @ 2023-06-24 19:22 UTC (permalink / raw
  To: gentoo-commits

commit:     c64dbb92037c38a5afb44467023b7ece43d662c5
Author:     Haelwenn (lanodan) Monnier <contact <AT> hacktivis <DOT> me>
AuthorDate: Sat Jun 24 19:13:05 2023 +0000
Commit:     Haelwenn Monnier <contact <AT> hacktivis <DOT> me>
CommitDate: Sat Jun 24 19:13:05 2023 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=c64dbb92

mix.eclass: New eclass, used by www-apps/pleroma

Signed-off-by: Haelwenn (lanodan) Monnier <contact <AT> hacktivis.me>

 eclass/mix.eclass | 95 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 95 insertions(+)

diff --git a/eclass/mix.eclass b/eclass/mix.eclass
new file mode 100644
index 000000000..b7d464731
--- /dev/null
+++ b/eclass/mix.eclass
@@ -0,0 +1,95 @@
+# Copyright 2019-2023 Haelwenn (lanodan) Monnier <contact@hacktivis.me>
+# Distributed under the terms of the GNU General Public License v2
+
+# @ECLASS: mix.eclass
+# @MAINTAINER:
+# Haelwenn (lanodan) Monnier <contact@hacktivis.me>
+# @AUTHOR:
+# Haelwenn (lanodan) Monnier <contact@hacktivis.me>
+# @SUPPORTED_EAPIS: 6 7 8
+# @BLURB: Build Elixir projects using Elixir's mix
+# @DESCRIPTION:
+# An eclass providing functions to build Elixir projects using Elixir's mix
+#
+# mix is a tool which tries to resolve dependencies itself
+
+case "${EAPI:-0}" in
+	0|1|2|3|4|5)
+		die "Unsupported EAPI=${EAPI:-0} (too old) for ${ECLASS}"
+		;;
+	6|7)
+		;;
+	*)
+		die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}"
+		;;
+esac
+
+EXPORT_FUNCTIONS src_prepare src_compile src_install
+
+RDEPEND="dev-lang/elixir"
+DEPEND="${RDEPEND}"
+
+# Erlang/Elixir software fails to build when another version with API 
+# differences is present
+BDEPEND="!<${CATEGORY}/${P} !>${CATEGORY}/${P}"
+
+# @ECLASS-VARIABLE: HEX_OFFLINE
+HEX_OFFLINE=1
+
+# @ECLASS-VARIABLE: MIX_ENV
+MIX_ENV="prod"
+
+# @ECLASS-VARIABLE: MIX_NO_DEPS
+MIX_NO_DEPS=1
+
+# @FUNCTION: emix
+# @USAGE: <targets>
+# @DESCRIPTION:
+# Run mix with provided arguments. Die on failure
+emix() {
+	debug-print-function ${FUNCNAME} "${@}"
+
+	(( $# > 0 )) || die "emix: at least one target is required"
+
+	MIX_ENV="${MIX_ENV}" mix "$@" || die -n "mix $@ failed"
+}
+
+# @ECLASS-VARIABLE: MIX_REWRITE
+MIX_REWRITE=""
+
+# @ECLASS-VARIABLE: MIX_BUILD_NAME
+MIX_BUILD_NAME="${MIX_ENV}"
+
+# @FUNCTION: mix_src_prepare
+mix_src_prepare() {
+	if [[ "${MIX_REWRITE}" != "" ]]
+	then
+		sed -i -E -e 's@\{.*(only|optional): .*},?@@' mix.exs || die "failed removing only & optionnal deps"
+		rm -f mix.lock
+	fi
+
+	default
+}
+
+# @FUNCTION: mix_src_compile
+# @DESCRIPTION:
+# Compile project with mix.
+mix_src_compile() {
+	debug-print-function ${FUNCNAME} "${@}"
+
+	emix compile --no-deps-check
+}
+
+# @FUNCTION: mix_src_install
+# @DESCRIPTION:
+# Install project with mix.
+mix_src_install() {
+	debug-print-function ${FUNCNAME} "${@}"
+
+	insinto "/usr/$(get_libdir)/elixir/lib/${P}"
+	pushd "_build/${MIX_BUILD_NAME}/lib/${PN}" >/dev/null
+	for reldir in src ebin priv include; do
+		[ -d "$reldir" ] && doins -r "$(realpath ${reldir})"
+	done
+	popd >/dev/null
+}


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
  2023-07-17 14:24 [gentoo-commits] repo/proj/guru:master " Florian Schmaus
@ 2023-07-17 14:24 ` Florian Schmaus
  0 siblings, 0 replies; 180+ messages in thread
From: Florian Schmaus @ 2023-07-17 14:24 UTC (permalink / raw
  To: gentoo-commits

commit:     0dc3cf6dd34d411d7dd8d2aaab7c3b319dcb3f22
Author:     Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Mon Jul 17 14:21:06 2023 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Mon Jul 17 14:21:06 2023 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=0dc3cf6d

shell-completion.eclass: promoted to ::gentoo

Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 eclass/shell-completion.eclass | 114 -----------------------------------------
 1 file changed, 114 deletions(-)

diff --git a/eclass/shell-completion.eclass b/eclass/shell-completion.eclass
deleted file mode 100644
index b7b59802a..000000000
--- a/eclass/shell-completion.eclass
+++ /dev/null
@@ -1,114 +0,0 @@
-# Copyright 2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-# @ECLASS: shell-completion.eclass
-# @SUPPORTED_EAPIS: 8
-# @PROVIDES: bash-completion-r1
-# @AUTHOR:
-# Alfred Wingate <parona@protonmail.com>
-# @MAINTAINER:
-# Jonas Frei <freijon@pm.me>
-# @BLURB: a few quick functions to install various shell completion files
-# @DESCRIPTION:
-# This eclass provides a standardised way to install shell completions
-# for popular shells.  It inherits the already widely adopted
-# 'bash-completion-r1', thus extending on its functionality.
-
-case ${EAPI} in
-	8) ;;
-	*) die "${ECLASS}: EAPI ${EAPI:-0} not supported"
-esac
-
-if [[ ! ${_SHELL_COMPLETION_ECLASS} ]]; then
-_SHELL_COMPLETION_ECLASS=1
-
-# Extend bash-completion-r1
-inherit bash-completion-r1
-
-# @FUNCTION: _shell-completion_get_fishcompdir
-# @INTERNAL
-# @RETURN: unprefixed fish completions directory
-_shell-completion_get_fishcompdir() {
-	echo "/usr/share/fish/vendor_completions.d"
-}
-
-# @FUNCTION: _shell-completion_get_zshcompdir
-# @INTERNAL
-# @RETURN: unprefixed zsh completions directory
-_shell-completion_get_zshcompdir() {
-	echo "/usr/share/zsh/site-functions"
-}
-
-# @FUNCTION: get_fishcompdir
-# @RETURN: the fish completions directory (with EPREFIX)
-get_fishcompdir() {
-	debug-print-function ${FUNCNAME} "${@}"
-
-	echo "${EPREFIX}$(_shell-completion_get_fishcompdir)"
-}
-
-# @FUNCTION: get_zshcompdir
-# @RETURN: the zsh completions directory (with EPREFIX)
-get_zshcompdir() {
-	debug-print-function ${FUNCNAME} "${@}"
-
-	echo "${EPREFIX}$(_shell-completion_get_zshcompdir)"
-}
-
-# @FUNCTION: dofishcomp
-# @USAGE: <file...>
-# @DESCRIPTION:
-# Install fish completion files passed as args.
-dofishcomp() {
-	debug-print-function ${FUNCNAME} "${@}"
-
-	(
-		insopts -m 0644
-		insinto "$(_shell-completion_get_fishcompdir)"
-		doins "${@}"
-	)
-}
-
-# @FUNCTION: dozshcomp
-# @USAGE: <file...>
-# @DESCRIPTION:
-# Install zsh completion files passed as args.
-dozshcomp() {
-	debug-print-function ${FUNCNAME} "${@}"
-
-	(
-		insopts -m 0644
-		insinto "$(_shell-completion_get_zshcompdir)"
-		doins "${@}"
-	)
-}
-
-# @FUNCTION: newfishcomp
-# @USAGE: <file> <newname>
-# @DESCRIPTION:
-# Install fish file under a new name.
-newfishcomp() {
-	debug-print-function ${FUNCNAME} "${@}"
-
-	(
-		insopts -m 0644
-		insinto "$(_shell-completion_get_fishcompdir)"
-		newins "${@}"
-	)
-}
-
-# @FUNCTION: newzshcomp
-# @USAGE: <file> <newname>
-# @DESCRIPTION:
-# Install zsh file under a new name.
-newzshcomp() {
-	debug-print-function ${FUNCNAME} "${@}"
-
-	(
-		insopts -m 0644
-		insinto "$(_shell-completion_get_zshcompdir)"
-		newins "${@}"
-	)
-}
-
-fi


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2023-08-04  7:26 Florian Schmaus
  0 siblings, 0 replies; 180+ messages in thread
From: Florian Schmaus @ 2023-08-04  7:26 UTC (permalink / raw
  To: gentoo-commits

commit:     252e74e80c0d3497de0d2d9b2324f364b30a8b01
Author:     Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Fri Aug  4 07:24:32 2023 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Fri Aug  4 07:25:55 2023 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=252e74e8

R-packages.eclass: simplify code, inline movelink function

Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 eclass/R-packages.eclass | 53 +++++++++++++++++++++---------------------------
 1 file changed, 23 insertions(+), 30 deletions(-)

diff --git a/eclass/R-packages.eclass b/eclass/R-packages.eclass
index 6dac19a161..f55cb9e417 100644
--- a/eclass/R-packages.eclass
+++ b/eclass/R-packages.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 # @ECLASS: R-packages.eclass
@@ -59,23 +59,6 @@ SLOT="0"
 DEPEND="dev-lang/R"
 RDEPEND="${DEPEND}"
 
-# @FUNCTION: _movelink
-# @INTERNAL
-# @USAGE: <source> <dest>
-# @DESCRIPTION:
-# <dest> will contain symlinks to everything in <source>
-_movelink() {
-	local source=${1}
-	local dest=${2}
-	if [[ -e "${source}" ]]; then
-		local rdir=/usr/$(get_libdir)/R/site-library/${CRAN_PN}
-		local rp_source="${rdir}/${source}"
-		insinto ${rdir}
-		doins -r ${source}
-		ln -s "${rp_source}" "${dest}" || die
-	fi
-}
-
 # @FUNCTION: R-packages_src_unpack
 # @DEPRECATED: none
 # @DESCRIPTION:
@@ -134,7 +117,6 @@ R-packages_src_compile() {
 		edo R CMD INSTALL . -d -l "${T}"/R --byte-compile
 }
 
-
 # @FUNCTION: R-packages_src_install
 # @DESCRIPTION:
 # Move files into right folders.
@@ -150,22 +132,33 @@ R-packages_src_install() {
 	local EDOCDIR="${ED}${DOCDIR}"
 	mkdir -p "${EDOCDIR}" || die
 
+	# _maybe_movelink <target> <link_name>
+	# If target exists, installs everything under target into R's
+	# site-library for the package and creates a link with the name
+	# <link_name> to it.
+	_maybe_movelink() {
+		local target=${1}
+		local link_name=${2}
+		if [[ ! -e "${target}" ]]; then
+			return
+		fi
+
+		local rdir=/usr/$(get_libdir)/R/site-library/${CRAN_PN}
+		local rp_source="${rdir}/${target}"
+		insinto ${rdir}
+		doins -r ${target}
+		ln -s "${rp_source}" "${link_name}" || die
+	}
+
 	for i in {NEWS,README}.md DESCRIPTION CITATION INDEX NEWS WORDLIST News.Rd; do
-		_movelink "${i}" "${EDOCDIR}/${i}"
+		_maybe_movelink "${i}" "${EDOCDIR}/${i}"
 	done
 
-	if [[ -e html ]]; then
-		_movelink html "${EDOCDIR}"/html
-	fi
+	_maybe_movelink html "${EDOCDIR}"/html
 
-	if [[ -e examples ]]; then
-		_movelink examples "${EDOCDIR}"/examples
-		docompress -x "${DOCDIR}"/examples
-	fi
+	_maybe_movelink examples "${EDOCDIR}"/examples
 
-	if [[ -e doc ]]; then
-		_movelink doc "${EDOCDIR}"/doc
-	fi
+	_maybe_movelink doc "${EDOCDIR}"/doc
 
 	rm -f LICENSE || die
 	rm -rf tests test || die


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2023-08-04  7:26 Florian Schmaus
  0 siblings, 0 replies; 180+ messages in thread
From: Florian Schmaus @ 2023-08-04  7:26 UTC (permalink / raw
  To: gentoo-commits

commit:     4e1d7e84973a548a8040739984c4bd467d6f7838
Author:     David Roman <davidroman96 <AT> gmail <DOT> com>
AuthorDate: Thu Aug  3 07:32:41 2023 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Fri Aug  4 07:25:55 2023 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=4e1d7e84

R-packages.eclass: fix package installation

Instead of creating a symlink R/site-library -> /usr/share/doc
do it otherwise, linking /usr/share/doc -> R/site-library.
This way if nodoc is enabled symlinks won't be broken.

Signed-off-by: David Roman <droman <AT> ifae.es>
Closes: https://github.com/gentoo/guru/pull/102
Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 eclass/R-packages.eclass | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/eclass/R-packages.eclass b/eclass/R-packages.eclass
index ed63cff46f..6dac19a161 100644
--- a/eclass/R-packages.eclass
+++ b/eclass/R-packages.eclass
@@ -68,9 +68,11 @@ _movelink() {
 	local source=${1}
 	local dest=${2}
 	if [[ -e "${source}" ]]; then
-		local rp_source="$(realpath ${source} || die)"
-		mv "${rp_source}" "${dest}" || die
-		cp -rsf "${dest}" "${rp_source}" || die
+		local rdir=/usr/$(get_libdir)/R/site-library/${CRAN_PN}
+		local rp_source="${rdir}/${source}"
+		insinto ${rdir}
+		doins -r ${source}
+		ln -s "${rp_source}" "${dest}" || die
 	fi
 }
 
@@ -162,11 +164,7 @@ R-packages_src_install() {
 	fi
 
 	if [[ -e doc ]]; then
-		pushd doc || die
-		for i in *; do
-			_movelink "${i}" "${EDOCDIR}/${i}"
-		done
-		popd || die
+		_movelink doc "${EDOCDIR}"/doc
 	fi
 
 	rm -f LICENSE || die


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2023-08-06 12:22 Haelwenn Monnier
  0 siblings, 0 replies; 180+ messages in thread
From: Haelwenn Monnier @ 2023-08-06 12:22 UTC (permalink / raw
  To: gentoo-commits

commit:     4ae1d46d5b0770caa9ff7d7c6891476b6e293218
Author:     Haelwenn (lanodan) Monnier <contact <AT> hacktivis <DOT> me>
AuthorDate: Sun Aug  6 12:14:47 2023 +0000
Commit:     Haelwenn Monnier <contact <AT> hacktivis <DOT> me>
CommitDate: Sun Aug  6 12:21:17 2023 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=4ae1d46d

mix.eclass: Add subslot on erlang

Closes: https://bugs.gentoo.org/909293
Signed-off-by: Haelwenn (lanodan) Monnier <contact <AT> hacktivis.me>

 eclass/mix.eclass | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/eclass/mix.eclass b/eclass/mix.eclass
index b7d4647313..39c6bed500 100644
--- a/eclass/mix.eclass
+++ b/eclass/mix.eclass
@@ -26,7 +26,10 @@ esac
 
 EXPORT_FUNCTIONS src_prepare src_compile src_install
 
-RDEPEND="dev-lang/elixir"
+RDEPEND="
+	dev-lang/elixir
+	dev-lang/erlang:=
+"
 DEPEND="${RDEPEND}"
 
 # Erlang/Elixir software fails to build when another version with API 


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2023-08-07  5:59 Haelwenn Monnier
  0 siblings, 0 replies; 180+ messages in thread
From: Haelwenn Monnier @ 2023-08-07  5:59 UTC (permalink / raw
  To: gentoo-commits

commit:     9721644167277d26aa761cf9c11f8191c04b4968
Author:     Haelwenn (lanodan) Monnier <contact <AT> hacktivis <DOT> me>
AuthorDate: Mon Aug  7 05:59:04 2023 +0000
Commit:     Haelwenn Monnier <contact <AT> hacktivis <DOT> me>
CommitDate: Mon Aug  7 05:59:16 2023 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=97216441

mix.eclass: fix self-blocking of revisions

Signed-off-by: Haelwenn (lanodan) Monnier <contact <AT> hacktivis.me>

 eclass/mix.eclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eclass/mix.eclass b/eclass/mix.eclass
index 39c6bed500..b5071e94d8 100644
--- a/eclass/mix.eclass
+++ b/eclass/mix.eclass
@@ -34,7 +34,7 @@ DEPEND="${RDEPEND}"
 
 # Erlang/Elixir software fails to build when another version with API 
 # differences is present
-BDEPEND="!<${CATEGORY}/${P} !>${CATEGORY}/${P}"
+BDEPEND="!<${CATEGORY}/${P} !>${CATEGORY}/${PF}"
 
 # @ECLASS-VARIABLE: HEX_OFFLINE
 HEX_OFFLINE=1


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2023-08-30  5:30 Viorel Munteanu
  0 siblings, 0 replies; 180+ messages in thread
From: Viorel Munteanu @ 2023-08-30  5:30 UTC (permalink / raw
  To: gentoo-commits

commit:     a94ddaa8ddb476efbe5cb16e9b2c84adbc7ce8f1
Author:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
AuthorDate: Wed Aug 30 05:17:30 2023 +0000
Commit:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
CommitDate: Wed Aug 30 05:17:30 2023 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=a94ddaa8

R-packages.eclass: remove eutils

Signed-off-by: Viorel Munteanu <ceamac <AT> gentoo.org>

 eclass/R-packages.eclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eclass/R-packages.eclass b/eclass/R-packages.eclass
index f55cb9e417..a701c96178 100644
--- a/eclass/R-packages.eclass
+++ b/eclass/R-packages.eclass
@@ -20,7 +20,7 @@ esac
 
 if [ ! ${_R_PACKAGES_ECLASS} ]; then
 
-inherit edo eutils optfeature toolchain-funcs
+inherit edo optfeature toolchain-funcs
 
 # @ECLASS_VARIABLE: SUGGESTED_PACKAGES
 # @DEPRECATED: none


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2023-10-04 20:53 Anna Figueiredo Gomes
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Figueiredo Gomes @ 2023-10-04 20:53 UTC (permalink / raw
  To: gentoo-commits

commit:     ac877450a597dd50acc85f176c3d4b2930b5cb49
Author:     Anna (navi) Figueiredo Gomes <navi <AT> vlhl <DOT> dev>
AuthorDate: Wed Oct  4 20:48:17 2023 +0000
Commit:     Anna Figueiredo Gomes <anna-cli <AT> tutanota <DOT> com>
CommitDate: Wed Oct  4 20:52:48 2023 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=ac877450

dotnet-utils.eclass: superseeded by dotnet-pkg in ::gentoo

the only consumer in ::guru was xivlauncher, which got ported to
dotnet-pkg in 1.0.5

Signed-off-by: Anna (navi) Figueiredo Gomes <navi <AT> vlhl.dev>

 eclass/dotnet-utils.eclass | 194 ---------------------------------------------
 1 file changed, 194 deletions(-)

diff --git a/eclass/dotnet-utils.eclass b/eclass/dotnet-utils.eclass
deleted file mode 100644
index 5130467cde..0000000000
--- a/eclass/dotnet-utils.eclass
+++ /dev/null
@@ -1,194 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-# @ECLASS: dotnet-utils.eclass
-# @MAINTAINER:
-# navi@vlhl.dev
-# @AUTHOR:
-# Anna Figueiredo Gomes <navi@vlhl.dev>
-# @SUPPORTED_EAPIS: 7 8
-# @BLURB: common functions and variables for dotnet builds
-
-case ${EAPI} in
-	7|8) ;;
-	*) die "${ECLASS}: EAPI ${EAPI} unsupported." ;;
-esac
-
-if [[ ! ${_DOTNET_UTILS_ECLASS} ]]; then
-_DOTNET_UTILS_ECLASS=1
-
-inherit edo multiprocessing
-
-# @ECLASS_VARIABLE: DOTNET_SLOT
-# @REQUIRED
-# @PRE_INHERIT
-# @DESCRIPTION:
-# Allows to choose a slot for dotnet
-
-if [[ ! ${DOTNET_SLOT} ]]; then
-	die "${ECLASS}: DOTNET_SLOT not set"
-fi
-
-# Temporary, use the virtual once you can have multiple virtuals installed at once
-BDEPEND+=" || ( dev-dotnet/dotnet-sdk-bin:${DOTNET_SLOT} dev-dotnet/dotnet-sdk:${DOTNET_SLOT} )"
-
-# @ECLASS_VARIABLE: DOTNET_EXECUTABLE
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# Sets the right executable name.
-
-# @ECLASS_VARIABLE: DOTNET_CLI_TELEMETRY_OPTOUT
-# @OUTPUT_VARIABLE
-# @DESCRIPTION:
-# Disables telemetry on dotnet.
-export DOTNET_CLI_TELEMETRY_OPTOUT=1
-
-# @ECLASS_VARIABLE: MSBUILDDISABLENODEREUSE
-# @OUTPUT_VARIABLE
-# @DESCRIPTION:
-# Stops the dotnet node after the build is done.
-export MSBUILDDISABLENODEREUSE=1
-
-# @ECLASS_VARIABLE: DOTNET_NOLOGO
-# @OUTPUT_VARIABLE
-# @DESCRIPTION:
-# Disables the header logo when running dotnet commands.
-export DOTNET_NOLOGO=1
-
-# Needed otherwise the binaries break
-RESTRICT+=" strip"
-
-# @ECLASS_VARIABLE: NUGETS
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# String containing all nuget packages that need to be downloaded.  Used by
-# the 'nuget_uris' function.
-#
-# Example:
-# @CODE
-# NUGETS="
-# 	ImGui.NET-1.87.2
-# 	Config.Net-4.19.0
-# "
-#
-# inherit dotnet-utils
-#
-# ...
-#
-# SRC_URI="$(nuget_uris)"
-# @CODE
-
-# @FUNCTION: nuget_uris
-# @USAGE: <nuget...>
-# @DESCRIPTION:
-# Generates the URIs to put in SRC_URI to help fetch dependencies.
-# If no arguments provided, uses NUGETS variable.
-nuget_uris() {
-	local -r regex='^([a-zA-Z0-9_.-]+)-([0-9]+\.[0-9]+\.[0-9]+.*)$'
-	local nuget nugets
-
-	if (( $# != 0 )); then
-		nugets="${@}"
-	elif [[ ${NUGETS} ]]; then
-		nugets="${NUGETS}"
-	else
-		eerror "NUGETS variable is not defined and nothing passed as argument"
-		die "${FUNCNAME}: Can't generate SRC_URI from empty input"
-	fi
-
-	for nuget in ${nugets}; do
-		local name version url
-		[[ ${nuget} =~ ${regex} ]] || die "Could not parse name and version from nuget: $nuget"
-		name="${BASH_REMATCH[1]}"
-		version="${BASH_REMATCH[2]}"
-		url="https://api.nuget.org/v3-flatcontainer/${name}/${version}/${name}.${version}.nupkg"
-		echo "${url}"
-	done
-}
-
-# @FUNCTION: dotnet-utils_pkg_setup
-# @DESCRIPTION:
-# Sets up DOTNET_RUNTIME and DOTNET_EXECUTABLE variables for later use in edotnet.
-dotnet-utils_pkg_setup() {
-	if use amd64; then
-		DOTNET_RUNTIME="linux-x64"
-	elif use arm; then
-		DOTNET_RUNTIME="linux-arm"
-	elif use arm64; then
-		DOTNET_RUNTIME="linux-arm64"
-	else
-		die "Unsupported arch: ${ARCH}"
-	fi
-
-	local _dotnet
-	for _dotnet in dotnet{,-bin}-${DOTNET_SLOT}; do
-		if type ${_dotnet} 1> /dev/null 2>&1; then
-			DOTNET_EXECUTABLE=${_dotnet}
-			break
-		fi
-	done
-}
-
-# @FUNCTION: edotnet
-# @USAGE: <command> [args...]
-# @DESCRIPTION:
-# Call dotnet, passing the supplied arguments.
-edotnet() {
-	debug-print-function ${FUNCNAME} "${@}"
-
-	local dotnet_args=(
-		--runtime "${DOTNET_RUNTIME}"
-		-maxcpucount:$(makeopts_jobs)
-	)
-
-	edo "${DOTNET_EXECUTABLE}" "${@}" "${dotnet_args[@]}"
-}
-
-# @FUNCTION: dotnet-utils_src_unpack
-# @DESCRIPTION:
-# Unpacks the package
-dotnet-utils_src_unpack() {
-	debug-print-function ${FUNCNAME} "${@}"
-
-	local archive
-	for archive in ${A}; do
-		case "${archive}" in
-			*.nupkg)
-				;;
-			*)
-				unpack ${archive}
-				;;
-		esac
-	done
-}
-
-# @FUNCTION: dotnet-utils_src_prepare
-# @DESCRIPTION:
-# Restore the packages using 'dotnet restore'
-dotnet-utils_src_prepare() {
-	debug-print-function ${FUNCNAME} "${@}"
-
-	edotnet restore --source "${DISTDIR}" || die "'dotnet restore' failed"
-	default_src_prepare
-}
-
-# @FUNCTION: dotnet-utils_src_compile
-# @DESCRIPTION:
-# Build the package using dotnet publish
-dotnet-utils_src_compile() {
-	debug-print-function ${FUNCNAME} "${@}"
-
-	local publish_args=(
-		--no-restore
-		--configuration Release
-		-p:Version=${PV}
-		-p:DebugType=embedded
-		--self-contained
-	)
-
-	edotnet publish "${publish_args[@]}" || die "'dotnet publish' failed"
-}
-
-fi
-
-EXPORT_FUNCTIONS pkg_setup src_unpack src_prepare src_compile


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2023-10-05 13:10 David Roman
  0 siblings, 0 replies; 180+ messages in thread
From: David Roman @ 2023-10-05 13:10 UTC (permalink / raw
  To: gentoo-commits

commit:     b7fb055a13af12299ecab8ba34b451ee2a0bd8b7
Author:     David Roman <davidroman96 <AT> gmail <DOT> com>
AuthorDate: Thu Oct  5 13:09:58 2023 +0000
Commit:     David Roman <davidroman96 <AT> gmail <DOT> com>
CommitDate: Thu Oct  5 13:09:58 2023 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=b7fb055a

eclass: rename deprecated ECLASS-VARIABLE to ECLASS_VARIABLE

Signed-off-by: David Roman <davidroman96 <AT> gmail.com>

 eclass/mix.eclass         | 10 +++++-----
 eclass/octaveforge.eclass |  8 ++++----
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/eclass/mix.eclass b/eclass/mix.eclass
index b5071e94d8..a1f079f77f 100644
--- a/eclass/mix.eclass
+++ b/eclass/mix.eclass
@@ -36,13 +36,13 @@ DEPEND="${RDEPEND}"
 # differences is present
 BDEPEND="!<${CATEGORY}/${P} !>${CATEGORY}/${PF}"
 
-# @ECLASS-VARIABLE: HEX_OFFLINE
+# @ECLASS_VARIABLE: HEX_OFFLINE
 HEX_OFFLINE=1
 
-# @ECLASS-VARIABLE: MIX_ENV
+# @ECLASS_VARIABLE: MIX_ENV
 MIX_ENV="prod"
 
-# @ECLASS-VARIABLE: MIX_NO_DEPS
+# @ECLASS_VARIABLE: MIX_NO_DEPS
 MIX_NO_DEPS=1
 
 # @FUNCTION: emix
@@ -57,10 +57,10 @@ emix() {
 	MIX_ENV="${MIX_ENV}" mix "$@" || die -n "mix $@ failed"
 }
 
-# @ECLASS-VARIABLE: MIX_REWRITE
+# @ECLASS_VARIABLE: MIX_REWRITE
 MIX_REWRITE=""
 
-# @ECLASS-VARIABLE: MIX_BUILD_NAME
+# @ECLASS_VARIABLE: MIX_BUILD_NAME
 MIX_BUILD_NAME="${MIX_ENV}"
 
 # @FUNCTION: mix_src_prepare

diff --git a/eclass/octaveforge.eclass b/eclass/octaveforge.eclass
index 0e2c166046..0528d2d907 100644
--- a/eclass/octaveforge.eclass
+++ b/eclass/octaveforge.eclass
@@ -19,24 +19,24 @@ esac
 
 EXPORT_FUNCTIONS src_unpack src_prepare src_compile src_install src_test pkg_postinst pkg_prerm pkg_postrm
 
-# @ECLASS-VARIABLE: REPO_URI
+# @ECLASS_VARIABLE: REPO_URI
 # @DESCRIPTION:
 # URI to the sourceforge octave-forge repository
 REPO_URI="http://svn.code.sf.net/p/octave/code/trunk/octave-forge"
 
 # defining some paths
 
-# @ECLASS-VARIABLE: OCT_ROOT
+# @ECLASS_VARIABLE: OCT_ROOT
 # @DESCRIPTION:
 # full path to octave share
 OCT_ROOT="/usr/share/octave"
 
-# @ECLASS-VARIABLE: OCT_PKGDIR
+# @ECLASS_VARIABLE: OCT_PKGDIR
 # @DESCRIPTION:
 # path to octave pkgdir
 OCT_PKGDIR="${OCT_ROOT}/packages"
 
-# @ECLASS-VARIABLE: OCT_BIN
+# @ECLASS_VARIABLE: OCT_BIN
 # @DESCRIPTION:
 # octave binary name
 OCT_BIN="octave"


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2024-01-01 21:27 Anna Vyalkova
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Vyalkova @ 2024-01-01 21:27 UTC (permalink / raw
  To: gentoo-commits

commit:     8281fc17d53355b09cf12e87a58bd31b29538f85
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Mon Jan  1 20:38:57 2024 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Mon Jan  1 21:26:59 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=8281fc17

rebar3.eclass: new eclass for dev-util/rebar:3

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 eclass/rebar3.eclass | 295 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 295 insertions(+)

diff --git a/eclass/rebar3.eclass b/eclass/rebar3.eclass
new file mode 100644
index 0000000000..4104bdcf64
--- /dev/null
+++ b/eclass/rebar3.eclass
@@ -0,0 +1,295 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# @ECLASS: rebar3.eclass
+# @MAINTAINER:
+# Anna (cybertailor) Vyalkova <cyber+gentoo@sysrq.in>
+# @AUTHOR:
+# Amadeusz Żołnowski <aidecoe@gentoo.org>
+# @SUPPORTED_EAPIS: 8
+# @BLURB: Build Erlang/OTP projects using dev-util/rebar:3.
+# @DESCRIPTION:
+# An eclass providing functions to build Erlang/OTP projects using
+# dev-util/rebar:3.
+#
+# rebar is a tool which tries to resolve dependencies itself which is by
+# cloning remote git repositories. Dependent projects are usually expected to
+# be in sub-directory 'deps' rather than looking at system Erlang lib
+# directory. Projects relying on rebar usually don't have 'install' make
+# targets. The eclass workarounds some of these problems. It handles
+# installation in a generic way for Erlang/OTP structured projects.
+
+case ${EAPI} in
+	8) ;;
+	*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
+esac
+
+if [[ -z ${_REBAR3_ECLASS} ]]; then
+
+inherit edo
+
+RDEPEND="dev-lang/erlang:="
+DEPEND="${RDEPEND}"
+BDEPEND="
+	dev-util/rebar:3
+	>=sys-apps/gawk-4.1
+"
+
+# @ECLASS_VARIABLE: REBAR_PROFILE
+# @DESCRIPTION:
+# Rebar profile to use.
+: "${REBAR_PROFILE:=default}"
+
+# @ECLASS_VARIABLE: REBAR_APP_SRC
+# @DESCRIPTION:
+# Relative path to .app.src description file.
+: "${REBAR_APP_SRC:=src/${PN}.app.src}"
+
+# @FUNCTION: get_erl_libs
+# @RETURN: the path to Erlang lib directory
+# @DESCRIPTION:
+# Get the full path without EPREFIX to Erlang lib directory.
+get_erl_libs() {
+	echo "/usr/$(get_libdir)/erlang/lib"
+}
+
+# @FUNCTION: _rebar_find_dep
+# @INTERNAL
+# @USAGE: <project_name>
+# @RETURN: 0 success, 1 dependency not found, 2 multiple versions found
+# @DESCRIPTION:
+# Find a Erlang package/project by name in Erlang lib directory. Project
+# directory is usually suffixed with version. It is matched to '<project_name>'
+# or '<project_name>-*'.
+_rebar_find_dep() {
+	local pn="${1}"
+	local p
+	local result
+
+	pushd "${EPREFIX}/$(get_erl_libs)" >/dev/null || return 1
+	for p in ${pn} ${pn}-*; do
+		if [[ -d ${p} ]]; then
+			# Ensure there's at most one matching.
+			[[ ${result} ]] && return 2
+			result="${p}"
+		fi
+	done
+	popd >/dev/null || die
+
+	[[ ${result} ]] || return 1
+	echo "${result}"
+}
+
+# @FUNCTION: rebar_disable_coverage
+# @USAGE: [<rebar_config>]
+# @DESCRIPTION:
+# Disable coverage in rebar.config. This is a workaround for failing coverage.
+# Coverage is not relevant in this context, so there's no harm to disable it,
+# although the issue should be fixed.
+rebar_disable_coverage() {
+	debug-print-function ${FUNCNAME} "${@}"
+
+	local rebar_config="${1:-rebar.config}"
+
+	sed -e 's/{cover_enabled, true}/{cover_enabled, false}/' \
+		-i "${rebar_config}" \
+		|| die "failed to disable coverage in ${rebar_config}"
+}
+
+# @FUNCTION: erebar3
+# @USAGE: <targets>
+# @DESCRIPTION:
+# Run rebar with verbose flag. Die on failure.
+erebar3() {
+	debug-print-function ${FUNCNAME} "${@}"
+
+	(( $# > 0 )) || die "erebar: at least one target is required"
+
+	case ${1} in
+		eunit|ct)
+			local -x ERL_LIBS="." ;;
+		*)
+			local -x ERL_LIBS="${EPREFIX}/$(get_erl_libs)" ;;
+	esac
+
+	edo rebar3 "$@"
+}
+
+# @FUNCTION: rebar_fix_include_path
+# @USAGE: <project_name> [<rebar_config>]
+# @DESCRIPTION:
+# Fix path in rebar.config to 'include' directory of dependent project/package,
+# so it points to installation in system Erlang lib rather than relative 'deps'
+# directory.
+#
+# <rebar_config> is optional. Default is 'rebar.config'.
+#
+# The function dies on failure.
+rebar_fix_include_path() {
+	debug-print-function ${FUNCNAME} "${@}"
+
+	local pn="${1}"
+	local rebar_config="${2:-rebar.config}"
+	local erl_libs="${EPREFIX}/$(get_erl_libs)"
+	local p
+
+	p="$(_rebar_find_dep "${pn}")" \
+		|| die "failed to unambiguously resolve dependency of '${pn}'"
+
+	gawk -i inplace \
+		-v erl_libs="${erl_libs}" -v pn="${pn}" -v p="${p}" '
+/^{[[:space:]]*erl_opts[[:space:]]*,/, /}[[:space:]]*\.$/ {
+	pattern = "\"(./)?deps/" pn "/include\"";
+	if (match($0, "{i,[[:space:]]*" pattern "[[:space:]]*}")) {
+		sub(pattern, "\"" erl_libs "/" p "/include\"");
+	}
+	print $0;
+	next;
+}
+1
+' "${rebar_config}" || die "failed to fix include paths in ${rebar_config} for '${pn}'"
+}
+
+# @FUNCTION: rebar_remove_deps
+# @USAGE: [<rebar_config>]
+# @DESCRIPTION:
+# Remove dependencies list from rebar.config and deceive build rules that any
+# dependencies are already fetched and built. Otherwise rebar tries to fetch
+# dependencies and compile them.
+#
+# <rebar_config> is optional. Default is 'rebar.config'.
+#
+# The function dies on failure.
+rebar_remove_deps() {
+	debug-print-function ${FUNCNAME} "${@}"
+
+	local rebar_config="${1:-rebar.config}"
+
+	mkdir -p "${S}/deps" && :>"${S}/deps/.got" && :>"${S}/deps/.built" || die
+	gawk -i inplace '
+/^{[[:space:]]*deps[[:space:]]*,/, /}[[:space:]]*\.$/ {
+	if ($0 ~ /}[[:space:]]*\.$/) {
+		print "{deps, []}.";
+	}
+	next;
+}
+1
+' "${rebar_config}" || die "failed to remove deps from ${rebar_config}"
+}
+
+# @FUNCTION: rebar_set_vsn
+# @USAGE: [<version>]
+# @DESCRIPTION:
+# Set version in project description file if it's not set.
+#
+# <version> is optional. Default is PV stripped from version suffix.
+#
+# The function dies on failure.
+rebar_set_vsn() {
+	debug-print-function ${FUNCNAME} "${@}"
+
+	local version="${1:-${PV%_*}}"
+
+	sed -e "s/vsn, git/vsn, \"${version}\"/" \
+		-i "${S}/${REBAR_APP_SRC}" \
+		|| die "failed to set version in src/${PN}.app.src"
+}
+
+# @FUNCTION: rebar3_src_prepare
+# @DESCRIPTION:
+# Prevent rebar from fetching and compiling dependencies. Set version in
+# project description file if it's not set.
+#
+# Existence of rebar.config is optional, but file description file must exist
+# at 'src/${PN}.app.src'.
+rebar3_src_prepare() {
+	debug-print-function ${FUNCNAME} "${@}"
+
+	default_src_prepare
+	rebar_set_vsn
+	rm -f rebar.lock
+	if [[ -f rebar.config ]]; then
+		rebar_disable_coverage
+		rebar_remove_deps
+	fi
+}
+
+# @FUNCTION: rebar3_src_configure
+# @DESCRIPTION:
+# Configure with ERL_LIBS set.
+rebar3_src_configure() {
+	debug-print-function ${FUNCNAME} "${@}"
+
+	local -x ERL_LIBS="${EPREFIX}/$(get_erl_libs)"
+	default_src_configure
+}
+
+# @FUNCTION: rebar3_src_compile
+# @DESCRIPTION:
+# Compile project with rebar.
+rebar3_src_compile() {
+	debug-print-function ${FUNCNAME} "${@}"
+
+	erebar3 as "${REBAR_PROFILE}" release --all
+}
+
+# @FUNCTION: rebar3_src_test
+# @DESCRIPTION:
+# Run unit tests.
+rebar3_src_test() {
+	debug-print-function ${FUNCNAME} "${@}"
+
+	erebar3 eunit -v
+}
+
+# @FUNCTION: rebar3_install_lib
+# @USAGE: <dir>
+# @DESCRIPTION:
+# Install BEAM files, include headers and native libraries.
+#
+# Function expects that project conforms to Erlang/OTP structure.
+rebar3_install_lib() {
+	debug-print-function ${FUNCNAME} "${@}"
+
+	local dest="$(get_erl_libs)/${P}"
+	insinto "${dest}"
+
+	pushd "${1?}" >/dev/null || die
+	for dir in ebin include priv; do
+		if [[ -d ${dir} && ! -L ${dir} ]]; then
+			cp -pR ${dir} "${ED%/}/${dest}/" || die "failed to install ${dir}/"
+		fi
+	done
+	popd >/dev/null || die
+}
+
+# @FUNCTION: rebar3_src_install
+# @DESCRIPTION:
+# Install built release or library.
+#
+# Function expects that project conforms to Erlang/OTP structure.
+rebar3_src_install() {
+	debug-print-function ${FUNCNAME} "${@}"
+
+	pushd "_build/${REBAR_PROFILE}" >/dev/null || die
+	if [[ -d rel/${PN} ]]; then
+		if ! declare -f rebar3_install_release >/dev/null; then
+			die "${FUNCNAME}: a custom function named 'rebar3_install_release' is required to install a release"
+		fi
+		pushd rel/${PN} >/dev/null || die
+		rebar3_install_release || die
+		popd >/dev/null || die
+	elif [[ -d lib/${PN} ]]; then
+		rebar3_install_lib lib/${PN}
+	else
+		die "No releases or libraries to install"
+	fi
+	popd >/dev/null || die
+
+	einstalldocs
+}
+
+_REBAR3_ECLASS=1
+fi
+
+EXPORT_FUNCTIONS src_prepare src_compile src_test src_install


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2024-01-20  7:12 Anna Vyalkova
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Vyalkova @ 2024-01-20  7:12 UTC (permalink / raw
  To: gentoo-commits

commit:     84ddbd2c347574794ce2b4d2311eba982185e767
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Sat Jan 20 07:11:51 2024 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Sat Jan 20 07:11:51 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=84ddbd2c

databases.eclass: typo

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 eclass/databases.eclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eclass/databases.eclass b/eclass/databases.eclass
index 079325a90d..d906f2a547 100644
--- a/eclass/databases.eclass
+++ b/eclass/databases.eclass
@@ -20,7 +20,7 @@
 #
 # - MongoDB (via "emongod" helper)
 #
-# - MySQL/MariaDB/ (via "emysql" helper)
+# - MySQL / MariaDB (via "emysql" helper)
 #
 # - PostgreSQL (via "epostgres" helper)
 #


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2024-01-21 22:50 Anna Vyalkova
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Vyalkova @ 2024-01-21 22:50 UTC (permalink / raw
  To: gentoo-commits

commit:     88fbf39491ea519354173e13f1e73fc8928ba237
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Sun Jan 21 22:48:25 2024 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Sun Jan 21 22:50:05 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=88fbf394

boinc.eclass: remove

It was... bad

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 eclass/boinc.eclass | 220 ----------------------------------------------------
 1 file changed, 220 deletions(-)

diff --git a/eclass/boinc.eclass b/eclass/boinc.eclass
deleted file mode 100644
index 56d972b66b..0000000000
--- a/eclass/boinc.eclass
+++ /dev/null
@@ -1,220 +0,0 @@
-# Copyright 2021-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-# @ECLASS: boinc.eclass
-# @MAINTAINER:
-# Anna Vyalkova <cyber+gentoo@sysrq.in>
-# @SUPPORTED_EAPIS: 8
-# @BLURB: An eclass to build BOINC applications and libraries.
-# @DESCRIPTION:
-# This eclass provides helper functions to build BOINC applications and libraries.
-
-case ${EAPI} in
-	8) ;;
-	*) die "${ECLASS}: EAPI ${EAPI} unsupported."
-esac
-
-# @ECLASS_VARIABLE: BOINC_SUBMODULE
-# @PRE_INHERIT
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# Set this variable to a subdirectory relative to BOINC source repository,
-# if software cannot be built outside it (for example, if some required
-# headers are missing in sci-misc/boinc).
-#
-# If unset, no functions will be exported.
-
-# @ECLASS_VARIABLE: BOINC_S
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# If defined this variable determines the source directory name after
-# unpacking. This defaults to package name and version. Note that this
-# variable supports a wildcard mechanism to help with github tarballs
-# that contain the commit hash as part of the directory name.
-
-if [[ ! ${_BOINC_ECLASS} ]]; then
-
-inherit autotools edo toolchain-funcs
-
-fi
-
-if [[ ${BOINC_SUBMODULE} ]]; then
-	EXPORT_FUNCTIONS src_unpack src_prepare src_configure
-fi
-
-if [[ ! ${_BOINC_ECLASS} ]]; then
-
-# @FUNCTION: get_boinc_src
-# @USAGE: <SRC_URI|S> <release> [client|server|vboxwrapper|wrapper]
-# @RETURN: SRC_URI snippet or temporary build directory for given BOINC release
-get_boinc_src() {
-	debug-print-function ${FUNCNAME} "${@}"]
-
-	local query_var=${1}
-	local RELEASE_PATCH=${2}
-	local RELEASE_MINOR=$(ver_cut 1-2 ${RELEASE_PATCH})
-	local RELEASE_TYPE=${3:-client}
-
-	local TAG
-	case ${RELEASE_TYPE} in
-		client|server)
-			TAG="${RELEASE_TYPE}_release/${RELEASE_MINOR}/${RELEASE_PATCH}" ;;
-		vboxwrapper|wrapper)
-			TAG="${RELEASE_TYPE}/${RELEASE_PATCH}" ;;
-		*)
-			die "${FUNCNAME}: unknown release type '${RELEASE_TYPE}'"
-	esac
-
-	local _SRC_URI="https://github.com/BOINC/boinc/archive/refs/tags/${TAG}.tar.gz"
-	_SRC_URI+=" -> boinc-${RELEASE_TYPE}-${RELEASE_PATCH}.tar.gz"
-
-	local _S="${WORKDIR}/boinc-${TAG////-}"
-
-	case ${query_var} in
-		SRC_URI) echo "${_SRC_URI}" ;;
-		S) echo "${_S}" ;;
-		*) die "${FUNCNAME}: unknown variable to query (${query_var})"
-	esac
-
-}
-
-# @ECLASS_VARIABLE: BOINC_BUILD_DIR
-# @OUTPUT_VARIABLE
-# @DESCRIPTION:
-# Temporary build directory, where BOINC sources are located.
-
-# @FUNCTION: boinc_require_source
-# @USAGE: [boinc version] [client|server|vboxwrapper|wrapper]
-# @DESCRIPTION:
-# Set up SRC_URI and S for building application within BOINC source tree.
-#
-# This function must be called in global scope, after BOINC_SUBMODULE
-# and SRC_URI have been declared. Take care not to overwrite the variables
-# set by it.
-#
-# If no BOINC version is given, this function assumes it equal to client
-# release $PV.
-boinc_require_source() {
-	debug-print-function ${FUNCNAME} "${@}"]
-
-	local boinc_version=${1:-${PV}}
-	SRC_URI+=" $(get_boinc_src SRC_URI ${boinc_version} ${2})"
-
-	readonly BOINC_BUILD_DIR="$(get_boinc_src S ${boinc_version} ${2})"
-	S="${BOINC_BUILD_DIR}/${BOINC_SUBMODULE}"
-}
-
-# @FUNCTION: boinc_enable_autotools
-# @USAGE: [econf args...]
-# @DESCRIPTION:
-# Configure BOINC source tree using autotools.
-#
-# If no arguments are given, econf will be called with
-# '--enable-static --enable-pkg-devel --disable-fcgi' flags.
-#
-# This function must be called in global scope.
-boinc_enable_autotools() {
-	debug-print-function ${FUNCNAME} "${@}"]
-
-	_BOINC_RUN_AUTOTOOLS=1
-	_BOINC_ECONF_ARGS=${@:---enable-static --enable-pkg-devel --disable-fcgi}
-}
-
-# @FUNCTION: boinc_override_config
-# @USAGE: <config.h>
-# @DESCRIPTION:
-# Some applications do not need autotools to build but
-# use a few HAVE_* defines.
-
-# If you want to save ~40 seconds and really know what
-# to do, pass prepared config.h to this function.
-#
-# This function must be called in global scope.
-boinc_override_config() {
-	debug-print-function ${FUNCNAME} "${@}"]
-
-	_BOINC_CONFIG_OVERRIDE="${1}"
-}
-
-# @FUNCTION: boinc_builddir_check
-# @USAGE:
-# @DESCRIPTION:
-# Make sure BOINC_BUILD_DIR has a value.
-boinc_builddir_check() {
-	debug-print-function ${FUNCNAME} "${@}"]
-
-	if [[ ! ${BOINC_BUILD_DIR} ]]; then
-		eerror "BOINC_BUILD_DIR is not set."
-		die "Did you forget to call boinc_require_source?"
-	fi
-
-	mkdir -p ${BOINC_BUILD_DIR} || die
-}
-
-boinc_src_unpack() {
-	debug-print-function ${FUNCNAME} "${@}"]
-
-	default_src_unpack
-	boinc_builddir_check
-
-	[[ -d ${S} ]] && \
-		return
-
-	# Special case, for the always-lovely GitHub fetches. With this,
-	# we allow the star glob to just expand to whatever directory it's
-	# called.
-	if [[ "${BOINC_S:=${P}}" = *"*"* ]]; then
-		pushd "${WORKDIR}" >/dev/null || die
-		local shopt_save=$(shopt -p nullglob)
-		shopt -s nullglob
-
-		# use an array to trigger filename expansion
-		BOINC_S=( ${BOINC_S} )
-		if [[ ${#BOINC_S[@]} -gt 1 ]]; then
-			die "BOINC_S did expand to multiple paths: ${BOINC_S[*]}"
-		fi
-
-		${shopt_save}
-		popd >/dev/null || die
-	fi
-
-	mkdir -p "$(dirname "${S}")" || die
-	mv "${WORKDIR}/${BOINC_S}" "${S}" || die
-}
-
-boinc_src_prepare() {
-	debug-print-function ${FUNCNAME} "${@}"]
-
-	boinc_builddir_check
-	default_src_prepare
-
-	if [[ ${_BOINC_RUN_AUTOTOOLS} ]]; then
-		pushd "${BOINC_BUILD_DIR}" >/dev/null || die
-		eautoreconf
-		popd >/dev/null || die
-	fi
-}
-
-boinc_src_configure() {
-	debug-print-function ${FUNCNAME} "${@}"]
-
-	boinc_builddir_check
-	pushd "${BOINC_BUILD_DIR}" >/dev/null || die
-
-	edo bash ./generate_svn_version.sh
-
-	if [[ ${_BOINC_RUN_AUTOTOOLS} ]]; then
-		econf ${_BOINC_ECONF_ARGS}
-	else
-		tc-export AR CC CPP CXX LD OBJDUMP RANLIB
-	fi
-
-	if [[ ${_BOINC_CONFIG_OVERRIDE} ]]; then
-		cp "${_BOINC_CONFIG_OVERRIDE}" config.h || die
-	fi
-
-	popd >/dev/null || die
-}
-
-_BOINC_ECLASS=1
-fi


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2024-01-22 10:54 Anna Vyalkova
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Vyalkova @ 2024-01-22 10:54 UTC (permalink / raw
  To: gentoo-commits

commit:     5e8f7b0393d379c8e0945859fc9d9e4e6302ceb7
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Mon Jan 22 09:30:51 2024 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Mon Jan 22 09:30:51 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=5e8f7b03

nimble.eclass: mark some variables readonly

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 eclass/nimble.eclass | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/eclass/nimble.eclass b/eclass/nimble.eclass
index a393ee2632..2fa48b48f0 100644
--- a/eclass/nimble.eclass
+++ b/eclass/nimble.eclass
@@ -12,6 +12,7 @@
 # @EXAMPLE:
 # Typical ebuild for a Nim application:
 #
+# @CODE@
 # EAPI=8
 #
 # inherit nimble
@@ -24,17 +25,18 @@
 # 	nimble_src_compile
 # 	nimble_build scss
 # }
-#
-# ...
+# @CODE@
 #
 #
 # Typical ebuild for a Nim library:
 #
+# @CODE@
 # EAPI=8
 #
 # inherit nimble
 #
 # ...
+#
 # SLOT=${PV}
 #
 # RDEPEND="
@@ -43,6 +45,7 @@
 # "
 #
 # set_package_url "https://github.com/example/example"
+# @CODE@
 
 
 case ${EAPI} in
@@ -82,7 +85,7 @@ set_package_url() {
 	(( $# == 1 )) || \
 		die "${FUNCNAME} takes exactly one argument"
 
-	_PACKAGE_URL="${1}"
+	readonly _PACKAGE_URL="${1}"
 }
 
 # @FUNCTION: get_package_url
@@ -124,10 +127,7 @@ nimble_comment_requires() {
 nimble_src_configure() {
 	debug-print-function ${FUNCNAME} "${@}"
 
-	[[ -n "${NINJA_DEPEND}" ]] || \
-		ewarn "Unknown value '${NINJA}' for \${NINJA}"
-
-	BUILD_DIR="${BUILD_DIR:-${WORKDIR}/${P}-build}"
+	readonly BUILD_DIR="${BUILD_DIR:-${WORKDIR}/${P}-build}"
 
 	[[ -z ${mynimargs} ]] && local -a mynimargs=()
 	local mynimargstype=$(declare -p mynimargs 2>&-)


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2024-01-22 17:52 Anna Vyalkova
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Vyalkova @ 2024-01-22 17:52 UTC (permalink / raw
  To: gentoo-commits

commit:     1271f372c1b9485b899a364e11e41514d15c9302
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Sun Jan 21 20:27:36 2024 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Mon Jan 22 17:33:29 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=1271f372

databases.eclass: replace "--get-depend" with variables

It slows down metadata regeneration, so associative arrays are used
instead.

Suggested-by: sam_
Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 eclass/databases.eclass | 111 +++++++++++++++++++++++++++---------------------
 1 file changed, 63 insertions(+), 48 deletions(-)

diff --git a/eclass/databases.eclass b/eclass/databases.eclass
index d906f2a547..9c2457e93e 100644
--- a/eclass/databases.eclass
+++ b/eclass/databases.eclass
@@ -1,4 +1,4 @@
-# Copyright 2022 Gentoo Authors
+# Copyright 2022-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 # @ECLASS: databases.eclass
@@ -37,10 +37,6 @@
 #
 # 	Returns the directory where the server stores database files.
 #
-# --get-depend [use1,use2,...]
-#
-# 	Returns a dependency string (to be included in BDEPEND).
-#
 # --get-logfile
 #
 # 	Returns the path to the server's log file.
@@ -76,18 +72,21 @@
 #
 # ...
 #
+# DATABASES_REQ_USE=(
+# 	[postgres]="xml"
+# )
 # inherit databases distutils-r1
 #
 # ...
 #
-# BDEPEND="$(eredis --get-depend)"
+# BDEPEND="test? ( ${DATABASES_DEPEND[postgres]} )"
 #
 # distutils_enable_tests pytest
 #
 # src_test() {
-# 	eredis --start 16739
+# 	epostgres --start 65432
 # 	distutils-r1_src_test
-# 	eredis --stop
+# 	epostgres --stop
 # }
 # @CODE
 
@@ -99,47 +98,66 @@ esac
 if [[ ! ${_DATABASES_ECLASS} ]]; then
 _DATABASES_ECLASS=1
 
-# ==============================================================================
-# GENERIC FUNCTIONS
-# ==============================================================================
+# @ECLASS_VARIABLE: DATABASES_REQ_USE
+# @PRE_INHERIT
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# Bash associative array of USE flags required to be enabled on database
+# servers, formed as a USE-dependency string.
+#
+# Keys are helper function names without the "e" prefix.
 
-# @FUNCTION: _databases_gen_depend
-# @USAGE: <funcname> <required use>
-# @INTERNAL
+# @ECLASS_VARIABLE: DATABASES_DEPEND
+# @OUTPUT_VARIABLE
 # @DESCRIPTION:
-# Get a dependency string for the given helper function.
-_databases_gen_depend() {
-	local srvname=${1:1}
-	local req_use=${2}
-
-	local pkg_dep
-	case ${srvname} in
-		memcached)
-			pkg_dep="net-misc/memcached"
-			;;
-		mongod)
-			pkg_dep="dev-db/mongodb"
-			;;
-		mysql)
-			pkg_dep="virtual/mysql"
-			req_use="server,${req_use}"
-			;;
-		postgres)
-			pkg_dep="dev-db/postgresql"
-			req_use="server,${req_use}"
-			;;
-		redis)
-			pkg_dep="dev-db/redis"
-			;;
-		*)
-			die "${ECLASS}: unknown database: ${srvname}"
-	esac
+# This is an eclass-generated bash associative array of dependency strings for
+# database servers.
+#
+# Keys are helper function names without the "e" prefix.
+declare -Ag DATABASES_DEPEND=()
 
-	req_use=${req_use%,}  # strip trailing comma
-	printf "%s" "${pkg_dep}"
-	[[ ${req_use} ]] && \
-		printf "[%s]" "${req_use}"
+# @FUNCTION: _databases_set_globals
+# @INTERNAL
+_databases_set_globals() {
+		local -A db_pkgs=(
+				[memcached]="net-misc/memcached"
+				[mongod]="dev-db/mongodb"
+				[mysql]="virtual/mysql"
+				[postgres]="dev-db/postgresql"
+				[redis]="dev-db/redis"
+		)
+
+		local -A db_useflags=(
+				[mysql]="server"
+				[postgres]="server"
+		)
+		
+		if declare -p DATABASES_REQ_USE &>/dev/null; then
+				[[ $(declare -p DATABASES_REQ_USE) == "declare -A"* ]] || \
+						die "DATABASES_REQ_USE must be declared as an associative array"
+		fi
+
+		local name dep usestr
+		for name in "${!db_pkgs[@]}"; do
+				dep=${db_pkgs[${name}]?}
+				usestr=${db_useflags[${name}]}
+				usestr+=",${DATABASES_REQ_USE[${name}]}"
+				# strip leading/trailing commas
+				usestr=${usestr#,}
+				usestr=${usestr%,}
+
+				[[ ${usestr} ]] && usestr="[${usestr}]"
+				DATABASES_DEPEND[${name?}]="${dep?}${usestr}"
+		done
+
+		readonly DATABASES_DEPEND
 }
+_databases_set_globals
+unset -f _databases_set_globals
+
+# ==============================================================================
+# GENERIC FUNCTIONS
+# ==============================================================================
 
 # @FUNCTION: _databases_die
 # @USAGE: <funcname> [msg]
@@ -198,9 +216,6 @@ _databases_dispatch() {
 		--die)
 			_databases_die ${funcname} "${@}"
 			;;
-		--get-depend)
-			_databases_gen_depend ${funcname} "${@}"
-			;;
 		--get-dbpath)
 			echo "${T}"/${funcname}/db/
 			;;


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2024-02-04 19:26 Anna Vyalkova
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Vyalkova @ 2024-02-04 19:26 UTC (permalink / raw
  To: gentoo-commits

commit:     6b0464e027de7a13d7a0b39a2974f49fb32ff576
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Sat Feb  3 06:31:43 2024 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Sun Feb  4 19:23:21 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=6b0464e0

daemons.eclass: new eclass

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 eclass/daemons.eclass | 213 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 213 insertions(+)

diff --git a/eclass/daemons.eclass b/eclass/daemons.eclass
new file mode 100644
index 0000000000..24798158d3
--- /dev/null
+++ b/eclass/daemons.eclass
@@ -0,0 +1,213 @@
+# Copyright 2022-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# @ECLASS: daemons.eclass
+# @MAINTAINER:
+# Anna <cyber+gentoo@sysrq.in>
+# @AUTHOR:
+# Anna <cyber+gentoo@sysrq.in>
+# @SUPPORTED_EAPIS: 8
+# @BLURB: eclass to test packages against running daemons
+# @DESCRIPTION:
+# A utility eclass providing functions for starting and stopping daemons with
+# Pifpaf.
+#
+# This eclass does not set any metadata variables nor export any phase, so it
+# can be inherited safely.
+#
+# @SUBSECTION Supported daemons
+#
+# - ceph
+#
+# - consul
+#
+# - httpbin
+#
+# - kafka
+#
+# - memcached
+#
+# - mysql
+#
+# - postgresql
+#
+# - redis
+#
+# - vault
+#
+# @EXAMPLE:
+#
+# @CODE
+# EAPI=8
+#
+# ...
+#
+# DAEMONS_REQ_USE=(
+# 	[postgresql]="xml"
+# )
+# inherit daemons distutils-r1
+#
+# ...
+#
+# distutils_enable_tests pytest
+#
+# daemons_enable postgresql test
+#
+# src_test() {
+# 	daemons_start postgresql
+# 	distutils-r1_src_test
+# 	daemons_stop postgresql
+# }
+# @CODE
+
+case ${EAPI} in
+	8) ;;
+	*) die "${ECLASS}: EAPI ${EAPI} unsupported."
+esac
+
+if [[ ! ${_DAEMONS_ECLASS} ]]; then
+_DAEMONS_ECLASS=1
+
+# @ECLASS_VARIABLE: DAEMONS_REQ_USE
+# @PRE_INHERIT
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# Bash associative array of USE flags required to be enabled on daemons,
+# formed as a USE-dependency string.
+
+# @ECLASS_VARIABLE: DAEMONS_DEPEND
+# @OUTPUT_VARIABLE
+# @DESCRIPTION:
+# This is an eclass-generated bash associative array of dependency strings for
+# daemons.
+declare -Ag DAEMONS_DEPEND=()
+
+# @FUNCTION: _daemons_set_globals
+# @INTERNAL
+# @DESCRIPTION:
+# Set the DAEMONS_DEPEND variable.
+_daemons_set_globals() {
+	local -A pkgs=(
+		[ceph]="sys-cluster/ceph"
+		[consul]="app-admin/consul"
+		[httpbin]="dev-python/httpbin"
+		[kafka]="net-misc/kafka-bin"
+		[memcached]="net-misc/memcached"
+		[mysql]="virtual/mysql"
+		[postgresql]="dev-db/postgresql"
+		[redis]="dev-db/redis"
+		[vault]="app-admin/vault"
+	)
+
+	local -A useflags=(
+		[mysql]="server"
+		[postgresql]="server"
+	)
+
+	if declare -p DAEMONS_REQ_USE &>/dev/null; then
+		[[ $(declare -p DAEMONS_REQ_USE) == "declare -A"* ]] || \
+			die "DAEMONS_REQ_USE must be declared as an associative array"
+	fi
+
+	local name dep usestr
+	for name in "${!pkgs[@]}"; do
+		dep=${pkgs[${name:?}]:?}
+		usestr=${useflags[${name:?}]}
+		usestr+=",${DAEMONS_REQ_USE[${name:?}]}"
+		# strip leading/trailing commas
+		usestr=${usestr#,}
+		usestr=${usestr%,}
+
+		[[ ${usestr?} ]] && usestr="[${usestr?}]"
+		DAEMONS_DEPEND[${name:?}]="dev-util/pifpaf ${dep:?}${usestr?}"
+	done
+
+	readonly DAEMONS_DEPEND
+}
+_daemons_set_globals
+unset -f _daemons_set_globals
+
+# @FUNCTION: daemons_enable
+# @USAGE: <daemon> <use>
+# @DESCRIPTION:
+# Add the daemon package to build-time dependencies under the given USE flag
+# (IUSE will be set automatically).
+daemons_enable() {
+	debug-print-function ${FUNCNAME} "${@}"
+
+	local daemon=${1:?}
+	local useflag=${2:?}
+
+	IUSE+=" ${useflag:?}"
+	BDEPEND+=" ${useflag:?}? ( ${DAEMONS_DEPEND[${daemon:?}]:?} )"
+	if [[ ${useflag:?} == "test" ]]; then
+		RESTRICT+=" !test? ( test )"
+	fi
+}
+
+# @FUNCTION: daemons_start
+# @USAGE: <daemon> [args...]
+# @DESCRIPTION:
+# Start the daemon.  All arguments are passes to Pifpaf.
+#
+# Pifpaf will set some environment variables for you, they will be prefixed by
+# uppercase daemon name.  See upstream documentation for details.
+daemons_start() {
+	debug-print-function ${FUNCNAME} "${@}"
+
+	local daemon=${1:?}
+	shift
+
+	local logfile="${T?}/daemon-${daemon:?}.log"
+	local tempfile="${T?}/daemon-${daemon:?}.sh"
+	local myargs=(
+		--env-prefix "${daemon^^}"
+		--log-file "${logfile:?}"
+		--verbose
+	)
+
+	ebegin "Starting ${daemon:?}"
+	pifpaf "${myargs[@]}" run "${daemon:?}" "${@}" > "${tempfile:?}" && \
+		source "${tempfile:?}" && \
+		rm -f "${tempfile:?}"
+	eend $? || die "Starting ${daemon:?} failed"
+}
+
+# @FUNCTION: daemons_stop
+# @USAGE: <daemon>
+# @DESCRIPTION:
+# Stop a running daemon.
+daemons_stop() {
+	debug-print-function ${FUNCNAME} "${@}"
+
+	local daemon=${1:?}
+	local stop_fn="${daemon:?}_stop"
+	declare -f "${stop_fn:?}" >/dev/null || die "${daemon:?} is not running"
+
+	ebegin "Stopping ${daemon:?}"
+	"${stop_fn:?}"
+	eend $? || die "Stopping ${daemon:?} failed"
+}
+
+# @FUNCTION: daemons_death_notice
+# @INTERNAL
+# @DESCRIPTION:
+# Creates archive with daemon logs and prints a log message with its location.
+daemons_death_notice() {
+	shopt -s nullglob
+	local logfiles=( "${T}"/daemon-*.log )
+	local logarchive="${T}/daemon-logs.tar.xz"
+	shopt -u nullglob
+
+	if [[ "${logfiles[*]}" ]]; then
+		pushd "${T}" >/dev/null
+		tar -acf "${logarchive}" "${logfiles[@]#${T}/}"
+		popd >/dev/null
+		eerror
+		eerror "Please include ${logarchive} in your bug report."
+		eerror
+	fi
+}
+has daemons_death_notice ${EBUILD_DEATH_HOOKS} || EBUILD_DEATH_HOOKS+=" daemons_death_notice"
+
+fi


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2024-02-04 19:26 Anna Vyalkova
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Vyalkova @ 2024-02-04 19:26 UTC (permalink / raw
  To: gentoo-commits

commit:     cfdd31feb59d000371524571a6ff1e435e58afbc
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Sat Feb  3 06:30:53 2024 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Sun Feb  4 19:23:20 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=cfdd31fe

databases.eclass: fix "--add-deps" helper

It's called in ebuild scope so "+=" should be used.

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

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

diff --git a/eclass/databases.eclass b/eclass/databases.eclass
index 1c640d3ee9..721ec0e59d 100644
--- a/eclass/databases.eclass
+++ b/eclass/databases.eclass
@@ -192,12 +192,11 @@ _databases_add_deps() {
 	local funcname=${1?}
 	local useflag=${2?}
 
-	BDEPEND="${useflag}? ( ${DATABASES_DEPEND[${funcname:1}]} )"
-	IUSE="${useflag}"
-	[[ ${useflag} == "test" ]] &&
-		RESTRICT="!test? ( test )"
-
-	return 0
+	IUSE+=" ${useflag}"
+	BDEPEND+=" ${useflag}? ( ${DATABASES_DEPEND[${funcname:1}]} )"
+	if [[ ${useflag} == "test" ]]; then
+		RESTRICT+= "!test? ( test )"
+	fi
 }
 
 # @FUNCTION: _databases_stop_service


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2024-02-04 19:32 Anna Vyalkova
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Vyalkova @ 2024-02-04 19:32 UTC (permalink / raw
  To: gentoo-commits

commit:     a27cd8860814a297f487e3b01c36e6e2d3292f04
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Sat Feb  3 12:00:18 2024 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Sun Feb  4 19:26:17 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=a27cd886

rhvoice-lang.eclass: new eclass

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 eclass/rhvoice-lang.eclass | 109 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 109 insertions(+)

diff --git a/eclass/rhvoice-lang.eclass b/eclass/rhvoice-lang.eclass
new file mode 100644
index 0000000000..17e65096f6
--- /dev/null
+++ b/eclass/rhvoice-lang.eclass
@@ -0,0 +1,109 @@
+# Copyright 2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# @ECLASS: rhvoice-lang.eclass
+# @MAINTAINER:
+# Anna <cyber+gentoo@sysrq.in>
+# @AUTHOR:
+# Anna <cyber+gentoo@sysrq.in>
+# @SUPPORTED_EAPIS: 8
+# @BLURB: eclass for packaging RHVoice languages
+# @DESCRIPTION:
+# An eclass streamlining the construction of ebuilds for the officially
+# supported RHVoice languages.
+#
+# Look at "src/scripts" files to identify language's license.
+# @EXAMPLE:
+#
+# Most ebuilds will look like this:
+#
+# @CODE
+#
+# EAPI=8
+#
+# RHVOICE_LANG="Russian"
+# inherit rhvoice-lang
+#
+# LICENSE="LGPL-2.1+"
+#
+# @CODE
+
+case ${EAPI} in
+	8) ;;
+	*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
+esac
+
+if [[ ! ${_RHVOICE_LANG_ECLASS} ]]; then
+_RHVOICE_LANG_ECLASS=1
+
+# @ECLASS_VARIABLE: RHVOICE_LANG
+# @PRE_INHERIT
+# @REQUIRED
+# @DESCRIPTION:
+# Full language name (see "data/languages" in RHVoice source code).
+
+if [[ ! ${RHVOICE_LANG} ]]; then
+	die "RHVOICE_LANG must be set before inherit"
+fi
+
+# @ECLASS_VARIABLE: RHVOICE_LANG_REPO
+# @PRE_INHERIT
+# @DESCRIPTION:
+# Repository name under the RHVoice GitHub organization.
+: "${RHVOICE_LANG_REPO:=${RHVOICE_LANG:?}}"
+
+# @ECLASS_VARIABLE: RHVOICE_LANG_TAG
+# @PRE_INHERIT
+# @DESCRIPTION:
+# Tag name for generating SRC_URI.
+: "${RHVOICE_LANG_TAG:=${PV}}"
+
+# @ECLASS_VARIABLE: RHVOICE_LANG_DISTFILE
+# @PRE_INHERIT
+# @DESCRIPTION:
+# Distfile name for generating SRC_URI, should be a ZIP archive.
+: "${RHVOICE_LANG_DISTFILE:=RHVoice-language-${RHVOICE_LANG}-v${PV}.zip}"
+
+DESCRIPTION="${RHVOICE_LANG:?} language support for RHVoice"
+HOMEPAGE="https://github.com/RHVoice/${RHVOICE_LANG_REPO:?}"
+SRC_URI="https://github.com/RHVoice/${RHVOICE_LANG_REPO}/releases/download/${RHVOICE_LANG_TAG}/${RHVOICE_LANG_DISTFILE} -> ${P}.zip"
+S="${WORKDIR}"
+
+KEYWORDS="~amd64 ~x86"
+SLOT="0"
+
+BDEPEND="app-arch/unzip"
+
+# @FUNCTION: rhvoice-lang_src_prepare
+# @DESCRIPTION:
+# Remove stray files such as licenses.
+rhvoice-lang_src_prepare() {
+	debug-print-function ${FUNCNAME} "${@}"
+
+	default_src_prepare
+	find . -name "COPYING*" -o -name "LICENSE*" -delete || \
+			die "removing licenses failed"
+}
+
+# @FUNCTION: rhvoice-lang_src_install
+# @DESCRIPTION:
+# Install the language.
+rhvoice-lang_src_install() {
+	debug-print-function ${FUNCNAME} "${@}"
+
+	shopt -s nullglob
+	local docs=( README* )
+	shopt -u nullglob
+
+	for doc in "${docs[@]}"; do
+		dodoc "${doc}"
+		rm "${doc}" || die "removing ${doc}" failed
+	done
+
+	insinto /usr/share/RHVoice/languages/${RHVOICE_LANG:?}
+	doins -r .
+}
+
+fi
+
+EXPORT_FUNCTIONS src_prepare src_install


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2024-02-04 19:32 Anna Vyalkova
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Vyalkova @ 2024-02-04 19:32 UTC (permalink / raw
  To: gentoo-commits

commit:     3378f870a916cbcbe0db2706b9df3ab88f5babd8
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Sat Feb  3 14:03:03 2024 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Sun Feb  4 19:26:18 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=3378f870

rhvoice-voice.eclass: new eclass

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 eclass/rhvoice-voice.eclass | 102 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 102 insertions(+)

diff --git a/eclass/rhvoice-voice.eclass b/eclass/rhvoice-voice.eclass
new file mode 100644
index 0000000000..796019f21d
--- /dev/null
+++ b/eclass/rhvoice-voice.eclass
@@ -0,0 +1,102 @@
+# Copyright 2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# @ECLASS: rhvoice-voice.eclass
+# @MAINTAINER:
+# Anna <cyber+gentoo@sysrq.in>
+# @AUTHOR:
+# Anna <cyber+gentoo@sysrq.in>
+# @SUPPORTED_EAPIS: 8
+# @BLURB: eclass for packaging RHVoice voices
+# @DESCRIPTION:
+# An eclass streamlining the construction of ebuilds for the officially
+# supported RHVoice voices.
+#
+# Look at "copyright" files to identify voice's license.
+# @EXAMPLE:
+#
+# Most ebuilds will look like this:
+#
+# @CODE
+#
+# EAPI=8
+#
+# RHVOICE_VOICE="arina"
+# RHVOICE_VOICE_REPO="arina-rus"
+# RHVOICE_VOICE_L10N="ru"
+# inherit rhvoice-voice
+#
+# LICENSE="CC-BY-NC-ND-4.0"
+#
+# @CODE
+
+case ${EAPI} in
+	8) ;;
+	*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
+esac
+
+if [[ ! ${_RHVOICE_VOICE_ECLASS} ]]; then
+_RHVOICE_VOICE_ECLASS=1
+
+# @ECLASS_VARIABLE: RHVOICE_VOICE
+# @PRE_INHERIT
+# @REQUIRED
+# @DESCRIPTION:
+# Voice name (see "data/voices" in RHVoice source code).
+
+# @ECLASS_VARIABLE: RHVOICE_VOICE_L10N
+# @PRE_INHERIT
+# @REQUIRED
+# @DESCRIPTION:
+# Language name in L10N USE_EXPAND syntax.
+
+if [[ ! ${RHVOICE_VOICE} ]]; then
+	die "RHVOICE_VOICE must be set before inherit"
+fi
+
+if [[ ! ${RHVOICE_VOICE_L10N} ]]; then
+	die "RHVOICE_VOICE_L10N must be set before inherit"
+fi
+
+# @ECLASS_VARIABLE: RHVOICE_VOICE_REPO
+# @PRE_INHERIT
+# @DESCRIPTION:
+# Repository name under the RHVoice GitHub organization.
+: "${RHVOICE_VOICE_REPO:=${RHVOICE_VOICE:?}}"
+
+# @ECLASS_VARIABLE: RHVOICE_VOICE_TAG
+# @PRE_INHERIT
+# @DESCRIPTION:
+# Tag name for generating SRC_URI.
+: "${RHVOICE_VOICE_TAG:=${PV}}"
+
+# @ECLASS_VARIABLE: RHVOICE_VOICE_DISTFILE
+# @PRE_INHERIT
+# @DESCRIPTION:
+# Distfile name for generating SRC_URI, should be a ZIP archive.
+: "${RHVOICE_VOICE_DISTFILE:=data.zip}"
+
+DESCRIPTION="RHVoice voice: ${RHVOICE_VOICE:?} (${RHVOICE_VOICE_L10N:?})"
+HOMEPAGE="https://github.com/RHVoice/${RHVOICE_VOICE_REPO:?}"
+SRC_URI="https://github.com/RHVoice/${RHVOICE_VOICE_REPO}/releases/download/${RHVOICE_VOICE_TAG}/${RHVOICE_VOICE_DISTFILE} -> ${P}.zip"
+S="${WORKDIR}"
+
+KEYWORDS="~amd64 ~x86"
+SLOT="0"
+
+RDEPEND="app-accessibility/rhvoice-core[l10n_${RHVOICE_VOICE_L10N}]"
+BDEPEND="app-arch/unzip"
+
+# @FUNCTION: rhvoice-voice_src_install
+# @DESCRIPTION:
+# Install the voice.
+rhvoice-voice_src_install() {
+	debug-print-function ${FUNCNAME} "${@}"
+
+	insinto /usr/share/RHVoice/voices/${RHVOICE_VOICE:?}
+	doins -r .
+}
+
+fi
+
+EXPORT_FUNCTIONS src_install


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2024-03-31 17:49 Julien Roy
  0 siblings, 0 replies; 180+ messages in thread
From: Julien Roy @ 2024-03-31 17:49 UTC (permalink / raw
  To: gentoo-commits

commit:     d2fc27f82b8f6c95c24de4dd764108419784c05d
Author:     Julien Roy <julien <AT> jroy <DOT> ca>
AuthorDate: Sun Mar 31 17:29:30 2024 +0000
Commit:     Julien Roy <julien <AT> jroy <DOT> ca>
CommitDate: Sun Mar 31 17:29:30 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=d2fc27f8

octaveforge.eclass: drop not inherited eclass

Signed-off-by: Julien Roy <julien <AT> jroy.ca>

 eclass/octaveforge.eclass | 240 ----------------------------------------------
 1 file changed, 240 deletions(-)

diff --git a/eclass/octaveforge.eclass b/eclass/octaveforge.eclass
deleted file mode 100644
index 0528d2d907..0000000000
--- a/eclass/octaveforge.eclass
+++ /dev/null
@@ -1,240 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-# @ECLASS: octaveforge.eclass
-# @AUTHOR:
-# Rafael G. Martins <rafael@rafaelmartins.eng.br>
-# Alessandro Barbieri <lssndrbarbieri@gmail.com>
-# @BLURB: octaveforge helper eclass.
-# @MAINTAINER:
-# Alessandro Barbieri <lssndrbarbieri@gmail.com>
-# @SUPPORTED_EAPIS: 8
-
-inherit autotools edo
-
-case ${EAPI} in
-	8) ;;
-	*) die "${ECLASS}: EAPI ${EAPI} unsupported."
-esac
-
-EXPORT_FUNCTIONS src_unpack src_prepare src_compile src_install src_test pkg_postinst pkg_prerm pkg_postrm
-
-# @ECLASS_VARIABLE: REPO_URI
-# @DESCRIPTION:
-# URI to the sourceforge octave-forge repository
-REPO_URI="http://svn.code.sf.net/p/octave/code/trunk/octave-forge"
-
-# defining some paths
-
-# @ECLASS_VARIABLE: OCT_ROOT
-# @DESCRIPTION:
-# full path to octave share
-OCT_ROOT="/usr/share/octave"
-
-# @ECLASS_VARIABLE: OCT_PKGDIR
-# @DESCRIPTION:
-# path to octave pkgdir
-OCT_PKGDIR="${OCT_ROOT}/packages"
-
-# @ECLASS_VARIABLE: OCT_BIN
-# @DESCRIPTION:
-# octave binary name
-OCT_BIN="octave"
-
-SRC_URI="mirror://sourceforge/octave/${P}.tar.gz"
-SLOT="0"
-
-# @FUNCTION: octaveforge_src_unpack
-# @DESCRIPTION:
-# function to unpack and set the correct S
-octaveforge_src_unpack() {
-	default
-	if [[ ! -d "${WORKDIR}/${P}" ]]; then
-		S="${WORKDIR}/${PN}"
-	fi
-}
-
-# @FUNCTION: octaveforge_src_prepare
-# @DESCRIPTION:
-# function to add octaveforge specific makefile and configure and reconfigure if possible
-octaveforge_src_prepare() {
-	default
-
-	_generate_configure || die
-
-	if [[ -e "${S}/src/configure.ac" ]]; then
-		pushd "${S}/src" || die
-		eautoreconf
-		popd || die
-	elif [[ -e "${S}/src/autogen.sh" ]]; then
-		pushd "${S}/src" || die
-		edo ./autogen.sh
-		popd || die
-	fi
-	if [[ -e "${S}/src/Makefile" ]]; then
-		sed -i 's/ -s / /g' "${S}/src/Makefile" || die
-	fi
-}
-
-octaveforge_src_compile() {
-	PKGDIR="$(pwd | sed -e 's|^.*/||' || die)"
-	export OCT_PACKAGE="${TMPDIR}/${PKGDIR}.tar.gz"
-	export MKOCTFILE="mkoctfile -v"
-
-	cmd="disp(__octave_config_info__('octlibdir'));"
-	OCTLIBDIR=$(octavecommand "${cmd}" || die)
-	export LFLAGS="${LFLAGS} -L${OCTLIBDIR}"
-	export LDFLAGS="${LDFLAGS} -L${OCTLIBDIR}"
-
-	if [[ -e src/Makefile ]]; then
-		emake -C src
-	fi
-
-	if [[ -e src/Makefile ]]; then
-		mv src/Makefile src/Makefile.disable || die
-	fi
-	if [[ -e src/configure ]]; then
-		mv src/configure src/configure.disable || die
-	fi
-
-	pushd .. || die
-	tar -czf "${OCT_PACKAGE}" "${PKGDIR}" || die
-}
-
-# @FUNCTION: octaveforge_src_install
-# @DESCRIPTION:
-# function to install the octave package
-octaveforge_src_install() {
-	DESTDIR="${D}" _octaveforge_pkg_install || die
-}
-
-octaveforge_src_test() {
-	DESTDIR="${T}" _octaveforge_pkg_install || die
-
-	# cargo culted from Fedora
-	cmd="
-		pkg('load','${PN}');
-		oruntests('${oct_pkgdir}');
-		unlink(pkg('local_list'));
-		unlink(pkg('global_list'));
-	"
-	octavecommand "${cmd}" || die
-}
-
-# @FUNCTION: octaveforge_pkg_postinst
-# @DESCRIPTION:
-# function that will rebuild the octave package database
-octaveforge_pkg_postinst() {
-	einfo "Registering ${CATEGORY}/${PF} on the Octave package database."
-	if [[ ! -d "${OCT_PKGDIR}" ]] ; then
-		mkdir -p "${OCT_PKGDIR}" || die
-	fi
-	cmd="pkg('rebuild');"
-	octavecommand "${cmd}" || die
-}
-
-# @FUNCTION: octaveforge_pkg_prerm
-# @DESCRIPTION:
-# function that will run on_uninstall routines to prepare the package to remove
-octaveforge_pkg_prerm() {
-	einfo 'Running on_uninstall routines to prepare the package to remove.'
-	cmd="
-		pkg('rebuild');
-		l = pkg('list');
-		disp(l{cellfun(@(x)strcmp(x.name,'${PN}'),l)}.dir);
-	"
-	oct_pkgdir=$(octavecommand "${cmd}" || die)
-	rm -f "${oct_pkgdir}/packinfo/on_uninstall.m" || die
-	if [[ -e "${oct_pkgdir}/packinfo/on_uninstall.m.orig" ]]; then
-		mv "$oct_pkgdir"/packinfo/on_uninstall.m{.orig,} || die
-		pushd "$oct_pkgdir/packinfo" || die
-		cmd="
-			l = pkg('list');
-			on_uninstall(l{cellfun(@(x)strcmp(x.name,'${PN}'), l)});
-		"
-		octavecommand "${cmd}" || die
-	fi
-}
-
-# @FUNCTION: octaveforge_pkg_postrm
-# @DESCRIPTION:
-# function that will rebuild the octave package database
-octaveforge_pkg_postrm() {
-	einfo 'Rebuilding the Octave package database.'
-	if [[ ! -d "${OCT_PKGDIR}" ]] ; then
-		mkdir -p "${OCT_PKGDIR}" || die
-	fi
-	cmd="pkg('rebuild');"
-	edo "${OCT_BIN}" -H --silent --no-gui --eval "${cmd}"
-}
-
-octavecommand() {
-	edo "${OCT_BIN}" -H -q --no-site-file --no-gui --eval "$1"
-}
-
-_generate_configure() {
-	cat << EOF > configure || die
-#! /bin/sh -f
-
-if [ -e src/configure ]; then
-  cd src
-  ./configure $*
-fi
-EOF
-	chmod 0755 "configure" || die
-}
-
-_octaveforge_pkg_install() {
-	TMPDIR="${T}"
-	DISTPKG='Gentoo'
-
-	pushd ../ || die
-	if [[ "X${DISTPKG}X" != "XX" ]]; then
-		stripcmd="
-			unlink(pkg('local_list'));
-			unlink(pkg('global_list'));
-		"
-	fi
-	if [[ "X${DESTDIR}X" = "XX" ]]; then
-		cmd="
-			warning('off','all');
-			pkg('install','${OCT_PACKAGE}');
-			l=pkg('list');
-			disp(l{cellfun(@(x)strcmp(x.name,'${PN}'),l)}.dir);
-			${stripcmd}
-		"
-		oct_pkgdir=$(octavecommand "${cmd}" || die)
-	else
-		cmd="disp(fullfile(__octave_config_info__('datadir'),'octave'));"
-		shareprefix=${DESTDIR}/$(octavecommand "${cmd}" || die)
-		cmd="disp(fullfile(__octave_config_info__('libdir'),'octave'));"
-		libprefix=${DESTDIR}/$(octavecommand "${cmd}" || die)
-		octprefix="${shareprefix}/packages"
-		archprefix="${libprefix}/packages"
-		if [[ ! -e "${octprefix}" ]]; then
-			mkdir -p "${octprefix}" || die
-		fi
-		if [[ ! -e "${archprefix}" ]]; then
-			mkdir -p "${archprefix}" || die
-		fi
-		cmd="
-			warning('off','all');
-			pkg('prefix','${octprefix}','${archprefix}');
-			pkg('global_list',fullfile('${shareprefix}','octave_packages'));
-			pkg('local_list',fullfile('${shareprefix}','octave_packages'));
-			pkg('install','-nodeps','-verbose','${OCT_PACKAGE}');
-		"
-		octavecommand "${cmd}" || die
-		cmd="
-			warning('off','all');
-			pkg('prefix','${octprefix}','${archprefix}');
-			pkg('global_list',fullfile('${shareprefix}','octave_packages'));
-			pkg('local_list',fullfile('${shareprefix}','octave_packages'));
-			l=pkg('list');
-			disp(l{cellfun(@(x)strcmp(x.name,'${PN}'),l)}.dir);
-			${stripcmd}
-		"
-		oct_pkgdir=$(octavecommand "${cmd}" || die)
-	fi
-	export oct_pkgdir
-}


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
  2024-03-31 17:57 [gentoo-commits] repo/proj/guru:master " Julien Roy
@ 2024-03-31 17:49 ` Julien Roy
  0 siblings, 0 replies; 180+ messages in thread
From: Julien Roy @ 2024-03-31 17:49 UTC (permalink / raw
  To: gentoo-commits

commit:     8ea094892a543b86385d94d205acfb5d37db0c93
Author:     Julien Roy <julien <AT> jroy <DOT> ca>
AuthorDate: Sun Mar 31 17:28:59 2024 +0000
Commit:     Julien Roy <julien <AT> jroy <DOT> ca>
CommitDate: Sun Mar 31 17:28:59 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=8ea09489

R-packages.eclass: drop not inherited eclass

Signed-off-by: Julien Roy <julien <AT> jroy.ca>

 eclass/R-packages.eclass | 184 -----------------------------------------------
 1 file changed, 184 deletions(-)

diff --git a/eclass/R-packages.eclass b/eclass/R-packages.eclass
deleted file mode 100644
index a701c96178..0000000000
--- a/eclass/R-packages.eclass
+++ /dev/null
@@ -1,184 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-# @ECLASS: R-packages.eclass
-# @AUTHOR:
-# Alessandro Barbieri <lssndrbarbieri@gmail.com>
-# André Erdmann <dywi@mailerd.de>
-# Benda Xu <heroxbd@gentoo.org>
-# Denis Dupeyron <calchan@gentoo.org>
-# Robert Greener <me@r0bert.dev>
-# @BLURB: eclass to build R packages
-# @MAINTAINER:
-# Alessandro Barbieri <lssndrbarbieri@gmail.com>
-# @SUPPORTED_EAPIS: 7 8
-
-case ${EAPI} in
-	7|8) ;;
-	*) die "${ECLASS}: EAPI ${EAPI} unsupported."
-esac
-
-if [ ! ${_R_PACKAGES_ECLASS} ]; then
-
-inherit edo optfeature toolchain-funcs
-
-# @ECLASS_VARIABLE: SUGGESTED_PACKAGES
-# @DEPRECATED: none
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# String variable containing the list of upstream suggested packages.  Consider
-# using optfeature directly instead for more concise descriptions.
-
-# @ECLASS_VARIABLE: CRAN_SNAPSHOT_DATE
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# The date the ebuild was updated in YYYY-MM-DD format used to fetch distfiles
-# from Microsoft CRAN mirror.  This will be required in the future.
-
-# @ECLASS_VARIABLE: CRAN_PN
-# @DESCRIPTION:
-# Package name to use for fetching distfiles from CRAN.
-: ${CRAN_PN:=${PN//_/.}}
-
-# @ECLASS_VARIABLE: CRAN_PV
-# @DESCRIPTION:
-# Package version to use for fetching distfiles from CRAN.
-: ${CRAN_PV:=${PV}}
-
-if [[ ${CRAN_SNAPSHOT_DATE} ]]; then
-	SRC_URI="https://cran.microsoft.com/snapshot/${CRAN_SNAPSHOT_DATE}"
-else
-	SRC_URI="mirror://cran"
-fi
-SRC_URI+="/src/contrib/${CRAN_PN}_${CRAN_PV}.tar.gz"
-
-HOMEPAGE="https://cran.r-project.org/package=${CRAN_PN}"
-
-SLOT="0"
-
-DEPEND="dev-lang/R"
-RDEPEND="${DEPEND}"
-
-# @FUNCTION: R-packages_src_unpack
-# @DEPRECATED: none
-# @DESCRIPTION:
-# Unpack R packages into the right folder.  Consider setting ${S} to appropriate
-# value instead.
-R-packages_src_unpack() {
-	default_src_unpack
-
-	if [[ -d "${CRAN_PN}" ]] && [[ ! -d "${P}" ]]; then
-		mv "${CRAN_PN}" "${P}" || die
-	fi
-}
-
-# @FUNCTION: R-packages_src_prepare
-# @DEPRECATED: none
-# @DESCRIPTION:
-# Remove unwanted files from the sources.
-R-packages_src_prepare() {
-	default_src_prepare
-	eqawarn "This ebuild uses R-packages_src_prepare which is no-op."
-	eqawarn "You can safely remove it."
-}
-
-# @FUNCTION: R-packages_src_configure
-# @DESCRIPTION:
-# Set up temporary directories.
-R-packages_src_configure() {
-	mkdir "${T}"/R || die
-}
-
-# @FUNCTION: R-packages_src_compile
-# @DESCRIPTION:
-# Pass build-related environment variables to R and then build/install the
-# package.
-R-packages_src_compile() {
-	local -a mymakeflags=(
-		"${MAKEFLAGS}"
-		AR="$(tc-getAR)"
-		CC="$(tc-getCC)"
-		CPP="$(tc-getCPP)"
-		CXX="$(tc-getCXX)"
-		FC="$(tc-getFC)"
-		LD="$(tc-getLD)"
-		NM="$(tc-getNM)"
-		RANLIB="$(tc-getRANLIB)"
-		CFLAGS="${CFLAGS}"
-		CPPFLAGS="${CPPFLAGS}"
-		CXXFLAGS="${CXXFLAGS}"
-		FFLAGS="${FFLAGS}"
-		FCFLAGS="${FCFLAGS}"
-		LDFLAGS="${LDFLAGS}"
-		MAKEOPTS="${MAKEOPTS}"
-	)
-
-	MAKEFLAGS="${mymakeflags[@]// /\\ }" \
-		edo R CMD INSTALL . -d -l "${T}"/R --byte-compile
-}
-
-# @FUNCTION: R-packages_src_install
-# @DESCRIPTION:
-# Move files into right folders.
-#
-# Documentation and examples is moved to docdir, symlinked back to R
-# site-library (to allow access from within R).
-#
-# Everything else is moved to the R site-library.
-R-packages_src_install() {
-	cd "${T}"/R/${CRAN_PN} || die
-
-	local DOCDIR="/usr/share/doc/${PF}"
-	local EDOCDIR="${ED}${DOCDIR}"
-	mkdir -p "${EDOCDIR}" || die
-
-	# _maybe_movelink <target> <link_name>
-	# If target exists, installs everything under target into R's
-	# site-library for the package and creates a link with the name
-	# <link_name> to it.
-	_maybe_movelink() {
-		local target=${1}
-		local link_name=${2}
-		if [[ ! -e "${target}" ]]; then
-			return
-		fi
-
-		local rdir=/usr/$(get_libdir)/R/site-library/${CRAN_PN}
-		local rp_source="${rdir}/${target}"
-		insinto ${rdir}
-		doins -r ${target}
-		ln -s "${rp_source}" "${link_name}" || die
-	}
-
-	for i in {NEWS,README}.md DESCRIPTION CITATION INDEX NEWS WORDLIST News.Rd; do
-		_maybe_movelink "${i}" "${EDOCDIR}/${i}"
-	done
-
-	_maybe_movelink html "${EDOCDIR}"/html
-
-	_maybe_movelink examples "${EDOCDIR}"/examples
-
-	_maybe_movelink doc "${EDOCDIR}"/doc
-
-	rm -f LICENSE || die
-	rm -rf tests test || die
-
-	insinto /usr/$(get_libdir)/R/site-library
-	doins -r "${T}"/R/${CRAN_PN}
-}
-
-# @FUNCTION: R-packages_pkg_postinst
-# @DEPRECATED: optfeature
-# @DESCRIPTION:
-# Prompt to install the upstream suggested packages (if they exist).  Consider
-# calling "optfeature" directly instead for concise descriptions.
-R-packages_pkg_postinst() {
-	for p in ${SUGGESTED_PACKAGES}; do
-		optfeature "having the upstream suggested package" "${p}"
-	done
-}
-
-_R_PACKAGES_ECLASS=1
-fi
-
-EXPORT_FUNCTIONS src_unpack src_configure src_compile src_install pkg_postinst


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
  2024-04-01 11:32 [gentoo-commits] repo/proj/guru:master commit in: eclass/ Julien Roy
@ 2024-04-01 11:18 ` Julien Roy
  0 siblings, 0 replies; 180+ messages in thread
From: Julien Roy @ 2024-04-01 11:18 UTC (permalink / raw
  To: gentoo-commits

commit:     1ae252142948016425e9b911c1cea0d72f38e9a2
Author:     Julien Roy <julien <AT> jroy <DOT> ca>
AuthorDate: Mon Apr  1 11:18:14 2024 +0000
Commit:     Julien Roy <julien <AT> jroy <DOT> ca>
CommitDate: Mon Apr  1 11:18:14 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=1ae25214

cannadic.eclass: remove unused eclass

Signed-off-by: Julien Roy <julien <AT> jroy.ca>

 eclass/cannadic.eclass | 149 -------------------------------------------------
 1 file changed, 149 deletions(-)

diff --git a/eclass/cannadic.eclass b/eclass/cannadic.eclass
deleted file mode 100644
index 4e8914f399..0000000000
--- a/eclass/cannadic.eclass
+++ /dev/null
@@ -1,149 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-# @ECLASS: cannadic.eclass
-# @MAINTAINER:
-# Alessandro Barbieri <lssndrbarbieri@gmail.com>
-# @AUTHOR:
-# Mamoru KOMACHI <usata@gentoo.org>
-# @SUPPORTED_EAPIS: 8
-# @BLURB: Function for Canna compatible dictionaries
-# @DESCRIPTION:
-# The cannadic eclass is used for installation and setup of Canna
-# compatible dictionaries.
-
-case ${EAPI} in
-	8) ;;
-	*) die "EAPI=${EAPI:-0} is not supported" ;;
-esac
-
-EXPORT_FUNCTIONS src_install pkg_postinst pkg_postrm
-
-if [[ -z ${_CANNADIC_ECLASS} ]]; then
-_CANNADIC_ECLASS=1
-
-SRC_URI="mirror://gentoo/${P}.tar.gz"
-
-# You don't need to modify these
-readonly _CANNADIC_CANNA_DIR="/var/lib/canna/dic/canna"
-readonly _CANNADIC_DICS_DIR="/etc/canna/dics.dir.d/"
-
-# @FUNCTION: cannadic-install
-# @DESCRIPTION:
-# Installs dictionaries to ${EPREFIX}/var/lib/canna/dic/canna
-cannadic-install() {
-	insinto ${_CANNADIC_CANNA_DIR}
-	insopts -m 0664 -o canna -g canna
-	doins "${@}"
-}
-
-# @FUNCTION: dicsdir-install
-# @DESCRIPTION:
-# Installs dics.dir from ${DICSDIRFILE}
-dicsdir-install() {
-	insinto ${_CANNADIC_DICS_DIR}
-	doins ${DICSDIRFILE}
-}
-
-# @FUNCTION: cannadic_src_install
-# @DESCRIPTION:
-# Installs all dictionaries under ${WORKDIR}
-# plus dics.dir and docs
-cannadic_src_install() {
-	keepdir ${_CANNADIC_CANNA_DIR}
-	fowners canna:canna ${_CANNADIC_CANNA_DIR}
-	fperms 0775 ${_CANNADIC_CANNA_DIR}
-
-	local f
-	for f in *.c[btl]d *.t; do
-		if [[ -s ${f} ]]; then
-			cannadic-install "${f}"
-		fi
-	done 2> /dev/null
-
-	dicsdir-install
-
-	einstalldocs
-}
-
-# @FUNCTION: update-cannadic-dir
-# @DESCRIPTION:
-# Updates dics.dir for Canna Server, script for this part taken from Debian GNU/Linux
-#
-#  compiles dics.dir files for Canna Server
-#  Copyright 2001 ISHIKAWA Mutsumi
-#  Licensed under the GNU General Public License, version 2.  See the file
-#  /usr/portage/license/GPL-2 or <http://www.gnu.org/copyleft/gpl.txt>.
-update-cannadic-dir() {
-	einfo
-	einfo "Updating dics.dir for Canna ..."
-	einfo
-
-	# write new dics.dir file in case we are interrupted
-	cat <<-EOF > "${EROOT}${_CANNADIC_CANNA_DIR}/dics.dir.update-new" || die
-		# dics.dir -- automatically generated file by Portage.
-		# DO NOT EDIT BY HAND.
-	EOF
-
-	local f
-	for f in "${EROOT}${_CANNADIC_DICS_DIR}"/*.dics.dir; do
-		echo "# ${f}" >> "${EROOT}${_CANNADIC_CANNA_DIR}/dics.dir.update-new" || die
-		cat "${f}" >> "${EROOT}${_CANNADIC_CANNA_DIR}/dics.dir.update-new" || die
-		einfo "Added ${f}."
-	done
-
-	mv "${EROOT}${_CANNADIC_CANNA_DIR}/dics.dir.update-new" "${EROOT}${_CANNADIC_CANNA_DIR}/dics.dir" || die
-
-	einfo
-	einfo "Done."
-	einfo
-}
-
-# @FUNCTION: cannadic_pkg_postinst
-# @DESCRIPTION:
-# Updates dics.dir and print out notice after install
-cannadic_pkg_postinst() {
-	debug-print-function ${FUNCNAME} "${@}"
-
-	update-cannadic-dir
-
-	einfo "Please restart cannaserver for changes to propagate."
-	einfo "You need to modify your config file (~/.canna) to enable dictionaries."
-
-	if [[ -n ${CANNADICS} ]]; then
-		einfo "e.g) add"
-		einfo
-		einfo "  $(IFS=' ' ; echo ${CANNADICS[*]})"
-		einfo
-		einfo "to section use-dictionary()."
-		einfo "For details, see documents under ${EROOT}/usr/share/doc/${PF}."
-	fi
-
-	einfo "If you do not have ~/.canna, you can find sample files in ${EROOT}/usr/share/canna."
-	ewarn "If you are upgrading from existing dictionary, you may need to recreate"
-	ewarn "user dictionary if you have one."
-}
-
-# @FUNCTION: cannadic_pkg_postrm
-# @DESCRIPTION:
-# Updates dics.dir and print out notice after uninstall
-cannadic_pkg_postrm() {
-	debug-print-function ${FUNCNAME} "${@}"
-
-	update-cannadic-dir
-
-	einfo "Please restart cannaserver for changes to propagate."
-	einfo "and modify your config file (~/.canna) to disable dictionary."
-
-	if [[ -n ${CANNADICS} ]]; then
-		einfo "e.g) delete"
-		einfo
-		einfo "  $(IFS=' ' ; echo ${CANNADICS[*]})"
-		einfo
-		einfo "from section use-dictionary()."
-	fi
-
-	einfo
-}
-
-fi


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

* [gentoo-commits] repo/proj/guru:master commit in: eclass/
@ 2024-04-01 11:32 Julien Roy
  2024-04-01 11:18 ` [gentoo-commits] repo/proj/guru:dev " Julien Roy
  0 siblings, 1 reply; 180+ messages in thread
From: Julien Roy @ 2024-04-01 11:32 UTC (permalink / raw
  To: gentoo-commits

commit:     1ae252142948016425e9b911c1cea0d72f38e9a2
Author:     Julien Roy <julien <AT> jroy <DOT> ca>
AuthorDate: Mon Apr  1 11:18:14 2024 +0000
Commit:     Julien Roy <julien <AT> jroy <DOT> ca>
CommitDate: Mon Apr  1 11:18:14 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=1ae25214

cannadic.eclass: remove unused eclass

Signed-off-by: Julien Roy <julien <AT> jroy.ca>

 eclass/cannadic.eclass | 149 -------------------------------------------------
 1 file changed, 149 deletions(-)

diff --git a/eclass/cannadic.eclass b/eclass/cannadic.eclass
deleted file mode 100644
index 4e8914f399..0000000000
--- a/eclass/cannadic.eclass
+++ /dev/null
@@ -1,149 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-# @ECLASS: cannadic.eclass
-# @MAINTAINER:
-# Alessandro Barbieri <lssndrbarbieri@gmail.com>
-# @AUTHOR:
-# Mamoru KOMACHI <usata@gentoo.org>
-# @SUPPORTED_EAPIS: 8
-# @BLURB: Function for Canna compatible dictionaries
-# @DESCRIPTION:
-# The cannadic eclass is used for installation and setup of Canna
-# compatible dictionaries.
-
-case ${EAPI} in
-	8) ;;
-	*) die "EAPI=${EAPI:-0} is not supported" ;;
-esac
-
-EXPORT_FUNCTIONS src_install pkg_postinst pkg_postrm
-
-if [[ -z ${_CANNADIC_ECLASS} ]]; then
-_CANNADIC_ECLASS=1
-
-SRC_URI="mirror://gentoo/${P}.tar.gz"
-
-# You don't need to modify these
-readonly _CANNADIC_CANNA_DIR="/var/lib/canna/dic/canna"
-readonly _CANNADIC_DICS_DIR="/etc/canna/dics.dir.d/"
-
-# @FUNCTION: cannadic-install
-# @DESCRIPTION:
-# Installs dictionaries to ${EPREFIX}/var/lib/canna/dic/canna
-cannadic-install() {
-	insinto ${_CANNADIC_CANNA_DIR}
-	insopts -m 0664 -o canna -g canna
-	doins "${@}"
-}
-
-# @FUNCTION: dicsdir-install
-# @DESCRIPTION:
-# Installs dics.dir from ${DICSDIRFILE}
-dicsdir-install() {
-	insinto ${_CANNADIC_DICS_DIR}
-	doins ${DICSDIRFILE}
-}
-
-# @FUNCTION: cannadic_src_install
-# @DESCRIPTION:
-# Installs all dictionaries under ${WORKDIR}
-# plus dics.dir and docs
-cannadic_src_install() {
-	keepdir ${_CANNADIC_CANNA_DIR}
-	fowners canna:canna ${_CANNADIC_CANNA_DIR}
-	fperms 0775 ${_CANNADIC_CANNA_DIR}
-
-	local f
-	for f in *.c[btl]d *.t; do
-		if [[ -s ${f} ]]; then
-			cannadic-install "${f}"
-		fi
-	done 2> /dev/null
-
-	dicsdir-install
-
-	einstalldocs
-}
-
-# @FUNCTION: update-cannadic-dir
-# @DESCRIPTION:
-# Updates dics.dir for Canna Server, script for this part taken from Debian GNU/Linux
-#
-#  compiles dics.dir files for Canna Server
-#  Copyright 2001 ISHIKAWA Mutsumi
-#  Licensed under the GNU General Public License, version 2.  See the file
-#  /usr/portage/license/GPL-2 or <http://www.gnu.org/copyleft/gpl.txt>.
-update-cannadic-dir() {
-	einfo
-	einfo "Updating dics.dir for Canna ..."
-	einfo
-
-	# write new dics.dir file in case we are interrupted
-	cat <<-EOF > "${EROOT}${_CANNADIC_CANNA_DIR}/dics.dir.update-new" || die
-		# dics.dir -- automatically generated file by Portage.
-		# DO NOT EDIT BY HAND.
-	EOF
-
-	local f
-	for f in "${EROOT}${_CANNADIC_DICS_DIR}"/*.dics.dir; do
-		echo "# ${f}" >> "${EROOT}${_CANNADIC_CANNA_DIR}/dics.dir.update-new" || die
-		cat "${f}" >> "${EROOT}${_CANNADIC_CANNA_DIR}/dics.dir.update-new" || die
-		einfo "Added ${f}."
-	done
-
-	mv "${EROOT}${_CANNADIC_CANNA_DIR}/dics.dir.update-new" "${EROOT}${_CANNADIC_CANNA_DIR}/dics.dir" || die
-
-	einfo
-	einfo "Done."
-	einfo
-}
-
-# @FUNCTION: cannadic_pkg_postinst
-# @DESCRIPTION:
-# Updates dics.dir and print out notice after install
-cannadic_pkg_postinst() {
-	debug-print-function ${FUNCNAME} "${@}"
-
-	update-cannadic-dir
-
-	einfo "Please restart cannaserver for changes to propagate."
-	einfo "You need to modify your config file (~/.canna) to enable dictionaries."
-
-	if [[ -n ${CANNADICS} ]]; then
-		einfo "e.g) add"
-		einfo
-		einfo "  $(IFS=' ' ; echo ${CANNADICS[*]})"
-		einfo
-		einfo "to section use-dictionary()."
-		einfo "For details, see documents under ${EROOT}/usr/share/doc/${PF}."
-	fi
-
-	einfo "If you do not have ~/.canna, you can find sample files in ${EROOT}/usr/share/canna."
-	ewarn "If you are upgrading from existing dictionary, you may need to recreate"
-	ewarn "user dictionary if you have one."
-}
-
-# @FUNCTION: cannadic_pkg_postrm
-# @DESCRIPTION:
-# Updates dics.dir and print out notice after uninstall
-cannadic_pkg_postrm() {
-	debug-print-function ${FUNCNAME} "${@}"
-
-	update-cannadic-dir
-
-	einfo "Please restart cannaserver for changes to propagate."
-	einfo "and modify your config file (~/.canna) to disable dictionary."
-
-	if [[ -n ${CANNADICS} ]]; then
-		einfo "e.g) delete"
-		einfo
-		einfo "  $(IFS=' ' ; echo ${CANNADICS[*]})"
-		einfo
-		einfo "from section use-dictionary()."
-	fi
-
-	einfo
-}
-
-fi


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2024-04-27  9:50 Anna Vyalkova
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Vyalkova @ 2024-04-27  9:50 UTC (permalink / raw
  To: gentoo-commits

commit:     8ceda6e24bafd984dabf37ff7f23dfe00fc6a272
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Sat Apr 27 07:25:46 2024 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Sat Apr 27 09:50:05 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=8ceda6e2

daemons.eclass: eclassdoc example fix

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 eclass/daemons.eclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eclass/daemons.eclass b/eclass/daemons.eclass
index 24798158d3..90c3d76131 100644
--- a/eclass/daemons.eclass
+++ b/eclass/daemons.eclass
@@ -42,7 +42,7 @@
 #
 # ...
 #
-# DAEMONS_REQ_USE=(
+# declare -Ag DAEMONS_REQ_USE=(
 # 	[postgresql]="xml"
 # )
 # inherit daemons distutils-r1


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2024-07-01  2:10 Anna Vyalkova
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Vyalkova @ 2024-07-01  2:10 UTC (permalink / raw
  To: gentoo-commits

commit:     3febea914acb9eb5f036b2313916f20b6cd6d1a7
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Mon Jul  1 01:26:53 2024 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Mon Jul  1 01:26:53 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=3febea91

nimble.eclass: fix tests dry-run

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 eclass/nimble.eclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eclass/nimble.eclass b/eclass/nimble.eclass
index 2fa48b48f..affe3cb58 100644
--- a/eclass/nimble.eclass
+++ b/eclass/nimble.eclass
@@ -178,7 +178,7 @@ nimble_src_compile() {
 nimble_src_test() {
 	debug-print-function ${FUNCNAME} "${@}"
 
-	if nonfatal nimble_build test -n &> /dev/null; then
+	if nonfatal nimble_build -n test &> /dev/null; then
 		nimble_build test "${@}"
 	fi
 }


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2024-07-14  7:27 Anna Vyalkova
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Vyalkova @ 2024-07-14  7:27 UTC (permalink / raw
  To: gentoo-commits

commit:     dd9d541bf216715f4a3bbc426c38231db375717d
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Tue Jul  9 15:19:31 2024 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Sun Jul 14 07:22:18 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=dd9d541b

boinc-app.eclass: better wrapper install function

"dowrapper" had too much magic: it relied on specifically files being
present in ${FILESDIR}, which is just… wrong.

It will burn in flames without any backwards compatibility. New
"boinc_install_wrapper" function replaces it.

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 eclass/boinc-app.eclass | 62 +++++++++++++++++++++++++++----------------------
 1 file changed, 34 insertions(+), 28 deletions(-)

diff --git a/eclass/boinc-app.eclass b/eclass/boinc-app.eclass
index 540fc8ea0..6a386bf2f 100644
--- a/eclass/boinc-app.eclass
+++ b/eclass/boinc-app.eclass
@@ -236,61 +236,67 @@ boinc-wrapper_foreach_wrapper_job() {
 		|| die "$(basename "$1") sed failed"
 }
 
-# @FUNCTION: dowrapper
-# @USAGE: <app> [more apps...]
+# @FUNCTION: boinc_install_wrapper
+# @USAGE: <bin> <job> [new name]
 # @DESCRIPTION:
 # This function provides a uniform way to install wrapper applications
 # for BOINC projects. It makes symlinks to the BOINC wrapper and also
 # installs respective job.xml files.
 #
-# When sci-misc/boinc-example-1.0 calls `dowrapper boinc-example` it:
+# When `dowrapper boinc-example_wrapper A.xml B.xml` is called, it:
 #
-# 1. Installs boinc-example_job_1.0.xml from ebuild's files/ directory
-#    to project's root directory
+# 1. Installs A.xml in the project's root directory, renaming it to B.xml
 #
-# 2. Installs boinc-example_wrapper_1.0 symlink, which points
-#    to /usr/bin/boinc-wrapper, to project's root directory
+# 2. Installs boinc-example_wrapper symlink, which points
+#    to /usr/bin/boinc-wrapper, in the project's root directory
 #
 # Example:
 # @CODE
 # src_install() {
 # 	meson_src_install
 #
-# 	dowrapper boinc-example boinc-sample
+# 	boinc_install_wrapper boinc-example_wrapper "${FILESDIR}"/job.xml
 #	doappinfo "${FILESDIR}"/app_info_${PV}.xml
 # }
 # @CODE
 #
 # Keep your job.xml files in sync with app_info.xml!
-dowrapper() {
+boinc_install_wrapper() {
 	debug-print-function ${FUNCNAME} "${@}"
 
-	for app in "$@"; do
-		local wrapperjob="${app}_job_${PV}.xml"
-		local wrapperexe="${app}_wrapper_${PV}"
+	(( $# >= 2 && $# <= 3 )) || \
+		die "${FUNCNAME} got wrong number of arguments"
 
-		[[ -f "${FILESDIR}/${wrapperjob}" ]] || \
-			die "${wrapperjob} not found in ebuild's files/ directory"
+	local exe="${1:?}"
+	local job="${2:?}"
+	local job_dest="${3:-$(basename "${job:?}")}"
 
-		cp "${FILESDIR}/${wrapperjob}" "${T}" || die
-
-		if declare -f foreach_wrapper_job >/dev/null; then
-			foreach_wrapper_job "${T}/${wrapperjob}"
-		else
-			boinc-wrapper_foreach_wrapper_job "${T}/${wrapperjob}"
-		fi
+	cp "${job:?}" "${T:?}/${job_dest:?}" || die
+	if declare -f foreach_wrapper_job >/dev/null; then
+		foreach_wrapper_job "${T:?}/${job_dest:?}"
+	else
+		boinc-wrapper_foreach_wrapper_job "${T:?}/${job_dest:?}"
+	fi
 
-		( # subshell to avoid pollution of calling environment
-			insinto $(get_project_root)
-			insopts -m 0644 --owner root --group boinc
-			doins "${T}/${wrapperjob}"
-			dosym -r /usr/bin/boinc-wrapper "$(get_project_root)/${wrapperexe}"
-		) || die "failed to install '${app}' wrapper app"
-	done
+	( # subshell to avoid pollution of calling environment
+		insinto "$(get_project_root)"
+		insopts -m 0644 --owner root --group boinc
+		doins "${T:?}/${job_dest:?}"
+	) || die "failed to install ${exe:?} wrapper job"
+	rm -f "${T:?}/${job_dest:?}"
 
+	dosym -r /usr/bin/boinc-wrapper "$(get_project_root)/${exe:?}"
 	_boinc-app_fix_permissions
 }
 
+# @FUNCTION: dowrapper
+# @DEPRECATED: boinc_install_wrapper
+# @DESCRIPTION:
+# Install BOINC wrappers and job definitions.
+dowrapper() {
+	die "${FUNCNAME} has been removed, please use boinc_install_wrapper instead"
+}
+
 # @FUNCTION: boinc-app_pkg_postinst
 # @DESCRIPTION:
 # Display helpful instructions on how to make the BOINC client use installed


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2024-07-14  7:27 Anna Vyalkova
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Vyalkova @ 2024-07-14  7:27 UTC (permalink / raw
  To: gentoo-commits

commit:     50b84aa2d1160992a84dcfeefd7748a491147ccc
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Fri Jul 12 08:40:43 2024 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Sun Jul 14 07:22:19 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=50b84aa2

boinc-app.eclass: use standard inherit guard style

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 eclass/boinc-app.eclass | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/eclass/boinc-app.eclass b/eclass/boinc-app.eclass
index 3a26e6738..f6fb82034 100644
--- a/eclass/boinc-app.eclass
+++ b/eclass/boinc-app.eclass
@@ -22,7 +22,7 @@
 
 case ${EAPI} in
 	8) ;;
-	*) die "${ECLASS}: EAPI ${EAPI} unsupported."
+	*) die "${ECLASS}: EAPI ${EAPI:-0} unsupported"
 esac
 
 # @ECLASS_VARIABLE: BOINC_APP_OPTIONAL
@@ -34,10 +34,6 @@ esac
 # If you enable BOINC_APP_OPTIONAL, you have to call boinc-app
 # default phase functions and add dependencies manually.
 
-if [[ ! ${BOINC_APP_OPTIONAL} ]]; then
-	EXPORT_FUNCTIONS pkg_postinst pkg_postrm
-fi
-
 if [[ ! ${_BOINC_APP_ECLASS} ]]; then
 
 # @ECLASS_VARIABLE: BOINC_MASTER_URL
@@ -382,3 +378,7 @@ boinc-app_pkg_postrm() {
 
 _BOINC_APP_ECLASS=1
 fi
+
+if [[ ! ${BOINC_APP_OPTIONAL} ]]; then
+	EXPORT_FUNCTIONS pkg_postinst pkg_postrm
+fi


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2024-07-14  7:27 Anna Vyalkova
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Vyalkova @ 2024-07-14  7:27 UTC (permalink / raw
  To: gentoo-commits

commit:     ce227aa165920d92198c2ca24be6e33b77f470c7
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Fri Jul 12 08:36:36 2024 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Sun Jul 14 07:22:19 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=ce227aa1

boinc-app.eclass: allow to set deps for boinc-optional apps

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 eclass/boinc-app.eclass | 27 ++++++++++++++++++++-------
 1 file changed, 20 insertions(+), 7 deletions(-)

diff --git a/eclass/boinc-app.eclass b/eclass/boinc-app.eclass
index 00ffd39ed..3a26e6738 100644
--- a/eclass/boinc-app.eclass
+++ b/eclass/boinc-app.eclass
@@ -80,20 +80,33 @@ in order to use this application with BOINC.}
 # @FUNCTION: boinc-app_add_deps
 # @USAGE: [--wrapper]
 # @DESCRIPTION:
-# Generate appropriate (R)DEPEND for wrapper-enabled or
+# Generate appropriate IUSE and (R)DEPEND for wrapper-enabled or
 # native application.
+#
+# If BOINC_APP_OPTIONAL is set to a non-null value, dependencies
+# will be added for "boinc" USE-flag.
 boinc-app_add_deps() {
 	debug-print-function ${FUNCNAME} "${@}"
 
-	if [[ $1 == "--wrapper" ]]; then
-		RDEPEND="sci-misc/boinc-wrapper"
+	local depend rdepend
+	if [[ ${1} == "--wrapper" ]]; then
+		rdepend="sci-misc/boinc-wrapper"
 	else
-		DEPEND="sci-misc/boinc"
-		RDEPEND="sci-misc/boinc"
+		depend="sci-misc/boinc"
+		rdepend="sci-misc/boinc"
 	fi
 
-	DEPEND="${DEPEND} acct-user/boinc"
-	RDEPEND="${RDEPEND} acct-user/boinc"
+	depend+=" acct-user/boinc"
+	rdepend+=" acct-user/boinc"
+
+	if [[ ${BOINC_APP_OPTIONAL} ]]; then
+		IUSE+=" boinc"
+		DEPEND+=" boinc? ( ${depend} )"
+		RDEPEND+=" boinc? ( ${rdepend} )"
+	else
+		DEPEND+=" ${depend}"
+		RDEPEND+=" ${rdepend}"
+	fi
 }
 
 # @FUNCTION: boinc_master_url_check


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2024-07-14  7:27 Anna Vyalkova
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Vyalkova @ 2024-07-14  7:27 UTC (permalink / raw
  To: gentoo-commits

commit:     85e5d892dc80013893de85f9358db176b9757c5c
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Tue Jul  9 15:24:55 2024 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Sun Jul 14 07:22:18 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=85e5d892

boinc-app.eclass: rename boinc-wrapper_foreach_wrapper_job

This shouldn't have been like this in the first place. I must've been
really sleepy when I was writing this eclass.

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 eclass/boinc-app.eclass | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/eclass/boinc-app.eclass b/eclass/boinc-app.eclass
index 6a386bf2f..689be4992 100644
--- a/eclass/boinc-app.eclass
+++ b/eclass/boinc-app.eclass
@@ -221,19 +221,19 @@ doappinfo() {
 	_boinc-app_fix_permissions
 }
 
-# @FUNCTION: boinc-wrapper_foreach_wrapper_job
-# @USAGE: <job.xml>
+# @FUNCTION: boinc-app_foreach_wrapper_job
+# @USAGE: <job>
 # @DESCRIPTION:
 # The default foreach_wrapper_job(). It replaces all occurences
 # of @PV@, @EPREFIX@ and @LIBDIR@ strings with their corresponding values.
-boinc-wrapper_foreach_wrapper_job() {
+boinc-app_foreach_wrapper_job() {
 	debug-print-function ${FUNCNAME} "${@}"
 
-	sed -i "$1" \
+	sed -i "${1:?}" \
 		-e "s:@PV@:${PV}:g" \
 		-e "s:@EPREFIX@:${EPREFIX}:g" \
 		-e "s:@LIBDIR@:$(get_libdir):g" \
-		|| die "$(basename "$1") sed failed"
+		|| die "$(basename "${1}") sed failed"
 }
 
 # @FUNCTION: boinc_install_wrapper
@@ -275,7 +275,7 @@ boinc_install_wrapper() {
 	if declare -f foreach_wrapper_job >/dev/null; then
 		foreach_wrapper_job "${T:?}/${job_dest:?}"
 	else
-		boinc-wrapper_foreach_wrapper_job "${T:?}/${job_dest:?}"
+		boinc-app_foreach_wrapper_job "${T:?}/${job_dest:?}"
 	fi
 
 	( # subshell to avoid pollution of calling environment


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2024-07-14  7:27 Anna Vyalkova
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Vyalkova @ 2024-07-14  7:27 UTC (permalink / raw
  To: gentoo-commits

commit:     3a44a689c61265e859ff37a535c2c87a2359757d
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Tue Jul  9 15:38:31 2024 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Sun Jul 14 07:22:19 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=3a44a689

boinc-app.eclass: allow non-standard runtime dir

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 eclass/boinc-app.eclass | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/eclass/boinc-app.eclass b/eclass/boinc-app.eclass
index a20c800cb..00ffd39ed 100644
--- a/eclass/boinc-app.eclass
+++ b/eclass/boinc-app.eclass
@@ -71,6 +71,12 @@ if [[ ! ${_BOINC_APP_ECLASS} ]]; then
 You have to attach to the corresponding project
 in order to use this application with BOINC.}
 
+# @ECLASS_VARIABLE: BOINC_RUNTIMEDIR
+# @USER_VARIABLE
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# Directory with BOINC runtime data.
+
 # @FUNCTION: boinc-app_add_deps
 # @USAGE: [--wrapper]
 # @DESCRIPTION:
@@ -104,11 +110,9 @@ boinc_master_url_check() {
 
 # @FUNCTION: get_boincdir
 # @USAGE:
-# @RETURN: non-prefixed default BOINC runtime directory
+# @RETURN: non-prefixed BOINC runtime directory
 get_boincdir() {
-	debug-print-function ${FUNCNAME} "${@}"
-
-	echo /var/lib/boinc
+	echo "${BOINC_RUNTIMEDIR:-/var/lib/boinc}"
 }
 
 # @FUNCTION: get_project_dirname


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2024-07-14  7:27 Anna Vyalkova
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Vyalkova @ 2024-07-14  7:27 UTC (permalink / raw
  To: gentoo-commits

commit:     a681b42cacb145c2aa008c9ca8be15e89f3ac5a5
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Tue Jul  9 15:33:40 2024 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Sun Jul 14 07:22:19 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=a681b42c

boinc-app.eclass: rename doappinfo → boinc_install_appinfo

Use the same naming style as in "boinc_install_wrapper".

"doappinfo" is kept for compatibility but deprecated and will be
removed sooner or later.

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 eclass/boinc-app.eclass | 31 ++++++++++++++++++++-----------
 1 file changed, 20 insertions(+), 11 deletions(-)

diff --git a/eclass/boinc-app.eclass b/eclass/boinc-app.eclass
index 689be4992..a20c800cb 100644
--- a/eclass/boinc-app.eclass
+++ b/eclass/boinc-app.eclass
@@ -173,8 +173,8 @@ boinc-app_appinfo_prepare() {
 		|| die "app_info.xml sed failed"
 }
 
-# @FUNCTION: doappinfo
-# @USAGE: <app_info.xml>
+# @FUNCTION: boinc_install_appinfo
+# @USAGE: <app_info>
 # @DESCRIPTION:
 # Installs given app_info.xml file to the project root.
 #
@@ -191,36 +191,45 @@ boinc-app_appinfo_prepare() {
 # }
 #
 # src_install() {
-# 	doappinfo "${FILESDIR}"/app_info_${PV}.xml
+# 	boinc_install_appinfo "${FILESDIR}"/app_info_1.0.xml
 #
 #	exeinto $(get_project_root)
 # 	exeopts -m 0755 --owner root --group boinc
-# 	newexe bin/${PN} example_app_v${PV}
+# 	newexe bin/${PN} example_app_v1.0
 # }
 # @CODE
-doappinfo() {
+boinc_install_appinfo() {
 	debug-print-function ${FUNCNAME} "${@}"
 
 	(( $# == 1 )) || \
 		die "${FUNCNAME} takes exactly one argument"
 
-	cp "$1" "${T}"/app_info.xml || die
+	cp "${1:?}" "${T:?}"/app_info.xml || die
 
 	if declare -f appinfo_prepare >/dev/null; then
-		appinfo_prepare "${T}"/app_info.xml
+		appinfo_prepare "${T:?}"/app_info.xml
 	else
-		boinc-app_appinfo_prepare "${T}"/app_info.xml
+		boinc-app_appinfo_prepare "${T:?}"/app_info.xml
 	fi
 
 	( # subshell to avoid pollution of calling environment
-		insinto $(get_project_root)
+		insinto "$(get_project_root)"
 		insopts -m 0644 --owner root --group boinc
-		doins "${T}"/app_info.xml
+		doins "${T:?}"/app_info.xml
 	) || die "failed to install app_info.xml"
 
 	_boinc-app_fix_permissions
 }
 
+# @FUNCTION: doappinfo
+# @DEPRECATED: boinc_install_appinfo
+# @USAGE: <app_info>
+# @DESCRIPTION:
+# Installs given app_info.xml file to the project root.
+doappinfo() {
+	boinc_install_appinfo "${@}"
+}
+
 # @FUNCTION: boinc-app_foreach_wrapper_job
 # @USAGE: <job>
 # @DESCRIPTION:
@@ -256,7 +265,7 @@ boinc-app_foreach_wrapper_job() {
 # 	meson_src_install
 #
 # 	boinc_install_wrapper boinc-example_wrapper "${FILESDIR}"/job.xml
-#	doappinfo "${FILESDIR}"/app_info_${PV}.xml
+#	boinc_install_appinfo "${FILESDIR}"/app_info_1.0.xml
 # }
 # @CODE
 #


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2024-07-14  7:27 Anna Vyalkova
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Vyalkova @ 2024-07-14  7:27 UTC (permalink / raw
  To: gentoo-commits

commit:     9cd4309b1e2f97a9d037a365639b8cb2049a26f0
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Fri Jul 12 08:54:47 2024 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Sun Jul 14 07:22:20 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=9cd4309b

boinc-app.eclass: remove excess and fix style

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 eclass/boinc-app.eclass | 56 +++++++++++++++++++------------------------------
 1 file changed, 21 insertions(+), 35 deletions(-)

diff --git a/eclass/boinc-app.eclass b/eclass/boinc-app.eclass
index f6fb82034..822c84397 100644
--- a/eclass/boinc-app.eclass
+++ b/eclass/boinc-app.eclass
@@ -26,6 +26,7 @@ case ${EAPI} in
 esac
 
 # @ECLASS_VARIABLE: BOINC_APP_OPTIONAL
+# @PRE_INHERIT
 # @DEFAULT_UNSET
 # @DESCRIPTION:
 # If set to a non-null value, BOINC part in the ebuild will be
@@ -55,6 +56,7 @@ if [[ ! ${_BOINC_APP_ECLASS} ]]; then
 # it's published on project's website.
 
 # @ECLASS_VARIABLE: HOMEPAGE
+# @OUTPUT_VARIABLE
 # @DESCRIPTION:
 # This variable defines the HOMEPAGE for BOINC projects if BOINC_MASTER_URL
 # was set before inherit.
@@ -105,20 +107,7 @@ boinc-app_add_deps() {
 	fi
 }
 
-# @FUNCTION: boinc_master_url_check
-# @USAGE:
-# @DESCRIPTION:
-# Make sure BOINC_MASTER_URL has a value.
-boinc_master_url_check() {
-	debug-print-function ${FUNCNAME} "${@}"
-
-	[[ -n ${BOINC_MASTER_URL} ]] || \
-		die "BOINC_MASTER_URL is not set"
-	return 0
-}
-
 # @FUNCTION: get_boincdir
-# @USAGE:
 # @RETURN: non-prefixed BOINC runtime directory
 get_boincdir() {
 	echo "${BOINC_RUNTIMEDIR:-/var/lib/boinc}"
@@ -126,7 +115,6 @@ get_boincdir() {
 
 # @FUNCTION: get_project_dirname
 # @INTERNAL
-# @USAGE:
 # @RETURN: project's dirname, derived from BOINC_MASTER_URL
 # @DESCRIPTION:
 # Example:
@@ -137,9 +125,8 @@ get_boincdir() {
 # -> boinc.berkeley.edu_example
 # @CODE
 get_project_dirname() {
-	debug-print-function ${FUNCNAME} "${@}"
-
-	boinc_master_url_check
+	[[ ${BOINC_MASTER_URL} ]] || \
+		die "BOINC_MASTER_URL is not set"
 
 	local dirname
 	dirname=${BOINC_MASTER_URL#*://}	# strip http[s]://
@@ -150,16 +137,12 @@ get_project_dirname() {
 }
 
 # @FUNCTION: get_project_root
-# @USAGE:
 # @RETURN: non-prefixed directory where applications and files should be installed
 get_project_root() {
-	debug-print-function ${FUNCNAME} "${@}"
-
 	echo "$(get_boincdir)/projects/$(get_project_dirname)"
 }
 
 # @FUNCTION: _boinc-app_fix_permissions
-# @USAGE:
 # @INTERNAL
 # @DESCRIPTION:
 # Fix owner and permissions for the project root.
@@ -174,14 +157,17 @@ _boinc-app_fix_permissions() {
 }
 
 # @FUNCTION: boinc-app_appinfo_prepare
-# @USAGE: <writable app_info.xml>
+# @USAGE: <app_info>
 # @DESCRIPTION:
 # The default appinfo_prepare(). It replaces all occurences
 # of @PV@ with its corresponding value.
 boinc-app_appinfo_prepare() {
 	debug-print-function ${FUNCNAME} "${@}"
 
-	sed -i "$1" \
+	(( $# == 1 )) || \
+		die "${FUNCNAME} takes exactly one argument"
+
+	sed -i "${1:?}" \
 		-e "s:@PV@:${PV}:g" \
 		|| die "app_info.xml sed failed"
 }
@@ -251,6 +237,9 @@ doappinfo() {
 boinc-app_foreach_wrapper_job() {
 	debug-print-function ${FUNCNAME} "${@}"
 
+	(( $# == 1 )) || \
+		die "${FUNCNAME} takes exactly one argument"
+
 	sed -i "${1:?}" \
 		-e "s:@PV@:${PV}:g" \
 		-e "s:@EPREFIX@:${EPREFIX}:g" \
@@ -327,16 +316,13 @@ boinc-app_pkg_postinst() {
 	debug-print-function ${FUNCNAME} "${@}"
 
 	if [[ -f "${EROOT}/$(get_boincdir)/master_$(get_project_dirname).xml" ]]; then
-		if [[ -z ${REPLACING_VERSIONS} ]]; then
+		if [[ ! ${REPLACING_VERSIONS} ]]; then
 			# most likely replacing applications downloaded
 			# by the BOINC client from project's website
 			elog "Restart the BOINC daemon for changes to take place:"
 			elog "# rc-service boinc restart"
-			return
-		else
-			# applications are already in use
-			return
 		fi
+		return
 	fi
 
 	elog
@@ -347,10 +333,10 @@ boinc-app_pkg_postinst() {
 
 	if [[ ! ${BOINC_INVITATION_CODE} ]]; then
 		elog "# rc-service boinc attach"
-		elog "    Enter the Project URL: ${BOINC_MASTER_URL}"
+		elog "    Enter the Project URL: ${BOINC_MASTER_URL:?}"
 	else
-		elog "- Master URL: ${BOINC_MASTER_URL}"
-		elog "- Invitation code: ${BOINC_INVITATION_CODE}"
+		elog "- Master URL: ${BOINC_MASTER_URL:?}"
+		elog "- Invitation code: ${BOINC_INVITATION_CODE:?}"
 	fi
 }
 
@@ -361,17 +347,17 @@ boinc-app_pkg_postinst() {
 boinc-app_pkg_postrm() {
 	debug-print-function ${FUNCNAME} "${@}"
 
-	if [[ -z ${REPLACED_BY_VERSION} ]]; then
+	if [[ ! ${REPLACED_BY_VERSION} ]]; then
 		local gui_rpc_auth="$(get_boincdir)/gui_rpc_auth.cfg"
 		local passwd=$(cat "${EROOT}/${gui_rpc_auth}" 2>/dev/null)
-		if [[ -z ${passwd} ]]; then
-			passwd="\$(cat ${gui_rpc_auth})"
+		if [[ ! ${passwd?} ]]; then
+			passwd="\$(cat ${gui_rpc_auth:?})"
 		fi
 
 		elog "You should detach this project from the BOINC client"
 		elog "to stop current tasks and delete remaining project files:"
 		elog
-		elog "$ boinccmd --passwd ${passwd} --project ${BOINC_MASTER_URL} detach"
+		elog "$ boinccmd --passwd ${passwd:?} --project ${BOINC_MASTER_URL:?} detach"
 		elog
 	fi
 }


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2024-07-14 17:47 Florian Schmaus
  0 siblings, 0 replies; 180+ messages in thread
From: Florian Schmaus @ 2024-07-14 17:47 UTC (permalink / raw
  To: gentoo-commits

commit:     67b1548e18d6992c799a97ed4401a0c6cc6ad5ed
Author:     Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Sun Jul 14 17:46:57 2024 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Sun Jul 14 17:46:57 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=67b1548e

rebar3.eclass: drop rebar3.eclass, now in ::gentoo

Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 eclass/rebar3.eclass | 295 ---------------------------------------------------
 1 file changed, 295 deletions(-)

diff --git a/eclass/rebar3.eclass b/eclass/rebar3.eclass
deleted file mode 100644
index 4104bdcf6..000000000
--- a/eclass/rebar3.eclass
+++ /dev/null
@@ -1,295 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-# @ECLASS: rebar3.eclass
-# @MAINTAINER:
-# Anna (cybertailor) Vyalkova <cyber+gentoo@sysrq.in>
-# @AUTHOR:
-# Amadeusz Żołnowski <aidecoe@gentoo.org>
-# @SUPPORTED_EAPIS: 8
-# @BLURB: Build Erlang/OTP projects using dev-util/rebar:3.
-# @DESCRIPTION:
-# An eclass providing functions to build Erlang/OTP projects using
-# dev-util/rebar:3.
-#
-# rebar is a tool which tries to resolve dependencies itself which is by
-# cloning remote git repositories. Dependent projects are usually expected to
-# be in sub-directory 'deps' rather than looking at system Erlang lib
-# directory. Projects relying on rebar usually don't have 'install' make
-# targets. The eclass workarounds some of these problems. It handles
-# installation in a generic way for Erlang/OTP structured projects.
-
-case ${EAPI} in
-	8) ;;
-	*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
-esac
-
-if [[ -z ${_REBAR3_ECLASS} ]]; then
-
-inherit edo
-
-RDEPEND="dev-lang/erlang:="
-DEPEND="${RDEPEND}"
-BDEPEND="
-	dev-util/rebar:3
-	>=sys-apps/gawk-4.1
-"
-
-# @ECLASS_VARIABLE: REBAR_PROFILE
-# @DESCRIPTION:
-# Rebar profile to use.
-: "${REBAR_PROFILE:=default}"
-
-# @ECLASS_VARIABLE: REBAR_APP_SRC
-# @DESCRIPTION:
-# Relative path to .app.src description file.
-: "${REBAR_APP_SRC:=src/${PN}.app.src}"
-
-# @FUNCTION: get_erl_libs
-# @RETURN: the path to Erlang lib directory
-# @DESCRIPTION:
-# Get the full path without EPREFIX to Erlang lib directory.
-get_erl_libs() {
-	echo "/usr/$(get_libdir)/erlang/lib"
-}
-
-# @FUNCTION: _rebar_find_dep
-# @INTERNAL
-# @USAGE: <project_name>
-# @RETURN: 0 success, 1 dependency not found, 2 multiple versions found
-# @DESCRIPTION:
-# Find a Erlang package/project by name in Erlang lib directory. Project
-# directory is usually suffixed with version. It is matched to '<project_name>'
-# or '<project_name>-*'.
-_rebar_find_dep() {
-	local pn="${1}"
-	local p
-	local result
-
-	pushd "${EPREFIX}/$(get_erl_libs)" >/dev/null || return 1
-	for p in ${pn} ${pn}-*; do
-		if [[ -d ${p} ]]; then
-			# Ensure there's at most one matching.
-			[[ ${result} ]] && return 2
-			result="${p}"
-		fi
-	done
-	popd >/dev/null || die
-
-	[[ ${result} ]] || return 1
-	echo "${result}"
-}
-
-# @FUNCTION: rebar_disable_coverage
-# @USAGE: [<rebar_config>]
-# @DESCRIPTION:
-# Disable coverage in rebar.config. This is a workaround for failing coverage.
-# Coverage is not relevant in this context, so there's no harm to disable it,
-# although the issue should be fixed.
-rebar_disable_coverage() {
-	debug-print-function ${FUNCNAME} "${@}"
-
-	local rebar_config="${1:-rebar.config}"
-
-	sed -e 's/{cover_enabled, true}/{cover_enabled, false}/' \
-		-i "${rebar_config}" \
-		|| die "failed to disable coverage in ${rebar_config}"
-}
-
-# @FUNCTION: erebar3
-# @USAGE: <targets>
-# @DESCRIPTION:
-# Run rebar with verbose flag. Die on failure.
-erebar3() {
-	debug-print-function ${FUNCNAME} "${@}"
-
-	(( $# > 0 )) || die "erebar: at least one target is required"
-
-	case ${1} in
-		eunit|ct)
-			local -x ERL_LIBS="." ;;
-		*)
-			local -x ERL_LIBS="${EPREFIX}/$(get_erl_libs)" ;;
-	esac
-
-	edo rebar3 "$@"
-}
-
-# @FUNCTION: rebar_fix_include_path
-# @USAGE: <project_name> [<rebar_config>]
-# @DESCRIPTION:
-# Fix path in rebar.config to 'include' directory of dependent project/package,
-# so it points to installation in system Erlang lib rather than relative 'deps'
-# directory.
-#
-# <rebar_config> is optional. Default is 'rebar.config'.
-#
-# The function dies on failure.
-rebar_fix_include_path() {
-	debug-print-function ${FUNCNAME} "${@}"
-
-	local pn="${1}"
-	local rebar_config="${2:-rebar.config}"
-	local erl_libs="${EPREFIX}/$(get_erl_libs)"
-	local p
-
-	p="$(_rebar_find_dep "${pn}")" \
-		|| die "failed to unambiguously resolve dependency of '${pn}'"
-
-	gawk -i inplace \
-		-v erl_libs="${erl_libs}" -v pn="${pn}" -v p="${p}" '
-/^{[[:space:]]*erl_opts[[:space:]]*,/, /}[[:space:]]*\.$/ {
-	pattern = "\"(./)?deps/" pn "/include\"";
-	if (match($0, "{i,[[:space:]]*" pattern "[[:space:]]*}")) {
-		sub(pattern, "\"" erl_libs "/" p "/include\"");
-	}
-	print $0;
-	next;
-}
-1
-' "${rebar_config}" || die "failed to fix include paths in ${rebar_config} for '${pn}'"
-}
-
-# @FUNCTION: rebar_remove_deps
-# @USAGE: [<rebar_config>]
-# @DESCRIPTION:
-# Remove dependencies list from rebar.config and deceive build rules that any
-# dependencies are already fetched and built. Otherwise rebar tries to fetch
-# dependencies and compile them.
-#
-# <rebar_config> is optional. Default is 'rebar.config'.
-#
-# The function dies on failure.
-rebar_remove_deps() {
-	debug-print-function ${FUNCNAME} "${@}"
-
-	local rebar_config="${1:-rebar.config}"
-
-	mkdir -p "${S}/deps" && :>"${S}/deps/.got" && :>"${S}/deps/.built" || die
-	gawk -i inplace '
-/^{[[:space:]]*deps[[:space:]]*,/, /}[[:space:]]*\.$/ {
-	if ($0 ~ /}[[:space:]]*\.$/) {
-		print "{deps, []}.";
-	}
-	next;
-}
-1
-' "${rebar_config}" || die "failed to remove deps from ${rebar_config}"
-}
-
-# @FUNCTION: rebar_set_vsn
-# @USAGE: [<version>]
-# @DESCRIPTION:
-# Set version in project description file if it's not set.
-#
-# <version> is optional. Default is PV stripped from version suffix.
-#
-# The function dies on failure.
-rebar_set_vsn() {
-	debug-print-function ${FUNCNAME} "${@}"
-
-	local version="${1:-${PV%_*}}"
-
-	sed -e "s/vsn, git/vsn, \"${version}\"/" \
-		-i "${S}/${REBAR_APP_SRC}" \
-		|| die "failed to set version in src/${PN}.app.src"
-}
-
-# @FUNCTION: rebar3_src_prepare
-# @DESCRIPTION:
-# Prevent rebar from fetching and compiling dependencies. Set version in
-# project description file if it's not set.
-#
-# Existence of rebar.config is optional, but file description file must exist
-# at 'src/${PN}.app.src'.
-rebar3_src_prepare() {
-	debug-print-function ${FUNCNAME} "${@}"
-
-	default_src_prepare
-	rebar_set_vsn
-	rm -f rebar.lock
-	if [[ -f rebar.config ]]; then
-		rebar_disable_coverage
-		rebar_remove_deps
-	fi
-}
-
-# @FUNCTION: rebar3_src_configure
-# @DESCRIPTION:
-# Configure with ERL_LIBS set.
-rebar3_src_configure() {
-	debug-print-function ${FUNCNAME} "${@}"
-
-	local -x ERL_LIBS="${EPREFIX}/$(get_erl_libs)"
-	default_src_configure
-}
-
-# @FUNCTION: rebar3_src_compile
-# @DESCRIPTION:
-# Compile project with rebar.
-rebar3_src_compile() {
-	debug-print-function ${FUNCNAME} "${@}"
-
-	erebar3 as "${REBAR_PROFILE}" release --all
-}
-
-# @FUNCTION: rebar3_src_test
-# @DESCRIPTION:
-# Run unit tests.
-rebar3_src_test() {
-	debug-print-function ${FUNCNAME} "${@}"
-
-	erebar3 eunit -v
-}
-
-# @FUNCTION: rebar3_install_lib
-# @USAGE: <dir>
-# @DESCRIPTION:
-# Install BEAM files, include headers and native libraries.
-#
-# Function expects that project conforms to Erlang/OTP structure.
-rebar3_install_lib() {
-	debug-print-function ${FUNCNAME} "${@}"
-
-	local dest="$(get_erl_libs)/${P}"
-	insinto "${dest}"
-
-	pushd "${1?}" >/dev/null || die
-	for dir in ebin include priv; do
-		if [[ -d ${dir} && ! -L ${dir} ]]; then
-			cp -pR ${dir} "${ED%/}/${dest}/" || die "failed to install ${dir}/"
-		fi
-	done
-	popd >/dev/null || die
-}
-
-# @FUNCTION: rebar3_src_install
-# @DESCRIPTION:
-# Install built release or library.
-#
-# Function expects that project conforms to Erlang/OTP structure.
-rebar3_src_install() {
-	debug-print-function ${FUNCNAME} "${@}"
-
-	pushd "_build/${REBAR_PROFILE}" >/dev/null || die
-	if [[ -d rel/${PN} ]]; then
-		if ! declare -f rebar3_install_release >/dev/null; then
-			die "${FUNCNAME}: a custom function named 'rebar3_install_release' is required to install a release"
-		fi
-		pushd rel/${PN} >/dev/null || die
-		rebar3_install_release || die
-		popd >/dev/null || die
-	elif [[ -d lib/${PN} ]]; then
-		rebar3_install_lib lib/${PN}
-	else
-		die "No releases or libraries to install"
-	fi
-	popd >/dev/null || die
-
-	einstalldocs
-}
-
-_REBAR3_ECLASS=1
-fi
-
-EXPORT_FUNCTIONS src_prepare src_compile src_test src_install


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2024-10-18 14:25 Anna Vyalkova
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Vyalkova @ 2024-10-18 14:25 UTC (permalink / raw
  To: gentoo-commits

commit:     ea3ff719b1395d31235029ef86ae290a5872382c
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Wed Oct 16 10:15:51 2024 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Fri Oct 18 14:24:18 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=ea3ff719

boinc-app.eclass: replace symlink with shell wrapper

Closes: https://bugs.gentoo.org/941384
Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

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

diff --git a/eclass/boinc-app.eclass b/eclass/boinc-app.eclass
index 822c84397..1658315cc 100644
--- a/eclass/boinc-app.eclass
+++ b/eclass/boinc-app.eclass
@@ -88,6 +88,7 @@ boinc-app_add_deps() {
 
 	local depend rdepend
 	if [[ ${1} == "--wrapper" ]]; then
+		inherit wrapper
 		rdepend="sci-misc/boinc-wrapper"
 	else
 		depend="sci-misc/boinc"
@@ -258,8 +259,8 @@ boinc-app_foreach_wrapper_job() {
 #
 # 1. Installs A.xml in the project's root directory, renaming it to B.xml
 #
-# 2. Installs boinc-example_wrapper symlink, which points
-#    to /usr/bin/boinc-wrapper, in the project's root directory
+# 2. Installs boinc-example_wrapper shell script, which executes
+#    /usr/bin/boinc-wrapper, in the project's root directory
 #
 # Example:
 # @CODE
@@ -296,7 +297,9 @@ boinc_install_wrapper() {
 	) || die "failed to install ${exe:?} wrapper job"
 	rm -f "${T:?}/${job_dest:?}"
 
-	dosym -r /usr/bin/boinc-wrapper "$(get_project_root)/${exe:?}"
+	# Make a shell wrapper instead of symlink to pass filesize validation on
+	# updates, bug 941384
+	make_wrapper "${exe:?}" /usr/bin/boinc-wrapper "" "" "$(get_project_root)"
 	_boinc-app_fix_permissions
 }
 


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2024-11-26 14:15 Anna Vyalkova
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Vyalkova @ 2024-11-26 14:15 UTC (permalink / raw
  To: gentoo-commits

commit:     b46a0711d4d5f8b70721f96869f38bc8a8e4f229
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Sat Nov 23 07:21:47 2024 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Tue Nov 26 14:14:45 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=b46a0711

click-app.eclass: new eclass

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 eclass/click-app.eclass | 129 ++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 129 insertions(+)

diff --git a/eclass/click-app.eclass b/eclass/click-app.eclass
new file mode 100644
index 000000000..d429e8128
--- /dev/null
+++ b/eclass/click-app.eclass
@@ -0,0 +1,129 @@
+# Copyright 2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# @ECLASS: click-app.eclass
+# @MAINTAINER:
+# Anna <cyber+gentoo@sysrq.in>
+# @AUTHOR:
+# Anna <cyber+gentoo@sysrq.in>
+# @SUPPORTED_EAPIS: 8
+# @BLURB: eclass for Click-based Python applications
+# @DESCRIPTION:
+# This eclass provides a streamlined way to generate and install shell
+# completions for Python applications based on the Click library
+# (dev-python/click package).
+
+case ${EAPI} in
+	8) ;;
+	*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
+esac
+
+if [[ ! ${_CLICK_APP_ECLASS} ]]; then
+_CLICK_APP_ECLASS=1
+
+inherit distutils-r1 shell-completion
+
+# @FUNCTION: click-app_enable_completions
+# @USAGE: <script...>
+# @DESCRIPTION:
+# Set up IUSE, BDEPEND and python_install() to generate and install shell
+# completions for the given scripts.
+#
+# This function does not overwrite python_install() if it is already defined.
+# If you need to extend python_install(), you can call the original
+# implementation as click-app_python_install.
+#
+# This function must be called in global scope.
+#
+# See also: https://click.palletsprojects.com/en/stable/shell-completion/
+click-app_enable_completions() {
+	debug-print-function "${FUNCNAME}" "${@}"
+	(( $# >= 1 )) ||
+		die "${FUNCNAME} takes at least one argument"
+
+	IUSE+=" bash-completion"
+	BDEPEND+=" bash-completion? ( ${RDEPEND} )"
+
+	readonly -a _CLICK_SHELLCOMP_SCRIPTS=( "${@}" )
+
+	click-app_python_install() {
+		debug-print-function "${FUNCNAME}" "${@}"
+		use bash-completion || return 0
+
+		local script_name
+		for script_name in "${_CLICK_SHELLCOMP_SCRIPTS[@]?}"; do
+			click_install_completions "${script_name:?}"
+		done
+	}
+
+	if ! declare -f python_install; then
+		python_install() {
+			click-app_python_install
+			distutils-r1_python_install
+		}
+	fi
+
+	# we need to ensure successful return in case we're called last,
+	# otherwise Portage may wrongly assume sourcing failed
+	return 0
+}
+
+# @FUNCTION: click-app_python_install
+# @USAGE: <script...>
+# @DESCRIPTION:
+# Generate and install shell completions for the given scripts.
+#
+# Note that this function checks if USE="bash-completion" is enabled, and if
+# not automatically exits. Therefore, there is no need to wrap this function
+# in an "if" statement.
+#
+# This function needs to be called before distutils-r1_python_install.
+
+# @FUNCTION: click_install_completions
+# @USAGE: <script>
+# @DESCRIPTION:
+# Generate and install shell completions for a single script.
+#
+# Note that if a shell completions directory already exists in the install tree,
+# generation and installation steps will be skipped for this shell.
+#
+# This function needs to be called before distutils-r1_python_install.
+click_install_completions() {
+	debug-print-function "${FUNCNAME}" "${@}"
+	(( $# == 1 )) ||
+		die "${FUNCNAME} takes exactly one argument"
+
+	_gen_click_completions() {
+		local shell=${1:?}
+
+		echo "${env_var_name:?}=${shell:?}_source ${script_path:?}" >&2
+		local -x "${env_var_name:?}"="${shell:?}_source" || die
+		"${script_path:?}" || die
+	}
+
+	local env_var_name script_name script_path
+
+	script_name=${1:?}
+	script_path="${BUILD_DIR}/install${EPREFIX}/usr/bin/${script_name:?}"
+	[[ -f "${script_path}" ]] ||
+		die "${script_path} not found, click_install_completions call wrong"
+
+	# convert to screaming snake case
+	env_var_name="_${script_name:?}_COMPLETE"
+	env_var_name=${env_var_name^^}
+	env_var_name=${env_var_name//-/_}
+
+	if [[ ! -d "${D}/$(get_bashcompdir)" ]]; then
+		_gen_click_completions bash | newbashcomp - "${script_name:?}"
+	fi
+	if [[ ! -d "${D}/$(get_fishcompdir)" ]]; then
+		_gen_click_completions fish | newfishcomp - "${script_name:?}.fish"
+	fi
+	if [[ ! -d "${D}/$(get_zshcompdir)" ]]; then
+		_gen_click_completions zsh | newzshcomp - "_${script_name:?}"
+	fi
+
+	unset -f _gen_click_completions
+}
+
+fi


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

* [gentoo-commits] repo/proj/guru:dev commit in: eclass/
@ 2024-11-28 10:44 Anna Vyalkova
  0 siblings, 0 replies; 180+ messages in thread
From: Anna Vyalkova @ 2024-11-28 10:44 UTC (permalink / raw
  To: gentoo-commits

commit:     3ea657b97867275c824987876c95dc53eb0ce4fe
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Thu Nov 28 09:26:28 2024 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Thu Nov 28 10:44:31 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=3ea657b9

crystal-utils.eclass: enable full error trace

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 eclass/crystal-utils.eclass | 1 +
 1 file changed, 1 insertion(+)

diff --git a/eclass/crystal-utils.eclass b/eclass/crystal-utils.eclass
index 57325a993..fa57f3b80 100644
--- a/eclass/crystal-utils.eclass
+++ b/eclass/crystal-utils.eclass
@@ -96,6 +96,7 @@ crystal_configure() {
 
 	local args=(
 		--link-flags="\"${LDFLAGS}\""
+		--error-trace
 		--release
 		--progress
 		$(_crystal_get_debug_opt)


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

end of thread, other threads:[~2024-11-28 10:44 UTC | newest]

Thread overview: 180+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-01 11:32 [gentoo-commits] repo/proj/guru:master commit in: eclass/ Julien Roy
2024-04-01 11:18 ` [gentoo-commits] repo/proj/guru:dev " Julien Roy
  -- strict thread matches above, loose matches on Subject: below --
2024-11-28 10:44 Anna Vyalkova
2024-11-26 14:15 Anna Vyalkova
2024-10-18 14:25 Anna Vyalkova
2024-07-14 17:47 Florian Schmaus
2024-07-14  7:27 Anna Vyalkova
2024-07-14  7:27 Anna Vyalkova
2024-07-14  7:27 Anna Vyalkova
2024-07-14  7:27 Anna Vyalkova
2024-07-14  7:27 Anna Vyalkova
2024-07-14  7:27 Anna Vyalkova
2024-07-14  7:27 Anna Vyalkova
2024-07-01  2:10 Anna Vyalkova
2024-04-27  9:50 Anna Vyalkova
2024-03-31 17:57 [gentoo-commits] repo/proj/guru:master " Julien Roy
2024-03-31 17:49 ` [gentoo-commits] repo/proj/guru:dev " Julien Roy
2024-03-31 17:49 Julien Roy
2024-02-04 19:32 Anna Vyalkova
2024-02-04 19:32 Anna Vyalkova
2024-02-04 19:26 Anna Vyalkova
2024-02-04 19:26 Anna Vyalkova
2024-01-22 17:52 Anna Vyalkova
2024-01-22 10:54 Anna Vyalkova
2024-01-21 22:50 Anna Vyalkova
2024-01-20  7:12 Anna Vyalkova
2024-01-01 21:27 Anna Vyalkova
2023-10-05 13:10 David Roman
2023-10-04 20:53 Anna Figueiredo Gomes
2023-08-30  5:30 Viorel Munteanu
2023-08-07  5:59 Haelwenn Monnier
2023-08-06 12:22 Haelwenn Monnier
2023-08-04  7:26 Florian Schmaus
2023-08-04  7:26 Florian Schmaus
2023-07-17 14:24 [gentoo-commits] repo/proj/guru:master " Florian Schmaus
2023-07-17 14:24 ` [gentoo-commits] repo/proj/guru:dev " Florian Schmaus
2023-06-24 19:22 Haelwenn Monnier
2023-05-21 16:27 Anna Vyalkova
2023-05-21 16:27 Anna Vyalkova
2023-05-09 19:30 Anna Vyalkova
2023-05-09 15:43 Anna Vyalkova
2023-05-09 15:43 Anna Vyalkova
2023-05-09 15:43 Anna Vyalkova
2023-05-09 15:43 Anna Vyalkova
2023-05-08 16:45 Anna Vyalkova
2023-05-06 18:00 Anna Vyalkova
2023-05-06 17:52 Anna Vyalkova
2023-05-06 15:55 Anna Vyalkova
2023-04-12 18:44 Jonas Frei
2023-04-06 14:09 Anna Vyalkova
2023-04-06 14:09 Anna Vyalkova
2023-03-31 18:48 Anna Vyalkova
2023-03-31 18:48 Anna Vyalkova
2023-03-31 18:14 Jonas Frei
2023-02-27  3:42 Anna Vyalkova
2023-02-27  3:42 Anna Vyalkova
2023-01-15 15:14 Anna Figueiredo Gomes
2023-01-08  2:17 Anna Vyalkova
2022-12-08 17:02 Anna Figueiredo Gomes
2022-11-26 13:51 Anna Vyalkova
2022-11-26 13:51 Anna Vyalkova
2022-11-26 13:51 Anna Vyalkova
2022-11-26 13:51 Anna Vyalkova
2022-11-25 17:54 Anna Vyalkova
2022-11-25 11:37 Anna Vyalkova
2022-11-25 11:37 Anna Vyalkova
2022-11-25 11:37 Anna Vyalkova
2022-11-25 11:37 Anna Vyalkova
2022-11-25 11:37 Anna Vyalkova
2022-11-25 11:37 Anna Vyalkova
2022-11-25 11:37 Anna Vyalkova
2022-11-25 11:37 Anna Vyalkova
2022-11-25  2:44 Anna Figueiredo Gomes
2022-11-25  2:38 Anna Figueiredo Gomes
2022-11-16 15:09 Anna Vyalkova
2022-11-16 14:30 Anna Vyalkova
2022-11-16 14:30 Anna Vyalkova
2022-11-10  0:50 Anna Figueiredo Gomes
2022-11-09  9:25 Anna Vyalkova
2022-11-08 19:20 Anna Vyalkova
2022-11-08 17:55 Anna Vyalkova
2022-11-08 17:55 Anna Vyalkova
2022-11-05 14:41 Anna Vyalkova
2022-07-20  9:33 Anna Vyalkova
2022-07-19  6:33 Anna Vyalkova
2022-07-19  6:07 Anna Vyalkova
2022-07-19  6:07 Anna Vyalkova
2022-07-16 21:08 Anna Vyalkova
2022-07-16 13:44 Anna Vyalkova
2022-07-16 13:44 Anna Vyalkova
2022-07-16 13:44 Anna Vyalkova
2022-07-16 13:44 Anna Vyalkova
2022-07-16 13:44 Anna Vyalkova
2022-07-16 13:44 Anna Vyalkova
2022-07-13  2:31 Anna Vyalkova
2022-07-13  2:31 Anna Vyalkova
2022-07-13  2:31 Anna Vyalkova
2022-07-13  2:31 Anna Vyalkova
2022-07-13  2:31 Anna Vyalkova
2022-07-13  2:31 Anna Vyalkova
2022-07-13  2:31 Anna Vyalkova
2022-07-13  2:31 Anna Vyalkova
2022-07-13  2:31 Anna Vyalkova
2022-07-13  2:31 Anna Vyalkova
2022-07-13  2:31 Anna Vyalkova
2022-07-12 12:06 Robert Greener
2022-07-12 12:06 Robert Greener
2022-07-12 12:06 Robert Greener
2022-07-12 12:06 Robert Greener
2022-07-10  3:36 Anna Vyalkova
2022-07-05 20:09 Anna Vyalkova
2022-07-05 20:09 Anna Vyalkova
2022-07-05 20:09 Anna Vyalkova
2022-06-30  6:01 Anna Vyalkova
2022-06-30  6:01 Anna Vyalkova
2022-06-30  6:01 Anna Vyalkova
2022-06-29 11:52 Anna Vyalkova
2022-06-29 11:52 Anna Vyalkova
2022-06-26  2:36 Alessandro Barbieri
2022-06-25 19:42 Anna Vyalkova
2022-06-25 17:43 Anna Vyalkova
2022-06-25 17:43 Anna Vyalkova
2022-06-15 22:41 Alessandro Barbieri
2022-06-14  9:12 Alessandro Barbieri
2022-06-14  8:00 Alessandro Barbieri
2022-06-14  8:00 Alessandro Barbieri
2022-06-07  6:26 Anna Vyalkova
2022-06-02  1:23 Alessandro Barbieri
2022-06-02  1:23 Alessandro Barbieri
2022-05-31 13:14 Nicola Smaniotto
2022-05-28 21:19 Alessandro Barbieri
2022-05-11 11:29 Alessandro Barbieri
2022-05-08  1:58 Alessandro Barbieri
2022-05-07  7:25 Alessandro Barbieri
2022-05-07  2:11 Alessandro Barbieri
2022-05-07  2:11 Alessandro Barbieri
2022-05-07  2:11 Alessandro Barbieri
2022-05-07  0:48 Alessandro Barbieri
2022-05-07  0:48 Alessandro Barbieri
2022-05-06 16:34 Alessandro Barbieri
2022-05-05  7:32 Alessandro Barbieri
2022-05-05  7:32 Alessandro Barbieri
2022-05-05  7:32 Alessandro Barbieri
2022-04-24 16:46 Nicola Smaniotto
2022-04-19 18:31 Alessandro Barbieri
2022-04-16 16:20 Alessandro Barbieri
2022-04-15 20:34 Alessandro Barbieri
2022-04-15 20:34 Alessandro Barbieri
2022-04-14  9:26 Nicola Smaniotto
2022-04-11  9:41 Anna Vyalkova
2022-04-11  9:41 Anna Vyalkova
2022-04-11  9:41 Anna Vyalkova
2022-03-31  7:24 Anna Vyalkova
2022-02-17 21:11 Anna Vyalkova
2022-02-17 21:11 Anna Vyalkova
2021-10-05 21:24 Alessandro Barbieri
2021-09-29 13:14 Alessandro Barbieri
2021-09-29 13:08 Alessandro Barbieri
2021-09-08 10:46 Alessandro Barbieri
2021-07-25 18:15 Anna Vyalkova
2021-07-22  8:29 Anna Vyalkova
2021-07-22  8:29 Anna Vyalkova
2021-06-17 16:01 Alessandro Barbieri
2021-05-31 23:15 Alessandro Barbieri
2021-05-24 14:49 Alessandro Barbieri
2021-05-17 10:16 Alessandro Barbieri
2021-03-16  0:55 Alessandro Barbieri
2021-03-14 22:58 Alessandro Barbieri
2021-03-14 22:49 Alessandro Barbieri
2020-12-06 10:46 Andrew Ammerlaan
2020-05-06 23:36 Alessandro Barbieri
2020-05-06 23:36 Alessandro Barbieri
2020-05-01 11:45 Kurt Kanzenbach
2020-04-28  8:01 [gentoo-commits] repo/proj/guru:master " Andrew Ammerlaan
2020-04-28  8:00 ` [gentoo-commits] repo/proj/guru:dev " Andrew Ammerlaan
2020-04-28  7:44 [gentoo-commits] repo/proj/guru:master " Andrew Ammerlaan
2020-04-28  7:44 ` [gentoo-commits] repo/proj/guru:dev " Andrew Ammerlaan
2020-04-21 10:23 [gentoo-commits] repo/proj/guru:master " Andrew Ammerlaan
2020-04-21 10:22 ` [gentoo-commits] repo/proj/guru:dev " Andrew Ammerlaan
2020-04-21 10:20 [gentoo-commits] repo/proj/guru:master " Andrew Ammerlaan
2020-04-21 10:20 ` [gentoo-commits] repo/proj/guru:dev " Andrew Ammerlaan
2020-04-07  7:42 [gentoo-commits] repo/proj/guru:master " Andrew Ammerlaan
2020-04-06 19:36 ` [gentoo-commits] repo/proj/guru:dev " Andrew Ammerlaan
2020-04-07  7:42 [gentoo-commits] repo/proj/guru:master " Andrew Ammerlaan
2020-04-06 18:45 ` [gentoo-commits] repo/proj/guru:dev " Andrew Ammerlaan
2020-04-07  7:27 Andrew Ammerlaan
2020-04-07  7:16 Andrew Ammerlaan
2020-04-06 18:26 Andrew Ammerlaan

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