Index: lmdb/build.sh ================================================================== --- lmdb/build.sh +++ lmdb/build.sh @@ -6,10 +6,29 @@ url="https://github.com/ray2501/tcl-lmdb/archive/${version}.tar.gz" sha256='d19a19376da6716a1ed159a918e631030491f8b6a4ef9e72a4221481b24b2e40' function postinstall() { local name + local isWindows + + # Windows-only + isWindows='false' + if [ "${KC_CROSSCOMPILE}" = '1' ]; then + case "${KC_CROSSCOMPILE_HOST_OS}" in + *-cygwin|*-mingw32|*-mingw32-*|*-cygwin-*) + isWindows='true' + ;; + esac + else + case "${OSTYPE}" in + msys|win*|cygwin) + isWindows='true' + ;; + esac + fi - find "${installdir}" -type -f -name '*.a' | while IFS='' read -r name; do - echo '-lntdll' > "${name}.linkadd" - done + if [ "${isWindows}" = 'true' ]; then + find "${installdir}" -type -f -name '*.a' | while IFS='' read -r name; do + echo '-lntdll' > "${name}.linkadd" + done + fi } ADDED lmdb/patches/tcl-lmdb-0.4.0-fixrobust.diff Index: lmdb/patches/tcl-lmdb-0.4.0-fixrobust.diff ================================================================== --- /dev/null +++ lmdb/patches/tcl-lmdb-0.4.0-fixrobust.diff @@ -0,0 +1,21 @@ +diff --no-dereference -uNr tcl_lmdb-0.4.0.orig/Makefile.in tcl_lmdb-0.4.0-fixrobust/Makefile.in +--- tcl_lmdb-0.4.0.orig/Makefile.in 2018-06-22 10:17:46.000000000 -0500 ++++ tcl_lmdb-0.4.0-fixrobust/Makefile.in 2019-01-22 15:51:11.244784351 -0600 +@@ -149,17 +149,6 @@ + + PKG_CFLAGS = @PKG_CFLAGS@ + +-# Workaround for glibc pthread robust mutex support (glibc < 2.12) fix +-ifneq ("$(OS)","Windows_NT") +-UNAME_S := $(shell uname -s) +-ifeq ($(UNAME_S),Linux) +-GLIBCCHECK := $(shell expr `ldd --version | grep ^ldd | sed 's/^.* //g'` \< 2.12) +-ifeq "$(GLIBCCHECK)" "1" +- PKG_CFLAGS += -DMDB_USE_ROBUST=0 +-endif +-endif +-endif +- + # TCL_DEFS is not strictly need here, but if you remove it, then you + # must make sure that configure.ac checks for the necessary components + # that your library may use. TCL_DEFS can actually be a problem if