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

[vcpkg baseline][libao] Disable dlfcn check under windows #23235

Merged
merged 3 commits into from
Feb 23, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
27 changes: 27 additions & 0 deletions ports/libao/Fix-C2065.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
diff --git a/configure.ac b/configure.ac
index 0e53752..503a59a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -42,10 +42,18 @@ dnl Check dlopen
dnl ====================================

dnl Currently use this to disable plugin support dlfcn.h
-AC_CHECK_HEADERS([dlfcn.h],
- [AC_SEARCH_LIBS([dlopen],[dl],
- [AC_DEFINE([HAVE_DLOPEN],[1],
- [support dynamic linking loader])])])
+with_dlfcn="no"
+AC_ARG_ENABLE([dlfcn],
+ [AS_HELP_STRING(
+ [--enable-dlfcn])],
+ [with_dlfcn="$enableval"],[with_dlfcn="no"]
+)
+if test "x$with_dlfcn" == "xyes"; then
+ AC_CHECK_HEADERS([dlfcn.h],
+ [AC_SEARCH_LIBS([dlopen],[dl],
+ [AC_DEFINE([HAVE_DLOPEN],[1],
+ [support dynamic linking loader])])])
+fi

dnl ====================================
dnl Set some general compile options
5 changes: 5 additions & 0 deletions ports/libao/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
set(with_dlfcn "yes")
if(VCPKG_TARGET_IS_WINDOWS)
Cheney-W marked this conversation as resolved.
Show resolved Hide resolved
list(APPEND PATCHES "0001-windows-build-patch.patch")
set(with_dlfcn "no")
endif()

list(APPEND PATCHES "Fix-C2065.patch")

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO xiph/libao
Expand All @@ -19,6 +23,7 @@ vcpkg_configure_make(
SOURCE_PATH ${SOURCE_PATH}
AUTOCONFIG
OPTIONS --disable-binaries
--enable-dlfcn=${with_dlfcn}
)
vcpkg_install_make()

Expand Down
2 changes: 1 addition & 1 deletion ports/libao/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "libao",
"version": "1.2.2",
"port-version": 3,
"port-version": 4,
"description": "libao - A Cross-platform Audio Library",
"homepage": "https://github.com/xiph/libao",
"license": "GPL-2.0",
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -3334,7 +3334,7 @@
},
"libao": {
"baseline": "1.2.2",
"port-version": 3
"port-version": 4
},
"libarchive": {
"baseline": "3.5.2",
Expand Down
5 changes: 5 additions & 0 deletions versions/l-/libao.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "dddc94119554ec206d861b23a2aaca51748d4cce",
"version": "1.2.2",
"port-version": 4
},
{
"git-tree": "931d3ed363323bdc4de00c91165f3a09e23fb6b1",
"version": "1.2.2",
Expand Down