diff --git a/ports/libflac/CONTROL b/ports/libflac/CONTROL index 745494c770..4c57d1f68b 100644 --- a/ports/libflac/CONTROL +++ b/ports/libflac/CONTROL @@ -1,5 +1,6 @@ Source: libflac -Version: 1.3.3-1 +Version: 1.3.3 +Port-Version: 2 Homepage: https://xiph.org/flac/ Description: Library for manipulating FLAC files Build-Depends: libogg diff --git a/ports/libflac/portfile.cmake b/ports/libflac/portfile.cmake index 72309d9bba..ab126edd95 100644 --- a/ports/libflac/portfile.cmake +++ b/ports/libflac/portfile.cmake @@ -9,6 +9,12 @@ vcpkg_from_github( "${CMAKE_CURRENT_LIST_DIR}/uwp-createfile2.patch" ) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + set(BUILD_SHARED_LIBS ON) +else() + set(BUILD_SHARED_LIBS OFF) +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA @@ -16,7 +22,8 @@ vcpkg_configure_cmake( -DBUILD_PROGRAMS=OFF -DBUILD_EXAMPLES=OFF -DBUILD_DOCS=OFF - -DBUILD_TESTING=OFF) + -DBUILD_TESTING=OFF + -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS}) vcpkg_install_cmake() vcpkg_fixup_cmake_targets( @@ -28,6 +35,26 @@ vcpkg_copy_pdbs() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/FLAC/export.h + "#if defined(FLAC__NO_DLL)" + "#if 0" + ) + vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/FLAC++/export.h + "#if defined(FLAC__NO_DLL)" + "#if 0" + ) +else() + vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/FLAC/export.h + "#if defined(FLAC__NO_DLL)" + "#if 1" + ) + vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/FLAC++/export.h + "#if defined(FLAC__NO_DLL)" + "#if 1" + ) +endif() + # This license (BSD) is relevant only for library - if someone would want to install # FLAC cmd line tools as well additional license (GPL) should be included file(COPY ${SOURCE_PATH}/COPYING.Xiph DESTINATION ${CURRENT_PACKAGES_DIR}/share/libflac) diff --git a/ports/libsndfile/CONTROL b/ports/libsndfile/CONTROL index ed59ac139e..913af809d2 100644 --- a/ports/libsndfile/CONTROL +++ b/ports/libsndfile/CONTROL @@ -1,5 +1,6 @@ Source: libsndfile -Version: 1.0.29-9 +Version: 1.0.29 +Port-Version: 10 Description: Library to read, write and manipulate many soundfile types. Authored by Eric de Castro Lopo Homepage: https://github.com/erikd/libsndfile Default-Features: external-libs diff --git a/ports/libsndfile/portfile.cmake b/ports/libsndfile/portfile.cmake index ce8f9427b7..1e86fbffbd 100644 --- a/ports/libsndfile/portfile.cmake +++ b/ports/libsndfile/portfile.cmake @@ -19,9 +19,6 @@ option(BUILD_EXECUTABLES "Build sndfile tools and install to folder tools" OFF) if("external-libs" IN_LIST FEATURES) set(SNDFILE_WITHOUT_EXTERNAL_LIBS OFF) - if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") - set(FLAC_EXPORT_DEFINITION "-DFLAC__NO_DLL") - endif() else() set(SNDFILE_WITHOUT_EXTERNAL_LIBS ON) endif() @@ -37,7 +34,6 @@ vcpkg_configure_cmake( -DENABLE_STATIC_RUNTIME=${CRT_LIB_STATIC} -DBUILD_STATIC_LIBS=${BUILD_STATIC} -DDISABLE_EXTERNAL_LIBS=${SNDFILE_WITHOUT_EXTERNAL_LIBS} - -DCMAKE_C_FLAGS=${FLAC_EXPORT_DEFINITION} OPTIONS_RELEASE -DBUILD_PROGRAMS=${BUILD_EXECUTABLES} OPTIONS_DEBUG diff --git a/ports/sdl2-mixer/CMakeLists.txt b/ports/sdl2-mixer/CMakeLists.txt index b5b5eac619..cc9816d0b7 100644 --- a/ports/sdl2-mixer/CMakeLists.txt +++ b/ports/sdl2-mixer/CMakeLists.txt @@ -91,7 +91,7 @@ add_library(SDL2_mixer music_wav.c version.rc) -if(WIN32 OR APPLE) +if((WIN32 OR APPLE) AND SDL_MIXER_ENABLE_NATIVEMIDI) list(APPEND SDL_MIXER_DEFINES MUSIC_MID_NATIVE) target_sources(SDL2_mixer PRIVATE music_nativemidi.c native_midi/native_midi_common.c) target_link_libraries(SDL2_mixer ${SDL_MIXER_LIBRARIES}) diff --git a/ports/sdl2-mixer/CONTROL b/ports/sdl2-mixer/CONTROL index 4ea51192ef..ef18e139de 100644 --- a/ports/sdl2-mixer/CONTROL +++ b/ports/sdl2-mixer/CONTROL @@ -1,12 +1,17 @@ Source: sdl2-mixer -Version: 2.0.4-9 +Version: 2.0.4 +Port-Version: 10 Homepage: https://www.libsdl.org/projects/SDL_mixer Description: Multi-channel audio mixer library for SDL. Build-Depends: sdl2 +Default-Features: nativemidi Feature: dynamic-load Description: Load plugins with dynamic call +Feature: nativemidi +Description: Support for MIDI audio format on Windows and macOS. + Feature: libflac Description: Support for FLAC audio format. Build-Depends: libflac diff --git a/ports/sdl2-mixer/portfile.cmake b/ports/sdl2-mixer/portfile.cmake index 74037d2f6b..16e45c5d88 100644 --- a/ports/sdl2-mixer/portfile.cmake +++ b/ports/sdl2-mixer/portfile.cmake @@ -34,6 +34,7 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS libmodplug SDL_MIXER_ENABLE_MOD libvorbis SDL_MIXER_ENABLE_OGGVORBIS opusfile SDL_MIXER_ENABLE_OPUS + nativemidi SDL_MIXER_ENABLE_NATIVEMIDI ) vcpkg_configure_cmake(