blob: 69dfa13e3b38ae5f73d40e28295c2e2777f7dde1 (
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
|
# $FreeBSD$
PORTNAME= gcc-msp430-ti-toolchain
PORTVERSION= ${GCC_VERSION}.${TI_VERSION}.${RELEASE_DATE}
PORTREVISION?= 0
CATEGORIES= devel
MASTER_SITES= http://software-dl.ti.com/msp430/msp430_public_sw/mcu/msp430/MSPGCC/${TI_VERSION:S/./_/g}/exports/ \
http://www.ti.com/lit/ml/slau591b/:docs
DISTFILES= msp430-gcc-source.tar.bz2 \
msp430-gcc-support-files.zip \
slau591b.pdf:docs
DIST_SUBDIR= mspgcc${TI_VERSION}
EXTRACT_ONLY= msp430-gcc-source.tar.bz2 \
msp430-gcc-support-files.zip
MAINTAINER= lev@FreeBSD.org
COMMENT= Complete gcc-based toolcahin for TI MSP430 uC
LICENSE= GPLv2 LGPL20 LGPL21 GPLv3 LGPL3
LICENSE_COMB= multi
BUILD_DEPENDS= expect:lang/expect \
flex:textproc/flex
#OPTIONS_DEFINE= INSIGHT PURE
OPTIONS_DEFINE= PURE
OPTIONS_DEFAULT=
#INSIGHT_DESC= Build graphical version of gdb (Insight), needs X11 and TK
PURE_DESC= Use all libraries from bundle, do not depend on anything
OPTIONS_SUB= yes
#INSIGHT_CONFIGURE_WITH= x
#INSIGHT_CONFIGURE_ENABLE= gdbtk
#INSIGHT_USE= XORG=x11
PURE_CONFIGURE_OFF= --with-gmp=${PREFIX} \
--with-mprf=${PREFIX} \
--with-mpc=${PREFIX}
PURE_LIB_DEPENDS_OFF= libgmp.so:math/gmp \
libmpfr.so:math/mpfr \
libmpc.so:math/mpc
PURE_EXTRA_PATCHES_OFF= ${PATCHDIR}/extra-patch-libgui_configure \
${PATCHDIR}/extra-patch-gdb_configure
NOT_FOR_ARCHS= aarch64 arm armeb armv6 armv6hf \
mips mips64 mips64el mipsel mipsn32
NOT_FOR_ARCHS_REASON= Very slow to build on emulator
USES= bison compiler cpe gmake libtool makeinfo ncurses tar:bzip2
USE_CSTD= gnu89
GNU_CONFIGURE= yes
GNU_CONFIGURE_PREFIX= ${PREFIX}/${SUBPREFIX}
CONFIGURE_ARGS= --target=${TARGET} \
--enable-languages=c,c++ \
--disable-nls
MAKE_JOBS_UNSAFE= yes
.include <bsd.port.options.mk>
#.if !${PORT_OPTIONS:MPURE} && ${PORT_OPTIONS:MINSIGHT}
#RUN_DEPENDS+= iwidgets>0:x11-toolkits/iwidgets
#USES+= tk:84+
#CONFIGURE_ARGS+= --with-tcl=${TCL_LIBDIR} \
# --with-tk=${TK_LIBDIR}
#.endif
.include "bsd.port.pre.mk"
GCC_VERSION= 5.3.0
TI_VERSION= 4.00.01.00
RELEASE_DATE= 20160401
TARGET= msp430-elf
CPE_PRODUCT= gcc
CPE_VENDOR= gnu
CPE_VERSION= ${GCC_VERSION}
WRKSRC= ${WRKDIR}/sources/tools
CONFIGURE_WRKSRC=${WRKDIR}/build
CONFIGURE_SCRIPT=../sources/tools/configure
BUILD_WRKSRC= ${WRKDIR}/build
INSTALL_WRKSRC= ${WRKDIR}/build
SUBPREFIX= ${PORTNAME}-${TI_VERSION}
MANPREFIX= ${GNU_CONFIGURE_PREFIX}
DOCSDIR= ${GNU_CONFIGURE_PREFIX}/docs
PLIST_SUB+= TARGET=${TARGET} GCC_VERSION=${GCC_VERSION} \
TI_VERSION=${TI_VERSION}
PLIST_SUB+= INSIGHT="@comment "
UNNEEDED_HOST_FILES= lib/lib${TARGET}-sim.a
#.if ${PORT_OPTIONS:MPURE} && ${PORT_OPTIONS:MINSIGHT}
#UNNEEDED_HOST_FILES+= lib/libtcl8.4.a lib/libtclstub8.4.a \
# lib/tclConfig.sh
#.if ${PORT_OPTIONS:MINSIGHT}
#UNNEEDED_HOST_FILES+= lib/libtk8.4.a lib/libtkstub8.4.a \
# lib/tkConfig.sh \
# lib/itclConfig.sh lib/itcl3.3/libitclstub3.3.a
#.endif
#.endif
UNNEEDED_HOST_DIRS= include info man share
pre-extract:
@${MKDIR} ${BUILD_WRKSRC}
# Till we don't have Insight, we don't need to build tcl anyway
post-patch:
@${RM} -rf ${WRKSRC}/tcl ${WRKSRC}/tk ${WRKSRC}/itcl \
${WRKSRC}/libgui
post-patch-PURE-off:
@${RM} -rf ${WRKSRC}/gmp ${WRKSRC}/mpfr ${WRKSRC}/mpc
post-stage:
@${ECHO_MSG} "Remove unneeded host files..."
@for f in ${UNNEEDED_HOST_FILES} ; do \
${RM} "${STAGEDIR}${GNU_CONFIGURE_PREFIX}/$$f" ; \
done
@for f in ${UNNEEDED_HOST_DIRS} ; do \
${RM} -rf "${STAGEDIR}${GNU_CONFIGURE_PREFIX}/$$f" ; \
done
@${ECHO_MSG} "Install devices' headers and linker scripts..."
@${MKDIR} ${STAGEDIR}${GNU_CONFIGURE_PREFIX}/include
cd ${WRKDIR}/GCC_RH && \
${TAR} cf - . | \
${TAR} xf - -C ${STAGEDIR}${GNU_CONFIGURE_PREFIX}
@${ECHO_MSG} "Install minimal documentation..."
@${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_MAN} ${DISTDIR}/${DIST_SUBDIR}/slau591b.pdf \
${STAGEDIR}${DOCSDIR}/slau591b.pdf
${INSTALL_MAN} ${FILESDIR}/watchdog.txt \
${STAGEDIR}${DOCSDIR}/watchdog.txt
.include <bsd.port.post.mk>
|