aboutsummaryrefslogtreecommitdiffstats
path: root/devel/msp430-gcc3/Makefile
blob: 729bac601a9f530a5dc97d43603ed0c3f4b85b1d (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
# New ports collection makefile for:    msp430-gcc
# Date created:     15 October 2002
# Whom:         Lev Serebryakov <lev@serebryakov.spb.ru>
#
# $FreeBSD$
#

PORTNAME=   gcc
PORTVERSION=    ${GCCVERSION}.${PATCHVERSION}
PORTEPOCH=  2
CATEGORIES= devel
MASTER_SITES=   ${MASTER_SITE_SOURCEWARE} \
        http://lev.serebryakov.spb.ru/download/msp430/:patches
MASTER_SITE_SUBDIR= ${PORTNAME}/releases/${PORTNAME}-${GCCVERSION}
PKGNAMEPREFIX=  msp430-
DISTFILES=  ${PORTNAME}-core-${GCCVERSION}${EXTRACT_SUFX} \
        ${PKGNAMEPREFIX}${PORTNAME}-${GCCVERSION}.${PATCHVERSION}${EXTRACT_SUFX}:patches

MAINTAINER= lev@FreeBSD.org
COMMENT=    FSF gcc-3.2 for TI's msp430 MCUs cross-development

BUILD_DEPENDS=  ${PKGNAMEPREFIX}as:${PORTSDIR}/devel/${PKGNAMEPREFIX}binutils \
        ${PKGNAMEPREFIX}ld:${PORTSDIR}/devel/${PKGNAMEPREFIX}binutils
RUN_DEPENDS=    ${PKGNAMEPREFIX}as:${PORTSDIR}/devel/${PKGNAMEPREFIX}binutils \
        ${PKGNAMEPREFIX}ld:${PORTSDIR}/devel/${PKGNAMEPREFIX}binutils

GCCVERSION= 3.2.3
PATCHVERSION=   20040329

WRKSRC=     ${WRKDIR}/${PORTNAME}-${GCCVERSION}

USE_BZIP2=  yes
USE_GMAKE=  yes
USE_PERL5_BUILD=yes
USE_INC_LIBTOOL_VER=    13
CONFIGURE_ARGS= --target=${PKGNAMEPREFIX:S/-$//} \
        --enable-languages=c --disable-nls
MAKE_ENV=   PATH=${PREFIX}/bin:${PATH}
LIBTOOLFILES=   configure gcc/configure
MAN1=       ${PKGNAMEPREFIX}gcc.1 ${PKGNAMEPREFIX}cpp.1 ${PKGNAMEPREFIX}gcov.1

PLIST_SUB+= PORTVERSION=${PORTVERSION} GCC_TARG=${PKGNAMEPREFIX:S/-$//} \
        GCC_REV=${GCCVERSION}

BINARIES=   gcc cpp

.include <bsd.port.pre.mk>

.if ${ARCH} == "amd64"
BROKEN=     "Does not compile on amd64 due to platform rename"
.endif


post-configure:
    @${PERL} -pi.bak -e 's,^(TARGET_CONFIGDIRS\s*=).+$$,\1,' ${WRKSRC}/Makefile
    @${PERL} -pi.bak -e 's,^(install-info:),\1\ndonot-\1,' ${WRKSRC}/gcc/Makefile

post-install:
.for F in ${BINARIES}
    @${STRIP_CMD} ${PREFIX}/bin/${PKGNAMEPREFIX}$F
    @${LN} -f ${PREFIX}/bin/${PKGNAMEPREFIX}$F \
        ${PREFIX}/${PKGNAMEPREFIX:S/-$//}/bin/$F
.endfor

.include <bsd.port.post.mk>