blob: a5aea7e66b413cad103e1c0ecb9bfa5fd6b293d5 (
plain) (
blame)
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
|
# New ports collection makefile for: msp430-libc
# Date created: 15 October 2002
# Whom: Lev Serebryakov <lev@serebryakov.spb.ru>
#
# $FreeBSD$
#
PORTNAME= libc
PORTVERSION= 1.0.${LIBCVERSION}
PORTREVISION= 0
CATEGORIES= devel
MASTER_SITES= SF/mspgcc/${PKGNAMEPREFIX}${PORTNAME}
PKGNAMEPREFIX= ${LIBCTARGET}-
PKGNAMESUFFIX= -gcc${NEEDGCCVERSION}
DISTNAME= ${PKGNAMEPREFIX}${PORTNAME}-${LIBCVERSION}
PATCH_SITES= ${MASTER_SITE_SOURCEFORGE}
PATCH_SITE_SUBDIR= mspgcc/Patches/LTS/${LTSVERSION}
PATCHFILES= ${LTS_PATCHES}
PATCH_DIST_STRIP= -p1
MAINTAINER= lev@FreeBSD.org
COMMENT= Libc for TI's msp430 MCUs cross-development
BUILD_DEPENDS= ${LOCALBASE}/${LIBCTARGET}/include/${LIBCTARGET}.h:${PORTSDIR}/devel/${LIBCTARGET}mcu \
${PKGNAMEPREFIX}gcc:${PORTSDIR}/devel/${PKGNAMEPREFIX}gcc${PORTGCCVERSION}
RUN_DEPENDS= ${LOCALBASE}/${LIBCTARGET}/include/${LIBCTARGET}.h:${PORTSDIR}/devel/${LIBCTARGET}mcu \
${PKGNAMEPREFIX}gcc:${PORTSDIR}/devel/${PKGNAMEPREFIX}gcc${PORTGCCVERSION}
CONFLICTS= ${PKGNAMEPREFIX}${PORTNAME}-gcc${OTHERGCCVERSION}-[0-9]*
OPTIONS= GCC4 "Use new msp430-gcc4 compiler" on \
GCC3 "Use old msp430-gcc3 compiler" off
LIBCTARGET= msp430
LIBCVERSION= 20120224
LTSVERSION= 20120406
BUGS_FIXED= 3522752
LTS_PATCHES!= for bugid in ${BUGS_FIXED} ; do echo ${PKGNAMEPREFIX}${PORTNAME}-${LIBCVERSION}-sf$${bugid}.patch ; done
USE_BZIP2= yes
USE_GMAKE= yes
MAKE_ENV= PATH=${PREFIX}/bin:${PATH} PREFIX=${PREFIX}
WRKSRC= ${WRKDIR}/${PKGNAMEPREFIX}libc-${LIBCVERSION}/src
PATCH_WRKSRC= ${WRKDIR}/${PKGNAMEPREFIX}libc-${LIBCVERSION}
.include <bsd.port.options.mk>
.if defined(WITH_GCC4)
.if defined(WITH_GCC3)
BROKEN= Please, select msp430-gcc-4 or msp430-gcc-3, not both
.endif
BUILD_DEPENDS+= ${PKGNAMEPREFIX}gcc:${PORTSDIR}/devel/${PKGNAMEPREFIX}gcc
PLIST_SUB+= GCC3="@comment " GCC4=""
NEEDGCCVERSION= 4
PORTGCCVERSION=
OTHEGCCVERSION= 3
.elif defined(WITH_GCC3)
PLIST_SUB+= GCC3="" GCC4="@comment "
NEEDGCCVERSION= 3
PORTGCCVERSION= ${NEEDGCCVERSION}
OTHEGCCVERSION= 4
.else
BROKEN= Please, select msp430-gcc-4 either msp430-gcc-3
.endif
pre-configure:
@HAVEGCCVERSION=`${PKGNAMEPREFIX}gcc -v 2>&1 | ${GREP} "gcc version " | ${CUT} -d" " -f 3 | ${CUT} -d. -f 1` ; \
if [ "$${HAVEGCCVERSION}" = "" ] ; then \
${ECHO_MSG} "ERROR: Can not find any version of msp430-gcc" ; \
${FALSE} ; \
elif [ "$${HAVEGCCVERSION}" != "${NEEDGCCVERSION}" ] ; then \
${ECHO_MSG} "ERROR: Need msp430-gcc-${NEEDGCCVERSION} but found msp430-gcc-$${HAVEGCCVERSION}" ; \
${FALSE} ; \
fi
.include <bsd.port.mk>
|