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