update to 1.0.0; ok pea@
This commit is contained in:
parent
5c730ef576
commit
3b7a3a4984
@ -1,12 +1,11 @@
|
||||
# $OpenBSD: Makefile,v 1.44 2009/01/21 15:14:27 naddy Exp $
|
||||
# $OpenBSD: Makefile,v 1.45 2010/06/03 15:49:37 naddy Exp $
|
||||
|
||||
COMMENT= portable audio output library
|
||||
|
||||
DISTNAME= libao-0.8.8
|
||||
PKGNAME= ${DISTNAME}p3
|
||||
DISTNAME= libao-1.0.0
|
||||
CATEGORIES= audio
|
||||
HOMEPAGE= http://www.xiph.org/ao/
|
||||
SHARED_LIBS += ao 3.3 # .3.3
|
||||
SHARED_LIBS= ao 4.0 # .4.0
|
||||
|
||||
MAINTAINER= Christian Weisgerber <naddy@openbsd.org>
|
||||
|
||||
@ -22,9 +21,7 @@ WANTLIB= sndio
|
||||
|
||||
USE_LIBTOOL= Yes
|
||||
SEPARATE_BUILD= simple
|
||||
AUTOCONF_VERSION = 2.61
|
||||
AUTOMAKE_VERSION = 1.9
|
||||
CONFIGURE_STYLE= no-autoheader automake autoconf
|
||||
CONFIGURE_STYLE=gnu
|
||||
|
||||
CONFIGURE_ARGS= ${CONFIGURE_SHARED} --enable-static \
|
||||
--disable-arts \
|
||||
@ -34,21 +31,9 @@ CONFIGURE_ARGS= ${CONFIGURE_SHARED} --enable-static \
|
||||
# disable sun audio detection
|
||||
CONFIGURE_ENV= ac_cv_header_sys_audioio_h=no
|
||||
|
||||
post-patch:
|
||||
mkdir ${WRKSRC}/src/plugins/sndio
|
||||
cp ${FILESDIR}/Makefile.am ${FILESDIR}/ao_sndio.c \
|
||||
${WRKSRC}/src/plugins/sndio
|
||||
cd ${WRKSRC}; AUTOCONF_VERSION=${AUTOCONF_VERSION} \
|
||||
AUTOMAKE_VERSION=${AUTOMAKE_VERSION} aclocal
|
||||
|
||||
pre-configure:
|
||||
cd ${WRKSRC}; AUTOCONF_VERSION=${AUTOCONF_VERSION} \
|
||||
AUTOMAKE_VERSION=${AUTOMAKE_VERSION} automake \
|
||||
--foreign --add-missing --copy
|
||||
|
||||
pre-build:
|
||||
@perl -i -pe 's:/etc/libao.conf:${SYSCONFDIR}/libao.conf:g' \
|
||||
${WRKDIST}/src/ao_private.h \
|
||||
${WRKDIST}/src/include/ao/ao_private.h \
|
||||
${WRKDIST}/libao.conf.5 \
|
||||
${WRKDIST}/doc/config.html
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
MD5 (libao-0.8.8.tar.gz) = uSy6PLzx7pvCIRGKhdI9zQ==
|
||||
RMD160 (libao-0.8.8.tar.gz) = ULnx6MIuWbqfo9jmNVCbikpSiXQ=
|
||||
SHA1 (libao-0.8.8.tar.gz) = 1uhnu/xDYTRtuOUFxRJx5BYq58Q=
|
||||
SHA256 (libao-0.8.8.tar.gz) = 5S4Fr2sQ9C0u6YRd8aWBvys1IGDqv3lGruCmAMOHiVQ=
|
||||
SIZE (libao-0.8.8.tar.gz) = 405619
|
||||
MD5 (libao-1.0.0.tar.gz) = CCg/vh9YdhkFOhViVK/s7A==
|
||||
RMD160 (libao-1.0.0.tar.gz) = P6W/ytml1rCbRrLzLlKiYf4nfSc=
|
||||
SHA1 (libao-1.0.0.tar.gz) = R3mLsPrQxozSkTroxglK6qGKI8o=
|
||||
SHA256 (libao-1.0.0.tar.gz) = 0P4sfkr7jkXoo2k/6f3lQC28L67Ptool6cDNcRgXuCo=
|
||||
SIZE (libao-1.0.0.tar.gz) = 394204
|
||||
|
@ -1,26 +0,0 @@
|
||||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
AUTOMAKE_OPTIONS = foreign
|
||||
|
||||
if HAVE_SNDIO_AUDIO
|
||||
|
||||
sndioltlibs = libsndio.la
|
||||
sndiosources = ao_sndio.c
|
||||
|
||||
else
|
||||
|
||||
sndioltlibs =
|
||||
sndiosources =
|
||||
|
||||
endif
|
||||
|
||||
INCLUDES = -I$(top_builddir)/include/ao -I$(top_srcdir)/include
|
||||
|
||||
libdir = $(plugindir)
|
||||
lib_LTLIBRARIES = $(sndioltlibs)
|
||||
|
||||
libsndio_la_LDFLAGS = @PLUGIN_LDFLAGS@
|
||||
libsndio_la_LIBADD = -lsndio
|
||||
libsndio_la_SOURCES = $(sndiosources)
|
||||
|
||||
EXTRA_DIST = ao_sndio.c
|
@ -1,106 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2008 Alexandre Ratchov <alex@caoua.org>
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
#include <sndio.h>
|
||||
#include <ao/ao.h>
|
||||
#include <ao/plugin.h>
|
||||
|
||||
ao_info ao_sndio_info = {
|
||||
AO_TYPE_LIVE,
|
||||
"sndio audio output",
|
||||
"sndio",
|
||||
"Alexandre Ratchov <alex@caoua.org>",
|
||||
"Outputs to the sndio library",
|
||||
AO_FMT_NATIVE,
|
||||
30,
|
||||
NULL, /* no options */
|
||||
0 /* zero options */
|
||||
};
|
||||
|
||||
int ao_plugin_test()
|
||||
{
|
||||
struct sio_hdl *hdl;
|
||||
|
||||
hdl = sio_open(NULL, SIO_PLAY, 0);
|
||||
if (hdl == NULL)
|
||||
return 0;
|
||||
sio_close(hdl);
|
||||
return 1;
|
||||
}
|
||||
|
||||
ao_info *ao_plugin_driver_info(void)
|
||||
{
|
||||
return &ao_sndio_info;
|
||||
}
|
||||
|
||||
int ao_plugin_device_init(ao_device *device)
|
||||
{
|
||||
struct sio_hdl *hdl;
|
||||
|
||||
hdl = sio_open(NULL, SIO_PLAY, 0);
|
||||
if (hdl == NULL)
|
||||
return 0;
|
||||
device->internal = hdl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
int ao_plugin_set_option(ao_device *device, const char *key, const char *value)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
int ao_plugin_open(ao_device *device, ao_sample_format *format)
|
||||
{
|
||||
struct sio_hdl *hdl = (struct sio_hdl *)device->internal;
|
||||
struct sio_par par;
|
||||
|
||||
sio_initpar(&par);
|
||||
par.sig = 1;
|
||||
par.le = SIO_LE_NATIVE;
|
||||
par.bits = format->bits;
|
||||
par.rate = format->rate;
|
||||
par.pchan = format->channels;
|
||||
if (!sio_setpar(hdl, &par))
|
||||
return 0;
|
||||
device->driver_byte_format = AO_FMT_NATIVE;
|
||||
if (!sio_start(hdl))
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
int ao_plugin_play(ao_device *device, const char *output_samples, uint_32 num_bytes)
|
||||
{
|
||||
struct sio_hdl *hdl = (struct sio_hdl *)device->internal;
|
||||
|
||||
if (!sio_write(hdl, output_samples, num_bytes))
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
int ao_plugin_close(ao_device *device)
|
||||
{
|
||||
struct sio_hdl *hdl = (struct sio_hdl *)device->internal;
|
||||
|
||||
if (!sio_stop(hdl))
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
void ao_plugin_device_clear(ao_device *device)
|
||||
{
|
||||
struct sio_hdl *hdl = (struct sio_hdl *)device->internal;
|
||||
|
||||
sio_close(hdl);
|
||||
}
|
35
audio/libao/patches/patch-configure
Normal file
35
audio/libao/patches/patch-configure
Normal file
@ -0,0 +1,35 @@
|
||||
$OpenBSD: patch-configure,v 1.11 2010/06/03 15:49:38 naddy Exp $
|
||||
--- configure.orig Sun May 23 16:57:42 2010
|
||||
+++ configure Sun May 23 17:00:06 2010
|
||||
@@ -11616,9 +11616,9 @@ else
|
||||
PROFILE="-g -pg -D__NO_MATH_INLINES -fsigned-char" ;;
|
||||
*)
|
||||
PLUGIN_LDFLAGS="-export-dynamic -avoid-version"
|
||||
- DEBUG="-g -Wall -D__NO_MATH_INLINES -fsigned-char"
|
||||
- CFLAGS="-O20 -D__NO_MATH_INLINES -fsigned-char"
|
||||
- PROFILE="-O20 -g -pg -D__NO_MATH_INLINES -fsigned-char" ;;
|
||||
+ DEBUG="-g -Wall -fsigned-char"
|
||||
+ CFLAGS="-fsigned-char"
|
||||
+ PROFILE="-g -pg -fsigned-char" ;;
|
||||
esac
|
||||
fi
|
||||
CFLAGS="$CFLAGS $cflags_save -DAO_BUILDING_LIBAO"
|
||||
@@ -11637,8 +11637,8 @@ case $host in
|
||||
;;
|
||||
esac
|
||||
|
||||
+if false; then # AC_CHECK_LIB(pthread, pthread_kill)
|
||||
|
||||
-
|
||||
# we link to libpthread just in case one of our plugins does
|
||||
# in which case this is required to avoid problems on dlclose()
|
||||
|
||||
@@ -11712,7 +11712,7 @@ _ACEOF
|
||||
|
||||
fi
|
||||
|
||||
-
|
||||
+fi # AC_CHECK_LIB(pthread, pthread_kill)
|
||||
|
||||
case $host in
|
||||
*hpux*)
|
@ -1,45 +0,0 @@
|
||||
$OpenBSD: patch-configure_ac,v 1.2 2009/01/21 15:14:27 naddy Exp $
|
||||
--- configure.ac.orig Thu May 24 12:51:05 2007
|
||||
+++ configure.ac Wed Jan 21 15:58:57 2009
|
||||
@@ -90,9 +90,9 @@ else
|
||||
PROFILE="-g -pg -D__NO_MATH_INLINES -fsigned-char -Ddlsym=dlsym_auto_underscore" ;;
|
||||
*)
|
||||
PLUGIN_LDFLAGS="-export-dynamic -avoid-version"
|
||||
- DEBUG="-g -Wall -D__NO_MATH_INLINES -fsigned-char"
|
||||
- CFLAGS="-O20 -D__NO_MATH_INLINES -fsigned-char"
|
||||
- PROFILE="-O20 -g -pg -D__NO_MATH_INLINES -fsigned-char" ;;
|
||||
+ DEBUG="-g -Wall -fsigned-char"
|
||||
+ CFLAGS="-fsigned-char"
|
||||
+ PROFILE="-g -pg -fsigned-char" ;;
|
||||
esac
|
||||
fi
|
||||
CFLAGS="$CFLAGS $cflags_save"
|
||||
@@ -122,10 +122,6 @@ dnl ==============================
|
||||
dnl Check for libraries
|
||||
dnl ==============================
|
||||
|
||||
-# we link to libpthread just in case one of our plugins does
|
||||
-# in which case this is required to avoid problems on dlclose()
|
||||
-AC_CHECK_LIB(pthread, pthread_kill)
|
||||
-
|
||||
dnl ==============================
|
||||
dnl Checks for header files
|
||||
dnl ==============================
|
||||
@@ -300,6 +296,11 @@ dnl Check for Sun audio
|
||||
AC_CHECK_HEADERS(sys/audioio.h)
|
||||
AM_CONDITIONAL(HAVE_SUN_AUDIO,test "${ac_cv_header_sys_audioio_h}" = yes)
|
||||
|
||||
+dnl Check for libsndio audio
|
||||
+
|
||||
+AC_CHECK_HEADERS(sndio.h)
|
||||
+AM_CONDITIONAL(HAVE_SNDIO_AUDIO,test "${ac_cv_header_sndio_h}" = yes)
|
||||
+
|
||||
dnl Check for AIX audio
|
||||
|
||||
case $host in
|
||||
@@ -415,4 +416,4 @@ dnl Plugins get special LDFLAGS
|
||||
AC_SUBST(PLUGIN_LDFLAGS)
|
||||
|
||||
|
||||
-AC_OUTPUT(Makefile src/Makefile doc/Makefile include/Makefile include/ao/Makefile include/ao/os_types.h src/plugins/Makefile src/plugins/esd/Makefile src/plugins/oss/Makefile src/plugins/alsa/Makefile src/plugins/alsa09/Makefile src/plugins/sun/Makefile src/plugins/irix/Makefile src/plugins/arts/Makefile src/plugins/macosx/Makefile src/plugins/nas/Makefile src/plugins/pulse/Makefile ao.pc)
|
||||
+AC_OUTPUT(Makefile src/Makefile doc/Makefile include/Makefile include/ao/Makefile include/ao/os_types.h src/plugins/Makefile src/plugins/esd/Makefile src/plugins/oss/Makefile src/plugins/alsa/Makefile src/plugins/alsa09/Makefile src/plugins/sun/Makefile src/plugins/irix/Makefile src/plugins/arts/Makefile src/plugins/macosx/Makefile src/plugins/nas/Makefile src/plugins/pulse/Makefile src/plugins/sndio/Makefile ao.pc)
|
@ -1,12 +0,0 @@
|
||||
$OpenBSD: patch-doc_Makefile_am,v 1.3 2008/10/30 19:25:31 naddy Exp $
|
||||
--- doc/Makefile.am.orig Thu May 24 11:19:08 2007
|
||||
+++ doc/Makefile.am Wed Oct 29 17:25:35 2008
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
AUTOMAKE_OPTIONS = foreign
|
||||
|
||||
-docdir = $(datadir)/doc/$(PACKAGE)-$(VERSION)
|
||||
+docdir = $(datadir)/doc/$(PACKAGE)
|
||||
|
||||
# We list all of these as opposed to using a wildcard so that
|
||||
# building outside the source directory works.
|
12
audio/libao/patches/patch-doc_Makefile_in
Normal file
12
audio/libao/patches/patch-doc_Makefile_in
Normal file
@ -0,0 +1,12 @@
|
||||
$OpenBSD: patch-doc_Makefile_in,v 1.9 2010/06/03 15:49:38 naddy Exp $
|
||||
--- doc/Makefile.in.orig Sun May 23 17:01:22 2010
|
||||
+++ doc/Makefile.in Sun May 23 17:01:42 2010
|
||||
@@ -198,7 +198,7 @@ build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
-docdir = $(datadir)/doc/$(PACKAGE)-$(VERSION)
|
||||
+docdir = $(datadir)/doc/$(PACKAGE)
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
@ -1,10 +0,0 @@
|
||||
$OpenBSD: patch-src_plugins_Makefile_am,v 1.5 2008/10/30 19:25:31 naddy Exp $
|
||||
--- src/plugins/Makefile.am.orig Thu May 24 11:19:07 2007
|
||||
+++ src/plugins/Makefile.am Wed Oct 29 17:25:35 2008
|
||||
@@ -1,4 +1,5 @@
|
||||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
AUTOMAKE_OPTIONS = foreign
|
||||
-SUBDIRS = oss esd arts alsa alsa09 sun irix macosx nas pulse
|
||||
+SUBDIRS = oss esd arts alsa alsa09 sun irix macosx nas pulse sndio
|
||||
+AM_MAKEFLAGS = LIBTOOL="$(LIBTOOL) --tag=disable-static"
|
12
audio/libao/patches/patch-src_plugins_Makefile_in
Normal file
12
audio/libao/patches/patch-src_plugins_Makefile_in
Normal file
@ -0,0 +1,12 @@
|
||||
$OpenBSD: patch-src_plugins_Makefile_in,v 1.5 2010/06/03 15:49:38 naddy Exp $
|
||||
--- src/plugins/Makefile.in.orig Fri Mar 26 03:34:32 2010
|
||||
+++ src/plugins/Makefile.in Sun May 23 17:07:53 2010
|
||||
@@ -295,7 +295,7 @@ $(RECURSIVE_TARGETS):
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
- (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) LIBTOOL="$(LIBTOOL) --tag=disable-static" $$local_target) \
|
||||
|| eval $$failcom; \
|
||||
done; \
|
||||
if test "$$dot_seen" = "no"; then \
|
75
audio/libao/patches/patch-src_plugins_sndio_ao_sndio_c
Normal file
75
audio/libao/patches/patch-src_plugins_sndio_ao_sndio_c
Normal file
@ -0,0 +1,75 @@
|
||||
$OpenBSD: patch-src_plugins_sndio_ao_sndio_c,v 1.1 2010/06/03 15:49:38 naddy Exp $
|
||||
--- src/plugins/sndio/ao_sndio.c.orig Sun May 23 17:12:27 2010
|
||||
+++ src/plugins/sndio/ao_sndio.c Sun May 23 17:17:39 2010
|
||||
@@ -13,6 +13,7 @@
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
+#include <string.h>
|
||||
#include <sndio.h>
|
||||
#include <ao/ao.h>
|
||||
#include <ao/plugin.h>
|
||||
@@ -37,7 +38,7 @@ ao_info ao_sndio_info = {
|
||||
4
|
||||
};
|
||||
|
||||
-typedef struct ao_alsa_internal
|
||||
+typedef struct ao_sndio_internal
|
||||
{
|
||||
struct sio_hdl *hdl;
|
||||
char *dev;
|
||||
@@ -88,21 +89,28 @@ int ao_plugin_set_option(ao_device *device, const char
|
||||
int ao_plugin_open(ao_device *device, ao_sample_format *format)
|
||||
{
|
||||
ao_sndio_internal *internal = (ao_sndio_internal *) device->internal;
|
||||
+ struct sio_hdl *hdl;
|
||||
struct sio_par par;
|
||||
|
||||
- internal->hdl = sio_open(internal->dev, SIO_PLAY, 0);
|
||||
- if (internal->hdl == NULL)
|
||||
+ hdl = sio_open(internal->dev, SIO_PLAY, 0);
|
||||
+ if (hdl == NULL)
|
||||
return 0;
|
||||
+ internal->hdl = hdl;
|
||||
|
||||
sio_initpar(&par);
|
||||
par.sig = 1;
|
||||
- par.le = SIO_LE_NATIVE;
|
||||
+ if (format->bits > 8)
|
||||
+ par.le = device->client_byte_format == AO_FMT_LITTLE ? 1 : 0;
|
||||
par.bits = format->bits;
|
||||
par.rate = format->rate;
|
||||
par.pchan = device->output_channels;
|
||||
if (!sio_setpar(hdl, &par))
|
||||
return 0;
|
||||
- device->driver_byte_format = AO_FMT_NATIVE;
|
||||
+ if (!sio_getpar(hdl, &par))
|
||||
+ return 0;
|
||||
+ if (par.bits != format->bits)
|
||||
+ return 0;
|
||||
+ device->driver_byte_format = par.le ? AO_FMT_LITTLE : AO_FMT_BIG;
|
||||
if (!sio_start(hdl))
|
||||
return 0;
|
||||
|
||||
@@ -131,8 +139,8 @@ int ao_plugin_close(ao_device *device)
|
||||
ao_sndio_internal *internal = (ao_sndio_internal *) device->internal;
|
||||
struct sio_hdl *hdl = internal->hdl;
|
||||
|
||||
- if (!sio_stop(hdl))
|
||||
- return 0;
|
||||
+ sio_close(hdl);
|
||||
+ internal->hdl = NULL;
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -141,7 +149,9 @@ void ao_plugin_device_clear(ao_device *device)
|
||||
ao_sndio_internal *internal = (ao_sndio_internal *) device->internal;
|
||||
struct sio_hdl *hdl = internal->hdl;
|
||||
|
||||
- sio_close(hdl);
|
||||
+ if (hdl)
|
||||
+ sio_close(hdl);
|
||||
+ internal->hdl=NULL;
|
||||
if(internal->dev)
|
||||
free(internal->dev);
|
||||
internal->dev=NULL;
|
@ -1,6 +1,6 @@
|
||||
@comment $OpenBSD: PFRAG.shared,v 1.13 2008/12/30 21:59:55 naddy Exp $
|
||||
@comment $OpenBSD: PFRAG.shared,v 1.14 2010/06/03 15:49:38 naddy Exp $
|
||||
lib/ao/
|
||||
lib/ao/plugins-2/
|
||||
@comment lib/ao/plugins-2/libsndio.la
|
||||
lib/ao/plugins-2/libsndio.so
|
||||
lib/ao/plugins-4/
|
||||
@comment lib/ao/plugins-4/libsndio.la
|
||||
lib/ao/plugins-4/libsndio.so
|
||||
@lib lib/libao.so.${LIBao_VERSION}
|
||||
|
Loading…
Reference in New Issue
Block a user