Ticket #12898: Portfile

File Portfile, 2.2 KB (added by platon@…, 16 years ago)

Update of the portfile to remove a now useless patch (patch-sim-extra.diff).

Line 
1# $Id: $
2
3PortSystem 1.0
4name tinyos
5version 2.0.2
6categories devel wsn
7maintainers notalpe@yahoo.co.jp
8description The TinyOS operating systems for wireless sensor networks.
9homepage http://www.tinyos.net/
10platforms       darwin
11
12long_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
19depends_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               
30fetch.type      cvs
31cvs.root        :pserver:anonymous@tinyos.cvs.sourceforge.net:/cvsroot/tinyos
32cvs.module tinyos-2.x
33
34patchfiles      patch-avr-rules.diff
35               
36destroot.violate_mtree yes
37
38set files ${portpath}/files
39set worksrcorig ${worksrcpath}
40set worksrcpath ${worksrcpath}/tools
41set worksrcdir ${worksrcdir}/tools
42
43post-fetch {
44        # Show the actual version of TinyOS in the directory name
45        system "cd ${workpath} && mv ${cvs.module} ${name}-${version}"
46}
47
48pre-patch {
49        # Instantiate the patch template
50        reinplace "s|prefix|${prefix}|" ${files}/patch-sim-extra.diff
51}
52
53post-patch {
54        reinplace "s|${prefix}|prefix|" ${files}/patch-sim-extra.diff
55}
56
57pre-configure {
58        reinplace s|AM_INIT_AUTOMAKE|AM_INIT_AUTOMAKE(no-exeext)| ${worksrcpath}/configure.ac
59        system "cd ${worksrcpath} && sh ./Bootstrap"
60}
61
62post-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}