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/kde-functions.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/kde-functions.eclass')
-rw-r--r-- | eclass/kde-functions.eclass | 187 |
1 files changed, 87 insertions, 100 deletions
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." } |