[packages/crossmingw32-runtime/DEVEL-5.4.2] - new URLs, updated to 5.4.2 - removed obsolete rand_s-mingw patch - added oldlib patch (fix legacy

qboosh qboosh at pld-linux.org
Mon Feb 14 21:20:51 CET 2022


commit 75a9cc84e34fb11acd2439325782b8b571c19c5b
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Mon Feb 14 21:22:25 2022 +0100

    - new URLs, updated to 5.4.2
    - removed obsolete rand_s-mingw patch
    - added oldlib patch (fix legacy mingw10.dll build)
    - install also optional libmingwex dll

 crossmingw32-runtime-oldlib.patch | 29 +++++++++++++++++++++++++++++
 crossmingw32-runtime.spec         | 38 ++++++++++++++++++++++++--------------
 rand_s-mingw.patch                | 26 --------------------------
 3 files changed, 53 insertions(+), 40 deletions(-)
---
diff --git a/crossmingw32-runtime.spec b/crossmingw32-runtime.spec
index 4d84e54..a9e0e37 100644
--- a/crossmingw32-runtime.spec
+++ b/crossmingw32-runtime.spec
@@ -1,24 +1,26 @@
 Summary:	MinGW32 Binary Utility Development Utilities - runtime libraries
 Summary(pl.UTF-8):	Zestaw narzędzi MinGW32 - biblioteki uruchomieniowe
 Name:		crossmingw32-runtime
-Version:	5.0.2
+Version:	5.4.2
 Release:	1
 Epoch:		1
 License:	BSD-like
 Group:		Development/Libraries
-Source0:	http://downloads.sourceforge.net/mingw/mingwrt-%{version}-mingw32-src.tar.xz
-# Source0-md5:	9865c83624b0e80178fdc709ebbc5e15
+#Source0Download: https://osdn.net/projects/mingw/releases/
+Source0:	https://osdn.net/projects/mingw/downloads/74925/mingwrt-%{version}-mingw32-src.tar.xz
+# Source0-md5:	09f7ed7f4b134448ec4f9112f8a241f5
 Patch0:		%{name}-gawk.patch
 Patch1:		%{name}-stdinc.patch
-# http://sourceforge.net/p/mingw/bugs/2122/, adapted for 5.0.x, change errno_t header to <sys/types.h>
-Patch2:		rand_s-mingw.patch
-URL:		http://www.mingw.org/
+Patch2:		%{name}-oldlib.patch
+URL:		https://osdn.net/projects/mingw/
 BuildRequires:	autoconf >= 2.68
 BuildRequires:	automake
 BuildRequires:	crossmingw32-binutils
 BuildRequires:	crossmingw32-gcc
 BuildRequires:	crossmingw32-w32api >= 1:%{version}
 BuildRequires:	dos2unix
+BuildRequires:	tar >= 1:1.22
+BuildRequires:	xz
 Requires:	crossmingw32-binutils >= 2.15.91.0.2-2
 Requires:	crossmingw32-w32api >= 1:%{version}
 Obsoletes:	crossmingw32-platform
@@ -31,7 +33,8 @@ BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 %define		_dlldir			/usr/share/wine/windows/system
 
 # strip fails on static COFF files
-%define		no_install_post_strip 1
+%define		no_install_post_strip	1
+%define		_enable_debug_packages	0
 
 # -z options are invalid for mingw linker, most of -f options are Linux-specific
 %define		filterout_ld	-Wl,-z,.*
@@ -77,10 +80,10 @@ Biblioteka uruchomieniowa MingW32 DLL dla Windows.
 dos2unix Makefile.in configure.ac */Makefile.in
 %patch0 -p1
 %patch1 -p1
-%patch2 -p0
+%patch2 -p1
 
 %build
-cp %{_includedir}/w32api.h w32api.h.in
+cp -p %{_includedir}/w32api.h w32api.h.in
 cp /usr/share/automake/config.sub .
 %{__autoconf}
 ./configure \
@@ -88,14 +91,14 @@ cp /usr/share/automake/config.sub .
 	--libdir=%{_libdir} \
 	--host=%{target} \
 	--build=%{_target_platform}
-%{__make} -j1
+
+%{__make} -j1 all all-optional-dlls \
+	w32api_srcdir=%{_prefix}
 
 %install
 rm -rf $RPM_BUILD_ROOT
-# makefile expects dir before creating it
-#install -d $RPM_BUILD_ROOT%{_includedir}
 
-%{__make} -j1 install \
+%{__make} -j1 install install-optional-dlls \
 	DESTDIR=$RPM_BUILD_ROOT
 
 install -d $RPM_BUILD_ROOT%{_dlldir}
@@ -113,6 +116,7 @@ rm -rf $RPM_BUILD_ROOT
 %defattr(644,root,root,755)
 %doc CONTRIBUTORS ChangeLog DISCLAIMER README TODO readme.txt
 %{_includedir}/_mingw.h
+%{_includedir}/alloca.h
 %{_includedir}/assert.h
 %{_includedir}/complex.h
 %{_includedir}/conio.h
@@ -172,10 +176,16 @@ rm -rf $RPM_BUILD_ROOT
 %{_libdir}/libcrtdll.a
 %{_libdir}/libgmon.a
 %{_libdir}/libm.a
-%{_libdir}/libmingw*.a
+%{_libdir}/libmemalign.a
+%{_libdir}/libmingw32.a
+%{_libdir}/libmingwex.a
+%{_libdir}/libmingwex.dll.a
+%{_libdir}/libmingwthrd.a
+%{_libdir}/libmingwthrd_old.a
 %{_libdir}/libmoldname*.a
 %{_libdir}/libmsvcr*.a
 
 %files dll
 %defattr(644,root,root,755)
 %{_dlldir}/mingwm10.dll
+%{_dlldir}/libmingwex-4.dll
diff --git a/crossmingw32-runtime-oldlib.patch b/crossmingw32-runtime-oldlib.patch
new file mode 100644
index 0000000..3033d6f
--- /dev/null
+++ b/crossmingw32-runtime-oldlib.patch
@@ -0,0 +1,29 @@
+--- mingwrt-5.4.2/include/stdlib.h.orig	2021-04-11 20:05:19.000000000 +0200
++++ mingwrt-5.4.2/include/stdlib.h	2022-02-14 20:44:09.587661665 +0100
+@@ -564,6 +564,7 @@ _CRTIMP __cdecl __MINGW_NOTHROW  void *m
+ _CRTIMP __cdecl __MINGW_NOTHROW  void *realloc (void *, size_t);
+ _CRTIMP __cdecl __MINGW_NOTHROW  void free (void *);
+ 
++#ifndef __MINGW_OLD_MEMAPI__
+ /* The following pair of MinGW alternatives to realloc() and free() are
+  * always suitable as substitutes for their MSVCRT.DLL counterparts; the
+  * advantage of such substitutions is that these alternatives are able to
+@@ -641,6 +642,8 @@ int posix_memalign (void **__p, size_t _
+ }
+ #endif	/* POSIX.1-2001 */
+ 
++#endif  /* __MINGW_OLD_MEMAPI__ */
++
+ /* bsearch() and qsort() are declared both here, in <stdlib.h>, and in
+  * non-ANSI header <search.h>; we reproduce these declarations in both,
+  * with no attempt to guard them, so the compiler may verify that they
+--- mingwrt-5.4.2/mthr.c.orig	2022-02-14 20:44:29.520887011 +0100
++++ mingwrt-5.4.2/mthr.c	2022-02-14 20:44:32.267538798 +0100
+@@ -18,6 +18,7 @@
+  *
+  */
+ 
++#define __MINGW_OLD_MEMAPI__ 1
+ #define WIN32_LEAN_AND_MEAN
+ #include <windows.h>
+ #undef WIN32_LEAN_AND_MEAN
diff --git a/rand_s-mingw.patch b/rand_s-mingw.patch
deleted file mode 100644
index ccbc91b..0000000
--- a/rand_s-mingw.patch
+++ /dev/null
@@ -1,26 +0,0 @@
---- include/sys/types.h.orig	2017-07-09 22:38:20.000000000 +0200
-+++ include/sys/types.h	2018-09-14 22:18:03.620329409 +0200
-@@ -222,5 +222,10 @@
- #endif
- #endif  /* _SYS_TYPES_H normal inclusion */
- 
-+#ifndef _ERRCODE_DEFINED
-+#define _ERRCODE_DEFINED
-+typedef int errno_t;
-+#endif
-+
- #endif	/* ! RC_INVOKED */
- #endif	/* !_SYS_TYPES_H: $RCSfile: types.h,v $: end of file */
---- include/stdlib.h.orig	2018-09-14 22:19:47.526994890 +0200
-+++ include/stdlib.h	2018-09-14 22:20:54.966994122 +0200
-@@ -481,6 +481,10 @@
- _CRTIMP __cdecl __MINGW_NOTHROW  int rand (void);
- _CRTIMP __cdecl __MINGW_NOTHROW  void srand (unsigned int);
- 
-+#if defined (_CRT_RAND_S) && (WINVER >= 0x0501)
-+_CRTIMP __cdecl __MINGW_NOTHROW  errno_t rand_s (unsigned int*);
-+#endif
-+
- _CRTIMP __cdecl __MINGW_NOTHROW  void *calloc (size_t, size_t) __MINGW_ATTRIB_MALLOC;
- _CRTIMP __cdecl __MINGW_NOTHROW  void *malloc (size_t) __MINGW_ATTRIB_MALLOC;
- _CRTIMP __cdecl __MINGW_NOTHROW  void *realloc (void *, size_t);
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/crossmingw32-runtime.git/commitdiff/75a9cc84e34fb11acd2439325782b8b571c19c5b



More information about the pld-cvs-commit mailing list