diff options
| author | Lily <47812810+LilyWangL@users.noreply.github.com> | 2020-11-04 08:25:46 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-11-03 16:25:46 -0800 |
| commit | 0b26c1fe58d2f5f3a3ecd8face441724d6f0dd9f (patch) | |
| tree | 63cf31b4e63497e6b3dbad4199180512b7818e09 /ports/sdl2-gfx | |
| parent | ec6fe06e8da05a8157dc8581fa96b36b571c1bd5 (diff) | |
| download | vcpkg-0b26c1fe58d2f5f3a3ecd8face441724d6f0dd9f.tar.gz vcpkg-0b26c1fe58d2f5f3a3ecd8face441724d6f0dd9f.zip | |
[libsamplerate, sdl2-gfx] Fix build error with Visual Studio 2019 version 16.9 (#14348)
Diffstat (limited to 'ports/sdl2-gfx')
| -rw-r--r-- | ports/sdl2-gfx/002-use-the-lrintf-intrinsic.patch | 14 | ||||
| -rw-r--r-- | ports/sdl2-gfx/CONTROL | 3 | ||||
| -rw-r--r-- | ports/sdl2-gfx/portfile.cmake | 1 |
3 files changed, 17 insertions, 1 deletions
diff --git a/ports/sdl2-gfx/002-use-the-lrintf-intrinsic.patch b/ports/sdl2-gfx/002-use-the-lrintf-intrinsic.patch new file mode 100644 index 000000000..51af54d71 --- /dev/null +++ b/ports/sdl2-gfx/002-use-the-lrintf-intrinsic.patch @@ -0,0 +1,14 @@ +diff --git a/SDL2_gfxPrimitives.c b/SDL2_gfxPrimitives.c +index d8afb10..6c88288 100644 +--- a/SDL2_gfxPrimitives.c ++++ b/SDL2_gfxPrimitives.c +@@ -1757,7 +1757,8 @@ int filledCircleRGBA(SDL_Renderer * renderer, Sint16 x, Sint16 y, Sint16 rad, Ui + /* ----- AA Ellipse */ + + /* Windows targets do not have lrint, so provide a local inline version */ +-#if defined(_MSC_VER) ++/* MSVC pre 16.8 do not have lrint */ ++#if defined(_MSC_VER) && _MSC_VER < 1928 + /* Detect 64bit and use intrinsic version */ + #ifdef _M_X64 + #include <emmintrin.h> diff --git a/ports/sdl2-gfx/CONTROL b/ports/sdl2-gfx/CONTROL index 9a69a4558..72dfb87eb 100644 --- a/ports/sdl2-gfx/CONTROL +++ b/ports/sdl2-gfx/CONTROL @@ -1,4 +1,5 @@ Source: sdl2-gfx -Version: 1.0.4-6 +Version: 1.0.4 +Port-Version: 7 Build-Depends: sdl2 Description: Graphics primitives (line, circle, rectangle etc.) with AA support, rotozoomer and other drawing related support functions wrapped up in a C based add-on library for the Simple Direct Media (SDL) cross-platform API layer.
\ No newline at end of file diff --git a/ports/sdl2-gfx/portfile.cmake b/ports/sdl2-gfx/portfile.cmake index 383192053..16616c23b 100644 --- a/ports/sdl2-gfx/portfile.cmake +++ b/ports/sdl2-gfx/portfile.cmake @@ -12,6 +12,7 @@ vcpkg_extract_source_archive_ex( REF ${VERSION} PATCHES 001-lrint-arm64.patch + 002-use-the-lrintf-intrinsic.patch ) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) |
