summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Palimaka <kensington@gentoo.org>2016-10-06 05:40:46 +1100
committerMichael Palimaka <kensington@gentoo.org>2016-10-06 05:42:32 +1100
commit11af3f136acfd105ee6bde6ede126aebf5f9b0c8 (patch)
treee5834fc64d2c3984f425c4fe90d4873056d6a736
parentkde5.eclass: Add warning for kf5 applications in Plasma-4 (diff)
downloadgentoo-11af3f136acfd105ee6bde6ede126aebf5f9b0c8.tar.gz
gentoo-11af3f136acfd105ee6bde6ede126aebf5f9b0c8.tar.bz2
gentoo-11af3f136acfd105ee6bde6ede126aebf5f9b0c8.zip
kde5.eclass: add overlay-specific logic
While this overlay-specific logic is never expected to actually be used in the main tree, it makes tracking and merging future updates from the overlay a lot easier.
-rw-r--r--eclass/kde5.eclass55
1 files changed, 54 insertions, 1 deletions
diff --git a/eclass/kde5.eclass b/eclass/kde5.eclass
index d41e99d6dd7f..45065afbc39d 100644
--- a/eclass/kde5.eclass
+++ b/eclass/kde5.eclass
@@ -31,7 +31,7 @@ if [[ -v KDE_GCC_MINIMAL ]]; then
EXPORT_FUNCTIONS pkg_pretend
fi
-EXPORT_FUNCTIONS pkg_setup src_unpack src_prepare src_configure src_compile src_test src_install pkg_preinst pkg_postinst pkg_postrm
+EXPORT_FUNCTIONS pkg_setup pkg_nofetch src_unpack src_prepare src_configure src_compile src_test src_install pkg_preinst pkg_postinst pkg_postrm
# @ECLASS-VARIABLE: QT_MINIMAL
# @DESCRIPTION:
@@ -118,6 +118,14 @@ fi
# add a dependency on sec-policy/selinux-${KDE_SELINUX_MODULE} to (R)DEPEND.
: ${KDE_SELINUX_MODULE:=none}
+# @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=( )
+
if [[ ${KDEBASE} = kdevelop ]]; then
HOMEPAGE="https://www.kdevelop.org/"
elif [[ ${KDEBASE} = kdel10n ]]; then
@@ -241,6 +249,17 @@ if [[ -n ${KDEBASE} && ${KDEBASE} = kdevelop && ${KDE_BUILD_TYPE} = release ]];
fi
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} "$@"
@@ -328,6 +347,10 @@ _calculate_src_uri() {
esac
done
fi
+
+ if _kde_is_unreleased ; then
+ RESTRICT+=" fetch"
+ fi
}
# Determine fetch location for live sources
@@ -395,6 +418,36 @@ kde5_pkg_setup() {
_check_gcc_version
}
+# @FUNCTION: kde5_pkg_nofetch
+# @DESCRIPTION:
+# Display package publication status
+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:
# Function for unpacking KDE 5.