2013-05-12 06:05:03 +00:00
|
|
|
# Created by: Ruben <chromium@hybridsource.org>
|
2010-11-29 10:27:24 +00:00
|
|
|
# $FreeBSD$
|
|
|
|
|
|
|
|
PORTNAME= dmd
|
2013-01-31 02:32:38 +00:00
|
|
|
PORTVERSION= 1.076
|
2010-11-29 10:27:24 +00:00
|
|
|
CATEGORIES= lang
|
|
|
|
MASTER_SITES= http://ftp.digitalmars.com/
|
|
|
|
DISTNAME= ${PORTNAME}.${PORTVERSION}
|
|
|
|
|
2010-12-28 05:39:00 +00:00
|
|
|
MAINTAINER= cy@FreeBSD.org
|
2010-11-29 10:27:24 +00:00
|
|
|
COMMENT= Official compiler for the D 1.0 programming language
|
|
|
|
|
|
|
|
NO_PACKAGE= Packages are not validation-tested by the developer
|
2014-03-10 16:01:35 +00:00
|
|
|
USES= gmake zip
|
2010-11-29 10:27:24 +00:00
|
|
|
MAN1= dmd.1
|
|
|
|
MAN5= dmd.conf.5
|
|
|
|
PORTDOCS= *.txt html/ phobos/
|
|
|
|
WRKSRC= ${WRKDIR}/${PORTNAME}/src/${PORTNAME}
|
|
|
|
LICENSE_COMB= multi
|
|
|
|
LICENSE= ART10 ZLIB DMD
|
|
|
|
LICENSE_NAME_DMD= digital mars license
|
|
|
|
LICENSE_FILE_DMD= ${WRKSRC}/../../license.txt
|
|
|
|
LICENSE_PERMS_DMD= no-pkg-mirror auto-accept
|
|
|
|
|
2013-05-12 06:05:03 +00:00
|
|
|
OPTIONS_DEFINE= SOURCE DOCS
|
|
|
|
SOURCE_DESC= Compile dmd and phobos from source
|
2010-11-29 10:27:24 +00:00
|
|
|
|
2013-09-20 19:53:09 +00:00
|
|
|
NO_STAGE= yes
|
2013-05-12 06:05:03 +00:00
|
|
|
.include <bsd.port.options.mk>
|
2010-11-29 10:27:24 +00:00
|
|
|
|
|
|
|
MODULEDIR= ${PREFIX}/include/d/phobos
|
|
|
|
|
2013-05-12 06:05:03 +00:00
|
|
|
.if ${PORT_OPTIONS:MSOURCE}
|
2011-09-12 06:26:06 +00:00
|
|
|
MAKEFILE= posix.mak
|
2010-11-29 10:27:24 +00:00
|
|
|
.else
|
|
|
|
NO_BUILD= yes
|
|
|
|
.endif
|
|
|
|
|
2013-01-31 02:32:38 +00:00
|
|
|
.if ${ARCH} == "amd64"
|
|
|
|
MAKE_ARGS+= MODEL=64
|
|
|
|
.else
|
|
|
|
MAKE_ARGS+= MODEL=32
|
|
|
|
.endif
|
|
|
|
|
2010-11-29 10:27:24 +00:00
|
|
|
post-patch:
|
2013-05-12 06:05:03 +00:00
|
|
|
.if ${PORT_OPTIONS:MSOURCE}
|
2010-11-29 10:27:24 +00:00
|
|
|
@${REINPLACE_CMD} -e "s|gcc|${CC}|" \
|
|
|
|
${WRKSRC}/../phobos/freebsd.mak \
|
|
|
|
${WRKSRC}/../phobos/etc/c/zlib/freebsd.mak \
|
2011-09-12 06:26:06 +00:00
|
|
|
${WRKSRC}/../phobos/internal/gc/freebsd.mak
|
2010-11-29 10:27:24 +00:00
|
|
|
@${REINPLACE_CMD} -e "s|g++|${CXX}|" \
|
2011-09-12 06:26:06 +00:00
|
|
|
${WRKSRC}/../phobos/freebsd.mak
|
2010-11-29 10:27:24 +00:00
|
|
|
@${REINPLACE_CMD} -e "s|/etc|${PREFIX}/etc|" \
|
|
|
|
${WRKDIR}/dmd/man/man1/dmd.1 \
|
|
|
|
${WRKDIR}/dmd/man/man1/dmd.conf.5
|
|
|
|
@${REINPLACE_CMD} -e 's|"/etc/"|"${PREFIX}/etc/"|' ${WRKSRC}/inifile.c
|
|
|
|
.endif
|
2011-06-06 15:12:42 +00:00
|
|
|
@${REINPLACE_CMD} -e "s|%@P%/../../src/phobos|${MODULEDIR}|" ${WRKDIR}/dmd/freebsd/bin32/dmd.conf
|
|
|
|
@${CP} ${WRKDIR}/dmd/freebsd/bin32/dmd.conf ${WRKDIR}/dmd/freebsd/bin32/dmd.conf.tango
|
|
|
|
@${REINPLACE_CMD} -e "s|phobos|tango -defaultlib=tango -version=freebsd|" ${WRKDIR}/dmd/freebsd/bin32/dmd.conf.tango
|
|
|
|
@${REINPLACE_CMD} -e "1s|^|# You'll need to recompile libtango.a with dmd and install it yourself.|" ${WRKDIR}/dmd/freebsd/bin32/dmd.conf.tango
|
2010-11-29 10:27:24 +00:00
|
|
|
@${REINPLACE_CMD} -e "s|%@P%/../lib|${PREFIX}/lib|" \
|
2011-06-06 15:12:42 +00:00
|
|
|
${WRKDIR}/dmd/freebsd/bin32/dmd.conf \
|
|
|
|
${WRKDIR}/dmd/freebsd/bin32/dmd.conf.tango
|
2010-11-29 10:27:24 +00:00
|
|
|
|
|
|
|
post-build:
|
|
|
|
@${REINPLACE_CMD} -e "s| etc/c/zlib/gzio.o||" ${WRKSRC}/../phobos/freebsd.mak
|
|
|
|
|
|
|
|
do-install:
|
|
|
|
${INSTALL_MAN} ${WRKDIR}/dmd/man/man1/dmd.1 ${MANPREFIX}/man/man1
|
|
|
|
${INSTALL_MAN} ${WRKDIR}/dmd/man/man1/dmd.conf.5 ${MANPREFIX}/man/man5
|
|
|
|
.if !exists(${PREFIX}/etc/dmd.conf)
|
2011-06-06 15:12:42 +00:00
|
|
|
${INSTALL_DATA} ${WRKDIR}/dmd/freebsd/bin32/dmd.conf ${PREFIX}/etc
|
2010-11-29 10:27:24 +00:00
|
|
|
.endif
|
2011-09-12 06:26:06 +00:00
|
|
|
${INSTALL_PROGRAM} ${WRKDIR}/dmd/freebsd/bin32/dmd ${PREFIX}/bin
|
|
|
|
${INSTALL_DATA} ${WRKDIR}/dmd/freebsd/lib32/libphobos.a ${PREFIX}/lib
|
2010-11-29 10:27:24 +00:00
|
|
|
${MKDIR} ${EXAMPLESDIR}
|
2011-06-06 15:12:42 +00:00
|
|
|
${INSTALL_DATA} ${WRKDIR}/dmd/freebsd/bin32/dmd.conf ${EXAMPLESDIR}
|
|
|
|
${INSTALL_DATA} ${WRKDIR}/dmd/freebsd/bin32/dmd.conf.tango ${EXAMPLESDIR}
|
2010-11-29 10:27:24 +00:00
|
|
|
cd ${WRKDIR}/dmd && ${COPYTREE_SHARE} samples ${EXAMPLESDIR}
|
|
|
|
${MKDIR} ${MODULEDIR}
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/../phobos/*.d ${MODULEDIR}
|
|
|
|
${MKDIR} ${MODULEDIR}/etc
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/../phobos/etc/gamma.d ${MODULEDIR}/etc
|
|
|
|
${MKDIR} ${MODULEDIR}/etc/c
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/../phobos/etc/c/zlib.d ${MODULEDIR}/etc/c
|
|
|
|
cd ${WRKSRC}/../phobos && ${COPYTREE_SHARE} std ${MODULEDIR}
|
2013-05-12 06:05:03 +00:00
|
|
|
.if ${PORT_OPTIONS:MDOCS}
|
2010-11-29 10:27:24 +00:00
|
|
|
${MKDIR} ${DOCSDIR}
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/*.txt ${DOCSDIR}
|
|
|
|
cd ${WRKDIR}/dmd && ${COPYTREE_SHARE} html ${DOCSDIR}
|
|
|
|
${MKDIR} ${DOCSDIR}/phobos
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/../phobos/phoboslicense.txt ${DOCSDIR}/phobos
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/../phobos/std.ddoc ${DOCSDIR}/phobos
|
|
|
|
.endif
|
|
|
|
|
2013-05-12 06:05:03 +00:00
|
|
|
.include <bsd.port.mk>
|