Gentoo Archives: gentoo-commits

From: "Bo Oersted Andresen (zlin)" <zlin@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in eclass: kde4-meta.eclass
Date: Mon, 10 Mar 2008 21:45:07
Message-Id: E1JYpm2-0006Ns-LO@stork.gentoo.org
1 zlin 08/03/10 21:43:10
2
3 Modified: kde4-meta.eclass
4 Log:
5 Add support for KDE4_STRICTER. Prepare for KDE 4.0.2.
6
7 Revision Changes Path
8 1.4 eclass/kde4-meta.eclass
9
10 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/kde4-meta.eclass?rev=1.4&view=markup
11 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/kde4-meta.eclass?rev=1.4&content-type=text/plain
12 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/kde4-meta.eclass?r1=1.3&r2=1.4
13
14 Index: kde4-meta.eclass
15 ===================================================================
16 RCS file: /var/cvsroot/gentoo-x86/eclass/kde4-meta.eclass,v
17 retrieving revision 1.3
18 retrieving revision 1.4
19 diff -u -r1.3 -r1.4
20 --- kde4-meta.eclass 24 Feb 2008 21:45:39 -0000 1.3
21 +++ kde4-meta.eclass 10 Mar 2008 21:43:10 -0000 1.4
22 @@ -1,6 +1,6 @@
23 # Copyright 1999-2008 Gentoo Foundation
24 # Distributed under the terms of the GNU General Public License v2
25 -# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-meta.eclass,v 1.3 2008/02/24 21:45:39 keytoaster Exp $
26 +# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-meta.eclass,v 1.4 2008/03/10 21:43:10 zlin Exp $
27 #
28 # @ECLASS: kde4-meta.eclass
29 # @MAINTAINER:
30 @@ -157,7 +157,7 @@
31 # A function to unpack the source for a split KDE ebuild.
32 # Also see KMMODULE, KMNOMODULE, KMEXTRA, KMCOMPILEONLY, KMEXTRACTONLY and KMTARPARAMS.
33 kde4-meta_src_extract() {
34 - local tarball tarfile f extractlist
35 + local abort tarball tarfile f extractlist
36 tarball="${KMNAME}-${PV}.tar.bz2"
37 tarfile="${DISTDIR}"/${tarball}
38
39 @@ -174,12 +174,24 @@
40 KMTARPARAMS="${KMTARPARAMS} -j"
41
42 pushd "${WORKDIR}" > /dev/null
43 + [[ -n ${KDE4_STRICTER} ]] && echo tar -xpf $tarfile $KMTARPARAMS $extractlist >&2
44 tar -xpf $tarfile $KMTARPARAMS $extractlist 2> /dev/null
45
46 # Default $S is based on $P; rename the extracted directory to match $S
47 mv ${KMNAME}-${PV} ${P} || die "Died while moving \"${KMNAME}-${PV}\" to \"${P}\""
48
49 popd > /dev/null
50 +
51 + if [[ -n ${KDE4_STRICTER} ]]; then
52 + for f in $(__list_needed_subdirectories fatal); do
53 + if [[ ! -e ${S}/${f#*/} ]]; then
54 + eerror "'${f#*/}' is missing"
55 + abort=true
56 + fi
57 + done
58 + [[ -n ${abort} ]] && die "There were missing files."
59 + fi
60 +
61 kde4-base_src_unpack
62 }
63
64 @@ -191,7 +203,7 @@
65 if has htmlhandbook ${IUSE//+} && use htmlhandbook; then
66 # We use the basename of $KMMODULE because $KMMODULE can contain
67 # the path to the module subdirectory.
68 - KMEXTRA="${KMEXTRA} doc/${KMMODULE##*/}"
69 + KMEXTRA_NONFATAL="${KMEXTRA_NONFATAL} doc/${KMMODULE##*/}"
70 fi
71
72 # Add some CMake-files to KMEXTRACTONLY.
73 @@ -232,7 +244,7 @@
74 esac
75 # Don't install cmake modules for split ebuilds to avoid collisions.
76 case ${KMNAME} in
77 - kdebase-workspace|kdebase-runtime|kdepim|kdegames)
78 + kdebase-workspace|kdebase-runtime|kdepim|kdegames|kdegraphics)
79 if [[ ${PN} != "libkdegames" ]]; then
80 KMCOMPILEONLY="${KMCOMPILEONLY}
81 cmake/modules/"
82 @@ -247,10 +259,12 @@
83 }
84
85 __list_needed_subdirectories() {
86 - local i j kmextra_expanded kmmodule_expanded kmcompileonly_expanded extractlist topdir
87 + local i j kmextra kmextra_expanded kmmodule_expanded kmcompileonly_expanded extractlist topdir
88
89 # We expand KMEXTRA by adding CMakeLists.txt files
90 - for i in ${KMEXTRA}; do
91 + kmextra="${KMEXTRA}"
92 + [[ ${1} != fatal ]] && kmextra="${kmextra} ${KMEXTRA_NONFATAL}"
93 + for i in ${kmextra}; do
94 kmextra_expanded="${kmextra_expanded} ${i}"
95 j=$(dirname ${i})
96 while [[ ${j} != "." ]]; do
97 @@ -362,15 +376,18 @@
98 # KMEXTRA section
99 for i in ${KMEXTRA}; do
100 debug-print "${LINENO}: KMEXTRA section, processing ${i}"
101 - # Ebuilds use KMEXTRA incorrectly to extract files which should be in $KMEXTRACTONLY
102 + find "${S}"/${i} -name CMakeLists.txt -print0 | \
103 + xargs -0 sed -i -e 's/^#DONOTCOMPILE //g' || \
104 + die "${LINENO}: sed died uncommenting add_subdirectory instructions in KMEXTRA section while processing ${i}"
105 + _change_cmakelists_parent_dirs ${i}
106 + done
107 + # KMEXTRA_NONFATAL section
108 + for i in ${KMEXTRA_NONFATAL}; do
109 if [[ -d "${S}"/${i} ]]; then
110 find "${S}"/${i} -name CMakeLists.txt -print0 | \
111 xargs -0 sed -i -e 's/^#DONOTCOMPILE //g' || \
112 die "${LINENO}: sed died uncommenting add_subdirectory instructions in KMEXTRA section while processing ${i}"
113 _change_cmakelists_parent_dirs ${i}
114 - else
115 - [[ ${i} == doc/* ]] || \
116 - die "KMEXTRA should be used to compile and install subdirectories other than \$KMMODULE. Use KMEXTRACTONLY to extract some files."
117 fi
118 done
119
120
121
122
123 --
124 gentoo-commits@l.g.o mailing list