1 | # $Id: $ |
---|
2 | |
---|
3 | PortSystem 1.0 |
---|
4 | name tinyos |
---|
5 | version 2.0.2 |
---|
6 | categories devel wsn |
---|
7 | maintainers notalpe@yahoo.co.jp |
---|
8 | description The TinyOS operating systems for wireless sensor networks. |
---|
9 | homepage http://www.tinyos.net/ |
---|
10 | platforms darwin |
---|
11 | |
---|
12 | long_description TinyOS is an operating system for embedded sensor networks. \ |
---|
13 | This system proposes a variety of mechanisms on dust-sized, low power \ |
---|
14 | devices, with a few kilobytes of memory, and wireless communication. \ |
---|
15 | The dev-env variant of this port installs the development environment \ |
---|
16 | (apps and make support tools). The default install only deploys the base \ |
---|
17 | tools from the system. |
---|
18 | |
---|
19 | depends_lib port:autoconf \ |
---|
20 | port:automake \ |
---|
21 | port:nesc \ |
---|
22 | port:avr-libc \ |
---|
23 | port:avr-gcc \ |
---|
24 | port:avr-binutils \ |
---|
25 | port:flex \ |
---|
26 | port:bison \ |
---|
27 | port:graphviz \ |
---|
28 | port:python25 |
---|
29 | |
---|
30 | fetch.type cvs |
---|
31 | cvs.root :pserver:anonymous@tinyos.cvs.sourceforge.net:/cvsroot/tinyos |
---|
32 | cvs.module tinyos-2.x |
---|
33 | |
---|
34 | patchfiles patch-avr-rules.diff |
---|
35 | |
---|
36 | destroot.violate_mtree yes |
---|
37 | |
---|
38 | set files ${portpath}/files |
---|
39 | set worksrcorig ${worksrcpath} |
---|
40 | set worksrcpath ${worksrcpath}/tools |
---|
41 | set worksrcdir ${worksrcdir}/tools |
---|
42 | |
---|
43 | post-fetch { |
---|
44 | # Show the actual version of TinyOS in the directory name |
---|
45 | system "cd ${workpath} && mv ${cvs.module} ${name}-${version}" |
---|
46 | } |
---|
47 | |
---|
48 | pre-patch { |
---|
49 | # Instantiate the patch template |
---|
50 | reinplace "s|prefix|${prefix}|" ${files}/patch-sim-extra.diff |
---|
51 | } |
---|
52 | |
---|
53 | post-patch { |
---|
54 | reinplace "s|${prefix}|prefix|" ${files}/patch-sim-extra.diff |
---|
55 | } |
---|
56 | |
---|
57 | pre-configure { |
---|
58 | reinplace s|AM_INIT_AUTOMAKE|AM_INIT_AUTOMAKE(no-exeext)| ${worksrcpath}/configure.ac |
---|
59 | system "cd ${worksrcpath} && sh ./Bootstrap" |
---|
60 | } |
---|
61 | |
---|
62 | post-destroot { |
---|
63 | set script ${name}.sh |
---|
64 | set template ${script}.tpl |
---|
65 | move ${worksrcorig} ${destroot}${prefix} |
---|
66 | set tosroot ${destroot}${prefix}/${name}-${version} |
---|
67 | file copy ${files}/${template} ${tosroot}/${script} |
---|
68 | reinplace "s|tosroot|${prefix}/${name}-${version}|g" ${tosroot}/${script} |
---|
69 | |
---|
70 | ui_msg "\nTinyOS requires specific environment variables. A configuration script sets them for you: ${tosroot}/${script}.\r" |
---|
71 | ui_msg "You will have to source the script each time you use the system. The most convenient may be to source it from your .profile or similar configuration files: echo \'source ${tosroot}/${script}\' >> ~/.profile\r" |
---|
72 | ui_msg "For manual execution, type: source ${tosroot}/${script}" |
---|
73 | } |
---|