diff --git a/.gitignore b/.gitignore index e69de29..170722c 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1,12 @@ +/mingw-w64-src_20120124.tar.bz2 +/mingw-w64-code-6228-trunk.zip +/mingw-w64-v3.0.0.tar.bz2 +/mingw-w64-code-6432-trunk.zip +/mingw-w64-code-6559-trunk.zip +/mingw-w64-mingw-w64-502c72047e68fecf07f628628b75296863ff5b35.zip +/mingw-w64-mingw-w64-430863ffea2f6101fbfc0ee35ee098ab2f96b53c.zip +/mingw-w64-v5.0.2.tar.bz2 +/mingw-w64-v5.0.3.tar.bz2 +/mingw-w64-v5.0.4.tar.bz2 +/mingw-w64-v6.0.0.tar.bz2 +/mingw-w64-v7.0.0.tar.bz2 diff --git a/mingw-w64-tools-aarch64.patch b/mingw-w64-tools-aarch64.patch new file mode 100644 index 0000000..3148e81 --- /dev/null +++ b/mingw-w64-tools-aarch64.patch @@ -0,0 +1,12 @@ +diff -rupN --no-dereference mingw-w64-v7.0.0/mingw-w64-tools/widl/include/windef.h mingw-w64-v7.0.0-new/mingw-w64-tools/widl/include/windef.h +--- mingw-w64-v7.0.0/mingw-w64-tools/widl/include/windef.h 2019-11-09 06:33:24.000000000 +0100 ++++ mingw-w64-v7.0.0-new/mingw-w64-tools/widl/include/windef.h 2020-06-20 01:18:23.248691595 +0200 +@@ -111,7 +111,7 @@ extern "C" { + #endif + + #ifndef __ms_va_list +-# if (defined(__x86_64__) || defined(__aarch64__)) && defined (__GNUC__) ++# if (defined(__x86_64__)) && defined (__GNUC__) + # define __ms_va_list __builtin_ms_va_list + # define __ms_va_start(list,arg) __builtin_ms_va_start(list,arg) + # define __ms_va_end(list) __builtin_ms_va_end(list) diff --git a/mingw-w64-tools-ppc64le.patch b/mingw-w64-tools-ppc64le.patch new file mode 100644 index 0000000..48a5f53 --- /dev/null +++ b/mingw-w64-tools-ppc64le.patch @@ -0,0 +1,12 @@ +diff -rupN --no-dereference mingw-w64-v7.0.0/mingw-w64-tools/widl/include/winnt.h mingw-w64-v7.0.0-new/mingw-w64-tools/widl/include/winnt.h +--- mingw-w64-v7.0.0/mingw-w64-tools/widl/include/winnt.h 2020-06-20 01:18:23.245691600 +0200 ++++ mingw-w64-v7.0.0-new/mingw-w64-tools/widl/include/winnt.h 2020-06-20 01:18:23.536691074 +0200 +@@ -2225,7 +2225,7 @@ typedef struct + DWORD Dr5; + DWORD Dr6; + DWORD Dr7; +-} CONTEXT; ++} CONTEXT, *PCONTEXT; + + typedef struct _STACK_FRAME_HEADER + { diff --git a/mingw-w64-tools-s390.patch b/mingw-w64-tools-s390.patch new file mode 100644 index 0000000..8060f85 --- /dev/null +++ b/mingw-w64-tools-s390.patch @@ -0,0 +1,103 @@ +diff -rupN --no-dereference mingw-w64-v7.0.0/mingw-w64-tools/widl/include/basetsd.h mingw-w64-v7.0.0-new/mingw-w64-tools/widl/include/basetsd.h +--- mingw-w64-v7.0.0/mingw-w64-tools/widl/include/basetsd.h 2019-11-09 06:33:24.000000000 +0100 ++++ mingw-w64-v7.0.0-new/mingw-w64-tools/widl/include/basetsd.h 2020-06-20 01:18:22.981692078 +0200 +@@ -36,7 +36,7 @@ extern "C" { + * 64-bit. + */ + +-#if (defined(__x86_64__) || defined(__powerpc64__) || defined(__aarch64__)) && !defined(_WIN64) ++#if (defined(__x86_64__) || defined(__powerpc64__) || defined(__aarch64__) || defined(__s390x__)) && !defined(_WIN64) + #define _WIN64 + #endif + +@@ -309,6 +309,10 @@ typedef ULONG_PTR KAFFINITY, *PKAFFINITY + # undef WORDS_BIGENDIAN + # undef BITFIELDS_BIGENDIAN + # undef ALLOW_UNALIGNED_ACCESS ++#elif defined(__s390__) ++# define WORDS_BIGENDIAN ++# define BITFIELDS_BIGENDIAN ++# define ALLOW_UNALIGNED_ACCESS + #elif !defined(RC_INVOKED) && !defined(__WIDL__) && !defined(__midl) + # error Unknown CPU architecture! + #endif +diff -rupN --no-dereference mingw-w64-v7.0.0/mingw-w64-tools/widl/include/winnt.h mingw-w64-v7.0.0-new/mingw-w64-tools/widl/include/winnt.h +--- mingw-w64-v7.0.0/mingw-w64-tools/widl/include/winnt.h 2019-11-09 06:33:24.000000000 +0100 ++++ mingw-w64-v7.0.0-new/mingw-w64-tools/widl/include/winnt.h 2020-06-20 01:18:22.982692077 +0200 +@@ -2248,6 +2248,36 @@ typedef struct _STACK_FRAME_HEADER + + #endif /* __powerpc__ */ + ++#ifdef __s390x__ ++ ++/* ++ * FIXME: ++ * ++ * There is no official CONTEXT structure defined for the S/390 ++ * architecture, so I just made one up. ++ * ++ * This structure is completely dummy, made just to build widl. ++ * ++ */ ++ ++#define CONTEXT_S390X 0x10000000 ++ ++#define CONTEXT_CONTROL (CONTEXT_S390X | 0x00000001) ++#define CONTEXT_FLOATING_POINT (CONTEXT_S390X | 0x00000002) ++#define CONTEXT_INTEGER (CONTEXT_S390X | 0x00000004) ++ ++#define CONTEXT_FULL (CONTEXT_CONTROL | CONTEXT_FLOATING_POINT | CONTEXT_INTEGER) ++ ++#define EXCEPTION_READ_FAULT 0 ++#define EXCEPTION_WRITE_FAULT 1 ++#define EXCEPTION_EXECUTE_FAULT 8 ++ ++typedef struct _CONTEXT ++{ ++} CONTEXT, *PCONTEXT; ++ ++#endif /* __s390x__ */ ++ + #if !defined(CONTEXT_FULL) && !defined(RC_INVOKED) + #error You need to define a CONTEXT for your CPU + #endif +diff -rupN --no-dereference mingw-w64-v7.0.0/mingw-w64-tools/widl/src/widl.c mingw-w64-v7.0.0-new/mingw-w64-tools/widl/src/widl.c +--- mingw-w64-v7.0.0/mingw-w64-tools/widl/src/widl.c 2019-11-09 06:33:24.000000000 +0100 ++++ mingw-w64-v7.0.0-new/mingw-w64-tools/widl/src/widl.c 2020-06-20 01:18:22.982692077 +0200 +@@ -102,6 +102,8 @@ enum target_cpu target_cpu = CPU_POWERPC + enum target_cpu target_cpu = CPU_ARM; + #elif defined(__aarch64__) + enum target_cpu target_cpu = CPU_ARM64; ++#elif defined(__s390x__) ++enum target_cpu target_cpu = CPU_S390X; + #else + #error Unsupported CPU + #endif +@@ -294,6 +296,7 @@ static void set_target( const char *targ + { "armv7a", CPU_ARM }, + { "arm64", CPU_ARM64 }, + { "aarch64", CPU_ARM64 }, ++ { "s390x", CPU_S390X } + }; + + unsigned int i; +@@ -755,6 +758,7 @@ int main(int argc,char *argv[]) + else pointer_size = 4; + break; + case CPU_x86_64: ++ case CPU_S390X: + if (pointer_size == 4) target_cpu = CPU_x86; + else pointer_size = 8; + break; +diff -rupN --no-dereference mingw-w64-v7.0.0/mingw-w64-tools/widl/src/widl.h mingw-w64-v7.0.0-new/mingw-w64-tools/widl/src/widl.h +--- mingw-w64-v7.0.0/mingw-w64-tools/widl/src/widl.h 2019-11-09 06:33:24.000000000 +0100 ++++ mingw-w64-v7.0.0-new/mingw-w64-tools/widl/src/widl.h 2020-06-20 01:18:22.982692077 +0200 +@@ -76,7 +76,7 @@ extern int char_number; + + enum target_cpu + { +- CPU_x86, CPU_x86_64, CPU_POWERPC, CPU_ARM, CPU_ARM64, CPU_LAST = CPU_ARM64 ++ CPU_x86, CPU_x86_64, CPU_POWERPC, CPU_ARM, CPU_ARM64, CPU_S390X, CPU_LAST = CPU_S390X + }; + + extern enum target_cpu target_cpu; diff --git a/mingw-w64-tools.spec b/mingw-w64-tools.spec new file mode 100644 index 0000000..cc2c7f4 --- /dev/null +++ b/mingw-w64-tools.spec @@ -0,0 +1,217 @@ +#%%global snapshot_date 20140530 +#%%global snapshot_rev 430863ffea2f6101fbfc0ee35ee098ab2f96b53c +#%%global snapshot_rev_short %(echo %snapshot_rev | cut -c1-6) +#%%global branch trunk + +Name: mingw-w64-tools +Version: 7.0.0 +Release: 2%{?dist} +Summary: Supplementary tools which are part of the mingw-w64 toolchain + +# http://sourceforge.net/mailarchive/forum.php?thread_name=5157C0FC.1010309%40users.sourceforge.net&forum_name=mingw-w64-public +# The tools gendef and genidl are GPLv3+, widl is LGPLv2+ +License: GPLv3+ and LGPLv2+ + +URL: http://mingw-w64.sourceforge.net/ +%if 0%{?snapshot_date} +# To regenerate a snapshot: +# Use your regular webbrowser to open https://sourceforge.net/p/mingw-w64/mingw-w64/ci/%{snapshot_rev}/tarball +# This triggers the SourceForge instructure to generate a snapshot +# After that you can pull in the archive with: +# spectool -g mingw-w64-tools.spec +Source0: http://sourceforge.net/code-snapshots/git/m/mi/mingw-w64/mingw-w64.git/mingw-w64-mingw-w64-%{snapshot_rev}.zip +%else +Source0: http://downloads.sourceforge.net/mingw-w64/mingw-w64-v%{version}.tar.bz2 +%endif +# just to make widl to build on s390 +Patch0: mingw-w64-tools-s390.patch + +# aarch64 does not seem to know about __builtin_ms_va_list +Patch1: mingw-w64-tools-aarch64.patch + +# fix ppc64le build +Patch2: mingw-w64-tools-ppc64le.patch + +BuildRequires: gcc +BuildRequires: mingw32-filesystem >= 95 +BuildRequires: mingw64-filesystem >= 95 + + +%description +Supplementary tools which are part of the mingw-w64 toolchain +It contains gendef, genidl and mingw-w64-widl + + +%prep +%if 0%{?snapshot_date} +rm -rf mingw-w64-v%{version} +mkdir mingw-w64-v%{version} +cd mingw-w64-v%{version} +unzip %{S:0} +%autosetup -p1 -D -T -n mingw-w64-v%{version}/mingw-w64-mingw-w64-%{snapshot_rev} +%else +%autosetup -p1 -n mingw-w64-v%{version} +%endif + + +%build +pushd mingw-w64-tools + pushd gendef + %configure + make %{?_smp_mflags} + popd + + pushd genidl + %configure + make %{?_smp_mflags} + popd + + pushd widl + # widl needs to be aware of the location of the IDL files belonging + # to the toolchain. Therefore it needs to be built for both the win32 + # and win64 targets + %global _configure ../configure + mkdir win32 + pushd win32 + %configure --target=%{mingw32_target} --program-prefix=%{mingw32_target}- --with-widl-includedir=%{mingw32_includedir} + %make_build + popd + mkdir win64 + pushd win64 + %configure --target=%{mingw64_target} --program-prefix=%{mingw64_target}- --with-widl-includedir=%{mingw64_includedir} + %make_build + popd + popd +popd + + +%install +pushd mingw-w64-tools + %make_install -C gendef + %make_install -C genidl + %make_install -C widl/win32 + %make_install -C widl/win64 +popd + + +%files +%license COPYING +%{_bindir}/gendef +%{_bindir}/genidl +%{_bindir}/%{mingw32_target}-widl +%{_bindir}/%{mingw64_target}-widl + + +%changelog +* Tue Jul 28 2020 Fedora Release Engineering - 7.0.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Sat Jun 20 2020 Sandro Mani - 7.0.0-1 +- Update to 7.0.0 + +* Wed Jan 29 2020 Fedora Release Engineering - 6.0.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Thu Jul 25 2019 Fedora Release Engineering - 6.0.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Tue May 07 2019 Sandro Mani - 6.0.0-1 +- Update to 6.0.0 + +* Fri Feb 01 2019 Fedora Release Engineering - 5.0.4-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Fri Jul 13 2018 Fedora Release Engineering - 5.0.4-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Mon Jul 09 2018 Kalev Lember - 5.0.4-1 +- Update to 5.0.4 + +* Thu Jun 14 2018 Sandro Mani - 5.0.3-1 +- Update to 5.0.3 + +* Thu Feb 08 2018 Fedora Release Engineering - 5.0.2-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Thu Aug 03 2017 Fedora Release Engineering - 5.0.2-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Wed Jul 26 2017 Fedora Release Engineering - 5.0.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Mon Jun 19 2017 Kalev Lember - 5.0.2-1 +- Update to 5.0.2 +- Use license macro for COPYING + +* Fri Feb 10 2017 Fedora Release Engineering - 3.1.999-0.9.trunk.git430863.20140530 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Thu Feb 04 2016 Fedora Release Engineering - 3.1.999-0.8.trunk.git430863.20140530 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Wed Jun 17 2015 Fedora Release Engineering - 3.1.999-0.7.trunk.git430863.20140530 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Sun Aug 17 2014 Fedora Release Engineering - 3.1.999-0.6.trunk.git430863.20140530 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Sat Jun 07 2014 Fedora Release Engineering - 3.1.999-0.5.trunk.git430863.20140530 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Fri May 30 2014 Erik van Pienbroek - 3.1.999-0.4.trunk.git430863.20140530 +- Update to 20140530 snapshot (git rev 430863f) +- Fixes compilation on aarch64 + +* Wed May 28 2014 Erik van Pienbroek - 3.1.999-0.3.trunk.git502c72.20140524 +- Update to 20140524 snapshot (git rev 502c72) +- Upstream has switched from SVN to Git + +* Sun Mar 30 2014 Erik van Pienbroek - 3.1.999-0.2.trunk.r6559.20140330 +- Update to r6559 (20140330 snapshot) + +* Thu Jan 9 2014 Erik van Pienbroek - 3.1.999-0.1.trunk.r6432.20140104 +- Bump version to keep working upgrade path + +* Sat Jan 4 2014 Erik van Pienbroek - 3.0.999-0.1.trunk.r6432.20140104 +- Update to r6432 (20140104 snapshot) + +* Sat Jan 4 2014 Erik van Pienbroek - 3.0.0-1 +- Update to 3.0.0 + +* Wed Jan 1 2014 Yaakov Selkowitz - 2.0.999-0.10.trunk.r6228.20130907 +- Fix widl default includedir (RHBZ #1047727) + +* Sat Sep 7 2013 Erik van Pienbroek - 2.0.999-0.9.trunk.r6228.20130907 +- Update to r6228 (20130907 snapshot) +- Updated instructions to regenerate snapshots + (SourceForge has changed their SVN infrastructure) + +* Sat Aug 03 2013 Fedora Release Engineering - 2.0.999-0.8.trunk.20130403 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Wed Apr 3 2013 Erik van Pienbroek - 2.0.999-0.7.trunk.20130403 +- Update to 20130403 snapshot +- Use a different source tarball which doesn't contain unrelevant code (like libiberty) +- Removed Provides: bundled(libiberty) +- Make sure the widl tool is built for both win32 and win64 toolchains +- Upstream has changed the license of the gendef and genidl tools to GPLv3+ + The license of the widl tool is LGPLv2+ + +* Thu Feb 14 2013 Fedora Release Engineering - 2.0.999-0.6.trunk.20120124 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Mon Oct 15 2012 Jon Ciesla - 2.0.999-0.5.trunk.20120124 +- Provides: bundled(libiberty) + +* Fri Jul 20 2012 Fedora Release Engineering - 2.0.999-0.4.trunk.20120124 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Wed Mar 28 2012 Dan HorĂ¡k - 2.0.999-0.3.trunk.20120124 +- fix build on s390(x) + +* Sun Mar 11 2012 Erik van Pienbroek - 2.0.999-0.2.trunk.20120124 +- Eliminated several conditionals + +* Mon Jan 30 2012 Erik van Pienbroek - 2.0.999-0.1.trunk.20120124 +- Initial package + diff --git a/sources b/sources new file mode 100644 index 0000000..c5b67c8 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (mingw-w64-v7.0.0.tar.bz2) = 30e5b2824a24eeb99ab519e3fc134cc9a7f04ee8b853bc8d66a13d1ab74144bf78b93e162bfe6de2a5e61f63c0e620a933b260b02d019cd68cc4b78bd36c67fd