https://gist.github.com/artynet/188bb34cfc94acdb554d283a3502770a
--cross-compile-prefix=i686-w64-mingw32- mingw BUILD nsis v2.46 on OSX >= 10.9 scons PREFIX=/Users/arturo/Programmi/nsis-2.46 ZLIB_W32=/Users/arturo/Programmi/Zlib-1.2.7-win32-x86 STRIP=no install-stubs install-plugins install-data install-utils install-examples install-doc install-conf scons APPEND_CCFLAGS=--stdlib=libstdc++ APPEND_LINKFLAGS=--stdlib=libstdc++ PREFIX=/Users/arturo/Programmi/nsis-2.46 ZLIB_W32=/Users/arturo/Programmi/Zlib-1.2.7-win32-x86 STRIP=no install-compiler scons PREFIX=/Users/arturo/Programmi/nsis-2.46 ZLIB_W32=/Users/arturo/Programmi/Zlib-1.2.7-win32-x86 STRIP=no VERSION=2.46 install scons PREFIX=/Users/arturo/Programmi/nsis-30 ZLIB_W32=/Users/arturo/Programmi/Zlib-1.2.7-win32-x86 STRIP=no VERSION=3.0 install scons PREFIX=/Users/arturo/Programmi/nsis-301 ZLIB_W32=/Users/arturo/Programmi/Zlib-1.2.7-win32-x86 STRIP=no VERSION=3.01 install scons PREFIX=/Users/arturo/Programmi/nsis-301 ZLIB_W32=/Users/arturo/Programmi/Zlib-1.2.11-win32-x86 STRIP=no VERSION=3.01 install ------------------------------------------------------------------------------------------------------------------------------------- BUILD ZLIB 1.2.11 #!/bin/bash PREFIXDIR=$HOME/Programmi/Zlib-1.2.11-win32-x86 make -f win32/Makefile.gcc BINARY_PATH=$PREFIXDIR/bin INCLUDE_PATH=$PREFIXDIR/include LIBRARY_PATH=$PREFIXDIR/lib SHARED_MODE=1 PREFIX=i686-w64-mingw32- install
mingw-w64-3.10-osx10.9.sh
#!/bin/sh # dependencies echo "Installing dependencies via Homebrew (http://brew.sh)" ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)" brew update brew install gcc48 brew install wget # mingw PREFIX="/usr/local/mingw" DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" cd $DIR mkdir source mkdir $PREFIX echo "Downloading binutils " cd ./source curl -O http://ftp.gnu.org/gnu/binutils/binutils-2.24.tar.bz2 tar xjf binutils-2.24.tar.bz2 echo "Building binutils " echo "1/2 32-bit " cd binutils-2.24 mkdir build cd build CC=gcc-4.8 CXX=g++-4.8 CPP=cpp-4.8 LD=gcc-4.8 ../configure --target=i686-w64-mingw32 --disable-werror --disable-multilib --prefix=$PREFIX --with-sysroot=$PREFIX make -j4 make install-strip echo "2/2 64-bit " cd .. rm -rf build mkdir build cd build CC=gcc-4.8 CXX=g++-4.8 CPP=cpp-4.8 LD=gcc-4.8 ../configure --target=x86_64-w64-mingw32 --disable-werror --disable-multilib --prefix=$PREFIX --with-sysroot=$PREFIX --enable-64-bit-bfd make -j4 make install-strip cd .. cd .. echo "Downloading mingw-w64 " wget -O mingw-w64-v3.1.0.tar.bz2 "http://downloads.sourceforge.net/project/mingw-w64/mingw-w64/mingw-w64-release/mingw-w64-v3.1.0.tar.bz2?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fmingw-w64%2Ffiles%2Fmingw-w64%2Fmingw-w64-release%2F&ts=1396199899&use_mirror=kent" tar xjf mingw-w64-v3.1.0.tar.bz2 echo "Building mingw-headers " echo "1/2 32-bit " cd mingw-w64-v3.1.0 mkdir build-headers cd build-headers ../mingw-w64-headers/configure --host=i686-w64-mingw32 --prefix=$PREFIX/i686-w64-mingw32 make -j4 make install-strip cd $PREFIX/i686-w64-mingw32 ln -s lib lib32 cd $DIR/source/mingw-w64-v3.1.0 echo "2/2 64-bit " rm -rf build-headers mkdir build-headers cd build-headers ../mingw-w64-headers/configure --host=x86_64-w64-mingw32 --prefix=$PREFIX/x86_64-w64-mingw32 make -j4 make install-strip cd $PREFIX/x86_64-w64-mingw32 ln -s lib lib64 cd $DIR/source/ echo "Downloading gcc " curl -O ftp://gcc.gnu.org/pub/gcc/releases/gcc-4.8.2/gcc-4.8.2.tar.bz2 tar xjf gcc-4.8.2.tar.bz2 echo "Building core gcc " echo "1/2 32-bit " cd $PREFIX ln -s i686-w64-mingw32 mingw cd $DIR/source/gcc-4.8.2 mkdir build32 cd build32 CC=gcc-4.8 CXX=g++-4.8 CPP=cpp-4.8 LD=gcc-4.8 PATH=/usr/local/mingw/bin/:$PATH ../configure --target=i686-w64-mingw32 --disable-multilib --enable-languages=c,c++,objc,obj-c++ --with-gmp=/usr/local/Cellar/gmp4/4.3.2/ --with-mpfr=/usr/local/Cellar/mpfr2/2.4.2/ --with-mpc=/usr/local/Cellar/libmpc08/0.8.1/ --with-cloog=/usr/local/Cellar/cloog018/0.18.0/ --with-isl=/usr/local/Cellar/isl011/0.11.1/ --with-system-zlib --enable-version-specific-runtime-libs --enable-libstdcxx-time=yes --enable-stage1-checking --enable-checking=release --enable-lto --enable-threads=win32 --disable-sjlj-exceptions --prefix=$PREFIX --with-sysroot=$PREFIX PATH=/usr/local/mingw/bin/:$PATH make all-gcc -j4 PATH=/usr/local/mingw/bin/:$PATH make install-gcc echo "2/2 64-bit " cd $PREFIX rm mingw ln -s x86_64-w64-mingw32 mingw cd $DIR/source/gcc-4.8.2 mkdir build64 cd build64 CC=gcc-4.8 CXX=g++-4.8 CPP=cpp-4.8 LD=gcc-4.8 PATH=/usr/local/mingw/bin/:$PATH ../configure --target=x86_64-w64-mingw32 --disable-multilib --enable-languages=c,c++,objc,obj-c++ --with-gmp=/usr/local/Cellar/gmp4/4.3.2/ --with-mpfr=/usr/local/Cellar/mpfr2/2.4.2/ --with-mpc=/usr/local/Cellar/libmpc08/0.8.1/ --with-cloog=/usr/local/Cellar/cloog018/0.18.0/ --with-isl=/usr/local/Cellar/isl011/0.11.1/ --with-system-zlib --enable-version-specific-runtime-libs --enable-libstdcxx-time=yes --enable-stage1-checking --enable-checking=release --enable-lto --enable-threads=win32 --prefix=$PREFIX --with-sysroot=$PREFIX PATH=/usr/local/mingw/bin/:$PATH make all-gcc -j4 PATH=/usr/local/mingw/bin/:$PATH make install-gcc echo "Building mingw runtime " cd $PREFIX rm mingw ln -s i686-w64-mingw32 mingw cd $DIR/source/mingw-w64-v3.1.0 mkdir build-crt cd build-crt echo "1/2 32-Bit " PATH=/usr/local/mingw/bin/:$PATH ../mingw-w64-crt/configure --host=i686-w64-mingw32 --prefix=$PREFIX/i686-w64-mingw32 --with-sysroot=$PREFIX PATH=/usr/local/mingw/bin/:$PATH make PATH=/usr/local/mingw/bin/:$PATH make install-strip echo "2/2 64-Bit " cd $PREFIX rm mingw ln -s x86_64-w64-mingw32 mingw cd $DIR/source/mingw-w64-v3.1.0 rm -rf build-crt mkdir build-crt cd build-crt PATH=/usr/local/mingw/bin/:$PATH ../mingw-w64-crt/configure --host=x86_64-w64-mingw32 --prefix=$PREFIX/x86_64-w64-mingw32 --with-sysroot=$PREFIX PATH=/usr/local/mingw/bin/:$PATH make PATH=/usr/local/mingw/bin/:$PATH make install-strip echo "Building all gcc " echo "1/2 32-Bit " cd $PREFIX rm mingw ln -s i686-w64-mingw32 mingw cd $DIR/source/gcc-4.8.2/build32 PATH=/usr/local/mingw/bin/:$PATH make PATH=/usr/local/mingw/bin/:$PATH make install-strip echo "2/2 64-Bit " cd $PREFIX rm mingw ln -s x86_64-w64-mingw32 mingw cd $DIR/source/gcc-4.8.2/build64 PATH=/usr/local/mingw/bin/:$PATH make PATH=/usr/local/mingw/bin/:$PATH make install-strip echo "Linking libgcc " cd $PREFIX/i686-w64-mingw32/lib ln -s ../../lib/gcc/i686-w64-mingw32/lib/libgcc_s.a ./ cd $PREFIX/x86_64-w64-mingw32/lib ln -s ../../lib/gcc/x86_64-w64-mingw32/lib/libgcc_s.a ./ echo "Building winpthreads " cd $DIR/source/mingw-w64-v3.1.0/mingw-w64-libraries/winpthreads echo "1/2 32-Bit " mkdir build cd build ../configure --host=i686-w64-mingw32 --prefix=$PREFIX/i686-w64-mingw32 make make install-strip cd .. rm -rf build echo "2/2 64-Bit " mkdir build cd build ../configure --host=x86_64-w64-mingw32 --prefix=$PREFIX/x86_64-w64-mingw32 make make install-strip echo "Cleaning up " cd $DIR rm -rf source echo "Done"
uninstall-macports.sh
#!/bin/bash sudo rm -rvf /opt/local /Applications/DarwinPorts /Applications/MacPorts /Library/LaunchDaemons/org.macports.* /Library/Receipts/DarwinPorts*.pkg /Library/Receipts/MacPorts*.pkg /Library/StartupItems/DarwinPortsStartup /Library/Tcl/darwinports1.0 /Library/Tcl/macports1.0 ~/.macports