1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-30 10:38:37 +00:00
freebsd-ports/lang/gdc/Makefile
Daichi GOTO cfccf82ceb Add gdc 0.8, D Front End for GCC.
PR:		ports/74072
Submitted by:	Masanori OZAWA (ozawa@ongs.co.jp)
2004-11-18 16:10:56 +00:00

106 lines
2.9 KiB
Makefile
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# New ports collection makefile for: D Front End for GCC
# Date created: 18 November 2004
# Whom: Masanori OZAWA (ozawa@ongs.co.jp)
#
# $FreeBSD$
#
PORTNAME= gdc
PORTVERSION= 0.8
CATEGORIES= lang
MASTER_SITES= ${MASTER_SITE_GCC} \
http://home.earthlink.net/~dvdfrdmn/d/:gdc \
http://www.hpl.hp.com/personal/Hans_Boehm/gc/gc_source/:boehm
MASTER_SITE_SUBDIR= snapshots/${GCC_VERSIONSTRING}
DISTFILES= ${PORTNAME}-${PORTVERSION}.tar.bz2:gdc \
gcc-core-${GCC_VERSIONSTRING}.tar.bz2 \
gcc-g++-${GCC_VERSIONSTRING}.tar.bz2 \
gc6.3.tar.gz:boehm
EXTRACT_ONLY= gcc-core-${GCC_VERSIONSTRING}.tar.bz2 \
gcc-g++-${GCC_VERSIONSTRING}.tar.bz2
MAINTAINER= daichi@FreeBSD.org
COMMENT= D Front End for GCC
BUILD_DEPENDS= gcc34:${PORTSDIR}/lang/gcc34
RUN_DEPENDS= gcc34:${PORTSDIR}/lang/gcc34
ONLY_FOR_ARCHS= i386 amd64 alpha
USE_GMAKE= yes
USE_BZIP2= yes
USE_REINPLACE= yes
GCC_VERSION= 3.4.4
GCC_REVISION= 20041112
GCC_VERSIONSTRING= 3.4-${GCC_REVISION}
.include <bsd.port.pre.mk>
.if ${OSVERSION} < 500000
IGNORE= "It is supported on FreeBSD 5.x and later"
.endif
.if ${ARCH} == "amd64"
CONFIGURE_TARGET= x86_64-portbld-freebsd${OSREL}
.else
CONFIGURE_TARGET= ${ARCH}-portbld-freebsd${OSREL}
.endif
GXX_INC=${PREFIX}/lib/gcc/${CONFIGURE_TARGET}/${GCC_VERSION}/include/c++/
CONFIGURE_ARGS+=--disable-nls --with-system-zlib \
--with-libiconv-prefix=${PERFIX} --program-suffix=34 \
--with-gxx-include-dir=${GXX_INC} \
--disable-shared --prefix=${PREFIX} \
--enable-languages=c,d,c++
GNU_CONFIGURE= yes
WRKSRC= ${WRKDIR}/gcc-${GCC_VERSIONSTRING}
GCCDIR= ${WRKSRC}/gcc
D_DIR= ${GCCDIR}/d
PHOBOSDIR= ${D_DIR}/phobos
CC= ${PREFIX}/bin/gcc34
CXX= ${PREFIX}/bin/g++34
DMD= gdc
DFLAGS= -O2 -frelease
PHOBOS_BUILD_ARGS= CC=${CC} CXX=${CXX} DMD=${DMD} DFLAGS="${DFLAGS}" \
PATH="${PATH}:${GCCDIR}"
post-extract:
@${TAR} xjf ${DISTDIR}/${PORTNAME}-${PORTVERSION}${EXTRACT_SUFX} \
-C ${GCCDIR}
@${RM} ${PHOBOSDIR}/boehm-gc
@${TAR} xzf ${DISTDIR}/gc6.3.tar.gz -C ${PHOBOSDIR}
@${MV} ${PHOBOSDIR}/gc6.3 ${PHOBOSDIR}/boehm-gc
post-patch:
@cd ${GCCDIR} && ${PATCH} -p1 < d/patch-gcc-3.4.x
@echo "++ Patching for d/phobos/boehm-gc ++"
@for _PF in `${LS} ${PORTSDIR}/devel/boehm-gc/files/*` ; \
do \
cd ${PHOBOSDIR}/boehm-gc && ${PATCH} < $${_PF}; \
done
@${REINPLACE_CMD} -e \
's|\(const char version_string.*\)";|\1 [FreeBSD]";|' \
${WRKSRC}/gcc/version.c
post-build:
@${MKDIR} ${WRKSRC}/phobos_build
@cd ${WRKSRC}/phobos_build && ${PHOBOS_BUILD_ARGS} \
../gcc/d/phobos/configure --prefix=${PREFIX}
@cd ${WRKSRC}/phobos_build && \
${PHOBOS_BUILD_ARGS} ${GMAKE}
@cd ${WRKSRC}/phobos_build && \
${PHOBOS_BUILD_ARGS} ${GMAKE} unittest
do-install:
${INSTALL} -o root -g wheel -m 755 ${GCCDIR}/gdc ${PREFIX}/bin/
@${STRIP_CMD} ${PREFIX}/bin/gdc
${INSTALL} -o root -g wheel -m 755 ${GCCDIR}/cc1d ${PREFIX}/bin/
@${STRIP_CMD} ${PREFIX}/bin/cc1d
@cd ${WRKSRC}/phobos_build && ${GMAKE} install
.include <bsd.port.post.mk>