Tuesday, August 23, 2016

Compiling Git in Native MinGW-w64

** using gcc-5.3.0 mingw-builds **
** using gcc-5.3.1 dongsheng build **

export CPPFLAGS="-Ic:/programs/dev/git-w64/include"
export LDFLAGS="-Lc:/programs/dev/git-w64/lib"
export PATH="$PATH:/c/programs/git/bin:/c/programs/dev/git-w64/bin"
export PKG_CONFIG_PATH="/c/programs/dev/git-w64/lib/pkgconfig"
export PERL_PATH="c:/programs/perl/bin/perl.exe"

----------


libiconv-1.14
http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.14.tar.gz

cd libiconv-1.14
./configure --prefix=c:/programs/dev/git-w64 --build=x86_64-w64-mingw32 --disable-static
make
make install


pcre-8.39
ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.39.tar.bz2

cd pcre-8.39
./configure --prefix=c:/programs/dev/git-w64 --build=x86_64-w64-mingw32 \
--enable-utf8 --enable-newline-is-anycrlf --disable-cpp --disable-static
make
make install


openssl-1.0.2h
http://www.openssl.org/source/openssl-1.0.2h.tar.gz
patch: openssl-1.0.2h_mingw.diff

cd openssl-1.0.2h
./configure --prefix=c:/programs/dev/git-w64 mingw64 no-zlib no-asm shared
sed -i 's# libcrypto.a##;s# libssl.a##' Makefile
make
make install


libssh2-1.7.0
http://www.libssh2.org/download/libssh2-1.7.0.tar.gz
deps: openssl

cd libssh2-1.7.0
./configure --prefix=c:/programs/dev/git-w64 --build=x86_64-w64-mingw32 \
--disable-examples-build --disable-static
make
make install


curl-7.50.1
http://curl.haxx.se/download/curl-7.50.1.tar.lzma
patch: curl-7.50.1_mingw.diff

cd curl-7.50.1
./configure --prefix=c:/programs/dev/git-w64 --build=x86_64-w64-mingw32 --without-zlib --disable-static
make V=1
make install


expat-2.2.0
http://sourceforge.net/projects/expat/files/expat/2.2.0/expat-2.2.0.tar.gz/download

cd expat-2.2.0
./configure --prefix=c:/programs/dev/git-w64 --build=x86_64-w64-mingw32 --disable-static
make
make install


tcl8.6.5
https://sourceforge.net/projects/tcl/files/Tcl/8.6.5/tcl-core8.6.5-src.tar.gz/download
patch: tcl8.6.5_mingw.diff

cd tcl8.6.5/win
./configure --prefix=c:/programs/dev/git-w64 --build=x86_64-w64-mingw32 --enable-64bit
make
make install
mv c:/programs/dev/git-w64/bin/tclsh*.exe c:/programs/dev/git-w64/bin/tclsh.exe


tk8.6.5
https://sourceforge.net/projects/tcl/files/Tcl/8.6.5/tk8.6.5-src.tar.gz/download
patch: tk8.6.5_mingw.diff

cd tk8.6.5/win
./configure --prefix=c:/programs/dev/git-w64 --build=x86_64-w64-mingw32 --enable-64bit
make
make install
mv c:/programs/dev/git-w64/bin/wish*.exe c:/programs/dev/git-w64/bin/wish.exe


zlib-1.2.8
http://zlib.net/zlib-1.2.8.tar.bz2

cd zlib-1.2.8
make -f win32/Makefile.gcc
cp -p zlib1.dll c:/programs/dev/git-w64/bin
cp -p zlib.h zconf.h c:/programs/dev/git-w64/include
cp -p libz.dll.a c:/programs/dev/git-w64/lib


git-2.9.3
https://www.kernel.org/pub/software/scm/git/git-2.9.3.tar.xz
patch: git-2.9.3-1_mingw.diff

cd git-2.9.3
./configure --prefix=/c/programs/git --build=x86_64-w64-mingw32
make V=1 strip
make install

----------

Downloads:

Git-2.9.3-1-shared-mingw-x86_64.7z
Git-2.9.3-1-static-mingw-x86_64.7z

Git-2.9.3-1-shared-mingw-i686.7z

No comments:

Post a Comment