SDL2: Fix static library name for mingw
This commit is contained in:
11
mingw-w64-SDL2/003-fix-static-library-name.patch
Normal file
11
mingw-w64-SDL2/003-fix-static-library-name.patch
Normal file
@@ -0,0 +1,11 @@
|
||||
--- SDL2-2.0.12/CMakeLists.txt.orig 2020-04-13 09:22:12.737714600 +0300
|
||||
+++ SDL2-2.0.12/CMakeLists.txt 2020-04-13 09:22:17.728045700 +0300
|
||||
@@ -2099,7 +2099,7 @@
|
||||
if(SDL_STATIC)
|
||||
set (BUILD_SHARED_LIBS FALSE)
|
||||
add_library(SDL2-static STATIC ${SOURCE_FILES})
|
||||
- if (NOT SDL_SHARED OR NOT WIN32)
|
||||
+ if (NOT SDL_SHARED OR NOT MSVC)
|
||||
set_target_properties(SDL2-static PROPERTIES OUTPUT_NAME "SDL2")
|
||||
# Note: Apparently, OUTPUT_NAME must really be unique; even when
|
||||
# CMAKE_IMPORT_LIBRARY_SUFFIX or the like are given. Otherwise
|
||||
@@ -5,7 +5,7 @@ _realname=SDL2
|
||||
pkgbase=mingw-w64-${_realname}
|
||||
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
|
||||
pkgver=2.0.12
|
||||
pkgrel=3
|
||||
pkgrel=4
|
||||
pkgdesc="A library for portable low-level access to a video framebuffer, audio output, mouse, and keyboard (Version 2) (mingw-w64)"
|
||||
arch=('any')
|
||||
url="https://libsdl.org"
|
||||
@@ -19,17 +19,20 @@ depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs"
|
||||
options=('staticlibs' 'strip')
|
||||
source=("https://libsdl.org/release/SDL2-${pkgver}.tar.gz"{,.sig}
|
||||
001-fix-cmake-target-relocation.patch
|
||||
002-fix-link-order.patch)
|
||||
002-fix-link-order.patch
|
||||
003-fix-static-library-name.patch)
|
||||
sha256sums=('349268f695c02efbc9b9148a70b85e58cefbbf704abd3e91be654db7f1e2c863'
|
||||
'SKIP'
|
||||
'7150ff7c7549d919560eaff44d6f6f76feadbc7da7ce82ca3dcb8e67a91d1daa'
|
||||
'4a3906a9b9989dba4967454512921660e0fb275c35263d8ef7d7b34fa5a95e57')
|
||||
'4a3906a9b9989dba4967454512921660e0fb275c35263d8ef7d7b34fa5a95e57'
|
||||
'a327673cd9d0e60d762860cf8dc96134b6b283314640e5803d918e7f5cd8f9ee')
|
||||
validpgpkeys=('1528635D8053A57F77D1E08630A59377A7763BE6') # Sam Lantinga
|
||||
|
||||
prepare() {
|
||||
cd "${srcdir}"/${_realname}-${pkgver}
|
||||
patch -p1 -i ${srcdir}/001-fix-cmake-target-relocation.patch
|
||||
patch -p1 -i ${srcdir}/002-fix-link-order.patch
|
||||
patch -p1 -i ${srcdir}/003-fix-static-library-name.patch
|
||||
}
|
||||
|
||||
build() {
|
||||
@@ -40,15 +43,10 @@ build() {
|
||||
${MINGW_PREFIX}/bin/cmake.exe \
|
||||
-G"MSYS Makefiles" \
|
||||
-DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DVIDEO_VULKAN=ON \
|
||||
../${_realname}-${pkgver}
|
||||
|
||||
# ../${_realname}-${pkgver}/configure \
|
||||
# --prefix=${MINGW_PREFIX} \
|
||||
# --build=${MINGW_CHOST} \
|
||||
# --host=${MINGW_CHOST} \
|
||||
# --enable-video-vulkan
|
||||
|
||||
make
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user