blob: 80d12d81ed32c9acf61af8b5a23b5cc9612633cd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
# Maintainer: Orlando Arias <orlandoarias at gmail <dot> com>
_target=msp430-elf
_tiver=1.212
pkgname=${_target}-mcu
pkgver=9.3.1.2
pkgrel=1
pkgdesc="Header files, linker scripts, and device description files for MSP430 microcontrollers"
arch=('any')
url="http://www.ti.com/tool/msp430-gcc-opensource"
license=('custom')
options=('!strip' 'staticlibs' 'emptydirs')
source=(http://software-dl.ti.com/msp430/msp430_public_sw/mcu/msp430/MSPGCC/${pkgver//./_}/export/msp430-gcc-support-files-${_tiver}.zip
license)
sha256sums=('3b1a39f10a344dfefb767e60ac35becef4c065013be86993195b138a5fb0b8d6'
'cd344f1a8da5c24768fbcc3494ad12b9880a82097dfb5a4d63d2a52f2833cc38')
# TI changed the directory things get placed into...
_extractdir=msp430-gcc-support-files/include
build() {
cd "${srcdir}/${_extractdir}"
# https://sourceware.org/bugzilla/show_bug.cgi?id=17940
# some linker scripts are missing the necessary debug_line the linker expects
# for f in *.ld; do
# echo -n "Modifying linker script ${f}... "
# sed -i \
# "s|(\.debug_line)|(\.debug_line \.debug_line\.\* \.debug_line_end)|g" \
# ${f}
# [[ $? = "0" ]] && echo "ok" || echo "fail"
# done
}
package() {
cd "${srcdir}/${_extractdir}"
# install linker scripts
# binutils does weird stuff and does not look in lib/ldscripts
install -dm755 "${pkgdir}/usr/${_target}/lib"
for f in *.ld; do
install -m644 ${f} "${pkgdir}/usr/${_target}/lib"
done
# install header files
install -dm755 "${pkgdir}/usr/${_target}/include"
for f in *.h; do
install -m644 ${f} "${pkgdir}/usr/${_target}/include"
done
# install device description file
install -dm755 "${pkgdir}/usr/${_target}/include/devices"
install -m644 devices.csv "${pkgdir}/usr/${_target}/include/devices"
# copy license file
install -dm755 "${pkgdir}/usr/share/licenses/msp430-elf-mcu"
install -m644 "${srcdir}/license" "${pkgdir}/usr/share/licenses/msp430-elf-mcu"
}
# vim:set ts=2 sw=2 et:
|