From 65b5ab9db54c8cd03e8d726e17786690b8a8da3b Mon Sep 17 00:00:00 2001 From: Kai Pastor Date: Mon, 18 Mar 2024 22:38:52 +0100 Subject: [PATCH] [alsa] Add version script patch, cleanup (#37505) Fixes https://github.com/microsoft/vcpkg/issues/37438 --- ports/alsa/portfile.cmake | 17 ++++++++--------- ports/alsa/usage | 7 +++---- ports/alsa/vcpkg.json | 1 + versions/a-/alsa.json | 5 +++++ versions/baseline.json | 2 +- 5 files changed, 18 insertions(+), 14 deletions(-) diff --git a/ports/alsa/portfile.cmake b/ports/alsa/portfile.cmake index 1dfcaab8cd..e60bf0817c 100644 --- a/ports/alsa/portfile.cmake +++ b/ports/alsa/portfile.cmake @@ -11,6 +11,12 @@ On Alpine: apk add autoconf automake libtool" ) +vcpkg_download_distfile(ALSA_VERSION_SCRIPT_PATCH + URLS https://github.com/alsa-project/alsa-lib/commit/2a736a0d2543f206fd2653aaae8a08a4c42eb917.diff?full_index=1 + FILENAME alsa-version-script-2a736a.patch + SHA512 d3f2c73b8e8fbae36de43c1db6b59489a0a28c1bc7992f13f40e83f64dfcaaee2d6688b7133668f54685e2d92a2cc06ad03b2efdb40c3c1da7f020f9f0a04de7 +) + vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO alsa-project/alsa-lib @@ -18,17 +24,10 @@ vcpkg_from_github( SHA512 da9277007dd3b197fcafb748ced4ace89fdb1ab5eafae7596e91935ee9fb410be54fa76aabe86cdd83227e48cd073a7df319e90bdf06fa2da7c97470c085645d HEAD_REF master PATCHES - "fix-plugin-dir.patch" + fix-plugin-dir.patch + ${ALSA_VERSION_SCRIPT_PATCH} ) -if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - set(BUILD_OPTS --enable-shared=yes --enable-static=no) -else() - set(BUILD_OPTS --enable-shared=no --enable-static=yes) -endif() - - - if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") set(ALSA_PLUGIN_DIR "/usr/lib/x86_64-linux-gnu/alsa-lib") elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") diff --git a/ports/alsa/usage b/ports/alsa/usage index 283dfeac71..7a69ce572b 100644 --- a/ports/alsa/usage +++ b/ports/alsa/usage @@ -1,5 +1,4 @@ +alsa is compatible with built-in CMake targets: -CMake provides the module target: - - find_package("ALSA" MODULE REQUIRED) - target_link_libraries("main" PRIVATE "ALSA::ALSA") + find_package(ALSA REQUIRED) + target_link_libraries(main PRIVATE ALSA::ALSA) # since CMake 3.12 diff --git a/ports/alsa/vcpkg.json b/ports/alsa/vcpkg.json index 031df979fa..50c18047db 100644 --- a/ports/alsa/vcpkg.json +++ b/ports/alsa/vcpkg.json @@ -1,6 +1,7 @@ { "name": "alsa", "version": "1.2.11", + "port-version": 1, "description": "The Advanced Linux Sound Architecture (ALSA) - library", "homepage": "https://www.alsa-project.org/", "license": "LGPL-2.1-or-later", diff --git a/versions/a-/alsa.json b/versions/a-/alsa.json index 4d0e4799cb..897a37e067 100644 --- a/versions/a-/alsa.json +++ b/versions/a-/alsa.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "78ad470e54eac71113219036519aa55ff3489294", + "version": "1.2.11", + "port-version": 1 + }, { "git-tree": "1ea8f5d1e2f27c55e80e1bcce24aacc37849074e", "version": "1.2.11", diff --git a/versions/baseline.json b/versions/baseline.json index 2fc587fba4..b8f6bb2793 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -94,7 +94,7 @@ }, "alsa": { "baseline": "1.2.11", - "port-version": 0 + "port-version": 1 }, "amd-adl-sdk": { "baseline": "17.1",