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

[opus] Fix arm64-mingw builds #27335

Merged
merged 2 commits into from
Oct 25, 2022
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
9 changes: 9 additions & 0 deletions ports/opus/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,15 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
avx AVX_SUPPORTED
)

set(ADDITIONAL_OPUS_OPTIONS "")
if(VCPKG_TARGET_IS_MINGW)
set(STACK_PROTECTOR OFF)
string(APPEND VCPKG_C_FLAGS "-D_FORTIFY_SOURCE=0")
string(APPEND VCPKG_CXX_FLAGS "-D_FORTIFY_SOURCE=0")
if(VCPKG_TARGET_ARCHITECTURE MATCHES "^(ARM|arm)64$")
list(APPEND ADDITIONAL_OPUS_OPTIONS "-DOPUS_USE_NEON=OFF") # for version 1.3.1 (remove for future Opus release)
list(APPEND ADDITIONAL_OPUS_OPTIONS "-DOPUS_DISABLE_INTRINSICS=ON") # for HEAD (and future Opus release)
endif()
elseif(VCPKG_TARGET_IS_EMSCRIPTEN)
set(STACK_PROTECTOR OFF)
else()
Expand All @@ -31,6 +36,10 @@ vcpkg_cmake_configure(
-DOPUS_INSTALL_CMAKE_CONFIG_MODULE=ON
-DOPUS_BUILD_PROGRAMS=OFF
-DOPUS_BUILD_TESTING=OFF
${ADDITIONAL_OPUS_OPTIONS}
MAYBE_UNUSED_VARIABLES
OPUS_USE_NEON
OPUS_DISABLE_INTRINSICS
)
vcpkg_cmake_install()
vcpkg_copy_pdbs()
Expand Down
2 changes: 1 addition & 1 deletion ports/opus/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "opus",
"version": "1.3.1",
"port-version": 8,
"port-version": 9,
"description": "Totally open, royalty-free, highly versatile audio codec",
"homepage": "https://github.com/xiph/opus",
"license": "BSD-3-Clause",
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -5554,7 +5554,7 @@
},
"opus": {
"baseline": "1.3.1",
"port-version": 8
"port-version": 9
},
"opusfile": {
"baseline": "0.12",
Expand Down
5 changes: 5 additions & 0 deletions versions/o-/opus.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "969377a42b9e5887f42419aff6182d9c111f65c2",
"version": "1.3.1",
"port-version": 9
},
{
"git-tree": "f69aedcd28796dfac85514ee0934e7f91ab05e06",
"version": "1.3.1",
Expand Down