I386-mingw32-gcc version 3.4.5-20060117-2 - How to Download and Install on Mac OS X
Saturday the 21st of November, 2009

    i386-mingw32-gcc  most recent diff


    version 3.4.5-20060117-2

      View the most recent changes for the i386-mingw32-gcc port at: i386-mingw32-gcc.darwinports.com/diff
      Scroll down toward the bottom of the page to get installation instructions for i386-mingw32-gcc.
      The raw portfile for i386-mingw32-gcc 3.4.5-20060117-2 is located here:
      http://i386-mingw32-gcc.darwinports.com/dports/cross/i386-mingw32-gcc/Portfile
      Find related portfiles with the unique DarwinPorts.com search feature.
      Check for any related Fink projects here: pdb.finkproject.org/pdb/package.php/i386-mingw32-gcc


      The i386-mingw32-gcc Portfile 59653 2009-10-18 21:49:42Z jmr macports.org $
      PortSystem 1.0

      Name: i386-mingw32-gcc
      Version: 3.4.5-20060117-2
      set gnu_version 3.4.5
      Maintainers: landonf
      Description: Mingw32 cross-compiler for i386-Win32
      Long Description: Mingw32 GNU Compiler for i386-Win32. Supports C, C++, Objective-C and Java.
      Homepage: http://www.mingw.org
      Platform: darwin
      Category: cross devel

      # Parameters for this port.
      set crossgcc-target i386-mingw32

      Master Sites: sourceforge:mingw
      distfiles gcc-core-${version}-src.tar.gz gcc-g%2B%2B-${version}-src.tar.gz gcc-g77-${version}-src.tar.gz gcc-java-${version}-src.tar.gz gcc-objc-${version}-src.tar.gz

      Checksums: gcc-core-${version}-src.tar.gz md5 d0dc9d57d493889bc1ca88b127290b9d sha1 75d59049f26dc62f3732d11abbf056efc7bc8e95 rmd160 624dd55ac00fba15269f1b3b3bbd6c383cc20827 gcc-g%2B%2B-${version}-src.tar.gz md5 ca81c8420ab9d1d05ff9c73a9d4f7d63 sha1 edafa412d86085cf39f0db1c19a6ea2890d05946 rmd160 7e3341c6ef1494462dfd3f682ad4cc6871b73e98 gcc-g77-${version}-src.tar.gz md5 57d489658743f0d9048e440b312740c8 sha1 156baeb2bd0dbbd15ed397b0a609e7e7cdbdab4b rmd160 3c0ac52b0c18712a29219803c95399dfce53e461 gcc-java-${version}-src.tar.gz md5 96b039f4e11bff4d3d8a4e7da6e3998d sha1 a9152dd7ffa35fc028fcca369a729ec2bbad55e7 rmd160 4971ce8ffa01292567f36983101d4b99901da50d gcc-objc-${version}-src.tar.gz md5 2bffc1e314f2efb1034b3d3ea1ce2f7d sha1 c96f1531d9d73e9279e0b6faf085deec5c2bda7b rmd160 a02ad94da674760799ec945c7ff75ed99f9e8c3a
      worksrcdir gcc-${version}

      # Patches for infodir
      Patch Files: patch-gcc-Makefile.in patch-fastjar-Makefile.in

      depends_lib port:i386-mingw32-w32api port:i386-mingw32-runtime port:i386-mingw32-binutils port:gettext

      # Build in a different directory, as advised in the README file.
      pre-configure { system "cd ${workpath} && mkdir -p build" }
      configure.dir ${workpath}/build
      configure.cmd ${workpath}/gcc-${version}/configure
      configure.args --infodir='${prefix}/share/info' --mandir='${prefix}/share/man' --target=${crossgcc-target} --without-newlib --disable-nls --with-gnu-as --with-gnu-ld --disable-multilib --with-gxx-include-dir=${prefix}/${crossgcc-target}/include/c++/${gnu_version}/
      if {$build_arch != ""} {
      configure.cc_archflags
      configure.cxx_archflags
      configure.objc_archflags
      if {${os.platform} == "darwin"} {
      configure.args-append --build=${build_arch}-apple-darwin${os.major}
      }
      }

      build.dir ${workpath}/build

      post-patch {
      namespace eval crossgcc {}

      # Fix the info pages and related stuff.
      #
      # path: path to the doc directory (e.g. gas/doc/)
      # makefile: path to Makefile.in (e.g. gas/doc/Makefile.in)
      # name: name of the info page (e.g. as)
      # suffix: suffix of the souce page (texinfo or texi)
      proc crossgcc::fixinfo { path makefile name suffix } {
      global crossgcc-target worksrcpath

      # Fix the source
      reinplace "s|setfilename ${name}.info|setfilename ${crossgcc-target}-${name}.info|g" ${worksrcpath}/${path}/${name}.${suffix}
      reinplace "s|(${name})|(${crossgcc-target}-${name})|g" ${worksrcpath}/${path}/${name}.${suffix}
      reinplace "s| file{${name}}| file{${crossgcc-target}-${name}}|g" ${worksrcpath}/${path}/${name}.${suffix}

      # Fix the Makefile
      reinplace "s|${name}.info|${crossgcc-target}-${name}.info|g" ${worksrcpath}/${makefile}
      reinplace "s|${name}.${suffix}|${crossgcc-target}-${name}.${suffix}|g" ${worksrcpath}/${makefile}

      # Rename the source
      file rename ${worksrcpath}/${path}/${name}.${suffix} ${worksrcpath}/${path}/${crossgcc-target}-${name}.${suffix}

      # Fix install-info's dir.
      # (note: this may be effectless if there was no info dir to be fixed)
      reinplace "s|__TARGET|${crossgcc-target}|g" "${worksrcpath}/${makefile}"
      }

      # Fix the gettext files and related stuff.
      #
      # module: name of the module (e.g. gas)
      proc crossgcc::fixgettext { module } {
      global crossgcc-target worksrcpath

      if { [ file exists "${worksrcpath}/${module}/Makefile.in" ] } {
      reinplace "s| PACKAGE |${crossgcc-target}- PACKAGE |g" "${worksrcpath}/${module}/Makefile.in"
      }
      if { [ file exists "${worksrcpath}/${module}/doc/Makefile.in" ] } {
      reinplace "s| PACKAGE |${crossgcc-target}- PACKAGE |g" "${worksrcpath}/${module}/doc/Makefile.in"
      }
      if { [ file exists "${worksrcpath}/${module}/po/Make-in" ] } {
      reinplace "s| PACKAGE |${crossgcc-target}- PACKAGE |g" "${worksrcpath}/${module}/po/Make-in"
      }
      }

      # gcc/doc/cpp.texi
      crossgcc::fixinfo gcc/doc/ gcc/Makefile.in cpp texi

      # gcc/doc/cppinternals.texi
      crossgcc::fixinfo gcc/doc/ gcc/Makefile.in cppinternals texi

      # gcc/doc/gcc.texi
      crossgcc::fixinfo gcc/doc/ gcc/Makefile.in gcc texi
      # XXX: Gross hack
      # Clean up the mess in gcc/Makefile.in
      reinplace s|lib${crossgcc-target}-gcc.texi|libgcc.texi|g ${worksrcpath}/gcc/Makefile.in

      # gcc/doc/gccint.texi
      crossgcc::fixinfo gcc/doc/ gcc/Makefile.in gccint texi

      # gcc/f/g77.texi
      crossgcc::fixinfo gcc/f/ gcc/f/Make-lang.in g77 texi

      # gcc/java/gcj.texi
      crossgcc::fixinfo gcc/java/ gcc/java/Make-lang.in gcj texi

      # fastjar/fastjar.texi
      crossgcc::fixinfo fastjar/ fastjar/Makefile.in fastjar texi

      # gettext stuff.
      crossgcc::fixgettext gcc
      crossgcc::fixgettext fastjar

      }

      post-destroot {
      # Stuff I don't want (either because they're in the system
      # or because they would conflict with other FSF ports)
      # (it's easier for maintainability purposes to fix things here)

      # aliases for locales (should be on the system)
      file delete "${destroot}/${prefix}/share/locale/locale.alias"

      # FSF propaganda (should already be there or would conflict)
      file delete -force "${destroot}/${prefix}/share/man/man7"

      # (host) libiberty
      file delete "${destroot}/${prefix}/lib/libiberty.a"

      # aliases for charsets (should already be there)
      file delete "${destroot}/${prefix}/lib/charset.alias"

      # Remove man pages for tools that are not built as part of cross-gcc
      file delete "${destroot}/${prefix}/share/man/man1/rmic.1"
      file delete "${destroot}/${prefix}/share/man/man1/rmiregistry.1"
      file delete "${destroot}/${prefix}/share/man/man1/jv-convert.1"
      file delete "${destroot}/${prefix}/share/man/man1/gij.1"

      # There is no need for documentation on installing gcc
      # given that this port just installed gcc.
      file delete "${destroot}/${prefix}/share/info/gccinstall.info"
      }

    If you haven't already installed Darwin Ports, you can find easy instructions for doing so at the main Darwin Ports page.

    Once Darwin Ports has been installed, in a terminal window and while online, type the following and hit return:


      %  cd /opt/local/bin/portslocation/dports/i386-mingw32-gcc
      % sudo port install i386-mingw32-gcc
      Password:
    You will then be prompted for your root password, which you should enter. You may have to wait for a few minutes while the software is retrieved from the network and installed for you. Y ou should see something that looks similar to:

      ---> Fetching i386-mingw32-gcc
      ---> Verifying checksum for i386-mingw32-gcc
      ---> Extracting i386-mingw32-gcc
      ---> Configuring i386-mingw32-gcc
      ---> Building i386-mingw32-gcc with target all
      ---> Staging i386-mingw32-gcc into destroot
      ---> Installing i386-mingw32-gcc
    - Make sure that you do not close the terminal window while Darwin Ports is working. Once the software has been installed, you can find further information about using i386-mingw32-gcc with these commands:
      %  man i386-mingw32-gcc
      % apropos i386-mingw32-gcc
      % which i386-mingw32-gcc
      % locate i386-mingw32-gcc

     Where to find more information:

    Darwin Ports



    Lightbox this page.