[packages/crossmingw32-std-threads] Up to 1.0.0
arekm
arekm at pld-linux.org
Wed May 20 23:31:33 CEST 2026
commit fde1ea273bd32cd4cb1c74a6a72da7606c526821
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Wed May 20 23:31:16 2026 +0200
Up to 1.0.0
crossmingw32-std-threads.spec | 18 ++++-----
mingw-std-threads-errors.patch | 20 ++--------
mingw-std-threads-include.patch | 18 ++-------
mingw-std-threads-mingw32-headers.patch | 68 +++++++++++++++++++++++++++++++++
4 files changed, 84 insertions(+), 40 deletions(-)
---
diff --git a/crossmingw32-std-threads.spec b/crossmingw32-std-threads.spec
index f09d0d7..32c3126 100644
--- a/crossmingw32-std-threads.spec
+++ b/crossmingw32-std-threads.spec
@@ -1,21 +1,19 @@
#
# Conditional build:
-%bcond_without tests # perform test build
+%bcond_with tests # perform test build (broken against modern libstdc++ which already provides std::thread/std::async)
#
Summary: C++11 threading classes implementation for MinGW
Summary(pl.UTF-8): Implementacja klas C++11 związanych z wątkami dla MinGW
Name: crossmingw32-std-threads
-Version: 0
-%define gitref ee67ef384470e998c8e0b7301f7a79b5019251a2
-%define snap 20180912
-%define rel 3
-Release: 0.%{snap}.%{rel}
+Version: 1.0.0
+Release: 1
License: BSD
Group: Development/Libraries
-Source0: https://github.com/meganz/mingw-std-threads/archive/%{gitref}/mingw-std-threads-%{snap}.tar.gz
-# Source0-md5: c55d7a463149d803535b71c6bb1346cb
+Source0: https://github.com/meganz/mingw-std-threads/archive/%{version}/mingw-std-threads-%{version}.tar.gz
+# Source0-md5: 89c2614b368bee92074012d63316bd86
Patch0: mingw-std-threads-include.patch
Patch1: mingw-std-threads-errors.patch
+Patch2: mingw-std-threads-mingw32-headers.patch
URL: https://github.com/meganz/mingw-std-threads
%if %{with tests}
BuildRequires: crossmingw32-gcc-c++ >= 1:4.7
@@ -27,6 +25,7 @@ ExcludeArch: i386
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%define no_install_post_strip 1
+%define _enable_debug_packages 0
%define target i386-mingw32
%define target_platform i386-pc-mingw32
@@ -58,9 +57,10 @@ Implementacja klas związanych z wątkami ze standardu C++11
brakujących w GCC dla MinGW.
%prep
-%setup -q -n mingw-std-threads-%{gitref}
+%setup -q -n mingw-std-threads-%{version}
%patch -P0 -p1
%patch -P1 -p1
+%patch -P2 -p1
%build
%if %{with tests}
diff --git a/mingw-std-threads-errors.patch b/mingw-std-threads-errors.patch
index 927111e..bd8f3dc 100644
--- a/mingw-std-threads-errors.patch
+++ b/mingw-std-threads-errors.patch
@@ -1,6 +1,6 @@
---- mingw-std-threads-ee67ef384470e998c8e0b7301f7a79b5019251a2/mingw.condition_variable.h.orig 2018-09-11 17:06:14.000000000 +0200
-+++ mingw-std-threads-ee67ef384470e998c8e0b7301f7a79b5019251a2/mingw.condition_variable.h 2018-10-03 21:35:48.633130795 +0200
-@@ -105,7 +105,7 @@
+--- mingw-std-threads-1.0.0/mingw.condition_variable.h.orig 2026-05-20 22:19:38.949808763 +0200
++++ mingw-std-threads-1.0.0/mingw.condition_variable.h 2026-05-20 22:19:48.923918904 +0200
+@@ -123,7 +123,7 @@
else
{
using namespace std;
@@ -9,17 +9,3 @@
}
}
public:
---- reads-ee67ef384470e998c8e0b7301f7a79b5019251a2/mingw.mutex.h.orig 2018-09-11 17:06:14.000000000 +0200
-+++ reads-ee67ef384470e998c8e0b7301f7a79b5019251a2/mingw.mutex.h 2018-10-03 21:40:38.086460829 +0200
-@@ -300,9 +300,9 @@
- case WAIT_OBJECT_0:
- return true;
- case WAIT_ABANDONED:
-- throw system_error(make_error_code(errc::owner_dead));
-+ throw system_error(make_error_code(errc::no_such_process));
- default:
-- throw system_error(make_error_code(errc::protocol_error));
-+ throw system_error(make_error_code(errc::invalid_argument));
- }
- }
- protected:
diff --git a/mingw-std-threads-include.patch b/mingw-std-threads-include.patch
index 5ef9e69..ec72675 100644
--- a/mingw-std-threads-include.patch
+++ b/mingw-std-threads-include.patch
@@ -1,20 +1,10 @@
---- mingw-std-threads-ee67ef384470e998c8e0b7301f7a79b5019251a2/mingw.shared_mutex.h.orig 2018-09-11 17:06:14.000000000 +0200
-+++ mingw-std-threads-ee67ef384470e998c8e0b7301f7a79b5019251a2/mingw.shared_mutex.h 2018-10-04 20:56:12.195504727 +0200
-@@ -32,6 +32,7 @@
- #endif
-
- #include <cassert>
-+#include <climits>
-
- // Use MinGW's shared_lock class template, if it's available. Requires C++14.
- // If unavailable (eg. because this library is being used in C++11), then an
---- mingw-std-threads-ee67ef384470e998c8e0b7301f7a79b5019251a2/mingw.future.h.orig 2018-09-11 17:06:14.000000000 +0200
-+++ mingw-std-threads-ee67ef384470e998c8e0b7301f7a79b5019251a2/mingw.future.h 2018-10-05 17:29:09.441326712 +0200
+--- mingw-std-threads-1.0.0/mingw.future.h.orig 2025-05-20 22:00:00.000000000 +0200
++++ mingw-std-threads-1.0.0/mingw.future.h 2025-05-20 22:00:00.000000000 +0200
@@ -22,6 +22,7 @@
#include <future>
-
+
#include <cassert>
+#include <exception>
#include <vector>
- #include <utility> // For std::pair
+ #include <utility> // For std::pair
#include <type_traits>
diff --git a/mingw-std-threads-mingw32-headers.patch b/mingw-std-threads-mingw32-headers.patch
new file mode 100644
index 0000000..17babfd
--- /dev/null
+++ b/mingw-std-threads-mingw32-headers.patch
@@ -0,0 +1,68 @@
+--- mingw-std-threads-1.0.0/mingw.thread.h.orig 2026-05-20 22:22:06.453758891 +0200
++++ mingw-std-threads-1.0.0/mingw.thread.h 2026-05-20 22:22:06.723864148 +0200
+@@ -40,10 +40,7 @@
+
+ #include "mingw.invoke.h"
+
+-#include <synchapi.h> // For WaitForSingleObject
+-#include <handleapi.h> // For CloseHandle, etc.
+-#include <sysinfoapi.h> // For GetNativeSystemInfo
+-#include <processthreadsapi.h> // For GetCurrentThreadId
++#include <windows.h>
+ #include <process.h> // For _beginthreadex
+
+ #ifndef NDEBUG
+--- mingw-std-threads-1.0.0/mingw.mutex.h.orig 2026-05-20 22:22:06.467230964 +0200
++++ mingw-std-threads-1.0.0/mingw.mutex.h 2026-05-20 22:22:06.725125722 +0200
+@@ -46,11 +46,9 @@
+
+ #include <sdkddkver.h> // Detect Windows version.
+ #if STDMUTEX_RECURSION_CHECKS
+-#include <processthreadsapi.h> // For GetCurrentThreadId
++#include <windows.h>
+ #endif
+-#include <synchapi.h> // For InitializeCriticalSection, etc.
+-#include <errhandlingapi.h> // For GetLastError
+-#include <handleapi.h>
++#include <windows.h>
+
+ // Need for the implementation of invoke
+ #include "mingw.invoke.h"
+--- mingw-std-threads-1.0.0/mingw.future.h.orig 2026-05-20 22:22:06.476953548 +0200
++++ mingw-std-threads-1.0.0/mingw.future.h 2026-05-20 22:22:06.727517696 +0200
+@@ -35,9 +35,7 @@
+ #include "mingw.mutex.h"
+ #include "mingw.condition_variable.h"
+
+-#include <synchapi.h>
+-#include <handleapi.h>
+-#include <processthreadsapi.h>
++#include <windows.h>
+
+ // Note:
+ // std::shared_ptr is the natural choice for this. However, a custom
+--- mingw-std-threads-1.0.0/mingw.condition_variable.h.orig 2026-05-20 22:22:06.487026964 +0200
++++ mingw-std-threads-1.0.0/mingw.condition_variable.h 2026-05-20 22:22:06.728865295 +0200
+@@ -36,9 +36,9 @@
+ #include <atomic>
+ #include <windef.h>
+ #include <winbase.h> // For CreateSemaphore
+-#include <handleapi.h>
++#include <windows.h>
+ #endif
+-#include <synchapi.h>
++#include <windows.h>
+
+ #include "mingw.mutex.h"
+ #include "mingw.shared_mutex.h"
+--- mingw-std-threads-1.0.0/mingw.shared_mutex.h.orig 2026-05-20 22:22:06.497302520 +0200
++++ mingw-std-threads-1.0.0/mingw.shared_mutex.h 2026-05-20 22:22:06.730005444 +0200
+@@ -56,7 +56,7 @@
+ // Might be able to use native Slim Reader-Writer (SRW) locks.
+ #ifdef _WIN32
+ #include <sdkddkver.h> // Detect Windows version.
+-#include <synchapi.h>
++#include <windows.h>
+ #endif
+
+ namespace mingw_stdthread
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/crossmingw32-std-threads.git/commitdiff/fde1ea273bd32cd4cb1c74a6a72da7606c526821
More information about the pld-cvs-commit
mailing list