# -*- 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.060 v revision 1 categories lang platforms darwin supported_archs i386 x86_64 license {GPL-1 Artistic DMD} 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 80eaa1e9b56c1873f3fedc06f4d4218ce9a327fe \ sha256 f1bad058aefda510f4d799767444df89af2a09bbe87e2fed2bcac967f959cb00 patchfiles patch-src-root-port.c.diff post-patch { reinplace "s|gcc|${configure.cc}|" ${worksrcpath}/src/posix.mak reinplace "s|gcc|${configure.cc}|" ${worksrcpath}/src/link.c reinplace "s|-m\$(MODEL)||" ${worksrcpath}/src/posix.mak reinplace "s|/etc|${prefix}/etc/${name}|" ${worksrcpath}/src/inifile.c reinplace "s|/etc|${prefix}/etc/${name}|" ${worksrcpath}/docs/man/man1/${name}.1 reinplace "s|/etc|${prefix}/etc/${name}|" ${worksrcpath}/docs/man/man1/${name}.conf.5 } use_configure no configure.cppflags-append \ -Wno-deprecated -Wstrict-aliasing configure.cxxflags-append \ -Iroot -fno-exceptions -x c++\ -D__pascal= -DMARS=1 -DTARGET_OSX=1 build.dir ${worksrcpath}/src build.args -f posix.mak \ HOST_CC=${configure.cxx} \ CC=\"${configure.cxx}\" \ CFLAGS=\"${configure.cxxflags}\" \ MFLAGS=\"${configure.cxxflags} -Ibackend -Itk\" \ LDFLAGS=\"${configure.ldflags} -lstdc++ -framework CoreServices\" \ ENVP=\"MACOSX_DEPLOYMENT_TARGET=${macosx_deployment_target}\" destroot { # man xinstall -m 644 -W ${worksrcpath}/docs/man/man1 \ dmd.1 dumpobj.1 obj2asm.1 rdmd.1 \ ${destroot}${prefix}/share/man/man1 xinstall -m 644 ${worksrcpath}/docs/man/man1/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 -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 }