ADDED tk/patches/all/tk-8.6-fix-shobjidl-bug2a70627a03.diff Index: tk/patches/all/tk-8.6-fix-shobjidl-bug2a70627a03.diff ================================================================== --- /dev/null +++ tk/patches/all/tk-8.6-fix-shobjidl-bug2a70627a03.diff @@ -0,0 +1,11 @@ +diff -u tk.orig/win/tkWinDialog.c tk.fixed/win/tkWinDialog.c +--- tk.orig/win/tkWinDialog.c 2015-03-26 11:59:50 -0700 ++++ tk.fixed/win/tkWinDialog.c 2015-03-26 12:00:02 -0700 +@@ -18,7 +18,6 @@ + #include /* includes the common dialog error codes */ + + #include /* includes SHBrowseForFolder */ +-#include + + #ifdef _MSC_VER + # pragma comment (lib, "shell32.lib") Index: zlib/build.sh ================================================================== --- zlib/build.sh +++ zlib/build.sh @@ -42,32 +42,47 @@ ( cd 'build' || exit 1 if [ ! -d '../buildsrc' ]; then gzip -dc "../${SRC}" | tar -xf - - else + else cp -rp ../buildsrc/* './' fi cd "${BUILDDIR}" || exit 1 - # If we are building for KitDLL, compile with '-fPIC' - if [ "${KITTARGET}" = "kitdll" ]; then - CFLAGS="${CFLAGS} -fPIC" - export CFLAGS - fi - - # We don't pass CONFIGUREEXTRA here, since this isn't a GNU autoconf - # script and will puke - echo "Running: ./configure --prefix=\"${INSTDIR}\" --libdir=\"${INSTDIR}/lib\" --static" - ./configure --prefix="${INSTDIR}" --libdir="${INSTDIR}/lib" --static - - echo "Running: ${MAKE:-make}" - ${MAKE:-make} || exit 1 - - echo "Running: ${MAKE:-make} install" - ${MAKE:-make} install + case $(uname -s 2> /dev/null) in + MINGW* | mingw*) + # use win32/Makefile.gcc instead. + echo "Running: cp win32/Makefile.gcc Makefile" + cp win32/Makefile.gcc Makefile + + echo "Running: ${MAKE:-make}" + ${MAKE:-make} || exit 1 + + echo "Running: BINARY_PATH=${INSTDIR}/bin INCLUDE_PATH=${INSTDIR}/include LIBRARY_PATH=${INSTDIR}/lib ${MAKE:-make} install" + BINARY_PATH=${INSTDIR}/bin INCLUDE_PATH=${INSTDIR}/include LIBRARY_PATH=${INSTDIR}/lib ${MAKE:-make} install + ;; + *) + # If we are building for KitDLL, compile with '-fPIC' + if [ "${KITTARGET}" = "kitdll" ]; then + CFLAGS="${CFLAGS} -fPIC" + export CFLAGS + fi + + # We don't pass CONFIGUREEXTRA here, since this isn't a GNU autoconf + # script and will puke + echo "Running: ./configure --prefix=\"${INSTDIR}\" --libdir=\"${INSTDIR}/lib\" --static" + ./configure --prefix="${INSTDIR}" --libdir="${INSTDIR}/lib" --static + + echo "Running: ${MAKE:-make}" + ${MAKE:-make} || exit 1 + + echo "Running: ${MAKE:-make} install" + ${MAKE:-make} install + ;; + esac # We don't really care too much about failure in zlib exit 0 ) || exit 1