1 |
commit: aedb335c644642c4fc9476f23adc91ae98d86223 |
2 |
Author: Jonathan Callen <abcd <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Oct 29 01:20:46 2011 +0000 |
4 |
Commit: Jonathan Callen <abcd <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Oct 29 01:21:11 2011 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/kde.git;a=commit;h=aedb335c |
7 |
|
8 |
[eclass] Use new in_iuse() and use_if_iuse() functions from eutils |
9 |
|
10 |
--- |
11 |
eclass/kde4-base.eclass | 10 +++++----- |
12 |
eclass/kde4-meta.eclass | 6 +++--- |
13 |
2 files changed, 8 insertions(+), 8 deletions(-) |
14 |
|
15 |
diff --git a/eclass/kde4-base.eclass b/eclass/kde4-base.eclass |
16 |
index a258765..9ce3566 100644 |
17 |
--- a/eclass/kde4-base.eclass |
18 |
+++ b/eclass/kde4-base.eclass |
19 |
@@ -600,7 +600,7 @@ debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: SRC_URI is ${SRC_URI}" |
20 |
kde4-base_pkg_setup() { |
21 |
debug-print-function ${FUNCNAME} "$@" |
22 |
|
23 |
- if has kdeprefix ${IUSE//+} && use kdeprefix; then |
24 |
+ if use_if_iuse kdeprefix; then |
25 |
eerror "Sorry, kdeprefix support has been removed." |
26 |
eerror "Please remove kdeprefix from your USE variable." |
27 |
die "kdeprefix support has been removed" |
28 |
@@ -682,7 +682,7 @@ kde4-base_src_prepare() { |
29 |
# Enable/disable handbooks for kde4-base packages |
30 |
# kde-l10n inherits kde4-base but is metpackage, so no check for doc |
31 |
# kdelibs inherits kde4-base but handle installing the handbook itself |
32 |
- if ! has kde4-meta ${INHERITED} && has handbook ${IUSE//+}; then |
33 |
+ if ! has kde4-meta ${INHERITED} && in_iuse handbook; then |
34 |
if [[ ${KDEBASE} == kde-base ]]; then |
35 |
if [[ ${PN} != kde-l10n && ${PN} != kdepim-l10n && ${PN} != kdelibs ]] && use !handbook; then |
36 |
# documentation in kde4-functions |
37 |
@@ -760,11 +760,11 @@ kde4-base_src_configure() { |
38 |
# Build tests in src_test only, where we override this value |
39 |
local cmakeargs=(-DKDE4_BUILD_TESTS=OFF) |
40 |
|
41 |
- if has kdeenablefinal ${IUSE//+} && use kdeenablefinal; then |
42 |
+ if use_if_iuse kdeenablefinal; then |
43 |
cmakeargs+=(-DKDE4_ENABLE_FINAL=ON) |
44 |
fi |
45 |
|
46 |
- if has debug ${IUSE//+} && use debug; then |
47 |
+ if use_if_iuse debug; then |
48 |
# Set "real" debug mode |
49 |
CMAKE_BUILD_TYPE="Debugfull" |
50 |
else |
51 |
@@ -897,7 +897,7 @@ kde4-base_pkg_postinst() { |
52 |
buildsycoca |
53 |
|
54 |
if [[ -z ${I_KNOW_WHAT_I_AM_DOING} ]]; then |
55 |
- if has kdeenablefinal ${IUSE//+} && use kdeenablefinal; then |
56 |
+ if use_if_iuse kdeenablefinal; then |
57 |
echo |
58 |
ewarn "WARNING! you have kdeenable final useflag enabled." |
59 |
ewarn "This useflag needs to be enabled on ALL kde using packages and" |
60 |
|
61 |
diff --git a/eclass/kde4-meta.eclass b/eclass/kde4-meta.eclass |
62 |
index 942c066..b6657a3 100644 |
63 |
--- a/eclass/kde4-meta.eclass |
64 |
+++ b/eclass/kde4-meta.eclass |
65 |
@@ -289,7 +289,7 @@ kde4-meta_create_extractlists() { |
66 |
|
67 |
# Add default handbook locations |
68 |
# FIXME - legacy code - remove when 4.4.5 is gone or preferrably port 4.4.5. |
69 |
- if [[ $(get_kde_version) < 4.5 ]] && has handbook ${IUSE//+} && use handbook && [[ -z ${KMNOMODULE} ]]; then |
70 |
+ if [[ $(get_kde_version) < 4.5 ]] && use_if_iuse handbook && [[ -z ${KMNOMODULE} ]]; then |
71 |
# We use the basename of $KMMODULE because $KMMODULE can contain |
72 |
# the path to the module subdirectory. |
73 |
KMEXTRA_NONFATAL+=" |
74 |
@@ -346,7 +346,7 @@ kde4-meta_create_extractlists() { |
75 |
KMEXTRACTONLY+=" |
76 |
kdepim-version.h" |
77 |
fi |
78 |
- if has kontact ${IUSE//+} && use kontact; then |
79 |
+ if use_if_iuse kontact; then |
80 |
KMEXTRA+=" |
81 |
kontact/plugins/${PLUGINNAME:-${PN}}/" |
82 |
fi |
83 |
@@ -588,7 +588,7 @@ kde4-meta_change_cmakelists() { |
84 |
-e 's/if[[:space:]]*([[:space:]]*[[:alnum:]]*_FOUND[[:space:]]*)[[:space:]]*$/if(1) # &/' \ |
85 |
-i CMakeLists.txt || die "failed to disable hardcoded checks" |
86 |
# Disable broken or redundant build logic |
87 |
- if ( has kontact ${IUSE//+} && use kontact ) || [[ ${PN} = kontact ]]; then |
88 |
+ if use_if_iuse kontact || [[ ${PN} = kontact ]]; then |
89 |
sed -e 's/if[[:space:]]*([[:space:]]*BUILD_.*)[[:space:]]*$/if(1) # &/' \ |
90 |
-e 's/if[[:space:]]*([[:space:]]*[[:alnum:]]*_FOUND[[:space:]]*)[[:space:]]*$/if(1) # &/' \ |
91 |
-i kontact/plugins/CMakeLists.txt || die 'failed to override build logic' |