2011-01-03 22:07:48 +00:00
|
|
|
# New ports collection makefile for: dmd2
|
|
|
|
# Date created: November 29 2010
|
2010-11-29 10:27:24 +00:00
|
|
|
# Whom: Ruben <chromium@hybridsource.org>
|
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
|
|
|
PORTNAME= dmd
|
2011-01-03 22:07:48 +00:00
|
|
|
PKGNAMESUFFIX= 2
|
2011-06-06 15:13:14 +00:00
|
|
|
PORTVERSION= 2.053
|
2010-11-29 10:27:24 +00:00
|
|
|
CATEGORIES= lang
|
|
|
|
MASTER_SITES= http://ftp.digitalmars.com/
|
2011-01-03 22:07:48 +00:00
|
|
|
DISTNAME= dmd.${PORTVERSION}
|
2010-11-29 10:27:24 +00:00
|
|
|
|
2010-12-28 05:39:00 +00:00
|
|
|
MAINTAINER= cy@FreeBSD.org
|
2011-01-03 22:07:48 +00:00
|
|
|
COMMENT= D 2.0 compiler, not officially validated for FreeBSD
|
2010-11-29 10:27:24 +00:00
|
|
|
|
|
|
|
USE_ZIP= yes
|
2011-01-03 22:07:48 +00:00
|
|
|
USE_GMAKE= yes
|
|
|
|
MAKEFILE= freebsd.mak
|
|
|
|
MAN1= dmd2.1
|
|
|
|
MAN5= dmd2.conf.5
|
|
|
|
EXAMPLESDIR= ${PREFIX}/share/examples/dmd2
|
|
|
|
DOCSDIR= ${PREFIX}/share/doc/dmd2
|
|
|
|
PORTDOCS= *.txt druntime/ html/ phobos/
|
|
|
|
WRKSRC= ${WRKDIR}/dmd2/src/${PORTNAME}
|
2010-11-29 10:27:24 +00:00
|
|
|
LICENSE_COMB= multi
|
2011-01-03 22:07:48 +00:00
|
|
|
LICENSE= ART10 ZLIB DMD BSL
|
2010-11-29 10:27:24 +00:00
|
|
|
LICENSE_NAME_ZLIB= zlib license
|
|
|
|
LICENSE_PERMS_ZLIB= ${_LICENSE_PERMS_DEFAULT}
|
|
|
|
LICENSE_FILE_ZLIB= ${WRKSRC}/../phobos/phoboslicense.txt
|
2011-01-03 22:07:48 +00:00
|
|
|
LICENSE_NAME_DMD= Digital Mars license
|
|
|
|
LICENSE_FILE_DMD= ${WRKSRC}/backendlicense.txt
|
|
|
|
LICENSE_PERMS_DMD= no-dist-mirror no-dist-sell no-pkg-mirror no-pkg-sell auto-accept
|
2010-11-29 10:27:24 +00:00
|
|
|
|
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
2011-01-12 01:23:51 +00:00
|
|
|
.if ${OSVERSION} < 800000
|
|
|
|
BROKEN= does not compile
|
|
|
|
.endif
|
|
|
|
|
2011-01-03 22:07:48 +00:00
|
|
|
MODULEDIR= ${PREFIX}/include/d/phobos2
|
2010-11-29 10:27:24 +00:00
|
|
|
|
|
|
|
post-patch:
|
2011-01-03 22:07:48 +00:00
|
|
|
@${REINPLACE_CMD} -e "s|gcc|${CC}|" ${WRKSRC}/freebsd.mak \
|
|
|
|
${WRKSRC}/../phobos/etc/c/zlib/freebsd.mak
|
|
|
|
@${REINPLACE_CMD} -e "s|g++|${CXX}|" ${WRKSRC}/freebsd.mak
|
|
|
|
@${REINPLACE_CMD} -e "s|cc|${CC}|" ${WRKSRC}/../phobos/posix.mak
|
2010-11-29 10:27:24 +00:00
|
|
|
@${REINPLACE_CMD} -e "s|/etc|${PREFIX}/etc|" \
|
2011-01-03 22:07:48 +00:00
|
|
|
-e "s|\(dmd\)|\12|gI" \
|
|
|
|
-e "s|\\\BR|.BR|" \
|
|
|
|
${WRKDIR}/dmd2/man/man1/dmd.1 \
|
|
|
|
${WRKDIR}/dmd2/man/man1/dmd.conf.5
|
2010-11-29 10:27:24 +00:00
|
|
|
@${REINPLACE_CMD} -e 's|"/etc/"|"${PREFIX}/etc/"|' ${WRKSRC}/inifile.c
|
2011-01-03 22:07:48 +00:00
|
|
|
@${REINPLACE_CMD} -e 's|dmd.conf|dmd2.conf|' ${WRKSRC}/mars.c
|
|
|
|
@${REINPLACE_CMD} -e "s|%@P%/../../src/phobos|${MODULEDIR}|" \
|
|
|
|
-e "s|%@P%/../lib|${PREFIX}/lib|" \
|
|
|
|
-e "s|%@P%/../../src/druntime|${PREFIX}/include/d/druntime|" \
|
2011-06-06 15:13:14 +00:00
|
|
|
${WRKDIR}/dmd2/linux/bin32/dmd.conf
|
2010-11-29 10:27:24 +00:00
|
|
|
|
|
|
|
post-build:
|
2011-01-03 22:07:48 +00:00
|
|
|
cd ${WRKSRC}/../druntime && \
|
|
|
|
${SETENV} PATH=${WRKSRC}:${PATH} ${GMAKE} ${MAKE_FLAGS} posix.mak
|
2010-11-29 10:27:24 +00:00
|
|
|
cd ${WRKSRC}/../phobos && \
|
2011-01-03 22:07:48 +00:00
|
|
|
${SETENV} PATH=${WRKSRC}:${PATH} ${GMAKE} ${MAKE_FLAGS} posix.mak
|
2010-11-29 10:27:24 +00:00
|
|
|
|
|
|
|
do-install:
|
2011-01-03 22:07:48 +00:00
|
|
|
${INSTALL_MAN} ${WRKDIR}/dmd2/man/man1/dmd.1 ${MANPREFIX}/man/man1/dmd2.1
|
|
|
|
${INSTALL_MAN} ${WRKDIR}/dmd2/man/man1/dmd.conf.5 ${MANPREFIX}/man/man5/dmd2.conf.5
|
|
|
|
.if !exists(${PREFIX}/etc/dmd2.conf)
|
2011-06-06 15:13:14 +00:00
|
|
|
${INSTALL_DATA} ${WRKDIR}/dmd2/linux/bin32/dmd.conf ${PREFIX}/etc/dmd2.conf
|
2010-11-29 10:27:24 +00:00
|
|
|
.endif
|
2011-01-03 22:07:48 +00:00
|
|
|
${INSTALL_PROGRAM} ${WRKSRC}/dmd ${PREFIX}/bin/dmd2
|
2011-03-03 05:13:38 +00:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/../phobos/generated/freebsd/release/32/libphobos2.a ${PREFIX}/lib
|
2010-11-29 10:27:24 +00:00
|
|
|
${MKDIR} ${EXAMPLESDIR}
|
2011-06-06 15:13:14 +00:00
|
|
|
${INSTALL_DATA} ${WRKDIR}/dmd2/linux/bin32/dmd.conf ${EXAMPLESDIR}/dmd2.conf
|
2011-01-03 22:07:48 +00:00
|
|
|
cd ${WRKDIR}/dmd2 && ${COPYTREE_SHARE} samples ${EXAMPLESDIR}
|
2010-11-29 10:27:24 +00:00
|
|
|
${MKDIR} ${MODULEDIR}
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/../phobos/*.d ${MODULEDIR}
|
|
|
|
${MKDIR} ${MODULEDIR}/etc/c
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/../phobos/etc/c/zlib.d ${MODULEDIR}/etc/c
|
|
|
|
cd ${WRKSRC}/../phobos && ${COPYTREE_SHARE} std ${MODULEDIR}
|
2011-01-03 22:07:48 +00:00
|
|
|
${MKDIR} ${MODULEDIR}/../druntime
|
|
|
|
cd ${WRKSRC}/../druntime && ${COPYTREE_SHARE} import ${MODULEDIR}/../druntime
|
2010-11-29 10:27:24 +00:00
|
|
|
.if !defined(NOPORTDOCS)
|
|
|
|
${MKDIR} ${DOCSDIR}
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/*.txt ${DOCSDIR}
|
2011-01-03 22:07:48 +00:00
|
|
|
cd ${WRKDIR}/dmd2 && ${COPYTREE_SHARE} html ${DOCSDIR}
|
|
|
|
${MKDIR} ${DOCSDIR}/druntime
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/../druntime/LICENSE_1_0.txt ${DOCSDIR}/druntime
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/../druntime/README.txt ${DOCSDIR}/druntime
|
|
|
|
cd ${WRKSRC}/../druntime && ${COPYTREE_SHARE} doc ${DOCSDIR}/druntime
|
2010-11-29 10:27:24 +00:00
|
|
|
${MKDIR} ${DOCSDIR}/phobos
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/../phobos/phoboslicense.txt ${DOCSDIR}/phobos
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/../phobos/std.ddoc ${DOCSDIR}/phobos
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.include <bsd.port.post.mk>
|