diff options
author | Carsten Lohrke <carlo@gentoo.org> | 2006-06-11 10:28:58 +0000 |
---|---|---|
committer | Carsten Lohrke <carlo@gentoo.org> | 2006-06-11 10:28:58 +0000 |
commit | 83cb6f4a4124231ff6dfa164a1bc5bb6d7a321ce (patch) | |
tree | 96dacc394fcc4321c1b5c9d66c2c35e0c018da47 /eclass | |
parent | Stable on hppa. (diff) | |
download | gentoo-2-83cb6f4a4124231ff6dfa164a1bc5bb6d7a321ce.tar.gz gentoo-2-83cb6f4a4124231ff6dfa164a1bc5bb6d7a321ce.tar.bz2 gentoo-2-83cb6f4a4124231ff6dfa164a1bc5bb6d7a321ce.zip |
Improved KDE patch handling.
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/kde-functions.eclass | 9 | ||||
-rw-r--r-- | eclass/kde-meta.eclass | 6 | ||||
-rw-r--r-- | eclass/kde.eclass | 34 |
3 files changed, 38 insertions, 11 deletions
diff --git a/eclass/kde-functions.eclass b/eclass/kde-functions.eclass index d1b9a479febd..bed7c69f8b9c 100644 --- a/eclass/kde-functions.eclass +++ b/eclass/kde-functions.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/kde-functions.eclass,v 1.140 2006/06/06 22:19:13 flameeyes Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/kde-functions.eclass,v 1.141 2006/06/11 10:28:58 carlo Exp $ # # Author Dan Armak <danarmak@gentoo.org> # @@ -377,6 +377,13 @@ get-child-packages () { done } +is-parent-package() { + echo "$KDE_DERIVATION_MAP" | while read parent child; do + [[ "${parent}" == "$1" ]] && return 1 + done + return 0 +} + # convinience functions for requesting autotools versions need-automake() { diff --git a/eclass/kde-meta.eclass b/eclass/kde-meta.eclass index 6834145b8990..0c9fa025d7e5 100644 --- a/eclass/kde-meta.eclass +++ b/eclass/kde-meta.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/kde-meta.eclass,v 1.73 2006/05/02 22:32:54 swegener Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/kde-meta.eclass,v 1.74 2006/06/11 10:28:58 carlo Exp $ # # Author Dan Armak <danarmak@gentoo.org> # Simone Gotti <motaboy@gentoo.org> @@ -364,8 +364,8 @@ function kde-meta_src_unpack() { fi done - # apply any patches - kde_src_unpack autopatch + # Don't add a param here without looking at its implementation. + kde_src_unpack # kdebase: Remove the installation of the "startkde" script. if [[ "$KMNAME" == "kdebase" ]]; then diff --git a/eclass/kde.eclass b/eclass/kde.eclass index 7d2bea57a1be..13f3bcc5b8a3 100644 --- a/eclass/kde.eclass +++ b/eclass/kde.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/kde.eclass,v 1.164 2006/06/10 16:19:54 swegener Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/kde.eclass,v 1.165 2006/06/11 10:28:58 carlo Exp $ # # Author Dan Armak <danarmak@gentoo.org> # @@ -87,12 +87,32 @@ kde_pkg_setup() { kde_src_unpack() { debug-print-function $FUNCNAME $* - # call base_src_unpack, which implements most of the functionality and has sections, - # unlike this function. The change from base_src_unpack to kde_src_unpack is thus - # wholly transparent for ebuilds. - base_src_unpack $* - - # kde-specific stuff stars here + local PATCHDIR="${WORKDIR}/patches/" + if [[ -z $* ]] ; then + # Unpack first and deal with KDE patches after examing possible patch sets. + # To be picked up, patches need to be named $PN-$PV-*{diff,patch} and be + # placed in $PATCHDIR. Monolithic ebuilds will use the split ebuild patches. + base_src_unpack unpack + if [[ -d "${PATCHDIR}" ]] ; then + if is-parent-package ${CATEGORY}/${PN} ; then + packages="$(get-child-packages ${CATEGORY}/${PN})" + packages="${packages//${CATEGORY}\//} ${PN}" + else + packages="${PN}" + fi + for _p in ${packages} ; do + PATCHES="${PATCHES} $(ls ${PATCHDIR}/${_p}-${PV}-*{diff,patch} 2>/dev/null)" + if [[ -n "${KDEBASE}" ]] ; then + PATCHES="${PATCHES} $(ls ${PATCHDIR}/${_p}-${SLOT}-*{diff,patch} 2>/dev/null)" + fi + done + fi + [[ -n ${PATCHES} ]] && base_src_unpack autopatch + else + # Call base_src_unpack, which has sections, to do unpacking and patching + # step by step transparently as defined in the ebuild. + base_src_unpack $* + fi [[ -z ${KDE_S} ]] && KDE_S="${S}" |