2021-10-28 14:03:47 +08:00
|
|
|
message(
|
2023-04-18 06:36:17 +08:00
|
|
|
"alsa currently requires the following programs from the system package manager:
|
|
|
|
autoconf autoheader aclocal automake libtoolize
|
|
|
|
On Debian and Ubuntu derivatives:
|
|
|
|
sudo apt install autoconf libtool
|
|
|
|
On recent Red Hat and Fedora derivatives:
|
|
|
|
sudo dnf install autoconf libtool
|
|
|
|
On Arch Linux and derivatives:
|
|
|
|
sudo pacman -S autoconf automake libtool
|
|
|
|
On Alpine:
|
|
|
|
apk add autoconf automake libtool"
|
2021-10-28 14:03:47 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO alsa-project/alsa-lib
|
2023-04-18 06:36:17 +08:00
|
|
|
REF "v${VERSION}"
|
2024-11-19 13:32:17 +08:00
|
|
|
SHA512 ae21380c75ab2f318b14d42b1f06e35d2a80b377fe0a12177e7f5c926b189bb242037891e3e7d780d77376e57d6f074abe5701eecd55035ff0498bdbca55e42a
|
2021-10-28 14:03:47 +08:00
|
|
|
HEAD_REF master
|
2022-12-03 01:16:18 +08:00
|
|
|
PATCHES
|
2024-03-19 05:38:52 +08:00
|
|
|
fix-plugin-dir.patch
|
[alsa,fdk-aac,ffmpeg,libsrt,snappy,x265] Code cleanup, fix and use pkg-config (#39077)
- Setup and use pkg-config for ffmpeg dependencies.
https://github.com/microsoft/vcpkg/pull/38011#discussion_r1623174355.
- Export actual c++ link libraries for fdk-aac via pkg-config. (Same
pattern as lerc, geos.)
- Rectify link libraries in pkg-config for alsa, libsrt, snappy, x265.
- Burn-in dllimport for libsrt and x265.
- Pass detected STRIP to ffmpeg. Fixes
https://github.com/microsoft/vcpkg/issues/36852.
2024-06-06 15:48:31 +08:00
|
|
|
libdl.diff
|
2021-10-28 14:03:47 +08:00
|
|
|
)
|
|
|
|
|
2023-01-12 15:20:50 +08:00
|
|
|
if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64")
|
|
|
|
set(ALSA_PLUGIN_DIR "/usr/lib/x86_64-linux-gnu/alsa-lib")
|
|
|
|
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64")
|
|
|
|
set(ALSA_PLUGIN_DIR "/usr/lib/aarch64-linux-gnu/alsa-lib")
|
|
|
|
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm")
|
|
|
|
set(ALSA_PLUGIN_DIR "/usr/lib/arm-linux-gnueabihf/alsa-lib")
|
|
|
|
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "s390x")
|
|
|
|
set(ALSA_PLUGIN_DIR "/usr/lib/s390x-linux-gnu/alsa-lib")
|
|
|
|
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "ppc64le")
|
|
|
|
set(ALSA_PLUGIN_DIR "/usr/lib/powerpc64le-linux-gnu/alsa-lib")
|
2022-12-03 01:16:18 +08:00
|
|
|
else()
|
|
|
|
set(ALSA_PLUGIN_DIR "/usr/lib/alsa-lib")
|
|
|
|
endif()
|
|
|
|
set(ALSA_CONFIG_DIR "/usr/share/alsa")
|
|
|
|
|
2021-10-28 14:03:47 +08:00
|
|
|
vcpkg_configure_make(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
|
|
|
AUTOCONFIG
|
|
|
|
OPTIONS
|
|
|
|
${BUILD_OPTS}
|
|
|
|
--disable-python
|
2022-12-03 01:16:18 +08:00
|
|
|
"--with-configdir=${ALSA_CONFIG_DIR}"
|
|
|
|
"--with-plugindir=${ALSA_PLUGIN_DIR}"
|
2021-10-28 14:03:47 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_install_make()
|
|
|
|
vcpkg_fixup_pkgconfig()
|
|
|
|
|
2023-04-21 06:57:59 +08:00
|
|
|
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
|
|
|
|
2023-04-18 06:36:17 +08:00
|
|
|
file(REMOVE_RECURSE
|
|
|
|
"${CURRENT_PACKAGES_DIR}/debug/include"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/debug/share"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/debug/tools/alsa/debug"
|
|
|
|
)
|
2021-10-28 14:03:47 +08:00
|
|
|
|
2023-04-18 06:36:17 +08:00
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING")
|
2022-12-03 01:16:18 +08:00
|
|
|
|
|
|
|
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|