diff --git a/audio/libao/Makefile b/audio/libao/Makefile new file mode 100644 index 00000000000..857b5c1d0ef --- /dev/null +++ b/audio/libao/Makefile @@ -0,0 +1,41 @@ +# $OpenBSD: Makefile,v 1.1.1.1 2001/03/14 01:54:08 todd Exp $ + +DISTNAME= libao-0.6.0 +CATEGORIES= audio +NEED_VERSION= 1.359 +HOMEPAGE= http://www.vorbis.com + +MAINTAINER= Todd Fries + +PERMIT_PACKAGE_CDROM= Yes +PERMIT_PACKAGE_FTP= Yes +PERMIT_DISTFILES_CDROM= Yes +PERMIT_DISTFILES_FTP= Yes + +MASTER_SITES= ${HOMEPAGE}/files/beta4/unix/ + +#FLAVORS= arts esd +#FLAVOR?= + +#PLUGINS= oss ${FLAVOR} +PLUGINS= oss + +#.if ${FLAVOR:L:Marts} +#LIB_DEPENDS+= artsc.0::x11/kde/libs2 +#.endif +# +#.if ${FLAVOR:L:Mesd} +#LIB_DEPENDS+= esd.2::audio/esound +#.endif + +BUILD_DEPENDS= automake::devel/automake + +CONFIGURE_STYLE= autoconf +CONFIGURE_ARGS= ${CONFIGURE_SHARED} --enable-static \ + --disable-esdtest +MAKE_ENV= PLUGINS='${PLUGINS}' + +post-patch: + @cd ${WRKSRC} && automake -i || true + +.include diff --git a/audio/libao/files/md5 b/audio/libao/files/md5 new file mode 100644 index 00000000000..c68221e4efe --- /dev/null +++ b/audio/libao/files/md5 @@ -0,0 +1,3 @@ +MD5 (libao-0.6.0.tar.gz) = bab8b209a9440c8426d340ee8d4238ec +RMD160 (libao-0.6.0.tar.gz) = 2ec0da701a567eae909322094e1be4abeee543f9 +SHA1 (libao-0.6.0.tar.gz) = 329003690b2484fa79faa6d9517ff2065e1c513f diff --git a/audio/libao/patches/patch-configure_in b/audio/libao/patches/patch-configure_in new file mode 100644 index 00000000000..7a511e68f65 --- /dev/null +++ b/audio/libao/patches/patch-configure_in @@ -0,0 +1,41 @@ +$OpenBSD: patch-configure_in,v 1.1.1.1 2001/03/14 01:54:09 todd Exp $ +--- configure.in.orig Sat Feb 24 02:31:45 2001 ++++ configure.in Tue Mar 13 02:29:46 2001 +@@ -43,9 +43,9 @@ if test -z "$GCC"; then + CFLAGS="-xO4 -fast -w -fsimple -native -xcg92" + PROFILE="-v -xpg -g -xO4 -fast -native -fsimple -xcg92 -Dsuncc" ;; + *) +- DEBUG="-g" +- CFLAGS="-O" +- PROFILE="-g -p" ;; ++ DEBUG="$CFLAGS -g" ++ CFLAGS="$CFLAGS" ++ PROFILE="$CFLAGS -g -p" ;; + esac + else + +@@ -59,9 +59,9 @@ else + CFLAGS="-O20 -ffast-math -D__NO_MATH_INLINES -fsigned-char -mv8" + PROFILE="-pg -g -O20 -D__NO_MATH_INLINES -fsigned-char -mv8" ;; + *) +- 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="$CFLAGS -g -Wall -fsigned-char" ++ CFLAGS="$CFLAGS -fsigned-char" ++ PROFILE="$CFLAGS -g -pg -fsigned-char" ;; + esac + fi + +@@ -117,9 +117,10 @@ AM_CONDITIONAL(HAVE_ESD,test "x$have_esd + + dnl Check for OSS + ++AC_CHECK_HEADERS(soundcard.h) + AC_CHECK_HEADERS(sys/soundcard.h) + AC_CHECK_HEADERS(machine/soundcard.h) +-AM_CONDITIONAL(HAVE_OSS,test "${ac_cv_header_sys_soundcard_h}" = "yes" || test "${ac_cv_header_machine_soundcard_h}" = "yes") ++AM_CONDITIONAL(HAVE_OSS,test "${ac_cv_header_soundcard_h}" = "yes" || "${ac_cv_header_sys_soundcard_h}" = "yes" || test "${ac_cv_header_machine_soundcard_h}" = "yes") + + dnl Check for ALSA + diff --git a/audio/libao/patches/patch-doc_Makefile_am b/audio/libao/patches/patch-doc_Makefile_am new file mode 100644 index 00000000000..c9697016f3c --- /dev/null +++ b/audio/libao/patches/patch-doc_Makefile_am @@ -0,0 +1,12 @@ +$OpenBSD: patch-doc_Makefile_am,v 1.1.1.1 2001/03/14 01:54:09 todd Exp $ +--- doc/Makefile.am.orig Tue Mar 13 23:29:50 2001 ++++ doc/Makefile.am Tue Mar 13 23:29:56 2001 +@@ -2,7 +2,7 @@ + + AUTOMAKE_OPTIONS = foreign + +-docdir = $(datadir)/doc/$(PACKAGE)-$(VERSION) ++docdir = $(datadir)/doc/$(PACKAGE) + + doc_DATA = API USAGE DRIVERS WANTED + diff --git a/audio/libao/patches/patch-ltconfig b/audio/libao/patches/patch-ltconfig new file mode 100644 index 00000000000..b506a779c7a --- /dev/null +++ b/audio/libao/patches/patch-ltconfig @@ -0,0 +1,52 @@ +$OpenBSD: patch-ltconfig,v 1.1.1.1 2001/03/14 01:54:09 todd Exp $ +--- ltconfig.orig Thu Jul 13 23:54:59 2000 ++++ ltconfig Mon Mar 12 19:59:17 2001 +@@ -1105,6 +1105,9 @@ cygwin* | mingw*) + with_gnu_ld=no + fi + ;; ++openbsd*) ++ with_gnu_ld=no ++ ;; + + esac + +@@ -1402,10 +1405,21 @@ else + ;; + + openbsd*) +- archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts' +- hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no ++ case "$host_os" in ++ openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) ++ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts' ++ hardcode_libdir_flag_spec='-R$libdir' ++ ;; ++ *) ++ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linkopts' ++ hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ++ if [ "`/usr/bin/file /usr/lib/libc.so.* | grep ELF`" != "" ]; then ++ export_dynamic_flag_spec='${wl}-E' ++ fi ++ ;; ++ esac + ;; + + os2*) +@@ -2021,13 +2035,10 @@ netbsd*) + + openbsd*) + version_type=sunos +- if test "$with_gnu_ld" = yes; then +- need_lib_prefix=no +- need_version=no +- fi + library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH ++ deplibs_check_method='pass_all' + ;; + + os2*) diff --git a/audio/libao/patches/patch-ltmain_sh b/audio/libao/patches/patch-ltmain_sh new file mode 100644 index 00000000000..0a15b2750e9 --- /dev/null +++ b/audio/libao/patches/patch-ltmain_sh @@ -0,0 +1,84 @@ +$OpenBSD: patch-ltmain_sh,v 1.1.1.1 2001/03/14 01:54:09 todd Exp $ +--- ltmain.sh.orig Thu Jul 13 23:54:59 2000 ++++ ltmain.sh Mon Mar 12 19:59:25 2001 +@@ -1079,7 +1079,18 @@ compiler." + # These systems don't actually have c library (as such) + continue + ;; ++ *-*-openbsd*) ++ # Do not include libc due to us having libc/libc_r. ++ continue ++ ;; + esac ++ elif test "$arg" = "-lc_r"; then ++ case "$host" in ++ *-*-openbsd*) ++ # Do not include libc_r directly, use -pthread flag. ++ continue ++ ;; ++ esac + elif test "$arg" = "-lm"; then + case "$host" in + *-*-cygwin* | *-*-beos*) +@@ -1091,6 +1102,10 @@ compiler." + deplibs="$deplibs $arg" + ;; + ++ -?thread) ++ deplibs="$deplibs $arg" ++ ;; ++ + -module) + module=yes + continue +@@ -1799,6 +1814,9 @@ compiler." + # rhapsody is a little odd... + deplibs="$deplibs -framework System" + ;; ++ *-*-openbsd*) ++ # do not include libc due to us having libc/libc_r. ++ ;; + *) + # Add libc to deplibs on all other systems. + deplibs="$deplibs -lc" +@@ -3571,40 +3589,6 @@ libdir='$install_libdir'\ + # Exit here if they wanted silent mode. + test "$show" = : && exit 0 + +- echo "----------------------------------------------------------------------" +- echo "Libraries have been installed in:" +- for libdir in $libdirs; do +- echo " $libdir" +- done +- echo +- echo "If you ever happen to want to link against installed libraries" +- echo "in a given directory, LIBDIR, you must either use libtool, and" +- echo "specify the full pathname of the library, or use \`-LLIBDIR'" +- echo "flag during linking and do at least one of the following:" +- if test -n "$shlibpath_var"; then +- echo " - add LIBDIR to the \`$shlibpath_var' environment variable" +- echo " during execution" +- fi +- if test -n "$runpath_var"; then +- echo " - add LIBDIR to the \`$runpath_var' environment variable" +- echo " during linking" +- fi +- if test -n "$hardcode_libdir_flag_spec"; then +- libdir=LIBDIR +- eval flag=\"$hardcode_libdir_flag_spec\" +- +- echo " - use the \`$flag' linker flag" +- fi +- if test -n "$admincmds"; then +- echo " - have your system administrator run these commands:$admincmds" +- fi +- if test -f /etc/ld.so.conf; then +- echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" +- fi +- echo +- echo "See any operating system documentation about shared libraries for" +- echo "more information, such as the ld(1) and ld.so(8) manual pages." +- echo "----------------------------------------------------------------------" + exit 0 + ;; + diff --git a/audio/libao/patches/patch-src_Makefile_am b/audio/libao/patches/patch-src_Makefile_am new file mode 100644 index 00000000000..69ef3fa83dc --- /dev/null +++ b/audio/libao/patches/patch-src_Makefile_am @@ -0,0 +1,11 @@ +$OpenBSD: patch-src_Makefile_am,v 1.1.1.1 2001/03/14 01:54:09 todd Exp $ +--- src/Makefile.am.orig Mon Oct 30 01:46:41 2000 ++++ src/Makefile.am Wed Mar 14 00:41:09 2001 +@@ -10,6 +10,7 @@ lib_LTLIBRARIES = libao.la + libao_la_SOURCES = audio_out.c ao_wav.c ao_null.c + libao_la_LDFLAGS = -version-info @LIB_CURRENT@:@LIB_REVISION@:@LIB_AGE@ + ++CFLAGS = @CFLAGS@ -DSHARED_LIB_EXT=\".so.@LIB_CURRENT@.@LIB_REVISION@\" + + debug: + $(MAKE) all CFLAGS="@DEBUG@" diff --git a/audio/libao/patches/patch-src_audio_out_c b/audio/libao/patches/patch-src_audio_out_c new file mode 100644 index 00000000000..c87964521c4 --- /dev/null +++ b/audio/libao/patches/patch-src_audio_out_c @@ -0,0 +1,31 @@ +$OpenBSD: patch-src_audio_out_c,v 1.1.1.1 2001/03/14 01:54:09 todd Exp $ +--- src/audio_out.c.orig Sat Feb 24 02:31:46 2001 ++++ src/audio_out.c Wed Mar 14 01:36:51 2001 +@@ -63,7 +63,7 @@ driver_tree_t *_get_plugin(char *plugin_ + driver_tree_t *dt; + void *handle; + +- handle = dlopen(plugin_file, RTLD_NOW); ++ handle = dlopen(plugin_file, RTLD_LAZY); + if (handle) { + dt = (driver_tree_t *)malloc(sizeof(driver_tree_t)); + if (!dt) return NULL; +@@ -76,6 +76,9 @@ driver_tree_t *_get_plugin(char *plugin_ + return NULL; + } + ++#ifndef __ELF__ ++#define dlsym(h,s) dlsym(h, "_" s) ++#endif + dt->functions->get_driver_info = dlsym(dt->handle, "plugin_get_driver_info"); + if (dlerror()) { free(dt->functions); free(dt); return NULL; } + dt->functions->open = dlsym(dt->handle, "plugin_open"); +@@ -126,7 +129,7 @@ void ao_initialize(void) + if (plugindir != NULL) { + while ((plugin_dirent = readdir(plugindir)) != NULL) { + snprintf(fullpath, FILENAME_MAX, "%s/%s", AO_PLUGIN_PATH, plugin_dirent->d_name); +- if (!stat(fullpath, &statbuf) && S_ISREG(statbuf.st_mode) && (ext = strrchr(plugin_dirent->d_name, '.')) != NULL) { ++ if (!stat(fullpath, &statbuf) && S_ISREG(statbuf.st_mode) && (ext = strchr(plugin_dirent->d_name, '.')) != NULL) { + if (strcmp(ext, SHARED_LIB_EXT) == 0) { + plugin = _get_plugin(fullpath); + if (plugin) { diff --git a/audio/libao/patches/patch-src_plugins_Makefile_am b/audio/libao/patches/patch-src_plugins_Makefile_am new file mode 100644 index 00000000000..1ae8b9e9a6c --- /dev/null +++ b/audio/libao/patches/patch-src_plugins_Makefile_am @@ -0,0 +1,9 @@ +$OpenBSD: patch-src_plugins_Makefile_am,v 1.1.1.1 2001/03/14 01:54:09 todd Exp $ +--- src/plugins/Makefile.am.orig Sat Dec 30 06:03:25 2000 ++++ src/plugins/Makefile.am Wed Mar 14 00:30:25 2001 +@@ -1,4 +1,4 @@ + ## Process this file with automake to produce Makefile.in + + AUTOMAKE_OPTIONS = foreign +-SUBDIRS = oss esd alsa arts # solaris irix ++SUBDIRS = $(PLUGINS) diff --git a/audio/libao/patches/patch-src_plugins_oss_Makefile_am b/audio/libao/patches/patch-src_plugins_oss_Makefile_am new file mode 100644 index 00000000000..40e0620e663 --- /dev/null +++ b/audio/libao/patches/patch-src_plugins_oss_Makefile_am @@ -0,0 +1,14 @@ +$OpenBSD: patch-src_plugins_oss_Makefile_am,v 1.1.1.1 2001/03/14 01:54:09 todd Exp $ +--- src/plugins/oss/Makefile.am.orig Mon Oct 30 01:46:43 2000 ++++ src/plugins/oss/Makefile.am Wed Mar 14 02:02:19 2001 +@@ -5,7 +5,9 @@ AUTOMAKE_OPTIONS = foreign + if HAVE_OSS + + ossltlibs = liboss.la +-ossldflags = -export-dynamic -avoid-version ++ossldflags = -export-dynamic \ ++ -version-info @LIB_CURRENT@:@LIB_REVISION@:@LIB_AGE@ \ ++ -lossaudio + osssources = ao_oss.c + + else diff --git a/audio/libao/patches/patch-src_plugins_oss_ao_oss_c b/audio/libao/patches/patch-src_plugins_oss_ao_oss_c new file mode 100644 index 00000000000..c8ba02997c3 --- /dev/null +++ b/audio/libao/patches/patch-src_plugins_oss_ao_oss_c @@ -0,0 +1,48 @@ +$OpenBSD: patch-src_plugins_oss_ao_oss_c,v 1.1.1.1 2001/03/14 01:54:09 todd Exp $ +--- src/plugins/oss/ao_oss.c.orig Sat Feb 24 02:31:48 2001 ++++ src/plugins/oss/ao_oss.c Tue Mar 13 15:27:15 2001 +@@ -113,28 +113,15 @@ ao_internal_t *plugin_open(uint_32 bits, + } + } else { + /* default: first try the devfs path */ +- state->dev = strdup("/dev/sound/dsp"); ++ state->dev = strdup("/dev/sound"); + state->fd=open(state->dev,O_WRONLY); + if(state->fd < 0) + { +- /* no? then try the traditional path */ +- char *err = strdup(strerror(errno)); +- char *dev = strdup(state->dev); +- free(state->dev); +- state->dev = strdup("/dev/dsp"); +- state->fd=open(state->dev,O_WRONLY); +- if(state->fd < 0) +- { +- fprintf(stderr, +- "libao - error: Could not open either default device:\n" +- " %s - %s\n" +- " %s - %s\n", +- err, dev, +- strerror(errno), state->dev); +- free(err); +- free(dev); +- goto ERR; +- } ++ fprintf(stderr, ++ "libao - error: Could not open default device:\n", ++ " %s - %s\n", ++ strerror(errno), state->dev); ++ goto ERR; + } + } + +@@ -198,7 +185,9 @@ void plugin_close(ao_internal_t *state) + int plugin_get_latency(ao_internal_t *state) + { + int odelay = 0; ++#ifdef SNDCTL_DSP_GETODELAY + ioctl(((ao_oss_internal_t *)state)->fd, SNDCTL_DSP_GETODELAY, &odelay); ++#endif + return odelay; + } + diff --git a/audio/libao/pkg/COMMENT b/audio/libao/pkg/COMMENT new file mode 100644 index 00000000000..72c4513f5c8 --- /dev/null +++ b/audio/libao/pkg/COMMENT @@ -0,0 +1 @@ +cross-platform audio library diff --git a/audio/libao/pkg/DESCR b/audio/libao/pkg/DESCR new file mode 100644 index 00000000000..e1c20538bca --- /dev/null +++ b/audio/libao/pkg/DESCR @@ -0,0 +1,12 @@ +Libao is a cross-platform audio library that allows programs to output +audio using a simple API on a wide variety of platforms. It currently +supports: + * Null output + * WAV files + * OSS (Open Sound System) + * ESD (ESounD or Enlighten Sound Daemon) + * ALSA (Advanced Linux Sound Architecture) + * Solaris (untested) + * IRIX (untested) + +WWW: ${HOMEPAGE} diff --git a/audio/libao/pkg/PFRAG.shared b/audio/libao/pkg/PFRAG.shared new file mode 100644 index 00000000000..c280c68cce9 --- /dev/null +++ b/audio/libao/pkg/PFRAG.shared @@ -0,0 +1,6 @@ +@comment $OpenBSD: PFRAG.shared,v 1.1.1.1 2001/03/14 01:54:09 todd Exp $ +lib/ao/liboss.la +lib/ao/liboss.so.1.0 +lib/libao.so.1.0 +DYNLIBDIR(%B) +@dirrm lib/ao diff --git a/audio/libao/pkg/PLIST b/audio/libao/pkg/PLIST new file mode 100644 index 00000000000..37b701681be --- /dev/null +++ b/audio/libao/pkg/PLIST @@ -0,0 +1,13 @@ +@comment $OpenBSD: PLIST,v 1.1.1.1 2001/03/14 01:54:09 todd Exp $ +include/ao/ao.h +include/ao/os_types.h +lib/libao.a +lib/libao.la +%%SHARED%% +share/aclocal/ao.m4 +share/doc/libao/API +share/doc/libao/DRIVERS +share/doc/libao/USAGE +share/doc/libao/WANTED +@dirrm share/doc/libao +@dirrm include/ao