[mingw-tcl] enable 64bit compile

sailer sailer at fedoraproject.org
Fri Aug 3 14:55:24 UTC 2012


commit 3e577a1c25046b502d07440a1884e05186fd75ae
Author: Thomas Sailer <t.sailer at alumni.ethz.ch>
Date:   Fri Aug 3 16:55:05 2012 +0200

    enable 64bit compile

 mingw-tcl.spec          |   79 +++++++++++++++++++++++++++++++++++++++++------
 tcl-8.5.6-mingw.patch   |   23 +++++++++++++
 tcl-8.5.6-mingw32.patch |   15 ---------
 3 files changed, 92 insertions(+), 25 deletions(-)
---
diff --git a/mingw-tcl.spec b/mingw-tcl.spec
index 48d6b68..b8f5d0e 100644
--- a/mingw-tcl.spec
+++ b/mingw-tcl.spec
@@ -1,6 +1,4 @@
-%global __strip %{mingw32_strip}
-%global __objdump %{mingw32_objdump}
-%define __debug_install_post %{mingw32_debug_install_post}
+%{?mingw_package_header}
 
 %global majorver1 8
 %global majorver2 5
@@ -12,7 +10,7 @@
 Summary: MinGW Windows Tool Command Language, pronounced tickle
 Name: mingw-%{name1}
 Version: %{vers}
-Release: 5%{?dist}
+Release: 6%{?dist}
 License: TCL
 Group: Development/Languages
 URL: http://tcl.sourceforge.net/
@@ -24,15 +22,21 @@ BuildRequires: m4
 BuildRequires: net-tools
 BuildRequires: tcl
 BuildRequires: mingw32-filesystem
+BuildRequires: mingw64-filesystem
 BuildRequires: mingw32-gcc
+BuildRequires: mingw64-gcc
 BuildRequires: mingw32-binutils
+BuildRequires: mingw64-binutils
 BuildRequires: mingw32-cpp
+BuildRequires: mingw64-cpp
 BuildRequires: mingw32-runtime
-BuildRequires: mingw32-w32api
+BuildRequires: mingw64-runtime
+BuildRequires: mingw32-headers
+BuildRequires: mingw64-headers
 Patch0: tcl-8.5.1-autopath.patch
 Patch1: tcl-8.5.10-conf.patch
 Patch2: tcl-8.5.9-hidden.patch
-Patch4: tcl-8.5.6-mingw32.patch
+Patch4: tcl-8.5.6-mingw.patch
 Patch5: tcl-nativetclsh.patch
 Patch6: tcl-mingw-w64-compatibility.patch
 
@@ -58,8 +62,20 @@ cross-platform GUI applications.  Tcl can also be used for a variety
 of web-related tasks and for creating powerful command languages for
 applications.
 
+%package -n mingw64-%{name1}
+Summary: MinGW Windows Tool Command Language, pronounced tickle
+
+%description -n mingw64-%{name1}
+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.
 
-%{?mingw32_debug_package}
+
+%{?mingw_debug_package}
 
 
 %prep
@@ -76,49 +92,71 @@ chmod -x generic/tclThreadAlloc.c
 %build
 pushd win
 autoconf
-%{mingw32_configure} --disable-threads --enable-shared
+%{mingw_configure} --disable-threads --enable-shared
 # builds fail sometimes with %{?_smp_mflags}, so don't use
-make TCL_LIBRARY=%{mingw32_datadir}/%{name1}%{majorver}
+%{mingw_make} TCL_LIBRARY=%{mingw32_datadir}/%{name1}%{majorver}
 popd
 
 %install
