81 lines
2.4 KiB
Bash
81 lines
2.4 KiB
Bash
# Template file for 'msp430-toolchain'
|
|
pkgname=msp430-toolchain
|
|
version=3.05.00.00
|
|
revision=2
|
|
archs="x86_64* i686*"
|
|
short_desc="Toolchain for the TI MSP430 microprocessor"
|
|
maintainer="allan <mail@may.mooo.com>"
|
|
homepage="http://www.ti.com/tool/msp430-gcc-opensource"
|
|
license="GPL-2"
|
|
distfiles="http://software-dl.ti.com/msp430/msp430_public_sw/mcu/msp430/MSPGCC/${version//./_}/exports/msp430-gcc-source.tar.bz2
|
|
http://software-dl.ti.com/msp430/msp430_public_sw/mcu/msp430/MSPGCC/${version//./_}/exports/msp430-gcc-support-files.zip"
|
|
checksum="d2110ec64e8a055ff89b7eef8217b3c233c30e370e2cb43e1ad835dad5907d1c
|
|
1e2a0903e6b02d5e8aac2a7297ec0685e95a980b13b937b5c7f24f4cf6015407"
|
|
nocross=yes
|
|
nostrip=yes
|
|
create_wrksrc=yes
|
|
hostmakedepends="unzip expect flex"
|
|
makedepends="ncurses-devel"
|
|
|
|
_prefix=/usr/msp430
|
|
_target=msp430-none-elf
|
|
|
|
do_configure() {
|
|
unset CC LD AR AS RANLIB CPP CFLAGS CPPFLAGS LDFLAGS
|
|
|
|
mkdir obj-msp
|
|
cd obj-msp
|
|
|
|
../sources/tools/configure \
|
|
--prefix=$_prefix \
|
|
--enable-languages=c \
|
|
--program-prefix="msp430-" \
|
|
--disable-nls \
|
|
--enable-gold \
|
|
--without-x \
|
|
--target=$_target
|
|
rm -rf tcl
|
|
}
|
|
|
|
do_build() {
|
|
unset CC LD AR AS RANLIB CPP CFLAGS CPPFLAGS LDFLAGS
|
|
|
|
cd obj-msp
|
|
sed -i 's:^prefix =.*:prefix = '${DESTDIR}'/@prefix@:' \
|
|
../sources/tools/libgloss/Makefile.in
|
|
sed -i 's:^LIBEXPAT .*:LIBEXPAT = @LIBEXPAT@ @BDYNAMIC@:' \
|
|
../sources/tools/gdb/Makefile.in
|
|
|
|
make ${makejobs} DESTDIR=${DESTDIR} all
|
|
}
|
|
|
|
do_install() {
|
|
cd obj-msp
|
|
sed -i '190,194s:$(tooldir):'${DESTDIR}'/$(tooldir):' \
|
|
msp430-none-elf/libgloss/msp430/Makefile \
|
|
msp430-none-elf/430/libgloss/msp430/Makefile \
|
|
msp430-none-elf/430/nomul/libgloss/msp430/Makefile \
|
|
msp430-none-elf/430/32mul/libgloss/msp430/Makefile \
|
|
msp430-none-elf/32mul/libgloss/msp430/Makefile \
|
|
msp430-none-elf/nomul/libgloss/msp430/Makefile \
|
|
msp430-none-elf/f5mul/libgloss/msp430/Makefile \
|
|
msp430-none-elf/large/libgloss/msp430/Makefile \
|
|
msp430-none-elf/large/nomul/libgloss/msp430/Makefile \
|
|
msp430-none-elf/large/f5mul/libgloss/msp430/Makefile \
|
|
msp430-none-elf/large/32mul/libgloss/msp430/Makefile
|
|
|
|
make DESTDIR=${DESTDIR} prefix=${_prefix} install
|
|
|
|
# copy msp430-gcc-support-files.zip
|
|
cp ${wrksrc}/msp430-gcc-support-files/*.h \
|
|
${DESTDIR}/${_prefix}/${_target}/include/
|
|
cp ${wrksrc}/msp430-gcc-support-files/*.ld \
|
|
${DESTDIR}/${_prefix}/${_target}/lib/430/
|
|
|
|
mkdir -p ${DESTDIR}/usr/bin
|
|
cd ${DESTDIR}/${_prefix}/bin
|
|
for i in *
|
|
do ln -s ${_prefix}/bin/$i ${DESTDIR}/usr/bin/$i
|
|
done
|
|
}
|