1 |
Author: dirtyepic |
2 |
Date: 2010-02-03 06:48:03 +0000 (Wed, 03 Feb 2010) |
3 |
New Revision: 760 |
4 |
|
5 |
Modified: |
6 |
trunk/extern/AUTHORS |
7 |
trunk/extern/ChangeLog |
8 |
trunk/extern/modules/wxwidgets.eselect |
9 |
Log: |
10 |
Add support for wxGTK-2.9 to wxwidgets.eselect. |
11 |
|
12 |
Modified: trunk/extern/AUTHORS |
13 |
=================================================================== |
14 |
--- trunk/extern/AUTHORS 2010-01-30 15:20:46 UTC (rev 759) |
15 |
+++ trunk/extern/AUTHORS 2010-02-03 06:48:03 UTC (rev 760) |
16 |
@@ -21,3 +21,6 @@ |
17 |
|
18 |
Ulrich Mueller <ulm@g.o> |
19 |
Modules: package-manager |
20 |
+ |
21 |
+Ryan Hill <dirtyepic@g.o> |
22 |
+ Modules: wxwidgets |
23 |
|
24 |
Modified: trunk/extern/ChangeLog |
25 |
=================================================================== |
26 |
--- trunk/extern/ChangeLog 2010-01-30 15:20:46 UTC (rev 759) |
27 |
+++ trunk/extern/ChangeLog 2010-02-03 06:48:03 UTC (rev 760) |
28 |
@@ -1,3 +1,8 @@ |
29 |
+2010-02-03 Ryan Hill <dirtyepic@g.o> |
30 |
+ |
31 |
+ * AUTHORS: Add myself. |
32 |
+ * modules/wxwidgets.eselect: Add support for 2.9. |
33 |
+ |
34 |
2010-01-27 Ulrich Mueller <ulm@g.o> |
35 |
|
36 |
* modules/esd.eselect: Use EROOT throughout, bug 302134. |
37 |
|
38 |
Modified: trunk/extern/modules/wxwidgets.eselect |
39 |
=================================================================== |
40 |
--- trunk/extern/modules/wxwidgets.eselect 2010-01-30 15:20:46 UTC (rev 759) |
41 |
+++ trunk/extern/modules/wxwidgets.eselect 2010-02-03 06:48:03 UTC (rev 760) |
42 |
@@ -46,24 +46,21 @@ |
43 |
|
44 |
if [[ ! ${target} == "none" ]]; then |
45 |
# expose the slot number of the selected target for various uses |
46 |
- local wxslot |
47 |
- OIFS=${IFS} |
48 |
- IFS=- |
49 |
- set -- ${target} |
50 |
- wxslot=${4} |
51 |
- IFS=${OIFS} |
52 |
+ local wxslot=${target##*-} |
53 |
fi |
54 |
|
55 |
# symlink bakefile presets to current slot (Bug #209150) |
56 |
local f |
57 |
pushd "${EROOT}"/usr/share/bakefile/presets/ &> /dev/null |
58 |
- for f in .bkl _unix.bkl _win32.bkl; do |
59 |
+ for f in .bkl _presets.py _unix.bkl _win32.bkl _xrc.bkl; do |
60 |
if [[ -e wx${f} || -L wx${f} ]]; then |
61 |
rm -f wx${f} || die -q "Error removing wx${f}" |
62 |
fi |
63 |
if [[ ! ${target} == "none" ]]; then |
64 |
- ln -sf wx${wxslot/./}${f} wx${f} \ |
65 |
- || die -q "Error symlinking wx${wxslot/./}${f}" |
66 |
+ if [[ -e wx${wxslot/./}${f} ]]; then |
67 |
+ ln -sf wx${wxslot/./}${f} wx${f} \ |
68 |
+ || die -q "Error symlinking wx${wxslot/./}${f}" |
69 |
+ fi |
70 |
fi |
71 |
done |
72 |
popd &> /dev/null |
73 |
@@ -114,7 +111,7 @@ |
74 |
} |
75 |
|
76 |
describe_set_options() { |
77 |
- echo "target: profile name or number (gotten from 'list')" |
78 |
+ echo "<target> : Profile name or number (from 'list' action)" |
79 |
} |
80 |
|
81 |
describe_set_parameters() { |
82 |
@@ -126,7 +123,7 @@ |
83 |
&& die -q "You must specify a profile name or number" |
84 |
|
85 |
[[ -w "${EROOT}"/var/lib ]] \ |
86 |
- || die -q "You need proper write permissions. Please run as root." |
87 |
+ || die -q "You need write permission to /var/lib to perform this action." |
88 |
|
89 |
set_config "${1}" |
90 |
} |
91 |
@@ -146,7 +143,7 @@ |
92 |
# if current config is valid leave it alone |
93 |
[[ -e ${WXCONFDIR}/${currconf} ]] && return 0 |
94 |
|
95 |
- # split the config string into components |
96 |
+ # split the current config into components |
97 |
OIFS=${IFS} |
98 |
IFS=- |
99 |
set -- ${currconf} |
100 |
@@ -154,25 +151,31 @@ |
101 |
|
102 |
declare -a wxtoolkit wxchar wxdebug wxver |
103 |
|
104 |
- # put selected components into the first element of the array |
105 |
+ # put them into the first element of the arrays |
106 |
wxtoolkit=(${1}) |
107 |
wxchar=(${2}) |
108 |
- wxdebug=(${3}) |
109 |
- wxver=(${4}) |
110 |
+ if [[ $# -eq 3 ]]; then |
111 |
+ # >=2.9 doesn't have a debug component, so fake it |
112 |
+ wxdebug=(release) |
113 |
+ wxver=(${3}) |
114 |
+ else |
115 |
+ wxdebug=(${3}) |
116 |
+ wxver=(${4}) |
117 |
+ fi |
118 |
|
119 |
- # put available components into next element(s) of array |
120 |
- local component toolkit char debug ver element opt |
121 |
+ # now put all possible components into the next elements |
122 |
+ local component toolkit char debug ver i opt |
123 |
|
124 |
for component in toolkit char debug ver; do |
125 |
- element=1 |
126 |
+ i=1 |
127 |
case ${component} in |
128 |
toolkit) |
129 |
for opt in base gtk2; do |
130 |
if [[ ${opt} == ${wxtoolkit[0]} ]]; then |
131 |
continue |
132 |
else |
133 |
- wxtoolkit[${element}]=${opt} |
134 |
- (( element++ )) |
135 |
+ wxtoolkit[${i}]=${opt} |
136 |
+ (( i++ )) |
137 |
fi |
138 |
done |
139 |
;; |
140 |
@@ -182,8 +185,8 @@ |
141 |
if [[ ${opt} == ${wxchar[0]} ]]; then |
142 |
continue |
143 |
else |
144 |
- wxchar[${element}]=${opt} |
145 |
- (( element++ )) |
146 |
+ wxchar[${i}]=${opt} |
147 |
+ (( i++ )) |
148 |
fi |
149 |
done |
150 |
;; |
151 |
@@ -193,27 +196,32 @@ |
152 |
if [[ ${opt} == ${wxdebug[0]} ]]; then |
153 |
continue |
154 |
else |
155 |
- wxdebug[${element}]=${opt} |
156 |
- (( element++ )) |
157 |
+ wxdebug[${i}]=${opt} |
158 |
+ (( i++ )) |
159 |
fi |
160 |
done |
161 |
;; |
162 |
|
163 |
ver) |
164 |
- for opt in 2.10 2.8 2.6; do |
165 |
+ for opt in 2.9 2.8 2.6; do |
166 |
if [[ ${opt} == ${wxver[0]} ]]; then |
167 |
continue |
168 |
else |
169 |
- wxver[${element}]=${opt} |
170 |
- (( element++ )) |
171 |
+ wxver[${i}]=${opt} |
172 |
+ (( i++ )) |
173 |
fi |
174 |
done |
175 |
;; |
176 |
esac |
177 |
done |
178 |
|
179 |
- # Now we iterate through the installed wx-configs and find the closest match |
180 |
- # ( debug > char > toolkit > ver ) |
181 |
+ # Now we iterate through all the installed configs and find the closest match |
182 |
+ # ( debug -> char -> toolkit -> ver ) |
183 |
+ # meaning w/ a current config of gtk2-unicode-debug-2.6, it will pick |
184 |
+ # gtk2-unicode-release-2.6 before |
185 |
+ # gtk2-ansi-debug-2.6 before |
186 |
+ # base-unicode-debug-2.6 before |
187 |
+ # gtk2-unicode-debug-2.8 |
188 |
|
189 |
local d c t v checkconf foundconf |
190 |
|
191 |
@@ -221,7 +229,12 @@ |
192 |
for (( t = 0 ; t < ${#wxtoolkit[@]} ; t++ )); do |
193 |
for (( c = 0 ; c < ${#wxchar[@]} ; c++ )); do |
194 |
for (( d = 0 ; d < ${#wxdebug[@]} ; d++ )); do |
195 |
- checkconf="${wxtoolkit[$t]}-${wxchar[$c]}-${wxdebug[$d]}-${wxver[$v]}" |
196 |
+ if [[ ${wxver[$v]} != 2.[6,8] ]]; then |
197 |
+ # >=2.9 doesn't have a debug component |
198 |
+ checkconf="${wxtoolkit[$t]}-${wxchar[$c]}-${wxver[$v]}" |
199 |
+ else |
200 |
+ checkconf="${wxtoolkit[$t]}-${wxchar[$c]}-${wxdebug[$d]}-${wxver[$v]}" |
201 |
+ fi |
202 |
[[ -e ${WXCONFDIR}/${checkconf} ]] || continue |
203 |
foundconf=${checkconf} |
204 |
break 4 |
205 |
@@ -230,13 +243,14 @@ |
206 |
done |
207 |
done |
208 |
|
209 |
+ # nothing installed |
210 |
[[ -z ${foundconf} ]] && foundconf="none" |
211 |
|
212 |
echo |
213 |
- write_warning_msg "Your currently selected wxWidgets profile: ( ${currconf} )" |
214 |
+ write_warning_msg "Your currently selected wxWidgets profile: ( ${currconf} )" |
215 |
write_warning_msg "is no longer available." |
216 |
write_warning_msg |
217 |
- write_warning_msg "The closest matching profile: ( ${foundconf} )" |
218 |
+ write_warning_msg "The closest matching profile: ( ${foundconf} )" |
219 |
write_warning_msg "will be activated in its place." |
220 |
|
221 |
do_set ${foundconf} |