diff options
| author | Matthew Oliver <protogonoi@gmail.com> | 2020-08-19 05:58:14 +1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-08-18 12:58:14 -0700 |
| commit | 272269583c80a4ba626d405e79a88a2ddd6d950d (patch) | |
| tree | aca2bd4c6ea94d1656e983492752ea33c2b0bb1e /ports/sdl2 | |
| parent | bc8807963282a6b01f0e7ba94b732c5ec028d6a1 (diff) | |
| download | vcpkg-272269583c80a4ba626d405e79a88a2ddd6d950d.tar.gz vcpkg-272269583c80a4ba626d405e79a88a2ddd6d950d.zip | |
[ffmpeg] Add feature support for zlib, iconv, fdk-aac, mp3lame, opus, soxr, theora. (#11277)
Co-authored-by: Phoebe <20694052+PhoebeHui@users.noreply.github.com>
Diffstat (limited to 'ports/sdl2')
| -rw-r--r-- | ports/sdl2/0006-sdl2-Enable-creation-of-pkg-cfg-file-on-windows.patch | 33 | ||||
| -rw-r--r-- | ports/sdl2/CONTROL | 3 | ||||
| -rw-r--r-- | ports/sdl2/portfile.cmake | 12 |
3 files changed, 47 insertions, 1 deletions
diff --git a/ports/sdl2/0006-sdl2-Enable-creation-of-pkg-cfg-file-on-windows.patch b/ports/sdl2/0006-sdl2-Enable-creation-of-pkg-cfg-file-on-windows.patch new file mode 100644 index 000000000..064885b08 --- /dev/null +++ b/ports/sdl2/0006-sdl2-Enable-creation-of-pkg-cfg-file-on-windows.patch @@ -0,0 +1,33 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 7dfd35389..7944f401b 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1916,9 +1916,10 @@ listtostr(EXTRA_CFLAGS _EXTRA_CFLAGS) + set(EXTRA_CFLAGS ${_EXTRA_CFLAGS}) + + # Compat helpers for the configuration files +-if(NOT WINDOWS OR CYGWIN) + # TODO: we need a Windows script, too ++ if(NOT WINDOWS OR CYGWIN) + execute_process(COMMAND sh ${SDL2_SOURCE_DIR}/build-scripts/updaterev.sh) ++ endif() + + set(prefix ${CMAKE_INSTALL_PREFIX}) + set(exec_prefix "\${prefix}") +@@ -1960,7 +1961,6 @@ if(NOT WINDOWS OR CYGWIN) + "${SDL2_BINARY_DIR}/sdl2-config" @ONLY) + configure_file("${SDL2_SOURCE_DIR}/SDL2.spec.in" + "${SDL2_BINARY_DIR}/SDL2.spec" @ONLY) +-endif() + + ##### Info output ##### + message(STATUS "") +@@ -2198,6 +2198,7 @@ if(NOT (WINDOWS OR CYGWIN)) + # TODO: what about the .spec file? Is it only needed for RPM creation? + install(FILES "${SDL2_SOURCE_DIR}/sdl2.m4" DESTINATION "${CMAKE_INSTALL_FULL_DATAROOTDIR}/aclocal") + endif() ++install(FILES ${SDL2_BINARY_DIR}/sdl2.pc DESTINATION "lib${LIB_SUFFIX}/pkgconfig") + + ##### Uninstall target ##### + + diff --git a/ports/sdl2/CONTROL b/ports/sdl2/CONTROL index f9bdadb69..7ea632935 100644 --- a/ports/sdl2/CONTROL +++ b/ports/sdl2/CONTROL @@ -1,5 +1,6 @@ Source: sdl2 -Version: 2.0.12-1 +Version: 2.0.12 +Port-Version: 3 Homepage: https://www.libsdl.org/download-2.0.php Description: Simple DirectMedia Layer is a cross-platform development library designed to provide low level access to audio, keyboard, mouse, joystick, and graphics hardware via OpenGL and Direct3D. diff --git a/ports/sdl2/portfile.cmake b/ports/sdl2/portfile.cmake index 366ad1e3a..ef287e301 100644 --- a/ports/sdl2/portfile.cmake +++ b/ports/sdl2/portfile.cmake @@ -15,6 +15,7 @@ vcpkg_extract_source_archive_ex( fix-space-in-path.patch disable-wcslcpy-and-wcslcat-for-windows.patch fix-EventToken-header-reference.patch + 0006-sdl2-Enable-creation-of-pkg-cfg-file-on-windows.patch ) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" SDL_STATIC) @@ -83,3 +84,14 @@ endif() file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) configure_file(${SOURCE_PATH}/COPYING.txt ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) vcpkg_copy_pdbs() + +set(DYLIB_COMPATIBILITY_VERSION_REGEX "set\\(DYLIB_COMPATIBILITY_VERSION (.+)\\)") +set(DYLIB_CURRENT_VERSION_REGEX "set\\(DYLIB_CURRENT_VERSION (.+)\\)") +file(STRINGS "${SOURCE_PATH}/CMakeLists.txt" DYLIB_COMPATIBILITY_VERSION REGEX ${DYLIB_COMPATIBILITY_VERSION_REGEX}) +file(STRINGS "${SOURCE_PATH}/CMakeLists.txt" DYLIB_CURRENT_VERSION REGEX ${DYLIB_CURRENT_VERSION_REGEX}) +string(REGEX REPLACE ${DYLIB_COMPATIBILITY_VERSION_REGEX} "\\1" DYLIB_COMPATIBILITY_VERSION "${DYLIB_COMPATIBILITY_VERSION}") +string(REGEX REPLACE ${DYLIB_CURRENT_VERSION_REGEX} "\\1" DYLIB_CURRENT_VERSION "${DYLIB_CURRENT_VERSION}") + +vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/sdl2.pc" "-lSDL2" "-lSDL2d") + +vcpkg_fixup_pkgconfig(IGNORE_FLAGS "-Wl,-rpath,${CURRENT_PACKAGES_DIR}/lib/pkgconfig/../../lib" "-Wl,-rpath,${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/../../lib" "-Wl,--enable-new-dtags" "-Wl,--no-undefined" "-Wl,-undefined,error" "-Wl,-compatibility_version,${DYLIB_COMPATIBILITY_VERSION}" "-Wl,-current_version,${DYLIB_CURRENT_VERSION}" "-Wl,-weak_framework,Metal" "-Wl,-weak_framework,QuartzCore") |
