diff options
author | Dan Armak <danarmak@gentoo.org> | 2002-08-13 12:24:34 +0000 |
---|---|---|
committer | Dan Armak <danarmak@gentoo.org> | 2002-08-13 12:24:34 +0000 |
commit | 6d4511f7eb0d05f01c47c94951be05904d442aa6 (patch) | |
tree | 7b6d4f0787f2fbf45d31b05c78e12ce89e81a005 /eclass | |
parent | fix for installing outside the kde prefix: should use not /usr/kde/cvs (diff) | |
download | historical-6d4511f7eb0d05f01c47c94951be05904d442aa6.tar.gz historical-6d4511f7eb0d05f01c47c94951be05904d442aa6.tar.bz2 historical-6d4511f7eb0d05f01c47c94951be05904d442aa6.zip |
big commit i've been working on for the last few days. the important part ebuild-wise is that kde apps now go into /usr; there have also been some SLOT changes (making things uniform). see the various postings.
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/kde-dist.eclass | 5 | ||||
-rw-r--r-- | eclass/kde-functions.eclass | 187 | ||||
-rw-r--r-- | eclass/kde.eclass | 8 | ||||
-rw-r--r-- | eclass/kde.org.eclass | 3 |
4 files changed, 98 insertions, 105 deletions
diff --git a/eclass/kde-dist.eclass b/eclass/kde-dist.eclass index 2703af8b3f2c..01fdff48464d 100644 --- a/eclass/kde-dist.eclass +++ b/eclass/kde-dist.eclass @@ -1,7 +1,7 @@ # Copyright 1999-2000 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License, v2 or later # Author Dan Armak <danarmak@gentoo.org> -# $Header: /var/cvsroot/gentoo-x86/eclass/kde-dist.eclass,v 1.15 2002/07/18 14:07:15 danarmak Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/kde-dist.eclass,v 1.16 2002/08/13 12:24:34 danarmak Exp $ # This is the kde-dist eclass for >=2.2.1 kde base packages. Don't use for kdelibs though :-) # Don't use it for e.g. kdevelop, koffice because of their separate versionnig schemes. inherit kde-base kde.org @@ -10,8 +10,6 @@ INHERITED="$INHERITED $ECLASS" need-kde $PV -SLOT="${KDEMAJORVER}.${KDEMINORVER}" - # 3.1 prereleases [ "$PV" == "3.1_alpha1" ] && S=${WORKDIR}/${PN}-3.0.6 @@ -23,3 +21,4 @@ HOMEPAGE="http://www.kde.org/" LICENSE="GPL-2" +SLOT="$KDEMAJORVER.$KDEMINORVER" diff --git a/eclass/kde-functions.eclass b/eclass/kde-functions.eclass index ad4ca9e86b2e..3774e450ebe6 100644 --- a/eclass/kde-functions.eclass +++ b/eclass/kde-functions.eclass @@ -1,7 +1,7 @@ # Copyright 1999-2000 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License, v2 or later # Author Dan Armak <danarmak@gentoo.org> -# $Header: /var/cvsroot/gentoo-x86/eclass/kde-functions.eclass,v 1.21 2002/08/06 11:58:16 danarmak Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/kde-functions.eclass,v 1.22 2002/08/13 12:24:34 danarmak Exp $ # This contains everything except things that modify ebuild variables and functions (e.g. $P, src_compile() etc.) ECLASS=kde-functions INHERITED="$INHERITED $ECLASS" @@ -68,7 +68,15 @@ need-kde() { qtver-from-kdever $KDEVER need-qt $selected_version - SLOT="$KDEMAJORVER" + if [ -n "$KDEBASE" ]; then + #if [ "$PV" = "5" ]; then + # SLOT="cvs" + #else + SLOT="$KDEMAJORVER.$KDEMINORVER" + #fi + else + SLOT="0" + fi } @@ -94,8 +102,27 @@ set-kdedir() { ;; esac + # set install location: + # - 3rd party apps go into /usr, and have SLOT="0". + # - kde-base category ebuilds go into /usr/kde/$MAJORVER.$MINORVER, + # and have SLOT="$MAJORVER.$MINORVER". + # - kde-base category cvs ebuilds have major version 5 and go into + # /usr/kde/cvs; they have SLOT="cvs". + # - Backward-compatibility exceptions: all kde2 packages (kde-base or otherwise) + # go into /usr/kde/2. kde 3.0.x goes into /usr/kde/3 (and not 3.0). + # - kde-base category ebuilds always depend on their exact matching version of + # kdelibs and link against it. Other ebuilds link aginst the latest one found. + # - This function exports $PREFIX (location to install to) and $KDEDIR + # (location of kdelibs to link against) for all ebuilds. + # + # -- Overrides - deprecated but working for now: -- + # - If $KDEPREFIX is defined (in the profile or env), it overrides everything + # and both base and 3rd party kde stuff goes in there. + # - If $KDELIBSDIR is defined, the kdelibs installed in that location will be + # used, even by kde-base packages. + # get version elements - IFSBACKUP=$IFS + IFSBACKUP="$IFS" IFS=".-_" for x in $1; do if [ -z "$KDEMAJORVER" ]; then KDEMAJORVER=$x @@ -103,109 +130,69 @@ set-kdedir() { else if [ -z "$KDEREVISION" ]; then KDEREVISION=$x fi; fi; fi done - IFS=$IFSBACKUP + [ -z "$KDEMINORVER" ] && KDEMINORVER="0" + [ -z "$KDEREVISION" ] && KDEREVISION="0" + IFS="$IFSBACKUP" + debug-print "$FUNCNAME: version breakup: KDEMAJORVER=$KDEMAJORVER KDEMINORVER=$KDEMINORVER KDEREVISION=$KDEREVISION" + + # is this a kde-base ebuid? + if [ "${INHERITED//kde-dist}" != "$INHERITED" ] || [ "$PN" == kdelibs ] || [ "$PN" == arts ]; then + export KDEBASE="true" + fi - # set install location: - # - 3rd party apps go into /usr/kde/$MAJORVER by default and have SLOT="$MAJORVER" - # - kde-base ebuilds go into /usr/kde/$MAJORVER.$MINORVER by default - # and have SLOT="$MAJORVER.$MINORVER" - # - kde-base cvs ebuilds have major version 5 and go into /usr/kde/cvs by default; - # they have SLOT="cvs" - # - if $KDE3DIR is defined (by the user), it overrides everything - # and both base and 3rd party kde stuff goes in there, while - # using the kdelibs (assumedly) present in $KDE3LIBSDIR - # which equals $KDE3DIR if not set (for kde3, same applies to kde2 with $KDE2DIR etc.) - # kde.eclass:src_compile:myconf doesn't know about it, we just tell it - # $KDEDIR (libraries location) and $PREFIX (install location) + + # install prefix + if [ -n "$KDEPREFIX" ]; then + export PREFIX="$KDEPREFIX" + elif [ "$KDEMAJORVER" == "2" ]; then + export PREFIX="/usr/kde/2" + else + if [ -z "$KDEBASE" ]; then + export PREFIX="/usr" + else + case $KDEMAJORVER.$KDEMINORVER in + 3.0) export PREFIX="/usr/kde/3";; + 3.1) export PREFIX="/usr/kde/3.1";; + 3.2) export PREFIX="/usr/kde/3.2";; + 5.0) export PREFIX="/usr/kde/cvs";; + esac + fi + fi - case $KDEMAJORVER in - 2) - if [ -n "$KDE2DIR" ]; then - export PREFIX=${KDE2DIR} - export KDEDIR=${KDE2LIBSDIR} - else - export PREFIX=/usr/kde/2 - # backward compatibility, kde 2.2.2 goes in /usr/kde/2 not /usr/kde/2.2 - export KDEDIR=/usr/kde/2 - fi - ;; - 3) - if [ -n "$KDE3DIR" ]; then - # override all other considerations - export PREFIX=${KDE3DIR} - else - # base kde part - if [ "${INHERITED//kde-dist}" != "${INHERITED}" -o PN=kdelibs -o PN=arts ]; then - case $KDEMINORVER in - "") export PREFIX=/usr/kde/3 - ;; - 0) export PREFIX=/usr/kde/3 - # kde 3.1 alphas - [ "$KDEREVISION" -ge 6 ] && export PREFIX=/usr/kde/3.1 - ;; - 1) export PREFIX=/usr/kde/3.1 - ;; - 2) export PREFIX=/usr/kde/3.2 - ;; - esac - else - # 3rd party kde app - export PREFIX=/usr/kde/3 - fi - fi - - # set kdelibs location - # KDE3LIBSDIR overrides all considerations - if [ -n "$KDE3LIBSDIR" ]; then - export KDEDIR=${KDE3LIBSDIR} - else - # for kde base, equal to prefix - if [ "${INHERITED//kde-dist}" != "$INHERITED" ] || [ "$PN" == kdelibs ] || [ "$PN" == arts ]; then - debug-print "base package" - export KDEDIR=$PREFIX - else - # for everything else: try to locate latest version - # of kdelibs installed. if yours is outside the standard - # paths, that's what KDE3LIBSDIR is for, use it - for x in /usr/kde/{cvs,3.2,3.1,3.0,3} $KDEDIR $KDE3DIR $KDE3LIBSDIR /usr/kde/*; do - debug-print "checking for $x/include/kwin.h..." - if [ -f "${x}/include/kwin.h" ]; then - debug-print found - export KDEDIR="$x" - break - fi - done + # kdelibs location + if [ -n "$KDELIBSDIR" ]; then + export KDEDIR="$KDELIBSDIR" + elif [ "$KDEMAJORVER" == "2" ]; then + export KDEDIR="/usr/kde/2" + else + if [ -z "$KDEBASE" ]; then + # find the latest kdelibs installed + for x in /usr/kde/{cvs,3.2,3.1,3.0,3} $PREFIX $KDE3LIBSDIR $KDELIBSDIR $KDE3DIR $KDEDIR /usr/kde/*; do + if [ -f "${x}/include/kwin.h" ]; then + debug-print found + export KDEDIR="$x" + break fi - fi - ;; - - 5) - # cvs - if [ -n "$KDECVSDIR" ]; then - # override all other considerations - export PREFIX="${KDECVSDIR}" - else - # cvs ebuilds are all from kde-base - export PREFIX="/usr/kde/cvs" - fi - - # set kdelibs location - # KDECVSLIBSDIR overrides all considerations - if [ -n "$KDECVSLIBSDIR" ]; then - export KDEDIR=${KDECVSLIBSDIR} - else - # for kde base, equal to prefix - export KDEDIR=$PREFIX - fi - ;; - - esac # $KDEMAJORVER in + done + else + # kde-base ebuilds msut always use the exact version of kdelibs they came with + case $KDEMAJORVER.$KDEMINORVER in + 3.0) export KDEDIR="/usr/kde/3";; + 3.1) export KDEDIR="/usr/kde/3.1";; + 3.2) export KDEDIR="/usr/kde/3.2";; + 5.0) export KDEDIR="/usr/kde/cvs";; + esac + fi + fi + # check that we've set everything - [ -z "$PREFIX" ] && die "$ECLASS: Error: could not set install prefix, consult log" - [ "${INHERITED//kde-dist}" != "${INHERITED}" -a -z "$KDEDIR" ] && die "$ECLASS: Error: could set kdelibs location, consult log" + [ -z "$PREFIX" ] && die "$FUNCNAME: Error: could not set install prefix, consult log" + # it used to be like this. any idea why??? + #[ "${INHERITED//kde-dist}" != "${INHERITED}" -a -z "$KDEDIR" ] && die "$ECLASS: Error: couldn't set kdelibs location, consult log" + [ -z "$KDEDIR" ] && die "$FUNCNAME: Error: couldn't set kdelibs location, consult log" - debug-print "$FUNCNAME: result: KDEDIR=$KDEDIR, PREFIX=$PREFIX" + debug-print "$FUNCNAME: Will use the kdelibs installed in $KDEDIR, and install into $PREFIX." } diff --git a/eclass/kde.eclass b/eclass/kde.eclass index 736069bf8d7f..a109b8e7a7e3 100644 --- a/eclass/kde.eclass +++ b/eclass/kde.eclass @@ -1,7 +1,7 @@ # Copyright 1999-2000 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License, v2 or later # Author Dan Armak <danarmak@gentoo.org> -# $Header: /var/cvsroot/gentoo-x86/eclass/kde.eclass,v 1.51 2002/07/15 22:20:53 danarmak Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/kde.eclass,v 1.52 2002/08/13 12:24:34 danarmak Exp $ # The kde eclass is inherited by all kde-* eclasses. Few ebuilds inherit straight from here. inherit base kde-functions ECLASS=kde @@ -9,10 +9,16 @@ INHERITED="$INHERITED $ECLASS" newdepend /autotools +newdepend "~kde-base/kde-env-3" + DESCRIPTION="Based on the $ECLASS eclass" HOMEPAGE="http://www.kde.org/" + +# overridden in other places like ked-dist, kde-source and individual ebuilds +SLOT="0" + kde_src_compile() { debug-print-function $FUNCNAME $* diff --git a/eclass/kde.org.eclass b/eclass/kde.org.eclass index 86d3089a8104..9fc48dd220f1 100644 --- a/eclass/kde.org.eclass +++ b/eclass/kde.org.eclass @@ -1,7 +1,7 @@ # Copyright 1999-2000 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License, v2 or later # Author Dan Armak <danarmak@gentoo.org> -# $Header: /var/cvsroot/gentoo-x86/eclass/kde.org.eclass,v 1.12 2002/07/21 11:51:42 danarmak Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/kde.org.eclass,v 1.13 2002/08/13 12:24:34 danarmak Exp $ # Contains the locations of ftp.kde.org packages and their mirrors ECLASS=kde.org INHERITED="$INHERITED $ECLASS" @@ -11,6 +11,7 @@ case "$PV" in 1*) SRC_PATH="stable/3.0.2/src/${P}.tar.bz2";; # backward compatibility for unmerging ebuilds 2.2.2) SRC_PATH="2.2.2/src/${P}.tar.bz2" ;; 3.1_alpha1) SRC_PATH="unstable/kde-3.1-alpha1/src/${P//3.1_alpha1/3.0.6}.tar.bz2" ;; + 3.1_beta1) SRC_PATH="unstable/kde-3.1-beta1/src/${P//3.1_beta/3.0.6}.tar.bz2" ;; 3*) SRC_PATH="stable/$PV/src/${P}.tar.bz2" ;; 5) SRC_URI="" # cvs ebuilds, no SRC_URI needed debug-print "$ECLASS: finished, cvs detected, SRC_URI=$SRC_URI" |