<pre style='margin:0'>
MarcusCalhoun-Lopez pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/9f028c59dbccfe58455b34eb94a1a6f06db4a139">https://github.com/macports/macports-ports/commit/9f028c59dbccfe58455b34eb94a1a6f06db4a139</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit 9f028c59dbccfe58455b34eb94a1a6f06db4a139
</span>Author: Marcus Calhoun-Lopez <mcalhoun@macports.org>
AuthorDate: Sun Mar 19 11:43:37 2017 -0700
<span style='display:block; white-space:pre;color:#404040;'> dub: respect build_arch and allow universal build
</span>---
devel/dub/Portfile | 26 ++++++++++++++++++++++----
devel/dub/files/makefile_macports_install | 10 ++++++++++
2 files changed, 32 insertions(+), 4 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/devel/dub/Portfile b/devel/dub/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index 65cf0b0..970382e 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/devel/dub/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/devel/dub/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -2,9 +2,10 @@
</span>
PortSystem 1.0
PortGroup github 1.0
<span style='display:block; white-space:pre;background:#e0ffe0;'>+PortGroup muniversal 1.0
</span>
github.setup dlang dub 1.2.0 v
<span style='display:block; white-space:pre;background:#ffe0e0;'>-revision 2
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+revision 3
</span> categories devel
platforms darwin
license GPL-3
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -29,10 +30,14 @@ build.cmd ./build.sh
</span> build.target
build.env CC=${configure.cc}
<span style='display:block; white-space:pre;background:#ffe0e0;'>-destroot {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- xinstall -d -m 755 ${destroot}${prefix}/bin
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- copy ${worksrcpath}/bin/dub ${destroot}${prefix}/bin
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# muniversal PG requires Makefile
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+post-extract {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ xinstall -m 0644 ${filespath}/makefile_macports_install ${build.dir}
</span> }
<span style='display:block; white-space:pre;background:#e0ffe0;'>+destroot.cmd /usr/bin/make
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+destroot.args \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -f makefile_macports_install \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ PREFIX=${prefix}
</span>
# respect MACOSX_DEPLOYMENT_TARGET environment value
patchfiles-append patch-build.sh.diff
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -43,4 +48,17 @@ post-patch {
</span> reinplace "s|__MACPORTS_PREFIX__|${prefix}|g" source/dub/dub.d
}
<span style='display:block; white-space:pre;background:#e0ffe0;'>+if { ![variant_isset universal] } {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if { ${build_arch} eq "x86_64" || ${build_arch} eq "ppc64" } {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ build.env-append DMD="${prefix}/bin/dmd -m64"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ build.env-append DMD="${prefix}/bin/dmd -m32"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+} else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ lappend merger_build_env(x86_64) DMD='${prefix}/bin/dmd -m64'
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ lappend merger_build_env(i386) DMD='${prefix}/bin/dmd -m32'
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ lappend merger_build_env(ppc64) DMD='${prefix}/bin/dmd -m64'
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ lappend merger_build_env(ppc) DMD='${prefix}/bin/dmd -m32'
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> livecheck.regex archive/[join ${github.tag_prefix} ""](\[^"rba\]+)${extract.suffix}
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/devel/dub/files/makefile_macports_install b/devel/dub/files/makefile_macports_install
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 0000000..4e4fb86
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/devel/dub/files/makefile_macports_install
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,10 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# -*- mode: makefile -*-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+INSTALL=/usr/bin/install
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+DCOPY=/bin/cp -R
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+install:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# bin
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ for f in dub; do \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ $(INSTALL) -m 755 bin/$$f $(DESTDIR)$(PREFIX)/bin; \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ done
</span></pre><pre style='margin:0'>
</pre>