/[gentoo-x86]/eclass/kde-source.eclass
Gentoo

Contents of /eclass/kde-source.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.18 - (show annotations) (download)
Thu Jul 17 14:55:10 2003 UTC (16 years, 11 months ago) by danarmak
Branch: MAIN
Branch point for: RELEASE-1_4
Changes since 1.17: +4 -13 lines
i finally understood why $S was sometimes getting the wrong value (eg of $WORKDIR or of $WORKDIR/$P): it's being
set from ECVS_MODULE, but that can itself be unset, and initialized rfom $PN later on (at the beginning of
_src_unpack). so we now initialize $S from $PN as well if $ECVS_MODULE is empty.
also i removed a big chunk of code that is no longer needed because we now always have a correct $S setting at that
point.

1 # Copyright 1999-2003 Gentoo Technologies, Inc.
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /home/cvsroot/gentoo-x86/eclass/kde-source.eclass,v 1.17 2003/07/13 13:04:04 danarmak Exp $
4 #
5 # Author Dan Armak <danarmak@gentoo.org>
6 #
7 # This is for kde-base cvs ebuilds. Read comments about settings.
8 # It uses $S and sets $SRC_URI, so inherit it as late as possible (certainly after any other eclasses).
9 # See http://www.gentoo.org/~danarmak/kde-cvs.html !
10 # All of the real functionality is in cvs.eclass; this just adds some trivial kde-specific items
11
12 ECLASS=kde-source
13 INHERITED="$INHERITED $ECLASS"
14
15 # --- begin user-configurable settings ---
16
17 # Set yours in profile (e.g. make.conf), or export from the command line to override.
18 # Most have acceptable default values or are set by the ebuilds, but be sure to read the comments
19 # in cvs.eclass for detailed descriptions of them all.
20 # You should probably set at least ECVS_SERVER.
21
22 # TODO: add options to store the modules as tarballs in $DISTDIR or elsewhere
23
24 # Under this directory the cvs modules are stored/accessed
25 # Storing in tarballs in $DISTDIR to be implemented soon
26 [ -z "$ECVS_TOP_DIR" ] && ECVS_TOP_DIR="$DISTDIR/cvs-src/kde"
27
28 # Set to name of cvs server. Set to "" to disable fetching (offline mode).
29 # In offline mode, we presume that modules are already checked out at the specified
30 # location and that they shouldn't be updated.
31 # Format example: "anoncvs.kde.org:/home/kde" (without :pserver:anonymous@ part)
32 # Mirror list is available at http://developer.kde.org/source/anoncvs.html
33 [ -z "$ECVS_SERVER" ] && ECVS_SERVER="anoncvs.kde.org:/home/kde"
34 [ -z "$ECVS_AUTH" ] && ECVS_AUTH="pserver"
35
36 # for apps living inside modules like kdenonbeta - see also beginning of our _src_unpack
37 # KCVS_SUBDIR=...
38
39 # If a tag is specified as ECVS_BRANCH, it will be used for the kde-common module
40 # as well. If that is wrong (fex when checking out kopete branch kopete_0_6_2_release),
41 # use KCVS_BRANCH instead.
42
43 # you can set this variable (in your ebuild, of course) to disable fetching of <module>/doc/*
44 # under the KCVS_SUBDIR scheme. this is appropriate for kde-i18n stuff, but not for
45 # eg kdeextragear, kdenonbeta etc.
46 # KCVS_SUBDIR_NODOC=true
47
48 # Other variables: see cvs.eclass
49
50 # we do this here and not in the very beginning because we need to keep
51 # the configuration order intact: env. and profile settings override
52 # kde-source.eclass defaults, which in turn override cvs.eclass defaults
53 inherit cvs
54 #... and reset $ECLASS. Ugly I know, hopefully I can prettify it someday
55 ECLASS=kde-source
56
57 # --- end user-configurable settings ---
58
59 DESCRIPTION="$DESCRIPTION (cvs) "
60
61 # set this to more easily maintain cvs and std ebuilds side-by-side
62 # (we don't need to remove SRC_URI, kde-dist.eclass, kde.org.eclass etc
63 # from the cvs ones). To download patches or something, set SRC_URI again after
64 # inheriting kde_source.
65 SRC_URI=""
66
67
68 if [ -n "$KCVS_SUBDIR" -o -n "$KCVS_MODULE" ]; then
69 S="$WORKDIR/$KCVS_MODULE"
70 else
71 # default for kde-base ebuilds
72 S="$WORKDIR/${ECVS_MODULE:-$PN}"
73 fi
74
75
76 kde-source_src_unpack() {
77
78 debug-print-function $FUNCNAME $*
79
80 # decide what the main module is that we're fetching and call cvs_src_unpack
81 # the other things are fetched later
82 # (kde-common/admin, <module>/doc/*, <module>/<files>)
83 if [ -n "$KCVS_SUBDIR" ]; then
84 ECVS_MODULE="$KCVS_MODULE/$KCVS_SUBDIR"
85 elif [ -n "$KCVS_MODULE" ]; then
86 ECVS_MODULE="$KCVS_MODULE"
87 else
88 # default for kde-base ebuilds
89 ECVS_MODULE="$PN"
90 fi
91
92 cvs_src_unpack
93
94 # subdirs of kde modules get special treatment that is designed for
95 # subdirs which are separate selfcontained apps and only need
96 # automake/autoconf stuff etc. added to them.
97 # this fits for apps from kdenonbeta, kdeextragear modules etc.
98 # So, if we just fetched a module's subdir, fetch the top directory
99 # of the module (non-recursively) and make it build only the subdirectory
100 # we need.
101 # ECVS_LOCALNAME note: disabled when KCVS_SUBDIR is enabled because the logic
102 # of how it should work is unclear and I don't see any need for it here anyway
103 if [ -n "$KCVS_SUBDIR" ]; then
104
105 if [ -n "$KCVS_BRANCH" ]; then
106 ECVS_BRANCH2="$ECVS_BRANCH"
107 ECVS_BRANCH="$KCVS_BRANCH"
108 fi
109
110 ECVS_MODULE="$KCVS_MODULE" ECVS_LOCAL=yes cvs_src_unpack
111
112 # we need the <module>/doc/<name> directory too,
113 # and we need the top-level doc/ directory fetched locally
114 ECVS_MODULE="${KCVS_MODULE}/doc" ECVS_LOCAL=yes cvs_src_unpack
115
116 # but, if such a directory doesn't exist on the cvs server and we're
117 # in offline mode cvs.eclass will abort, so only call this if we're
118 # in online mode or the dir is already fetched
119 # also, the ebuild might have disabled this functionality explicitly
120 # (kde-i18n stuff does this for now)
121 if [ -z "$KCVS_SUBDIR_NODOC" ] && [ -d "$ECVS_TOP_DIR/$KCVS_MODULE/doc/$KCVS_SUBDIR" -o "$ECVS_SERVER" != "offline" ]; then
122 ECVS_MODULE="${KCVS_MODULE}/doc/${KCVS_SUBDIR}" cvs_src_unpack
123 fi
124
125 if [ -n "$KCVS_BRANCH" ]; then
126 ECVS_BRANCH="$ECVS_BRANCH2"
127 fi
128
129 fi
130
131 # typically for kde cvs apps, the admin subdir lives in the kde-common module
132 # which is also needed
133 if [ ! -d "$S/admin" ]; then
134 ECVS_MODULE="kde-common/admin" cvs_src_unpack
135 mv ${WORKDIR}/kde-common/admin $S/
136 fi
137
138 # make sure we give them a clean cvs checkout
139 cd ${S}
140 [ -f "Makefile" ] && make -f Makefile.cvs cvs-clean
141 [ -f "config.cache" ] && rm config.cache
142
143 }
144
145
146 EXPORT_FUNCTIONS src_unpack
147

  ViewVC Help
Powered by ViewVC 1.1.20