summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2019-11-18 10:15:03 +0000
committerV3n3RiX <venerix@redcorelinux.org>2019-11-18 10:15:03 +0000
commitb284a3168fa91a038925d2ecf5e4791011ea5e7d (patch)
tree16fe44748708acacd909d4e2e160a09a7f6d936a /eclass
parent77398e424e45d9e98c1cef3c43bdadb9d56e81ef (diff)
gentoo resync : 18.11.2019
Diffstat (limited to 'eclass')
-rw-r--r--eclass/Manifest.gzbin37611 -> 37614 bytes
-rw-r--r--eclass/cmake-utils.eclass2
-rw-r--r--eclass/distutils-r1.eclass61
-rw-r--r--eclass/ecm.eclass643
-rw-r--r--eclass/freebsd.eclass338
-rw-r--r--eclass/kde.org.eclass248
-rw-r--r--eclass/kde5-functions.eclass17
-rw-r--r--eclass/kde5.eclass248
-rw-r--r--eclass/perl-app.eclass52
-rw-r--r--eclass/python-utils-r1.eclass4
-rw-r--r--eclass/qmail.eclass69
-rw-r--r--eclass/toolchain.eclass4
12 files changed, 1034 insertions, 652 deletions
diff --git a/eclass/Manifest.gz b/eclass/Manifest.gz
index 4644cd9185e9..0ee9e0051352 100644
--- a/eclass/Manifest.gz
+++ b/eclass/Manifest.gz
Binary files differ
diff --git a/eclass/cmake-utils.eclass b/eclass/cmake-utils.eclass
index 109b584afb39..e7a48116da7d 100644
--- a/eclass/cmake-utils.eclass
+++ b/eclass/cmake-utils.eclass
@@ -649,7 +649,7 @@ cmake-utils_src_configure() {
if [[ ${EAPI} != [56] ]]; then
cat >> "${common_config}" <<- _EOF_ || die
SET (CMAKE_INSTALL_DOCDIR "${EPREFIX}/usr/share/doc/${PF}" CACHE PATH "")
- SET (BUILD_SHARED_LIBS ON CACHE BOOLEAN "")
+ SET (BUILD_SHARED_LIBS ON CACHE BOOL "")
_EOF_
fi
diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index d3eb8f22ead2..e2cd076d4148 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-r1.eclass
@@ -232,6 +232,67 @@ fi
# }
# @CODE
+# @FUNCTION: distutils_enable_tests
+# @USAGE: <test-runner>
+# @DESCRIPTION:
+# Set up IUSE, RESTRICT, BDEPEND and python_test() for running tests
+# with the specified test runner. Also copies the current value
+# of RDEPEND to test?-BDEPEND. The test-runner argument must be one of:
+#
+# - nose: nosetests (dev-python/nose)
+# - pytest: dev-python/pytest
+# - unittest: for built-in Python unittest module
+#
+# This function is meant as a helper for common use cases, and it only
+# takes care of basic setup. You still need to list additional test
+# dependencies manually. If you have uncommon use case, you should
+# not use it and instead enable tests manually.
+#
+# This function must be called in global scope, after RDEPEND has been
+# declared. Take care not to overwrite the variables set by it.
+distutils_enable_tests() {
+ debug-print-function ${FUNCNAME} "${@}"
+ [[ ${#} -eq 1 ]] || die "${FUNCNAME} takes exactly one argument: test-runner"
+
+ local test_deps
+ case ${1} in
+ nose)
+ test_deps="dev-python/nose[${PYTHON_USEDEP}]"
+ python_test() {
+ nosetests -v || die "Tests fail with ${EPYTHON}"
+ }
+ ;;
+ pytest)
+ test_deps="dev-python/pytest[${PYTHON_USEDEP}]"
+ python_test() {
+ pytest -vv || die "Tests fail with ${EPYTHON}"
+ }
+ ;;
+ unittest)
+ python_test() {
+ "${EPYTHON}" -m unittest discover -v ||
+ die "Tests fail with ${EPYTHON}"
+ }
+ ;;
+ *)
+ die "${FUNCNAME}: unsupported argument: ${1}"
+ esac
+
+ if [[ -n ${test_deps} || -n ${RDEPEND} ]]; then
+ IUSE+=" test"
+ RESTRICT+=" !test? ( test )"
+ if [[ ${EAPI} == [56] ]]; then
+ DEPEND+=" test? ( ${test_deps} ${RDEPEND} )"
+ else
+ BDEPEND+=" test? ( ${test_deps} ${RDEPEND} )"
+ fi
+ fi
+
+ # we need to ensure successful return in case we're called last,
+ # otherwise Portage may wrongly assume sourcing failed
+ return 0
+}
+
# @FUNCTION: esetup.py
# @USAGE: [<args>...]
# @DESCRIPTION:
diff --git a/eclass/ecm.eclass b/eclass/ecm.eclass
new file mode 100644
index 000000000000..06c2e9f83ea9
--- /dev/null
+++ b/eclass/ecm.eclass
@@ -0,0 +1,643 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# @ECLASS: ecm.eclass
+# @MAINTAINER:
+# kde@gentoo.org
+# @SUPPORTED_EAPIS: 7
+# @BLURB: Support eclass for packages that use KDE Frameworks with ECM.
+# @DESCRIPTION:
+# This eclass is intended to streamline the creation of ebuilds for packages
+# that use cmake and KDE Frameworks' extra-cmake-modules, thereby following
+# some of their packaging conventions. It is primarily intended for the three
+# upstream release groups (Frameworks, Plasma, Applications) but also for any
+# other package that follows similar conventions.
+#
+# This eclass unconditionally inherits cmake-utils.eclass and all its public
+# variables and helper functions (not phase functions) may be considered as part
+# of this eclass's API.
+#
+# This eclass's phase functions are not intended to be mixed and matched, so if
+# any phase functions are overridden the version here should also be called.
+#
+# Porting from kde5.class
+# - Convert all add_*_dep dependency functions to regular dependencies
+# - Manually set LICENSE
+# - Manually set SLOT
+# - Rename vars and function names as needed, see kde5.eclass PORTING comments
+# - Instead of FRAMEWORKS_MINIMAL, define KFMIN in ebuilds and use it for deps
+
+if [[ -z ${_ECM_UTILS_ECLASS} ]]; then
+_ECM_UTILS_ECLASS=1
+
+# @ECLASS-VARIABLE: VIRTUALX_REQUIRED
+# @DESCRIPTION:
+# For proper description see virtualx.eclass manpage.
+# Here we redefine default value to be manual, if your package needs virtualx
+# for tests you should proceed with setting VIRTUALX_REQUIRED=test.
+: ${VIRTUALX_REQUIRED:=manual}
+
+# @ECLASS-VARIABLE: ECM_NONGUI
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# By default, for all CATEGORIES except kde-frameworks, assume we are building
+# a GUI application. Add dependency on kde-frameworks/breeze-icons or
+# kde-frameworks/oxygen-icons and run the xdg.eclass routines for pkg_preinst,
+# pkg_postinst and pkg_postrm. If set to "true", do nothing.
+if [[ ${CATEGORY} = kde-frameworks ]] ; then
+ : ${ECM_NONGUI:=true}
+fi
+: ${ECM_NONGUI:=false}
+
+inherit cmake-utils flag-o-matic toolchain-funcs virtualx
+
+if [[ ${ECM_NONGUI} = false ]] ; then
+ inherit xdg
+fi
+
+case ${EAPI} in
+ 7) ;;
+ *) die "EAPI=${EAPI:-0} is not supported" ;;
+esac
+
+if [[ -v KDE_GCC_MINIMAL ]]; then
+ EXPORT_FUNCTIONS pkg_pretend
+fi
+
+EXPORT_FUNCTIONS pkg_setup src_prepare src_configure src_test pkg_preinst pkg_postinst pkg_postrm
+
+# @ECLASS-VARIABLE: ECM_KDEINSTALLDIRS
+# @DESCRIPTION:
+# Assume the package is using KDEInstallDirs macro and switch
+# KDE_INSTALL_USE_QT_SYS_PATHS to ON. If set to "false", do nothing.
+: ${ECM_KDEINSTALLDIRS:=true}
+
+# @ECLASS-VARIABLE: ECM_DEBUG
+# @DESCRIPTION:
+# Add "debug" to IUSE. If !debug, add -DNDEBUG (via cmake-utils_src_configure)
+# and -DQT_NO_DEBUG to CPPFLAGS. If set to "false", do nothing.
+: ${ECM_DEBUG:=true}
+
+# @ECLASS-VARIABLE: ECM_DESIGNERPLUGIN
+# @DESCRIPTION:
+# If set to "true", add "designer" to IUSE to toggle build of designer plugins
+# and add the necessary BDEPEND. If set to "false", do nothing.
+: ${ECM_DESIGNERPLUGIN:=false}
+
+# @ECLASS-VARIABLE: ECM_EXAMPLES
+# @DESCRIPTION:
+# By default unconditionally ignore a top-level examples subdirectory.
+# If set to "true", add "examples" to IUSE to toggle adding that subdirectory.
+: ${ECM_EXAMPLES:=false}
+
+# @ECLASS-VARIABLE: ECM_HANDBOOK
+# @DESCRIPTION:
+# Will accept "true", "false", "optional", "forceoptional". If set to "false",
+# do nothing.
+# Otherwise, add "+handbook" to IUSE, add the appropriate dependency, and let
+# KF5DocTools generate and install the handbook from docbook file(s) found in
+# ECM_HANDBOOK_DIR. However if !handbook, disable build of ECM_HANDBOOK_DIR
+# in CMakeLists.txt.
+# If set to "optional", build with -DCMAKE_DISABLE_FIND_PACKAGE_KF5DocTools=ON
+# when !handbook. In case package requires KF5KDELibs4Support, see next:
+# If set to "forceoptional", remove a KF5DocTools dependency from the root
+# CMakeLists.txt in addition to the above.
+: ${ECM_HANDBOOK:=false}
+
+# @ECLASS-VARIABLE: ECM_HANDBOOK_DIR
+# @DESCRIPTION:
+# Specifies the directory containing the docbook file(s) relative to ${S} to
+# be processed by KF5DocTools (kdoctools_install).
+: ${ECM_HANDBOOK_DIR:=doc}
+
+# @ECLASS-VARIABLE: ECM_PO_DIRS
+# @DESCRIPTION:
+# Specifies directories of l10n files relative to ${S} to be processed by
+# KF5I18n (ki18n_install). If IUSE nls exists and is disabled then disable
+# build of these directories in CMakeLists.txt.
+: ${ECM_PO_DIRS:="po poqm"}
+
+# @ECLASS-VARIABLE: ECM_QTHELP
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# Default value for all CATEGORIES except kde-frameworks is "false".
+# If set to "true", add "doc" to IUSE, add the appropriate dependency, let
+# -DBUILD_QCH=ON generate and install Qt compressed help files when USE=doc.
+# If set to "false", do nothing.
+if [[ ${CATEGORY} = kde-frameworks ]]; then
+ : ${ECM_QTHELP:=true}
+fi
+: ${ECM_QTHELP:=false}
+
+# @ECLASS-VARIABLE: ECM_TEST
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# Will accept "true", "false", "optional", "forceoptional",
+# "forceoptional-recursive".
+# Default value is "false", except for CATEGORY=kde-frameworks where it is
+# set to "true". If set to "false", do nothing.
+# For any other value, add "test" to IUSE and DEPEND on dev-qt/qttest:5.
+# If set to "optional", build with -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Test=ON
+# when USE=!test.
+# If set to "forceoptional", punt Qt5Test dependency and ignore "autotests",
+# "test", "tests" subdirs from top-level CMakeLists.txt when USE=!test.
+# If set to "forceoptional-recursive", punt Qt5Test dependencies and make
+# autotest(s), unittest(s) and test(s) subdirs from *any* CMakeLists.txt in
+# ${S} and below conditional on BUILD_TESTING when USE=!test. This is always
+# meant as a short-term fix and creates ${T}/${P}-tests-optional.patch to
+# refine and submit upstream.
+if [[ ${CATEGORY} = kde-frameworks ]]; then
+ : ${ECM_TEST:=true}
+fi
+: ${ECM_TEST:=false}
+
+# @ECLASS-VARIABLE: KFMIN
+# @DESCRIPTION:
+# Minimum version of Frameworks to require. The default value is not going to
+# be changed unless we also bump EAPI, which usually implies (rev-)bumping.
+# Version will later be used to differentiate between KF5/Qt5 and KF6/Qt6.
+: ${KFMIN:=5.64.0}
+
+# @ECLASS-VARIABLE: KFSLOT
+# @INTERNAL
+# @DESCRIPTION:
+# KDE Frameworks and Qt slot dependency, implied by KFMIN version.
+: ${KFSLOT:=5}
+
+case ${ECM_NONGUI} in
+ true) ;;
+ false)
+ # gui applications need breeze or oxygen for basic iconset, bug #564838
+ if [[ -n ${_KDE5_ECLASS} ]] ; then
+ RDEPEND+=" || (
+ >=kde-frameworks/breeze-icons-${KFMIN}:${KFSLOT}
+ kde-frameworks/oxygen-icons:*
+ )"
+ else
+ RDEPEND+=" || (
+ kde-frameworks/breeze-icons:*
+ kde-frameworks/oxygen-icons:*
+ )"
+ fi
+ ;;
+ *)
+ eerror "Unknown value for \${ECM_NONGUI}"
+ die "Value ${ECM_NONGUI} is not supported"
+ ;;
+esac
+
+case ${ECM_DEBUG} in
+ true)
+ IUSE+=" debug"
+ ;;
+ false) ;;
+ *)
+ eerror "Unknown value for \${ECM_DEBUG}"
+ die "Value ${ECM_DEBUG} is not supported"
+ ;;
+esac
+
+case ${ECM_DESIGNERPLUGIN} in
+ true)
+ IUSE+=" designer"
+ if [[ -n ${_KDE5_ECLASS} ]] ; then
+ BDEPEND+=" designer? ( >=dev-qt/designer-5.12.3:${KFSLOT} )"
+ else
+ BDEPEND+=" designer? ( dev-qt/designer:${KFSLOT} )"
+ fi
+ ;;
+ false) ;;
+ *)
+ eerror "Unknown value for \${ECM_DESIGNERPLUGIN}"
+ die "Value ${ECM_DESIGNERPLUGIN} is not supported"
+ ;;
+esac
+
+# @ECLASS-VARIABLE: KDE_DESIGNERPLUGIN
+# @DESCRIPTION:
+# If set to "false", do nothing.
+# Otherwise, add "designer" to IUSE to toggle build of designer plugins
+# and add the necessary BDEPEND.
+# TODO: drop after KDE Applications 19.08.3 removal
+: ${KDE_DESIGNERPLUGIN:=false}
+case ${KDE_DESIGNERPLUGIN} in
+ true)
+ IUSE+=" designer"
+ BDEPEND+="
+ designer? ( >=kde-frameworks/kdesignerplugin-${KFMIN}:${KFSLOT} )
+ "
+ ;;
+ false) ;;
+ *)
+ eerror "Unknown value for \${KDE_DESIGNERPLUGIN}"
+ die "Value ${KDE_DESIGNERPLUGIN} is not supported"
+ ;;
+esac
+
+case ${ECM_EXAMPLES} in
+ true)
+ IUSE+=" examples"
+ ;;
+ false) ;;
+ *)
+ eerror "Unknown value for \${ECM_EXAMPLES}"
+ die "Value ${ECM_EXAMPLES} is not supported"
+ ;;
+esac
+
+case ${ECM_HANDBOOK} in
+ true|optional|forceoptional)
+ IUSE+=" +handbook"
+ BDEPEND+=" handbook? ( >=kde-frameworks/kdoctools-${KFMIN}:${KFSLOT} )"
+ ;;
+ false) ;;
+ *)
+ eerror "Unknown value for \${ECM_HANDBOOK}"
+ die "Value ${ECM_HANDBOOK} is not supported"
+ ;;
+esac
+
+case ${ECM_QTHELP} in
+ true)
+ IUSE+=" doc"
+ if [[ -n ${_KDE5_ECLASS} ]] ; then
+ COMMONDEPEND+=" doc? ( >=dev-qt/qt-docs-5.12.3:${KFSLOT} )"
+ BDEPEND+=" doc? ( >=dev-qt/qthelp-5.12.3:${KFSLOT} )"
+ else
+ COMMONDEPEND+=" doc? ( dev-qt/qt-docs:${KFSLOT} )"
+ BDEPEND+=" doc? ( dev-qt/qthelp:${KFSLOT} )"
+ fi
+ BDEPEND+=" doc? ( >=app-doc/doxygen-1.8.13-r1 )"
+ ;;
+ false) ;;
+ *)
+ eerror "Unknown value for \${ECM_QTHELP}"
+ die "Value ${ECM_QTHELP} is not supported"
+ ;;
+esac
+
+case ${ECM_TEST} in
+ true|optional|forceoptional|forceoptional-recursive)
+ IUSE+=" test"
+ if [[ -n ${_KDE5_ECLASS} ]] ; then
+ DEPEND+=" test? ( >=dev-qt/qttest-5.12.3:${KFSLOT} )"
+ else
+ DEPEND+=" test? ( dev-qt/qttest:${KFSLOT} )"
+ fi
+ RESTRICT+=" !test? ( test )"
+ ;;
+ false) ;;
+ *)
+ eerror "Unknown value for \${ECM_TEST}"
+ die "Value ${ECM_TEST} is not supported"
+ ;;
+esac
+
+BDEPEND+=" >=kde-frameworks/extra-cmake-modules-${KFMIN}:${KFSLOT}"
+RDEPEND+=" >=kde-frameworks/kf-env-4"
+if [[ -n ${_KDE5_ECLASS} ]] ; then
+ COMMONDEPEND+=" >=dev-qt/qtcore-5.12.3:${KFSLOT}"
+else
+ COMMONDEPEND+=" dev-qt/qtcore:${KFSLOT}"
+fi
+
+DEPEND+=" ${COMMONDEPEND}"
+RDEPEND+=" ${COMMONDEPEND}"
+unset COMMONDEPEND
+
+# @ECLASS-VARIABLE: KDE_GCC_MINIMAL
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# Minimum version of active GCC to require. This is checked in
+# ecm_pkg_pretend and ecm_pkg_setup.
+
+# @FUNCTION: _ecm_check_gcc_version
+# @INTERNAL
+# @DESCRIPTION:
+# Determine if the current GCC version is acceptable, otherwise die.
+_ecm_check_gcc_version() {
+ if [[ ${MERGE_TYPE} != binary && -v KDE_GCC_MINIMAL ]] && tc-is-gcc; then
+
+ local version=$(gcc-version)
+
+ debug-print "GCC version check activated"
+ debug-print "Version detected: ${version}"
+ debug-print "Version required: ${KDE_GCC_MINIMAL}"
+
+ ver_test ${version} -lt ${KDE_GCC_MINIMAL} &&
+ die "Sorry, but gcc-${KDE_GCC_MINIMAL} or later is required for this package (found ${version})."
+ fi
+}
+
+# @FUNCTION: _ecm_strip_handbook_translations
+# @INTERNAL
+# @DESCRIPTION:
+# If LINGUAS is defined, enable only the requested translations when required.
+_ecm_strip_handbook_translations() {
+ if ! [[ -v LINGUAS ]]; then
+ return
+ fi
+
+ local lang po
+ for po in ${ECM_PO_DIRS}; do
+ if [[ -d ${po} ]] ; then
+ pushd ${po} > /dev/null || die
+ local lang
+ for lang in *; do
+ if [[ -e ${lang} ]] && ! has ${lang/.po/} ${LINGUAS} ; then
+ case ${lang} in
+ cmake_modules | \
+ CMakeLists.txt | \
+ ${PN}.pot) ;;
+ *) rm -r ${lang} || die ;;
+ esac
+ if [[ -e CMakeLists.txt ]] ; then
+ cmake_comment_add_subdirectory ${lang}
+ sed -e "/add_subdirectory([[:space:]]*${lang}\/.*[[:space:]]*)/d" \
+ -i CMakeLists.txt || die
+ fi
+ fi
+ done
+ popd > /dev/null || die
+ fi
+ done
+}
+
+# @FUNCTION: ecm_punt_bogus_dep
+# @USAGE: <prefix> <dependency>
+# @DESCRIPTION:
+# Removes a specified dependency from a find_package call with multiple
+# components.
+ecm_punt_bogus_dep() {
+ local prefix=${1}
+ local dep=${2}
+
+ if [[ ! -e "CMakeLists.txt" ]]; then
+ return
+ fi
+
+ pcregrep -Mni "(?s)find_package\s*\(\s*${prefix}[^)]*?${dep}.*?\)" CMakeLists.txt > "${T}/bogus${dep}"
+
+ # pcregrep returns non-zero on no matches/error
+ if [[ $? -ne 0 ]] ; then
+ return
+ fi
+
+ local length=$(wc -l "${T}/bogus${dep}" | cut -d " " -f 1)
+ local first=$(head -n 1 "${T}/bogus${dep}" | cut -d ":" -f 1)
+ local last=$(( length + first - 1))
+
+ sed -e "${first},${last}s/${dep}//" -i CMakeLists.txt || die
+
+ if [[ ${length} -eq 1 ]] ; then
+ sed -e "/find_package\s*(\s*${prefix}\(\s\+\(REQUIRED\|CONFIG\|COMPONENTS\|\${[A-Z0-9_]*}\)\)\+\s*)/Is/^/# removed by ecm.eclass - /" -i CMakeLists.txt || die
+ fi
+}
+
+# @FUNCTION: ecm_pkg_pretend
+# @DESCRIPTION:
+# Checks if the active compiler meets the minimum version requirements.
+# phase function is only exported if KDE_GCC_MINIMAL is defined.
+ecm_pkg_pretend() {
+ debug-print-function ${FUNCNAME} "$@"
+ _ecm_check_gcc_version
+}
+
+# @FUNCTION: ecm_pkg_setup
+# @DESCRIPTION:
+# Checks if the active compiler meets the minimum version requirements.
+ecm_pkg_setup() {
+ debug-print-function ${FUNCNAME} "$@"
+ _ecm_check_gcc_version
+}
+
+# @FUNCTION: ecm_src_prepare
+# @DESCRIPTION:
+# Wrapper for cmake-utils_src_prepare with lots of extra logic for magic
+# handling of linguas, tests, handbook etc.
+ecm_src_prepare() {
+ debug-print-function ${FUNCNAME} "$@"
+
+ cmake-utils_src_prepare
+
+ # only build examples when required
+ if ! { in_iuse examples && use examples; } ; then
+ cmake_comment_add_subdirectory examples
+ fi
+
+ # only enable handbook when required
+ if in_iuse handbook && ! use handbook ; then
+ cmake_comment_add_subdirectory ${ECM_HANDBOOK_DIR}
+
+ if [[ ${ECM_HANDBOOK} = forceoptional ]] ; then
+ ecm_punt_bogus_dep KF5 DocTools
+ sed -i -e "/kdoctools_install/ s/^/#DONT/" CMakeLists.txt || die
+ fi
+ fi
+
+ # drop translations when nls is not wanted
+ if in_iuse nls && ! use nls ; then
+ local po
+ for po in ${ECM_PO_DIRS}; do
+ rm -rf ${po} || die
+ done
+ fi
+
+ # don't change behaviour for kde5.eclass consumers
+ # for ported ebuilds, limit playing field of this to kde-*/ categories
+ if [[ -n ${_KDE5_ECLASS} ]] ; then
+ _ecm_strip_handbook_translations # TODO: kde5.eclass cleanup
+ elif [[ ${CATEGORY} = kde-* ]] ; then
+ # always install unconditionally for kconfigwidgets - if you use
+ # language X as system language, and there is a combobox with language
+ # names, the translated language name for language Y is taken from
+ # /usr/share/locale/Y/kf5_entry.desktop
+ [[ ${PN} != kconfigwidgets ]] && _ecm_strip_handbook_translations
+ fi
+
+ # only build unit tests when required
+ if ! { in_iuse test && use test; } ; then
+ if [[ ${ECM_TEST} = forceoptional ]] ; then
+ ecm_punt_bogus_dep Qt5 Test
+ # if forceoptional, also cover non-kde categories
+ cmake_comment_add_subdirectory autotests test tests
+ elif [[ ${ECM_TEST} = forceoptional-recursive ]] ; then
+ ecm_punt_bogus_dep Qt5 Test
+ local f pf="${T}/${P}"-tests-optional.patch
+ touch ${pf} || die "Failed to touch patch file"
+ for f in $(find . -type f -name "CMakeLists.txt" -exec \
+ grep -l "^\s*add_subdirectory\s*\(\s*.*\(auto|unit\)\?tests\?\s*)\s*\)" {} \;); do
+ cp ${f} ${f}.old || die "Failed to prepare patch origfile"
+ pushd ${f%/*} > /dev/null || die
+ ecm_punt_bogus_dep Qt5 Test
+ sed -i CMakeLists.txt -e \
+ "/^#/! s/add_subdirectory\s*\(\s*.*\(auto|unit\)\?tests\?\s*)\s*\)/if(BUILD_TESTING)\n&\nendif()/" \
+ || die
+ popd > /dev/null || die
+ diff -Naur ${f}.old ${f} 1>>${pf}
+ rm ${f}.old || die "Failed to clean up"
+ done
+ eqawarn "Build system was modified by ECM_TEST=forceoptional-recursive."
+ eqawarn "Unified diff file ready for pickup in:"
+ eqawarn " ${pf}"
+ eqawarn "Push it upstream to make this message go away."
+ elif [[ ${CATEGORY} = kde-frameworks || ${CATEGORY} = kde-plasma || ${CATEGORY} = kde-apps ]] ; then
+ cmake_comment_add_subdirectory autotests test tests
+ fi
+ fi
+
+ # in frameworks, tests = manual tests so never build them
+ if [[ ${CATEGORY} = kde-frameworks ]] && [[ ${PN} != extra-cmake-modules ]]; then
+ cmake_comment_add_subdirectory tests
+ fi
+}
+
+# @FUNCTION: ecm_src_configure
+# @DESCRIPTION:
+# Wrapper for cmake-utils_src_configure with extra logic for magic handling of
+# handbook, tests etc.
+ecm_src_configure() {
+ debug-print-function ${FUNCNAME} "$@"
+
+ # we rely on cmake-utils.eclass to append -DNDEBUG too
+ if in_iuse debug && ! use debug; then
+ append-cppflags -DQT_NO_DEBUG
+ fi
+
+ local cmakeargs
+
+ if in_iuse test && ! use test ; then
+ cmakeargs+=( -DBUILD_TESTING=OFF )
+
+ if [[ ${ECM_TEST} = optional ]] ; then
+ cmakeargs+=( -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Test=ON )
+ fi
+ fi
+
+ if [[ ${ECM_HANDBOOK} = optional ]] ; then
+ cmakeargs+=( -DCMAKE_DISABLE_FIND_PACKAGE_KF5DocTools=$(usex !handbook) )
+ fi
+
+ if in_iuse designer && [[ ${ECM_DESIGNERPLUGIN} = true ]]; then
+ cmakeargs+=( -DBUILD_DESIGNERPLUGIN=$(usex designer) )
+ fi
+
+ # TODO: drop after KDE Applications 19.08.3 removal
+ if in_iuse designer && [[ ${KDE_DESIGNERPLUGIN} != false ]] ; then
+ cmakeargs+=( $(cmake-utils_use_find_package designer KF5DesignerPlugin) )
+ fi
+
+ if [[ ${ECM_QTHELP} = true ]]; then
+ cmakeargs+=( -DBUILD_QCH=$(usex doc) )
+ fi
+
+ if [[ ${ECM_KDEINSTALLDIRS} = true ]] ; then
+ cmakeargs+=(
+ # install mkspecs in the same directory as Qt stuff
+ -DKDE_INSTALL_USE_QT_SYS_PATHS=ON
+ # move handbook outside of doc dir, bug 667138
+ -DKDE_INSTALL_DOCBUNDLEDIR="${EPREFIX}/usr/share/help"
+ )
+ fi
+
+ # allow the ebuild to override what we set here
+ mycmakeargs=("${cmakeargs[@]}" "${mycmakeargs[@]}")
+
+ cmake-utils_src_configure
+}
+
+# @FUNCTION: ecm_src_compile
+# @DESCRIPTION:
+# Wrapper for cmake-utils_src_compile. Currently doesn't do anything extra, but
+# is included as part of the API just in case it's needed in the future.
+ecm_src_compile() {
+ debug-print-function ${FUNCNAME} "$@"
+
+ cmake-utils_src_compile "$@"
+}
+
+# @FUNCTION: ecm_src_test
+# @DESCRIPTION:
+# Wrapper for cmake-utils_src_test with extra logic for magic handling of dbus
+# and virtualx.
+ecm_src_test() {
+ debug-print-function ${FUNCNAME} "$@"
+
+ _test_runner() {
+ if [[ -n "${VIRTUALDBUS_TEST}" ]]; then
+ export $(dbus-launch)
+ fi
+
+ cmake-utils_src_test
+ }
+
+ # When run as normal user during ebuild development with the ebuild command,
+ # tests tend to access the session DBUS. This however is not possible in a
+ # real emerge or on the tinderbox.
+ # make sure it does not happen, so bad tests can be recognized and disabled
+ unset DBUS_SESSION_BUS_ADDRESS DBUS_SESSION_BUS_PID
+
+ if [[ ${VIRTUALX_REQUIRED} = always || ${VIRTUALX_REQUIRED} = test ]]; then
+ virtx _test_runner
+ else
+ _test_runner
+ fi
+
+ if [[ -n "${DBUS_SESSION_BUS_PID}" ]] ; then
+ kill ${DBUS_SESSION_BUS_PID}
+ fi
+}
+
+# @FUNCTION: ecm_src_install
+# @DESCRIPTION:
+# Wrapper for cmake-utils_src_install. Currently doesn't do anything extra, but
+# is included as part of the API just in case it's needed in the future.
+ecm_src_install() {
+ debug-print-function ${FUNCNAME} "$@"
+
+ cmake-utils_src_install
+}
+
+# @FUNCTION: ecm_pkg_preinst
+# @DESCRIPTION:
+# Sets up environment variables required in ecm_pkg_postinst.
+ecm_pkg_preinst() {
+ debug-print-function ${FUNCNAME} "$@"
+
+ case ${ECM_NONGUI} in
+ false) xdg_pkg_preinst ;;
+ *) ;;
+ esac
+}
+
+# @FUNCTION: ecm_pkg_postinst
+# @DESCRIPTION:
+# Updates the various XDG caches (icon, desktop, mime) if necessary.
+ecm_pkg_postinst() {
+ debug-print-function ${FUNCNAME} "$@"
+
+ case ${ECM_NONGUI} in
+ false) xdg_pkg_postinst ;;
+ *) ;;
+ esac
+
+ if [[ -n ${_KDE_ORG_ECLASS} ]] && [[ -z ${I_KNOW_WHAT_I_AM_DOING} ]] && [[ ${KDE_BUILD_TYPE} = live ]]; then
+ einfo "WARNING! This is an experimental live ebuild of ${CATEGORY}/${PN}"
+ einfo "Use it at your own risk."
+ einfo "Do _NOT_ file bugs at bugs.gentoo.org because of this ebuild!"
+ fi
+}
+
+# @FUNCTION: ecm_pkg_postrm
+# @DESCRIPTION:
+# Updates the various XDG caches (icon, desktop, mime) if necessary.
+ecm_pkg_postrm() {
+ debug-print-function ${FUNCNAME} "$@"
+
+ case ${ECM_NONGUI} in
+ false) xdg_pkg_postrm ;;
+ *) ;;
+ esac
+}
+
+fi
diff --git a/eclass/freebsd.eclass b/eclass/freebsd.eclass
deleted file mode 100644
index baebf439159e..000000000000
--- a/eclass/freebsd.eclass
+++ /dev/null
@@ -1,338 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-# @DEAD
-# FreeBSD project is dead, and all consumers are gone.
-# Bug #683284. Removal in 14 days.
-
-#
-# @MAINTAINER:
-# maintainer-needed@gentoo.org
-# @AUTHOR:
-# Diego Pettenò <flameeyes@gentoo.org>
-
-inherit versionator eutils flag-o-matic bsdmk
-
-# Drop patch level from ${PV}
-MY_PV=${PV/_p*}
-PLEVEL=${PV##*_p}
-
-LICENSE="BSD"
-HOMEPAGE="http://www.freebsd.org/"
-
-# Define global package names
-LIB="freebsd-lib-${PV}"
-BIN="freebsd-bin-${PV}"
-CONTRIB="freebsd-contrib-${PV}"
-SHARE="freebsd-share-${PV}"
-UBIN="freebsd-ubin-${PV}"
-USBIN="freebsd-usbin-${PV}"
-CRYPTO="freebsd-crypto-${PV}"
-LIBEXEC="freebsd-libexec-${PV}"
-SBIN="freebsd-sbin-${PV}"
-GNU="freebsd-gnu-${PV}"
-ETC="freebsd-etc-${PV}"
-SYS="freebsd-sys-${PV}"
-INCLUDE="freebsd-include-${PV}"
-RESCUE="freebsd-rescue-${PV}"
-CDDL="freebsd-cddl-${PV}"
-SECURE="freebsd-secure-${PV}"
-
-# Release version (5.3, 5.4, 6.0, etc)
-RV="$(get_version_component_range 1-2 ${MY_PV})"
-
-# SVN ebuild support.
-# 9.1.0.9999 --> release/9.1.0
-# 9.1.9999 --> releng/9.1
-# 9.9999 --> stable/9
-# 9999 --> head
-#
-# svn revision can be specified by patch level:
-# freebsd-lib-9.9999_p247000 --> set svn -r 247000
-
-if [[ ${MY_PV} == *9999* ]]; then
- inherit subversion
-
- # Set SVN revision using patch level.
- [[ ${PV} == *_p* ]] && ESVN_REVISION="${PLEVEL}"
-
- case ${MY_PV%.9999} in
- *.*.*) BRANCH="release";;
- *.*) BRANCH="releng" ;;
- 9999) BRANCH="head" ;;
- *) BRANCH="stable" ;;
- esac
-
- if [[ ${BRANCH} == head ]] ; then
- SVN_SUB_URI="${BRANCH}"
- else
- SVN_SUB_URI="${BRANCH}/${MY_PV%.9999}"
- fi
-
- ESVN_REPO_URI="svn://svn.freebsd.org/base/${SVN_SUB_URI}"
- ESVN_PROJECT="freebsd-${BRANCH}"
-fi
-
-# Use the original source code.
-if [[ ${MY_PV} != *9999* ]] && version_is_at_least 10.0 ${RV} ; then
- DL_PV=${MY_PV/_rc/-RC}
- DL_PV=${DL_PV/_beta/-BETA}
- DL_PV=${DL_PV/_alpha/-ALPHA}
- if [[ ${DL_PV} == ${MY_PV} ]]; then
- DL_PV="${DL_PV}-RELEASE"
- fi
- SRC_URI="mirror://gentoo/freebsd-src-${MY_PV}.tar.xz"
-fi
-
-IUSE="profile"
-
-#unalias -a
-alias install-info='/usr/bin/bsdinstall-info'
-
-EXPORT_FUNCTIONS src_compile src_install src_unpack
-
-# doperiodic <kind> <file> ...
-doperiodic() {
- local kind=$1
- shift
-
- ( # dont want to pollute calling env
- insinto /etc/periodic/${kind}
- insopts -m 0755
- doins "$@"
- )
-}
-
-freebsd_get_bmake() {
- local bmake
- bmake=$(get_bmake)
- if version_is_at_least 11.0 ${RV} ; then
- if [[ ${CBUILD} == *-freebsd* ]] ; then
- bmake="${bmake} -m /usr/share/mk/system"
- else
- bmake="${bmake} -m /usr/share/mk/freebsd/system"
- fi
- else
- [[ ${CBUILD} == *-freebsd* ]] || bmake="${bmake} -m /usr/share/mk/freebsd"
- fi
-
- echo "${bmake}"
-}
-
-# Generates SRC_URI or DISTDIR for the upstream patch.
-freebsd_upstream_patches() {
- local opt=$1
- [[ ${#UPSTREAM_PATCHES[@]} -eq 0 ]] && return 1
- for x in "${UPSTREAM_PATCHES[@]}"
- do
- local out=${PN}-${x/\//-}
- out=${out/:/}
- if [[ ${opt} == -s ]] ; then
- echo "${DISTDIR}/${out}"
- else
- echo "https://security.freebsd.org/patches/${x} -> ${out}"
- fi
- done
-}
-
-freebsd_do_patches() {
- if [[ ${#PATCHES[@]} -gt 1 ]] ; then
- for x in "${PATCHES[@]}"; do
- epatch "${x}"
- done
- else
- for x in ${PATCHES} ; do
- epatch "${x}"
- done
- fi
-
- # Upstream patches need to be applied on WORKDIR.
- if [[ ${#UPSTREAM_PATCHES[@]} -gt 0 ]] ; then
- cd "${WORKDIR}" || die
- epatch $(freebsd_upstream_patches -s)
- cd "${S}" || die
- fi
- epatch_user
-}
-
-freebsd_rename_libraries() {
- ebegin "Renaming libraries"
- # We don't use libtermcap, we use libncurses
- find "${S}" -name Makefile -print0 | xargs -0 \
- sed -i -e 's:-ltermcap:-lncurses:g; s:{LIBTERMCAP}:{LIBNCURSES}:g'
- # flex provides libfl, not libl
- find "${S}" -name Makefile -print0 | xargs -0 \
- sed -i -e 's:-ll$:-lfl:g; s:-ll :-lfl :g; s:{LIBL}:{LIBFL}:g'
- # ncurses provides libncursesw not libcursesw
- find "${S}" -name Makefile -print0 | xargs -0 \
- sed -i -e 's:-lcursesw:-lncursesw:g'
- # we use expat instead of bsdxml
- find "${S}" -name Makefile -print0 | xargs -0 \
- sed -i -e 's:-lbsdxml:-lexpat:g'
-
- eend $?
-}
-
-freebsd_src_unpack() {
- if [[ ${MY_PV} == *9999* ]]; then
- S="${WORKDIR}" subversion_src_unpack
-
- # When share/mk exists in ${WORKDIR}, BSD's make will try to use it on FreeBSD 10.0 or later.
- # We should remove "${WORKDIR}"/share/mk/*.mk to use /usr/share/mk{,/system}.
- if [[ ${PN} != freebsd-mk-defs ]] ; then
- [[ -e "${WORKDIR}"/share/mk ]] && rm -rf "${WORKDIR}"/share/mk/*.mk
- fi
- else
- if version_is_at_least 10.0 ${RV} ; then
- local tarball="freebsd-src-${MY_PV}.tar.xz"
- local topdir="usr/src/"
- local extractlist=()
- for i in ${EXTRACTONLY} tools/ ; do
- extractlist+=( ${topdir}${i} )
- done
- ebegin "Unpacking parts of ${tarball} to ${WORKDIR}"
- cd "${WORKDIR}" || die
- tar -xJpf "${DISTDIR}/${tarball}" --strip-components=2 "${extractlist[@]}" 2> /dev/null || die "tar extract command failed"
- cd - || die
- else
- for f in ${A} ; do
- [[ ${f} == *.tar.* ]] && unpack ${f}
- done
- fi
- fi
- cd "${S}"
-
- dummy_mk ${REMOVE_SUBDIRS}
-
- freebsd_do_patches
- if ! version_is_at_least 11.0 ${RV} ; then
- freebsd_rename_libraries
- fi
-
- # Starting from FreeBSD 9.2, its install command supports the -l option and
- # they now use it. Emulate it if we are on a system that does not have it.
- if version_is_at_least 9.2 ${RV} && ! has_version '>=sys-freebsd/freebsd-ubin-9.2_beta1' ; then
- export INSTALL_LINK="ln -f"
- export INSTALL_SYMLINK="ln -fs"
- fi
- # An older version of install command doesn't support the -T option.
- if version_is_at_least 11.0 ${RV} && ! has_version ">=sys-freebsd/freebsd-ubin-${RV}" ; then
- export INSTALL="sh ${WORKDIR}/tools/install.sh"
- fi
-
- # If CC=clang, we should use clang-cpp instead of cpp. #478810, #595878
- if [[ $(tc-getCC) == *clang* ]] ; then
- if type -P clang-cpp > /dev/null ; then
- export CPP=clang-cpp
- else
- mkdir "${WORKDIR}"/workaround_clang-cpp || die "Could not create ${WORKDIR}/workaround_clang-cpp"
- ln -s "$(type -P clang)" "${WORKDIR}"/workaround_clang-cpp/clang-cpp || die "Could not create clang-cpp symlink."
- export CPP="${WORKDIR}/workaround_clang-cpp/clang-cpp"
- fi
- fi
-
- # Add the special CFLAGS required for multilib support.
- use amd64-fbsd && export CFLAGS_x86_fbsd="${CFLAGS_x86_fbsd} -DCOMPAT_32BIT -B/usr/lib32 -L/usr/lib32"
-}
-
-freebsd_src_compile() {
- use profile && filter-flags "-fomit-frame-pointer"
- if version_is_at_least 11.0 ${RV} ; then
- if ! use profile ; then
- mymakeopts="${mymakeopts} WITHOUT_PROFILE= "
- fi
- # Disable the debugging information, use FEATURES=splitdebug instead.
- mymakeopts="${mymakeopts} WITHOUT_DEBUG_FILES= "
- # We don't support test yet.
- mymakeopts="${mymakeopts} WITHOUT_TESTS= "
- # Set the SRCTOP to detect the source directory.
- mymakeopts="${mymakeopts} SRCTOP=${WORKDIR} "
- # Set the common settings.
- mymakeopts="${mymakeopts} WITHOUT_MANCOMPRESS= WITHOUT_INFOCOMPRESS= "
- else
- use profile || mymakeopts="${mymakeopts} NO_PROFILE= "
- mymakeopts="${mymakeopts} NO_MANCOMPRESS= NO_INFOCOMPRESS= "
- fi
-
- mymakeopts="${mymakeopts} NO_FSCHG="
-
- # Make sure to use FreeBSD definitions while crosscompiling
- [[ -z "${BMAKE}" ]] && BMAKE="$(freebsd_get_bmake)"
-
- # Create objdir if MAKEOBJDIRPREFIX is defined, so that we can make out of
- # tree builds easily.
- if [[ -n "${MAKEOBJDIRPREFIX}" ]] ; then
- mkmake obj || die
- fi
-
- bsdmk_src_compile "$@"
-}
-
-# Helper function to make a multilib build with FreeBSD Makefiles.
-# Usage:
-# MULTIBUILD_VARIANTS=( $(get_all_abis) )
-# multibuild_foreach_variant freebsd_multilib_multibuild_wrapper my_function
-#
-# Important note: To use this function you _have_ to:
-# - inherit multilib.eclass and multibuild.eclass
-# - set MULTIBUILD_VARIANTS
-
-freebsd_multilib_multibuild_wrapper() {
- # Get the ABI from multibuild.eclass
- # This assumes MULTIBUILD_VARIANTS contains only valid ABIs.
- local ABI=${MULTIBUILD_VARIANT}
-
- # First, save the variables: CFLAGS, CXXFLAGS, LDFLAGS, LDADD and mymakeopts.
- for i in CFLAGS CXXFLAGS LDFLAGS LDADD mymakeopts ; do
- export ${i}_SAVE="${!i}"
- done
-
- # Setup the variables specific to this ABI.
- multilib_toolchain_setup "${ABI}"
-
- local target="$(tc-arch-kernel ${CHOST})"
- mymakeopts="${mymakeopts} TARGET=${target} MACHINE=${target} MACHINE_ARCH=${target} SHLIBDIR=/usr/$(get_libdir) LIBDIR=/usr/$(get_libdir)"
- if [ "${ABI}" != "${DEFAULT_ABI}" ] ; then
- mymakeopts="${mymakeopts} COMPAT_32BIT="
- fi
-
- einfo "Building for ABI=${ABI} and TARGET=${target}"
-
- export MAKEOBJDIRPREFIX="${BUILD_DIR}"
- if [ ! -d "${MAKEOBJDIRPREFIX}" ] ; then
- mkdir "${MAKEOBJDIRPREFIX}" || die "Could not create ${MAKEOBJDIRPREFIX}."
- fi
-
- CTARGET="${CHOST}" "$@"
-
- # Restore the variables now.
- for i in CFLAGS CXXFLAGS LDFLAGS LDADD mymakeopts ; do
- ii="${i}_SAVE"
- export ${i}="${!ii}"
- done
-}
-
-freebsd_src_install() {
- if version_is_at_least 11.0 ${RV} ; then
- if ! use profile ; then
- mymakeopts="${mymakeopts} WITHOUT_PROFILE= "
- fi
- # Disable the debugging information, use FEATURES=splitdebug instead.
- mymakeopts="${mymakeopts} WITHOUT_DEBUG_FILES= "
- # We don't support test yet.
- mymakeopts="${mymakeopts} WITHOUT_TESTS= "
- # Set the SRCTOP to detect the source directory.
- mymakeopts="${mymakeopts} SRCTOP=${WORKDIR} "
- # Set the common settings.
- mymakeopts="${mymakeopts} WITHOUT_MANCOMPRESS= WITHOUT_INFOCOMPRESS= "
- else
- use profile || mymakeopts="${mymakeopts} NO_PROFILE= "
- mymakeopts="${mymakeopts} NO_MANCOMPRESS= NO_INFOCOMPRESS= "
- fi
-
- mymakeopts="${mymakeopts} NO_FSCHG="
-
- [[ -z "${BMAKE}" ]] && BMAKE="$(freebsd_get_bmake)"
-
- bsdmk_src_install "$@"
-}
diff --git a/eclass/kde.org.eclass b/eclass/kde.org.eclass
new file mode 100644
index 000000000000..8e13232bb9d1
--- /dev/null
+++ b/eclass/kde.org.eclass
@@ -0,0 +1,248 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# @ECLASS: kde.org.eclass
+# @MAINTAINER:
+# kde@gentoo.org
+# @SUPPORTED_EAPIS: 7
+# @BLURB: Support eclass for packages that are hosted on kde.org infrastructure.
+# @DESCRIPTION:
+# This eclass is mainly providing facilities for the upstream release groups
+# Frameworks, Plasma, Applications to assemble default SRC_URI for tarballs,
+# set up git-r3.eclass for stable/master branch versions or restrict access to
+# unreleased (packager access only) tarballs in Gentoo KDE overlay, but it may
+# be also used by any other package hosted on kde.org.
+# It also contains default meta variables for settings not specific to any
+# particular build system.
+
+if [[ -z ${_KDE_ORG_ECLASS} ]]; then
+_KDE_ORG_ECLASS=1
+
+# @ECLASS-VARIABLE: KDE_BUILD_TYPE
+# @DESCRIPTION:
+# If PV matches "*9999*", this is automatically set to "live".
+# Otherwise, this is automatically set to "release".
+KDE_BUILD_TYPE="release"
+if [[ ${PV} = *9999* ]]; then
+ KDE_BUILD_TYPE="live"
+fi
+export KDE_BUILD_TYPE
+
+if [[ ${KDE_BUILD_TYPE} = live ]]; then
+ inherit git-r3
+fi
+
+EXPORT_FUNCTIONS pkg_nofetch src_unpack
+
+# @ECLASS-VARIABLE: KDE_ORG_NAME
+# @DESCRIPTION:
+# If unset, default value is set to ${PN}.
+# Name of the package as hosted on kde.org mirrors.
+: ${KDE_ORG_NAME:=$PN}
+
+# @ECLASS-VARIABLE: KDE_SELINUX_MODULE
+# @DESCRIPTION:
+# If set to "none", do nothing.
+# For any other value, add selinux to IUSE, and depending on that useflag
+# add a dependency on sec-policy/selinux-${KDE_SELINUX_MODULE} to (R)DEPEND.
+: ${KDE_SELINUX_MODULE:=none}
+
+case ${KDE_SELINUX_MODULE} in
+ none) ;;
+ *)
+ IUSE+=" selinux"
+ RDEPEND+=" selinux? ( sec-policy/selinux-${KDE_SELINUX_MODULE} )"
+ ;;
+esac
+
+# @ECLASS-VARIABLE: KDE_UNRELEASED
+# @INTERNAL
+# @DESCRIPTION
+# An array of $CATEGORY-$PV pairs of packages that are unreleased upstream.
+# Any package matching this will have fetch restriction enabled, and receive
+# a proper error message via pkg_nofetch.
+KDE_UNRELEASED=( )
+
+HOMEPAGE="https://kde.org/"
+
+case ${CATEGORY} in
+ kde-plasma)
+ HOMEPAGE="https://kde.org/plasma-desktop"
+ ;;
+ kde-frameworks)
+ HOMEPAGE="https://kde.org/products/frameworks/"
+ SLOT=5/${PV}
+ [[ ${KDE_BUILD_TYPE} = release ]] && SLOT=$(ver_cut 1)/$(ver_cut 1-2)
+ ;;
+ *) ;;
+esac
+
+_kde_is_unreleased() {
+ local pair
+ for pair in "${KDE_UNRELEASED[@]}" ; do
+ if [[ "${pair}" = "${CATEGORY}-${PV}" ]]; then
+ return 0
+ fi
+ done
+
+ return 1
+}
+
+# Determine fetch location for released tarballs
+_calculate_src_uri() {
+ debug-print-function ${FUNCNAME} "$@"
+
+ local _src_uri="mirror://kde/"
+
+ case ${CATEGORY} in
+ kde-apps)
+ case ${PV} in
+ ??.??.[6-9]? )
+ _src_uri+="unstable/applications/${PV}/src/"
+ RESTRICT+=" mirror"
+ ;;
+ *) _src_uri+="stable/applications/${PV}/src/" ;;
+ esac
+ ;;
+ kde-frameworks)
+ _src_uri+="stable/frameworks/$(ver_cut 1-2)/"
+ case ${PN} in
+ kdelibs4support | \
+ kdewebkit | \
+ khtml | \
+ kjs | \
+ kjsembed | \
+ kmediaplayer | \
+ kross)
+ _src_uri+="portingAids/"
+ ;;
+ kdesignerplugin)
+ [[ ${PV} = 5.60.* ]] || _src_uri+="portingAids/"
+ ;;
+ esac
+ ;;
+ kde-plasma)
+ case ${PV} in
+ 5.??.[6-9]? )
+ _src_uri+="unstable/plasma/$(ver_cut 1-3)/"
+ RESTRICT+=" mirror"
+ ;;
+ *) _src_uri+="stable/plasma/$(ver_cut 1-3)/" ;;
+ esac
+ ;;
+ esac
+
+ if [[ ${PN} = kdevelop* ]]; then
+ case ${PV} in
+ *.*.[6-9]? )
+ _src_uri+="unstable/kdevelop/${PV}/src/"
+ RESTRICT+=" mirror"
+ ;;
+ *) _src_uri+="stable/kdevelop/${PV}/src/" ;;
+ esac
+ fi
+
+ SRC_URI="${_src_uri}${KDE_ORG_NAME}-${PV}.tar.xz"
+
+ if _kde_is_unreleased ; then
+ RESTRICT+=" fetch"
+ fi
+}
+
+# Determine fetch location for live sources
+_calculate_live_repo() {
+ debug-print-function ${FUNCNAME} "$@"
+
+ SRC_URI=""
+
+ # @ECLASS-VARIABLE: EGIT_MIRROR
+ # @DESCRIPTION:
+ # This variable allows easy overriding of default kde mirror service
+ # (anongit) with anything else you might want to use.
+ EGIT_MIRROR=${EGIT_MIRROR:=https://anongit.kde.org}
+
+ if [[ ${PV} == ??.??.49.9999 && ${CATEGORY} = kde-apps ]]; then
+ EGIT_BRANCH="release/$(ver_cut 1-2)"
+ fi
+
+ if [[ ${PV} != 9999 && ${CATEGORY} = kde-plasma ]]; then
+ EGIT_BRANCH="Plasma/$(ver_cut 1-2)"
+ fi
+
+ if [[ ${PV} != 9999 && ${PN} = kdevelop* ]]; then
+ EGIT_BRANCH="$(ver_cut 1-2)"
+ fi
+
+ # @ECLASS-VARIABLE: EGIT_REPONAME
+ # @DESCRIPTION:
+ # This variable allows overriding of default repository
+ # name. Specify only if this differs from PN and KDE_ORG_NAME.
+ EGIT_REPO_URI="${EGIT_MIRROR}/${EGIT_REPONAME:=$KDE_ORG_NAME}"
+}
+
+case ${KDE_BUILD_TYPE} in
+ live) _calculate_live_repo ;;
+ *)
+ _calculate_src_uri
+ debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: SRC_URI is ${SRC_URI}"
+ ;;
+esac
+
+
+if [[ ${KDE_BUILD_TYPE} = release ]]; then
+ S=${WORKDIR}/${KDE_ORG_NAME}-${PV}
+fi
+
+# @FUNCTION: kde.org_pkg_nofetch
+# @DESCRIPTION:
+# Intended for use in the KDE overlay. If this package matches something in
+# KDE_UNRELEASED, display a giant warning that the package has not yet been
+# released upstream and should not be used.
+kde.org_pkg_nofetch() {
+ if ! _kde_is_unreleased ; then
+ return
+ fi
+
+ local sched_uri="https://community.kde.org/Schedules"
+ case ${CATEGORY} in
+ kde-frameworks) sched_uri+="/Frameworks" ;;
+ kde-plasma) sched_uri+="/Plasma_5" ;;
+ kde-apps) sched_uri+="/Applications/$(ver_cut 1-2)_Release_Schedule" ;;
+ esac
+
+ eerror " _ _ _ _ ____ _____ _ _____ _ ____ _____ ____ "
+ eerror "| | | | \ | | _ \| ____| | | ____| / \ / ___|| ____| _ \ "
+ eerror "| | | | \| | |_) | _| | | | _| / _ \ \___ \| _| | | | |"
+ eerror "| |_| | |\ | _ <| |___| |___| |___ / ___ \ ___) | |___| |_| |"
+ eerror " \___/|_| \_|_| \_\_____|_____|_____/_/ \_\____/|_____|____/ "
+ eerror " "
+ eerror " ____ _ ____ _ __ _ ____ _____ "
+ eerror "| _ \ / \ / ___| |/ / / \ / ___| ____|"
+ eerror "| |_) / _ \| | | ' / / _ \| | _| _| "
+ eerror "| __/ ___ \ |___| . \ / ___ \ |_| | |___ "
+ eerror "|_| /_/ \_\____|_|\_\/_/ \_\____|_____|"
+ eerror
+ eerror "${CATEGORY}/${P} has not been released to the public yet"
+ eerror "and is only available to packagers right now."
+ eerror ""
+ eerror "This is not a bug. Please do not file bugs or contact upstream about this."
+ eerror ""
+ eerror "Please consult the upstream release schedule to see when this "
+ eerror "package is scheduled to be released:"
+ eerror "${sched_uri}"
+}
+
+# @FUNCTION: kde.org_src_unpack
+# @DESCRIPTION:
+# Unpack the sources, automatically handling both release and live ebuilds.
+kde.org_src_unpack() {
+ debug-print-function ${FUNCNAME} "$@"
+
+ if [[ ${KDE_BUILD_TYPE} = live ]]; then
+ git-r3_src_unpack
+ else
+ default
+ fi
+}
+
+fi
diff --git a/eclass/kde5-functions.eclass b/eclass/kde5-functions.eclass
index 652ed06b7be5..7bf5a9caa33f 100644
--- a/eclass/kde5-functions.eclass
+++ b/eclass/kde5-functions.eclass
@@ -10,7 +10,7 @@
# This eclass contains functions shared by the other KDE eclasses and forms
# part of their public API.
#
-# This eclass should (almost) never be inherited directly by an ebuild.
+# This eclass must not be inherited directly by an ebuild.
if [[ -z ${_KDE5_FUNCTIONS_ECLASS} ]]; then
_KDE5_FUNCTIONS_ECLASS=1
@@ -32,16 +32,6 @@ if [[ ${PV} = *9999* ]]; then
fi
export KDE_BUILD_TYPE
-case ${CATEGORY} in
- kde-frameworks)
- [[ ${KDE_BUILD_TYPE} = live ]] && : ${FRAMEWORKS_MINIMAL:=9999}
- ;;
- kde-plasma)
- [[ ${PV} = 5.17* ]] && : ${FRAMEWORKS_MINIMAL:=5.63.0}
- [[ ${KDE_BUILD_TYPE} = live ]] && : ${FRAMEWORKS_MINIMAL:=9999}
- ;;
-esac
-
# @ECLASS-VARIABLE: QT_MINIMAL
# @DESCRIPTION:
# Minimum version of Qt to require. This affects add_qt_dep.
@@ -140,6 +130,7 @@ _add_category_dep() {
# The output of this should be added directly to DEPEND/RDEPEND, and may be
# wrapped in a USE conditional (but not an || conditional without an extra set
# of parentheses).
+# PORTING: no replacement
add_frameworks_dep() {
debug-print-function ${FUNCNAME} "$@"
@@ -172,6 +163,7 @@ add_frameworks_dep() {
# The output of this should be added directly to DEPEND/RDEPEND, and may be
# wrapped in a USE conditional (but not an || conditional without an extra set
# of parentheses).
+# PORTING: no replacement
add_plasma_dep() {
debug-print-function ${FUNCNAME} "$@"
@@ -204,6 +196,7 @@ add_plasma_dep() {
# The output of this should be added directly to DEPEND/RDEPEND, and may be
# wrapped in a USE conditional (but not an || conditional without an extra set
# of parentheses).
+# PORTING: no replacement
add_kdeapps_dep() {
debug-print-function ${FUNCNAME} "$@"
@@ -236,6 +229,7 @@ add_kdeapps_dep() {
# The output of this should be added directly to DEPEND/RDEPEND, and may be
# wrapped in a USE conditional (but not an || conditional without an extra set
# of parentheses).
+# PORTING: no replacement
add_qt_dep() {
debug-print-function ${FUNCNAME} "$@"
@@ -260,6 +254,7 @@ add_qt_dep() {
# @USAGE: <prefix> <dependency>
# @DESCRIPTION:
# Removes a specified dependency from a find_package call with multiple components.
+# PORTING: Use ecm_punt_bogus_dep from ecm.eclass instead.
punt_bogus_dep() {
local prefix=${1}
local dep=${2}
diff --git a/eclass/kde5.eclass b/eclass/kde5.eclass
index ee1d3b35aa8c..ef45ba420d73 100644
--- a/eclass/kde5.eclass
+++ b/eclass/kde5.eclass
@@ -7,17 +7,18 @@
# @SUPPORTED_EAPIS: 7
# @BLURB: Support eclass for packages that follow KDE packaging conventions.
# @DESCRIPTION:
-# This eclass is intended to streamline the creation of ebuilds for packages
-# that follow KDE upstream packaging conventions. It's primarily intended for
-# the three upstream release groups (Frameworks, Plasma, Applications) but
-# is also for any package that follows similar conventions.
+# This eclass is *deprecated*. Please read the PORTING notes for switching to
+# ecm.eclass in case the package is using extra-cmake-modules, otherwise just
+# use cmake-utils.eclass instead. For projects hosted on kde.org infrastructure,
+# inherit kde.org.eclass to fetch and unpack sources independent of the build
+# system being used.
#
# This eclass unconditionally inherits kde5-functions.eclass and all its public
# functions and variables may be considered as part of this eclass's API.
#
-# This eclass unconditionally inherits cmake-utils.eclass and all its public
-# variables and helper functions (not phase functions) may be considered as part
-# of this eclass's API.
+# This eclass unconditionally inherits kde.org.eclass and cmake-utils.eclass
+# and all their public variables and helper functions (not phase functions) may
+# be considered as part of this eclass's API.
#
# This eclass's phase functions are not intended to be mixed and matched, so if
# any phase functions are overridden the version here should also be called.
@@ -25,6 +26,12 @@
if [[ -z ${_KDE5_ECLASS} ]]; then
_KDE5_ECLASS=1
+# Propagate KMNAME to kde.org.eclass
+# PORTING: Use KDE_ORG_NAME from kde.org.eclass instead
+if [[ -z ${KDE_ORG_NAME} ]]; then
+ KDE_ORG_NAME=${KMNAME:=$PN}
+fi
+
# @ECLASS-VARIABLE: VIRTUALX_REQUIRED
# @DESCRIPTION:
# For proper description see virtualx.eclass manpage.
@@ -32,17 +39,13 @@ _KDE5_ECLASS=1
# for tests you should proceed with setting VIRTUALX_REQUIRED=test.
: ${VIRTUALX_REQUIRED:=manual}
-inherit cmake-utils flag-o-matic kde5-functions virtualx xdg
-
-if [[ ${KDE_BUILD_TYPE} = live ]]; then
- inherit git-r3
-fi
+inherit cmake-utils flag-o-matic kde.org kde5-functions virtualx xdg
if [[ -v KDE_GCC_MINIMAL ]]; then
EXPORT_FUNCTIONS pkg_pretend
fi
-EXPORT_FUNCTIONS pkg_setup pkg_nofetch src_unpack src_prepare src_configure src_compile src_test src_install pkg_preinst pkg_postinst pkg_postrm
+EXPORT_FUNCTIONS pkg_setup src_prepare src_configure src_compile src_test src_install pkg_preinst pkg_postinst pkg_postrm
# @ECLASS-VARIABLE: ECM_KDEINSTALLDIRS
# @DESCRIPTION:
@@ -57,6 +60,7 @@ EXPORT_FUNCTIONS pkg_setup pkg_nofetch src_unpack src_prepare src_configure src_
# For any other value, add dependencies on dev-qt/qtcore:5, kde-frameworks/kf-env
# and kde-frameworks/extra-cmake-modules:5. Additionally, required blockers may
# be set depending on the value of CATEGORY.
+# PORTING: no replacement
: ${KDE_AUTODEPS:=true}
# @ECLASS-VARIABLE: KDE_DEBUG
@@ -64,6 +68,7 @@ EXPORT_FUNCTIONS pkg_setup pkg_nofetch src_unpack src_prepare src_configure src_
# If set to "false", add -DNDEBUG (via cmake-utils_src_configure) and -DQT_NO_DEBUG
# to CPPFLAGS.
# Otherwise, add debug to IUSE.
+# PORTING: ECM_DEBUG in ecm.eclass
: ${KDE_DEBUG:=true}
# @ECLASS-VARIABLE: KDE_DESIGNERPLUGIN
@@ -71,12 +76,14 @@ EXPORT_FUNCTIONS pkg_setup pkg_nofetch src_unpack src_prepare src_configure src_
# If set to "false", do nothing.
# Otherwise, add "designer" to IUSE to toggle build of designer plugins
# and add the necessary DEPENDs.
+# PORTING: ECM_DESIGNERPLUGIN in ecm.eclass
: ${KDE_DESIGNERPLUGIN:=false}
# @ECLASS-VARIABLE: KDE_EXAMPLES
# @DESCRIPTION:
# If set to "false", unconditionally ignore a top-level examples subdirectory.
# Otherwise, add "examples" to IUSE to toggle adding that subdirectory.
+# PORTING: ECM_EXAMPLES in ecm.eclass
: ${KDE_EXAMPLES:=false}
# @ECLASS-VARIABLE: KDE_HANDBOOK
@@ -88,16 +95,19 @@ EXPORT_FUNCTIONS pkg_setup pkg_nofetch src_unpack src_prepare src_configure src_
# when USE=!handbook. In case package requires KF5KDELibs4Support, see next:
# If set to "forceoptional", remove a KF5DocTools dependency from the root
# CMakeLists.txt in addition to the above.
+# PORTING: ECM_HANDBOOK in ecm.eclass
: ${KDE_HANDBOOK:=false}
# @ECLASS-VARIABLE: KDE_DOC_DIR
# @DESCRIPTION:
# Specifies the location of the KDE handbook if not the default.
+# PORTING: ECM_HANDBOOK_DIR in ecm.eclass
: ${KDE_DOC_DIR:=doc}
# @ECLASS-VARIABLE: KDE_PO_DIRS
# @DESCRIPTION:
# Specifies the possible locations of KDE l10n files if not the default.
+# PORTING: ECM_PO_DIRS in ecm.eclass
: ${KDE_PO_DIRS:="po poqm"}
# @ECLASS-VARIABLE: KDE_QTHELP
@@ -105,6 +115,7 @@ EXPORT_FUNCTIONS pkg_setup pkg_nofetch src_unpack src_prepare src_configure src_
# If set to "false", do nothing.
# Otherwise, add "doc" to IUSE, add the appropriate dependency, generate
# and install Qt compressed help files with -DBUILD_QCH=ON when USE=doc.
+# PORTING: ECM_QTHELP in ecm.eclass
if [[ ${CATEGORY} = kde-frameworks ]]; then
: ${KDE_QTHELP:=true}
fi
@@ -122,42 +133,25 @@ fi
# autotest(s), unittest(s) and test(s) subdirs from *any* CMakeLists.txt in ${S}
# and below conditional on BUILD_TESTING. This is always meant as a short-term
# fix and creates ${T}/${P}-tests-optional.patch to refine and submit upstream.
+# PORTING: ECM_TEST in ecm.eclass
if [[ ${CATEGORY} = kde-frameworks ]]; then
: ${KDE_TEST:=true}
fi
: ${KDE_TEST:=false}
-# @ECLASS-VARIABLE: KDE_SELINUX_MODULE
-# @DESCRIPTION:
-# If set to "none", do nothing.
-# For any other value, add selinux to IUSE, and depending on that useflag
-# add a dependency on sec-policy/selinux-${KDE_SELINUX_MODULE} to (R)DEPEND.
-: ${KDE_SELINUX_MODULE:=none}
-
# @ECLASS-VARIABLE: KDE_SUBSLOT
# @DESCRIPTION:
# If set to "false", do nothing.
# If set to "true", add a subslot to the package, where subslot is either
# defined as major.minor version for kde-*/ categories or ${PV} if other.
# For any other value, that value will be used as subslot.
+# PORTING: no replacement, define in ebuild
: ${KDE_SUBSLOT:=false}
-# @ECLASS-VARIABLE: KDE_UNRELEASED
-# @INTERNAL
-# @DESCRIPTION
-# An array of $CATEGORY-$PV pairs of packages that are unreleased upstream.
-# Any package matching this will have fetch restriction enabled, and receive
-# a proper error message via pkg_nofetch.
-KDE_UNRELEASED=( )
-
-HOMEPAGE="https://kde.org/"
+# PORTING: LICENSE no longer set by eclass, define in ebuild
LICENSE="GPL-2"
-
-SLOT=5
-
-if [[ ${CATEGORY} = kde-frameworks ]]; then
- KDE_SUBSLOT=true
-fi
+# PORTING: SLOT no longer set by eclass except for kde-frameworks
+[[ ${CATEGORY} = kde-frameworks ]] || SLOT=5
case ${KDE_SUBSLOT} in
false) ;;
@@ -245,154 +239,10 @@ case ${KDE_TEST} in
;;
esac
-case ${KDE_SELINUX_MODULE} in
- none) ;;
- *)
- IUSE+=" selinux"
- RDEPEND+=" selinux? ( sec-policy/selinux-${KDE_SELINUX_MODULE} )"
- ;;
-esac
-
DEPEND+=" ${COMMONDEPEND}"
RDEPEND+=" ${COMMONDEPEND}"
unset COMMONDEPEND
-if [[ -n ${KMNAME} && ${KMNAME} != ${PN} && ${KDE_BUILD_TYPE} = release ]]; then
- S=${WORKDIR}/${KMNAME}-${PV}
-fi
-
-_kde_is_unreleased() {
- local pair
- for pair in "${KDE_UNRELEASED[@]}" ; do
- if [[ "${pair}" = "${CATEGORY}-${PV}" ]]; then
- return 0
- fi
- done
-
- return 1
-}
-
-# Determine fetch location for released tarballs
-_calculate_src_uri() {
- debug-print-function ${FUNCNAME} "$@"
-
- local _kmname
-
- if [[ -n ${KMNAME} ]]; then
- _kmname=${KMNAME}
- else
- _kmname=${PN}
- fi
-
- case ${PN} in
- kdelibs4support | \
- kdewebkit | \
- khtml | \
- kjs | \
- kjsembed | \
- kmediaplayer | \
- kross)
- _kmname="portingAids/${_kmname}"
- ;;
- kdesignerplugin)
- [[ ${PV} = 5.6[01].* ]] || _kmname="portingAids/${_kmname}"
- ;;
- esac
-
- case ${CATEGORY} in
- kde-apps)
- case ${PV} in
- ??.?.[6-9]? | ??.??.[6-9]? )
- SRC_URI="mirror://kde/unstable/applications/${PV}/src/${_kmname}-${PV}.tar.xz"
- RESTRICT+=" mirror"
- ;;
- *)
- SRC_URI="mirror://kde/stable/applications/${PV}/src/${_kmname}-${PV}.tar.xz" ;;
- esac
- ;;
- kde-frameworks)
- SRC_URI="mirror://kde/stable/frameworks/${PV%.*}/${_kmname}-${PV}.tar.xz" ;;
- kde-plasma)
- local plasmapv=$(ver_cut 1-3)
-
- case ${PV} in
- 5.?.[6-9]? | 5.??.[6-9]? )
- # Plasma 5 beta releases
- SRC_URI="mirror://kde/unstable/plasma/${plasmapv}/${_kmname}-${PV}.tar.xz"
- RESTRICT+=" mirror"
- ;;
- *)
- # Plasma 5 stable releases
- SRC_URI="mirror://kde/stable/plasma/${plasmapv}/${_kmname}-${PV}.tar.xz" ;;
- esac
- ;;
- esac
-
- if [[ ${PN} = kdevelop* ]]; then
- case ${PV} in
- *.*.[6-9]? )
- SRC_URI="mirror://kde/unstable/kdevelop/${PV}/src/${_kmname}-${PV}.tar.xz"
- RESTRICT+=" mirror"
- ;;
- *)
- SRC_URI="mirror://kde/stable/kdevelop/${PV}/src/${_kmname}-${PV}.tar.xz" ;;
- esac
- fi
-
- if _kde_is_unreleased ; then
- RESTRICT+=" fetch"
- fi
-}
-
-# Determine fetch location for live sources
-_calculate_live_repo() {
- debug-print-function ${FUNCNAME} "$@"
-
- SRC_URI=""
-
- # @ECLASS-VARIABLE: EGIT_MIRROR
- # @DESCRIPTION:
- # This variable allows easy overriding of default kde mirror service
- # (anongit) with anything else you might want to use.
- EGIT_MIRROR=${EGIT_MIRROR:=https://anongit.kde.org}
-
- local _kmname
-
- # @ECLASS-VARIABLE: EGIT_REPONAME
- # @DESCRIPTION:
- # This variable allows overriding of default repository
- # name. Specify only if this differ from PN and KMNAME.
- if [[ -n ${EGIT_REPONAME} ]]; then
- # the repository and kmname different
- _kmname=${EGIT_REPONAME}
- elif [[ -n ${KMNAME} ]]; then
- _kmname=${KMNAME}
- else
- _kmname=${PN}
- fi
-
- if [[ ${PV} == ??.??.49.9999 && ${CATEGORY} = kde-apps ]]; then
- EGIT_BRANCH="Applications/$(ver_cut 1-2)"
- fi
-
- if [[ ${PV} != 9999 && ${CATEGORY} = kde-plasma ]]; then
- EGIT_BRANCH="Plasma/$(ver_cut 1-2)"
- fi
-
- if [[ ${PV} != 9999 && ${PN} = kdevelop* ]]; then
- EGIT_BRANCH="$(ver_cut 1-2)"
- fi
-
- EGIT_REPO_URI="${EGIT_MIRROR}/${_kmname}"
-}
-
-case ${KDE_BUILD_TYPE} in
- live) _calculate_live_repo ;;
- *) _calculate_src_uri ;;
-esac
-
-debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: SRC_URI is ${SRC_URI}"
-
# @FUNCTION: kde5_pkg_pretend
# @DESCRIPTION:
# Checks if the active compiler meets the minimum version requirements.
@@ -410,49 +260,12 @@ kde5_pkg_setup() {
_check_gcc_version
}
-# @FUNCTION: kde5_pkg_nofetch
-# @DESCRIPTION:
-# Intended for use in the KDE overlay. If this package matches something in
-# KDE_UNRELEASED, display a giant warning that the package has not yet been
-# released upstream and should not be used.
-kde5_pkg_nofetch() {
- if ! _kde_is_unreleased ; then
- return
- fi
-
- eerror " _ _ _ _ ____ _____ _ _____ _ ____ _____ ____ "
- eerror "| | | | \ | | _ \| ____| | | ____| / \ / ___|| ____| _ \ "
- eerror "| | | | \| | |_) | _| | | | _| / _ \ \___ \| _| | | | |"
- eerror "| |_| | |\ | _ <| |___| |___| |___ / ___ \ ___) | |___| |_| |"
- eerror " \___/|_| \_|_| \_\_____|_____|_____/_/ \_\____/|_____|____/ "
- eerror " "
- eerror " ____ _ ____ _ __ _ ____ _____ "
- eerror "| _ \ / \ / ___| |/ / / \ / ___| ____|"
- eerror "| |_) / _ \| | | ' / / _ \| | _| _| "
- eerror "| __/ ___ \ |___| . \ / ___ \ |_| | |___ "
- eerror "|_| /_/ \_\____|_|\_\/_/ \_\____|_____|"
- eerror
- eerror "${CATEGORY}/${P} has not been released to the public yet"
- eerror "and is only available to packagers right now."
- eerror ""
- eerror "This is not a bug. Please do not file bugs or contact upstream about this."
- eerror ""
- eerror "Please consult the upstream release schedule to see when this "
- eerror "package is scheduled to be released:"
- eerror "https://community.kde.org/Schedules"
-}
-
# @FUNCTION: kde5_src_unpack
# @DESCRIPTION:
# Unpack the sources, automatically handling both release and live ebuilds.
kde5_src_unpack() {
debug-print-function ${FUNCNAME} "$@"
-
- if [[ ${KDE_BUILD_TYPE} = live ]]; then
- git-r3_src_unpack
- else
- default
- fi
+ kde.org_src_unpack
}
# @FUNCTION: kde5_src_prepare
@@ -519,6 +332,7 @@ kde5_src_prepare() {
done
fi
+ # PORTING: bogus, overzealous 'en' docbook disabling is not carried over
if [[ ${KDE_BUILD_TYPE} = release && ${CATEGORY} != kde-apps ]] ; then
if [[ ${KDE_HANDBOOK} != false && -d ${KDE_DOC_DIR} && -v LINGUAS ]] ; then
pushd ${KDE_DOC_DIR} > /dev/null || die
diff --git a/eclass/perl-app.eclass b/eclass/perl-app.eclass
deleted file mode 100644
index 3fb897917c69..000000000000
--- a/eclass/perl-app.eclass
+++ /dev/null
@@ -1,52 +0,0 @@
-# Copyright 1999-2014 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-# @DEAD
-# This eclass is dead and all its consumers have been removed from
-# the tree.
-# Please use perl-module.eclass if you need phase functions, and
-# perl-functions.eclass if you don't.
-# In overlays, perl-app.eclass usage can be replaced by
-# perl-module.eclass without further changes.
-# Bug 637836. Removal in 14 days.
-
-# Author: Michael Cummings <mcummings@gentoo.org>
-# Maintained by the Perl herd <perl@gentoo.org>
-# @SUPPORTED_EAPIS: 5
-
-# If the ebuild doesn't override this, ensure we do not depend on the perl subslot value
-: ${GENTOO_DEPEND_ON_PERL_SUBSLOT:="no"}
-inherit perl-module
-
-case "${EAPI:-0}" in
- 5)
- ;;
- 6)
- die "EAPI=${EAPI} is not supported by perl-app.eclass. Please use perl-module.eclass instead."
- ;;
- *)
- die "EAPI=${EAPI} is not supported by perl-app.eclass"
- ;;
-esac
-
-# @FUNCTION: perl-app_src_prep
-# @DESCRIPTION:
-# This is a wrapper function to perl-app_src_configure().
-perl-app_src_prep() {
- perl-app_src_configure
-}
-
-# @FUNCTION: perl-app_src_configure
-# @DESCRIPTION:
-# This is a wrapper function to perl-module_src_configure().
-perl-app_src_configure() {
- perl-module_src_configure
-}
-
-# @FUNCTION: perl-app_src_compile
-# @DESCRIPTION:
-# This is a wrapper function to perl-module_src_compile().
-perl-app_src_compile() {
- has "${EAPI:-0}" 0 1 && perl-app_src_prep
- perl-module_src_compile
-}
diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
index 549dd5f2e56e..647eb04344d2 100644
--- a/eclass/python-utils-r1.eclass
+++ b/eclass/python-utils-r1.eclass
@@ -44,7 +44,7 @@ _PYTHON_ALL_IMPLS=(
jython2_7
pypy pypy3
python2_7
- python3_5 python3_6 python3_7
+ python3_5 python3_6 python3_7 python3_8
)
readonly _PYTHON_ALL_IMPLS
@@ -80,7 +80,7 @@ _python_impl_supported() {
# keep in sync with _PYTHON_ALL_IMPLS!
# (not using that list because inline patterns shall be faster)
case "${impl}" in
- python2_7|python3_[567]|jython2_7)
+ python2_7|python3_[5678]|jython2_7)
return 0
;;
pypy1_[89]|pypy2_0|python2_[56]|python3_[1234])
diff --git a/eclass/qmail.eclass b/eclass/qmail.eclass
index b6ef483aa82c..7e33611462be 100644
--- a/eclass/qmail.eclass
+++ b/eclass/qmail.eclass
@@ -64,7 +64,7 @@ is_prime() {
dospp() {
insinto "${QMAIL_HOME}"/plugins/
- insopts -o root -g "$GROUP_ROOT" -m 0755
+ insopts -o root -g "${GROUP_ROOT}" -m 0755
newins $1 ${2:-$(basename $1)}
}
@@ -77,8 +77,8 @@ dosupervise() {
local runfile=${2:-${service}} logfile=${3:-${service}-log}
[[ -z "${service}" ]] && die "no service given"
- insopts -o root -g "$GROUP_ROOT" -m 0755
- diropts -o root -g "$GROUP_ROOT" -m 0755
+ insopts -o root -g "${GROUP_ROOT}" -m 0755
+ diropts -o root -g "${GROUP_ROOT}" -m 0755
dodir ${SUPERVISE_DIR}/${service}{,/log}
fperms +t ${SUPERVISE_DIR}/${service}{,/log}
@@ -169,11 +169,13 @@ qmail_full_install() {
einfo "Installing all qmail software"
insopts -o root -g qmail -m 755
doins bouncesaying condredirect config-fast except preline qbiff \
- qmail-{pop3d,qmqpd,qmtpd,qread,qstat,smtpd,tcpok,tcpto} \
+ qmail-{qmqpd,qmtpd,qread,qstat,smtpd,tcpok,tcpto} \
qreceipt qsmhook tcp-env
+ use pop3 && doins qmail-pop3d
insopts -o root -g qmail -m 711
- doins qmail-{clean,getpw,local,popup,pw2u,remote,rspawn,send} splogger
+ doins qmail-{clean,getpw,local,pw2u,remote,rspawn,send} splogger
+ use pop3 && doins qmail-popup
insopts -o root -g qmail -m 700
doins qmail-{lspawn,newmrh,newu,start}
@@ -188,12 +190,12 @@ qmail_full_install() {
qmail_config_install() {
einfo "Installing stock configuration files"
insinto "${QMAIL_HOME}"/control
- insopts -o root -g "$GROUP_ROOT" -m 644
+ insopts -o root -g "${GROUP_ROOT}" -m 644
doins "${GENQMAIL_S}"/control/{conf-*,defaultdelivery}
einfo "Installing configuration sanity checker and launcher"
insinto "${QMAIL_HOME}"/bin
- insopts -o root -g "$GROUP_ROOT" -m 644
+ insopts -o root -g "${GROUP_ROOT}" -m 644
doins "${GENQMAIL_S}"/control/qmail-config-system
declare -F qmail_config_install_hook >/dev/null && \
@@ -244,9 +246,9 @@ qmail_maildir_install() {
done
einfo "Setting up default maildirs in the account skeleton"
- diropts -o root -g "$GROUP_ROOT" -m 755
+ diropts -o root -g "${GROUP_ROOT}" -m 755
insinto /etc/skel
- insopts -o root -g "$GROUP_ROOT" -m 644
+ insopts -o root -g "${GROUP_ROOT}" -m 644
newins "${GENQMAIL_S}"/control/defaultdelivery .qmail.sample
"${MAILDIRMAKE}" "${D}"/etc/skel/.maildir
keepdir /etc/skel/.maildir/{cur,new,tmp}
@@ -258,10 +260,16 @@ qmail_maildir_install() {
qmail_tcprules_install() {
dodir "${TCPRULES_DIR}"
insinto "${TCPRULES_DIR}"
- insopts -o root -g "$GROUP_ROOT" -m 0644
+ insopts -o root -g "${GROUP_ROOT}" -m 0644
doins "${GENQMAIL_S}"/tcprules/Makefile.qmail
doins "${GENQMAIL_S}"/tcprules/tcp.qmail-*
- use ssl || rm -f "${D}${TCPRULES_DIR}"/tcp.qmail-pop3sd
+ use ssl && use pop3 || rm -f "${D}${TCPRULES_DIR}"/tcp.qmail-pop3sd
+}
+
+qmail_supervise_install_one() {
+ dosupervise ${i}
+ diropts -o qmaill -g "${GROUP_ROOT}" -m 755
+ keepdir /var/log/qmail/${i}
}
qmail_supervise_install() {
@@ -269,16 +277,13 @@ qmail_supervise_install() {
cd "${GENQMAIL_S}"/supervise
- for i in qmail-{send,smtpd,qmtpd,qmqpd,pop3d}; do
- dosupervise ${i}
- diropts -o qmaill -g "$GROUP_ROOT" -m 755
- keepdir /var/log/qmail/${i}
+ for i in qmail-{send,smtpd,qmtpd,qmqpd}; do
+ qmail_supervise_install_one ${i}
done
- if use ssl; then
- dosupervise qmail-pop3sd
- diropts -o qmaill -g "$GROUP_ROOT" -m 755
- keepdir /var/log/qmail/qmail-pop3sd
+ if use pop3; then
+ qmail_supervise_install_one qmail-pop3d
+ use ssl && qmail_supervise_install_one qmail-pop3sd
fi
declare -F qmail_supervise_install_hook >/dev/null && \
@@ -288,7 +293,7 @@ qmail_supervise_install() {
qmail_spp_install() {
einfo "Installing qmail-spp configuration files"
insinto "${QMAIL_HOME}"/control/
- insopts -o root -g "$GROUP_ROOT" -m 0644
+ insopts -o root -g "${GROUP_ROOT}" -m 0644
doins "${GENQMAIL_S}"/spp/smtpplugins
einfo "Installing qmail-spp plugins"
@@ -308,16 +313,16 @@ qmail_ssl_install() {
einfo "Installing SSL Certificate creation script"
insinto "${QMAIL_HOME}"/control
- insopts -o root -g "$GROUP_ROOT" -m 0644
+ insopts -o root -g "${GROUP_ROOT}" -m 0644
doins "${GENQMAIL_S}"/ssl/servercert.cnf
insinto "${QMAIL_HOME}"/bin
- insopts -o root -g "$GROUP_ROOT" -m 0755
+ insopts -o root -g "${GROUP_ROOT}" -m 0755
doins "${GENQMAIL_S}"/ssl/mkservercert
einfo "Installing RSA key generation cronjob"
insinto /etc/${CRON_FOLDER}
- insopts -o root -g "$GROUP_ROOT" -m 0755
+ insopts -o root -g "${GROUP_ROOT}" -m 0755
doins "${GENQMAIL_S}"/ssl/qmail-genrsacert.sh
keepdir "${QMAIL_HOME}"/control/tlshosts
@@ -375,7 +380,9 @@ qmail_rootmail_fixup() {
qmail_tcprules_fixup() {
mkdir -p "${TCPRULES_DIR}"
- for f in {smtp,qmtp,qmqp,pop3}{,.cdb}; do
+ local POP_FILES=
+ use pop3 && POP_FILES="pop3 pop3.cdb"
+ for f in {smtp,qmtp,qmqp}{,.cdb} ${POP_FILES}; do
old="/etc/tcp.${f}"
new="${TCPRULES_DIR}/tcp.qmail-${f}"
fail=0
@@ -417,13 +424,15 @@ qmail_supervise_config_notice() {
elog "ln -s ${SUPERVISE_DIR}/qmail-send /service/qmail-send"
elog "ln -s ${SUPERVISE_DIR}/qmail-smtpd /service/qmail-smtpd"
elog
- elog "To start the pop3 server as well, create the following link:"
- elog "ln -s ${SUPERVISE_DIR}/qmail-pop3d /service/qmail-pop3d"
- elog
- if use ssl; then
- elog "To start the pop3s server as well, create the following link:"
- elog "ln -s ${SUPERVISE_DIR}/qmail-pop3sd /service/qmail-pop3sd"
+ if use pop3; then
+ elog "To start the pop3 server as well, create the following link:"
+ elog "ln -s ${SUPERVISE_DIR}/qmail-pop3d /service/qmail-pop3d"
elog
+ if use ssl; then
+ elog "To start the pop3s server as well, create the following link:"
+ elog "ln -s ${SUPERVISE_DIR}/qmail-pop3sd /service/qmail-pop3sd"
+ elog
+ fi
fi
elog "Additionally, the QMTP and QMQP protocols are supported, "
elog "and can be started as:"
diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index 99643eafdd0f..a3081c38bac1 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -147,11 +147,13 @@ tc_has_feature() {
}
if [[ ${PN} != "kgcc64" && ${PN} != gcc-* ]] ; then
- IUSE+=" altivec debug +cxx +fortran +nptl" TC_FEATURES+=(fortran nptl)
+ IUSE+=" altivec debug +cxx +nptl" TC_FEATURES+=(nptl)
[[ -n ${PIE_VER} ]] && IUSE+=" nopie"
[[ -n ${HTB_VER} ]] && IUSE+=" boundschecking"
[[ -n ${D_VER} ]] && IUSE+=" d"
[[ -n ${SPECS_VER} ]] && IUSE+=" nossp"
+ # fortran support appeared in 4.1, but 4.1 needs outdated mpfr
+ tc_version_is_at_least 4.2 && IUSE+=" +fortran" TC_FEATURES+=(fortran)
tc_version_is_at_least 3 && IUSE+=" doc hardened multilib objc"
tc_version_is_between 3 7 && IUSE+=" awt gcj" TC_FEATURES+=(gcj)
tc_version_is_at_least 3.3 && IUSE+=" pgo"