1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-23 04:23:08 +00:00

Add dmd 1.065, official compiler for the D 1.0 programming language.

PR:		ports/152282
Submitted by:	Ruben <chromium at hybridsource.org>
This commit is contained in:
Baptiste Daroussin 2010-11-29 10:27:24 +00:00
parent 0e4c42c7e1
commit b6ee0cc4d2
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=265368
11 changed files with 827 additions and 0 deletions

View File

@ -47,6 +47,7 @@
SUBDIR += dice
SUBDIR += diveintopython
SUBDIR += dlv
SUBDIR += dmd
SUBDIR += dylan
SUBDIR += ecl
SUBDIR += eiffel

108
lang/dmd/Makefile Normal file
View File

@ -0,0 +1,108 @@
# New ports collection makefile for: dmd
# Date created: November 15 2010
# Whom: Ruben <chromium@hybridsource.org>
#
# $FreeBSD$
#
PORTNAME= dmd
PORTVERSION= 1.065
CATEGORIES= lang
MASTER_SITES= http://ftp.digitalmars.com/
DISTNAME= ${PORTNAME}.${PORTVERSION}
MAINTAINER= chromium@hybridsource.org
COMMENT= Official compiler for the D 1.0 programming language
NO_PACKAGE= Packages are not validation-tested by the developer
ONLY_FOR_ARCHS= i386
USE_ZIP= yes
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_ZLIB= zlib license
LICENSE_PERMS_ZLIB= ${_LICENSE_PERMS_DEFAULT}
LICENSE_FILE_ZLIB= ${WRKSRC}/../phobos/phoboslicense.txt
LICENSE_NAME_DMD= digital mars license
LICENSE_FILE_DMD= ${WRKSRC}/../../license.txt
LICENSE_PERMS_DMD= no-pkg-mirror auto-accept
OPTIONS= SOURCE "Compile dmd and phobos from source" off
.include <bsd.port.pre.mk>
MODULEDIR= ${PREFIX}/include/d/phobos
.if defined(WITH_SOURCE)
MAKEFILE= freebsd.mak
.else
NO_BUILD= yes
PLIST_FILES= bin/dmd.conf
.endif
post-patch:
.if defined(WITH_SOURCE)
@${REINPLACE_CMD} -e "s|gcc|${CC}|" \
${WRKSRC}/../phobos/freebsd.mak \
${WRKSRC}/../phobos/etc/c/zlib/freebsd.mak \
${WRKSRC}/../phobos/internal/gc/freebsd.mak \
${WRKSRC}/freebsd.mak
@${REINPLACE_CMD} -e "s|g++|${CXX}|" \
${WRKSRC}/../phobos/freebsd.mak \
${WRKSRC}/freebsd.mak
@${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
@${REINPLACE_CMD} -e "s|%@P%/../../src/phobos|${MODULEDIR}|" ${WRKDIR}/dmd/freebsd/bin/dmd.conf
@${CP} ${WRKDIR}/dmd/freebsd/bin/dmd.conf ${WRKDIR}/dmd/freebsd/bin/dmd.conf.tango
@${REINPLACE_CMD} -e "s|phobos|tango -defaultlib=tango -version=freebsd|" ${WRKDIR}/dmd/freebsd/bin/dmd.conf.tango
@${REINPLACE_CMD} -e "1s|^|# You'll need to recompile libtango.a with dmd and install it yourself.|" ${WRKDIR}/dmd/freebsd/bin/dmd.conf.tango
@${REINPLACE_CMD} -e "s|%@P%/../lib|${PREFIX}/lib|" \
${WRKDIR}/dmd/freebsd/bin/dmd.conf \
${WRKDIR}/dmd/freebsd/bin/dmd.conf.tango
post-build:
@${REINPLACE_CMD} -e "s| etc/c/zlib/gzio.o||" ${WRKSRC}/../phobos/freebsd.mak
cd ${WRKSRC}/../phobos && \
${SETENV} PATH=${PATH}:${WRKSRC} ${MAKE} ${MAKE_FLAGS} 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)
${INSTALL_DATA} ${WRKDIR}/dmd/freebsd/bin/dmd.conf ${PREFIX}/etc
.endif
.if defined(WITH_SOURCE)
${INSTALL_PROGRAM} ${WRKSRC}/dmd ${PREFIX}/bin
${INSTALL_DATA} ${WRKSRC}/../phobos/libphobos.a ${PREFIX}/lib
.else
${INSTALL_PROGRAM} ${WRKDIR}/dmd/freebsd/bin/dmd ${PREFIX}/bin
${LN} -sf ${PREFIX}/etc/dmd.conf ${PREFIX}/bin
${INSTALL_DATA} ${WRKDIR}/dmd/freebsd/lib/libphobos.a ${PREFIX}/lib
.endif
${MKDIR} ${EXAMPLESDIR}
${INSTALL_DATA} ${WRKDIR}/dmd/freebsd/bin/dmd.conf ${EXAMPLESDIR}
${INSTALL_DATA} ${WRKDIR}/dmd/freebsd/bin/dmd.conf.tango ${EXAMPLESDIR}
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}
.if !defined(NOPORTDOCS)
${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
.include <bsd.port.post.mk>

108
lang/dmd/Makefile~ Normal file
View File

@ -0,0 +1,108 @@
# New ports collection makefile for: dmd
# Date created: November 15 2010
# Whom: Ruben <chromium@hybridsource.org>
#
# $FreeBSD$
#
PORTNAME= dmd
PORTVERSION= 1.065
CATEGORIES= lang
MASTER_SITES= http://ftp.digitalmars.com/
DISTNAME= ${PORTNAME}.${PORTVERSION}
MAINTAINER= chromium@hybridsource.org
COMMENT= Official compiler for the D 1.0 programming language
NO_PACKAGE= Packages are not validation-tested by the developer
#ONLY_FOR_ARCHS= i386
USE_ZIP= yes
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_ZLIB= zlib license
LICENSE_PERMS_ZLIB= ${_LICENSE_PERMS_DEFAULT}
LICENSE_FILE_ZLIB= ${WRKSRC}/../phobos/phoboslicense.txt
LICENSE_NAME_DMD= digital mars license
LICENSE_FILE_DMD= ${WRKSRC}/../../license.txt
LICENSE_PERMS_DMD= no-pkg-mirror auto-accept
OPTIONS= SOURCE "Compile dmd and phobos from source" off
.include <bsd.port.pre.mk>
MODULEDIR= ${PREFIX}/include/d/phobos
.if defined(WITH_SOURCE)
MAKEFILE= freebsd.mak
.else
NO_BUILD= yes
PLIST_FILES= bin/dmd.conf
.endif
post-patch:
.if defined(WITH_SOURCE)
@${REINPLACE_CMD} -e "s|gcc|${CC}|" \
${WRKSRC}/../phobos/freebsd.mak \
${WRKSRC}/../phobos/etc/c/zlib/freebsd.mak \
${WRKSRC}/../phobos/internal/gc/freebsd.mak \
${WRKSRC}/freebsd.mak
@${REINPLACE_CMD} -e "s|g++|${CXX}|" \
${WRKSRC}/../phobos/freebsd.mak \
${WRKSRC}/freebsd.mak
@${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
@${REINPLACE_CMD} -e "s|%@P%/../../src/phobos|${MODULEDIR}|" ${WRKDIR}/dmd/freebsd/bin/dmd.conf
@${CP} ${WRKDIR}/dmd/freebsd/bin/dmd.conf ${WRKDIR}/dmd/freebsd/bin/dmd.conf.tango
@${REINPLACE_CMD} -e "s|phobos|tango -defaultlib=tango -version=freebsd|" ${WRKDIR}/dmd/freebsd/bin/dmd.conf.tango
@${REINPLACE_CMD} -e "1s|^|# You'll need to recompile libtango.a with dmd and install it yourself.|" ${WRKDIR}/dmd/freebsd/bin/dmd.conf.tango
@${REINPLACE_CMD} -e "s|%@P%/../lib|${PREFIX}/lib|" \
${WRKDIR}/dmd/freebsd/bin/dmd.conf \
${WRKDIR}/dmd/freebsd/bin/dmd.conf.tango
post-build:
@${REINPLACE_CMD} -e "s| etc/c/zlib/gzio.o||" ${WRKSRC}/../phobos/freebsd.mak
cd ${WRKSRC}/../phobos && \
${SETENV} PATH=${PATH}:${WRKSRC} ${MAKE} ${MAKE_FLAGS} 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)
${INSTALL_DATA} ${WRKDIR}/dmd/freebsd/bin/dmd.conf ${PREFIX}/etc
.endif
.if defined(WITH_SOURCE)
${INSTALL_PROGRAM} ${WRKSRC}/dmd ${PREFIX}/bin
${INSTALL_DATA} ${WRKSRC}/../phobos/libphobos.a ${PREFIX}/lib
.else
${INSTALL_PROGRAM} ${WRKDIR}/dmd/freebsd/bin/dmd ${PREFIX}/bin
${LN} -sf ${PREFIX}/etc/dmd.conf ${PREFIX}/bin
${INSTALL_DATA} ${WRKDIR}/dmd/freebsd/lib/libphobos.a ${PREFIX}/lib
.endif
${MKDIR} ${EXAMPLESDIR}
${INSTALL_DATA} ${WRKDIR}/dmd/freebsd/bin/dmd.conf ${EXAMPLESDIR}
${INSTALL_DATA} ${WRKDIR}/dmd/freebsd/bin/dmd.conf.tango ${EXAMPLESDIR}
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}
.if !defined(NOPORTDOCS)
${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
.include <bsd.port.post.mk>

2
lang/dmd/distinfo Normal file
View File

@ -0,0 +1,2 @@
SHA256 (dmd.1.065.zip) = 6e15f96447adbdd8f496253af4d579e98ae95dffe56aab021cccce652e5fcab0
SIZE (dmd.1.065.zip) = 8967817

15
lang/dmd/pkg-descr Normal file
View File

@ -0,0 +1,15 @@
D is a systems programming language. Its focus is on combining the power and
high performance of C and C++ with the programmer productivity of modern
languages like Ruby and Python. Special attention is given to the needs of
quality assurance, documentation, management, portability and reliability.
The D language is statically typed and compiles directly to machine code. It's
multiparadigm, supporting many programming styles: imperative, object oriented,
and metaprogramming. It's a member of the C syntax family, and its appearance
is very similar to that of C++.
It is not governed by a corporate agenda or any overarching theory of
programming. The needs and contributions of the D programming community form
the direction it goes.
WWW: http://digitalmars.com/d/1.0/

180
lang/dmd/pkg-plist Normal file
View File

@ -0,0 +1,180 @@
bin/dmd
@unexec if cmp -s %D/%%EXAMPLESDIR%%/dmd.conf %D/etc/dmd.conf; then rm -f %D/etc/dmd.conf; fi
%%EXAMPLESDIR%%/dmd.conf
@exec if [ ! -f %D/etc/dmd.conf ]; then cp -p %D/%%EXAMPLESDIR%%/dmd.conf %D/etc/dmd.conf; fi
%%EXAMPLESDIR%%/dmd.conf.tango
%%EXAMPLESDIR%%/samples/d/all.sh
%%EXAMPLESDIR%%/samples/d/chello.d
%%EXAMPLESDIR%%/samples/d/d2html.d
%%EXAMPLESDIR%%/samples/d/dclient.d
%%EXAMPLESDIR%%/samples/d/dhry.d
%%EXAMPLESDIR%%/samples/d/dserver.d
%%EXAMPLESDIR%%/samples/d/dserver.def
%%EXAMPLESDIR%%/samples/d/hello.d
%%EXAMPLESDIR%%/samples/d/hello2.html
%%EXAMPLESDIR%%/samples/d/htmlget.d
%%EXAMPLESDIR%%/samples/d/listener.d
%%EXAMPLESDIR%%/samples/d/mydll/build.bat
%%EXAMPLESDIR%%/samples/d/mydll/dll.d
%%EXAMPLESDIR%%/samples/d/mydll/mydll.d
%%EXAMPLESDIR%%/samples/d/mydll/mydll.def
%%EXAMPLESDIR%%/samples/d/mydll/mydll2.d
%%EXAMPLESDIR%%/samples/d/mydll/test.d
%%EXAMPLESDIR%%/samples/d/pi.d
%%EXAMPLESDIR%%/samples/d/run.bat
%%EXAMPLESDIR%%/samples/d/sieve.d
%%EXAMPLESDIR%%/samples/d/wc.d
%%EXAMPLESDIR%%/samples/d/wc2.d
%%EXAMPLESDIR%%/samples/d/winsamp.d
%%EXAMPLESDIR%%/samples/d/winsamp.def
lib/libphobos.a
include/d/phobos/crc32.d
include/d/phobos/etc/gamma.d
include/d/phobos/etc/c/zlib.d
include/d/phobos/gcstats.d
include/d/phobos/object.d
include/d/phobos/phobos.d
include/d/phobos/std/array.d
include/d/phobos/std/asserterror.d
include/d/phobos/std/base64.d
include/d/phobos/std/bind.d
include/d/phobos/std/bitarray.d
include/d/phobos/std/boxer.d
include/d/phobos/std/c/fenv.d
include/d/phobos/std/c/freebsd/freebsd.d
include/d/phobos/std/c/freebsd/math.d
include/d/phobos/std/c/freebsd/pthread.d
include/d/phobos/std/c/freebsd/socket.d
include/d/phobos/std/c/linux/linux.d
include/d/phobos/std/c/linux/linuxextern.d
include/d/phobos/std/c/linux/pthread.d
include/d/phobos/std/c/linux/socket.d
include/d/phobos/std/c/locale.d
include/d/phobos/std/c/math.d
include/d/phobos/std/c/osx/dyld.d
include/d/phobos/std/c/osx/getsect.d
include/d/phobos/std/c/osx/loader.d
include/d/phobos/std/c/osx/osx.d
include/d/phobos/std/c/posix/posix.d
include/d/phobos/std/c/posix/pthread.d
include/d/phobos/std/c/posix/socket.d
include/d/phobos/std/c/process.d
include/d/phobos/std/c/solaris/pthread.d
include/d/phobos/std/c/solaris/socket.d
include/d/phobos/std/c/solaris/solaris.d
include/d/phobos/std/c/stdarg.d
include/d/phobos/std/c/stddef.d
include/d/phobos/std/c/stdio.d
include/d/phobos/std/c/stdlib.d
include/d/phobos/std/c/string.d
include/d/phobos/std/c/time.d
include/d/phobos/std/c/windows/com.d
include/d/phobos/std/c/windows/stat.d
include/d/phobos/std/c/windows/windows.d
include/d/phobos/std/c/windows/winsock.d
include/d/phobos/std/compiler.d
include/d/phobos/std/conv.d
include/d/phobos/std/cover.d
include/d/phobos/std/cpuid.d
include/d/phobos/std/cstream.d
include/d/phobos/std/ctype.d
include/d/phobos/std/date.d
include/d/phobos/std/dateparse.d
include/d/phobos/std/demangle.d
include/d/phobos/std/file.d
include/d/phobos/std/format.d
include/d/phobos/std/gc.d
include/d/phobos/std/intrinsic.d
include/d/phobos/std/loader.d
include/d/phobos/std/math.d
include/d/phobos/std/math2.d
include/d/phobos/std/md5.d
include/d/phobos/std/metastrings.d
include/d/phobos/std/mmfile.d
include/d/phobos/std/moduleinit.d
include/d/phobos/std/openrj.d
include/d/phobos/std/outbuffer.d
include/d/phobos/std/outofmemory.d
include/d/phobos/std/path.d
include/d/phobos/std/perf.d
include/d/phobos/std/process.d
include/d/phobos/std/random.d
include/d/phobos/std/regexp.d
include/d/phobos/std/signals.d
include/d/phobos/std/socket.d
include/d/phobos/std/socketstream.d
include/d/phobos/std/stdarg.d
include/d/phobos/std/stdint.d
include/d/phobos/std/stdio.d
include/d/phobos/std/stream.d
include/d/phobos/std/string.d
include/d/phobos/std/switcherr.d
include/d/phobos/std/syserror.d
include/d/phobos/std/system.d
include/d/phobos/std/thread.d
include/d/phobos/std/thread_helper.d
include/d/phobos/std/traits.d
include/d/phobos/std/typeinfo/ti_AC.d
include/d/phobos/std/typeinfo/ti_Acdouble.d
include/d/phobos/std/typeinfo/ti_Acfloat.d
include/d/phobos/std/typeinfo/ti_Acreal.d
include/d/phobos/std/typeinfo/ti_Adouble.d
include/d/phobos/std/typeinfo/ti_Afloat.d
include/d/phobos/std/typeinfo/ti_Ag.d
include/d/phobos/std/typeinfo/ti_Aint.d
include/d/phobos/std/typeinfo/ti_Along.d
include/d/phobos/std/typeinfo/ti_Areal.d
include/d/phobos/std/typeinfo/ti_Ashort.d
include/d/phobos/std/typeinfo/ti_C.d
include/d/phobos/std/typeinfo/ti_byte.d
include/d/phobos/std/typeinfo/ti_cdouble.d
include/d/phobos/std/typeinfo/ti_cfloat.d
include/d/phobos/std/typeinfo/ti_char.d
include/d/phobos/std/typeinfo/ti_creal.d
include/d/phobos/std/typeinfo/ti_dchar.d
include/d/phobos/std/typeinfo/ti_delegate.d
include/d/phobos/std/typeinfo/ti_double.d
include/d/phobos/std/typeinfo/ti_float.d
include/d/phobos/std/typeinfo/ti_idouble.d
include/d/phobos/std/typeinfo/ti_ifloat.d
include/d/phobos/std/typeinfo/ti_int.d
include/d/phobos/std/typeinfo/ti_ireal.d
include/d/phobos/std/typeinfo/ti_long.d
include/d/phobos/std/typeinfo/ti_ptr.d
include/d/phobos/std/typeinfo/ti_real.d
include/d/phobos/std/typeinfo/ti_short.d
include/d/phobos/std/typeinfo/ti_ubyte.d
include/d/phobos/std/typeinfo/ti_uint.d
include/d/phobos/std/typeinfo/ti_ulong.d
include/d/phobos/std/typeinfo/ti_ushort.d
include/d/phobos/std/typeinfo/ti_void.d
include/d/phobos/std/typeinfo/ti_wchar.d
include/d/phobos/std/typetuple.d
include/d/phobos/std/uni.d
include/d/phobos/std/uri.d
include/d/phobos/std/utf.d
include/d/phobos/std/windows/charset.d
include/d/phobos/std/windows/iunknown.d
include/d/phobos/std/windows/registry.d
include/d/phobos/std/windows/syserror.d
include/d/phobos/std/zip.d
include/d/phobos/std/zlib.d
include/d/phobos/unittest.d
@dirrm %%EXAMPLESDIR%%/samples/d/mydll
@dirrm %%EXAMPLESDIR%%/samples/d
@dirrm %%EXAMPLESDIR%%/samples
@dirrm %%EXAMPLESDIR%%
@dirrm include/d/phobos/std/windows
@dirrm include/d/phobos/std/typeinfo
@dirrm include/d/phobos/std/c/windows
@dirrm include/d/phobos/std/c/solaris
@dirrm include/d/phobos/std/c/posix
@dirrm include/d/phobos/std/c/osx
@dirrm include/d/phobos/std/c/linux
@dirrm include/d/phobos/std/c/freebsd
@dirrm include/d/phobos/std/c
@dirrm include/d/phobos/std
@dirrm include/d/phobos/etc/c
@dirrm include/d/phobos/etc
@dirrm include/d/phobos
@dirrmtry include/d

108
lang/dmd2/Makefile Normal file
View File

@ -0,0 +1,108 @@
# New ports collection makefile for: dmd
# Date created: November 15 2010
# Whom: Ruben <chromium@hybridsource.org>
#
# $FreeBSD$
#
PORTNAME= dmd
PORTVERSION= 1.065
CATEGORIES= lang
MASTER_SITES= http://ftp.digitalmars.com/
DISTNAME= ${PORTNAME}.${PORTVERSION}
MAINTAINER= chromium@hybridsource.org
COMMENT= Official compiler for the D 1.0 programming language
NO_PACKAGE= Packages are not validation-tested by the developer
ONLY_FOR_ARCHS= i386
USE_ZIP= yes
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_ZLIB= zlib license
LICENSE_PERMS_ZLIB= ${_LICENSE_PERMS_DEFAULT}
LICENSE_FILE_ZLIB= ${WRKSRC}/../phobos/phoboslicense.txt
LICENSE_NAME_DMD= digital mars license
LICENSE_FILE_DMD= ${WRKSRC}/../../license.txt
LICENSE_PERMS_DMD= no-pkg-mirror auto-accept
OPTIONS= SOURCE "Compile dmd and phobos from source" off
.include <bsd.port.pre.mk>
MODULEDIR= ${PREFIX}/include/d/phobos
.if defined(WITH_SOURCE)
MAKEFILE= freebsd.mak
.else
NO_BUILD= yes
PLIST_FILES= bin/dmd.conf
.endif
post-patch:
.if defined(WITH_SOURCE)
@${REINPLACE_CMD} -e "s|gcc|${CC}|" \
${WRKSRC}/../phobos/freebsd.mak \
${WRKSRC}/../phobos/etc/c/zlib/freebsd.mak \
${WRKSRC}/../phobos/internal/gc/freebsd.mak \
${WRKSRC}/freebsd.mak
@${REINPLACE_CMD} -e "s|g++|${CXX}|" \
${WRKSRC}/../phobos/freebsd.mak \
${WRKSRC}/freebsd.mak
@${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
@${REINPLACE_CMD} -e "s|%@P%/../../src/phobos|${MODULEDIR}|" ${WRKDIR}/dmd/freebsd/bin/dmd.conf
@${CP} ${WRKDIR}/dmd/freebsd/bin/dmd.conf ${WRKDIR}/dmd/freebsd/bin/dmd.conf.tango
@${REINPLACE_CMD} -e "s|phobos|tango -defaultlib=tango -version=freebsd|" ${WRKDIR}/dmd/freebsd/bin/dmd.conf.tango
@${REINPLACE_CMD} -e "1s|^|# You'll need to recompile libtango.a with dmd and install it yourself.|" ${WRKDIR}/dmd/freebsd/bin/dmd.conf.tango
@${REINPLACE_CMD} -e "s|%@P%/../lib|${PREFIX}/lib|" \
${WRKDIR}/dmd/freebsd/bin/dmd.conf \
${WRKDIR}/dmd/freebsd/bin/dmd.conf.tango
post-build:
@${REINPLACE_CMD} -e "s| etc/c/zlib/gzio.o||" ${WRKSRC}/../phobos/freebsd.mak
cd ${WRKSRC}/../phobos && \
${SETENV} PATH=${PATH}:${WRKSRC} ${MAKE} ${MAKE_FLAGS} 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)
${INSTALL_DATA} ${WRKDIR}/dmd/freebsd/bin/dmd.conf ${PREFIX}/etc
.endif
.if defined(WITH_SOURCE)
${INSTALL_PROGRAM} ${WRKSRC}/dmd ${PREFIX}/bin
${INSTALL_DATA} ${WRKSRC}/../phobos/libphobos.a ${PREFIX}/lib
.else
${INSTALL_PROGRAM} ${WRKDIR}/dmd/freebsd/bin/dmd ${PREFIX}/bin
${LN} -sf ${PREFIX}/etc/dmd.conf ${PREFIX}/bin
${INSTALL_DATA} ${WRKDIR}/dmd/freebsd/lib/libphobos.a ${PREFIX}/lib
.endif
${MKDIR} ${EXAMPLESDIR}
${INSTALL_DATA} ${WRKDIR}/dmd/freebsd/bin/dmd.conf ${EXAMPLESDIR}
${INSTALL_DATA} ${WRKDIR}/dmd/freebsd/bin/dmd.conf.tango ${EXAMPLESDIR}
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}
.if !defined(NOPORTDOCS)
${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
.include <bsd.port.post.mk>

108
lang/dmd2/Makefile~ Normal file
View File

@ -0,0 +1,108 @@
# New ports collection makefile for: dmd
# Date created: November 15 2010
# Whom: Ruben <chromium@hybridsource.org>
#
# $FreeBSD$
#
PORTNAME= dmd
PORTVERSION= 1.065
CATEGORIES= lang
MASTER_SITES= http://ftp.digitalmars.com/
DISTNAME= ${PORTNAME}.${PORTVERSION}
MAINTAINER= chromium@hybridsource.org
COMMENT= Official compiler for the D 1.0 programming language
NO_PACKAGE= Packages are not validation-tested by the developer
#ONLY_FOR_ARCHS= i386
USE_ZIP= yes
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_ZLIB= zlib license
LICENSE_PERMS_ZLIB= ${_LICENSE_PERMS_DEFAULT}
LICENSE_FILE_ZLIB= ${WRKSRC}/../phobos/phoboslicense.txt
LICENSE_NAME_DMD= digital mars license
LICENSE_FILE_DMD= ${WRKSRC}/../../license.txt
LICENSE_PERMS_DMD= no-pkg-mirror auto-accept
OPTIONS= SOURCE "Compile dmd and phobos from source" off
.include <bsd.port.pre.mk>
MODULEDIR= ${PREFIX}/include/d/phobos
.if defined(WITH_SOURCE)
MAKEFILE= freebsd.mak
.else
NO_BUILD= yes
PLIST_FILES= bin/dmd.conf
.endif
post-patch:
.if defined(WITH_SOURCE)
@${REINPLACE_CMD} -e "s|gcc|${CC}|" \
${WRKSRC}/../phobos/freebsd.mak \
${WRKSRC}/../phobos/etc/c/zlib/freebsd.mak \
${WRKSRC}/../phobos/internal/gc/freebsd.mak \
${WRKSRC}/freebsd.mak
@${REINPLACE_CMD} -e "s|g++|${CXX}|" \
${WRKSRC}/../phobos/freebsd.mak \
${WRKSRC}/freebsd.mak
@${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
@${REINPLACE_CMD} -e "s|%@P%/../../src/phobos|${MODULEDIR}|" ${WRKDIR}/dmd/freebsd/bin/dmd.conf
@${CP} ${WRKDIR}/dmd/freebsd/bin/dmd.conf ${WRKDIR}/dmd/freebsd/bin/dmd.conf.tango
@${REINPLACE_CMD} -e "s|phobos|tango -defaultlib=tango -version=freebsd|" ${WRKDIR}/dmd/freebsd/bin/dmd.conf.tango
@${REINPLACE_CMD} -e "1s|^|# You'll need to recompile libtango.a with dmd and install it yourself.|" ${WRKDIR}/dmd/freebsd/bin/dmd.conf.tango
@${REINPLACE_CMD} -e "s|%@P%/../lib|${PREFIX}/lib|" \
${WRKDIR}/dmd/freebsd/bin/dmd.conf \
${WRKDIR}/dmd/freebsd/bin/dmd.conf.tango
post-build:
@${REINPLACE_CMD} -e "s| etc/c/zlib/gzio.o||" ${WRKSRC}/../phobos/freebsd.mak
cd ${WRKSRC}/../phobos && \
${SETENV} PATH=${PATH}:${WRKSRC} ${MAKE} ${MAKE_FLAGS} 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)
${INSTALL_DATA} ${WRKDIR}/dmd/freebsd/bin/dmd.conf ${PREFIX}/etc
.endif
.if defined(WITH_SOURCE)
${INSTALL_PROGRAM} ${WRKSRC}/dmd ${PREFIX}/bin
${INSTALL_DATA} ${WRKSRC}/../phobos/libphobos.a ${PREFIX}/lib
.else
${INSTALL_PROGRAM} ${WRKDIR}/dmd/freebsd/bin/dmd ${PREFIX}/bin
${LN} -sf ${PREFIX}/etc/dmd.conf ${PREFIX}/bin
${INSTALL_DATA} ${WRKDIR}/dmd/freebsd/lib/libphobos.a ${PREFIX}/lib
.endif
${MKDIR} ${EXAMPLESDIR}
${INSTALL_DATA} ${WRKDIR}/dmd/freebsd/bin/dmd.conf ${EXAMPLESDIR}
${INSTALL_DATA} ${WRKDIR}/dmd/freebsd/bin/dmd.conf.tango ${EXAMPLESDIR}
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}
.if !defined(NOPORTDOCS)
${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
.include <bsd.port.post.mk>

2
lang/dmd2/distinfo Normal file
View File

@ -0,0 +1,2 @@
SHA256 (dmd.1.065.zip) = 6e15f96447adbdd8f496253af4d579e98ae95dffe56aab021cccce652e5fcab0
SIZE (dmd.1.065.zip) = 8967817

15
lang/dmd2/pkg-descr Normal file
View File

@ -0,0 +1,15 @@
D is a systems programming language. Its focus is on combining the power and
high performance of C and C++ with the programmer productivity of modern
languages like Ruby and Python. Special attention is given to the needs of
quality assurance, documentation, management, portability and reliability.
The D language is statically typed and compiles directly to machine code. It's
multiparadigm, supporting many programming styles: imperative, object oriented,
and metaprogramming. It's a member of the C syntax family, and its appearance
is very similar to that of C++.
It is not governed by a corporate agenda or any overarching theory of
programming. The needs and contributions of the D programming community form
the direction it goes.
WWW: http://digitalmars.com/d/1.0/

180
lang/dmd2/pkg-plist Normal file
View File

@ -0,0 +1,180 @@
bin/dmd
@unexec if cmp -s %D/%%EXAMPLESDIR%%/dmd.conf %D/etc/dmd.conf; then rm -f %D/etc/dmd.conf; fi
%%EXAMPLESDIR%%/dmd.conf
@exec if [ ! -f %D/etc/dmd.conf ]; then cp -p %D/%%EXAMPLESDIR%%/dmd.conf %D/etc/dmd.conf; fi
%%EXAMPLESDIR%%/dmd.conf.tango
%%EXAMPLESDIR%%/samples/d/all.sh
%%EXAMPLESDIR%%/samples/d/chello.d
%%EXAMPLESDIR%%/samples/d/d2html.d
%%EXAMPLESDIR%%/samples/d/dclient.d
%%EXAMPLESDIR%%/samples/d/dhry.d
%%EXAMPLESDIR%%/samples/d/dserver.d
%%EXAMPLESDIR%%/samples/d/dserver.def
%%EXAMPLESDIR%%/samples/d/hello.d
%%EXAMPLESDIR%%/samples/d/hello2.html
%%EXAMPLESDIR%%/samples/d/htmlget.d
%%EXAMPLESDIR%%/samples/d/listener.d
%%EXAMPLESDIR%%/samples/d/mydll/build.bat
%%EXAMPLESDIR%%/samples/d/mydll/dll.d
%%EXAMPLESDIR%%/samples/d/mydll/mydll.d
%%EXAMPLESDIR%%/samples/d/mydll/mydll.def
%%EXAMPLESDIR%%/samples/d/mydll/mydll2.d
%%EXAMPLESDIR%%/samples/d/mydll/test.d
%%EXAMPLESDIR%%/samples/d/pi.d
%%EXAMPLESDIR%%/samples/d/run.bat
%%EXAMPLESDIR%%/samples/d/sieve.d
%%EXAMPLESDIR%%/samples/d/wc.d
%%EXAMPLESDIR%%/samples/d/wc2.d
%%EXAMPLESDIR%%/samples/d/winsamp.d
%%EXAMPLESDIR%%/samples/d/winsamp.def
lib/libphobos.a
include/d/phobos/crc32.d
include/d/phobos/etc/gamma.d
include/d/phobos/etc/c/zlib.d
include/d/phobos/gcstats.d
include/d/phobos/object.d
include/d/phobos/phobos.d
include/d/phobos/std/array.d
include/d/phobos/std/asserterror.d
include/d/phobos/std/base64.d
include/d/phobos/std/bind.d
include/d/phobos/std/bitarray.d
include/d/phobos/std/boxer.d
include/d/phobos/std/c/fenv.d
include/d/phobos/std/c/freebsd/freebsd.d
include/d/phobos/std/c/freebsd/math.d
include/d/phobos/std/c/freebsd/pthread.d
include/d/phobos/std/c/freebsd/socket.d
include/d/phobos/std/c/linux/linux.d
include/d/phobos/std/c/linux/linuxextern.d
include/d/phobos/std/c/linux/pthread.d
include/d/phobos/std/c/linux/socket.d
include/d/phobos/std/c/locale.d
include/d/phobos/std/c/math.d
include/d/phobos/std/c/osx/dyld.d
include/d/phobos/std/c/osx/getsect.d
include/d/phobos/std/c/osx/loader.d
include/d/phobos/std/c/osx/osx.d
include/d/phobos/std/c/posix/posix.d
include/d/phobos/std/c/posix/pthread.d
include/d/phobos/std/c/posix/socket.d
include/d/phobos/std/c/process.d
include/d/phobos/std/c/solaris/pthread.d
include/d/phobos/std/c/solaris/socket.d
include/d/phobos/std/c/solaris/solaris.d
include/d/phobos/std/c/stdarg.d
include/d/phobos/std/c/stddef.d
include/d/phobos/std/c/stdio.d
include/d/phobos/std/c/stdlib.d
include/d/phobos/std/c/string.d
include/d/phobos/std/c/time.d
include/d/phobos/std/c/windows/com.d
include/d/phobos/std/c/windows/stat.d
include/d/phobos/std/c/windows/windows.d
include/d/phobos/std/c/windows/winsock.d
include/d/phobos/std/compiler.d
include/d/phobos/std/conv.d
include/d/phobos/std/cover.d
include/d/phobos/std/cpuid.d
include/d/phobos/std/cstream.d
include/d/phobos/std/ctype.d
include/d/phobos/std/date.d
include/d/phobos/std/dateparse.d
include/d/phobos/std/demangle.d
include/d/phobos/std/file.d
include/d/phobos/std/format.d
include/d/phobos/std/gc.d
include/d/phobos/std/intrinsic.d
include/d/phobos/std/loader.d
include/d/phobos/std/math.d
include/d/phobos/std/math2.d
include/d/phobos/std/md5.d
include/d/phobos/std/metastrings.d
include/d/phobos/std/mmfile.d
include/d/phobos/std/moduleinit.d
include/d/phobos/std/openrj.d
include/d/phobos/std/outbuffer.d
include/d/phobos/std/outofmemory.d
include/d/phobos/std/path.d
include/d/phobos/std/perf.d
include/d/phobos/std/process.d
include/d/phobos/std/random.d
include/d/phobos/std/regexp.d
include/d/phobos/std/signals.d
include/d/phobos/std/socket.d
include/d/phobos/std/socketstream.d
include/d/phobos/std/stdarg.d
include/d/phobos/std/stdint.d
include/d/phobos/std/stdio.d
include/d/phobos/std/stream.d
include/d/phobos/std/string.d
include/d/phobos/std/switcherr.d
include/d/phobos/std/syserror.d
include/d/phobos/std/system.d
include/d/phobos/std/thread.d
include/d/phobos/std/thread_helper.d
include/d/phobos/std/traits.d
include/d/phobos/std/typeinfo/ti_AC.d
include/d/phobos/std/typeinfo/ti_Acdouble.d
include/d/phobos/std/typeinfo/ti_Acfloat.d
include/d/phobos/std/typeinfo/ti_Acreal.d
include/d/phobos/std/typeinfo/ti_Adouble.d
include/d/phobos/std/typeinfo/ti_Afloat.d
include/d/phobos/std/typeinfo/ti_Ag.d
include/d/phobos/std/typeinfo/ti_Aint.d
include/d/phobos/std/typeinfo/ti_Along.d
include/d/phobos/std/typeinfo/ti_Areal.d
include/d/phobos/std/typeinfo/ti_Ashort.d
include/d/phobos/std/typeinfo/ti_C.d
include/d/phobos/std/typeinfo/ti_byte.d
include/d/phobos/std/typeinfo/ti_cdouble.d
include/d/phobos/std/typeinfo/ti_cfloat.d
include/d/phobos/std/typeinfo/ti_char.d
include/d/phobos/std/typeinfo/ti_creal.d
include/d/phobos/std/typeinfo/ti_dchar.d
include/d/phobos/std/typeinfo/ti_delegate.d
include/d/phobos/std/typeinfo/ti_double.d
include/d/phobos/std/typeinfo/ti_float.d
include/d/phobos/std/typeinfo/ti_idouble.d
include/d/phobos/std/typeinfo/ti_ifloat.d
include/d/phobos/std/typeinfo/ti_int.d
include/d/phobos/std/typeinfo/ti_ireal.d
include/d/phobos/std/typeinfo/ti_long.d
include/d/phobos/std/typeinfo/ti_ptr.d
include/d/phobos/std/typeinfo/ti_real.d
include/d/phobos/std/typeinfo/ti_short.d
include/d/phobos/std/typeinfo/ti_ubyte.d
include/d/phobos/std/typeinfo/ti_uint.d
include/d/phobos/std/typeinfo/ti_ulong.d
include/d/phobos/std/typeinfo/ti_ushort.d
include/d/phobos/std/typeinfo/ti_void.d
include/d/phobos/std/typeinfo/ti_wchar.d
include/d/phobos/std/typetuple.d
include/d/phobos/std/uni.d
include/d/phobos/std/uri.d
include/d/phobos/std/utf.d
include/d/phobos/std/windows/charset.d
include/d/phobos/std/windows/iunknown.d
include/d/phobos/std/windows/registry.d
include/d/phobos/std/windows/syserror.d
include/d/phobos/std/zip.d
include/d/phobos/std/zlib.d
include/d/phobos/unittest.d
@dirrm %%EXAMPLESDIR%%/samples/d/mydll
@dirrm %%EXAMPLESDIR%%/samples/d
@dirrm %%EXAMPLESDIR%%/samples
@dirrm %%EXAMPLESDIR%%
@dirrm include/d/phobos/std/windows
@dirrm include/d/phobos/std/typeinfo
@dirrm include/d/phobos/std/c/windows
@dirrm include/d/phobos/std/c/solaris
@dirrm include/d/phobos/std/c/posix
@dirrm include/d/phobos/std/c/osx
@dirrm include/d/phobos/std/c/linux
@dirrm include/d/phobos/std/c/freebsd
@dirrm include/d/phobos/std/c
@dirrm include/d/phobos/std
@dirrm include/d/phobos/etc/c
@dirrm include/d/phobos/etc
@dirrm include/d/phobos
@dirrmtry include/d