mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-15 04:47:59 +08:00
[ao] Add new port libao (#23031)
* ao: add libao windows port * ao: update baseline version * Update ports/ao/portfile.cmake Co-authored-by: LilyWangLL <94091114+LilyWangLL@users.noreply.github.com> * ao:update version * Update ports/ao/portfile.cmake Co-authored-by: LilyWangLL <94091114+LilyWangLL@users.noreply.github.com> * ao:add license and supports * ao:rename libao to ao * ao:modify libao license to be same with libao * Update version database * ao rename to libao * Update version database * libao add def export file * ao use vcpkg_configure_make * Update version database Co-authored-by: LilyWangLL <94091114+LilyWangLL@users.noreply.github.com>
This commit is contained in:
parent
d929fb3416
commit
1604b064f2
127
ports/libao/0001-windows-build-patch.patch
Normal file
127
ports/libao/0001-windows-build-patch.patch
Normal file
@ -0,0 +1,127 @@
|
||||
From 129f8e155596199191cc005bcc257397d0d981ac Mon Sep 17 00:00:00 2001
|
||||
From: xiaoyifang <yifang.xiao@outlook.com>
|
||||
Date: Wed, 16 Feb 2022 21:58:40 +0800
|
||||
Subject: [PATCH] patch windows
|
||||
|
||||
---
|
||||
include/ao/ao_private.h | 30 +++++++++++++++---------------
|
||||
src/ao_wmm.c | 1 +
|
||||
src/audio_out.c | 1 -
|
||||
3 files changed, 16 insertions(+), 16 deletions(-)
|
||||
|
||||
diff --git a/include/ao/ao_private.h b/include/ao/ao_private.h
|
||||
index 44fa03e..c3c50aa 100644
|
||||
--- a/include/ao/ao_private.h
|
||||
+++ b/include/ao/ao_private.h
|
||||
@@ -138,13 +138,13 @@ struct ao_functions {
|
||||
|
||||
void ao_read_config_files (ao_config *config);
|
||||
|
||||
-#define adebug(format, args...) {\
|
||||
+#define adebug(format, ...) {\
|
||||
if(!device || device->verbose==2){ \
|
||||
if(strcmp(format,"\n")){ \
|
||||
if(device && device->funcs->driver_info()->short_name){ \
|
||||
- fprintf(stderr,"ao_%s debug: " format,device->funcs->driver_info()->short_name,## args); \
|
||||
+ fprintf(stderr,"ao_%s debug: " format,device->funcs->driver_info()->short_name,__VA_ARGS__); \
|
||||
}else{ \
|
||||
- fprintf(stderr,"debug: " format,## args); \
|
||||
+ fprintf(stderr,"debug: " format,__VA_ARGS__); \
|
||||
} \
|
||||
}else{ \
|
||||
fprintf(stderr,"\n"); \
|
||||
@@ -152,13 +152,13 @@ void ao_read_config_files (ao_config *config);
|
||||
} \
|
||||
}
|
||||
|
||||
-#define averbose(format, args...) {\
|
||||
+#define averbose(format, ...) {\
|
||||
if(!device || device->verbose>0){ \
|
||||
if(strcmp(format,"\n")){ \
|
||||
if(device && device->funcs->driver_info()->short_name){ \
|
||||
- fprintf(stderr,"ao_%s info: " format,device->funcs->driver_info()->short_name,## args); \
|
||||
+ fprintf(stderr,"ao_%s info: " format,device->funcs->driver_info()->short_name,__VA_ARGS__); \
|
||||
}else{ \
|
||||
- fprintf(stderr,"info: " format,## args); \
|
||||
+ fprintf(stderr,"info: " format,__VA_ARGS__); \
|
||||
} \
|
||||
}else{ \
|
||||
fprintf(stderr,"\n"); \
|
||||
@@ -166,13 +166,13 @@ void ao_read_config_files (ao_config *config);
|
||||
} \
|
||||
}
|
||||
|
||||
-#define ainfo(format, args...) {\
|
||||
+#define ainfo(format, ...) {\
|
||||
if(!device || device->verbose>=0){ \
|
||||
if(strcmp(format,"\n")){ \
|
||||
if(device && device->funcs->driver_info()->short_name){ \
|
||||
- fprintf(stderr,"ao_%s info: " format,device->funcs->driver_info()->short_name,## args); \
|
||||
+ fprintf(stderr,"ao_%s info: " format,device->funcs->driver_info()->short_name,__VA_ARGS__); \
|
||||
}else{ \
|
||||
- fprintf(stderr,"info: " format,## args); \
|
||||
+ fprintf(stderr,"info: " format,__VA_ARGS__); \
|
||||
} \
|
||||
}else{ \
|
||||
fprintf(stderr,"\n"); \
|
||||
@@ -180,13 +180,13 @@ void ao_read_config_files (ao_config *config);
|
||||
} \
|
||||
}
|
||||
|
||||
-#define awarn(format, args...) {\
|
||||
+#define awarn(format, ...) {\
|
||||
if(!device || device->verbose>=0){ \
|
||||
if(strcmp(format,"\n")){ \
|
||||
if(device && device->funcs->driver_info()->short_name){ \
|
||||
- fprintf(stderr,"ao_%s WARNING: " format,device->funcs->driver_info()->short_name,## args); \
|
||||
+ fprintf(stderr,"ao_%s WARNING: " format,device->funcs->driver_info()->short_name,__VA_ARGS__); \
|
||||
}else{ \
|
||||
- fprintf(stderr,"WARNING: " format,## args); \
|
||||
+ fprintf(stderr,"WARNING: " format,__VA_ARGS__); \
|
||||
} \
|
||||
}else{ \
|
||||
fprintf(stderr,"\n"); \
|
||||
@@ -194,13 +194,13 @@ void ao_read_config_files (ao_config *config);
|
||||
} \
|
||||
}
|
||||
|
||||
-#define aerror(format, args...) { \
|
||||
+#define aerror(format, ...) { \
|
||||
if(!device || device->verbose>=0){ \
|
||||
if(strcmp(format,"\n")){ \
|
||||
if(device && device->funcs->driver_info()->short_name){ \
|
||||
- fprintf(stderr,"ao_%s ERROR: " format,device->funcs->driver_info()->short_name,## args); \
|
||||
+ fprintf(stderr,"ao_%s ERROR: " format,device->funcs->driver_info()->short_name,__VA_ARGS__); \
|
||||
}else{ \
|
||||
- fprintf(stderr,"ERROR: " format,## args); \
|
||||
+ fprintf(stderr,"ERROR: " format,__VA_ARGS__); \
|
||||
} \
|
||||
}else{ \
|
||||
fprintf(stderr,"\n"); \
|
||||
diff --git a/src/ao_wmm.c b/src/ao_wmm.c
|
||||
index eec6b83..d18d2a4 100644
|
||||
--- a/src/ao_wmm.c
|
||||
+++ b/src/ao_wmm.c
|
||||
@@ -33,6 +33,7 @@
|
||||
#include <windows.h>
|
||||
#include <mmreg.h>
|
||||
#include <mmsystem.h>
|
||||
+#include <ks.h>
|
||||
#include <ksmedia.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
diff --git a/src/audio_out.c b/src/audio_out.c
|
||||
index bd8f6fc..e3af366 100644
|
||||
--- a/src/audio_out.c
|
||||
+++ b/src/audio_out.c
|
||||
@@ -49,7 +49,6 @@ static int dlclose(void *handle) { return 0; }
|
||||
#ifndef _MSC_VER
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
-#include <dirent.h>
|
||||
|
||||
#include "ao/ao.h"
|
||||
#include "ao_private.h"
|
||||
--
|
||||
2.30.0.windows.2
|
||||
|
31
ports/libao/portfile.cmake
Normal file
31
ports/libao/portfile.cmake
Normal file
@ -0,0 +1,31 @@
|
||||
if(VCPKG_TARGET_IS_WINDOWS)
|
||||
list(APPEND PATCHES "0001-windows-build-patch.patch")
|
||||
endif()
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO xiph/libao
|
||||
REF 1.2.2
|
||||
SHA512 d2736d25b60862e7d7469611ce31b1df40a4366ab160e2ff1b46919ae91692d1596c8468e4f016303b306fc3ac1bddc7b727f535a362f403c3fe7c6532e9045a
|
||||
HEAD_REF master
|
||||
PATCHES ${PATCHES}
|
||||
)
|
||||
|
||||
if(VCPKG_TARGET_IS_WINDOWS)
|
||||
set(ENV{LIBS} "-lwinmm -lksuser")
|
||||
endif()
|
||||
|
||||
vcpkg_configure_make(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
AUTOCONFIG
|
||||
OPTIONS --disable-binaries
|
||||
)
|
||||
vcpkg_install_make()
|
||||
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
|
||||
|
||||
vcpkg_fixup_pkgconfig()
|
||||
|
||||
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
16
ports/libao/vcpkg.json
Normal file
16
ports/libao/vcpkg.json
Normal file
@ -0,0 +1,16 @@
|
||||
{
|
||||
"name": "libao",
|
||||
"version": "1.2.2",
|
||||
"port-version": 3,
|
||||
"description": "libao - A Cross-platform Audio Library",
|
||||
"homepage": "https://github.com/xiph/libao",
|
||||
"license": "GPL-2.0",
|
||||
"supports": "!uwp",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true,
|
||||
"platform": "windows"
|
||||
}
|
||||
]
|
||||
}
|
@ -3332,6 +3332,10 @@
|
||||
"baseline": "8.1.70",
|
||||
"port-version": 1
|
||||
},
|
||||
"libao": {
|
||||
"baseline": "1.2.2",
|
||||
"port-version": 3
|
||||
},
|
||||
"libarchive": {
|
||||
"baseline": "3.5.2",
|
||||
"port-version": 3
|
||||
|
14
versions/l-/libao.json
Normal file
14
versions/l-/libao.json
Normal file
@ -0,0 +1,14 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "931d3ed363323bdc4de00c91165f3a09e23fb6b1",
|
||||
"version": "1.2.2",
|
||||
"port-version": 3
|
||||
},
|
||||
{
|
||||
"git-tree": "3ce3e18f2bb49577bbf0e0341cd0e5eb425e47bc",
|
||||
"version": "1.2.2",
|
||||
"port-version": 2
|
||||
}
|
||||
]
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user