Add mingw-SDL2_lmingw32.patch

epel9
Sandro Mani 3 years ago
parent 3088381d6c
commit 2703e862f4

@ -2,12 +2,17 @@
Name: mingw-SDL2
Version: 2.0.20
Release: 2%{?dist}
Release: 3%{?dist}
Summary: MinGW Windows port of SDL2 cross-platform multimedia library
License: LGPLv2+
URL: http://www.libsdl.org/
Source0: http://www.libsdl.org/release/SDL2-%{version}.tar.gz
# Fix -lmingw32 order in in SDL_LIBS
# The link order must be -lmingw32 -lSDL2main -lSDL2, otherwise
# undefined reference to `WinMain@16'
# appers in consumers
Patch0: mingw-SDL2_lmingw32.patch
BuildArch: noarch
@ -122,6 +127,9 @@ device.
%changelog
* Wed Mar 02 2022 Sandro Mani <manisandro@gmail.com> - 2.0.22-3
- Add mingw-SDL2_lmingw32.patch
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.20-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild

@ -0,0 +1,12 @@
diff -rupN SDL2-2.0.20/CMakeLists.txt SDL2-2.0.20-new/CMakeLists.txt
--- SDL2-2.0.20/CMakeLists.txt 2022-01-08 22:13:56.000000000 +0100
+++ SDL2-2.0.20-new/CMakeLists.txt 2022-03-02 12:41:51.634494670 +0100
@@ -1787,7 +1787,7 @@ elseif(WINDOWS)
list(APPEND EXTRA_LIBS mingw32)
list(APPEND EXTRA_LDFLAGS "-mwindows")
set(SDL_CFLAGS "${SDL_CFLAGS} -Dmain=SDL_main")
- list(APPEND SDL_LIBS "-lmingw32" "-lSDL2main" "-mwindows")
+ list(APPEND SDL_LIBS "-lSDL2main" "-lmingw32" "-mwindows")
endif()
elseif(APPLE)
Loading…
Cancel
Save