# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4 # $Id$ PortSystem 1.0 PortGroup github 1.0 github.setup D-Programming-Language dmd 2.067.0 v categories lang platforms darwin supported_archs i386 x86_64 license {GPL-1 Artistic-1} Boost-1 Restrictive maintainers takeshi openmaintainer description dmd Digital Mars D compiler long_description \ D is a language with C-like syntax and static typing. \ It pragmatically combines efficiency, control, \ and modeling power, with safety and programmer productivity. homepage http://dlang.org/ checksums rmd160 d374210589fd0a8882a9b5beb6829e7a93923b2f \ sha256 d7c530f5e06768538d4adfe829ee88d0866636e035e6c43928c5f5c91ce0d5d4 post-patch { reinplace "s|gcc|${configure.cc}|" ${worksrcpath}/src/link.c reinplace "s|/etc|${prefix}/etc/${name}|" ${worksrcpath}/src/posix.mak reinplace "s|/etc|${prefix}/etc/${name}|" ${worksrcpath}/docs/man/man1/${name}.1 reinplace "s|/etc|${prefix}/etc/${name}|" ${worksrcpath}/docs/man/man5/${name}.conf.5 } use_configure no variant universal {} build.dir ${worksrcpath}/src # Use CFLAGS in the posix.make; some source needs special flags. # Command-line arguments wipe the CFLAGS in posix.mak and # extra flags cannot be added with +=. # Another solution would be the use of override directive in posix.mak. build.args -f posix.mak \ HOST_CC="${configure.cxx}" \ LDFLAGS="${configure.ldflags} -framework CoreServices" \ MODEL_FLAG="[get_canonical_archflags]" \ ENVP="MACOSX_DEPLOYMENT_TARGET=${macosx_deployment_target}" destroot { # man xinstall -m 644 -W ${worksrcpath}/docs/man/man1 \ dmd.1 dumpobj.1 obj2asm.1 \ ${destroot}${prefix}/share/man/man1 xinstall -m 644 ${worksrcpath}/docs/man/man5/dmd.conf.5 \ ${destroot}${prefix}/share/man/man5 # bin xinstall -m 755 -W ${destroot.dir} \ dmd idgen impcnvgen optabgen \ ${destroot}${prefix}/bin # samples xinstall -d -m 755 ${destroot}${prefix}/share/${name}/samples eval xinstall -m 644 [glob ${worksrcpath}/samples/*.d] ${destroot}${prefix}/share/${name}/samples # conf xinstall -d -m 755 ${destroot}${prefix}/etc/${name} set conf [open ${destroot}${prefix}/etc/${name}/${name}.conf w] puts $conf "\[Environment\] DFLAGS=-I${prefix}/include/druntime/import -I${prefix}/include/phobos -L-L${prefix}/lib" close $conf } notes { In order to have a complete dmd runtime environment consider installing the following ports: druntime phobos dmd-tools }