From 86aaf699516ed9815f3f8df4ae232603d8b6dadd Mon Sep 17 00:00:00 2001 From: Andrew Ammerlaan Date: Mon, 6 Apr 2020 20:13:07 +0200 Subject: [PATCH 01/15] 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 --- eclass/docs.eclass | 306 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 306 insertions(+) create mode 100644 eclass/docs.eclass diff --git a/eclass/docs.eclass b/eclass/docs.eclass new file mode 100644 index 0000000000..618d8a5043 --- /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 +# @AUTHOR: +# Author: Andrew Ammerlaan +# Based on the work of: Michał Górny +# @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 -setup and +# -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 From fc93a7a89a63b07e103b38e640185b510c18b7c3 Mon Sep 17 00:00:00 2001 From: Andrew Ammerlaan Date: Mon, 6 Apr 2020 20:44:36 +0200 Subject: [PATCH 02/15] eclass/docs: small fixes Package-Manager: Portage-2.3.96, Repoman-2.3.22 Signed-off-by: Andrew Ammerlaan --- eclass/docs.eclass | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eclass/docs.eclass b/eclass/docs.eclass index 618d8a5043..e3eaaa32b1 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; } From 764e4b954b8df8d9f1393fe514425c736f03aaf6 Mon Sep 17 00:00:00 2001 From: Andrew Ammerlaan Date: Mon, 6 Apr 2020 21:35:11 +0200 Subject: [PATCH 03/15] 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 --- eclass/docs.eclass | 38 +++++++++++++++++++++++--------------- 1 file changed, 23 insertions(+), 15 deletions(-) diff --git a/eclass/docs.eclass b/eclass/docs.eclass index e3eaaa32b1..2f243bd8f7 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 From 820111997c5e4f6347ece1f825743f8d30cfe555 Mon Sep 17 00:00:00 2001 From: Alessandro Barbieri Date: Tue, 7 Apr 2020 00:17:21 +0200 Subject: [PATCH 04/15] dev-python/schedule: treecleaned package Package-Manager: Portage-2.3.96, Repoman-2.3.22 Signed-off-by: Alessandro Barbieri --- dev-python/schedule/Manifest | 1 + dev-python/schedule/metadata.xml | 12 +++++++ dev-python/schedule/schedule-0.6.0-r1.ebuild | 35 ++++++++++++++++++++ dev-python/schedule/schedule-9999.ebuild | 35 ++++++++++++++++++++ 4 files changed, 83 insertions(+) create mode 100644 dev-python/schedule/Manifest create mode 100644 dev-python/schedule/metadata.xml create mode 100644 dev-python/schedule/schedule-0.6.0-r1.ebuild create mode 100644 dev-python/schedule/schedule-9999.ebuild diff --git a/dev-python/schedule/Manifest b/dev-python/schedule/Manifest new file mode 100644 index 0000000000..cfc14fdb0a --- /dev/null +++ b/dev-python/schedule/Manifest @@ -0,0 +1 @@ +DIST schedule-0.6.0.tar.gz 21671 BLAKE2B 6076aff0c906782e554175b7e90cfca1417a31170e99009caccb5cbe318b5eb1295b24dfe1835109aec78fee53b615e170f03a7ec4470f596a9a2775c1072d5f SHA512 48424707b57cbc7ce9440e1658784347b691a013552b9969fd95dd260efa2d8ba56b41920628540fc4ebebbc3dc78e8e919b83cfddfe9a3cc3d60ece6ef0998f diff --git a/dev-python/schedule/metadata.xml b/dev-python/schedule/metadata.xml new file mode 100644 index 0000000000..724ce6c0f6 --- /dev/null +++ b/dev-python/schedule/metadata.xml @@ -0,0 +1,12 @@ + + + + + python@gentoo.org + Python + + + dbader/schedule + schedule + + diff --git a/dev-python/schedule/schedule-0.6.0-r1.ebuild b/dev-python/schedule/schedule-0.6.0-r1.ebuild new file mode 100644 index 0000000000..dae9aea78e --- /dev/null +++ b/dev-python/schedule/schedule-0.6.0-r1.ebuild @@ -0,0 +1,35 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{6,7,8} ) + +inherit distutils-r1 + +DESCRIPTION="Python job scheduling for humans" +HOMEPAGE="https://github.com/dbader/schedule" + +if [[ ${PV} = 9999* ]]; then + EGIT_REPO_URI="https://github.com/dbader/schedule" + EGIT_BRANCH="master" + inherit git-r3 + KEYWORDS="" +else + SRC_URI="https://github.com/dbader/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64 ~arm ~arm64 ~x86" +fi + +LICENSE="MIT" +SLOT="0" + +RDEPEND="" +DEPEND=" + test? ( + >=dev-python/mock-2.0.0[${PYTHON_USEDEP}] + >=dev-python/pytest-3.0.3[${PYTHON_USEDEP}] + ) +" + +distutils_enable_tests pytest +distutils_enable_sphinx docs diff --git a/dev-python/schedule/schedule-9999.ebuild b/dev-python/schedule/schedule-9999.ebuild new file mode 100644 index 0000000000..dae9aea78e --- /dev/null +++ b/dev-python/schedule/schedule-9999.ebuild @@ -0,0 +1,35 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{6,7,8} ) + +inherit distutils-r1 + +DESCRIPTION="Python job scheduling for humans" +HOMEPAGE="https://github.com/dbader/schedule" + +if [[ ${PV} = 9999* ]]; then + EGIT_REPO_URI="https://github.com/dbader/schedule" + EGIT_BRANCH="master" + inherit git-r3 + KEYWORDS="" +else + SRC_URI="https://github.com/dbader/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64 ~arm ~arm64 ~x86" +fi + +LICENSE="MIT" +SLOT="0" + +RDEPEND="" +DEPEND=" + test? ( + >=dev-python/mock-2.0.0[${PYTHON_USEDEP}] + >=dev-python/pytest-3.0.3[${PYTHON_USEDEP}] + ) +" + +distutils_enable_tests pytest +distutils_enable_sphinx docs From 187761956445bd98a1b4ffa2ac5f20774f77f038 Mon Sep 17 00:00:00 2001 From: Alessandro Barbieri Date: Tue, 7 Apr 2020 03:08:19 +0200 Subject: [PATCH 05/15] dev-python/geopy: update metadata Signed-off-by: Alessandro Barbieri --- dev-python/geopy/metadata.xml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/dev-python/geopy/metadata.xml b/dev-python/geopy/metadata.xml index 01d58c2064..3ca0d23b37 100644 --- a/dev-python/geopy/metadata.xml +++ b/dev-python/geopy/metadata.xml @@ -1,10 +1,17 @@ - - python@gentoo.org - Python + + lssndrbarbieri@gmail.com + Alessandro Barbieri + +geopy is a Python 2 and 3 client for several popular geocoding web services. + +geopy makes it easy for Python developers to locate the coordinates of addresses, cities, countries, and landmarks across the globe using third-party geocoders and other data sources. + +geopy includes geocoder classes for the OpenStreetMap Nominatim, Google Geocoding API (V3), and many other geocoding services. The full list is available on the Geocoders doc section. Geocoder classes are located in geopy.geocoders. + geopy geopy From fe016a2327829901ccb083781d2d13b883e703b7 Mon Sep 17 00:00:00 2001 From: Alessandro Barbieri Date: Tue, 7 Apr 2020 03:09:30 +0200 Subject: [PATCH 06/15] dev-python/black: readd tests Signed-off-by: Alessandro Barbieri --- dev-python/black/black-19.10_beta0-r1.ebuild | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/dev-python/black/black-19.10_beta0-r1.ebuild b/dev-python/black/black-19.10_beta0-r1.ebuild index 14ec6c5458..11229b7fea 100644 --- a/dev-python/black/black-19.10_beta0-r1.ebuild +++ b/dev-python/black/black-19.10_beta0-r1.ebuild @@ -3,7 +3,7 @@ EAPI=7 -PYTHON_COMPAT=( python3_{6,7,8} ) +PYTHON_COMPAT=( python3_{6,7} ) DISTUTILS_USE_SETUPTOOLS=rdepend @@ -19,15 +19,12 @@ LICENSE="MIT" SLOT="0" KEYWORDS="~amd64 ~x86" -#aiohttp-cors being removed because no py3_7 support -RESTRICT="test" - -#DEPEND=" -# test? ( -# >=dev-python/aiohttp-3.3.2[${PYTHON_USEDEP}] -# dev-python/aiohttp-cors[${PYTHON_USEDEP}] -# ) -# +DEPEND=" + test? ( + >=dev-python/aiohttp-3.3.2[${PYTHON_USEDEP}] + dev-python/aiohttp-cors[${PYTHON_USEDEP}] + ) +" RDEPEND=" >=dev-python/appdirs-1.4[${PYTHON_USEDEP}] From 89a2186ccd48fbc7ef5327dd9f8db74c0fe8db89 Mon Sep 17 00:00:00 2001 From: Alessandro Barbieri Date: Tue, 7 Apr 2020 03:12:03 +0200 Subject: [PATCH 07/15] dev-python/schedule: update metadata Package-Manager: Portage-2.3.96, Repoman-2.3.22 Signed-off-by: Alessandro Barbieri --- dev-python/schedule/metadata.xml | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/dev-python/schedule/metadata.xml b/dev-python/schedule/metadata.xml index 724ce6c0f6..cb724418a1 100644 --- a/dev-python/schedule/metadata.xml +++ b/dev-python/schedule/metadata.xml @@ -1,12 +1,15 @@ - - python@gentoo.org - Python - - - dbader/schedule - schedule - + + lssndrbarbieri@gmail.com + Alessandro Barbieri + + +An in-process scheduler for periodic jobs that uses the builder pattern for configuration. Schedule lets you run Python functions (or any other callable) periodically at pre-determined intervals using a simple, human-friendly syntax. + + + dbader/schedule + schedule + From 3f28cf795fc4cc05e6bcc72f168d6fc3d585c376 Mon Sep 17 00:00:00 2001 From: Alessandro Barbieri Date: Tue, 7 Apr 2020 03:19:59 +0200 Subject: [PATCH 08/15] dev-python/httpcore: removed space Package-Manager: Portage-2.3.96, Repoman-2.3.22 Signed-off-by: Alessandro Barbieri --- dev-python/httpcore/httpcore-0.7.0.ebuild | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev-python/httpcore/httpcore-0.7.0.ebuild b/dev-python/httpcore/httpcore-0.7.0.ebuild index a0b354c278..f749084b95 100644 --- a/dev-python/httpcore/httpcore-0.7.0.ebuild +++ b/dev-python/httpcore/httpcore-0.7.0.ebuild @@ -21,7 +21,7 @@ KEYWORDS="~amd64 ~x86" # Temporary failure in name resolution RESTRICT="test" -# ERROR - Config value: 'theme'. Error: Unrecognised theme name: 'material'. The available installed themes are: mkdocs, readthedocs +# ERROR - Config value: 'theme'. Error: Unrecognised theme name: 'material'. The available installed themes are: mkdocs, readthedocs #IUSE="doc" RDEPEND=" From 5a7b5e036202fb2fb63509346c31e89ca7426705 Mon Sep 17 00:00:00 2001 From: Huang Rui Date: Tue, 7 Apr 2020 14:56:50 +0800 Subject: [PATCH 09/15] sci-electronics/kactus2: fix the order of RDEPEND and DEPEND for 3.8.0 Follow https://gitweb.gentoo.org/repo/gentoo.git/tree/skel.ebuild Package-Manager: Portage-2.3.96, Repoman-2.3.22 Signed-off-by: Huang Rui --- sci-electronics/kactus2/kactus2-3.8.0.ebuild | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sci-electronics/kactus2/kactus2-3.8.0.ebuild b/sci-electronics/kactus2/kactus2-3.8.0.ebuild index f316f8494d..bc90e1b2a5 100644 --- a/sci-electronics/kactus2/kactus2-3.8.0.ebuild +++ b/sci-electronics/kactus2/kactus2-3.8.0.ebuild @@ -23,7 +23,7 @@ fi LICENSE="GPL-2" SLOT="0" -DEPEND=" +RDEPEND=" dev-qt/qtcore:5 dev-qt/qtgui:5 dev-qt/qthelp:5 @@ -33,8 +33,8 @@ DEPEND=" dev-qt/qtxml:5 " -RDEPEND=" - ${DEPEND} +DEPEND=" + ${RDEPEND} " PATCHES=( From 857b98c71ac8112fc8f22b399022b357f6290957 Mon Sep 17 00:00:00 2001 From: "Volkmar W. Pogatzki" Date: Tue, 7 Apr 2020 09:00:35 +0200 Subject: [PATCH 10/15] sys-auth/AusweisApp2: drop patch Package-Manager: Portage-2.3.89, Repoman-2.3.20 Signed-off-by: Volkmar W. Pogatzki --- sys-auth/AusweisApp2/AusweisApp2-1.20.0.ebuild | 5 ++++- sys-auth/AusweisApp2/AusweisApp2-9999.ebuild | 5 ++++- .../files/1.20.0-fix-Install.cmake.patch | 18 ------------------ 3 files changed, 8 insertions(+), 20 deletions(-) delete mode 100644 sys-auth/AusweisApp2/files/1.20.0-fix-Install.cmake.patch diff --git a/sys-auth/AusweisApp2/AusweisApp2-1.20.0.ebuild b/sys-auth/AusweisApp2/AusweisApp2-1.20.0.ebuild index b71dce51e6..0eaaed0ddd 100644 --- a/sys-auth/AusweisApp2/AusweisApp2-1.20.0.ebuild +++ b/sys-auth/AusweisApp2/AusweisApp2-1.20.0.ebuild @@ -32,4 +32,7 @@ RDEPEND=" DEPEND="${RDEPEND} dev-qt/linguist-tools:5" -PATCHES=( "${FILESDIR}"/1.20.0-fix-Install.cmake.patch ) +src_configure() { + local mycmakeargs=( -DBUILD_SHARED_LIBS=OFF ) + cmake_src_configure +} diff --git a/sys-auth/AusweisApp2/AusweisApp2-9999.ebuild b/sys-auth/AusweisApp2/AusweisApp2-9999.ebuild index 5b4754da83..cce70f50d8 100644 --- a/sys-auth/AusweisApp2/AusweisApp2-9999.ebuild +++ b/sys-auth/AusweisApp2/AusweisApp2-9999.ebuild @@ -32,4 +32,7 @@ RDEPEND=" DEPEND="${RDEPEND} dev-qt/linguist-tools:5" -PATCHES=( "${FILESDIR}"/1.20.0-fix-Install.cmake.patch ) +src_configure() { + local mycmakeargs=( -DBUILD_SHARED_LIBS=OFF ) + cmake_src_configure +} diff --git a/sys-auth/AusweisApp2/files/1.20.0-fix-Install.cmake.patch b/sys-auth/AusweisApp2/files/1.20.0-fix-Install.cmake.patch deleted file mode 100644 index 9a18e8687b..0000000000 --- a/sys-auth/AusweisApp2/files/1.20.0-fix-Install.cmake.patch +++ /dev/null @@ -1,18 +0,0 @@ -diff --git a/cmake/Install.cmake b/cmake/Install.cmake -index a13e029..336785c 100644 ---- a/cmake/Install.cmake -+++ b/cmake/Install.cmake -@@ -269,6 +269,13 @@ ELSEIF(ANDROID) - ELSEIF(UNIX) - IF(BUILD_SHARED_LIBS) - SET(CMAKE_INSTALL_RPATH "\$ORIGIN") -+ INSTALL(TARGETS AusweisAppActivation AusweisAppActivationCustomScheme AusweisAppActivationIntent -+ AusweisAppActivationInternal AusweisAppActivationWebservice AusweisAppCard AusweisAppCardDrivers -+ AusweisAppCardPcsc AusweisAppConfiguration AusweisAppCore AusweisAppExport AusweisAppFileProvider -+ AusweisAppGlobal AusweisAppInit AusweisAppNetwork AusweisAppRemoteDevice AusweisAppSecureStorage -+ AusweisAppServices AusweisAppSettings AusweisAppUi AusweisAppUiAidl AusweisAppUiCommon -+ AusweisAppUiJson AusweisAppUiQml AusweisAppUiWebsocket AusweisAppUiWidget AusweisAppWhitelistClient -+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} OPTIONAL) - ENDIF() - - SET(DEFAULT_FILE_DESTINATION ${CMAKE_INSTALL_DATADIR}/${VENDOR}/AusweisApp2) From bfe80067a7e2a6200e56d79e53b62d249c46dcc8 Mon Sep 17 00:00:00 2001 From: Huang Rui Date: Tue, 7 Apr 2020 15:02:23 +0800 Subject: [PATCH 11/15] sci-electronics/kactus2: fix the order of RDEPEND and DEPEND for 9999 Follow https://gitweb.gentoo.org/repo/gentoo.git/tree/skel.ebuild Package-Manager: Portage-2.3.96, Repoman-2.3.22 Signed-off-by: Huang Rui --- sci-electronics/kactus2/kactus2-9999.ebuild | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sci-electronics/kactus2/kactus2-9999.ebuild b/sci-electronics/kactus2/kactus2-9999.ebuild index 49a4db5c48..31f8ea4bcb 100644 --- a/sci-electronics/kactus2/kactus2-9999.ebuild +++ b/sci-electronics/kactus2/kactus2-9999.ebuild @@ -23,7 +23,7 @@ fi LICENSE="GPL-2" SLOT="0" -DEPEND=" +RDEPEND=" dev-qt/qtcore:5 dev-qt/qtgui:5 dev-qt/qthelp:5 @@ -33,8 +33,8 @@ DEPEND=" dev-qt/qtxml:5 " -RDEPEND=" - ${DEPEND} +DEPEND=" + ${RDEPEND} " src_install() { From d8f6f32c27dfbe15ad8e3e876f718fa7e37e7273 Mon Sep 17 00:00:00 2001 From: Huang Rui Date: Tue, 7 Apr 2020 15:05:37 +0800 Subject: [PATCH 12/15] sci-electronics/verilator: fix the order of RDEPEND and DEPEND for 9999 Follow https://gitweb.gentoo.org/repo/gentoo.git/tree/skel.ebuild Package-Manager: Portage-2.3.96, Repoman-2.3.22 Signed-off-by: Huang Rui --- sci-electronics/verilator/verilator-9999.ebuild | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sci-electronics/verilator/verilator-9999.ebuild b/sci-electronics/verilator/verilator-9999.ebuild index ce920a4cbe..7d157a4e4f 100644 --- a/sci-electronics/verilator/verilator-9999.ebuild +++ b/sci-electronics/verilator/verilator-9999.ebuild @@ -19,13 +19,13 @@ fi LICENSE="|| ( Artistic-2 LGPL-3 )" SLOT="0" -DEPEND=" +RDEPEND=" dev-lang/perl sys-libs/zlib " -RDEPEND=" - ${DEPEND} +DEPEND=" + ${RDEPEND} " BDEPEND=" From bfc69d89f455b093f153b67f7ebc31f7c084e61f Mon Sep 17 00:00:00 2001 From: Huang Rui Date: Tue, 7 Apr 2020 15:07:46 +0800 Subject: [PATCH 13/15] sci-electronics/verilator: fix the order of RDEPEND and DEPEND for 4.026 Follow https://gitweb.gentoo.org/repo/gentoo.git/tree/skel.ebuild Package-Manager: Portage-2.3.96, Repoman-2.3.22 Signed-off-by: Huang Rui --- sci-electronics/verilator/verilator-4.026.ebuild | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sci-electronics/verilator/verilator-4.026.ebuild b/sci-electronics/verilator/verilator-4.026.ebuild index ce920a4cbe..7d157a4e4f 100644 --- a/sci-electronics/verilator/verilator-4.026.ebuild +++ b/sci-electronics/verilator/verilator-4.026.ebuild @@ -19,13 +19,13 @@ fi LICENSE="|| ( Artistic-2 LGPL-3 )" SLOT="0" -DEPEND=" +RDEPEND=" dev-lang/perl sys-libs/zlib " -RDEPEND=" - ${DEPEND} +DEPEND=" + ${RDEPEND} " BDEPEND=" From 316e8573d3edb2936364e24c4c02286453ba5cca Mon Sep 17 00:00:00 2001 From: Andrew Ammerlaan Date: Tue, 7 Apr 2020 09:15:30 +0200 Subject: [PATCH 14/15] eclass/docs: many fixes, should work now Package-Manager: Portage-2.3.96, Repoman-2.3.22 Signed-off-by: Andrew Ammerlaan --- eclass/docs.eclass | 77 +++++++++++++++++++++++----------------------- 1 file changed, 39 insertions(+), 38 deletions(-) diff --git a/eclass/docs.eclass b/eclass/docs.eclass index 2f243bd8f7..6e4ceea12a 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 From 94cae4d90a900be26cc13732bbc8c41cb2c47f20 Mon Sep 17 00:00:00 2001 From: Andrew Ammerlaan Date: Tue, 7 Apr 2020 09:27:24 +0200 Subject: [PATCH 15/15] eclass/docs: one more bug fix Package-Manager: Portage-2.3.96, Repoman-2.3.22 Signed-off-by: Andrew Ammerlaan --- eclass/docs.eclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eclass/docs.eclass b/eclass/docs.eclass index 6e4ceea12a..c3fb6e366a 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