[mingw-tk: 2/10] Initial release: 8.5.9

Kalev Lember kalev at fedoraproject.org
Wed Mar 7 18:03:47 UTC 2012


commit d7aa96e29b42c7658f01649ea30b211cc4875a00
Author: Paulo Roma Cavalcanti <roma at cascavel.(none)>
Date:   Thu Dec 23 08:32:38 2010 -0200

    Initial release: 8.5.9

 .gitignore             |    1 +
 mingw32-tk.spec        |  135 ++++++++++++++++++++++++++++++++++++++++++++++++
 sources                |    1 +
 tk-8.5.6-mingw32.patch |   16 ++++++
 tk-seg_input.patch     |   67 ++++++++++++++++++++++++
 tk8.5-conf.patch       |   27 ++++++++++
 tk8.5-make.patch       |   12 ++++
 7 files changed, 259 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..c7b5f50 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/tk8.5.9-src.tar.gz
diff --git a/mingw32-tk.spec b/mingw32-tk.spec
new file mode 100644
index 0000000..c0e0371
--- /dev/null
+++ b/mingw32-tk.spec
@@ -0,0 +1,135 @@
+%global __strip %{_mingw32_strip}
+%global __objdump %{_mingw32_objdump}
+%global _use_internal_dependency_generator 0
+%global __find_requires %{_mingw32_findrequires}
+%global __find_provides %{_mingw32_findprovides}
+
+%global majorver1 8
+%global majorver2 5
+%global majorver %{majorver1}.%{majorver2}
+%global vers %{majorver}.9
+
+%global name1 tk
+
+Summary:   MinGW Windows graphical toolkit for the Tcl scripting language
+Name:      mingw32-%{name1}
+Version:   %{vers}
+Release:   1%{?dist}
+License:   TCL
+Group:     Development/Languages
+URL:       http://tcl.sourceforge.net/
+Source0:   http://downloads.sourceforge.net/sourceforge/tcl/%{name1}%{version}-src.tar.gz
+Patch1:    tk8.5-make.patch
+Patch2:    tk8.5-conf.patch
+# this patch isn't needed since tk8.6b1
+Patch3:    tk-seg_input.patch
+Patch4:    tk-8.5.6-mingw32.patch
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+Buildrequires: autoconf
+BuildRequires: file
+BuildRequires: m4
+BuildRequires: net-tools
+BuildRequires: mingw32-tcl
+BuildRequires: mingw32-filesystem
+BuildRequires: mingw32-gcc
+BuildRequires: mingw32-binutils
+BuildRequires: mingw32-cpp
+BuildRequires: mingw32-runtime
+BuildRequires: mingw32-w32api
+BuildArch: noarch
+
+%description
+When paired with the Tcl scripting language, Tk provides a fast and powerful
+way to create cross-platform GUI applications.
+
+%prep
+%setup -q -n %{name1}%{version}
+iconv -f iso-8859-1 -t utf-8 changes > changes.utf8
+touch -r changes changes.utf8
+mv changes.utf8 changes
+
+%patch1 -p1 -b .make
+%patch2 -p1 -b .conf
+%patch3 -p1 -b .seg
+%patch4 -p1 -b .mingw32
+
+%build
+pushd win
+autoconf
+%{_mingw32_configure} --with-tcl=%{_mingw32_libdir}/tcl%{majorver} 
+# builds fail sometimes with %%{?_smp_mflags}, so don't use
+sed -i -e 's,mingw32-tcl,tcl,g' Makefile
+sed -i -e 's,/usr/include,%{_mingw32_includedir},g' Makefile
+sed -i -e 's,libtclstub85.a,libtclstub85.dll.a,g' Makefile
+sed -i -e 's,tcl8.5/libtclstub85,libtclstub85,g' Makefile
+sed -i -e 's,libtcl85.a,libtcl85.dll.a,g' Makefile
+sed -i -e 's,tcl8.5/libtcl85,libtcl85,g' Makefile
+make TCL_LIBRARY=%{_mingw32_datadir}/%{name1}%{majorver}
+popd
+
+%install
+rm -rf $RPM_BUILD_ROOT
+make install -C win INSTALL_ROOT=$RPM_BUILD_ROOT TK_LIBRARY=%{_mingw32_datadir}/%{name1}%{majorver}
+
+pushd $RPM_BUILD_ROOT%{_mingw32_bindir}
+ln -s wish%{majorver1}%{majorver2}.exe wish.exe
+popd
+
+mv $RPM_BUILD_ROOT%{_mingw32_libdir}/lib%{name1}%{majorver1}%{majorver2}.a \
+   $RPM_BUILD_ROOT%{_mingw32_libdir}/lib%{name1}%{majorver1}%{majorver2}.dll.a
+mv $RPM_BUILD_ROOT%{_mingw32_libdir}/lib%{name1}stub%{majorver1}%{majorver2}.a \
+   $RPM_BUILD_ROOT%{_mingw32_libdir}/lib%{name1}stub%{majorver1}%{majorver2}.dll.a
+
+# for linking with -lib%%{name1}
+ln -s lib%{name1}%{majorver1}%{majorver2}.dll.a \
+      $RPM_BUILD_ROOT%{_mingw32_libdir}/lib%{name1}.dll.a
+
+mkdir -p $RPM_BUILD_ROOT/%{_mingw32_libdir}/%{name1}%{majorver}
+
+# postgresql and maybe other packages too need tclConfig.sh
+# paths don't look at /usr/lib for efficiency, so we symlink into tcl8.5 for now
+ln -s %{_mingw32_libdir}/%{name1}Config.sh \
+      $RPM_BUILD_ROOT/%{_mingw32_libdir}/%{name1}%{majorver}/%{name1}Config.sh
+
+mkdir -p $RPM_BUILD_ROOT/%{_mingw32_includedir}/%{name1}-private/{generic,win}
+find generic win -name "*.h" -exec cp -p '{}' $RPM_BUILD_ROOT/%{_mingw32_includedir}/%{name1}-private/'{}' ';'
+( cd $RPM_BUILD_ROOT/%{_mingw32_includedir}
+     for i in *.h ; do
+         [ -f $RPM_BUILD_ROOT/%{_mingw32_includedir}/%{name1}-private/generic/$i ] && \
+         ln -sf ../../$i $RPM_BUILD_ROOT/%{_mingw32_includedir}/%{name1}-private/generic ;
+     done
+) || true
+
+# fix executable bits
+chmod a-x $RPM_BUILD_ROOT/%{_mingw32_libdir}/*/pkgIndex.tcl
+
+# remove buildroot traces
+sed -i -e "s|$PWD/win|%{_libdir}|; s|$PWD|%{_includedir}/%{name}-private|" $RPM_BUILD_ROOT/%{_mingw32_libdir}/%{name1}Config.sh
+rm -rf $RPM_BUILD_ROOT/%{_mingw32_datadir}/%{name1}%{majorver}/tclAppInit.c
+rm -rf $RPM_BUILD_ROOT/%{_mingw32_datadir}/%{name1}%{majorver}/ldAix
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(-,root,root,-)
+%{_mingw32_bindir}/wish*
+%{_mingw32_bindir}/%{name1}%{majorver1}%{majorver2}.dll
+%{_mingw32_libdir}/lib%{name1}%{majorver1}%{majorver2}.dll.a
+%{_mingw32_libdir}/lib%{name1}stub%{majorver1}%{majorver2}.dll.a
+%{_mingw32_libdir}/lib%{name1}.dll.a
+%{_mingw32_libdir}/%{name1}Config.sh
+%{_mingw32_includedir}/*
+%{_mingw32_libdir}/%{name1}%{majorver}/
+%{_mingw32_datadir}/%{name1}%{majorver1}.%{majorver2}
+%doc README changes 
+%doc license.terms
+
+%changelog
+* Sun Dec 19 2010 Paulo Roma <roma at lcg.ufrj.br> - 8.5.9-1
+- Update to 8.5.9 to match rawhide.
+- Converted changes to utf8.
+- Fixed wish symbolic link.
+
+* Tue Oct 20 2009 Paulo Roma <roma at lcg.ufrj.br> - 8.5.7-5.1
+- Copy from native
diff --git a/sources b/sources
index e69de29..8b3d6a3 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+7cdeb9feb61593f58a0ae61f2497580e  tk8.5.9-src.tar.gz
diff --git a/tk-8.5.6-mingw32.patch b/tk-8.5.6-mingw32.patch
new file mode 100644
index 0000000..15e8590
--- /dev/null
+++ b/tk-8.5.6-mingw32.patch
@@ -0,0 +1,16 @@
+diff -Naur tk8.5.7/win/configure.in tk8.5.7-new/win/configure.in
+--- tk8.5.7/win/configure.in	2009-04-15 11:11:42.000000000 -0300
++++ tk8.5.7-new/win/configure.in	2009-10-20 14:48:25.000000000 -0200
+@@ -57,9 +57,9 @@
+ dnl AC_CHECK_TOOL(RC, windres)
+ 
+ if test "${GCC}" = "yes" ; then
+-    AC_CHECK_PROG(AR, ar, ar)
+-    AC_CHECK_PROG(RANLIB, ranlib, ranlib)
+-    AC_CHECK_PROG(RC, windres, windres)
++    AC_CHECK_PROG(AR, i686-pc-mingw32-ar, i686-pc-mingw32-ar)
++    AC_CHECK_PROG(RANLIB, i686-pc-mingw32-ranlib, i686-pc-mingw32-ranlib)
++    AC_CHECK_PROG(RC, i686-pc-mingw32-windres, i686-pc-mingw32-windres)
+ 
+     if test "${AR}" = "" ; then
+ 	AC_MSG_ERROR([Required archive tool 'ar' not found on PATH.])
diff --git a/tk-seg_input.patch b/tk-seg_input.patch
new file mode 100644
index 0000000..fcd6566
--- /dev/null
+++ b/tk-seg_input.patch
@@ -0,0 +1,67 @@
+diff -up tk8.5.7/generic/tkEvent.c.old tk8.5.7/generic/tkEvent.c
+--- tk8.5.7/generic/tkEvent.c.old	2008-08-05 22:31:53.000000000 +0200
++++ tk8.5.7/generic/tkEvent.c	2009-02-23 12:37:23.000000000 +0100
+@@ -247,16 +247,10 @@ InvokeFocusHandlers(
+     }
+ 
+     /*
+-     * MouseWheel events are not focus specific on Mac OS X.
++     * Only key-related events are directed according to the focus.
+      */
+ 
+-#ifdef MAC_OSX_TK
+-#define FOCUS_DIRECTED_EVENT_MASK (KeyPressMask|KeyReleaseMask)
+-#else
+-#define	FOCUS_DIRECTED_EVENT_MASK (KeyPressMask|KeyReleaseMask|MouseWheelMask)
+-#endif
+-
+-    if (mask & FOCUS_DIRECTED_EVENT_MASK) {
++    if (mask & (KeyPressMask|KeyReleaseMask)) {
+ 	(*winPtrPtr)->dispPtr->lastEventTime = eventPtr->xkey.time;
+ 	*winPtrPtr = TkFocusKeyEvent(*winPtrPtr, eventPtr);
+ 	if (*winPtrPtr == NULL) {
+@@ -790,7 +789,7 @@ InvokeGenericHandlers(
+ 	    int done;
+ 
+ 	    tsdPtr->handlersActive++;
+-	    done = (*curPtr->proc)(curPtr->clientData, eventPtr);
++	    done = curPtr->proc(curPtr->clientData, eventPtr);
+ 	    tsdPtr->handlersActive--;
+ 	    if (done) {
+ 		return done;
+@@ -1383,7 +1382,7 @@ Tk_HandleEvent(
+ 	for (handlerPtr = winPtr->handlerList; handlerPtr != NULL; ) {
+ 	    if ((handlerPtr->mask & mask) != 0) {
+ 		ip.nextHandler = handlerPtr->nextPtr;
+-		(*(handlerPtr->proc))(handlerPtr->clientData, eventPtr);
++		handlerPtr->proc(handlerPtr->clientData, eventPtr);
+ 		handlerPtr = ip.nextHandler;
+ 	    } else {
+ 		handlerPtr = handlerPtr->nextPtr;
+@@ -1787,7 +1786,7 @@ WindowEventProc(
+ 	return 0;
+     }
+     if (tsdPtr->restrictProc != NULL) {
+-	result = (*tsdPtr->restrictProc)(tsdPtr->restrictArg, &wevPtr->event);
++	result = tsdPtr->restrictProc(tsdPtr->restrictArg, &wevPtr->event);
+ 	if (result != TK_PROCESS_EVENT) {
+ 	    if (result == TK_DEFER_EVENT) {
+ 		return 0;
+@@ -2053,7 +2052,7 @@ TkFinalize(
+ 
+ 	firstExitPtr = exitPtr->nextPtr;
+ 	Tcl_MutexUnlock(&exitMutex);
+-	(*exitPtr->proc)(exitPtr->clientData);
++	exitPtr->proc(exitPtr->clientData);
+ 	ckfree((char *) exitPtr);
+ 	Tcl_MutexLock(&exitMutex);
+     }
+@@ -2103,7 +2102,7 @@ TkFinalizeThread(
+ 	     */
+ 
+ 	    tsdPtr->firstExitPtr = exitPtr->nextPtr;
+-	    (*exitPtr->proc)(exitPtr->clientData);
++	    exitPtr->proc(exitPtr->clientData);
+ 	    ckfree((char *) exitPtr);
+ 	}
+     }
diff --git a/tk8.5-conf.patch b/tk8.5-conf.patch
new file mode 100644
index 0000000..f162035
--- /dev/null
+++ b/tk8.5-conf.patch
@@ -0,0 +1,27 @@
+diff -up tk8.5.0/unix/tcl.m4.conf tk8.5.0/unix/tcl.m4
+--- tk8.5.0/unix/tcl.m4.conf	2007-12-20 12:32:05.000000000 +0100
++++ tk8.5.0/unix/tcl.m4	2007-12-20 12:33:11.000000000 +0100
+@@ -1427,12 +1427,12 @@ dnl AC_CHECK_TOOL(AR, ar)
+ 	    # get rid of the warnings.
+ 	    #CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D__NO_STRING_INLINES -D__NO_MATH_INLINES"
+ 
+-	    SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS}'
++	    SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS} -Wl,-soname,${@}'
+ 	    DL_OBJS="tclLoadDl.o"
+ 	    DL_LIBS="-ldl"
+ 	    LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
+ 	    AS_IF([test $doRpath = yes], [
+-		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'])
++		CC_SEARCH_FLAGS=''])
+ 	    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
+ 	    AS_IF([test "`uname -m`" = "alpha"], [CFLAGS="$CFLAGS -mieee"])
+ 	    AS_IF([test $do64bit = yes], [
+@@ -1464,7 +1464,7 @@ dnl AC_CHECK_TOOL(AR, ar)
+ 	    SHLIB_LD_LIBS='${LIBS}'
+ 	    SHLIB_SUFFIX=".so"
+ 
+-	    SHLIB_LD='${CC} -shared'
++	    SHLIB_LD='${CC} ${CFLAGS} -shared'
+ 	    DL_OBJS=""
+ 	    DL_LIBS="-ldl"
+ 	    LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
diff --git a/tk8.5-make.patch b/tk8.5-make.patch
new file mode 100644
index 0000000..27859e2
--- /dev/null
+++ b/tk8.5-make.patch
@@ -0,0 +1,12 @@
+diff -up tk8.5.2/unix/Makefile.in.ble tk8.5.2/unix/Makefile.in
+--- tk8.5.2/unix/Makefile.in.ble	2008-03-28 19:46:36.000000000 +0100
++++ tk8.5.2/unix/Makefile.in	2008-05-19 14:45:52.000000000 +0200
+@@ -713,7 +713,7 @@ install-binaries: $(TK_LIB_FILE) $(TK_ST
+ 	    fi
+ 	@echo "Installing $(LIB_FILE) to $(LIB_INSTALL_DIR)/"
+ 	@@INSTALL_LIB@
+-	@chmod 555 "$(LIB_INSTALL_DIR)"/$(LIB_FILE)
++	@chmod 755 "$(LIB_INSTALL_DIR)"/$(LIB_FILE)
+ 	@echo "Installing wish at EXEEXT@ as $(BIN_INSTALL_DIR)/wish$(VERSION)@EXEEXT@"
+ 	@$(INSTALL_PROGRAM) wish at EXEEXT@ "$(BIN_INSTALL_DIR)"/wish$(VERSION)@EXEEXT@
+ 	@echo "Installing tkConfig.sh to $(CONFIG_INSTALL_DIR)/"


More information about the scm-commits mailing list