-make install -C win INSTALL_ROOT=$RPM_BUILD_ROOT TCL_LIBRARY=%{mingw32_datadir}/%{name1}%{majorver}
+make install -C win/build_win32 INSTALL_ROOT=$RPM_BUILD_ROOT TCL_LIBRARY=%{mingw32_datadir}/%{name1}%{majorver}
+make install -C win/build_win64 INSTALL_ROOT=$RPM_BUILD_ROOT TCL_LIBRARY=%{mingw64_datadir}/%{name1}%{majorver}
 
 ln -s tclsh%{majorver1}%{majorver2}.exe $RPM_BUILD_ROOT%{mingw32_bindir}/tclsh.exe
+ln -s tclsh%{majorver1}%{majorver2}.exe $RPM_BUILD_ROOT%{mingw64_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%{mingw64_libdir}/lib%{name1}%{majorver1}%{majorver2}.a $RPM_BUILD_ROOT%{mingw64_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
+mv $RPM_BUILD_ROOT%{mingw64_libdir}/lib%{name1}stub%{majorver1}%{majorver2}.a $RPM_BUILD_ROOT%{mingw64_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
+ln -s lib%{name1}%{majorver1}%{majorver2}.dll.a $RPM_BUILD_ROOT%{mingw64_libdir}/lib%{name1}.dll.a
 
 #mkdir -p $RPM_BUILD_ROOT/%{mingw32_libdir}/%{name1}%{majorver}
+#mkdir -p $RPM_BUILD_ROOT/%{mingw64_libdir}/%{name1}%{majorver}
 ln -s ../share/%{name1}%{majorver} $RPM_BUILD_ROOT/%{mingw32_libdir}/%{name1}%{majorver}
+ln -s ../share/%{name1}%{majorver} $RPM_BUILD_ROOT/%{mingw64_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
+ln -s %{mingw32_libdir}/%{name1}Config.sh $RPM_BUILD_ROOT/%{mingw64_libdir}/%{name1}%{majorver}/%{name1}Config.sh
 
 mkdir -p $RPM_BUILD_ROOT/%{mingw32_includedir}/%{name1}-private/{generic,win}
+mkdir -p $RPM_BUILD_ROOT/%{mingw64_includedir}/%{name1}-private/{generic,win}
 find generic win -name "*.h" -exec cp -p '{}' $RPM_BUILD_ROOT/%{mingw32_includedir}/%{name1}-private/'{}' ';'
+find generic win -name "*.h" -exec cp -p '{}' $RPM_BUILD_ROOT/%{mingw64_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
+( cd $RPM_BUILD_ROOT/%{mingw64_includedir}
+	for i in *.h ; do
+		[ -f $RPM_BUILD_ROOT/%{mingw64_includedir}/%{name1}-private/generic/$i ] && ln -sf ../../$i $RPM_BUILD_ROOT/%{mingw64_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/%{mingw64_datadir}/%{name1}%{majorver}/encoding/*.enc
 chmod a-x $RPM_BUILD_ROOT/%{mingw32_libdir}/*/pkgIndex.tcl
+chmod a-x $RPM_BUILD_ROOT/%{mingw64_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
+sed -i -e "s|$PWD/win|%{_libdir}|; s|$PWD|%{_includedir}/%{name}-private|" $RPM_BUILD_ROOT/%{mingw64_libdir}/%{name1}Config.sh
 rm -rf $RPM_BUILD_ROOT/%{mingw32_datadir}/%{name1}%{majorver}/tclAppInit.c
+rm -rf $RPM_BUILD_ROOT/%{mingw64_datadir}/%{name1}%{majorver}/tclAppInit.c
 rm -rf $RPM_BUILD_ROOT/%{mingw32_datadir}/%{name1}%{majorver}/ldAix
+rm -rf $RPM_BUILD_ROOT/%{mingw64_datadir}/%{name1}%{majorver}/ldAix
 
 # move windows packages to where tcl85.dll will find them
 mv $RPM_BUILD_ROOT/%{mingw32_libdir}/dde* $RPM_BUILD_ROOT/%{mingw32_libdir}/%{name1}%{majorver}/
+mv $RPM_BUILD_ROOT/%{mingw64_libdir}/dde* $RPM_BUILD_ROOT/%{mingw64_libdir}/%{name1}%{majorver}/
 mv $RPM_BUILD_ROOT/%{mingw32_libdir}/reg* $RPM_BUILD_ROOT/%{mingw32_libdir}/%{name1}%{majorver}/
+mv $RPM_BUILD_ROOT/%{mingw64_libdir}/reg* $RPM_BUILD_ROOT/%{mingw64_libdir}/%{name1}%{majorver}/
 
 %files -n mingw32-%{name1}
 %{mingw32_bindir}/%{name1}sh.exe
@@ -138,7 +176,28 @@ mv $RPM_BUILD_ROOT/%{mingw32_libdir}/reg* $RPM_BUILD_ROOT/%{mingw32_libdir}/%{na
 %doc README changes 
 %doc license.terms
 
+%files -n mingw64-%{name1}
+%{mingw64_bindir}/%{name1}sh.exe
+%{mingw64_bindir}/%{name1}sh%{majorver1}%{majorver2}.exe
+%{mingw64_bindir}/%{name1}%{majorver1}%{majorver2}.dll
+%{mingw64_bindir}/%{name1}pip%{majorver1}%{majorver2}.dll
+%{mingw64_libdir}/lib%{name1}%{majorver1}%{majorver2}.dll.a
+%{mingw64_libdir}/lib%{name1}stub%{majorver1}%{majorver2}.dll.a
+%{mingw64_libdir}/lib%{name1}.dll.a
+%{mingw64_libdir}/%{name1}Config.sh
+%{mingw64_datadir}/%{name1}%{majorver}
+%exclude %{mingw64_datadir}/%{name1}%{majorver}/dde1.3/tcldde13.dll.debug
+%exclude %{mingw64_datadir}/%{name1}%{majorver}/reg1.2/tclreg12.dll.debug
+%{mingw64_datadir}/%{name1}%{majorver1}
+%{mingw64_includedir}/*
+%{mingw64_libdir}/%{name1}%{majorver}/
+%doc README changes 
+%doc license.terms
+
 %changelog
+* Fri Aug  3 2012 Thomas Sailer <t.sailer at alumni.ethz.ch> - 8.5.11-6
+- enable 64bit compile
+
 * Fri Jul 20 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 8.5.11-5
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
 
diff --git a/tcl-8.5.6-mingw.patch b/tcl-8.5.6-mingw.patch
new file mode 100644
index 0000000..e8b9097
--- /dev/null
+++ b/tcl-8.5.6-mingw.patch
@@ -0,0 +1,23 @@
+--- win/configure.in.mingw32	2011-11-04 13:47:58.000000000 +0100
++++ win/configure.in	2012-08-03 13:57:52.175895099 +0200
+@@ -56,9 +56,17 @@
+ AC_C_INLINE
+ AC_HEADER_STDC
+ 
+-AC_CHECK_TOOL(AR, ar)
+-AC_CHECK_TOOL(RANLIB, ranlib)
+-AC_CHECK_TOOL(RC, windres)
++if test "${target_alias}" = "i686-w64-mingw32" ; then
++   AC_CHECK_TOOL(AR, i686-w64-mingw32-ar)
++   AC_CHECK_TOOL(RANLIB, i686-w64-mingw32-ranlib)
++   AC_CHECK_TOOL(RC, i686-w64-mingw32-windres)
++fi
++if test "${target_alias}" = "x86_64-w64-mingw32" ; then
++   AC_CHECK_TOOL(AR, x86_64-w64-mingw32-ar)
++   AC_CHECK_TOOL(RANLIB, x86_64-w64-mingw32-ranlib)
++   AC_CHECK_TOOL(RC, x86_64-w64-mingw32-windres)
++fi
++
+ 
+ #--------------------------------------------------------------------
+ # Checks to see if the make program sets the $MAKE variable.


More information about the scm-commits mailing list