[148220] trunk/dports/lang/dmd-tools
mcalhoun at macports.org
mcalhoun at macports.org
Sat Apr 30 08:43:59 PDT 2016
Revision: 148220
https://trac.macports.org/changeset/148220
Author: mcalhoun at macports.org
Date: 2016-04-30 08:43:58 -0700 (Sat, 30 Apr 2016)
Log Message:
-----------
dmd-tools: allow universal build
Modified Paths:
--------------
trunk/dports/lang/dmd-tools/Portfile
Added Paths:
-----------
trunk/dports/lang/dmd-tools/files/
trunk/dports/lang/dmd-tools/files/patch-posix.diff
Modified: trunk/dports/lang/dmd-tools/Portfile
===================================================================
--- trunk/dports/lang/dmd-tools/Portfile 2016-04-30 15:40:28 UTC (rev 148219)
+++ trunk/dports/lang/dmd-tools/Portfile 2016-04-30 15:43:58 UTC (rev 148220)
@@ -3,6 +3,7 @@
PortSystem 1.0
PortGroup github 1.0
+PortGroup muniversal 1.0
github.setup D-Programming-Language tools 2.069.2 v
name dmd-${github.project}
@@ -27,23 +28,36 @@
use_configure no
-if {${build_arch} eq "x86_64"} {
- set model 64
-} else {
- set model 32
-}
+patchfiles patch-posix.diff
build.args -f posix.mak \
DRUNTIME=${prefix}/lib/libdruntime.a \
DRUNTIME_PATH=${prefix}/include/druntime \
- DMD=${prefix}/bin/dmd \
- DFLAGS="-w -d -m${model} -O -release" \
- MODEL=${model}
+ DMD=${prefix}/bin/dmd
build.target ""
-destroot.args -f posix.mak \
- INSTALL_DIR=${destroot}${prefix} \
- MODEL=${model}
+destroot.args -f posix.mak PREFIX=${prefix}
+
+if { ![variant_isset universal] } {
+ if { ${build_arch} eq "x86_64" || ${build_arch} eq "ppc64" } {
+ build.args-append MODEL=64
+ destroot.args-append MODEL=64
+ } else {
+ build.args-append MODEL=32
+ destroot.args-append MODEL=32
+ }
+} else {
+ lappend merger_build_args(x86_64) MODEL=64
+ lappend merger_build_args(i386) MODEL=32
+ lappend merger_build_args(ppc64) MODEL=64
+ lappend merger_build_args(ppc) MODEL=32
+
+ lappend merger_destroot_args(x86_64) MODEL=64
+ lappend merger_destroot_args(i386) MODEL=32
+ lappend merger_destroot_args(ppc64) MODEL=64
+ lappend merger_destroot_args(ppc) MODEL=32
+}
+
post-destroot {
xinstall -W ${worksrcpath} -m 644 man/man1/rdmd.1 ${destroot}${prefix}/share/man/man1
}
Added: trunk/dports/lang/dmd-tools/files/patch-posix.diff
===================================================================
--- trunk/dports/lang/dmd-tools/files/patch-posix.diff (rev 0)
+++ trunk/dports/lang/dmd-tools/files/patch-posix.diff 2016-04-30 15:43:58 UTC (rev 148220)
@@ -0,0 +1,19 @@
+--- posix.mak.orig 2015-10-04 11:19:24.000000000 -0700
++++ posix.mak 2016-04-30 07:44:08.000000000 -0700
+@@ -1,6 +1,6 @@
+ DMD = ../dmd/src/dmd
+ CC = gcc
+-INSTALL_DIR = ../install
++INSTALL_DIR = $(DESTDIR)$(PREFIX)
+ DRUNTIME_PATH = ../druntime
+ PHOBOS_PATH = ../phobos
+
+@@ -67,7 +67,7 @@
+ # default include/link paths, override by setting DMD (e.g. make -f posix.mak DMD=dmd)
+ DMD += -I$(DRUNTIME_PATH)/import -I$(PHOBOS_PATH) -L-L$(PHOBOS_PATH)/generated/$(OS)/release/$(MODEL)
+
+-DFLAGS = -w
++DFLAGS = -w -O -release
+
+ TOOLS = \
+ $(ROOT)/rdmd \
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20160430/c253cf32/attachment-0001.html>
More information about the macports-changes
mailing list