diff --git a/tcl/8.5.10-tea-m4.patch b/tcl/8.5.10-tea-m4.patch new file mode 100644 index 00000000..60dc7273 --- /dev/null +++ b/tcl/8.5.10-tea-m4.patch @@ -0,0 +1,12 @@ +For backwards compatibility + +--- origsrc/tcl8.5.10/tcl.m4 2011-10-24 20:47:16.878248200 -0500 ++++ src/tcl8.5.10/tcl.m4 2011-10-24 20:50:38.013444700 -0500 +@@ -3106,6 +3106,7 @@ AC_DEFUN([TEA_SETUP_COMPILER_CC], [ + + AC_PROG_CC + AC_PROG_CPP ++ AC_PROG_INSTALL + + #-------------------------------------------------------------------- + # Checks to see if the make program sets the $MAKE variable. diff --git a/tcl/8.5.18-cygwin-unix.patch b/tcl/8.5.18-cygwin-unix.patch new file mode 100644 index 00000000..89ecb79c --- /dev/null +++ b/tcl/8.5.18-cygwin-unix.patch @@ -0,0 +1,445 @@ +--- origsrc/tcl8.5.18/generic/tcl.h 2015-02-12 09:13:16.000000000 -0600 ++++ src/tcl8.5.18/generic/tcl.h 2015-05-19 22:35:19.683022300 -0500 +@@ -421,7 +421,7 @@ typedef unsigned TCL_WIDE_INT_TYPE Tcl_W + # else + typedef struct _stat32i64 Tcl_StatBuf; + # endif /* _MSC_VER < 1400 */ +-#elif defined(__CYGWIN__) ++#elif 0 //defined(__CYGWIN__) + typedef struct { + dev_t st_dev; + unsigned short st_ino; +--- origsrc/tcl8.5.18/generic/tclCmdAH.c 2015-02-12 09:13:16.000000000 -0600 ++++ src/tcl8.5.18/generic/tclCmdAH.c 2015-05-19 22:35:42.817460000 -0500 +@@ -995,7 +995,7 @@ Tcl_FileObjCmd( + * we always return 1. + */ + +-#if defined(__WIN32__) || defined(__CYGWIN__) ++#if defined(__WIN32__) // || defined(__CYGWIN__) + value = 1; + #else + value = (geteuid() == buf.st_uid); +--- origsrc/tcl8.5.18/generic/tclDecls.h 2015-03-06 09:13:58.000000000 -0600 ++++ src/tcl8.5.18/generic/tclDecls.h 2015-05-19 22:36:23.123078100 -0500 +@@ -6594,7 +6594,7 @@ extern TclStubs *tclStubsPtr; + Tcl_UpVar2(interp, frameName, varName, NULL, localName, flags) + + #if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) +-# if defined(__CYGWIN__) && defined(TCL_WIDE_INT_IS_LONG) ++# if 0 // defined(__CYGWIN__) && defined(TCL_WIDE_INT_IS_LONG) + /* On Cygwin64, long is 64-bit while on Win64 long is 32-bit. Therefore + * we have to make sure that all stub entries on Cygwin64 follow the + * Win64 signature. Cygwin64 stubbed extensions cannot use those stub +--- origsrc/tcl8.5.18/generic/tclEnv.c 2015-02-12 09:13:16.000000000 -0600 ++++ src/tcl8.5.18/generic/tclEnv.c 2015-05-19 22:36:42.854583700 -0500 +@@ -44,7 +44,7 @@ static void ReplaceString(const char *o + MODULE_SCOPE void TclSetEnv(const char *name, const char *value); + MODULE_SCOPE void TclUnsetEnv(const char *name); + +-#if defined(__CYGWIN__) ++#if 0 // defined(__CYGWIN__) + static void TclCygwinPutenv(char *string); + # define putenv TclCygwinPutenv + #endif +@@ -394,7 +394,7 @@ TclUnsetEnv( + * that no = should be included, and Windows requires it. + */ + +-#if defined(__WIN32__) || defined(__CYGWIN__) ++#if defined(__WIN32__) // || defined(__CYGWIN__) + string = ckalloc((unsigned) length+2); + memcpy(string, name, (size_t) length); + string[length] = '='; +@@ -688,7 +688,7 @@ TclFinalizeEnvironment(void) + } + } + +-#if defined(__CYGWIN__) ++#if 0 //defined(__CYGWIN__) + + /* + * When using cygwin, when an environment variable changes, we need to synch +--- origsrc/tcl8.5.18/generic/tclFCmd.c 2015-02-12 09:13:16.000000000 -0600 ++++ src/tcl8.5.18/generic/tclFCmd.c 2015-05-19 22:36:52.305283800 -0500 +@@ -526,7 +526,7 @@ CopyRenameOneFile( + * 16 bits and we get collisions. See bug #2015723. + */ + +-#if !defined(WIN32) && !defined(__CYGWIN__) ++#if !defined(WIN32) // && !defined(__CYGWIN__) + if ((sourceStatBuf.st_ino != 0) && (targetStatBuf.st_ino != 0)) { + if ((sourceStatBuf.st_ino == targetStatBuf.st_ino) && + (sourceStatBuf.st_dev == targetStatBuf.st_dev)) { +--- origsrc/tcl8.5.18/generic/tclIOSock.c 2015-02-12 09:13:16.000000000 -0600 ++++ src/tcl8.5.18/generic/tclIOSock.c 2015-05-19 22:39:09.757738100 -0500 +@@ -82,7 +82,7 @@ TclSockGetPort( + */ + + #undef TclSockMinimumBuffers +-#if !defined(_WIN32) && !defined(__CYGWIN__) ++#if !defined(_WIN32) // && !defined(__CYGWIN__) + # define SOCKET int + #endif + +--- origsrc/tcl8.5.18/generic/tclIntPlatDecls.h 2015-03-06 09:13:58.000000000 -0600 ++++ src/tcl8.5.18/generic/tclIntPlatDecls.h 2015-05-19 22:38:35.393374300 -0500 +@@ -45,7 +45,7 @@ extern "C" { + * Exported function declarations: + */ + +-#if !defined(__WIN32__) && !defined(__CYGWIN__) && !defined(MAC_OSX_TCL) /* UNIX */ ++#if !defined(__WIN32__) /* && !defined(__CYGWIN__) */ && !defined(MAC_OSX_TCL) /* UNIX */ + #ifndef TclGetAndDetachPids_TCL_DECLARED + #define TclGetAndDetachPids_TCL_DECLARED + /* 0 */ +@@ -145,7 +145,7 @@ EXTERN int TclUnixCopyFile(CONST char * + EXTERN int TclWinCPUID(unsigned int index, unsigned int *regs); + #endif + #endif /* UNIX */ +-#if defined(__WIN32__) || defined(__CYGWIN__) /* WIN */ ++#if defined(__WIN32__) /* || defined(__CYGWIN__) */ + #ifndef TclWinConvertError_TCL_DECLARED + #define TclWinConvertError_TCL_DECLARED + /* 0 */ +@@ -439,7 +439,7 @@ typedef struct TclIntPlatStubs { + int magic; + struct TclIntPlatStubHooks *hooks; + +-#if !defined(__WIN32__) && !defined(__CYGWIN__) && !defined(MAC_OSX_TCL) /* UNIX */ ++#if !defined(__WIN32__) /* && !defined(__CYGWIN__) */ && !defined(MAC_OSX_TCL) /* UNIX */ + void (*tclGetAndDetachPids) (Tcl_Interp *interp, Tcl_Channel chan); /* 0 */ + int (*tclpCloseFile) (TclFile file); /* 1 */ + Tcl_Channel (*tclpCreateCommandChannel) (TclFile readFile, TclFile writeFile, TclFile errorFile, int numPids, Tcl_Pid *pidPtr); /* 2 */ +@@ -471,7 +471,7 @@ typedef struct TclIntPlatStubs { + VOID *reserved28; + int (*tclWinCPUID) (unsigned int index, unsigned int *regs); /* 29 */ + #endif /* UNIX */ +-#if defined(__WIN32__) || defined(__CYGWIN__) /* WIN */ ++#if defined(__WIN32__) /* || defined(__CYGWIN__) */ + void (*tclWinConvertError) (DWORD errCode); /* 0 */ + void (*tclWinConvertWSAError) (DWORD errCode); /* 1 */ + struct servent * (*tclWinGetServByName) (CONST char *nm, CONST char *proto); /* 2 */ +@@ -549,7 +549,7 @@ extern TclIntPlatStubs *tclIntPlatStubsP + * Inline function declarations: + */ + +-#if !defined(__WIN32__) && !defined(__CYGWIN__) && !defined(MAC_OSX_TCL) /* UNIX */ ++#if !defined(__WIN32__) /* && !defined(__CYGWIN__) */ && !defined(MAC_OSX_TCL) /* UNIX */ + #ifndef TclGetAndDetachPids + #define TclGetAndDetachPids \ + (tclIntPlatStubsPtr->tclGetAndDetachPids) /* 0 */ +@@ -626,7 +626,7 @@ extern TclIntPlatStubs *tclIntPlatStubsP + (tclIntPlatStubsPtr->tclWinCPUID) /* 29 */ + #endif + #endif /* UNIX */ +-#if defined(__WIN32__) || defined(__CYGWIN__) /* WIN */ ++#if defined(__WIN32__) /* || defined(__CYGWIN__) */ + #ifndef TclWinConvertError + #define TclWinConvertError \ + (tclIntPlatStubsPtr->tclWinConvertError) /* 0 */ +--- origsrc/tcl8.5.18/generic/tclPlatDecls.h 2015-03-06 09:13:58.000000000 -0600 ++++ src/tcl8.5.18/generic/tclPlatDecls.h 2015-05-19 22:40:00.691205800 -0500 +@@ -25,7 +25,7 @@ + * TCHAR is needed here for win32, so if it is not defined yet do it here. + * This way, we don't need to include just for one define. + */ +-#if (defined(_WIN32) || defined(__CYGWIN__)) && !defined(_TCHAR_DEFINED) ++#if (defined(_WIN32) /* || defined(__CYGWIN__) */) && !defined(_TCHAR_DEFINED) + # if defined(_UNICODE) + typedef wchar_t TCHAR; + # else +@@ -44,7 +44,7 @@ extern "C" { + * Exported function declarations: + */ + +-#if defined(__WIN32__) || defined(__CYGWIN__) /* WIN */ ++#if defined(__WIN32__) /* || defined(__CYGWIN__) */ + #ifndef Tcl_WinUtfToTChar_TCL_DECLARED + #define Tcl_WinUtfToTChar_TCL_DECLARED + /* 0 */ +@@ -81,7 +81,7 @@ typedef struct TclPlatStubs { + int magic; + struct TclPlatStubHooks *hooks; + +-#if defined(__WIN32__) || defined(__CYGWIN__) /* WIN */ ++#if defined(__WIN32__) /* || defined(__CYGWIN__) */ + TCHAR * (*tcl_WinUtfToTChar) (CONST char *str, int len, Tcl_DString *dsPtr); /* 0 */ + char * (*tcl_WinTCharToUtf) (CONST TCHAR *str, int len, Tcl_DString *dsPtr); /* 1 */ + #endif /* WIN */ +@@ -103,7 +103,7 @@ extern TclPlatStubs *tclPlatStubsPtr; + * Inline function declarations: + */ + +-#if defined(__WIN32__) || defined(__CYGWIN__) /* WIN */ ++#if defined(__WIN32__) /* || defined(__CYGWIN__) */ + #ifndef Tcl_WinUtfToTChar + #define Tcl_WinUtfToTChar \ + (tclPlatStubsPtr->tcl_WinUtfToTChar) /* 0 */ +--- origsrc/tcl8.5.18/generic/tclStubInit.c 2015-03-06 09:13:58.000000000 -0600 ++++ src/tcl8.5.18/generic/tclStubInit.c 2015-05-19 22:40:52.285257400 -0500 +@@ -79,7 +79,7 @@ MODULE_SCOPE TclPlatStubs tclPlatStubs; + MODULE_SCOPE TclStubs tclStubs; + MODULE_SCOPE TclTomMathStubs tclTomMathStubs; + +-#if defined(_WIN32) || defined(__CYGWIN__) ++#if defined(_WIN32) // || defined(__CYGWIN__) + #undef TclWinNToHS + unsigned short TclWinNToHS(unsigned short ns) { + return ntohs(ns); +@@ -91,7 +91,7 @@ unsigned short TclWinNToHS(unsigned shor + # define TclUnixCopyFile 0 + # define TclpReaddir 0 + # define TclpIsAtty 0 +-#elif defined(__CYGWIN__) ++#elif 0 // defined(__CYGWIN__) + # define TclpIsAtty TclPlatIsAtty + # define TclWinSetInterfaces (void (*) (int)) doNothing + # define TclWinAddProcess (void (*) (void *, unsigned int)) doNothing +@@ -555,7 +555,7 @@ TclIntStubs tclIntStubs = { + TclIntPlatStubs tclIntPlatStubs = { + TCL_STUB_MAGIC, + NULL, +-#if !defined(__WIN32__) && !defined(__CYGWIN__) && !defined(MAC_OSX_TCL) /* UNIX */ ++#if !defined(__WIN32__) /* && !defined(__CYGWIN__) */ && !defined(MAC_OSX_TCL) /* UNIX */ + TclGetAndDetachPids, /* 0 */ + TclpCloseFile, /* 1 */ + TclpCreateCommandChannel, /* 2 */ +@@ -587,7 +587,7 @@ TclIntPlatStubs tclIntPlatStubs = { + NULL, /* 28 */ + TclWinCPUID, /* 29 */ + #endif /* UNIX */ +-#if defined(__WIN32__) || defined(__CYGWIN__) /* WIN */ ++#if defined(__WIN32__) /* || defined(__CYGWIN__) */ + TclWinConvertError, /* 0 */ + TclWinConvertWSAError, /* 1 */ + TclWinGetServByName, /* 2 */ +@@ -656,7 +656,7 @@ TclIntPlatStubs tclIntPlatStubs = { + TclPlatStubs tclPlatStubs = { + TCL_STUB_MAGIC, + NULL, +-#if defined(__WIN32__) || defined(__CYGWIN__) /* WIN */ ++#if defined(__WIN32__) /* || defined(__CYGWIN__) */ + Tcl_WinUtfToTChar, /* 0 */ + Tcl_WinTCharToUtf, /* 1 */ + #endif /* WIN */ +--- origsrc/tcl8.5.18/tools/genStubs.tcl 2015-02-12 09:13:16.000000000 -0600 ++++ src/tcl8.5.18/tools/genStubs.tcl 2015-05-19 22:41:29.396970000 -0500 +@@ -286,9 +286,6 @@ proc genStubs::addPlatformGuard {plat if + switch $plat { + win { + append text "#if defined(__WIN32__)" +- if {$withCygwin} { +- append text " || defined(__CYGWIN__)" +- } + append text " /* WIN */\n${iftxt}" + if {$eltxt ne ""} { + append text "#else /* WIN */\n${eltxt}" +@@ -297,9 +294,6 @@ proc genStubs::addPlatformGuard {plat if + } + unix { + append text "#if !defined(__WIN32__)" +- if {$withCygwin} { +- append text " && !defined(__CYGWIN__)" +- } + append text " && !defined(MAC_OSX_TCL)\ + /* UNIX */\n${iftxt}" + if {$eltxt ne ""} { +@@ -323,9 +317,6 @@ proc genStubs::addPlatformGuard {plat if + } + x11 { + append text "#if !(defined(__WIN32__)" +- if {$withCygwin} { +- append text " || defined(__CYGWIN__)" +- } + append text " || defined(MAC_OSX_TK))\ + /* X11 */\n${iftxt}" + if {$eltxt ne ""} { +--- origsrc/tcl8.5.18/unix/Makefile.in 2015-03-06 09:13:58.000000000 -0600 ++++ src/tcl8.5.18/unix/Makefile.in 2015-05-19 23:08:16.683069400 -0500 +@@ -559,9 +559,6 @@ ${LIB_FILE}: ${STUB_LIB_FILE} ${OBJS} + @MAKE_LIB@ + + ${STUB_LIB_FILE}: ${STUB_LIB_OBJS} +- @if test "x${LIB_FILE}" = "xlibtcl${MAJOR_VERSION}.${MINOR_VERSION}.dll"; then \ +- (cd ${TOP_DIR}/win; ${MAKE} libtclstub${MAJOR_VERSION}${MINOR_VERSION}.a); \ +- fi + rm -f $@ + @MAKE_STUB_LIB@ + +--- origsrc/tcl8.5.18/unix/tcl.m4 2015-03-06 09:13:58.000000000 -0600 ++++ src/tcl8.5.18/unix/tcl.m4 2015-05-19 23:13:24.931211900 -0500 +@@ -1236,7 +1236,20 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ + CC_SEARCH_FLAGS="" + LD_SEARCH_FLAGS="" + ;; +- CYGWIN_*|MINGW32*) ++ CYGWIN_*) ++ SHLIB_CFLAGS="" ++ SHLIB_LD='${CC} -shared' ++ SHLIB_SUFFIX=".dll" ++ DL_OBJS="tclLoadDl.o" ++ DL_LIBS="-ldl" ++ CC_SEARCH_FLAGS="" ++ LD_SEARCH_FLAGS="" ++ TCL_NEEDS_EXP_FILE=1 ++ TCL_EXPORT_FILE_SUFFIX='${VERSION}\$\{DBGX\}.dll.a' ++ SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -Wl,--out-implib,\$[@].a" ++ do64bit_ok=yes ++ ;; ++ MINGW32*) + SHLIB_CFLAGS="" + SHLIB_LD='${CC} -shared' + SHLIB_SUFFIX=".dll" +--- origsrc/tcl8.5.18/unix/tclUnixFile.c 2015-02-12 09:13:16.000000000 -0600 ++++ src/tcl8.5.18/unix/tclUnixFile.c 2015-05-19 22:43:33.426719800 -0500 +@@ -40,7 +40,7 @@ TclpFindExecutable( + * (native). */ + { + Tcl_Encoding encoding; +-#ifdef __CYGWIN__ ++#if 0 //def __CYGWIN__ + int length; + char buf[PATH_MAX * 2]; + char name[PATH_MAX * TCL_UTF_MAX + 1]; +@@ -1187,7 +1187,7 @@ TclpUtime( + { + return utime(Tcl_FSGetNativePath(pathPtr), tval); + } +-#ifdef __CYGWIN__ ++#if 0 //def __CYGWIN__ + int TclOSstat(const char *name, void *cygstat) { + struct stat buf; + Tcl_StatBuf *statBuf = cygstat; +--- origsrc/tcl8.5.18/unix/tclUnixInit.c 2015-03-06 08:13:07.000000000 -0600 ++++ src/tcl8.5.18/unix/tclUnixInit.c 2015-05-19 22:44:05.939848400 -0500 +@@ -32,7 +32,7 @@ + # endif + #endif + +-#ifdef __CYGWIN__ ++#if 0 //def __CYGWIN__ + DLLIMPORT extern __stdcall unsigned char GetVersionExW(void *); + DLLIMPORT extern __stdcall void *LoadLibraryW(const void *); + DLLIMPORT extern __stdcall void FreeLibrary(void *); +@@ -812,7 +812,7 @@ void + TclpSetVariables( + Tcl_Interp *interp) + { +-#ifdef __CYGWIN__ ++#if 0 //def __CYGWIN__ + SYSTEM_INFO sysInfo; + static OSVERSIONINFOW osInfo; + static int osInfoInitialized = 0; +@@ -926,7 +926,7 @@ TclpSetVariables( + #endif + + unameOK = 0; +-#ifdef __CYGWIN__ ++#if 0 //def __CYGWIN__ + unameOK = 1; + if (!osInfoInitialized) { + HANDLE handle = LoadLibraryW(L"NTDLL"); +--- origsrc/tcl8.5.18/unix/tclUnixNotfy.c 2015-02-12 09:13:16.000000000 -0600 ++++ src/tcl8.5.18/unix/tclUnixNotfy.c 2015-05-19 22:45:26.766612100 -0500 +@@ -99,7 +99,7 @@ typedef struct ThreadSpecificData { + * from these pointers. You must hold the + * notifierMutex lock before accessing these + * fields. */ +-#ifdef __CYGWIN__ ++#if 0 //def __CYGWIN__ + void *event; /* Any other thread alerts a notifier + * that an event is ready to be processed + * by sending this event. */ +@@ -227,7 +227,7 @@ static int FileHandlerEventProc(Tcl_Even + *---------------------------------------------------------------------- + */ + +-#if defined(TCL_THREADS) && defined(__CYGWIN__) ++#if 0 // defined(TCL_THREADS) && defined(__CYGWIN__) + + typedef struct { + void *hwnd; +@@ -399,7 +399,7 @@ Tcl_FinalizeNotifier( + * Clean up any synchronization objects in the thread local storage. + */ + +-#ifdef __CYGWIN__ ++#if 0 //def __CYGWIN__ + CloseHandle(tsdPtr->event); + #else /* __CYGWIN__ */ + Tcl_ConditionFinalize(&(tsdPtr->waitCV)); +@@ -436,7 +436,7 @@ Tcl_AlertNotifier( + ThreadSpecificData *tsdPtr = (ThreadSpecificData *) clientData; + Tcl_MutexLock(¬ifierMutex); + tsdPtr->eventReady = 1; +-#ifdef __CYGWIN__ ++#if 0 //def __CYGWIN__ + PostMessageW(tsdPtr->hwnd, 1024, 0, 0); + #else + Tcl_ConditionNotify(&tsdPtr->waitCV); +@@ -740,7 +740,7 @@ FileHandlerEventProc( + return 1; + } + +-#if defined(TCL_THREADS) && defined(__CYGWIN__) ++#if 0 //defined(TCL_THREADS) && defined(__CYGWIN__) + + static DWORD __stdcall + NotifierProc( +@@ -793,7 +793,7 @@ Tcl_WaitForEvent( + Tcl_Time vTime; + #ifdef TCL_THREADS + int waitForFiles; +-# ifdef __CYGWIN__ ++# if 0 //def __CYGWIN__ + MSG msg; + # endif + #else +@@ -883,7 +883,7 @@ Tcl_WaitForEvent( + tsdPtr->pollState = 0; + } + +-#ifdef __CYGWIN__ ++#if 0 //def __CYGWIN__ + if (!tsdPtr->hwnd) { + WNDCLASS class; + +@@ -931,7 +931,7 @@ Tcl_WaitForEvent( + FD_ZERO(&(tsdPtr->readyMasks.exceptional)); + + if (!tsdPtr->eventReady) { +-#ifdef __CYGWIN__ ++#if 0 //def __CYGWIN__ + if (!PeekMessageW(&msg, NULL, 0, 0, 0)) { + DWORD timeout; + if (timePtr) { +@@ -949,7 +949,7 @@ Tcl_WaitForEvent( + } + tsdPtr->eventReady = 0; + +-#ifdef __CYGWIN__ ++#if 0 //def __CYGWIN__ + while (PeekMessageW(&msg, NULL, 0, 0, 0)) { + /* + * Retrieve and dispatch the message. +@@ -1229,7 +1229,7 @@ NotifierThreadProc( + tsdPtr->onList = 0; + tsdPtr->pollState = 0; + } +-#ifdef __CYGWIN__ ++#if 0 //def __CYGWIN__ + PostMessageW(tsdPtr->hwnd, 1024, 0, 0); + #else /* __CYGWIN__ */ + Tcl_ConditionNotify(&tsdPtr->waitCV); +--- origsrc/tcl8.5.18/unix/tclUnixPort.h 2015-02-12 09:13:16.000000000 -0600 ++++ src/tcl8.5.18/unix/tclUnixPort.h 2015-05-19 22:45:54.241601000 -0500 +@@ -75,7 +75,7 @@ typedef off_t Tcl_SeekOffset; + # define TclOSopen open + #endif + +-#ifdef __CYGWIN__ ++#if 0 //def __CYGWIN__ + + /* Make some symbols available without including */ + # define DWORD unsigned int diff --git a/tcl/PKGBUILD b/tcl/PKGBUILD new file mode 100644 index 00000000..8a2eaff1 --- /dev/null +++ b/tcl/PKGBUILD @@ -0,0 +1,62 @@ +# $Id$ +# Maintainer (MSYS2): Ray Donnelly +# Maintainer (ArchLinux): Eric BĂ©langer + +pkgname=tcl +#pkgver=8.6.4 +pkgver=8.5.18 +pkgrel=1 +pkgdesc="The Tcl scripting language" +arch=('i686' 'x86_64') +url="http://tcl.sourceforge.net/" +license=('custom') +depends=('zlib') +options=('staticlibs') +source=(http://downloads.sourceforge.net/sourceforge/tcl/tcl${pkgver}-src.tar.gz + 8.5.18-cygwin-unix.patch) +sha1sums=('7d4f35bc080d27b2e148689037d312ea41e4d16b' + '119bfdb73c0c881ef5f18dc6711e1d567c942e05') + +prepare() { + cd tcl${pkgver} + # we build the tcl sqlite interface in sqlite-tcl package + rm -rf pkgs/sqlite3* + patch -p2 -i ${srcdir}/8.5.18-cygwin-unix.patch +} + +build() { + cd tcl${pkgver}/unix + [[ $CARCH == "x86_64" ]] && BIT="--enable-64bit" + ./configure --prefix=/usr --mandir=/usr/share/man --enable-threads $BIT + make +} + +# check() { +# cd tcl${pkgver}/unix +# make test +# } + +package() { + cd tcl${pkgver}/unix + make INSTALL_ROOT="${pkgdir}" install install-private-headers + # ln -sf tclsh${pkgver%.*} "${pkgdir}/usr/bin/tclsh" + # ln -sf libtcl${pkgver%.*}.so "${pkgdir}/usr/lib/libtcl.so" + install -Dm644 ../license.terms "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" + + # remove buildroot traces + sed -e "s#${srcdir}/tcl${pkgver}/unix#/usr/lib#" \ + -e "s#${srcdir}/tcl${pkgver}#/usr/include#" \ + -i "${pkgdir}/usr/lib/tclConfig.sh" + + # tdbcver=tdbc1.0.3 + # sed -e "s#${srcdir}/tcl${pkgver}/unix/pkgs/$tdbcver#/usr/lib/$tdbcver#" \ + # -e "s#${srcdir}/tcl${pkgver}/pkgs/$tdbcver/generic#/usr/include#" \ + # -e "s#${srcdir}/tcl${pkgver}/pkgs/$tdbcver/library#/usr/lib/tcl${pkgver%.*}#" \ + # -e "s#${srcdir}/tcl${pkgver}/pkgs/$tdbcver#/usr/include#" \ + # -i "${pkgdir}/usr/lib/$tdbcver/tdbcConfig.sh" + # itclver=itcl4.0.3 + # sed -e "s#${srcdir}/tcl${pkgver}/unix/pkgs/$itclver#/usr/lib/$itclver#" \ + # -e "s#${srcdir}/tcl${pkgver}/pkgs/$itclver/generic#/usr/include#" \ + # -e "s#${srcdir}/tcl${pkgver}/pkgs/$itclver#/usr/include#" \ + # -i "${pkgdir}/usr/lib/$itclver/itclConfig.sh" +}