Gentoo Archives: gentoo-commits

From: "Davide Pesavento (pesa)" <pesa@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog qt4-r2.eclass
Date: Mon, 03 Jun 2013 06:20:59
Message-Id: 20130603062054.269652171D@flycatcher.gentoo.org
1 pesa 13/06/03 06:20:54
2
3 Modified: ChangeLog qt4-r2.eclass
4 Log:
5 Add support for EQMAKE4_EXCLUDE.
6
7 Revision Changes Path
8 1.849 eclass/ChangeLog
9
10 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.849&view=markup
11 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.849&content-type=text/plain
12 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.848&r2=1.849
13
14 Index: ChangeLog
15 ===================================================================
16 RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
17 retrieving revision 1.848
18 retrieving revision 1.849
19 diff -u -r1.848 -r1.849
20 --- ChangeLog 1 Jun 2013 18:51:57 -0000 1.848
21 +++ ChangeLog 3 Jun 2013 06:20:53 -0000 1.849
22 @@ -1,6 +1,9 @@
23 # ChangeLog for eclass directory
24 # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
25 -# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.848 2013/06/01 18:51:57 robbat2 Exp $
26 +# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.849 2013/06/03 06:20:53 pesa Exp $
27 +
28 + 03 Jun 2013; Davide Pesavento <pesa@g.o> qt4-r2.eclass:
29 + Add support for EQMAKE4_EXCLUDE.
30
31 01 Jun 2013; Robin H. Johnson <robbat2@g.o> php-ext-source-r2.eclass:
32 Fix REQUIRED_USE with PHP_EXT_OPTIONAL_USE set. Fixes REQUIRED_USE
33
34
35
36 1.26 eclass/qt4-r2.eclass
37
38 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/qt4-r2.eclass?rev=1.26&view=markup
39 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/qt4-r2.eclass?rev=1.26&content-type=text/plain
40 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/qt4-r2.eclass?r1=1.25&r2=1.26
41
42 Index: qt4-r2.eclass
43 ===================================================================
44 RCS file: /var/cvsroot/gentoo-x86/eclass/qt4-r2.eclass,v
45 retrieving revision 1.25
46 retrieving revision 1.26
47 diff -u -r1.25 -r1.26
48 --- qt4-r2.eclass 5 Mar 2013 19:06:19 -0000 1.25
49 +++ qt4-r2.eclass 3 Jun 2013 06:20:53 -0000 1.26
50 @@ -1,6 +1,6 @@
51 # Copyright 1999-2013 Gentoo Foundation
52 # Distributed under the terms of the GNU General Public License v2
53 -# $Header: /var/cvsroot/gentoo-x86/eclass/qt4-r2.eclass,v 1.25 2013/03/05 19:06:19 pesa Exp $
54 +# $Header: /var/cvsroot/gentoo-x86/eclass/qt4-r2.eclass,v 1.26 2013/06/03 06:20:53 pesa Exp $
55
56 # @ECLASS: qt4-r2.eclass
57 # @MAINTAINER:
58 @@ -127,8 +127,7 @@
59 # @FUNCTION: qt4-r2_src_install
60 # @DESCRIPTION:
61 # Default src_install function for qt4-based packages. Installs compiled code,
62 -# documentation (via DOCS and HTML_DOCS variables).
63 -
64 +# and documentation (via DOCS and HTML_DOCS variables).
65 qt4-r2_src_install() {
66 debug-print-function $FUNCNAME "$@"
67
68 @@ -143,6 +142,14 @@
69 fi
70 }
71
72 +# @VARIABLE: EQMAKE4_EXCLUDE
73 +# @DEFAULT_UNSET
74 +# @DESCRIPTION:
75 +# List of files to be excluded from eqmake4 processing.
76 +# Paths are relative to the current working directory (usually ${S}).
77 +#
78 +# Example: EQMAKE4_EXCLUDE="ignore/me.pro foo/*"
79 +
80 # @FUNCTION: eqmake4
81 # @USAGE: [project_file] [parameters to qmake]
82 # @DESCRIPTION:
83 @@ -187,6 +194,7 @@
84 config_add="debug"
85 config_remove="release"
86 fi
87 +
88 local awkscript='BEGIN {
89 printf "### eqmake4 was here ###\n" > file;
90 printf "CONFIG -= debug_and_release %s\n", remove >> file;
91 @@ -209,16 +217,25 @@
92 END {
93 print fixed;
94 }'
95 - local file=
96 +
97 + [[ -n ${EQMAKE4_EXCLUDE} ]] && eshopts_push -o noglob
98 +
99 + local file
100 while read file; do
101 + local excl
102 + for excl in ${EQMAKE4_EXCLUDE}; do
103 + [[ ${file} == ${excl} ]] && continue 2
104 + done
105 grep -q '^### eqmake4 was here ###$' "${file}" && continue
106 +
107 local retval=$({
108 - rm -f "${file}" || echo FAIL
109 - awk -v file="${file}" \
110 - -v add=${config_add} \
111 - -v remove=${config_remove} \
112 - -- "${awkscript}" || echo FAIL
113 - } < "${file}")
114 + rm -f "${file}" || echo FAIL
115 + awk -v file="${file}" \
116 + -v add=${config_add} \
117 + -v remove=${config_remove} \
118 + -- "${awkscript}" || echo FAIL
119 + } < "${file}")
120 +
121 if [[ ${retval} == 1 ]]; then
122 einfo " - fixed CONFIG in ${file}"
123 elif [[ ${retval} != 0 ]]; then
124 @@ -227,6 +244,8 @@
125 fi
126 done < <(find . -type f -name '*.pr[io]' -printf '%P\n' 2>/dev/null)
127
128 + [[ -n ${EQMAKE4_EXCLUDE} ]] && eshopts_pop
129 +
130 "${EPREFIX}"/usr/bin/qmake \
131 -makefile \
132 QTDIR="${EPREFIX}"/usr/$(get_libdir) \
133 @@ -261,8 +280,6 @@
134 echo
135 die "eqmake4 failed"
136 fi
137 -
138 - return 0
139 }
140
141 # Internal function, used by eqmake4 and qt4-r2_src_configure.