allow empty CVSDATE_foo to override CVSDATE
[vuplus_openembedded] / classes / base.oeclass
1 PATCHES_DIR="${S}"
2
3 def base_dep_prepend(d):
4         import oe;
5         #
6         # Ideally this will check a flag so we will operate properly in
7         # the case where host == build == target, for now we don't work in
8         # that case though.
9         #
10         deps = ""
11         if not oe.data.getVar('INHIBIT_DEFAULT_DEPS', d):
12                 deps += "patcher-native"
13                 if (oe.data.getVar('HOST_SYS', d, 1) !=
14                     oe.data.getVar('BUILD_SYS', d, 1)):
15                         deps += " virtual/${TARGET_PREFIX}gcc virtual/libc "
16         return deps
17
18 def base_read_file(filename):
19         import oe
20         try:
21                 f = file( filename, "r" )
22         except IOError, reason:
23                 raise oe.build.FuncFailed("can't read from file '%s' (%s)", (filename,reason))
24         else:
25                 return f.read().strip()
26         return None
27
28 DEPENDS_prepend="${@base_dep_prepend(d)} "
29
30 def base_set_filespath(d):
31         import os, oe
32         filespath = []
33         for p in [ "${FILE_DIRNAME}/${PF}", "${FILE_DIRNAME}/${P}", "${FILE_DIRNAME}/${PN}", "${FILE_DIRNAME}/files", "${FILE_DIRNAME}" ]:
34                 overrides = oe.data.getVar("OVERRIDES", d, 1) or ""
35                 overrides = overrides + ":"
36                 for o in overrides.split(":"):
37                         filespath.append(os.path.join(p, o))
38         oe.data.setVar("FILESPATH", ":".join(filespath), d)
39
40 FILESPATH = "${@base_set_filespath(d)}"
41
42 die() {
43         oefatal "$*"
44 }
45
46 oenote() {
47         echo "NOTE:" "$*"
48 }
49
50 oewarn() {
51         echo "WARNING:" "$*"
52 }
53
54 oefatal() {
55         echo "FATAL:" "$*"
56         exit 1
57 }
58
59 oedebug() {
60         test $# -ge 2 || {
61                 echo "Usage: oedebug level \"message\""
62                 exit 1
63         }
64
65         test ${OEDEBUG:-0} -ge $1 && {
66                 shift
67                 echo "DEBUG:" $*
68         }
69 }
70
71 oe_runmake() {
72         if [ x"$MAKE" = x ]; then MAKE=make; fi
73         oenote ${MAKE} ${EXTRA_OEMAKE} "$@"
74         ${MAKE} ${EXTRA_OEMAKE} "$@" || die "oemake failed"
75 }
76
77 oe_soinstall() {
78         # Purpose: Install shared library file and
79         #          create the necessary links
80         # Example:
81         #
82         # oe_
83         #
84         #oenote installing shared library $1 to $2
85         #
86         libname=`basename $1`
87         install -m 755 $1 $2/$libname
88         sonamelink=`${HOST_PREFIX}readelf -d $1 |grep 'Library soname:' |sed -e 's/.*\[\(.*\)\].*/\1/'`
89         solink=`echo $libname | sed -e 's/\.so\..*/.so/'`
90         ln -sf $libname $2/$sonamelink
91         ln -sf $libname $2/$solink
92 }
93
94 oe_libinstall() {
95         # Purpose: Install a library, in all its forms
96         # Example
97         #
98         # oe_libinstall libltdl ${STAGING_LIBDIR}/
99         # oe_libinstall -C src/libblah libblah ${D}/${libdir}/
100         dir=""
101         libtool=""
102         while [ "$#" -gt 0 ]; do
103                 case "$1" in
104                 -C)
105                         shift
106                         dir="$1"
107                         ;;
108                 -s)
109                         silent=1
110                         ;;
111                 -a)
112                         require_static=1
113                         ;;
114                 -so)
115                         require_shared=1
116                         ;;
117                 -*)
118                         oefatal "oe_libinstall: unknown option: $1"
119                         ;;
120                 *)
121                         break;
122                         ;;
123                 esac
124                 shift
125         done
126
127         libname="$1"
128         shift
129         destpath="$1"
130         if [ -z "$destpath" ]; then
131                 oefatal "oe_libinstall: no destination path specified"
132         fi
133
134         __runcmd () {
135                 if [ -z "$silent" ]; then
136                         echo >&2 "oe_libinstall: $*"
137                 fi
138                 $*
139         }
140
141         if [ -z "$dir" ]; then
142                 dir=`pwd`
143         fi
144         if [ -d "$dir/.libs" ]; then
145                 dir=$dir/.libs
146         fi
147         olddir=`pwd`
148         __runcmd cd $dir
149
150         lafile=$libname.la
151         if [ -f "$lafile" ]; then
152                 # libtool archive
153                 eval `cat $lafile|grep "^library_names="`
154                 libtool=1
155         else
156                 library_names="$libname.so* $libname.dll.a"
157         fi
158
159         __runcmd install -d $destpath/
160         dota=$libname.a
161         if [ -f "$dota" -o -n "$require_static" ]; then
162                 __runcmd install -m 0644 $dota $destpath/
163         fi
164         dotlai=$libname.lai
165         if [ -f "$dotlai" -o -n "$libtool" ]; then
166                 __runcmd install -m 0644 $dotlai $destpath/$libname.la
167         fi
168
169         for name in $library_names; do
170                 files=`eval echo $name`
171                 for f in $files; do
172                         if [ ! -e "$f" ]; then
173                                 if [ -n "$libtool" ]; then
174                                         oefatal "oe_libinstall: $dir/$f not found."
175                                 fi
176                         elif [ -L "$f" ]; then
177                                 __runcmd cp -P "$f" $destpath/
178                         elif [ ! -L "$f" ]; then
179                                 libfile="$f"
180                                 __runcmd install -m 0755 $libfile $destpath/
181                         fi
182                 done
183         done
184
185         if [ -z "$libfile" ]; then
186                 if  [ -n "$require_shared" ]; then
187                         oefatal "oe_libinstall: unable to locate shared library"
188                 fi
189         elif [ -z "$libtool" ]; then
190                 # special case hack for non-libtool .so.#.#.# links
191                 baselibfile=`basename "$libfile"`
192                 if (echo $baselibfile | grep -qE '^lib.*\.so\.[0-9.]*$'); then
193                         sonamelink=`${HOST_PREFIX}readelf -d $libfile |grep 'Library soname:' |sed -e 's/.*\[\(.*\)\].*/\1/'`
194                         solink=`echo $baselibfile | sed -e 's/\.so\..*/.so/'`
195                         if [ -n "$sonamelink" -a x"$baselibfile" != x"$sonamelink" ]; then
196                                 __runcmd ln -sf $baselibfile $destpath/$sonamelink
197                         fi
198                         __runcmd ln -sf $baselibfile $destpath/$solink
199                 fi
200         fi
201
202         __runcmd cd "$olddir"
203 }
204
205 oe_machinstall() {
206         # Purpose: Install machine dependent files, if available
207         #          If not available, check if there is a default
208         #          If no default, just touch the destination
209         # Example:
210         #                $1  $2   $3         $4
211         # oe_machinstall -m 0644 fstab ${D}/etc/fstab
212         #
213         # TODO: Check argument number?
214         #
215         filename=`basename $3`
216         dirname=`dirname $3`
217
218         for o in `echo ${OVERRIDES} | tr ':' ' '`; do
219                 if [ -e $dirname/$o/$filename ]; then
220                         oenote $dirname/$o/$filename present, installing to $4
221                         install $1 $2 $dirname/$o/$filename $4
222                         return
223                 fi
224         done
225 #       oenote overrides specific file NOT present, trying default=$3...
226         if [ -e $3 ]; then
227                 oenote $3 present, installing to $4
228                 install $1 $2 $3 $4
229         else
230                 oenote $3 NOT present, touching empty $4
231                 touch $4
232         fi
233 }
234
235 addtask showdata
236 do_showdata[nostamp] = "1"
237 python do_showdata() {
238         import sys
239         # emit variables and shell functions
240         oe.data.emit_env(sys.__stdout__, d, True)
241         # emit the metadata which isnt valid shell
242         for e in d.keys():
243                 if oe.data.getVarFlag(e, 'python', d):
244                         sys.__stdout__.write("\npython %s () {\n%s}\n" % (e, oe.data.getVar(e, d, 1)))
245                 elif oe.data.getVarFlag(e, 'func', d):
246                         sys.__stdout__.write("\n%s () {\n%s}\n" % (e, oe.data.getVar(e, d, 1)))
247                 else:
248                         sys.__stdout__.write("%s=%s\n" % (e, oe.data.getVar(e, d, 1)))
249 }
250
251 addtask listtasks
252 do_listtasks[nostamp] = "1"
253 python do_listtasks() {
254         import sys
255         # emit variables and shell functions
256         #oe.data.emit_env(sys.__stdout__, d)
257         # emit the metadata which isnt valid shell
258         for e in d.keys():
259                 if oe.data.getVarFlag(e, 'task', d):
260                         sys.__stdout__.write("%s\n" % e)
261 }
262
263 addtask clean
264 do_clean[dirs] = "${TOPDIR}"
265 do_clean[nostamp] = "1"
266 python base_do_clean() {
267         """clear the build and temp directories"""
268         dir = oe.data.expand("${WORKDIR}", d)
269         if dir == '//': raise oe.build.FuncFailed("wrong DATADIR")
270         oe.note("removing " + dir)
271         os.system('rm -rf ' + dir)
272
273         dir = "%s.*" % oe.data.expand(oe.data.getVar('STAMP', d), d)
274         oe.note("removing " + dir)
275         os.system('rm -f '+ dir)
276 }
277
278 addtask mrproper
279 do_mrproper[dirs] = "${TOPDIR}"
280 do_mrproper[nostamp] = "1"
281 python base_do_mrproper() {
282         """clear downloaded sources, build and temp directories"""
283         dir = oe.data.expand("${DL_DIR}", d)
284         if dir == '/': oe.build.FuncFailed("wrong DATADIR")
285         oe.debug(2, "removing " + dir)
286         os.system('rm -rf ' + dir)
287         oe.build.exec_task('do_clean', d)
288 }
289
290 addtask patch after do_unpack
291 do_patch[dirs] = "${WORKDIR}"
292 python base_do_patch() {
293         import re
294
295         src_uri = oe.data.getVar('SRC_URI', d)
296         if not src_uri:
297                 return
298         src_uri = oe.data.expand(src_uri, d)
299         for url in src_uri.split():
300 #               oe.note('url is %s' % url)
301                 (type, host, path, user, pswd, parm) = oe.decodeurl(url)
302                 if not "patch" in parm:
303                         continue
304                 from oe.fetch import init, localpath
305                 init([url])
306                 url = oe.encodeurl((type, host, path, user, pswd, []))
307                 local = '/' + localpath(url, d)
308                 # patch!
309                 dots = local.split(".")
310                 if dots[-1] in ['gz', 'bz2', 'Z']:
311                         efile = os.path.join(oe.data.getVar('WORKDIR', d),os.path.basename('.'.join(dots[0:-1])))
312                 else:
313                         efile = local
314                 efile = oe.data.expand(efile, d)
315                 patches_dir = oe.data.expand(oe.data.getVar('PATCHES_DIR', d), d)
316                 oe.mkdirhier(patches_dir)
317                 os.chdir(patches_dir)
318                 cmd = "PATH=\"%s\" patcher" % oe.data.getVar("PATH", d, 1)
319                 if "pnum" in parm:
320                         cmd += " -p %s" % parm["pnum"]
321                 cmd += " -n \"%s\" -i %s" % (os.path.basename(efile), efile)
322                 ret = os.system(cmd)
323                 if ret != 0:
324                         raise oe.build.FuncFailed("'patcher' execution failed")
325 }
326
327 addtask fetch
328 do_fetch[dirs] = "${DL_DIR}"
329 do_fetch[nostamp] = "1"
330 python base_do_fetch() {
331         import sys, copy
332
333         localdata = copy.deepcopy(d)
334         oe.data.update_data(localdata)
335
336         src_uri = oe.data.getVar('SRC_URI', localdata, 1)
337         if not src_uri:
338                 return 1
339
340         try:
341                 oe.fetch.init(src_uri.split())
342         except oe.fetch.NoMethodError:
343                 (type, value, traceback) = sys.exc_info()
344                 raise oe.build.FuncFailed("No method: %s" % value)
345
346         try:
347                 oe.fetch.go(localdata)
348         except oe.fetch.MissingParameterError:
349                 (type, value, traceback) = sys.exc_info()
350                 raise oe.build.FuncFailed("Missing parameters: %s" % value)
351         except oe.fetch.FetchError:
352                 (type, value, traceback) = sys.exc_info()
353                 raise oe.build.FuncFailed("Fetch failed: %s" % value)
354 }
355
356 addtask unpack after do_fetch
357 do_unpack[dirs] = "${WORKDIR}"
358 python base_do_unpack() {
359         import re, copy, os
360
361         localdata = copy.deepcopy(d)
362         oe.data.update_data(localdata)
363
364         src_uri = oe.data.getVar('SRC_URI', localdata)
365         if not src_uri:
366                 return
367         src_uri = oe.data.expand(src_uri, localdata)
368         for url in src_uri.split():
369                 try:
370                         local = oe.data.expand(oe.fetch.localpath(url, localdata), localdata)
371                 except oe.MalformedUrl, e:
372                         raise FuncFailed('Unable to generate local path for malformed uri: %s' % e)
373                 # dont need any parameters for extraction, strip them off
374                 local = re.sub(';.*$', '', local)
375                 local = os.path.realpath(local)
376                 dots = local.split(".")
377                 if dots[-1] in ['gz', 'bz2', 'Z']:
378                         efile = os.path.join(oe.data.getVar('WORKDIR', localdata, 1),os.path.basename('.'.join(dots[0:-1])))
379                 else:
380                         efile = local
381                 cmd = None
382                 if local.endswith('.tar'):
383                         cmd = 'tar x --no-same-owner -f %s' % local
384                 elif local.endswith('.tgz') or local.endswith('.tar.gz'):
385                         cmd = 'tar xz --no-same-owner -f %s' % local
386                 elif local.endswith('.tbz') or local.endswith('.tar.bz2'):
387                         cmd = 'bzip2 -dc %s | tar x --no-same-owner -f -' % local
388                 elif local.endswith('.gz') or local.endswith('.Z') or local.endswith('.z'):
389                         loc = local.rfind('.')
390                         cmd = 'gzip -dc %s > %s' % (local, efile)
391                 elif local.endswith('.bz2'):
392                         loc = local.rfind('.')
393                         cmd = 'bzip2 -dc %s > %s' % (local, efile)
394                 elif local.endswith('.zip'):
395                         loc = local.rfind('.')
396                         cmd = 'unzip %s' % local
397                 elif os.path.isdir(local):
398                         filesdir = os.path.realpath(oe.data.getVar("FILESDIR", localdata, 1))
399                         destdir = "."
400                         if local[0:len(filesdir)] == filesdir:
401                                 destdir = local[len(filesdir):local.rfind('/')]
402                                 destdir = destdir.strip('/')
403                                 if len(destdir) < 1:
404                                         destdir = "."
405                                 elif not os.access("%s/%s" % (os.getcwd(), destdir), os.F_OK):
406                                         os.makedirs("%s/%s" % (os.getcwd(), destdir))
407                         cmd = 'cp -a %s %s/%s/' % (local, os.getcwd(), destdir)
408                 else:
409                         (type, host, path, user, pswd, parm) = oe.decodeurl(url)
410                         if not 'patch' in parm:
411                                 destdir = oe.decodeurl(url)[1] or "."
412                                 oe.mkdirhier("%s/%s" % (os.getcwd(), destdir))
413                                 cmd = 'cp %s %s/%s/' % (local, os.getcwd(), destdir)
414                 if not cmd:
415                         continue
416                 oe.note("Unpacking %s to %s/" % (local, os.getcwd()))
417                 ret = os.system(cmd)
418                 if ret != 0:
419                         raise oe.build.FuncFailed("%s execution failed" % cmd)
420 }
421
422 addhandler base_eventhandler
423 python base_eventhandler() {
424         from oe import note, error, data
425         from oe.event import Handled, NotHandled, getName
426         import os
427
428         name = getName(e)
429         if name in ["PkgSucceeded"]:
430                 note("package %s: build completed" % e.pkg)
431         if name in ["PkgStarted"]:
432                 note("package %s: build %s" % (e.pkg, name[3:].lower()))
433         elif name in ["PkgFailed"]:
434                 error("package %s: build %s" % (e.pkg, name[3:].lower()))
435         elif name in ["TaskStarted"]:
436                 note("package %s: task %s %s" % (data.expand(data.getVar("PF", e.data), e.data), e.task, name[4:].lower()))
437         elif name in ["TaskSucceeded"]:
438                 note("package %s: task %s completed" % (data.expand(data.getVar("PF", e.data), e.data), e.task))
439         elif name in ["TaskFailed"]:
440                 error("package %s: task %s %s" % (data.expand(data.getVar("PF", e.data), e.data), e.task, name[4:].lower()))
441         elif name in ["UnsatisfiedDep"]:
442                 note("package %s: dependency %s %s" % (e.pkg, e.dep, name[:-3].lower()))
443         elif name in ["BuildStarted", "BuildCompleted"]:
444                 note("build %s %s" % (e.name, name[5:].lower()))
445         return NotHandled
446 }
447
448 addtask configure after do_unpack do_patch
449 do_configure[dirs] = "${S} ${B}"
450
451 base_do_configure() {
452         :
453 }
454
455 addtask compile after do_configure
456 do_compile[dirs] = "${S} ${B}"
457 base_do_compile() {
458         if [ -e Makefile -o -e makefile ]; then
459                 oe_runmake || die "make failed"
460         else
461                 oenote "nothing to compile"
462         fi
463 }
464
465
466 addtask stage after do_compile
467 base_do_stage () {
468         :
469 }
470
471 do_populate_staging[dirs] = "${STAGING_DIR}/${TARGET_SYS}/bin ${STAGING_DIR}/${TARGET_SYS}/lib \
472                              ${STAGING_DIR}/${TARGET_SYS}/include \
473                              ${STAGING_DIR}/${BUILD_SYS}/bin ${STAGING_DIR}/${BUILD_SYS}/lib \
474                              ${STAGING_DIR}/${BUILD_SYS}/include \
475                              ${STAGING_DATADIR} \
476                              ${S} ${B}"
477
478 addtask populate_staging after do_compile
479
480 #python do_populate_staging () {
481 #       if not oe.data.getVar('manifest', d):
482 #               oe.build.exec_func('do_emit_manifest', d)
483 #       if oe.data.getVar('do_stage', d):
484 #               oe.build.exec_func('do_stage', d)
485 #       else:
486 #               oe.build.exec_func('manifest_do_populate_staging', d)
487 #}
488
489 python do_populate_staging () {
490         if oe.data.getVar('manifest_do_populate_staging', d):
491                 oe.build.exec_func('manifest_do_populate_staging', d)
492         else:
493                 oe.build.exec_func('do_stage', d)
494 }
495
496 #addtask install
497 addtask install after do_compile
498 do_install[dirs] = "${S} ${B}"
499
500 base_do_install() {
501         :
502 }
503
504 #addtask populate_pkgs after do_compile
505 #python do_populate_pkgs () {
506 #       if not oe.data.getVar('manifest', d):
507 #               oe.build.exec_func('do_emit_manifest', d)
508 #       oe.build.exec_func('manifest_do_populate_pkgs', d)
509 #       oe.build.exec_func('package_do_shlibs', d)
510 #}
511
512 base_do_package() {
513         :
514 }
515
516 addtask build after do_populate_staging
517 do_build = ""
518 do_build[nostamp] = "1"
519 do_build[func] = "1"
520
521 # Functions that update metadata based on files outputted
522 # during the build process.
523
524 SHLIBS = ""
525 RDEPENDS_prepend = " ${SHLIBS}"
526
527 python read_manifest () {
528         import sys
529         mfn = oe.data.getVar("MANIFEST", d, 1)
530         if os.access(mfn, os.R_OK):
531                 # we have a manifest, so emit do_stage and do_populate_pkgs,
532                 # and stuff some additional bits of data into the metadata store
533                 mfile = file(mfn, "r")
534                 manifest = oe.manifest.parse(mfile, d)
535                 if not manifest:
536                         return
537
538                 oe.data.setVar('manifest', manifest, d)
539 }
540
541 python parse_manifest () {
542                 manifest = oe.data.getVar("manifest", d)
543                 if not manifest:
544                         return
545                 for func in ("do_populate_staging", "do_populate_pkgs"):
546                         value = oe.manifest.emit(func, manifest, d)
547                         if value:
548                                 oe.data.setVar("manifest_" + func, value, d)
549                                 oe.data.delVarFlag("manifest_" + func, "python", d)
550                                 oe.data.delVarFlag("manifest_" + func, "fakeroot", d)
551                                 oe.data.setVarFlag("manifest_" + func, "func", 1, d)
552                 packages = []
553                 for l in manifest:
554                         if "pkg" in l and l["pkg"] is not None:
555                                 packages.append(l["pkg"])
556                 oe.data.setVar("PACKAGES", " ".join(packages), d)
557 }
558
559 def explode_deps(s):
560         r = []
561         l = s.split()
562         flag = False
563         for i in l:
564                 if i[0] == '(':
565                         flag = True
566                         j = []
567                 if flag:
568                         j.append(i)
569                         if i.endswith(')'):
570                                 flag = False
571                                 r[-1] += ' ' + ' '.join(j)
572                 else:
573                         r.append(i)
574         return r
575
576 python read_shlibdeps () {
577         packages = (oe.data.getVar('PACKAGES', d, 1) or "").split()
578         for pkg in packages:
579                 rdepends = explode_deps(oe.data.getVar('RDEPENDS_' + pkg, d, 0) or oe.data.getVar('RDEPENDS', d, 0) or "")
580                 shlibsfile = oe.data.expand("${WORKDIR}/install/" + pkg + ".shlibdeps", d)
581                 if os.access(shlibsfile, os.R_OK):
582                         fd = file(shlibsfile)
583                         lines = fd.readlines()
584                         fd.close()
585                         for l in lines:
586                                 rdepends.append(l.rstrip())
587                 pcfile = oe.data.expand("${WORKDIR}/install/" + pkg + ".pcdeps", d)
588                 if os.access(pcfile, os.R_OK):
589                         fd = file(pcfile)
590                         lines = fd.readlines()
591                         fd.close()
592                         for l in lines:
593                                 rdepends.append(l.rstrip())
594                 oe.data.setVar('RDEPENDS_' + pkg, " " + " ".join(rdepends), d)
595 }
596
597 python read_subpackage_metadata () {
598         import re
599
600         def decode(str):
601                 import codecs
602                 c = codecs.getdecoder("string_escape")
603                 return c(str)[0]
604
605         data_file = oe.data.expand("${WORKDIR}/install/${PN}.package", d)
606         if os.access(data_file, os.R_OK):
607                 f = file(data_file, 'r')
608                 lines = f.readlines()
609                 f.close()
610                 r = re.compile("([^:]+):\s*(.*)")
611                 for l in lines:
612                         m = r.match(l)
613                         if m:
614                                 oe.data.setVar(m.group(1), decode(m.group(2)), d)
615 }
616
617 python __anonymous () {
618         need_host = oe.data.getVar('COMPATIBLE_HOST', d, 1)
619         if need_host:
620                 import re
621                 this_host = oe.data.getVar('HOST_SYS', d, 1)
622                 if not re.match(need_host, this_host):
623                         raise oe.parse.SkipPackage("incompatible with host %s" % this_host)
624         
625         pn = oe.data.getVar('PN', d, 1)
626         cvsdate = oe.data.getVar('CVSDATE_%s' % pn, d, 1)
627         if cvsdate != None:
628                 oe.data.setVar('CVSDATE', cvsdate, d)
629
630         try:
631                 oe.build.exec_func('read_manifest', d)
632                 oe.build.exec_func('parse_manifest', d)
633                 oe.build.exec_func('read_shlibdeps', d)
634                 oe.build.exec_func('read_subpackage_metadata', d)
635         except Exception, e:
636                 oe.error("anonymous function: %s" % e)
637                 pass
638 }
639
640 addtask emit_manifest
641 python do_emit_manifest () {
642 #       FIXME: emit a manifest here
643 #       1) adjust PATH to hit the wrapper scripts
644         wrappers = oe.which(oe.data.getVar("OEPATH", d, 1), 'build/install', 0)
645         path = (oe.data.getVar('PATH', d, 1) or '').split(':')
646         path.insert(0, os.path.dirname(wrappers))
647         oe.data.setVar('PATH', ':'.join(path), d)
648 #       2) exec_func("do_install", d)
649         oe.build.exec_func('do_install', d)
650 #       3) read in data collected by the wrappers
651         oe.build.exec_func('read_manifest', d)
652 #       4) mangle the manifest we just generated, get paths back into
653 #          our variable form
654 #       5) write it back out
655 #       6) re-parse it to ensure the generated functions are proper
656         oe.build.exec_func('parse_manifest', d)
657 }
658
659 EXPORT_FUNCTIONS do_clean do_mrproper do_fetch do_unpack do_configure do_compile do_install do_package do_patch do_populate_pkgs do_stage
660
661 MIRRORS[func] = "0"
662 MIRRORS () {
663 ${DEBIAN_MIRROR}/main   http://snapshot.debian.net/archive/pool
664 ${DEBIAN_MIRROR}        ftp://ftp.de.debian.org/debian/pool
665 ${DEBIAN_MIRROR}        ftp://ftp.au.debian.org/debian/pool
666 ${DEBIAN_MIRROR}        ftp://ftp.cl.debian.org/debian/pool
667 ${DEBIAN_MIRROR}        ftp://ftp.hr.debian.org/debian/pool
668 ${DEBIAN_MIRROR}        ftp://ftp.fi.debian.org/debian/pool
669 ${DEBIAN_MIRROR}        ftp://ftp.hk.debian.org/debian/pool
670 ${DEBIAN_MIRROR}        ftp://ftp.hu.debian.org/debian/pool
671 ${DEBIAN_MIRROR}        ftp://ftp.ie.debian.org/debian/pool
672 ${DEBIAN_MIRROR}        ftp://ftp.it.debian.org/debian/pool
673 ${DEBIAN_MIRROR}        ftp://ftp.jp.debian.org/debian/pool
674 ${DEBIAN_MIRROR}        ftp://ftp.no.debian.org/debian/pool
675 ${DEBIAN_MIRROR}        ftp://ftp.pl.debian.org/debian/pool
676 ${DEBIAN_MIRROR}        ftp://ftp.ro.debian.org/debian/pool
677 ${DEBIAN_MIRROR}        ftp://ftp.si.debian.org/debian/pool
678 ${DEBIAN_MIRROR}        ftp://ftp.es.debian.org/debian/pool
679 ${DEBIAN_MIRROR}        ftp://ftp.se.debian.org/debian/pool
680 ${DEBIAN_MIRROR}        ftp://ftp.tr.debian.org/debian/pool
681 ${GNU_MIRROR}   ftp://mirrors.kernel.org/gnu
682 ${GNU_MIRROR}   ftp://ftp.matrix.com.br/pub/gnu
683 ${GNU_MIRROR}   ftp://ftp.cs.ubc.ca/mirror2/gnu
684 ${GNU_MIRROR}   ftp://sunsite.ust.hk/pub/gnu
685 ${GNU_MIRROR}   ftp://ftp.ayamura.org/pub/gnu
686 ftp://ftp.kernel.org/pub        http://www.kernel.org/pub
687 ftp://ftp.kernel.org/pub        ftp://ftp.us.kernel.org/pub
688 ftp://ftp.kernel.org/pub        ftp://ftp.uk.kernel.org/pub
689 ftp://ftp.kernel.org/pub        ftp://ftp.hk.kernel.org/pub
690 ftp://ftp.kernel.org/pub        ftp://ftp.au.kernel.org/pub
691 ftp://ftp.kernel.org/pub        ftp://ftp.jp.kernel.org/pub
692 ftp://.*/.*/    http://treke.net/oe/source/
693 http://.*/.*/   http://treke.net/oe/source/
694 }
695