/[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.51 Revision 1.52
1# Copyright 1999-2011 Gentoo Foundation 1# Copyright 1999-2011 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.51 2011/04/06 14:22:14 scarabeus Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-meta.eclass,v 1.52 2011/05/01 13:52:09 scarabeus 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.
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
15[[ -z ${KMNAME} ]] && die "kde4-meta.eclass inherited but KMNAME not defined - broken ebuild" 15[[ -z ${KMNAME} ]] && die "kde4-meta.eclass inherited but KMNAME not defined - broken ebuild"
16 16
17inherit kde4-base toolchain-funcs versionator 17inherit kde4-base versionator
18 18
19case ${EAPI:-0} in
20 3)
21 KDEMETA_EXPF="pkg_setup src_unpack src_prepare src_configure src_compile src_test src_install pkg_preinst pkg_postinst pkg_postrm" 19KDEMETA_EXPF="pkg_setup src_unpack src_prepare src_configure src_compile src_test src_install pkg_preinst pkg_postinst pkg_postrm"
22 ;;
23 *)
24 KDEMETA_EXPF="pkg_pretend pkg_setup src_unpack src_prepare src_configure src_compile src_test src_install pkg_preinst pkg_postinst pkg_postrm"
25 ;;
26esac
27EXPORT_FUNCTIONS ${KDEMETA_EXPF} 20EXPORT_FUNCTIONS ${KDEMETA_EXPF}
28 21
29# Add dependencies that all packages in a certain module share. 22# Add dependencies that all packages in a certain module share.
30case ${KMNAME} in 23case ${KMNAME} in
31 kdebase|kdebase-apps|kdebase-workspace|kdebase-runtime|kdegraphics) 24 kdebase|kdebase-apps|kdebase-workspace|kdebase-runtime|kdegraphics)
135# @ECLASS-VARIABLE: KMTARPARAMS 128# @ECLASS-VARIABLE: KMTARPARAMS
136# @DESCRIPTION: 129# @DESCRIPTION:
137# Specify extra parameters to pass to tar, in kde4-meta_src_extract. 130# Specify extra parameters to pass to tar, in kde4-meta_src_extract.
138# '-xpf -j' are passed to tar by default. 131# '-xpf -j' are passed to tar by default.
139 132
140# @FUNCTION: kde4-meta_pkg_pretend
141# @DESCRIPTION:
142# Currently only checks the gcc version.
143kde4-meta_pkg_pretend() {
144 debug-print-function ${FUNCNAME} "$@"
145
146 slot_is_at_least 4.6 ${SLOT} && ( [[ $(gcc-major-version) -lt 4 ]] || \
147 ( [[ $(gcc-major-version) -eq 4 && $(gcc-minor-version) -le 3 ]] ) ) \
148 && die "Sorry, but gcc-4.3 and earlier wont work for KDE SC 4.6 (see bug 354837)."
149}
150
151# @FUNCTION: kde4-meta_pkg_setup 133# @FUNCTION: kde4-meta_pkg_setup
152# @DESCRIPTION: 134# @DESCRIPTION:
153# Currently calls its equivalent in kde4-base.eclass(5) and checks the gcc version. 135# Currently calls its equivalent in kde4-base.eclass(5) and checks the gcc version.
154# Use this one in split ebuilds. 136# Use this one in split ebuilds.
155kde4-meta_pkg_setup() { 137kde4-meta_pkg_setup() {
156 debug-print-function ${FUNCNAME} "$@" 138 debug-print-function ${FUNCNAME} "$@"
157
158 has pkg_pretend ${KDEMETA_EXPF} || kde4-meta_pkg_pretend
159 139
160 kde4-base_pkg_setup 140 kde4-base_pkg_setup
161} 141}
162 142
163# @FUNCTION: kde4-meta_src_unpack 143# @FUNCTION: kde4-meta_src_unpack
176 ESVN_RESTRICT="export" subversion_src_unpack 156 ESVN_RESTRICT="export" subversion_src_unpack
177 subversion_wc_info 157 subversion_wc_info
178 subversion_bootstrap 158 subversion_bootstrap
179 ;; 159 ;;
180 git) 160 git)
181 git_src_unpack 161 git-2_src_unpack
182 ;; 162 ;;
183 esac 163 esac
184 fi 164 fi
185 kde4-meta_src_extract 165 kde4-meta_src_extract
186} 166}

Legend:
Removed from v.1.51  
changed lines
  Added in v.1.52

  ViewVC Help
Powered by ViewVC 1.1.20