diff options
author | fredb <fredb> | 2001-05-02 04:02:05 +0000 |
---|---|---|
committer | fredb <fredb> | 2001-05-02 04:02:05 +0000 |
commit | 03897d12a7cff9cfda03006bc114513ca6378941 (patch) | |
tree | 703a9564cca847bbf5b347cd387831cf03dcba76 /lang | |
parent | 6211ddb6fd8909dbebdd1d6c19af1081f477d04b (diff) | |
download | pkgsrc-03897d12a7cff9cfda03006bc114513ca6378941.tar.gz |
Add audio support (ossaudio + a work-around for PR lib/12796).
Don't bother trying to compile for debugging in the pkgsrc Makefile.
"-fomit-frame-pointer" makes it impossible to debug on i386 anyway,
and it's easy enough to modify the package makefiles before building.
Diffstat (limited to 'lang')
-rw-r--r-- | lang/squeak/Makefile | 4 | ||||
-rw-r--r-- | lang/squeak/distinfo | 5 | ||||
-rw-r--r-- | lang/squeak/patches/patch-aa | 15 | ||||
-rw-r--r-- | lang/squeak/patches/patch-ab | 56 |
4 files changed, 73 insertions, 7 deletions
diff --git a/lang/squeak/Makefile b/lang/squeak/Makefile index 7c2777034e2..82d5ba3d5e1 100644 --- a/lang/squeak/Makefile +++ b/lang/squeak/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.12 2001/03/27 03:20:04 hubertf Exp $ +# $NetBSD: Makefile,v 1.13 2001/05/02 04:02:05 fredb Exp $ # DISTNAME= Squeak2.7-src @@ -21,8 +21,6 @@ NO_WRKSUBDIR= yes ALL_TARGET= squeak -CONFIGURE_ARGS+= --debug - pre-configure: cd ${WRKSRC}/conf; ${LOCALBASE}/bin/autoconf diff --git a/lang/squeak/distinfo b/lang/squeak/distinfo index 6f69e150a72..0badf4a0ef8 100644 --- a/lang/squeak/distinfo +++ b/lang/squeak/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.2 2001/04/19 15:00:57 agc Exp $ +$NetBSD: distinfo,v 1.3 2001/05/02 04:02:05 fredb Exp $ SHA1 (squeak/Squeak2.7-src.tar.gz) = 63357c2844396074655387e1bcbf29a8bdd20a78 Size (squeak/Squeak2.7-src.tar.gz) = 360870 bytes @@ -8,5 +8,6 @@ SHA1 (squeak/Squeak2.7.changes.gz) = 75d648f64d53b56e553f508f85bfbfe99a42e025 Size (squeak/Squeak2.7.changes.gz) = 1864117 bytes SHA1 (squeak/SqueakV2.sources.gz) = e0cf8b7ed0aa2b5973f7a211e251eb4123da5793 Size (squeak/SqueakV2.sources.gz) = 1361812 bytes -SHA1 (patch-aa) = 596cbde681465e6501fb8dd490175a5ff37cfbb3 +SHA1 (patch-aa) = fbdc26526b96dc0c9868c932445f055e568f01cd +SHA1 (patch-ab) = b81b08ebb63cf357c92ba22d9e368933101c2da7 SHA1 (patch-ac) = e8fc5e9456b98adb11ac0e96ecc9f744491e1d05 diff --git a/lang/squeak/patches/patch-aa b/lang/squeak/patches/patch-aa index a36c9512cf5..f167bb3fbd8 100644 --- a/lang/squeak/patches/patch-aa +++ b/lang/squeak/patches/patch-aa @@ -1,4 +1,4 @@ -$NetBSD: patch-aa,v 1.2 2000/08/14 16:51:36 mjl Exp $ +$NetBSD: patch-aa,v 1.3 2001/05/02 04:02:06 fredb Exp $ --- conf/configure.in.orig Mon Aug 14 18:07:46 2000 +++ conf/configure.in Mon Aug 14 18:10:40 2000 @@ -8,7 +8,7 @@ $NetBSD: patch-aa,v 1.2 2000/08/14 16:51:36 mjl Exp $ - CFLAGS="-g -O2" - WFLAGS="-Wall" -+# CFLAGS="-g -O2" ++ CFLAGS="-O2" +# WFLAGS="-Wall" LD="$CC" - LDFLAGS="-rdynamic" @@ -45,3 +45,14 @@ $NetBSD: patch-aa,v 1.2 2000/08/14 16:51:36 mjl Exp $ AC_CHECK_LIB(Xext, XShmAttach) if test -z "ac_cv_lib_Xext_XShmAttach"; then AC_MSG_WARN([XShm not found: DISABLING SHARED MEMORY]) +@@ -216,6 +217,10 @@ + case "$host" in + *-linux*) AC_DEFINE(HAVE_OSS) + AC_DEFINE(OSS_DEVICE, ["/dev/dsp"]) ++ ;; ++ *-netbsd*) AC_DEFINE(HAVE_OSS) ++ AC_DEFINE(OSS_DEVICE, ["/dev/audio"]) ++ LIBS="$LIBS -lossaudio" + ;; + esac + diff --git a/lang/squeak/patches/patch-ab b/lang/squeak/patches/patch-ab new file mode 100644 index 00000000000..97e874595cd --- /dev/null +++ b/lang/squeak/patches/patch-ab @@ -0,0 +1,56 @@ +$NetBSD: patch-ab,v 1.3 2001/05/02 04:02:06 fredb Exp $ + +--- src/sqUnixSound.c.orig Tue Jun 22 11:07:36 1999 ++++ src/sqUnixSound.c +@@ -38,7 +38,12 @@ + #include <fcntl.h> + #include <sys/time.h> + #include <sys/ioctl.h> ++#ifdef __NetBSD__ ++#include <soundcard.h> ++#include <sys/audioio.h> ++#else + #include <sys/soundcard.h> ++#endif + + static unsigned char *auBuf= 0; + +@@ -212,6 +217,30 @@ + + int snd_AvailableSpace(void) + { ++#if defined(__NetBSD__) && SOUND_VERSION < 0x030001 ++/* ++ The OSS emulation layer in NetBSD-1.[45].x failed to update ++ audio_buf_info->fragments, so get the information using the ++ native audio driver. ++*/ ++ struct audio_info info; ++ int freeBlocks; ++ ++ if (auFd == -1) return -1; ++ ++ if (ioctl(auFd, AUDIO_GETINFO, &info) < 0) { ++ perror("ioctl(AUDIO_GETINFO)"); ++ return 0; ++ } ++ ++ /* Make certain we have one, full hardware block free. */ ++ freeBlocks = (long)info.hiwat-- - (long)(info.play.seek--)/info.blocksize; ++ if (freeBlocks > 0) { ++ return info.blocksize; ++ } else { ++ auSemaWaiting= true; ++ return 0; ++#else + audio_buf_info info; + if (auFd == -1) return -1; + +@@ -226,6 +255,7 @@ + return 0; + } else { + return info.fragsize; ++#endif + } + } + |