1 # Template file for 'msp430-toolchain'
2 pkgname=msp430-toolchain
5 short_desc="Toolchain for the TI MSP430 microprocessor"
6 maintainer="allan <mail@may.mooo.com>"
7 homepage="http://www.ti.com/tool/msp430-gcc-opensource"
9 distfiles="http://software-dl.ti.com/msp430/msp430_public_sw/mcu/msp430/MSPGCC/${version//./_}/exports/msp430-gcc-source.tar.bz2
10 http://software-dl.ti.com/msp430/msp430_public_sw/mcu/msp430/MSPGCC/${version//./_}/exports/msp430-gcc-support-files.zip"
11 checksum="d2110ec64e8a055ff89b7eef8217b3c233c30e370e2cb43e1ad835dad5907d1c
12 1e2a0903e6b02d5e8aac2a7297ec0685e95a980b13b937b5c7f24f4cf6015407"
16 hostmakedepends="unzip expect flex"
17 makedepends="ncurses-devel"
20 _target=msp430-none-elf
23 unset CC LD AR AS RANLIB CPP CFLAGS CPPFLAGS LDFLAGS
28 ../sources/tools/configure \
30 --enable-languages=c \
31 --program-prefix="msp430-" \
40 unset CC LD AR AS RANLIB CPP CFLAGS CPPFLAGS LDFLAGS
43 sed -i 's:^prefix =.*:prefix = '${DESTDIR}'/@prefix@:' \
44 ../sources/tools/libgloss/Makefile.in
45 sed -i 's:^LIBEXPAT .*:LIBEXPAT = @LIBEXPAT@ @BDYNAMIC@:' \
46 ../sources/tools/gdb/Makefile.in
48 make ${makejobs} DESTDIR=${DESTDIR} all
53 sed -i '190,194s:$(tooldir):'${DESTDIR}'/$(tooldir):' \
54 msp430-none-elf/libgloss/msp430/Makefile \
55 msp430-none-elf/430/libgloss/msp430/Makefile \
56 msp430-none-elf/430/nomul/libgloss/msp430/Makefile \
57 msp430-none-elf/430/32mul/libgloss/msp430/Makefile \
58 msp430-none-elf/32mul/libgloss/msp430/Makefile \
59 msp430-none-elf/nomul/libgloss/msp430/Makefile \
60 msp430-none-elf/f5mul/libgloss/msp430/Makefile \
61 msp430-none-elf/large/libgloss/msp430/Makefile \
62 msp430-none-elf/large/nomul/libgloss/msp430/Makefile \
63 msp430-none-elf/large/f5mul/libgloss/msp430/Makefile \
64 msp430-none-elf/large/32mul/libgloss/msp430/Makefile
66 make DESTDIR=${DESTDIR} prefix=${_prefix} install
68 # copy msp430-gcc-support-files.zip
69 cp ${wrksrc}/msp430-gcc-support-files/*.h \
70 ${DESTDIR}/${_prefix}/${_target}/include/
71 cp ${wrksrc}/msp430-gcc-support-files/*.ld \
72 ${DESTDIR}/${_prefix}/${_target}/lib/430/
74 mkdir -p ${DESTDIR}/usr/bin
75 cd ${DESTDIR}/${_prefix}/bin
77 do ln -s ${_prefix}/bin/$i ${DESTDIR}/usr/bin/$i