use a patched waf for hppa, thanks to Jakub Wilk (Closes: #559989)
This commit is contained in:
parent
a1b136a39c
commit
8ca7335783
3 changed files with 124 additions and 7 deletions
6
debian/changelog
vendored
6
debian/changelog
vendored
|
@ -1,3 +1,9 @@
|
|||
midori (0.2.4-2) UNRELEASED; urgency=low
|
||||
|
||||
* use a patched waf for hppa, thanks to Jakub Wilk (Closes: #559989)
|
||||
|
||||
-- Ryan Niebur <ryan@debian.org> Mon, 29 Mar 2010 00:34:33 -0700
|
||||
|
||||
midori (0.2.4-1) unstable; urgency=low
|
||||
|
||||
* New Upstream Version
|
||||
|
|
25
debian/rules
vendored
25
debian/rules
vendored
|
@ -19,7 +19,8 @@ override_dh_quilt_patch:
|
|||
$(CMD)
|
||||
|
||||
#WAF=/usr/bin/waf
|
||||
WAF=./waf
|
||||
BASE_WAF=./waf
|
||||
WAF=env WAFDIR=debian/ $(BASE_WAF)
|
||||
|
||||
debian/presubj: debian/presubj.in
|
||||
@echo "presubj parameters:"
|
||||
|
@ -33,20 +34,23 @@ debian/presubj: debian/presubj.in
|
|||
override_dh_install: debian/presubj
|
||||
$(CMD)
|
||||
|
||||
override_dh_auto_clean:
|
||||
WAFADMIN_FILE=debian/wafadmin/Runner.py
|
||||
WAFADMIN_APPEND=debian/runner-append
|
||||
|
||||
override_dh_auto_clean: $(WAFADMIN_FILE)
|
||||
$(WAF) --nocache distclean
|
||||
rm -rf _build_
|
||||
|
||||
override_dh_auto_configure:
|
||||
override_dh_auto_configure: $(WAFADMIN_FILE)
|
||||
$(WAF) --nocache configure --prefix /usr
|
||||
|
||||
override_dh_auto_build:
|
||||
override_dh_auto_build: $(WAFADMIN_FILE)
|
||||
$(WAF) --nocache build --debug full
|
||||
|
||||
override_dh_auto_test:
|
||||
override_dh_auto_test: $(WAFADMIN_FILE)
|
||||
xvfb-run $(WAF) --nocache check
|
||||
|
||||
override_dh_auto_install:
|
||||
override_dh_auto_install: $(WAFADMIN_FILE)
|
||||
$(WAF) --nocache install --destdir debian/tmp
|
||||
rm -f debian/tmp/usr/share/doc/midori/COPYING debian/tmp/usr/share/doc/midori/TRANSLATE
|
||||
rm -f debian/tmp/usr/share/midori/res/mootools.js
|
||||
|
@ -57,8 +61,15 @@ PRIORITY=$(shell sed -r -e '/DEBIAN_WWW_ALTERNATIVES_PRIORITY/ !d' -e 's/.* ([^
|
|||
debian/midori.postinst: debian/midori.postinst.base
|
||||
sed "s/DEBIAN_WWW_ALTERNATIVES_PRIORITY/$(PRIORITY)/g" debian/midori.postinst.base > debian/midori.postinst
|
||||
|
||||
$(WAFADMIN_FILE): $(BASE_WAF) $(WAFADMIN_APPEND)
|
||||
rm -fr debian/wafadmin/ .waf-*
|
||||
$(BASE_WAF) --help >/dev/null
|
||||
cp -a ./.waf-*/wafadmin debian/
|
||||
rm -fr .waf-*
|
||||
cat $(WAFADMIN_APPEND) >> $(WAFADMIN_FILE)
|
||||
|
||||
override_dh_clean:
|
||||
rm -fr .waf-1.5.3-575529c232c0559c3efb0adb3d077447/
|
||||
rm -fr debian/wafadmin
|
||||
$(CMD)
|
||||
|
||||
override_dh_installdeb: debian/midori.postinst
|
||||
|
|
100
debian/runner-append
vendored
Normal file
100
debian/runner-append
vendored
Normal file
|
@ -0,0 +1,100 @@
|
|||
# curl "http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=43;filename=xmms2-hppa.diff;att=1;bug=558983" | grep ^+ | grep -v ^+++ | sed 's/^+//' > debian/runner-append
|
||||
|
||||
class Serial(object):
|
||||
|
||||
def __init__(self, bld, j=1):
|
||||
self.manager = bld.task_manager
|
||||
self.outstanding = []
|
||||
|
||||
# progress bar
|
||||
self.total = self.manager.total()
|
||||
self.processed = 0
|
||||
self.error = 0
|
||||
|
||||
self.switchflag = 1 # postpone
|
||||
|
||||
self.consumers = None
|
||||
|
||||
# warning, this one is recursive ..
|
||||
def get_next(self):
|
||||
if self.outstanding:
|
||||
t = self.outstanding.pop(0)
|
||||
self.processed += 1
|
||||
return t
|
||||
|
||||
# handle case where only one wscript exist
|
||||
# that only install files
|
||||
if not self.manager.groups:
|
||||
return None
|
||||
|
||||
(_, self.outstanding) = self.manager.get_next_set()
|
||||
if not self.outstanding: return None
|
||||
|
||||
return self.get_next()
|
||||
|
||||
def postpone(self, tsk):
|
||||
self.processed -= 1
|
||||
self.switchflag *= -1
|
||||
# this actually shuffle the list
|
||||
if self.switchflag>0: self.outstanding.insert(0, tsk)
|
||||
else: self.outstanding.append(tsk)
|
||||
|
||||
def start(self):
|
||||
debug('runner: Serial start called')
|
||||
while 1:
|
||||
# get next Task
|
||||
tsk = self.get_next()
|
||||
if tsk is None: break
|
||||
|
||||
if Logs.verbose: debug('runner: retrieving %r' % tsk)
|
||||
|
||||
st = tsk.runnable_status()
|
||||
if st == ASK_LATER:
|
||||
debug('runner: postponing %r' % tsk)
|
||||
self.postpone(tsk)
|
||||
continue
|
||||
|
||||
#continue
|
||||
if st == SKIP_ME:
|
||||
tsk.hasrun = SKIPPED
|
||||
self.manager.add_finished(tsk)
|
||||
continue
|
||||
|
||||
tsk.position = (self.processed, self.total)
|
||||
|
||||
# display the command that we are about to run
|
||||
tsk.generator.bld.printout(tsk.display())
|
||||
|
||||
# run the command
|
||||
if tsk.__class__.stat: ret = tsk.__class__.stat(tsk)
|
||||
else: ret = tsk.run()
|
||||
self.manager.add_finished(tsk)
|
||||
|
||||
# non-zero means something went wrong
|
||||
if ret:
|
||||
self.error = 1
|
||||
tsk.hasrun = CRASHED
|
||||
tsk.err_code = ret
|
||||
if Options.options.keep: continue
|
||||
else: return -1
|
||||
|
||||
try:
|
||||
tsk.post_run()
|
||||
except OSError:
|
||||
self.error = 1
|
||||
tsk.hasrun = MISSING
|
||||
if Options.options.keep: continue
|
||||
else: return -1
|
||||
else:
|
||||
tsk.hasrun = SUCCESS
|
||||
|
||||
if self.error:
|
||||
return -1
|
||||
|
||||
import subprocess
|
||||
print "== Using patched Runner.py for HPPA =="
|
||||
p = subprocess.Popen(['dpkg', '--print-architecture'], stdout=subprocess.PIPE)
|
||||
arch = p.stdout.read().strip()
|
||||
p.wait()
|
||||
if arch == 'hppa':
|
||||
Parallel = Serial
|
Loading…
Reference in a new issue