1 | # -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4 |
---|
2 | # $Id$ |
---|
3 | |
---|
4 | PortSystem 1.0 |
---|
5 | name mspgcc4 |
---|
6 | version 20110213 |
---|
7 | categories cross devel |
---|
8 | platforms darwin |
---|
9 | maintainers nf6x.net:nf6x |
---|
10 | description MSP430 C/C++ compiler and debugger. |
---|
11 | |
---|
12 | long_description mspgcc4 is an open-source cross-compiler and debugger \ |
---|
13 | for the Texas Instruments MSP430 family of microcontrollers. |
---|
14 | |
---|
15 | homepage http://mspgcc4.sourceforge.net/ |
---|
16 | |
---|
17 | depends_lib port:wget \ |
---|
18 | port:ncurses \ |
---|
19 | port:zlib \ |
---|
20 | port:libiconv \ |
---|
21 | port:expat \ |
---|
22 | |
---|
23 | patchfiles do-gcc.sh.patch \ |
---|
24 | buildgcc.pl.disable-dialog.patch \ |
---|
25 | gcc-4.4.5.patch.patch |
---|
26 | |
---|
27 | fetch.type git |
---|
28 | git.url git://mspgcc4.git.sourceforge.net/gitroot/mspgcc4/mspgcc4 |
---|
29 | git.branch release/${version} |
---|
30 | |
---|
31 | post-fetch { |
---|
32 | # This package requires an initial fetch from a git repository, and then |
---|
33 | # it normally downloads additional files during its compilation. |
---|
34 | # These files will be fetched automatically by the build script if |
---|
35 | # not already present, but we manually fetch them here so that most/all |
---|
36 | # of the downloading occurs during the fetch phase. |
---|
37 | |
---|
38 | file mkdir ${worksrcpath}/build |
---|
39 | system "cd ${worksrcpath}/build && wget -nd http://ftp.uni-kl.de/pub/gnu/binutils/binutils-2.21.tar.bz2" |
---|
40 | system "cd ${worksrcpath}/build && wget -nd http://ftp.uni-kl.de/pub/gnu/gcc/gcc-4.4.5/gcc-core-4.4.5.tar.bz2" |
---|
41 | system "cd ${worksrcpath}/build && wget -nd http://ftp.uni-kl.de/pub/gnu/gcc/gcc-4.4.5/gcc-g++-4.4.5.tar.bz2" |
---|
42 | system "cd ${worksrcpath}/build && wget -nd http://ftp.uni-kl.de/pub/gnu/gmp/gmp-4.3.1.tar.bz2" |
---|
43 | system "cd ${worksrcpath}/build && wget -nd http://ftp.uni-kl.de/pub/gnu/mpfr/mpfr-2.4.2.tar.bz2" |
---|
44 | system "cd ${worksrcpath}/build && wget -nd http://sourceforge.net/projects/mspgcc4/files/msp430-libc/msp430-libc-ti_${version}.tar.bz2" |
---|
45 | system "cd ${worksrcpath}/build && wget -nd http://ftp.uni-kl.de/pub/gnu/gdb/gdb-7.2.tar.bz2" |
---|
46 | } |
---|
47 | |
---|
48 | use_configure no |
---|
49 | extract {} |
---|
50 | |
---|
51 | build { |
---|
52 | # This package uses an interactive build script. |
---|
53 | system "cd ${worksrcpath} && perl buildgcc.pl <<_EOF |
---|
54 | 1 |
---|
55 | 1 |
---|
56 | 2 |
---|
57 | 1 |
---|
58 | y |
---|
59 | ${destroot}${prefix}/${name}-${version} |
---|
60 | n |
---|
61 | n |
---|
62 | do_build.sh |
---|
63 | n |
---|
64 | _EOF" |
---|
65 | system "cd ${worksrcpath} && sh build/do_build.sh" |
---|
66 | } |
---|
67 | |
---|
68 | destroot.violate_mtree yes |
---|
69 | destroot { |
---|
70 | file mkdir ${destroot}${prefix}/bin |
---|
71 | system "cd ${destroot}${prefix}/${name}-${version}/bin && for i in *; do cd ${destroot}${prefix}/bin && ln -s ../${name}-${version}/bin/\$i; done" |
---|
72 | } |
---|
73 | |
---|