# Created by: Lev Serebryakov # $FreeBSD$ PORTNAME= libc PORTVERSION= 1.0.${LIBCVERSION} PORTREVISION= 1 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_SINGLE= SG1 OPTIONS_SINGLE_SG1= GCC4 GCC3 GCC4_DESC= Use new msp430-gcc4 compiler GCC3_DESC= Use old msp430-gcc3 compiler OPTIONS_DEFAULT= GCC4 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} NO_STAGE= yes .include .if ${PORT_OPTIONS:MGCC4} BUILD_DEPENDS+= ${PKGNAMEPREFIX}gcc:${PORTSDIR}/devel/${PKGNAMEPREFIX}gcc PLIST_SUB+= GCC3="@comment " GCC4="" NEEDGCCVERSION= 4 PORTGCCVERSION= OTHEGCCVERSION= 3 .elif ${PORT_OPTIONS:MGCC3} PLIST_SUB+= GCC3="" GCC4="@comment " NEEDGCCVERSION= 3 PORTGCCVERSION= ${NEEDGCCVERSION} OTHEGCCVERSION= 4 .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