/[gentoo-x86]/eclass/kde4-meta.eclass
Gentoo

Diff of /eclass/kde4-meta.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.76 Revision 1.77
1# Copyright 1999-2014 Gentoo Foundation 1# Copyright 1999-2014 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-meta.eclass,v 1.76 2014/04/17 18:16:54 kensington Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-meta.eclass,v 1.77 2014/07/11 08:21:58 ulm Exp $
4# 4#
5# @ECLASS: kde4-meta.eclass 5# @ECLASS: kde4-meta.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# kde@gentoo.org 7# kde@gentoo.org
8# @BLURB: Eclass for writing "split" KDE packages. 8# @BLURB: Eclass for writing "split" KDE packages.
10# This eclass provides all necessary functions for writing split KDE ebuilds. 10# This eclass provides all necessary functions for writing split KDE ebuilds.
11# 11#
12# You must define KMNAME to use this eclass, and do so before inheriting it. All other variables are optional. 12# You must define KMNAME to use this eclass, and do so before inheriting it. All other variables are optional.
13# Do not include the same item in more than one of KMMODULE, KMMEXTRA, KMCOMPILEONLY, KMEXTRACTONLY. 13# Do not include the same item in more than one of KMMODULE, KMMEXTRA, KMCOMPILEONLY, KMEXTRACTONLY.
14 14
15if [[ ${___ECLASS_ONCE_KDE4_META} != "recur -_+^+_- spank" ]] ; then 15if [[ -z ${_KDE4_META_ECLASS} ]]; then
16___ECLASS_ONCE_KDE4_META="recur -_+^+_- spank" 16_KDE4_META_ECLASS=1
17 17
18[[ -z ${KMNAME} ]] && die "kde4-meta.eclass inherited but KMNAME not defined - broken ebuild" 18[[ -z ${KMNAME} ]] && die "kde4-meta.eclass inherited but KMNAME not defined - broken ebuild"
19 19
20inherit kde4-base 20inherit kde4-base
21 21
165 if [[ -d "${wc_path}/cmake" ]]; then 165 if [[ -d "${wc_path}/cmake" ]]; then
166 rsync --recursive ${rsync_options} "${wc_path}/cmake" "${S}" \ 166 rsync --recursive ${rsync_options} "${wc_path}/cmake" "${S}" \
167 || die "${escm}: can't export cmake files to '${S}'." 167 || die "${escm}: can't export cmake files to '${S}'."
168 fi 168 fi
169 # Copy all subdirectories 169 # Copy all subdirectories
170 for subdir in $(__list_needed_subdirectories); do 170 for subdir in $(_list_needed_subdirectories); do
171 targetdir="" 171 targetdir=""
172 if [[ $subdir = doc/* && ! -e "$wc_path/$subdir" ]]; then 172 if [[ $subdir = doc/* && ! -e "$wc_path/$subdir" ]]; then
173 continue 173 continue
174 fi 174 fi
175 175
194 194
195 # Full path to source tarball 195 # Full path to source tarball
196 tarfile="${DISTDIR}/${tarball}" 196 tarfile="${DISTDIR}/${tarball}"
197 197
198 # Detect real toplevel dir from tarball name - it will be used upon extraction 198 # Detect real toplevel dir from tarball name - it will be used upon extraction
199 # and in __list_needed_subdirectories 199 # and in _list_needed_subdirectories
200 topdir="${tarball%.tar.*}/" 200 topdir="${tarball%.tar.*}/"
201 201
202 ebegin "Unpacking parts of ${tarball} to ${WORKDIR}" 202 ebegin "Unpacking parts of ${tarball} to ${WORKDIR}"
203 203
204 kde4-meta_create_extractlists 204 kde4-meta_create_extractlists
205 205
206 for f in cmake/ CMakeLists.txt ConfigureChecks.cmake config.h.cmake 206 for f in cmake/ CMakeLists.txt ConfigureChecks.cmake config.h.cmake
207 do 207 do
208 extractlist+=" ${topdir}${f}" 208 extractlist+=" ${topdir}${f}"
209 done 209 done
210 extractlist+=" $(__list_needed_subdirectories)" 210 extractlist+=" $(_list_needed_subdirectories)"
211 211
212 pushd "${WORKDIR}" > /dev/null 212 pushd "${WORKDIR}" > /dev/null
213 213
214 # @ECLASS-VARIABLE: KDE4_STRICTER 214 # @ECLASS-VARIABLE: KDE4_STRICTER
215 # @DESCRIPTION: 215 # @DESCRIPTION:
226 popd > /dev/null 226 popd > /dev/null
227 227
228 eend $? 228 eend $?
229 229
230 if [[ -n ${KDE4_STRICTER} ]]; then 230 if [[ -n ${KDE4_STRICTER} ]]; then
231 for f in $(__list_needed_subdirectories fatal); do 231 for f in $(_list_needed_subdirectories fatal); do
232 if [[ ! -e ${S}/${f#*/} ]]; then 232 if [[ ! -e ${S}/${f#*/} ]]; then
233 eerror "'${f#*/}' is missing" 233 eerror "'${f#*/}' is missing"
234 abort=true 234 abort=true
235 fi 235 fi
236 done 236 done
309 esac 309 esac
310 310
311 debug-print "line ${LINENO} ${ECLASS} ${FUNCNAME}: KMEXTRACTONLY ${KMEXTRACTONLY}" 311 debug-print "line ${LINENO} ${ECLASS} ${FUNCNAME}: KMEXTRACTONLY ${KMEXTRACTONLY}"
312} 312}
313 313
314__list_needed_subdirectories() { 314_list_needed_subdirectories() {
315 local i j kmextra kmextra_expanded kmmodule_expanded kmcompileonly_expanded extractlist 315 local i j kmextra kmextra_expanded kmmodule_expanded kmcompileonly_expanded extractlist
316 316
317 # We expand KMEXTRA by adding CMakeLists.txt files 317 # We expand KMEXTRA by adding CMakeLists.txt files
318 kmextra="${KMEXTRA}" 318 kmextra="${KMEXTRA}"
319 [[ ${1} != fatal ]] && kmextra+=" ${KMEXTRA_NONFATAL}" 319 [[ ${1} != fatal ]] && kmextra+=" ${KMEXTRA_NONFATAL}"

Legend:
Removed from v.1.76  
changed lines
  Added in v.1.77

  ViewVC Help
Powered by ViewVC 1.1.20