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

Contents of /eclass/kde-child.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Thu Jul 18 18:35:30 2002 UTC (12 years, 9 months ago) by danarmak
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +1 -1 lines
FILE REMOVED
remove kde-child,parent.eclass since no ebuilds use them anymore. avoid cluttering.

1 # Copyright 1999-2000 Gentoo Technologies, Inc.
2 # Distributed under the terms of the GNU General Public License, v2 or later
3 # Author Dan Armak <danarmak@gentoo.org>
4 # $Header: /home/cvsroot/gentoo-x86/eclass/kde-child.eclass,v 1.2 2002/07/12 15:24:36 danarmak Exp $
5 # Inherited by children ebuilds, which must specify their $PARENT ebuild before inheriting.
6 ECLASS=kde-child
7 INHERITED="$INHERITED $ECLASS"
8 #TODO: prevent $S/README, etc. from being dodoc'd
9
10 # determine settings
11 # Rename to $SIBLINGS? :-)
12 [ -z "$SUBDIRS" ] && SUBDIRS="$PN doc"
13
14 if [ -z "$PARENT" ]; then
15 einfo "!!! $ECLASS: error: kde-child sourced, but \$PARENT not defined. Please report this bug."
16 exit 1
17 fi
18
19 debug-print "$ECLASS: beginning, PARENT=$PARENT, SUBDIRS=$SUBDIRS"
20
21 # source parent ebuild
22 debug-print "$ECLASS: sourcing ${PORTDIR}/${PARENT}"
23 source "/usr/portage/${PARENT}"
24
25 ECLASS=kde-child
26 DESCRIPTION="Based on the $ECLASS eclass"
27
28 # no master-side src_unpack mods allowed atm
29 kde-child_src_unpack () {
30
31 base_src_unpack
32
33 cd ${S}
34 # convert spaces to newlines
35 mv subdirs subdirs.orig
36 for x in $SUBDIRS; do
37 debug-print "$FUNCNAME: parsing \$SUBDIRS: adding $x to subdirs"
38 echo $x >> subdirs
39 done
40 rm subdirs.orig
41
42 # we always do this, but it won't take effect unless doc is in $SUBDIRS!
43 if [ -d doc ]; then
44 cd doc
45 DOCSUBDIRS=""
46 for x in $SUBDIRS; do
47 [ -d "$x" ] && DOCSUBDIRS="$DOCSUBDIRS $x"
48 done
49 debug-print "$FUNCNAME: doc subdir detected, found DOCSUBDIRS=$DOCSUBDIRS"
50 mv Makefile.am Makefile.am.orig
51 sed -e "s:SUBDIRS = \$(AUTOSUBDIRS):SUBDIRS = $DOCSUBDIRS:" Makefile.am.orig > Makefile.am
52 mv Makefile.in Makefile.in.orig
53 sed -e "s:SUBDIRS =. :SUBDIRS =. $DOCSUBDIRS \#:" Makefile.in.orig > Makefile.in
54 rm Makefile.in.orig Makefile.am.orig
55 fi
56
57 # if asked, enable non-default packages
58 if [ -n "$FORCE" ]; then
59 cd ${S}
60 for x in $FORCE; do
61 for y in configure configure.in; do
62 mv $y $y.orig
63 sed -e "s:DO_NOT_COMPILE=\"\$DO_NOT_COMPILE ${x}\":\#:" $y.orig > $y
64 rm $y.orig
65 done
66 done
67 chmod +x configure
68 fi
69
70 # Finally, delete all top-level subdirs except for those in $SUBDIRS
71 # and admin and doc. This way we both save space and locate any
72 # subdir interdependencies.
73 cd ${S}
74 for x in *
75 do
76 # process all directories
77 if [ -d "$x" ]; then
78
79 KEEP=false
80
81 # check if $x is in $SUBDIRS, if it is we should keep it
82 case "$SUBDIRS admin" in
83 *$x*) KEEP=true;;
84 esac
85
86 # remove it if we decided not to keep it
87 if [ "$KEEP" == "false" ]; then
88
89 debug-print "$FUNCNAME: removing subdir $x"
90
91 # make sure configure doesn't try to create makefiles in the
92 # directories we're removing
93 echo "./admin/configure.in.min
94 configure.in.in" > configure.files
95 find $x -iname configure.in.in >> configure.files
96
97 # finally, remove it
98 rm -rf $x
99 rm -rf doc/$x
100
101 else
102 debug-print "$FUNCNAE: keeping subdir $x"
103 fi
104
105 fi
106 done
107
108 }
109
110 EXPORT_FUNCTIONS src_unpack

  ViewVC Help
Powered by ViewVC 1.1.20