summaryrefslogtreecommitdiff
path: root/eclass/kde5.eclass
diff options
context:
space:
mode:
authorManuel Rüger <mrueg@gentoo.org>2015-04-27 00:29:48 +0200
committerManuel Rüger <mrueg@gentoo.org>2015-04-27 00:29:48 +0200
commit603f50e1bacae45e1a24452e07d1381e2ea0c786 (patch)
tree817dde4e38a9c0bf7cc4c4054cb9fb0d8fb56306 /eclass/kde5.eclass
parent6e560fde9876e6c732068bcc234e0b696e5f6d07 (diff)
downloadkde-603f50e1bacae45e1a24452e07d1381e2ea0c786.tar.gz
kde-603f50e1bacae45e1a24452e07d1381e2ea0c786.tar.bz2
kde-603f50e1bacae45e1a24452e07d1381e2ea0c786.zip
[eclass] Add fetch restriction to inform users about packages that are not released yet.
Diffstat (limited to 'eclass/kde5.eclass')
-rw-r--r--eclass/kde5.eclass69
1 files changed, 66 insertions, 3 deletions
diff --git a/eclass/kde5.eclass b/eclass/kde5.eclass
index 0a195cb8b17..b039e363ede 100644
--- a/eclass/kde5.eclass
+++ b/eclass/kde5.eclass
@@ -28,7 +28,7 @@ if [[ ${KDE_BUILD_TYPE} = live ]]; then
esac
fi
-EXPORT_FUNCTIONS pkg_pretend pkg_setup src_unpack src_prepare src_configure src_compile src_test src_install pkg_preinst pkg_postinst pkg_postrm
+EXPORT_FUNCTIONS pkg_pretend 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:
@@ -92,9 +92,17 @@ fi
# @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
+# add a dependency on sec-policy/selinux-${KDE_SELINUX_MODULE} to (R)DEPEND.
: ${KDE_SELINUX_MODULE:=none}
+# @ECLASS-VARIABLE: KDE_RELEASE_DATE
+# @DESCRIPTION:
+# Used to display a fetch restriction for packages that have not been published yet.
+# If set to "none", use internal schedule.
+# Otherwise set it to a date formatted as YYMMDD.
+# Internal schedule is adjusted in _get_release_date().
+: ${KDE_RELEASE_DATE:=none}
+
if [[ ${KDEBASE} = kdevelop ]]; then
HOMEPAGE="http://www.kdevelop.org/"
else
@@ -308,9 +316,53 @@ _calculate_live_repo() {
esac
}
+
+_get_release_date() {
+ debug-print-function ${FUNCNAME} "$@"
+ case ${CATEGORY} in
+ kde-frameworks)
+ case ${PV} in
+ 5.10) echo "20150507" ;;
+ 5.11) echo "20150611" ;;
+ 5.12) echo "20150709" ;;
+ 5.13) echo "20150806" ;;
+ *) echo "none" ;;
+ esac
+ ;;
+ kde-plasma)
+ case ${PV} in
+ 5.3.0) echo "20150428" ;;
+ *) echo "none" ;;
+ esac
+ ;;
+ kde-applications)
+ case ${PV} in
+ 15.04.1) echo "20150512" ;;
+ 15.04.2) echo "20150602" ;;
+ 15.04.3) echo "20150630" ;;
+ *) echo "none" ;;
+ esac
+ ;;
+ *) echo "none" ;;
+ esac
+}
+
+_check_fetch_restriction() {
+ debug-print-function ${FUNCNAME} "$@"
+ if [[ ${KDE_RELEASE_DATE} == "none" ]]; then
+ KDE_RELEASE_DATE=_get_releasedate
+ fi
+ if [[ ${KDE_RELEASE_DATE} != "none" ]]; then
+ if [[ $(date +"%Y%m%d") < ${KDE_RELEASE_DATE} ]]; then
+ RESTRICT+=" fetch"
+ fi
+ fi
+}
+
case ${KDE_BUILD_TYPE} in
live) _calculate_live_repo ;;
- *) _calculate_src_uri ;;
+ *) _calculate_src_uri
+ _check_fetch_restriction ;;
esac
debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: SRC_URI is ${SRC_URI}"
@@ -331,6 +383,17 @@ kde5_pkg_setup() {
_check_gcc_version
}
+# @FUNCTION: kde5_pkg_nofetch
+# @DESCRIPTION:
+# Display package publication status
+kde5_pkg_nofetch() {
+ einfo "${CATEGORY}/${P} has not been released to the public yet"
+ einfo "and is only available to packagers right now."
+ einfo ""
+ einfo "Further information:"
+ einfo "https://techbase.kde.org/Schedules"
+}
+
# @FUNCTION: kde5_src_unpack
# @DESCRIPTION:
# Function for unpacking KDE 5.