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