diff options
author | Michel Zou | 2016-11-28 19:23:22 +0100 |
---|---|---|
committer | Michel Zou | 2016-11-28 19:23:22 +0100 |
commit | 33458d2136bf802da12e21cc223a9c2c645c9cd1 (patch) | |
tree | 60c7444b427073a6d11f1b9f6df9070716348688 | |
download | aur-33458d2136bf802da12e21cc223a9c2c645c9cd1.tar.gz |
Initial import
-rw-r--r-- | .SRCINFO | 29 | ||||
-rw-r--r-- | PKGBUILD | 85 | ||||
-rw-r--r-- | tcl-8.5.14-autopath.patch | 56 | ||||
-rw-r--r-- | tcl-8.5.14-hidden.patch | 35 | ||||
-rw-r--r-- | tcl-8.6.1-mingwexcept.patch | 96 | ||||
-rw-r--r-- | tcl-mingw-w64-compatibility.patch | 20 |
6 files changed, 321 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..4c7b194e7982 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,29 @@ +# Generated by mksrcinfo v8 +# Mon Nov 28 18:23:22 UTC 2016 +pkgbase = mingw-w64-tcl + pkgdesc = The Tcl scripting language (mingw-w64) + pkgver = 8.6.1 + pkgrel = 5 + url = http://tcl.sourceforge.net + arch = any + license = custom + makedepends = mingw-w64-gcc + makedepends = tcl + depends = mingw-w64-crt + depends = mingw-w64-zlib + options = staticlibs + options = !strip + options = !buildflags + source = http://downloads.sourceforge.net/sourceforge/tcl/tcl8.6.1-src.tar.gz + source = tcl-8.5.14-autopath.patch + source = tcl-8.5.14-hidden.patch + source = tcl-8.6.1-mingwexcept.patch + source = tcl-mingw-w64-compatibility.patch + sha256sums = 16ee769248e64ba1cae6b4834fcc4e4edd7470d881410e8d58f7dd1434343514 + sha256sums = 3cb435f768052acabe5b1fbef5ae9a8d0967b0f86f7695fb4bae8953ee470357 + sha256sums = a809617939336a0068c5dd567f2c25489b2824ca25ad20f9cbf4e74c81396d2e + sha256sums = 77b7509f3677fe659a70994f664444c1f0e99899bd3e73cba71caa4ccb24ebd4 + sha256sums = 866fe923b7d43339bea8a8484299ba71ebdb3a7213508809f2adae4eff60a382 + +pkgname = mingw-w64-tcl + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..a0c58b9aa444 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,85 @@ +pkgname=mingw-w64-tcl +pkgver=8.6.1 +pkgrel=5 +pkgdesc="The Tcl scripting language (mingw-w64)" +arch=(any) +depends=(mingw-w64-crt mingw-w64-zlib) +makedepends=(mingw-w64-gcc tcl) +options=(staticlibs !strip !buildflags) +license=("custom") +url="http://tcl.sourceforge.net" +source=("http://downloads.sourceforge.net/sourceforge/tcl/tcl${pkgver}-src.tar.gz" +"tcl-8.5.14-autopath.patch" +"tcl-8.5.14-hidden.patch" +"tcl-8.6.1-mingwexcept.patch" +"tcl-mingw-w64-compatibility.patch") +sha256sums=('16ee769248e64ba1cae6b4834fcc4e4edd7470d881410e8d58f7dd1434343514' + '3cb435f768052acabe5b1fbef5ae9a8d0967b0f86f7695fb4bae8953ee470357' + 'a809617939336a0068c5dd567f2c25489b2824ca25ad20f9cbf4e74c81396d2e' + '77b7509f3677fe659a70994f664444c1f0e99899bd3e73cba71caa4ccb24ebd4' + '866fe923b7d43339bea8a8484299ba71ebdb3a7213508809f2adae4eff60a382') + +_architectures="i686-w64-mingw32 x86_64-w64-mingw32" + +prepare() { + cd "${srcdir}/tcl${pkgver}" + patch -Np1 -i "${srcdir}/tcl-8.5.14-autopath.patch" + patch -Np1 -i "${srcdir}/tcl-8.5.14-hidden.patch" + patch -Np1 -i "${srcdir}/tcl-8.6.1-mingwexcept.patch" + patch -Np0 -i "${srcdir}/tcl-mingw-w64-compatibility.patch" +} + +build() { + for _arch in ${_architectures}; do + unset LDFLAGS + mkdir -p "${srcdir}/${pkgname}-${pkgver}-build-${_arch}" + cp -r "$srcdir/tcl$pkgver/"* "${srcdir}/${pkgname}-${pkgver}-build-${_arch}/" + cd "${srcdir}/${pkgname}-${pkgver}-build-${_arch}" + [ "${_arch}" = 'x86_64-w64-mingw32' ] && enable64bit='--enable-64bit' + "${srcdir}"/${pkgname#mingw-w64-}${pkgver}/win/configure \ + --prefix=/usr/${_arch} \ + --build=$CHOST \ + --host=${_arch} $enable64bit + make + done +} + +package() { + for _arch in ${_architectures}; do + cd "${srcdir}/${pkgname}-${pkgver}-build-${_arch}" + make -j1 install INSTALL_ROOT="$pkgdir" + rm "$pkgdir/usr/${_arch}/bin/zlib1.dll" + find "$pkgdir/usr/${_arch}" -name '*.exe' -o -name '*.bat' -o -name '*.def' -o -name '*.exp' | xargs -rtl1 rm + find "$pkgdir/usr/${_arch}" -name '*.dll' | xargs -rtl1 ${_arch}-strip --strip-unneeded + find "$pkgdir/usr/${_arch}" -name '*.a' -o -name '*.dll' | xargs -rtl1 ${_arch}-strip -g + find "$pkgdir/usr/${_arch}" -name '*.sh' | xargs -rtl1 chmod 755 + find "$pkgdir/usr/${_arch}" -name '*.sh' | xargs -rtl1 sed -i "s,libtcl86.a,libtcl86.dll.a,g" + rm -r "$pkgdir/usr/${_arch}/"{man,share} + sed -e "s#${srcdir}/tcl${pkgver}/win#/usr/lib#" \ + -e "s#${srcdir}/tcl${pkgver}#/usr/${_arch}/include/tcl-private#" \ + -i "${pkgdir}/usr/${_arch}/lib/tclConfig.sh" + sed -e "s#${srcdir}/tcl${pkgver}/win/pkgs/tdbc1.0.0#/usr/${_arch}/lib/tdbc1.0.0#" \ + -e "s#${srcdir}/tcl${pkgver}/pkgs/tdbc1.0.0/generic#/usr/${_arch}/include#" \ + -e "s#${srcdir}/tcl${pkgver}/pkgs/tdbc1.0.0/library#/usr/${_arch}/lib/tcl${pkgver%.*}#" \ + -e "s#${srcdir}/tcl${pkgver}/pkgs/tdbc1.0.0#/usr/${_arch}/include#" \ + -i "${pkgdir}/usr/${_arch}/lib/tdbc1.0.0/tdbcConfig.sh" + sed -e "s#${srcdir}/tcl${pkgver}/win/pkgs/itcl4.0.0#/usr/${_arch}/lib/itcl4.0.0#" \ + -e "s#${srcdir}/tcl${pkgver}/pkgs/itcl4.0.0/generic#/usr/${_arch}/include/tcl-private#" \ + -e "s#${srcdir}/tcl${pkgver}/pkgs/itcl4.0.0#/usr/${_arch}/include/tcl-private#" \ + -i "${pkgdir}/usr/${_arch}/lib/itcl4.0.0/itclConfig.sh" + mv "$pkgdir/usr/${_arch}/lib/libtcl86.a" "$pkgdir/usr/${_arch}/lib/libtcl86.dll.a" + ln -s "/usr/${_arch}/lib/libtcl86.dll.a" "$pkgdir/usr/${_arch}/lib/libtcl.dll.a" + ln -s /usr/${_arch}/lib/tclConfig.sh "${pkgdir}/usr/${_arch}/lib/tcl${pkgver%.*.*}/tclConfig.sh" + mkdir -p "${pkgdir}/usr/${_arch}/include/tcl-private/"{generic,win} + find generic win -name "*.h" -exec cp -p '{}' "${pkgdir}"/usr/${_arch}/include/tcl-private/'{}' ';' + ( cd "${pkgdir}/usr/${_arch}/include" + for i in *.h ; do + [ -f "${pkgdir}/usr/${_arch}/include/tcl-private/generic/$i" ] && ln -sf ../../$i "${pkgdir}/usr/${_arch}/include/tcl-private/generic" ; + done + ) || true + chmod a-x "${pkgdir}/usr/${_arch}/lib/tcl${pkgver%.*}/encoding/"*.enc + chmod a-x "${pkgdir}/usr/${_arch}/lib/"*/pkgIndex.tcl + done +} + +# vim:set ts=2 sw=2 et: diff --git a/tcl-8.5.14-autopath.patch b/tcl-8.5.14-autopath.patch new file mode 100644 index 000000000000..cad89f072cfa --- /dev/null +++ b/tcl-8.5.14-autopath.patch @@ -0,0 +1,56 @@ +diff --git a/library/auto.tcl b/library/auto.tcl +index f7cf5f0..feb0a22 100644 +--- a/library/auto.tcl ++++ b/library/auto.tcl +@@ -84,6 +84,13 @@ proc tcl_findLibrary {basename version patch initScript enVarName varName} { + lappend dirs $value + } + ++ # 2a. As a sibling of Tcl's script directory ++ if {[catch { ++ ::tcl::pkgconfig get scriptdir,runtime ++ } value] == 0} { ++ lappend dirs [file join [file dirname $value] $basename$version] ++ } ++ + # 3. Relative to auto_path directories. This checks relative to the + # Tcl library as well as allowing loading of libraries added to the + # auto_path that is not relative to the core library or binary paths. +diff --git a/library/init.tcl b/library/init.tcl +index 071e6df..7713d3e 100644 +--- a/library/init.tcl ++++ b/library/init.tcl +@@ -47,16 +47,11 @@ if {![info exists auto_path]} { + } + namespace eval tcl { + variable Dir +- foreach Dir [list $::tcl_library [file dirname $::tcl_library]] { ++ foreach Dir [list $::tcl_library] { + if {$Dir ni $::auto_path} { + lappend ::auto_path $Dir + } + } +- set Dir [file join [file dirname [file dirname \ +- [info nameofexecutable]]] lib] +- if {$Dir ni $::auto_path} { +- lappend ::auto_path $Dir +- } + catch { + foreach Dir $::tcl_pkgPath { + if {$Dir ni $::auto_path} { +diff --git a/unix/configure.in b/unix/configure.in +index e22a7d3..658b3ed 100755 +--- a/unix/configure.in ++++ b/unix/configure.in +@@ -840,9 +840,9 @@ if test "$FRAMEWORK_BUILD" = "1" ; then + test -z "$TCL_MODULE_PATH" && \ + TCL_MODULE_PATH="~/Library/Tcl /Library/Tcl /System/Library/Tcl" + elif test "$prefix/lib" != "$libdir"; then +- TCL_PACKAGE_PATH="${libdir} ${prefix}/lib ${TCL_PACKAGE_PATH}" ++ TCL_PACKAGE_PATH="${libdir}/tcl8.5 ${prefix}/share/tcl8.5 ${libdir}/tk8.5 ${prefix}/share/tk8.5 ${TCL_PACKAGE_PATH}" + else +- TCL_PACKAGE_PATH="${prefix}/lib ${TCL_PACKAGE_PATH}" ++ TCL_PACKAGE_PATH="${libdir}/tcl8.5 ${prefix}/share/tcl8.5 ${libdir}/tk8.5 ${prefix}/share/tk8.5 ${TCL_PACKAGE_PATH}" + fi + + #-------------------------------------------------------------------- diff --git a/tcl-8.5.14-hidden.patch b/tcl-8.5.14-hidden.patch new file mode 100644 index 000000000000..aa977d03a0fe --- /dev/null +++ b/tcl-8.5.14-hidden.patch @@ -0,0 +1,35 @@ +diff --git a/generic/tclInt.h b/generic/tclInt.h +index 92251fe..b79edf6 100644 +--- a/generic/tclInt.h ++++ b/generic/tclInt.h +@@ -2807,7 +2807,7 @@ MODULE_SCOPE void TclClockInit(Tcl_Interp *interp); + MODULE_SCOPE int TclClockOldscanObjCmd( + ClientData clientData, Tcl_Interp *interp, + int objc, Tcl_Obj *const objv[]); +-MODULE_SCOPE int Tcl_CloseObjCmd(ClientData clientData, ++extern int Tcl_CloseObjCmd(ClientData clientData, + Tcl_Interp *interp, int objc, + Tcl_Obj *const objv[]); + MODULE_SCOPE int Tcl_ConcatObjCmd(ClientData clientData, +@@ -2968,7 +2968,7 @@ MODULE_SCOPE int Tcl_RegsubObjCmd(ClientData clientData, + MODULE_SCOPE int Tcl_RenameObjCmd(ClientData clientData, + Tcl_Interp *interp, int objc, + Tcl_Obj *const objv[]); +-MODULE_SCOPE int Tcl_ReturnObjCmd(ClientData clientData, ++extern int Tcl_ReturnObjCmd(ClientData clientData, + Tcl_Interp *interp, int objc, + Tcl_Obj *const objv[]); + MODULE_SCOPE int Tcl_ScanObjCmd(ClientData clientData, +diff --git a/generic/tclPort.h b/generic/tclPort.h +index 12a60db..d817154 100644 +--- a/generic/tclPort.h ++++ b/generic/tclPort.h +@@ -20,7 +20,7 @@ + #if defined(_WIN32) + # include "tclWinPort.h" + #else +-# include "tclUnixPort.h" ++# include "../unix/tclUnixPort.h" + #endif + #include "tcl.h" + diff --git a/tcl-8.6.1-mingwexcept.patch b/tcl-8.6.1-mingwexcept.patch new file mode 100644 index 000000000000..caae51f9414a --- /dev/null +++ b/tcl-8.6.1-mingwexcept.patch @@ -0,0 +1,96 @@ +--- tcl8.6.1/win/tclWin32Dll.c.orig 2013-09-28 21:38:26.071200000 +0400 ++++ tcl8.6.1/win/tclWin32Dll.c 2013-09-28 21:39:18.627600000 +0400 +@@ -32,14 +32,14 @@ + * them by creating an EXCEPTION_REGISTRATION within the activation record. + */ + +-typedef struct EXCEPTION_REGISTRATION { +- struct EXCEPTION_REGISTRATION *link; ++typedef struct TCL_EXCEPTION_REGISTRATION { ++ struct TCL_EXCEPTION_REGISTRATION *link; + EXCEPTION_DISPOSITION (*handler)( + struct _EXCEPTION_RECORD*, void*, struct _CONTEXT*, void*); + void *ebp; + void *esp; + int status; +-} EXCEPTION_REGISTRATION; ++} TCL_EXCEPTION_REGISTRATION; + #endif + + /* +@@ -662,7 +662,7 @@ + + # else + +- EXCEPTION_REGISTRATION registration; ++ TCL_EXCEPTION_REGISTRATION registration; + + /* + * Execute the CPUID instruction with the given index, and store results +--- tcl8.6.1/win/tclWinChan.c.orig 2013-09-28 21:39:55.755600000 +0400 ++++ tcl8.6.1/win/tclWinChan.c 2013-09-28 21:40:14.647200000 +0400 +@@ -127,14 +127,14 @@ + * them by creating an EXCEPTION_REGISTRATION within the activation record. + */ + +-typedef struct EXCEPTION_REGISTRATION { +- struct EXCEPTION_REGISTRATION *link; ++typedef struct TCL_EXCEPTION_REGISTRATION { ++ struct TCL_EXCEPTION_REGISTRATION *link; + EXCEPTION_DISPOSITION (*handler)( + struct _EXCEPTION_RECORD*, void*, struct _CONTEXT*, void*); + void *ebp; + void *esp; + int status; +-} EXCEPTION_REGISTRATION; ++} TCL_EXCEPTION_REGISTRATION; + #endif + + /* +@@ -1030,7 +1030,7 @@ + * TCL_WRITABLE to indicate file mode. */ + { + #if defined(HAVE_NO_SEH) && !defined(_WIN64) +- EXCEPTION_REGISTRATION registration; ++ TCL_EXCEPTION_REGISTRATION registration; + #endif + char channelName[16 + TCL_INTEGER_SPACE]; + Tcl_Channel channel = NULL; +--- tcl8.6.1/win/tclWinFCmd.c.orig 2013-09-28 21:45:10.719600000 +0400 ++++ tcl8.6.1/win/tclWinFCmd.c 2013-09-28 21:47:12.150000000 +0400 +@@ -75,14 +75,14 @@ + * them by creating an EXCEPTION_REGISTRATION within the activation record. + */ + +-typedef struct EXCEPTION_REGISTRATION { +- struct EXCEPTION_REGISTRATION *link; ++typedef struct TCL_EXCEPTION_REGISTRATION { ++ struct TCL_EXCEPTION_REGISTRATION *link; + EXCEPTION_DISPOSITION (*handler)( + struct _EXCEPTION_RECORD *, void *, struct _CONTEXT *, void *); + void *ebp; + void *esp; + int status; +-} EXCEPTION_REGISTRATION; ++} TCL_EXCEPTION_REGISTRATION; + + #endif + +@@ -176,7 +176,7 @@ + * (native). */ + { + #if defined(HAVE_NO_SEH) && !defined(_WIN64) +- EXCEPTION_REGISTRATION registration; ++ TCL_EXCEPTION_REGISTRATION registration; + #endif + DWORD srcAttr, dstAttr; + int retval = -1; +@@ -563,7 +563,7 @@ + const TCHAR *nativeDst) /* Pathname of file to copy to (native). */ + { + #if defined(HAVE_NO_SEH) && !defined(_WIN64) +- EXCEPTION_REGISTRATION registration; ++ TCL_EXCEPTION_REGISTRATION registration; + #endif + int retval = -1; + diff --git a/tcl-mingw-w64-compatibility.patch b/tcl-mingw-w64-compatibility.patch new file mode 100644 index 000000000000..76a864349e26 --- /dev/null +++ b/tcl-mingw-w64-compatibility.patch @@ -0,0 +1,20 @@ +--- generic/tclPosixStr.c.orig 2011-04-16 14:15:17.040226044 +0200 ++++ generic/tclPosixStr.c 2011-04-16 14:16:16.798302930 +0200 +@@ -337,7 +337,7 @@ + #if defined(EOPNOTSUPP) && (!defined(ENOTSUP) || (ENOTSUP != EOPNOTSUPP)) + case EOPNOTSUPP: return "EOPNOTSUPP"; + #endif +-#if defined(EOVERFLOW) && (!defined(EFBIG) || (EOVERFLOW != EFBIG)) && (!defined(EINVAL) || (EOVERFLOW != EINVAL)) ++#if defined(EOVERFLOW) && (!defined(EFBIG) || (EOVERFLOW != EFBIG)) && (!defined(EINVAL) || (EOVERFLOW != EINVAL)) && !defined(E2BIG) + case EOVERFLOW: return "EOVERFLOW"; + #endif + #ifdef EPERM +@@ -785,7 +785,7 @@ + #if defined(EOPNOTSUPP) && (!defined(ENOTSUP) || (ENOTSUP != EOPNOTSUPP)) + case EOPNOTSUPP: return "operation not supported on socket"; + #endif +-#if defined(EOVERFLOW) && (!defined(EFBIG) || (EOVERFLOW != EFBIG)) && (!defined(EINVAL) || (EOVERFLOW != EINVAL)) ++#if defined(EOVERFLOW) && (!defined(EFBIG) || (EOVERFLOW != EFBIG)) && (!defined(EINVAL) || (EOVERFLOW != EINVAL)) && !defined(E2BIG) + case EOVERFLOW: return "file too big"; + #endif + #ifdef EPERM |