diff options
| author | Hendrik <dev.nipe.systems@gmail.com> | 2021-06-29 03:04:09 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-06-28 18:04:09 -0700 |
| commit | c9ba340993209b9ae1f9da787defcd257df2fecc (patch) | |
| tree | 98172b7de12c7b79dc39ecfd5886141ff21ad097 | |
| parent | e2d10224003824e48356b1d80055a6b4c1ffbf87 (diff) | |
| download | vcpkg-c9ba340993209b9ae1f9da787defcd257df2fecc.tar.gz vcpkg-c9ba340993209b9ae1f9da787defcd257df2fecc.zip | |
[portaudio] Switch to vcpkg_from_github, minor format improvements (#18065)
* Add portaudio:: namespace
* Switch from vcpkg_from_git to vcpkg_from_github
* Convert portfile to unix line-endings
* Increase port-version of portaudio
* Update version hash of portaudio
* Remove namespace patch
Signed-off-by: Hendrik <git@h3ndrk.de>
* Update version hash of portaudio
* Fix indent issue
* Update the baseline version
* Fix the port version
* Fix baseline version
* Remove redundant tag in portfile
* Update version hash of portaudio
Co-authored-by: PhoebeHui <20694052+PhoebeHui@users.noreply.github.com>
| -rw-r--r-- | ports/portaudio/fix-library-can-not-be-found.patch | 32 | ||||
| -rw-r--r-- | ports/portaudio/portfile.cmake | 88 | ||||
| -rw-r--r-- | ports/portaudio/vcpkg.json | 1 | ||||
| -rw-r--r-- | versions/baseline.json | 2 | ||||
| -rw-r--r-- | versions/p-/portaudio.json | 5 |
5 files changed, 67 insertions, 61 deletions
diff --git a/ports/portaudio/fix-library-can-not-be-found.patch b/ports/portaudio/fix-library-can-not-be-found.patch index 93353d7ee..7ef3e581d 100644 --- a/ports/portaudio/fix-library-can-not-be-found.patch +++ b/ports/portaudio/fix-library-can-not-be-found.patch @@ -1,16 +1,16 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 1024016..266e6d5 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -352,11 +352,6 @@ ENDIF()
- # embedded builds this is not an issue as they will only build the configuration
- # used in the host application.
- MARK_AS_ADVANCED(PA_LIBNAME_ADD_SUFFIX)
--IF(MSVC AND PA_BUILD_STATIC AND PA_BUILD_SHARED AND NOT PA_LIBNAME_ADD_SUFFIX)
-- MESSAGE(WARNING "Building both shared and static libraries, and avoiding the suffix _static will lead to a name conflict")
-- SET(PA_LIBNAME_ADD_SUFFIX ON CACHE BOOL "Forcing use of suffix _static to avoid name conflict between static and import library" FORCE)
-- MESSAGE(WARNING "PA_LIBNAME_ADD_SUFFIX was set to ON")
--ENDIF()
-
- SET(PA_TARGETS "")
-
+diff --git a/CMakeLists.txt b/CMakeLists.txt +index 122fe93..b571c38 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -360,11 +360,6 @@ ENDIF() + # embedded builds this is not an issue as they will only build the configuration + # used in the host application. + MARK_AS_ADVANCED(PA_LIBNAME_ADD_SUFFIX) +-IF(MSVC AND PA_BUILD_STATIC AND PA_BUILD_SHARED AND NOT PA_LIBNAME_ADD_SUFFIX) +- MESSAGE(WARNING "Building both shared and static libraries, and avoiding the suffix _static will lead to a name conflict") +- SET(PA_LIBNAME_ADD_SUFFIX ON CACHE BOOL "Forcing use of suffix _static to avoid name conflict between static and import library" FORCE) +- MESSAGE(WARNING "PA_LIBNAME_ADD_SUFFIX was set to ON") +-ENDIF() + + SET(PA_TARGETS "") + diff --git a/ports/portaudio/portfile.cmake b/ports/portaudio/portfile.cmake index 76f1e71f6..95d047b24 100644 --- a/ports/portaudio/portfile.cmake +++ b/ports/portaudio/portfile.cmake @@ -1,44 +1,44 @@ -vcpkg_fail_port_install(ON_TARGET "uwp")
-vcpkg_from_git(
- OUT_SOURCE_PATH SOURCE_PATH
- URL https://github.com/PortAudio/portaudio.git
- REF 147dd722548358763a8b649b3e4b41dfffbcfbb6
- TAG v19.7.0
- PATCHES
- fix-library-can-not-be-found.patch
-)
-
-string(COMPARE EQUAL ${VCPKG_LIBRARY_LINKAGE} dynamic PA_BUILD_SHARED)
-string(COMPARE EQUAL ${VCPKG_LIBRARY_LINKAGE} static PA_BUILD_STATIC)
-
-# NOTE: the ASIO backend will be built automatically if the ASIO-SDK is provided
-# in a sibling folder of the portaudio source in vcpkg/buildtrees/portaudio/src
-vcpkg_configure_cmake(
- SOURCE_PATH ${SOURCE_PATH}
- PREFER_NINJA
- OPTIONS
- -DPA_USE_DS=ON
- -DPA_USE_WASAPI=ON
- -DPA_USE_WDMKS=ON
- -DPA_USE_WMME=ON
- -DPA_LIBNAME_ADD_SUFFIX=OFF
- -DPA_BUILD_SHARED=${PA_BUILD_SHARED}
- -DPA_BUILD_STATIC=${PA_BUILD_STATIC}
- -DPA_DLL_LINK_WITH_STATIC_RUNTIME=OFF
- OPTIONS_DEBUG
- -DPA_ENABLE_DEBUG_OUTPUT:BOOL=ON
-)
-
-vcpkg_install_cmake()
-vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT})
-vcpkg_copy_pdbs()
-
-file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
-file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
-
-if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
- file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
-endif()
-
-# Handle copyright
-file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
+vcpkg_fail_port_install(ON_TARGET "uwp") +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO PortAudio/portaudio + REF 147dd722548358763a8b649b3e4b41dfffbcfbb6 + SHA512 0f56e5f5b004f51915f29771b8fc1fe886f1fef5d65ab5ea1db43f43c49917476b9eec14b36aa54d3e9fb4d8bdf61e68c79624d00b7e548d4c493395a758233a + PATCHES + fix-library-can-not-be-found.patch +) + +string(COMPARE EQUAL ${VCPKG_LIBRARY_LINKAGE} dynamic PA_BUILD_SHARED) +string(COMPARE EQUAL ${VCPKG_LIBRARY_LINKAGE} static PA_BUILD_STATIC) + +# NOTE: the ASIO backend will be built automatically if the ASIO-SDK is provided +# in a sibling folder of the portaudio source in vcpkg/buildtrees/portaudio/src +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DPA_USE_DS=ON + -DPA_USE_WASAPI=ON + -DPA_USE_WDMKS=ON + -DPA_USE_WMME=ON + -DPA_LIBNAME_ADD_SUFFIX=OFF + -DPA_BUILD_SHARED=${PA_BUILD_SHARED} + -DPA_BUILD_STATIC=${PA_BUILD_STATIC} + -DPA_DLL_LINK_WITH_STATIC_RUNTIME=OFF + OPTIONS_DEBUG + -DPA_ENABLE_DEBUG_OUTPUT:BOOL=ON +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/portaudio/vcpkg.json b/ports/portaudio/vcpkg.json index 36d142e55..4d504978f 100644 --- a/ports/portaudio/vcpkg.json +++ b/ports/portaudio/vcpkg.json @@ -1,6 +1,7 @@ { "name": "portaudio", "version": "19.7", + "port-version": 1, "description": "PortAudio Portable Cross-platform Audio I/O API PortAudio is a free, cross-platform, open-source, audio I/O library. It lets you write simple audio programs in 'C' or C++ that will compile and run on many platforms including Windows, Macintosh OS X, and Unix (OSS/ALSA). It is intended to promote the exchange of audio software between developers on different platforms. Many applications use PortAudio for Audio I/O.", "homepage": "http://www.portaudio.com", "supports": "!uwp" diff --git a/versions/baseline.json b/versions/baseline.json index 3fc871b86..0848eb077 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -4946,7 +4946,7 @@ }, "portaudio": { "baseline": "19.7", - "port-version": 0 + "port-version": 1 }, "portmidi": { "baseline": "0.234", diff --git a/versions/p-/portaudio.json b/versions/p-/portaudio.json index 6bc40d06a..e0640fc37 100644 --- a/versions/p-/portaudio.json +++ b/versions/p-/portaudio.json @@ -1,6 +1,11 @@ { "versions": [ { + "git-tree": "d6254fa08fb9fd57617978cdc98a3890bc1205d1", + "version": "19.7", + "port-version": 1 + }, + { "git-tree": "649b9ae44725c4e6fb4dd012f6202415424ffb1f", "version": "19.7", "port-version": 0 |
