Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[openal-soft] Add pkgconfig #19318

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 23 additions & 8 deletions ports/openal-soft/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -31,21 +31,19 @@ if(VCPKG_TARGET_IS_OSX)
endif()

vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DLIBTYPE=${OPENAL_LIBTYPE}
-DALSOFT_UTILS=OFF
-DALSOFT_NO_CONFIG_UTIL=ON
-DALSOFT_EXAMPLES=OFF
-DALSOFT_TESTS=OFF
-DALSOFT_CONFIG=OFF
-DALSOFT_HRTF_DEFS=OFF
-DALSOFT_AMBDEC_PRESETS=OFF
-DALSOFT_BACKEND_ALSA=${ALSOFT_REQUIRE_LINUX}
-DALSOFT_BACKEND_OSS=OFF
-DALSOFT_BACKEND_SOLARIS=OFF
-DALSOFT_BACKEND_SNDIO=OFF
-DALSOFT_BACKEND_QSA=OFF
-DALSOFT_BACKEND_PORTAUDIO=OFF
-DALSOFT_BACKEND_PULSEAUDIO=OFF
-DALSOFT_BACKEND_COREAUDIO=${ALSOFT_REQUIRE_OSX}
Expand All @@ -57,24 +55,41 @@ vcpkg_configure_cmake(
-DALSOFT_REQUIRE_WASAPI=${ALSOFT_REQUIRE_WINDOWS}
-DALSOFT_CPUEXT_NEON=OFF
-DCMAKE_DISABLE_FIND_PACKAGE_WindowsSDK=ON
MAYBE_UNUSED_VARIABLES
ALSOFT_AMBDEC_PRESETS
ALSOFT_BACKEND_ALSA
ALSOFT_BACKEND_COREAUDIO
ALSOFT_BACKEND_JACK
ALSOFT_BACKEND_OPENSL
ALSOFT_BACKEND_OSS
ALSOFT_BACKEND_PORTAUDIO
ALSOFT_BACKEND_PULSEAUDIO
ALSOFT_BACKEND_SNDIO
ALSOFT_BACKEND_SOLARIS
ALSOFT_CONFIG
ALSOFT_CPUEXT_NEON
ALSOFT_HRTF_DEFS
CMAKE_DISABLE_FIND_PACKAGE_WindowsSDK
)

vcpkg_install_cmake()
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/OpenAL)
vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/OpenAL")

foreach(HEADER al.h alc.h)
file(READ ${CURRENT_PACKAGES_DIR}/include/AL/${HEADER} AL_H)
file(READ "${CURRENT_PACKAGES_DIR}/include/AL/${HEADER}" AL_H)
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
string(REPLACE "defined(AL_LIBTYPE_STATIC)" "1" AL_H "${AL_H}")
else()
string(REPLACE "defined(AL_LIBTYPE_STATIC)" "0" AL_H "${AL_H}")
endif()
file(WRITE ${CURRENT_PACKAGES_DIR}/include/AL/${HEADER} "${AL_H}")
file(WRITE "${CURRENT_PACKAGES_DIR}/include/AL/${HEADER}" "${AL_H}")
endforeach()

vcpkg_fixup_pkgconfig()

file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
file(COPY "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")

vcpkg_copy_pdbs()
3 changes: 2 additions & 1 deletion ports/openal-soft/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "openal-soft",
"version-string": "1.21.1",
"version-semver": "1.21.1",
"port-version": 1,
"description": "OpenAL Soft is an LGPL-licensed, cross-platform, software implementation of the OpenAL 3D audio API.",
"homepage": "https://github.com/kcat/openal-soft",
"supports": "!uwp"
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -4558,7 +4558,7 @@
},
"openal-soft": {
"baseline": "1.21.1",
"port-version": 0
"port-version": 1
},
"openblas": {
"baseline": "0.3.15",
Expand Down
5 changes: 5 additions & 0 deletions versions/o-/openal-soft.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "cb266fe5f02b9d2b5cb38343d25083359062bd07",
"version-semver": "1.21.1",
"port-version": 1
},
{
"git-tree": "735740a45f65f166bd693795a7bed3d2ef079baf",
"version-string": "1.21.1",
Expand Down