[121430] users/mojca/ports/cross

Ryan Schmidt ryandesign at macports.org
Wed Jun 25 02:20:16 PDT 2014


On Jun 25, 2014, at 3:55 AM, mojca at macports.org wrote:

> Revision
> 121430
> Author
> mojca at macports.org
> Date
> 2014-06-25 01:55:30 -0700 (Wed, 25 Jun 2014)
> Log Message
> 
> mojca/x86_64-w64-mingw32-crt: initial port

This commit message doesn't appear to be correct.

> Modified Paths
> 
> 	• users/mojca/ports/cross/x86_64-w64-mingw32-gcc/Portfile
> 	• users/mojca/ports/cross/x86_64-w64-mingw32-headers/Portfile
> Diff
> 
> Modified: users/mojca/ports/cross/x86_64-w64-mingw32-gcc/Portfile (121429 => 121430)
> 
> --- users/mojca/ports/cross/x86_64-w64-mingw32-gcc/Portfile	2014-06-25 07:37:11 UTC (rev 121429)
> +++ users/mojca/ports/cross/x86_64-w64-mingw32-gcc/Portfile	2014-06-25 08:55:30 UTC (rev 121430)
> 
> @@ -18,8 +18,8 @@
> 
>                      rmd160  2c7214ff607cbe822282c04d1d6f9fea765c82c5 \
> 
>                      sha256  6a8e4f11b185f4fe2ed9d7fc053e80f8c7e73f800c045f51f9d8bea33f080f1e
> 
>  
> 
> -depends_lib-append  ${crossgcc.target}-binutils \
> -                    ${crossgcc.target}-headers
> 
> +depends_lib-append  port:${crossgcc.target}-binutils \
> +                    port:${crossgcc.target}-headers
> 
>  
> 
>  # TODO: check the difference in headers installed by MinGW and those by the compiler!!!
> 
>  
> 
> Modified: users/mojca/ports/cross/x86_64-w64-mingw32-headers/Portfile (121429 => 121430)
> 
> --- users/mojca/ports/cross/x86_64-w64-mingw32-headers/Portfile	2014-06-25 07:37:11 UTC (rev 121429)
> +++ users/mojca/ports/cross/x86_64-w64-mingw32-headers/Portfile	2014-06-25 08:55:30 UTC (rev 121430)
> 
> @@ -9,8 +9,10 @@
> 
>  
> 
>  github.setup        mirror mingw-w64 3.1.0 v
> 
>  # TODO: rename this port
> 
> -name                x86_64-w64-mingw32-headers
> 
> +name                ${crossgcc.target}-headers
> 
>  
> 
> +subport ${crossgcc.target}-crt {}
> +
> 
>  platforms           darwin
> 
>  # TODO: distributable
> 
>  license             ZPL-2.1
> 
> @@ -31,21 +33,56 @@
> 
>  
> 
>  dist_subdir         mingw-w64
> 
>  
> 
> +# TODO: set a variable to replace mingw-w64
> 
>  configure.dir       ${workpath}/build
> 
>  configure.cmd       ${worksrcpath}/mingw-w64-headers/configure
> 
>  configure.args      --prefix=${prefix}/${crossgcc.target} \
> 
> -                    --host=${crossgcc.target} \
> -                    --enable-sdk=no
> -#                   --build=<host triplet>
> 
> +                    --host=${crossgcc.target}
> +configure.pre_args-delete \
> +                    --prefix=${prefix}
> 
>  
> 
> +if {${subport} eq ${name}} {
> +    # configure.args-append   --enable-sdk=no|all
> +    
> +    pre-destroot {
> +        # gcc needs the cross directory structure to be present
> +        # in order to fill it during installation.
> +        file mkdir "${destroot}/${prefix}/${crossgcc.target}/lib"
> +        file mkdir "${destroot}/${prefix}/${crossgcc.target}/lib32"
> +        ln -s lib  "${destroot}/${prefix}/${crossgcc.target}/lib64"
> +        ln -s "${crossgcc.target}" "${destroot}/${prefix}/mingw"
> +    }
> +} elseif {${subport} eq "${crossgcc.target}-crt"} {
> +    # only part of gcc is needed
> +    depends_lib-append      port:${crossgcc.target}-binutils \
> +                            port:${crossgcc.target}-gcc \
> +                            port:${crossgcc.target}-headers
> +    configure.cmd           ${worksrcpath}/mingw-w64-crt/configure
> +    configure.args-append   --enable-lib32 \
> +                            --enable-lib64
> +    # configure.cppflags
> +    configure.cppflags      "-I${prefix}/${crossgcc.target}/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/x86_64-w64-mingw32-gcc
> +    configure.cxx ${prefix}/bin/x86_64-w64-mingw32-g++
> +    configure.cpp ${prefix}/bin/x86_64-w64-mingw32-cpp
> +}
> +
> 
>  # this port installs files to ${prefix}/${crossgcc.target}
> 
>  destroot.violate_mtree yes
> 
> -
> -pre-destroot {
> -    # gcc needs the cross directory structure to be present
> -    # in order to fill it during installation.
> -    file mkdir "${destroot}/${prefix}/${crossgcc.target}/lib"
> -    file mkdir "${destroot}/${prefix}/${crossgcc.target}/lib32"
> -    ln -s lib  "${destroot}/${prefix}/${crossgcc.target}/lib64"
> -    ln -s "${crossgcc.target}" "${destroot}/${prefix}/mingw"
> -}



More information about the macports-dev mailing list