Status: | Merged |
---|---|
Approved by: | Paweł Forysiuk |
Approved revision: | 6430 |
Merged at revision: | 6432 |
Proposed branch: | lp:~midori/midori/nowaffles |
Merge into: | lp:midori |
Diff against target: |
1408 lines (+29/-1255) 11 files modified
.bzrignore (+1/-0) GNUmakefile.in (+27/-0) configure (+0/-157) docs/api/wscript_build (+0/-38) extensions/wscript_build (+0/-62) icons/wscript_build (+0/-44) midori/wscript_build (+0/-58) tests/wscript_build (+0/-59) tools/midori-dev (+1/-1) waf (+0/-162) wscript (+0/-674) |
To merge this branch: | bzr merge lp:~midori/midori/nowaffles |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Paweł Forysiuk | Approve | ||
Review via email: mp+188730@code.launchpad.net |
Commit message
Drop waf build system and provide cmake-based "configure" script
Description of the change
I spotted somebody whispering that a new configure script is a requirement for this, so I'll add it.
To post a comment you must log in.
lp:~midori/midori/nowaffles
updated
- 6428. By Paweł Forysiuk
-
Add dummy makefile to emulate autotools workflow
- 6429. By Cris Dywan
-
Bail out of configure if cp or cmake fails
- 6430. By Cris Dywan
-
bzr ignore GNUmakefile
Revision history for this message
Paweł Forysiuk (tuxator) : | # |
review:
Approve
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file '.bzrignore' | |||
2 | --- .bzrignore 2013-06-01 19:58:42 +0000 | |||
3 | +++ .bzrignore 2013-10-11 16:49:38 +0000 | |||
4 | @@ -11,3 +11,4 @@ | |||
5 | 11 | po/*.gmo | 11 | po/*.gmo |
6 | 12 | 12 | ||
7 | 13 | packages.version | 13 | packages.version |
8 | 14 | GNUmakefile | ||
9 | 14 | 15 | ||
10 | === added file 'GNUmakefile.in' | |||
11 | --- GNUmakefile.in 1970-01-01 00:00:00 +0000 | |||
12 | +++ GNUmakefile.in 2013-10-11 16:49:38 +0000 | |||
13 | @@ -0,0 +1,27 @@ | |||
14 | 1 | # Based on "http://iany.me/wiki/Makefile/" by "Ian Yang" licensed under "CC by 3.0" | ||
15 | 2 | |||
16 | 3 | BUILD_FOLDER := _build | ||
17 | 4 | |||
18 | 5 | CUSTOM_TARGETS := cmake | ||
19 | 6 | |||
20 | 7 | # Do not try to use custom target when invoking external makefile | ||
21 | 8 | EXTERNAL_TARGETS := $(filter-out $(CUSTOM_TARGETS), $(MAKECMDGOALS)) | ||
22 | 9 | |||
23 | 10 | # Call all targets using `Makefile` in build directory in one `make` command. | ||
24 | 11 | $(or $(lastword $(EXTERNAL_TARGETS)),all): | ||
25 | 12 | $(MAKE) -C $(BUILD_FOLDER) $(EXTERNAL_TARGETS) | ||
26 | 13 | |||
27 | 14 | # If no targets are specified, use the dummy `all` target | ||
28 | 15 | .PHONY: $(EXTERNAL_TARGETS) all | ||
29 | 16 | |||
30 | 17 | # Do nothing for all targets but last. Also quiet the message "Noting to be done on xxx" | ||
31 | 18 | $(filter-out $(lastword $(EXTERNAL_TARGETS)), $(EXTERNAL_TARGETS)): | ||
32 | 19 | @cd . | ||
33 | 20 | |||
34 | 21 | cmake: $(BUILD_FOLDER) | ||
35 | 22 | cd $(BUILD_FOLDER) && cmake .. | ||
36 | 23 | |||
37 | 24 | $(BUILD_FOLDER): | ||
38 | 25 | mkdir $(BUILD_FOLDER) | ||
39 | 26 | |||
40 | 27 | .PHONY: cmake | ||
41 | 0 | 28 | ||
42 | === added file 'configure' | |||
43 | --- configure 1970-01-01 00:00:00 +0000 | |||
44 | +++ configure 2013-10-11 16:49:38 +0000 | |||
45 | @@ -0,0 +1,56 @@ | |||
46 | 1 | #! /bin/sh | ||
47 | 2 | # | ||
48 | 3 | # Copyright (C) 2013 Christian Dywan <christian@twotoasts.de> | ||
49 | 4 | # | ||
50 | 5 | # This library is free software; you can redistribute it and/or | ||
51 | 6 | # modify it under the terms of the GNU Lesser General Public | ||
52 | 7 | # License as published by the Free Software Foundation; either | ||
53 | 8 | # version 2.1 of the License, or (at your option) any later version. | ||
54 | 9 | # | ||
55 | 10 | # See the file COPYING for the full license text. | ||
56 | 11 | # | ||
57 | 12 | #~ Usage: | ||
58 | 13 | #~ ./configure [OPTIONS] | ||
59 | 14 | #~ Options: | ||
60 | 15 | #~ --prefix=PREFIX Installation prefix | ||
61 | 16 | #~ --enable-gtk3 Use GTK+3 | ||
62 | 17 | #~ --disable-zeitgeist Disable Zeitgeist history integration | ||
63 | 18 | #~ --enable-granite Fancy notebook and pop-overs | ||
64 | 19 | #~ --enable-apidocs API documentation | ||
65 | 20 | # | ||
66 | 21 | |||
67 | 22 | if [ -z `command -v cmake` ]; then | ||
68 | 23 | echo Fatal: cmake not installed | ||
69 | 24 | exit 1 | ||
70 | 25 | fi | ||
71 | 26 | |||
72 | 27 | while [ $# != 0 ]; do | ||
73 | 28 | case $1 in | ||
74 | 29 | --enable-gtk3) | ||
75 | 30 | ARGS="$ARGS -DUSE_GTK3=1";; | ||
76 | 31 | --disable-zeitgeist) | ||
77 | 32 | ARGS="$ARGS -DUSE_ZEITGEIST=0";; | ||
78 | 33 | --enable-granite) | ||
79 | 34 | ARGS="$ARGS -DUSE_GRANITE=1";; | ||
80 | 35 | --enable-apidocs) | ||
81 | 36 | ARGS="$ARGS -DUSE_APIDOCS=1";; | ||
82 | 37 | --prefix=*) | ||
83 | 38 | ARGS="$ARGS -DCMAKE_INSTALL_PREFIX=${1#*=}";; | ||
84 | 39 | *) | ||
85 | 40 | grep -e '^#~' $0 | sed s/#~// | ||
86 | 41 | exit | ||
87 | 42 | esac | ||
88 | 43 | shift | ||
89 | 44 | done | ||
90 | 45 | |||
91 | 46 | BUILD_DIR="_build" | ||
92 | 47 | |||
93 | 48 | if [ ! -f GNUmakefile ]; then | ||
94 | 49 | cp -v GNUmakefile.in GNUmakefile || exit 1 | ||
95 | 50 | fi | ||
96 | 51 | |||
97 | 52 | mkdir -p $BUILD_DIR && cd $BUILD_DIR || exit 1 | ||
98 | 53 | cmake $ARGS .. || exit 1 | ||
99 | 54 | |||
100 | 55 | echo | ||
101 | 56 | echo "Configuring done, run \"make\" to compile" | ||
102 | 0 | 57 | ||
103 | === removed file 'configure' | |||
104 | --- configure 2012-04-05 21:47:48 +0000 | |||
105 | +++ configure 1970-01-01 00:00:00 +0000 | |||
106 | @@ -1,157 +0,0 @@ | |||
107 | 1 | #! /bin/sh | ||
108 | 2 | |||
109 | 3 | # waf configure wrapper | ||
110 | 4 | |||
111 | 5 | # Fancy colors used to beautify the output a bit. | ||
112 | 6 | # | ||
113 | 7 | if [ "$NOCOLOR" ] ; then | ||
114 | 8 | NORMAL="" | ||
115 | 9 | BOLD="" | ||
116 | 10 | RED="" | ||
117 | 11 | YELLOW="" | ||
118 | 12 | GREEN="" | ||
119 | 13 | else | ||
120 | 14 | NORMAL="\033[0m" | ||
121 | 15 | BOLD="\033[1m" | ||
122 | 16 | RED="\033[91m" | ||
123 | 17 | YELLOW="\033[01;93m" | ||
124 | 18 | GREEN="\033[92m" | ||
125 | 19 | fi | ||
126 | 20 | |||
127 | 21 | EXIT_SUCCESS=0 | ||
128 | 22 | EXIT_FAILURE=1 | ||
129 | 23 | EXIT_ERROR=2 | ||
130 | 24 | EXIT_BUG=10 | ||
131 | 25 | |||
132 | 26 | CUR_DIR=$PWD | ||
133 | 27 | |||
134 | 28 | #possible relative path | ||
135 | 29 | WORKINGDIR=`dirname $0` | ||
136 | 30 | cd $WORKINGDIR | ||
137 | 31 | #abs path | ||
138 | 32 | WORKINGDIR=`pwd` | ||
139 | 33 | cd $CUR_DIR | ||
140 | 34 | |||
141 | 35 | # Checks for Python interpreter. Honours $PYTHON if set. Stores path to | ||
142 | 36 | # interpreter in $PYTHON. | ||
143 | 37 | # | ||
144 | 38 | checkPython() | ||
145 | 39 | { | ||
146 | 40 | if [ -z "$PYTHON" ] ; then | ||
147 | 41 | PYTHON=`which python2 2>/dev/null` | ||
148 | 42 | fi | ||
149 | 43 | if [ -z "$PYTHON" ] ; then | ||
150 | 44 | PYTHON=`which python 2>/dev/null` | ||
151 | 45 | fi | ||
152 | 46 | printf "Checking for Python\t\t\t: " | ||
153 | 47 | if [ ! -x "$PYTHON" ] ; then | ||
154 | 48 | printf $RED"not found!"$NORMAL"\n" | ||
155 | 49 | echo "Please make sure that the Python interpreter is available in your PATH" | ||
156 | 50 | echo "or invoke configure using the PYTHON flag, e.g." | ||
157 | 51 | echo "$ PYTHON=/usr/local/bin/python configure" | ||
158 | 52 | exit $EXIT_FAILURE | ||
159 | 53 | fi | ||
160 | 54 | printf $GREEN"$PYTHON"$NORMAL"\n" | ||
161 | 55 | } | ||
162 | 56 | |||
163 | 57 | # Checks for WAF. Honours $WAF if set. Stores path to 'waf' in $WAF. | ||
164 | 58 | # Requires that $PYTHON is set. | ||
165 | 59 | # | ||
166 | 60 | checkWAF() | ||
167 | 61 | { | ||
168 | 62 | printf "Checking for WAF\t\t\t: " | ||
169 | 63 | #installed miniwaf in sourcedir | ||
170 | 64 | if [ -z "$WAF" ] ; then | ||
171 | 65 | if [ -f "${WORKINGDIR}/waf" ] ; then | ||
172 | 66 | WAF="${WORKINGDIR}/waf" | ||
173 | 67 | if [ ! -x "$WAF" ] ; then | ||
174 | 68 | chmod +x $WAF | ||
175 | 69 | fi | ||
176 | 70 | fi | ||
177 | 71 | fi | ||
178 | 72 | if [ -z "$WAF" ] ; then | ||
179 | 73 | if [ -f "${WORKINGDIR}/waf-light" ] ; then | ||
180 | 74 | ${WORKINGDIR}/waf-light --make-waf | ||
181 | 75 | WAF="${WORKINGDIR}/waf" | ||
182 | 76 | fi | ||
183 | 77 | fi | ||
184 | 78 | #global installed waf with waf->waf.py link | ||
185 | 79 | if [ -z "$WAF" ] ; then | ||
186 | 80 | WAF=`which waf 2>/dev/null` | ||
187 | 81 | fi | ||
188 | 82 | # neither waf nor miniwaf could be found | ||
189 | 83 | if [ ! -x "$WAF" ] ; then | ||
190 | 84 | printf $RED"not found"$NORMAL"\n" | ||
191 | 85 | echo "Go to http://code.google.com/p/waf/" | ||
192 | 86 | echo "and download a waf version" | ||
193 | 87 | exit $EXIT_FAILURE | ||
194 | 88 | else | ||
195 | 89 | printf $GREEN"$WAF"$NORMAL"\n" | ||
196 | 90 | fi | ||
197 | 91 | WAF="$PYTHON $WAF" | ||
198 | 92 | } | ||
199 | 93 | |||
200 | 94 | # Generates a Makefile. Requires that $WAF is set. | ||
201 | 95 | # | ||
202 | 96 | generateMakefile() | ||
203 | 97 | { | ||
204 | 98 | cat > Makefile << EOF | ||
205 | 99 | #!/usr/bin/make -f | ||
206 | 100 | # Waf Makefile wrapper | ||
207 | 101 | WAF_HOME=$CUR_DIR | ||
208 | 102 | |||
209 | 103 | all: | ||
210 | 104 | @$WAF build | ||
211 | 105 | |||
212 | 106 | all-debug: | ||
213 | 107 | @$WAF -v build | ||
214 | 108 | |||
215 | 109 | all-progress: | ||
216 | 110 | @$WAF -p build | ||
217 | 111 | |||
218 | 112 | install: | ||
219 | 113 | @if test -n "\$(DESTDIR)"; then \\ | ||
220 | 114 | $WAF install --destdir="\$(DESTDIR)"; \\ | ||
221 | 115 | else \\ | ||
222 | 116 | $WAF install; \\ | ||
223 | 117 | fi; | ||
224 | 118 | |||
225 | 119 | .PHONY: install | ||
226 | 120 | |||
227 | 121 | uninstall: | ||
228 | 122 | @if test -n "\$(DESTDIR)"; then \\ | ||
229 | 123 | $WAF uninstall --destdir="\$(DESTDIR)"; \\ | ||
230 | 124 | else \\ | ||
231 | 125 | $WAF uninstall; \\ | ||
232 | 126 | fi; | ||
233 | 127 | |||
234 | 128 | clean: | ||
235 | 129 | @$WAF clean | ||
236 | 130 | |||
237 | 131 | distclean: | ||
238 | 132 | @$WAF distclean | ||
239 | 133 | @-rm -rf _build | ||
240 | 134 | @-rm -f Makefile | ||
241 | 135 | |||
242 | 136 | check: | ||
243 | 137 | @$WAF check | ||
244 | 138 | |||
245 | 139 | dist: | ||
246 | 140 | @$WAF dist | ||
247 | 141 | |||
248 | 142 | EOF | ||
249 | 143 | } | ||
250 | 144 | |||
251 | 145 | checkPython | ||
252 | 146 | checkWAF | ||
253 | 147 | |||
254 | 148 | echo "calling waf configure with parameters" | ||
255 | 149 | $WAF configure $* || exit $EXIT_ERROR | ||
256 | 150 | |||
257 | 151 | if [ -f "Makefile" ] ; then | ||
258 | 152 | echo "" | ||
259 | 153 | else | ||
260 | 154 | generateMakefile | ||
261 | 155 | fi | ||
262 | 156 | |||
263 | 157 | exit $EXIT_SUCCESS | ||
264 | 158 | 0 | ||
265 | === removed file 'docs/api/wscript_build' | |||
266 | --- docs/api/wscript_build 2012-04-05 21:47:48 +0000 | |||
267 | +++ docs/api/wscript_build 1970-01-01 00:00:00 +0000 | |||
268 | @@ -1,38 +0,0 @@ | |||
269 | 1 | #! /usr/bin/env python | ||
270 | 2 | # WAF build script for midori | ||
271 | 3 | # This file is licensed under the terms of the expat license, see the file EXPAT. | ||
272 | 4 | |||
273 | 5 | import pproc as subprocess | ||
274 | 6 | import os | ||
275 | 7 | import Utils | ||
276 | 8 | |||
277 | 9 | blddir = '_build' # recognized by ack | ||
278 | 10 | |||
279 | 11 | for module in ('midori', 'katze'): | ||
280 | 12 | try: | ||
281 | 13 | if not os.access (blddir, os.F_OK): | ||
282 | 14 | Utils.check_dir (blddir) | ||
283 | 15 | if not os.access (blddir + '/docs', os.F_OK): | ||
284 | 16 | Utils.check_dir (blddir + '/docs') | ||
285 | 17 | if not os.access (blddir + '/docs/api', os.F_OK): | ||
286 | 18 | Utils.check_dir (blddir + '/docs/api') | ||
287 | 19 | subprocess.call (['gtkdoc-scan', '--module=' + module, | ||
288 | 20 | '--source-dir=' + module, '--output-dir=' + blddir + '/docs/api/' + module, | ||
289 | 21 | '--rebuild-sections', '--rebuild-types']) | ||
290 | 22 | os.chdir (blddir + '/docs/api/' + module) | ||
291 | 23 | subprocess.call (['gtkdoc-mktmpl', '--module=' + module, | ||
292 | 24 | '--output-dir=.' + module]) | ||
293 | 25 | subprocess.call (['gtkdoc-mkdb', '--module=' + module, | ||
294 | 26 | '--source-dir=.', '--output-dir=xml', | ||
295 | 27 | '--source-suffixes=c,h', '--output-format=xml', | ||
296 | 28 | '--default-includes=%s/%s.h' % (module, module), | ||
297 | 29 | '--sgml-mode', '--main-sgml-file=%s.sgml' % module]) | ||
298 | 30 | if not os.access ('html', os.F_OK): | ||
299 | 31 | Utils.check_dir ('html') | ||
300 | 32 | os.chdir ('html') | ||
301 | 33 | subprocess.call (['gtkdoc-mkhtml', module, '../%s.sgml' % module]) | ||
302 | 34 | Utils.pprint ('YELLOW', "Created documentation for %s." % module) | ||
303 | 35 | os.chdir ('../../../../..') | ||
304 | 36 | except Exception, msg: | ||
305 | 37 | print msg | ||
306 | 38 | Utils.pprint ('RED', "Failed to create documentation for %s." % module) | ||
307 | 39 | 0 | ||
308 | === removed file 'extensions/wscript_build' | |||
309 | --- extensions/wscript_build 2013-08-04 11:10:12 +0000 | |||
310 | +++ extensions/wscript_build 1970-01-01 00:00:00 +0000 | |||
311 | @@ -1,62 +0,0 @@ | |||
312 | 1 | #! /usr/bin/env python | ||
313 | 2 | # WAF build script for midori | ||
314 | 3 | # This file is licensed under the terms of the expat license, see the file EXPAT. | ||
315 | 4 | |||
316 | 5 | import Options | ||
317 | 6 | import os | ||
318 | 7 | |||
319 | 8 | extensions = os.listdir ('extensions') | ||
320 | 9 | for extension in extensions: | ||
321 | 10 | # FIXME In the absense of a proper mechanism, transfers is a stock extension | ||
322 | 11 | if not bld.env['addons'] and extension != 'transfers.vala': | ||
323 | 12 | continue | ||
324 | 13 | |||
325 | 14 | folder = 'extensions' + os.sep + extension | ||
326 | 15 | if os.path.isdir (folder): | ||
327 | 16 | files = os.listdir (folder) | ||
328 | 17 | target = extension | ||
329 | 18 | source = '' | ||
330 | 19 | for fila in files: | ||
331 | 20 | if fila[-2:] == '.c' or fila[-5:] == '.vala': | ||
332 | 21 | source += ' ' + extension + os.sep + fila | ||
333 | 22 | if not source: | ||
334 | 23 | Utils.pprint ('RED', folder + ': No source files found') | ||
335 | 24 | continue | ||
336 | 25 | else: | ||
337 | 26 | if extension[-2:] == '.c': | ||
338 | 27 | target = extension[:-2] | ||
339 | 28 | elif extension[-5:] == '.vala': | ||
340 | 29 | target = extension[:-5] | ||
341 | 30 | else: | ||
342 | 31 | continue | ||
343 | 32 | source = extension | ||
344 | 33 | |||
345 | 34 | # FIXME | ||
346 | 35 | if bld.env['HAVE_WEBKIT2'] and target in ['external-download-manager', 'nsplugin-manager', 'formhistory', 'adblock', 'cookie-permissions', 'addons', 'nojs']: | ||
347 | 36 | continue | ||
348 | 37 | |||
349 | 38 | obj = bld.new_task_gen ('cc', 'shlib') | ||
350 | 39 | obj.target = target | ||
351 | 40 | obj.includes = '.. ../katze ../midori' | ||
352 | 41 | obj.source = source | ||
353 | 42 | obj.uselib = 'UNIQUE LIBSOUP GIO GTK SQLITE WEBKIT LIBXML GRANITE' | ||
354 | 43 | if 'vala' in source: | ||
355 | 44 | obj.env.append_value ('CCFLAGS', '-w') | ||
356 | 45 | obj.vapi_dirs = '../midori ../katze' | ||
357 | 46 | obj.packages = 'glib-2.0 gio-2.0 libsoup-2.4 sqlite3 midori midori-core katze' | ||
358 | 47 | if bld.env['HAVE_GTK3']: | ||
359 | 48 | obj.packages += ' gtk+-3.0' | ||
360 | 49 | else: | ||
361 | 50 | obj.packages += ' gtk+-2.0' | ||
362 | 51 | if bld.env['HAVE_WEBKIT2']: | ||
363 | 52 | obj.packages += ' webkit2gtk-3.0' | ||
364 | 53 | else: | ||
365 | 54 | obj.packages += ' webkitgtk-3.0' | ||
366 | 55 | if bld.env['HAVE_GRANITE']: | ||
367 | 56 | obj.packages += ' granite' | ||
368 | 57 | if bld.env['platform'] != 'win32': | ||
369 | 58 | obj.packages += ' linux' | ||
370 | 59 | obj.install_path = '${LIBDIR}/midori' | ||
371 | 60 | # See LINKFLAGS in wscript: w/ o it we get several "undefined reference" errors | ||
372 | 61 | if bld.env['platform'] == 'win32': | ||
373 | 62 | obj.uselib_local = 'midori' | ||
374 | 63 | 0 | ||
375 | === removed file 'icons/wscript_build' | |||
376 | --- icons/wscript_build 2012-07-11 20:25:33 +0000 | |||
377 | +++ icons/wscript_build 1970-01-01 00:00:00 +0000 | |||
378 | @@ -1,44 +0,0 @@ | |||
379 | 1 | #! /usr/bin/env python | ||
380 | 2 | # WAF build script for midori | ||
381 | 3 | # This file is licensed under the terms of the expat license, see the file EXPAT. | ||
382 | 4 | |||
383 | 5 | import Utils | ||
384 | 6 | import os | ||
385 | 7 | |||
386 | 8 | def add_image (bld, category, name): | ||
387 | 9 | |||
388 | 10 | srcdir = os.getcwd () | ||
389 | 11 | blddir = bld.bdir | ||
390 | 12 | |||
391 | 13 | rsvg_convert = bld.env['RSVG_CONVERT'] | ||
392 | 14 | |||
393 | 15 | if rsvg_convert: | ||
394 | 16 | Utils.check_dir (blddir + '/icons') | ||
395 | 17 | |||
396 | 18 | icon_sizes = [16, 22, 24, 32, 48] | ||
397 | 19 | |||
398 | 20 | for size in icon_sizes: | ||
399 | 21 | format = str (size) + 'x' + str (size) | ||
400 | 22 | if os.access (srcdir + '/icons/' + format + '/' + name + '.png', os.F_OK): | ||
401 | 23 | bld.install_files ('${MDATADIR}/icons/hicolor/' + format + '/' + category, | ||
402 | 24 | srcdir + '/icons/' + format + '/' + name + '.png') | ||
403 | 25 | elif not rsvg_convert: | ||
404 | 26 | pass | ||
405 | 27 | elif os.access (srcdir + '/icons/scalable/' + name + '.svg', os.F_OK): | ||
406 | 28 | Utils.check_dir (blddir + '/icons/' + format) | ||
407 | 29 | command = rsvg_convert + ' -w ' + str(size) + \ | ||
408 | 30 | ' -h ' + str(size) + \ | ||
409 | 31 | ' -o ' + blddir + '/icons/' + format + '/' + name + '.png' + \ | ||
410 | 32 | ' ' + srcdir + '/icons/scalable/' + name + '.svg' | ||
411 | 33 | if not Utils.exec_command (command): | ||
412 | 34 | bld.install_files ('${MDATADIR}/icons/hicolor/' + format + '/' + category, | ||
413 | 35 | blddir + '/icons/' + format + '/' + name + '.png') | ||
414 | 36 | else: | ||
415 | 37 | Utils.pprint ('BLUE', "Optimized icons could not be created.") | ||
416 | 38 | break | ||
417 | 39 | bld.install_files ('${MDATADIR}/icons/hicolor/scalable/' + category, | ||
418 | 40 | srcdir + '/icons/scalable/' + name + '.svg') | ||
419 | 41 | |||
420 | 42 | add_image (bld, 'categories', 'extension') | ||
421 | 43 | add_image (bld, 'apps', 'midori') | ||
422 | 44 | add_image (bld, 'status', 'internet-news-reader') | ||
423 | 45 | 0 | ||
424 | === removed file 'midori/wscript_build' | |||
425 | --- midori/wscript_build 2013-06-29 18:01:37 +0000 | |||
426 | +++ midori/wscript_build 1970-01-01 00:00:00 +0000 | |||
427 | @@ -1,58 +0,0 @@ | |||
428 | 1 | #! /usr/bin/env python | ||
429 | 2 | # WAF build script for midori | ||
430 | 3 | # This file is licensed under the terms of the expat license, see the file EXPAT. | ||
431 | 4 | |||
432 | 5 | import Options | ||
433 | 6 | import platform | ||
434 | 7 | import os | ||
435 | 8 | |||
436 | 9 | progressive = True | ||
437 | 10 | libs = 'M UNIQUE LIBSOUP GMODULE GTHREAD LIBIDN GIO GTK SQLITE ' \ | ||
438 | 11 | 'LIBNOTIFY WEBKIT JAVASCRIPTCOREGTK LIBXML X11 XSS WS2_32 ' \ | ||
439 | 12 | 'GCR GRANITE ZEITGEIST OLE32 UUID ' | ||
440 | 13 | |||
441 | 14 | if Options.commands['build'] or Options.commands['check']: | ||
442 | 15 | blddir = str (bld.bldnode)[6:] # dir:// + absolute path | ||
443 | 16 | duplicate_vapi = blddir + '/default/midori/midori-core.vapi' | ||
444 | 17 | if os.path.exists (duplicate_vapi): | ||
445 | 18 | os.remove (duplicate_vapi) | ||
446 | 19 | |||
447 | 20 | if progressive: | ||
448 | 21 | obj = bld.new_task_gen ('cc', 'staticlib') | ||
449 | 22 | obj.target = 'midori-core' | ||
450 | 23 | obj.find_sources_in_dirs ('../katze . ../panels ../toolbars', exts=['.vala']) | ||
451 | 24 | obj.env.append_value ('CCFLAGS', '-w') | ||
452 | 25 | obj.uselib = libs | ||
453 | 26 | obj.vapi_dirs = '../midori ../katze' | ||
454 | 27 | obj.packages = 'glib-2.0 gmodule-2.0 gio-2.0 libsoup-2.4 posix sqlite3' | ||
455 | 28 | if bld.env['HAVE_WEBKIT2']: | ||
456 | 29 | obj.packages += ' webkit2gtk-3.0' | ||
457 | 30 | else: | ||
458 | 31 | obj.packages += ' webkitgtk-3.0' | ||
459 | 32 | if bld.env['HAVE_GTK3']: | ||
460 | 33 | obj.packages += ' gtk+-3.0' | ||
461 | 34 | else: | ||
462 | 35 | obj.packages += ' gtk+-2.0' | ||
463 | 36 | if bld.env['HAVE_GRANITE']: | ||
464 | 37 | obj.packages += ' granite' | ||
465 | 38 | obj.install_path = None | ||
466 | 39 | bld.add_group () | ||
467 | 40 | |||
468 | 41 | obj = bld.new_task_gen ('cc', 'staticlib') | ||
469 | 42 | obj.target = 'midori-c' | ||
470 | 43 | obj.includes = '.. ../katze . ../toolbars' | ||
471 | 44 | obj.find_sources_in_dirs ('../katze . ../panels ../toolbars', exts=['.c'], excludes=['main.c']) | ||
472 | 45 | obj.uselib = libs | ||
473 | 46 | obj.uselib_local = 'midori-core' | ||
474 | 47 | obj.add_marshal_file ('marshal.list', 'midori_cclosure_marshal') | ||
475 | 48 | obj.install_path = None | ||
476 | 49 | bld.add_group () | ||
477 | 50 | |||
478 | 51 | obj = bld.new_task_gen ('cc', 'program') | ||
479 | 52 | obj.target = 'midori' | ||
480 | 53 | obj.includes = '.. ../katze . ../panels' | ||
481 | 54 | obj.source = './main.c' | ||
482 | 55 | obj.uselib = libs | ||
483 | 56 | obj.uselib_local = 'midori-c' | ||
484 | 57 | if bld.env['WINRC']: | ||
485 | 58 | obj.source += ' ../data/midori.rc' | ||
486 | 59 | 0 | ||
487 | === removed file 'tests/wscript_build' | |||
488 | --- tests/wscript_build 2013-03-20 21:09:48 +0000 | |||
489 | +++ tests/wscript_build 1970-01-01 00:00:00 +0000 | |||
490 | @@ -1,59 +0,0 @@ | |||
491 | 1 | #! /usr/bin/env python | ||
492 | 2 | # WAF build script for midori | ||
493 | 3 | # This file is licensed under the terms of the expat license, see the file EXPAT. | ||
494 | 4 | |||
495 | 5 | import os | ||
496 | 6 | import sys | ||
497 | 7 | import Utils | ||
498 | 8 | |||
499 | 9 | tests = os.listdir ('tests') | ||
500 | 10 | for test in tests: | ||
501 | 11 | folder = 'tests' + os.sep + test | ||
502 | 12 | if os.path.isdir (folder): | ||
503 | 13 | files = os.listdir (folder) | ||
504 | 14 | target = test | ||
505 | 15 | source = '' | ||
506 | 16 | for fila in files: | ||
507 | 17 | if fila[-2:] == '.c' or fila[-5:] == '.vala': | ||
508 | 18 | source += ' ' + test + os.sep + fila | ||
509 | 19 | if not source: | ||
510 | 20 | Utils.pprint ('RED', folder + ': No source files found') | ||
511 | 21 | sys.exit (1) | ||
512 | 22 | |||
513 | 23 | elif test[-3:] == '.py' or test[-3:] == '.sh': | ||
514 | 24 | obj = bld.new_task_gen ('command-output') | ||
515 | 25 | obj.no_inputs = obj.no_outputs = obj.command_is_external = True | ||
516 | 26 | obj.command = ['python', 'sh'][test[-3:] == '.sh'] | ||
517 | 27 | os.environ['SRCDIR'] = os.getcwd () | ||
518 | 28 | os.environ['BLDDIR'] = '_build' | ||
519 | 29 | obj.argv = [os.path.join (os.getcwd (), folder)] | ||
520 | 30 | continue | ||
521 | 31 | elif test[-2:] == '.c': | ||
522 | 32 | target = test[:-2] | ||
523 | 33 | source = test | ||
524 | 34 | elif test[-5:] == '.vala': | ||
525 | 35 | target = test[:-5] | ||
526 | 36 | source = test | ||
527 | 37 | else: | ||
528 | 38 | Utils.pprint ('YELLOW', folder + ': Skipped') | ||
529 | 39 | continue | ||
530 | 40 | |||
531 | 41 | obj = bld.new_task_gen ('cc', 'program') | ||
532 | 42 | obj.target = 'test-' + target | ||
533 | 43 | obj.includes = '.. ../midori ../panels' | ||
534 | 44 | obj.source = source | ||
535 | 45 | if 'vala' in source: | ||
536 | 46 | obj.env.append_value ('CCFLAGS', '-w') | ||
537 | 47 | obj.vapi_dirs = '../midori ../katze' | ||
538 | 48 | obj.packages = 'glib-2.0 gio-2.0 libsoup-2.4 sqlite3 katze midori midori-core' | ||
539 | 49 | if bld.env['HAVE_GTK3']: | ||
540 | 50 | obj.packages += ' gtk+-3.0' | ||
541 | 51 | else: | ||
542 | 52 | obj.packages += ' gtk+-2.0' | ||
543 | 53 | if bld.env['HAVE_WEBKIT2']: | ||
544 | 54 | obj.packages += ' webkit2gtk-3.0' | ||
545 | 55 | else: | ||
546 | 56 | obj.packages += ' webkitgtk-3.0' | ||
547 | 57 | obj.uselib = 'UNIQUE LIBSOUP GIO GTK SQLITE WEBKIT LIBXML GRANITE ZEITGEIST' | ||
548 | 58 | obj.uselib_local = 'midori-c' | ||
549 | 59 | obj.unit_test = 1 | ||
550 | 60 | 0 | ||
551 | === modified file 'tools/midori-dev' | |||
552 | --- tools/midori-dev 2013-05-19 14:04:16 +0000 | |||
553 | +++ tools/midori-dev 2013-10-11 16:49:38 +0000 | |||
554 | @@ -41,7 +41,7 @@ | |||
555 | 41 | 41 | ||
556 | 42 | case $CMD in | 42 | case $CMD in |
557 | 43 | bzr) | 43 | bzr) |
559 | 44 | exec ./waf build --run "$@" >& $LOG | 44 | exec _build/midori/midori "$@" >& $LOG |
560 | 45 | ;; | 45 | ;; |
561 | 46 | gdb) | 46 | gdb) |
562 | 47 | gdb $BIN core | 47 | gdb $BIN core |
563 | 48 | 48 | ||
564 | === removed file 'waf' | |||
565 | --- waf 2010-10-18 22:53:01 +0000 | |||
566 | +++ waf 1970-01-01 00:00:00 +0000 | |||
567 | @@ -1,162 +0,0 @@ | |||
568 | 1 | #!/usr/bin/env python | ||
569 | 2 | # encoding: ISO-8859-1 | ||
570 | 3 | # Thomas Nagy, 2005-2010 | ||
571 | 4 | |||
572 | 5 | """ | ||
573 | 6 | Redistribution and use in source and binary forms, with or without | ||
574 | 7 | modification, are permitted provided that the following conditions | ||
575 | 8 | are met: | ||
576 | 9 | |||
577 | 10 | 1. Redistributions of source code must retain the above copyright | ||
578 | 11 | notice, this list of conditions and the following disclaimer. | ||
579 | 12 | |||
580 | 13 | 2. Redistributions in binary form must reproduce the above copyright | ||
581 | 14 | notice, this list of conditions and the following disclaimer in the | ||
582 | 15 | documentation and/or other materials provided with the distribution. | ||
583 | 16 | |||
584 | 17 | 3. The name of the author may not be used to endorse or promote products | ||
585 | 18 | derived from this software without specific prior written permission. | ||
586 | 19 | |||
587 | 20 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR | ||
588 | 21 | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
589 | 22 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
590 | 23 | DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, | ||
591 | 24 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
592 | 25 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | ||
593 | 26 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
594 | 27 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
595 | 28 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | ||
596 | 29 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
597 | 30 | POSSIBILITY OF SUCH DAMAGE. | ||
598 | 31 | """ | ||
599 | 32 | |||
600 | 33 | import os, sys | ||
601 | 34 | if sys.hexversion<0x203000f: raise ImportError("Waf requires Python >= 2.3") | ||
602 | 35 | |||
603 | 36 | if 'PSYCOWAF' in os.environ: | ||
604 | 37 | try:import psyco;psyco.full() | ||
605 | 38 | except:pass | ||
606 | 39 | |||
607 | 40 | VERSION="1.5.19" | ||
608 | 41 | REVISION="d046dea57dbefcabd071866ac51eb518" | ||
609 | 42 | INSTALL='' | ||
610 | 43 | C1='#*' | ||
611 | 44 | C2='#%' | ||
612 | 45 | cwd = os.getcwd() | ||
613 | 46 | join = os.path.join | ||
614 | 47 | |||
615 | 48 | WAF='waf' | ||
616 | 49 | def b(x): | ||
617 | 50 | return x | ||
618 | 51 | |||
619 | 52 | if sys.hexversion>0x300000f: | ||
620 | 53 | WAF='waf3' | ||
621 | 54 | def b(x): | ||
622 | 55 | return x.encode() | ||
623 | 56 | |||
624 | 57 | def err(m): | ||
625 | 58 | print(('\033[91mError: %s\033[0m' % m)) | ||
626 | 59 | sys.exit(1) | ||
627 | 60 | |||
628 | 61 | def unpack_wafdir(dir): | ||
629 | 62 | f = open(sys.argv[0],'rb') | ||
630 | 63 | c = "corrupted waf (%d)" | ||
631 | 64 | while 1: | ||
632 | 65 | line = f.readline() | ||
633 | 66 | if not line: err("run waf-light from a folder containing wafadmin") | ||
634 | 67 | if line == b('#==>\n'): | ||
635 | 68 | txt = f.readline() | ||
636 | 69 | if not txt: err(c % 1) | ||
637 | 70 | if f.readline()!=b('#<==\n'): err(c % 2) | ||
638 | 71 | break | ||
639 | 72 | if not txt: err(c % 3) | ||
640 | 73 | txt = txt[1:-1].replace(b(C1), b('\n')).replace(b(C2), b('\r')) | ||
641 | 74 | |||
642 | 75 | import shutil, tarfile | ||
643 | 76 | try: shutil.rmtree(dir) | ||
644 | 77 | except OSError: pass | ||
645 | 78 | try: | ||
646 | 79 | for x in ['Tools', '3rdparty']: | ||
647 | 80 | os.makedirs(join(dir, 'wafadmin', x)) | ||
648 | 81 | except OSError: | ||
649 | 82 | err("Cannot unpack waf lib into %s\nMove waf into a writeable directory" % dir) | ||
650 | 83 | |||
651 | 84 | os.chdir(dir) | ||
652 | 85 | tmp = 't.bz2' | ||
653 | 86 | t = open(tmp,'wb') | ||
654 | 87 | t.write(txt) | ||
655 | 88 | t.close() | ||
656 | 89 | |||
657 | 90 | t = None | ||
658 | 91 | try: | ||
659 | 92 | t = tarfile.open(tmp) | ||
660 | 93 | except: | ||
661 | 94 | try: | ||
662 | 95 | os.system('bunzip2 t.bz2') | ||
663 | 96 | t = tarfile.open('t') | ||
664 | 97 | except: | ||
665 | 98 | os.chdir(cwd) | ||
666 | 99 | try: shutil.rmtree(dir) | ||
667 | 100 | except OSError: pass | ||
668 | 101 | err("Waf cannot be unpacked, check that bzip2 support is present") | ||
669 | 102 | |||
670 | 103 | for x in t: t.extract(x) | ||
671 | 104 | t.close() | ||
672 | 105 | |||
673 | 106 | for x in ['Tools', '3rdparty']: | ||
674 | 107 | os.chmod(join('wafadmin',x), 493) | ||
675 | 108 | |||
676 | 109 | if sys.hexversion>0x300000f: | ||
677 | 110 | sys.path = [join(dir, 'wafadmin')] + sys.path | ||
678 | 111 | import py3kfixes | ||
679 | 112 | py3kfixes.fixdir(dir) | ||
680 | 113 | |||
681 | 114 | os.chdir(cwd) | ||
682 | 115 | |||
683 | 116 | def test(dir): | ||
684 | 117 | try: os.stat(join(dir, 'wafadmin')); return os.path.abspath(dir) | ||
685 | 118 | except OSError: pass | ||
686 | 119 | |||
687 | 120 | def find_lib(): | ||
688 | 121 | name = sys.argv[0] | ||
689 | 122 | base = os.path.dirname(os.path.abspath(name)) | ||
690 | 123 | |||
691 | 124 | #devs use $WAFDIR | ||
692 | 125 | w=test(os.environ.get('WAFDIR', '')) | ||
693 | 126 | if w: return w | ||
694 | 127 | |||
695 | 128 | #waf-light | ||
696 | 129 | if name.endswith('waf-light'): | ||
697 | 130 | w = test(base) | ||
698 | 131 | if w: return w | ||
699 | 132 | err("waf-light requires wafadmin -> export WAFDIR=/folder") | ||
700 | 133 | |||
701 | 134 | dir = "/lib/%s-%s-%s/" % (WAF, VERSION, REVISION) | ||
702 | 135 | for i in [INSTALL,'/usr','/usr/local','/opt']: | ||
703 | 136 | w = test(i+dir) | ||
704 | 137 | if w: return w | ||
705 | 138 | |||
706 | 139 | #waf-local | ||
707 | 140 | s = '.%s-%s-%s' | ||
708 | 141 | if sys.platform == 'win32': s = s[1:] | ||
709 | 142 | dir = join(base, s % (WAF, VERSION, REVISION)) | ||
710 | 143 | w = test(dir) | ||
711 | 144 | if w: return w | ||
712 | 145 | |||
713 | 146 | #unpack | ||
714 | 147 | unpack_wafdir(dir) | ||
715 | 148 | return dir | ||
716 | 149 | |||
717 | 150 | wafdir = find_lib() | ||
718 | 151 | w = join(wafdir, 'wafadmin') | ||
719 | 152 | t = join(w, 'Tools') | ||
720 | 153 | f = join(w, '3rdparty') | ||
721 | 154 | sys.path = [w, t, f] + sys.path | ||
722 | 155 | |||
723 | 156 | if __name__ == '__main__': | ||
724 | 157 | import Scripting | ||
725 | 158 | Scripting.prepare(t, cwd, VERSION, wafdir) | ||
726 | 159 | |||
727 | 160 | #==> | ||
728 | 161 | #BZh91AY&SY+Þ$ | ||
729 | 162 | Úÿÿ± Øÿÿÿÿÿÿÿÿÿÿÿ‚@!$0Â�½ ˆ€ | 0 | Úÿÿ± Øÿÿÿÿÿÿÿÿÿÿÿ‚@!$0Â�½ ˆ€ |
730 | 163 | aØ<û×¾÷ ð | 1 | aØ<û×¾÷ ð |
731 | 164 | #*<… 2 ^ñŠ_lŠP{e%U#*" |