summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--groups/251.native_packages_lib.group9
-rw-r--r--patches/libao-1.2.0.local.patch88
-rw-r--r--patches/libao-1.2.0_pre.local.patch12
3 files changed, 108 insertions, 1 deletions
diff --git a/groups/251.native_packages_lib.group b/groups/251.native_packages_lib.group
index 328ca62a..8f1328e7 100644
--- a/groups/251.native_packages_lib.group
+++ b/groups/251.native_packages_lib.group
@@ -3,7 +3,7 @@
#
GROUP_TARGET="native_packages";
NATIVE_PACKAGES_PACKAGES="$(rtl_lconcat "${NATIVE_PACKAGES_PACKAGES}" "
-aspell bearssl enchant fribidi glib hunspell ivykis jansson kvazaar lame libarchive libass libassuan libatomic_ops libdmtx libedit libeditline libelf libestr
+aspell bearssl enchant fribidi glib hunspell ivykis jansson kvazaar lame libao libarchive libass libassuan libatomic_ops libdmtx libedit libeditline libelf libestr
libevent libexif libfastjson libfetch libffi libfirm libflac libglob libgcrypt libgpg_error libiconv libidn2 libite
libjpeg_turbo libksba libmad libmspack libmp3splt libogg libpcap libpipeline libpng libpsl
readline libredwg libressl libsasl2 libshine libsndfile libsolv libssh
@@ -53,6 +53,13 @@ sdl1_image sdl1_ttf sdl2 sdl2_image sdl2_ttf sdl2_net wolfssl")";
: ${PKG_LAME_URL:=https://ftp.osuosl.org/pub/blfs/conglomeration/lame/lame-${PKG_LAME_VERSION}.tar.gz};
: ${PKG_LAME_CONFIGURE_ARGS_EXTRA:="--enable-nasm"};
: ${PKG_LAME_LDFLAGS_CONFIGURE_EXTRA:="-Wl,--as-needed -ltinfo -Wl,--no-as-needed"};
+: ${PKG_LIBAO_DEPENDS:="w32api w32lib"};
+: ${PKG_LIBAO_SHA256SUM:=03ad231ad1f9d64b52474392d63c31197b0bc7bd416e58b1c10a329a5ed89caf};
+: ${PKG_LIBAO_VERSION:=1.2.0};
+: ${PKG_LIBAO_URL:=http://downloads.xiph.org/releases/ao/libao-${PKG_LIBAO_VERSION}.tar.gz};
+: ${PKG_LIBAO_CONFIGURE_ARGS_EXTRA:="--enable-wmm --disable-esd --without-x"};
+: ${PKG_LIBAO_CFLAGS_CONFIGURE_EXTRA:="-I${PREFIX_NATIVE}/include/w32api.ports -DWINAPI_ANSI_DEFAULT"};
+: ${PKG_LIBAO_LDFLAGS_CONFIGURE_EXTRA:="-L${PREFIX_NATIVE}/lib/w32lib -lwinmm"}
: ${PKG_LIBARCHIVE_DEPENDS:="libxml2 xz libiconv bzip2"};
: ${PKG_LIBARCHIVE_SHA256SUM:=5a411aceb978f43e626f0c2d1812ddd8807b645ed892453acabd532376c148e6};
: ${PKG_LIBARCHIVE_VERSION:=3.6.1};
diff --git a/patches/libao-1.2.0.local.patch b/patches/libao-1.2.0.local.patch
new file mode 100644
index 00000000..97a9ee54
--- /dev/null
+++ b/patches/libao-1.2.0.local.patch
@@ -0,0 +1,88 @@
+diff -ru libao-1.2.0.orig/src/ao_wmm.c libao-1.2.0/src/ao_wmm.c
+--- libao-1.2.0.orig/src/ao_wmm.c 2012-02-14 00:46:06.000000000 +0000
++++ libao-1.2.0/src/ao_wmm.c 2022-08-26 14:17:15.193852800 +0000
+@@ -31,9 +31,7 @@
+ #define _CRT_SECURE_NO_DEPRECATE
+
+ #include <windows.h>
+-#include <mmreg.h>
+ #include <mmsystem.h>
+-#include <ksmedia.h>
+
+ #include <stdlib.h>
+ #include <string.h>
+@@ -41,6 +39,47 @@
+ #include <stdarg.h>
+ #include <stdio.h>
+
++#define waveOutGetErrorText waveOutGetErrorTextA
++#define waveOutGetDevCaps waveOutGetDevCapsA
++
++#ifndef WAVE_MAPPER
++#define WAVE_MAPPER ((unsigned int)-1)
++#endif
++
++#ifndef WAVE_FORMAT_EXTENSIBLE
++#define WAVE_FORMAT_EXTENSIBLE 0xFFFE
++#endif
++
++#ifndef WAVE_ALLOWSYNC
++#define WAVE_ALLOWSYNC 0x0002
++#endif
++
++#ifndef CALLBACK_NULL
++#define CALLBACK_NULL (unsigned int)(0x00000000)
++#endif
++
++typedef struct {
++ WAVEFORMATEX Format;
++ union {
++ WORD wValidBitsPerSample;
++ WORD wSamplesPerBlock;
++ WORD wReserved;
++ } Samples;
++ DWORD dwChannelMask;
++ GUID SubFormat;
++} WAVEFORMATEXTENSIBLE,*PWAVEFORMATEXTENSIBLE;
++
++typedef struct tagWAVEOUTCAPSA {
++ WORD wMid;
++ WORD wPid;
++ UINT vDriverVersion;
++ CHAR szPname[32];
++ DWORD dwFormats;
++ WORD wChannels;
++ WORD wReserved1;
++ DWORD dwSupport;
++} WAVEOUTCAPS;
++
+ #ifndef KSDATAFORMAT_SUBTYPE_PCM
+ #define KSDATAFORMAT_SUBTYPE_PCM (GUID) {0x00000001,0x0000,0x0010,{0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71}}
+ #endif
+@@ -339,7 +378,7 @@
+ unsigned int ms = (internal->msPerBlock>>1)+1;
+ if (wait_all) ms *= n;
+ adebug("sleep for %ums wait on %d blocks\n",ms, internal->sent_blocks);
+- Sleep(ms);
++ usleep(ms * 1000);
+ }
+ }
+
+@@ -558,7 +597,7 @@
+ const int idx = _ao_get_free_block(device);
+
+ if (idx == -1) {
+- Sleep(internal->msPerBlock);
++ usleep(internal->msPerBlock * 1000);
+ continue;
+ }
+
+@@ -572,7 +611,7 @@
+ }
+
+ /* Do copy */
+- CopyMemory((char*)internal->wh[idx].wh.lpData
++ memcpy((char*)internal->wh[idx].wh.lpData
+ + internal->wh[idx].count,
+ output_samples, n);
+
diff --git a/patches/libao-1.2.0_pre.local.patch b/patches/libao-1.2.0_pre.local.patch
new file mode 100644
index 00000000..7434fd69
--- /dev/null
+++ b/patches/libao-1.2.0_pre.local.patch
@@ -0,0 +1,12 @@
+diff -ru libao-1.2.0.orig/configure libao-1.2.0/configure
+--- libao-1.2.0.orig/configure 2014-01-27 17:10:36.000000000 +0000
++++ libao-1.2.0/configure 2022-08-26 14:36:45.678689200 +0000
+@@ -12333,7 +12333,7 @@
+
+
+
+-have_wmm="no"
++have_wmm="yes"
+ # Check whether --enable-wmm was given.
+ if test "${enable_wmm+set}" = set; then :
+ enableval=$enable_wmm;