Ticket #28611: Portfile

File Portfile, 2.7 KB (added by NF6X (Mark J. Blair), 13 years ago)

Portfile for mspgcc4

Line 
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
4PortSystem          1.0
5name                mspgcc4
6version             20110213
7categories          cross devel
8platforms           darwin
9maintainers         nf6x.net:nf6x
10description         MSP430 C/C++ compiler and debugger.
11
12long_description    mspgcc4 is an open-source cross-compiler and debugger \
13                    for the Texas Instruments MSP430 family of microcontrollers.
14
15homepage            http://mspgcc4.sourceforge.net/
16
17depends_lib         port:wget \
18                    port:ncurses \
19                    port:zlib \
20                    port:libiconv \
21                    port:expat \
22
23patchfiles          do-gcc.sh.patch \
24                    buildgcc.pl.disable-dialog.patch \
25                    gcc-4.4.5.patch.patch
26
27fetch.type          git
28git.url             git://mspgcc4.git.sourceforge.net/gitroot/mspgcc4/mspgcc4
29git.branch          release/${version}
30
31post-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
48use_configure       no
49extract {}
50
51build {
52    # This package uses an interactive build script.
53    system "cd ${worksrcpath} && perl buildgcc.pl <<_EOF
541
551
562
571
58y
59${destroot}${prefix}/${name}-${version}
60n
61n
62do_build.sh
63n
64_EOF"
65    system "cd ${worksrcpath} && sh build/do_build.sh"
66}
67
68destroot.violate_mtree  yes
69destroot {
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