[121438] users/mojca/ports/cross

mojca at macports.org mojca at macports.org
Wed Jun 25 09:31:32 PDT 2014


Revision: 121438
          https://trac.macports.org/changeset/121438
Author:   mojca at macports.org
Date:     2014-06-25 09:31:31 -0700 (Wed, 25 Jun 2014)
Log Message:
-----------
mojca/mingw-w64: initial port for (i686|x86_64)-w64-mingw32-(headers|crt)

Added Paths:
-----------
    users/mojca/ports/cross/mingw-w64/
    users/mojca/ports/cross/mingw-w64/Portfile

Removed Paths:
-------------
    users/mojca/ports/cross/x86_64-w64-mingw32-headers/

Added: users/mojca/ports/cross/mingw-w64/Portfile
===================================================================
--- users/mojca/ports/cross/mingw-w64/Portfile	                        (rev 0)
+++ users/mojca/ports/cross/mingw-w64/Portfile	2014-06-25 16:31:31 UTC (rev 121438)
@@ -0,0 +1,88 @@
+# -*- 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        mirror mingw-w64 3.1.0 v
+set mingw_name      w64-mingw32
+
+platforms           darwin
+# TODO: make sure it's distributable
+license             ZPL-2.1
+maintainers         mojca openmaintainer
+
+description         mingw-w64 (TODO)
+long_description    mingw-w64 (TODO)
+
+homepage            http://mingw-w64.sourceforge.net/
+
+checksums           rmd160  573bcc1499ee840fd5f171aacdc85b6a6ca6e5ba \
+                    sha256  d3bd21dca42779ef8f713e5b215d0aac2eb87bc88745d84b17df62aca4ff7d56
+
+configure.dir       ${workpath}/build
+build.dir           ${configure.dir}
+post-extract {      file mkdir "${build.dir}" }
+
+subport i686-${mingw_name}-headers {
+    set mingw_arch  i686
+    set mingw_dir   headers
+}
+subport x86_64-${mingw_name}-headers {
+    set mingw_arch  x86_64
+    set mingw_dir   headers
+}
+subport i686-${mingw_name}-crt {
+    set mingw_arch  i686
+    set mingw_dir   crt
+    set mingw_bits  32
+}
+subport x86_64-${mingw_name}-crt {
+    set mingw_arch  x86_64
+    set mingw_dir   crt
+    set mingw_bits  64
+}
+
+if {${subport} ne ${name}} {
+    set mingw_target            ${mingw_arch}-${mingw_name}
+    set mingw_prefix            ${prefix}/${mingw_target}
+    configure.cmd               ${worksrcpath}/mingw-w64-${mingw_dir}/configure
+    configure.args-append       --prefix=${mingw_prefix} \
+                                --host=${mingw_target}
+    configure.pre_args-delete   --prefix=${prefix}
+
+    # CRT
+    if {${mingw_dir} eq "crt"} {
+        depends_lib-append      port:${mingw_target}-binutils \
+                                port:${mingw_target}-gcc \
+                                port:${mingw_target}-headers
+        # maybe that's already default?
+        configure.args-append   --enable-lib${mingw_bits}
+        configure.cppflags      "-I${mingw_prefix}/include"
+        configure.args          --with-sysroot=${mingw_prefix} \
+
+        # ----- from crossgcc (not sure if needed) ----
+        # the generated compiler doesn't accept -arch
+        configure.cc_archflags
+        configure.cxx_archflags
+        configure.objc_archflags
+        configure.ld_archflags
+
+        # the bootstrap compiler doesn't accept -stdlib
+        configure.cxx_stdlib
+
+        # We don't need system includes(this prevents xgcc to include system-wide
+        # unwind.h if it is present)!
+        compiler.cpath
+        # -----
+
+        # is there a more elegant way?
+        configure.cc  ${prefix}/bin/${mingw_target}-gcc
+        configure.cxx ${prefix}/bin/${mingw_target}-g++
+        configure.cpp ${prefix}/bin/${mingw_target}-cpp 
+    }
+
+    destroot.violate_mtree  yes
+} else {
+    # TODO: make just a placeholder, maybe save the docs
+}


Property changes on: users/mojca/ports/cross/mingw-w64/Portfile
___________________________________________________________________
Added: svn:keywords
   + Id
Added: svn:eol-style
   + native
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20140625/c985e96d/attachment-0001.html>


More information about the macports-changes mailing list