# -*- 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 5.0-rc2 v set mingw_name w64-mingw32 platforms darwin # TODO: make sure it's distributable license ZPL-2.1 maintainers mojca openmaintainer description GCC for Windows 64 & 32 bits long_description Mingw-w64 is an advancement of the original mingw.org project, \ created to support the GCC compiler on Windows systems. homepage http://mingw-w64.sourceforge.net/ checksums rmd160 8097e29913b5271c366ae07c41c72b07e9079d69 \ sha256 d20583622dbb7105bc5ebd4911158b73f8996d2114806faf719a72fdcf4a8ff6 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 } subport x86_64-${mingw_name}-crt { set mingw_arch x86_64 set mingw_dir crt } 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 # TODO: remove one level in --prefix and --with-sysroot (but figure out how to do it consistently/properly) configure.args-append --prefix=${mingw_prefix}/${mingw_target} \ --host=${mingw_target} configure.pre_args-delete --prefix=${prefix} if {${mingw_dir} eq "headers"} { post-destroot { ln -s ${mingw_target} "${destroot}${mingw_prefix}/mingw" } } # 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 --with-sysroot=${mingw_prefix}/${mingw_target} configure.cppflags "-I${mingw_prefix}/include" # ----- 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 # configure.env-append PATH=... } destroot.violate_mtree yes } else { # TODO: make just a placeholder, maybe save the docs; don't install anything }