summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTony Theodore <tonyt@logyst.com>2018-05-28 05:18:46 (GMT)
committerTony Theodore <tonyt@logyst.com>2018-05-28 05:18:46 (GMT)
commit8a11ae670f9e447985a7650d9e56cc32ea00cb5b (patch)
treeca1a0942e0d8e68964a12de3cb5cf6595cc7433c
parentcbea32e9829c6e7870bc3e064f8287adcf2f6b52 (diff)
downloadmxe-8a11ae670f9e447985a7650d9e56cc32ea00cb5b.zip
mxe-8a11ae670f9e447985a7650d9e56cc32ea00cb5b.tar.gz
mxe-8a11ae670f9e447985a7650d9e56cc32ea00cb5b.tar.bz2
tcl/tk: use external zlib
closes #2130
-rw-r--r--plugins/tcl.tk/tcl.mk2
-rw-r--r--plugins/tcl.tk/tk-1-fixes.patch22
-rw-r--r--src/tcl-1-fixes.patch95
3 files changed, 118 insertions, 1 deletions
diff --git a/plugins/tcl.tk/tcl.mk b/plugins/tcl.tk/tcl.mk
index b46ee0a..89b2434 100644
--- a/plugins/tcl.tk/tcl.mk
+++ b/plugins/tcl.tk/tcl.mk
@@ -2,4 +2,4 @@
PKG := tcl
$(PKG)_TARGETS := $(BUILD) $(MXE_TARGETS)
-$(PKG)_DEPS := cc zlib
+$(PKG)_DEPS := cc zlib $(BUILD)~$(PKG)
diff --git a/plugins/tcl.tk/tk-1-fixes.patch b/plugins/tcl.tk/tk-1-fixes.patch
new file mode 100644
index 0000000..6f6e8de
--- /dev/null
+++ b/plugins/tcl.tk/tk-1-fixes.patch
@@ -0,0 +1,22 @@
+This file is part of MXE. See LICENSE.md for licensing information.
+
+Contains ad hoc patches for cross building.
+
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Tony Theodore <tonyt@logyst.com>
+Date: Mon, 28 May 2018 15:14:50 +1000
+Subject: [PATCH 1/1] search for zlib
+
+
+diff --git a/win/configure.in b/win/configure.in
+index 1111111..2222222 100644
+--- a/win/configure.in
++++ b/win/configure.in
+@@ -222,6 +222,7 @@ case "$TK_PATCH_LEVEL" in
+ *) TK_RELEASE_LEVEL=2 ;;
+ esac
+ TK_WIN_VERSION="$TK_VERSION.$TK_RELEASE_LEVEL.`echo $TK_PATCH_LEVEL | tr -d ab.`"
++AC_SEARCH_LIBS(zlibVersion, z)
+ AC_SUBST(TK_WIN_VERSION)
+ # X86|AMD64|IA64 for manifest
+ AC_SUBST(MACHINE)
diff --git a/src/tcl-1-fixes.patch b/src/tcl-1-fixes.patch
new file mode 100644
index 0000000..cda704a
--- /dev/null
+++ b/src/tcl-1-fixes.patch
@@ -0,0 +1,95 @@
+This file is part of MXE. See LICENSE.md for licensing information.
+
+Contains ad hoc patches for cross building.
+
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Tony Theodore <tonyt@logyst.com>
+Date: Mon, 28 May 2018 13:00:57 +1000
+Subject: [PATCH 1/1] tcl: remove bundled zlib
+
+see: https://github.com/mxe/mxe/issues/2130
+
+diff --git a/win/Makefile.in b/win/Makefile.in
+index 1111111..2222222 100644
+--- a/win/Makefile.in
++++ b/win/Makefile.in
+@@ -139,9 +139,8 @@ REG_DLL_FILE = tclreg$(REGVER)${DLLSUFFIX}
+ REG_LIB_FILE = @LIBPREFIX@tclreg$(REGVER)${LIBSUFFIX}
+ TEST_DLL_FILE = tcltest$(VER)${DLLSUFFIX}
+ TEST_LIB_FILE = @LIBPREFIX@tcltest$(VER)${LIBSUFFIX}
+-ZLIB_DLL_FILE = zlib1.dll
+
+-SHARED_LIBRARIES = $(TCL_DLL_FILE) @ZLIB_DLL_FILE@
++SHARED_LIBRARIES = $(TCL_DLL_FILE)
+ STATIC_LIBRARIES = $(TCL_LIB_FILE)
+
+ TCLSH = tclsh$(VER)${EXESUFFIX}
+@@ -404,7 +403,7 @@ ZLIB_OBJS = \
+ uncompr.$(OBJEXT) \
+ zutil.$(OBJEXT)
+
+-TCL_OBJS = ${GENERIC_OBJS} $(TOMMATH_OBJS) ${WIN_OBJS} @ZLIB_OBJS@
++TCL_OBJS = ${GENERIC_OBJS} $(TOMMATH_OBJS) ${WIN_OBJS}
+
+ TCL_DOCS = "$(ROOT_DIR_NATIVE)"/doc/*.[13n]
+
+@@ -437,7 +436,7 @@ ${TCL_STUB_LIB_FILE}: ${STUB_OBJS}
+ @MAKE_STUB_LIB@ ${STUB_OBJS}
+ @POST_MAKE_LIB@
+
+-${TCL_DLL_FILE}: ${TCL_OBJS} tcl.$(RES) @ZLIB_DLL_FILE@
++${TCL_DLL_FILE}: ${TCL_OBJS} tcl.$(RES)
+ @$(RM) ${TCL_DLL_FILE} $(TCL_LIB_FILE)
+ @MAKE_DLL@ ${TCL_OBJS} tcl.$(RES) $(SHLIB_LD_LIBS)
+ @VC_MANIFEST_EMBED_DLL@
+@@ -457,14 +456,6 @@ ${TEST_DLL_FILE}: ${TCL_STUB_LIB_FILE} ${TCLTEST_OBJS}
+ @$(RM) ${TEST_DLL_FILE} ${TEST_LIB_FILE}
+ @MAKE_DLL@ ${TCLTEST_OBJS} $(TCL_STUB_LIB_FILE) $(SHLIB_LD_LIBS)
+
+-# use pre-built zlib1.dll
+-${ZLIB_DLL_FILE}: ${TCL_STUB_LIB_FILE}
+- @if test "@ZLIB_LIBS@set" != "${ZLIB_DIR}/win32/zdll.libset" ; then \
+- $(COPY) $(ZLIB_DIR)/win64/${ZLIB_DLL_FILE} ${ZLIB_DLL_FILE}; \
+- else \
+- $(COPY) $(ZLIB_DIR)/win32/${ZLIB_DLL_FILE} ${ZLIB_DLL_FILE}; \
+- fi;
+-
+ # Add the object extension to the implicit rules. By default .obj is not
+ # automatically added.
+
+@@ -570,7 +561,7 @@ install-binaries: binaries
+ else true; \
+ fi; \
+ done;
+- @for i in $(TCL_DLL_FILE) $(ZLIB_DLL_FILE) $(TCLSH); \
++ @for i in $(TCL_DLL_FILE) $(TCLSH); \
+ do \
+ if [ -f $$i ]; then \
+ echo "Installing $$i to $(BIN_INSTALL_DIR)/"; \
+diff --git a/win/configure.in b/win/configure.in
+index 1111111..2222222 100644
+--- a/win/configure.in
++++ b/win/configure.in
+@@ -126,20 +126,8 @@ AS_IF([test "${enable_shared+set}" = "set"], [
+ ], [
+ tcl_ok=yes
+ ])
+-AS_IF([test "$tcl_ok" = "yes"], [
+- AC_SUBST(ZLIB_DLL_FILE,[\${ZLIB_DLL_FILE}])
+- AS_IF([test "$do64bit" = "yes"], [
+- AS_IF([test "$GCC" == "yes"],[
+- AC_SUBST(ZLIB_LIBS,[\${ZLIB_DIR}/win64/libz.dll.a])
+- ], [
+- AC_SUBST(ZLIB_LIBS,[\${ZLIB_DIR}/win64/zdll.lib])
+- ])
+- ], [
+- AC_SUBST(ZLIB_LIBS,[\${ZLIB_DIR}/win32/zdll.lib])
+- ])
+-], [
+- AC_SUBST(ZLIB_OBJS,[\${ZLIB_OBJS}])
+-])
++
++AC_SUBST(ZLIB_LIBS,[-lz])
+ AC_DEFINE(HAVE_ZLIB, 1, [Is there an installed zlib?])
+
+ AC_CHECK_TYPE([intptr_t], [