[mingw-qt5-qtjsbackend] Don't re-implement localtime_s as it is already part of the mingw-w64 toolchain

Erik van Pienbroek epienbro at fedoraproject.org
Sat Jan 31 00:14:00 UTC 2015


commit ad937fc41a698eb11ad9d26797c05e74fb6785b5
Author: Erik van Pienbroek <epienbro at fedoraproject.org>
Date:   Sat Jan 31 01:13:40 2015 +0100

    Don't re-implement localtime_s as it is already part of the mingw-w64 toolchain

 mingw-qt5-qtjsbackend.spec                     |   10 +++++++++-
 qtjsbackend-dont-reimplement-localtime_s.patch |   19 +++++++++++++++++++
 2 files changed, 28 insertions(+), 1 deletions(-)
---
diff --git a/mingw-qt5-qtjsbackend.spec b/mingw-qt5-qtjsbackend.spec
index 1dc426b..d373ace 100644
--- a/mingw-qt5-qtjsbackend.spec
+++ b/mingw-qt5-qtjsbackend.spec
@@ -17,7 +17,7 @@
 
 Name:           mingw-qt5-%{qt_module}
 Version:        5.1.1
-Release:        5%{?pre:.%{pre}}%{?snapshot_date:.git%{snapshot_date}.%{snapshot_rev}}%{?dist}
+Release:        6%{?pre:.%{pre}}%{?snapshot_date:.git%{snapshot_date}.%{snapshot_rev}}%{?dist}
 Summary:        Qt5 for Windows - QtJsBackend component
 
 License:        GPLv3 with exceptions or LGPLv2 with exceptions
@@ -47,6 +47,9 @@ BuildRequires:  python
 # Don't use bundled valgrind.h (RHBZ #1141578)
 Patch0:         qtjsbackend-dont-use-valgrind_h.patch
 
+# Don't re-implement localtime_s as it is already part of the mingw-w64 toolchain
+Patch1:         qtjsbackend-dont-reimplement-localtime_s.patch
+
 
 %description
 This package contains the Qt software toolkit for developing
@@ -91,6 +94,8 @@ Fedora Windows cross-compiler.
 rm -rf src/3rdparty/v8/src/third_party/valgrind
 %patch0 -p1
 
+%patch1 -p1
+
 
 %build
 %mingw_qmake_qt5 ../%{qt_module}.pro
@@ -127,6 +132,9 @@ rm -f $RPM_BUILD_ROOT%{mingw64_libdir}/*.dll
 
 
 %changelog
+* Fri Jan 30 2015 Erik van Pienbroek <epienbro at fedoraproject.org> - 5.1.1-6
+- Don't re-implement localtime_s as it is already part of the mingw-w64 toolchain
+
 * Sat Sep 20 2014 Erik van Pienbroek <epienbro at fedoraproject.org> - 5.1.1-5
 - Don't use bundled valgrind.h (RHBZ #1141578)
 
diff --git a/qtjsbackend-dont-reimplement-localtime_s.patch b/qtjsbackend-dont-reimplement-localtime_s.patch
new file mode 100644
index 0000000..36fc14c
--- /dev/null
+++ b/qtjsbackend-dont-reimplement-localtime_s.patch
@@ -0,0 +1,19 @@
+--- qtjsbackend-opensource-src-5.1.1/src/3rdparty/v8/src/platform-win32.cc.orig	2015-01-31 01:05:18.202755976 +0100
++++ qtjsbackend-opensource-src-5.1.1/src/3rdparty/v8/src/platform-win32.cc	2015-01-31 01:05:50.654280255 +0100
+@@ -87,8 +87,6 @@
+   __asm__ __volatile__("xchgl %%eax,%0 ":"=r" (barrier));
+ }
+ 
+-#endif  // __MINGW64_VERSION_MAJOR
+-
+ 
+ int localtime_s(tm* out_tm, const time_t* time) {
+   tm* posix_local_time_struct = localtime(time);
+@@ -97,6 +95,7 @@
+   return 0;
+ }
+ 
++#endif  // __MINGW64_VERSION_MAJOR
+ 
+ int fopen_s(FILE** pFile, const char* filename, const char* mode) {
+   *pFile = fopen(filename, mode);


More information about the scm-commits mailing list