[mingw-tcl: 2/25] import from review.
Kalev Lember
kalev at fedoraproject.org
Wed Mar 7 17:55:29 UTC 2012
commit 44e29d652f90dd6c6f50e30ffbbf3330bbcd9cb2
Author: sailer <sailer at fedoraproject.org>
Date: Sat May 23 07:16:08 2009 +0000
import from review.
.cvsignore | 1 +
mingw32-tcl.spec | 123 ++++++++++++++++++++++++++++++++++++++++++++++
sources | 1 +
tcl-8.5.0-conf.patch | 26 ++++++++++
tcl-8.5.0-hidden.patch | 33 ++++++++++++
tcl-8.5.1-autopath.patch | 53 ++++++++++++++++++++
tcl-8.5.6-mingw32.patch | 15 ++++++
7 files changed, 252 insertions(+), 0 deletions(-)
---
diff --git a/.cvsignore b/.cvsignore
index e69de29..62232c7 100644
--- a/.cvsignore
+++ b/.cvsignore
@@ -0,0 +1 @@
+tcl8.5.7-src.tar.gz
diff --git a/mingw32-tcl.spec b/mingw32-tcl.spec
new file mode 100644
index 0000000..6ad0004
--- /dev/null
+++ b/mingw32-tcl.spec
@@ -0,0 +1,123 @@
+%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}.7
+
+%global name1 tcl
+
+Summary: MinGW Windows Tool Command Language, pronounced tickle
+Name: mingw32-%{name1}
+Version: %{vers}
+Release: 2%{?dist}
+License: TCL
+Group: Development/Languages
+URL: http://tcl.sourceforge.net/
+Source0: http://downloads.sourceforge.net/sourceforge/tcl/%{name1}%{version}-src.tar.gz
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+BuildArch: noarch
+Buildrequires: autoconf
+BuildRequires: mingw32-filesystem >= 30
+BuildRequires: mingw32-gcc
+BuildRequires: mingw32-binutils
+Patch0: tcl-8.5.1-autopath.patch
+Patch1: tcl-8.5.0-conf.patch
+Patch2: tcl-8.5.0-hidden.patch
+Patch3: tcl-8.5.6-mingw32.patch
+
+%description
+The Tcl (Tool Command Language) provides a powerful platform for
+creating integration applications that tie together diverse
+applications, protocols, devices, and frameworks. When paired with the
+Tk toolkit, Tcl provides a fastest and powerful way to create
+cross-platform GUI applications. Tcl can also be used for a variety
+of web-related tasks and for creating powerful command languages for
+applications.
+
+%prep
+%setup -q -n %{name1}%{version}
+chmod -x generic/tclThreadAlloc.c
+
+%patch0 -p1 -b .autopath
+%patch1 -p1 -b .conf
+%patch2 -p1 -b .hidden
+%patch3 -p0 -b .mingw32
+
+%build
+pushd win
+autoconf
+%{_mingw32_configure} --disable-threads --enable-shared
+make %{?_smp_mflags} TCL_LIBRARY=%{_mingw32_datadir}/%{name1}%{majorver}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+make install -C win INSTALL_ROOT=$RPM_BUILD_ROOT TCL_LIBRARY=%{_mingw32_datadir}/%{name1}%{majorver}
+
+ln -s tclsh%{majorver1}%{majorver2}.exe $RPM_BUILD_ROOT%{_mingw32_bindir}/tclsh.exe
+
+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_datadir}/%{name1}%{majorver}/encoding/*.enc
+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}/%{name1}sh.exe
+%{_mingw32_bindir}/%{name1}sh%{majorver1}%{majorver2}.exe
+%{_mingw32_bindir}/%{name1}%{majorver1}%{majorver2}.dll
+%{_mingw32_bindir}/%{name1}pip%{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_datadir}/%{name1}%{majorver}
+%{_mingw32_datadir}/%{name1}%{majorver1}
+%{_mingw32_includedir}/*
+%{_mingw32_libdir}/%{name1}%{majorver}/
+%{_mingw32_libdir}/dde*/
+%{_mingw32_libdir}/reg*/
+%doc README changes
+%doc license.terms
+
+%changelog
+* Fri May 22 2009 Thomas Sailer <t.sailer at alumni.ethz.ch> - 8.5.7-2
+- remove check section
+
+* Thu May 21 2009 Thomas Sailer <t.sailer at alumni.ethz.ch> - 8.5.7-1
+- update to 8.5.7
+- simplify dir ownership
+
+* Thu May 21 2009 Thomas Sailer <t.sailer at alumni.ethz.ch> - 8.5.6-1
+- copy from native
diff --git a/sources b/sources
index e69de29..0da1bfd 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+f70ad8f78b5e4a9f792fe101f22b125f tcl8.5.7-src.tar.gz
diff --git a/tcl-8.5.0-conf.patch b/tcl-8.5.0-conf.patch
new file mode 100644
index 0000000..24d9045
--- /dev/null
+++ b/tcl-8.5.0-conf.patch
@@ -0,0 +1,26 @@
+--- tcl8.5.0/unix/tcl.m4.conf 2007-12-20 10:48:05.000000000 +0100
++++ tcl8.5.0/unix/tcl.m4 2007-12-20 10:48:52.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} -fPIC -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 -fPIC'
+ DL_OBJS=""
+ DL_LIBS="-ldl"
+ LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
diff --git a/tcl-8.5.0-hidden.patch b/tcl-8.5.0-hidden.patch
new file mode 100644
index 0000000..9a6d0be
--- /dev/null
+++ b/tcl-8.5.0-hidden.patch
@@ -0,0 +1,33 @@
+diff -up tcl8.5.6/generic/tclPort.h.old tcl8.5.6/generic/tclPort.h
+--- tcl8.5.6/generic/tclPort.h.old 2009-02-09 16:40:08.000000000 +0100
++++ tcl8.5.6/generic/tclPort.h 2009-02-09 16:40:26.000000000 +0100
+@@ -24,7 +24,7 @@
+ #if defined(__WIN32__)
+ # include "tclWinPort.h"
+ #else
+-# include "tclUnixPort.h"
++# include "../unix/tclUnixPort.h"
+ #endif
+
+ #if !defined(LLONG_MIN)
+diff -up tcl8.5.6/generic/tclInt.h.bbb tcl8.5.6/generic/tclInt.h
+--- tcl8.5.6/generic/tclInt.h.bbb 2008-11-14 01:22:39.000000000 +0100
++++ tcl8.5.6/generic/tclInt.h 2009-02-11 13:05:13.000000000 +0100
+@@ -2773,7 +2773,7 @@ MODULE_SCOPE void TclClockInit(Tcl_Inter
+ 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,
+@@ -2934,7 +2934,7 @@ MODULE_SCOPE int Tcl_RegsubObjCmd(Client
+ 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/tcl-8.5.1-autopath.patch b/tcl-8.5.1-autopath.patch
new file mode 100644
index 0000000..063b03b
--- /dev/null
+++ b/tcl-8.5.1-autopath.patch
@@ -0,0 +1,53 @@
+diff -up tcl8.5.7/library/auto.tcl.old tcl8.5.7/library/auto.tcl
+--- tcl8.5.7/library/auto.tcl.old 2006-11-03 01:34:52.000000000 +0100
++++ tcl8.5.7/library/auto.tcl 2009-05-18 10:28:16.337102378 +0200
+@@ -85,6 +85,13 @@ proc tcl_findLibrary {basename version p
+ 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 -up tcl8.5.7/library/init.tcl.old tcl8.5.7/library/init.tcl
+--- tcl8.5.7/library/init.tcl.old 2009-04-10 18:54:51.000000000 +0200
++++ tcl8.5.7/library/init.tcl 2009-05-18 10:25:25.904853164 +0200
+@@ -48,16 +48,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 -up tcl8.5.7/unix/configure.in.old tcl8.5.7/unix/configure.in
+--- tcl8.5.7/unix/configure.in.old 2009-04-15 21:30:05.000000000 +0200
++++ tcl8.5.7/unix/configure.in 2009-05-18 10:21:30.987855050 +0200
+@@ -833,9 +833,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 ${TCL_PACKAGE_PATH}"
+ else
+- TCL_PACKAGE_PATH="${prefix}/lib ${TCL_PACKAGE_PATH}"
++ TCL_PACKAGE_PATH="${libdir}/tcl8.5 ${prefix}/share/tcl8.5 ${TCL_PACKAGE_PATH}"
+ fi
+
+ #--------------------------------------------------------------------
diff --git a/tcl-8.5.6-mingw32.patch b/tcl-8.5.6-mingw32.patch
new file mode 100644
index 0000000..0d39081
--- /dev/null
+++ b/tcl-8.5.6-mingw32.patch
@@ -0,0 +1,15 @@
+--- win/configure.in.orig 2009-05-21 01:24:17.000000000 +0200
++++ win/configure.in 2009-05-21 01:24:53.000000000 +0200
+@@ -69,9 +69,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.])
More information about the scm-commits
mailing list