summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfredb <fredb@pkgsrc.org>2004-04-26 07:10:16 +0000
committerfredb <fredb@pkgsrc.org>2004-04-26 07:10:16 +0000
commit40bda8982a62dea544ba937c4d3d613bf4b1bee4 (patch)
tree29eec6d41a5470e58ca4895a0b4a1ed38dc18a74
parentf532365632d9aefaf8258a1f6bfaa8c1676ace53 (diff)
downloadpkgsrc-40bda8982a62dea544ba937c4d3d613bf4b1bee4.tar.gz
Update Unix VM to 3.6-3, and default image to 3.6-5429. Many improvements
and enhancements since 3.0. Notably, display and sound plugins can now be selected at run-time, and support is added for character set conversion. This package also contains a driver for NetBSD native audio, by yours truly. OSS audio requires a newer interface than NetBSD emulation supports, so that doesn't build anymore on NetBSD, though it may with third party drivers. NAS builds on NetBSD, but doesn't work. There are new display drivers which build selectively on linux and MacOS, and a new audio driver for MacOS. I'm marking this package ONLY_FOR_PLATFORM=NetBSD-*-*, though, mainly because the static PLIST that the package presently has can't reflect any of that. This closes PR pkg/17950.
-rw-r--r--lang/squeak/Makefile76
-rw-r--r--lang/squeak/PLIST46
-rw-r--r--lang/squeak/distinfo36
-rw-r--r--lang/squeak/patches/patch-aa38
-rw-r--r--lang/squeak/patches/patch-ab76
-rw-r--r--lang/squeak/patches/patch-ac28
-rw-r--r--lang/squeak/patches/patch-ad30
-rw-r--r--lang/squeak/patches/patch-ae32
-rw-r--r--lang/squeak/patches/patch-af72
-rw-r--r--lang/squeak/patches/patch-ag122
-rw-r--r--lang/squeak/patches/patch-ah30
-rw-r--r--lang/squeak/patches/patch-ai36
-rw-r--r--lang/squeak/patches/patch-aj17
-rw-r--r--lang/squeak/patches/patch-ak383
-rw-r--r--lang/squeak/patches/patch-al18
-rw-r--r--lang/squeak/patches/patch-ba13
16 files changed, 658 insertions, 395 deletions
diff --git a/lang/squeak/Makefile b/lang/squeak/Makefile
index 775f29dd51c..df494f05c6c 100644
--- a/lang/squeak/Makefile
+++ b/lang/squeak/Makefile
@@ -1,49 +1,59 @@
-# $NetBSD: Makefile,v 1.24 2004/01/20 12:19:17 agc Exp $
+# $NetBSD: Makefile,v 1.25 2004/04/26 07:10:16 fredb Exp $
#
-DISTNAME= Squeak-3.0
-PKGNAME= squeak-3.0
+DISTNAME= Squeak-3.6-3
+PKGNAME= squeak-3.6.3
CATEGORIES= lang
-MASTER_SITES= ftp://st.cs.uiuc.edu/Smalltalk/Squeak/3.0/platform-independent/
-MASTER_SITES+= ftp://st.cs.uiuc.edu/Smalltalk/Squeak/3.0/unix-linux/src/
-MASTER_SITES+= ftp://ftp.inria.fr/INRIA/Projects/SOR/users/piumarta/squeak/
-DISTFILES= ReadMe.txt.gz Squeak3.0-3552.zip SqueakV3.sources.gz
-DISTFILES+= ${DISTNAME}-src${EXTRACT_SUFX}
+MASTER_SITES= http://www-sor.inria.fr/~piumarta/squeak/unix/release/
+DISTFILES= Squeak-3.6-3.src.tar.gz Squeak-3.6-5429.image.tar.gz
+DISTFILES+= Squeak-3.sources.tar.gz
MAINTAINER= fredb@NetBSD.org
-HOMEPAGE= http://www.squeak.org/
+HOMEPAGE= http://www-sor.inria.fr/~piumarta/squeak/
COMMENT= Full Smalltalk 80 with portability to UN*X, Mac, and Windows
-BUILD_DEPENDS+= unzip-[0-9]*:../../archivers/unzip
-
-WRKSRC= ${WRKDIR}/Squeak-3.0/build
GNU_CONFIGURE= yes
+USE_BUILDLINK3= yes
USE_LIBTOOL= yes
USE_X11= yes
-CPPFLAGS+= -DNETBSD_OSS_HACK
-DIST_SUBDIR= squeak
-EXTRACT_ONLY= ${DISTNAME}-src${EXTRACT_SUFX}
+AUTOCONF_REQD>= 2.57
+AUTOMAKE_REQD= 1.4.6
-CONFIGURE_SCRIPT= ${WRKSRC}/../src/unix/configure
-LTCONFIG_OVERRIDE= ${WRKSRC}/../src/unix/ltconfig
+BUILD_DIRS= ${WRKDIR}/build
+CONFIGURE_DIRS= ${WRKDIR}/build
+CONFIGURE_SCRIPT= ${WRKSRC}/platforms/unix/config/configure
+DIST_SUBDIR= squeak
+INSTALLATION_DIRS= ${WRKDIR}/build
-post-extract:
-.for f in ReadMe.txt.gz SqueakV3.sources.gz
- ${GZCAT} ${DISTDIR}/${DIST_SUBDIR}/${f} > ${WRKDIR}/${f:C/.gz//}
-.endfor
- cd ${WRKDIR} && \
- ${LOCALBASE}/bin/unzip ${DISTDIR}/${DIST_SUBDIR}/Squeak3.0-3552.zip
- ${MKDIR} ${WRKSRC}
+ONLY_FOR_PLATFORM= NetBSD-*-*
-post-install:
- ${INSTALL_DATA_DIR} ${PREFIX}/share/squeak/3.0
-.for f in ReadMe.txt SqueakV3.sources
- ${INSTALL_DATA} ${WRKDIR}/${f} ${PREFIX}/share/squeak/
-.endfor
-.for f in Squeak3.0.changes Squeak3.0.image
- ${INSTALL_DATA} ${WRKDIR}/${f} \
- ${PREFIX}/share/squeak/3.0/${f}
-.endfor
+SQUEAK_CHANGES= ${DISTNAME}/usr/local/lib/squeak/Squeak3.6-5429.changes.gz
+SQUEAK_IMAGE= ${DISTNAME}/usr/local/lib/squeak/Squeak3.6-5429.image.gz
+SQUEAK_SOURCES= Squeak-3/usr/local/lib/squeak/SqueakV3.sources
+pre-configure:
+ cd ${WRKSRC}/platforms/unix/config \
+ && ${SETENV} PATH=${PREFIX}/bin:${PATH} ${MAKE} configure
+ ${MKDIR} ${CONFIGURE_DIRS}
+
+post-install:
+ ${INSTALL_DATA} ${WRKDIR}/${SQUEAK_CHANGES} ${PREFIX}/lib/squeak/
+ ${INSTALL_DATA} ${WRKDIR}/${SQUEAK_IMAGE} ${PREFIX}/lib/squeak/
+ ${INSTALL_DATA} ${WRKDIR}/${SQUEAK_SOURCES} ${PREFIX}/lib/squeak/
+ cd ${PREFIX}/lib/squeak \
+ && ${LN} -s ${SQUEAK_CHANGES:C/.*\///} squeak.changes.gz \
+ && ${LN} -s ${SQUEAK_IMAGE:C/.*\///} squeak.image.gz
+ ${INSTALL_SCRIPT} ${INSTALLATION_DIRS}/inisqueak ${PREFIX}/bin/
+
+.include "../../mk/bsd.prefs.mk"
+
+.if ${MACHINE_ARCH} == i386
+CONFIGURE_ARGS+= --enable-mpg-mmx
+.endif
+
+.include "../../mk/autoconf.mk"
+.include "../../mk/automake.mk"
+.include "../../audio/nas/buildlink3.mk"
+.include "../../mk/ossaudio.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/lang/squeak/PLIST b/lang/squeak/PLIST
index 819239076ae..4fb4f3646bb 100644
--- a/lang/squeak/PLIST
+++ b/lang/squeak/PLIST
@@ -1,27 +1,31 @@
-@comment $NetBSD: PLIST,v 1.1 2001/11/01 00:25:02 zuntum Exp $
-bin/squeak
+@comment $NetBSD: PLIST,v 1.2 2004/04/26 07:10:16 fredb Exp $
bin/inisqueak
-lib/squeak/3.0/squeak
-lib/squeak/3.0/inisqueak
-lib/squeak/3.0/squeak.map
-lib/squeak/3.0/Profiler.a
-lib/squeak/3.0/Profiler.la
-lib/squeak/3.0/Profiler.so
-lib/squeak/3.0/System.a
-lib/squeak/3.0/System.la
-lib/squeak/3.0/System.so
+bin/squeak
+lib/squeak/3.6-3/B3DAcceleratorPlugin
+lib/squeak/3.6-3/UnixOSProcessPlugin
+lib/squeak/3.6-3/XDisplayControlPlugin
+lib/squeak/3.6-3/npsqueak.so
+lib/squeak/3.6-3/npsqueakrun
+lib/squeak/3.6-3/squeak
+lib/squeak/3.6-3/vm-display-X11
+lib/squeak/3.6-3/vm-display-null
+lib/squeak/3.6-3/vm-sound-NAS
+lib/squeak/3.6-3/vm-sound-NetBSD
+lib/squeak/3.6-3/vm-sound-null
+lib/squeak/Squeak3.6-5429.changes.gz
+lib/squeak/Squeak3.6-5429.image.gz
+lib/squeak/SqueakV3.sources
+lib/squeak/npsqueakregister
+lib/squeak/squeak.changes.gz
+lib/squeak/squeak.image.gz
+man/man1/inisqueak.1
man/man1/squeak.1
-share/doc/squeak/BUILD.UnixSqueak
share/doc/squeak/COPYING
share/doc/squeak/COPYRIGHT
share/doc/squeak/LICENSE
-share/doc/squeak/README.CodingStandards
-share/squeak/ReadMe.txt
-share/squeak/SqueakV3.sources
-share/squeak/3.0/Squeak3.0.changes
-share/squeak/3.0/Squeak3.0.image
-@dirrm lib/squeak/3.0
-@dirrm lib/squeak
+share/doc/squeak/README.Contributing
+share/doc/squeak/README.Keyboard
+share/doc/squeak/README.Sound
@dirrm share/doc/squeak
-@dirrm share/squeak/3.0
-@dirrm share/squeak
+@dirrm lib/squeak/3.6-3
+@dirrm lib/squeak
diff --git a/lang/squeak/distinfo b/lang/squeak/distinfo
index 6f3cbb4c7b7..f8c04f004d6 100644
--- a/lang/squeak/distinfo
+++ b/lang/squeak/distinfo
@@ -1,18 +1,20 @@
-$NetBSD: distinfo,v 1.8 2002/10/02 22:00:09 dillo Exp $
+$NetBSD: distinfo,v 1.9 2004/04/26 07:10:16 fredb Exp $
-SHA1 (squeak/ReadMe.txt.gz) = e632f908e576d8ccbf8386a1b94689e261a2aec7
-Size (squeak/ReadMe.txt.gz) = 6513 bytes
-SHA1 (squeak/Squeak3.0-3552.zip) = ffa356344ef7a9b14de4b4e449a4e8d97b04580d
-Size (squeak/Squeak3.0-3552.zip) = 4868994 bytes
-SHA1 (squeak/SqueakV3.sources.gz) = 7e992d801856ef57565fca34f8af324495dcd871
-Size (squeak/SqueakV3.sources.gz) = 3476504 bytes
-SHA1 (squeak/Squeak-3.0-src.tar.gz) = 231cc39c8dceafea270da1652ced83ec769a0bb5
-Size (squeak/Squeak-3.0-src.tar.gz) = 745258 bytes
-SHA1 (patch-aa) = 5b88ea010030c20a8712e1cc71e12adc1ae267c0
-SHA1 (patch-ab) = c58b921df217fca2221893a6b017cbc7aba28bbe
-SHA1 (patch-ac) = 035cb8f3d00619de7b2c638168834ac6da2aaad8
-SHA1 (patch-ad) = b9b9b99da74429a4a42e7ff5ecc632c0dfe61648
-SHA1 (patch-ae) = c1714d9dbeeb7a86cfda350c567d29431616e281
-SHA1 (patch-af) = 8fc7494c1182ff9a55ae26aaa389e94e52c9f6c7
-SHA1 (patch-ag) = 42fc9206783c74b948915ddcee93aa5eed929323
-SHA1 (patch-ba) = eae0e8c40b14e3e04b278b1b841c4c89ddebea7b
+SHA1 (squeak/Squeak-3.6-3.src.tar.gz) = 9631fd9778bea45bedddc878a7132d46936d8148
+Size (squeak/Squeak-3.6-3.src.tar.gz) = 2552981 bytes
+SHA1 (squeak/Squeak-3.6-5429.image.tar.gz) = 60900eafcd755bd1a898758615045b806f27bd48
+Size (squeak/Squeak-3.6-5429.image.tar.gz) = 7756686 bytes
+SHA1 (squeak/Squeak-3.sources.tar.gz) = 0a265f5c631970fe39a483967dab39c26304092c
+Size (squeak/Squeak-3.sources.tar.gz) = 4184537 bytes
+SHA1 (patch-aa) = fdb5b9c06e02056d1c52344c1e5577ac9d09a5e6
+SHA1 (patch-ab) = ae371a47efb513721b19990ebd2a8ebec78bd89e
+SHA1 (patch-ac) = 38eb12424792eba344c4963132012aa90c70dd8d
+SHA1 (patch-ad) = e70f82454c74ca93f2e448ce055a72130f59dc8f
+SHA1 (patch-ae) = 54e06ce67bbe71280e846dfbb81e7ebd6becd3f7
+SHA1 (patch-af) = 41561264023700df277d81f528c9dad42a11e31f
+SHA1 (patch-ag) = e45917200167817c134eb51cf424179569bb7952
+SHA1 (patch-ah) = 112dac126b8d18d645c4c83184888412a571f5ec
+SHA1 (patch-ai) = 8ca9289dea3484205b65759f2aa052d57d6af2ee
+SHA1 (patch-aj) = 18d81c878ee88bf334e3700d46d66dfa458618d0
+SHA1 (patch-ak) = 25cb1f447a6f3c247a301a4a6d02c25028cb1b70
+SHA1 (patch-al) = d58a1800600ff1a124c3db7aa382b085218160f3
diff --git a/lang/squeak/patches/patch-aa b/lang/squeak/patches/patch-aa
index bb83e0ec50c..2fe7aab4c1d 100644
--- a/lang/squeak/patches/patch-aa
+++ b/lang/squeak/patches/patch-aa
@@ -1,30 +1,12 @@
-$NetBSD: patch-aa,v 1.4 2001/05/16 02:27:53 fredb Exp $
+$NetBSD: patch-aa,v 1.5 2004/04/26 07:10:16 fredb Exp $
---- ../src/unix/Makefile.in.orig Mon Feb 12 16:59:20 2001
-+++ ../src/unix/Makefile.in
-@@ -71,7 +71,7 @@
- datadir= @datadir@
- mandir= @mandir@
+--- platforms/unix/config/Makefile 2002-06-05 00:17:14.000000000 -0500
++++ platforms/unix/config/Makefile 2004-04-25 15:13:34.000000000 -0500
+@@ -1,6 +1,6 @@
+ configure : .force
+ ./mkacinc > acplugins.m4
+- aclocal
++ aclocal-1.4
+ autoconf
+ rm acplugins.m4
--docdir= $(prefix)/doc/squeak-$(VERSION)
-+docdir= $(prefix)/share/doc/squeak
- sqlibdir= $(libdir)/squeak
- vsqlibdir= $(sqlibdir)/$(VERSION)
- sqdatadir= $(datadir)/squeak
-@@ -92,6 +92,7 @@
- INSTALL= @INSTALL@
- INSTALL_PROG= @INSTALL_PROGRAM@
- INSTALL_DATA= @INSTALL_DATA@
-+INSTALL_SCRIPT= @INSTALL_SCRIPT@
-
- UNINSTALL= $(SHELL) $(utldir)/uninstall
-
-@@ -218,7 +219,7 @@
- $(MKINSTALLDIRS) $(DESTDIR)$(vsqlibdir)
- $(INSTALL_PROG) squeak $(DESTDIR)$(vsqlibdir)
- # test -x j3 && $(INSTALL_PROG) squeak $(DESTDIR)$(vsqlibdir)
-- $(INSTALL_PROG) inisqueak $(DESTDIR)$(vsqlibdir)
-+ $(INSTALL_SCRIPT) inisqueak $(DESTDIR)$(vsqlibdir)
- $(INSTALL_DATA) squeak.map $(DESTDIR)$(vsqlibdir)
- $(MKINSTALLDIRS) $(DESTDIR)$(bindir)
- ( path=`$(utldir)/relpath $(bindir) $(vsqlibdir)`; \
diff --git a/lang/squeak/patches/patch-ab b/lang/squeak/patches/patch-ab
index a8d99db7338..a731ec1c2aa 100644
--- a/lang/squeak/patches/patch-ab
+++ b/lang/squeak/patches/patch-ab
@@ -1,65 +1,13 @@
-$NetBSD: patch-ab,v 1.4 2001/05/16 02:27:53 fredb Exp $
+$NetBSD: patch-ab,v 1.5 2004/04/26 07:10:16 fredb Exp $
---- ../src/unix/sqUnixSound.c.orig Thu Feb 8 11:27:04 2001
-+++ ../src/unix/sqUnixSound.c
-@@ -70,9 +70,16 @@
- # include <fcntl.h>
- # include <sys/time.h>
- # include <sys/ioctl.h>
-+#ifdef __NetBSD__
-+#include <soundcard.h>
-+#ifdef NETBSD_OSS_HACK
-+#include <sys/audioio.h>
-+#endif
-+#else
- # include <sys/soundcard.h>
-+#endif
-
--# if !defined(OPEN_SOUND_SYSTEM) && !defined(__FreeBSD__)
-+# if !defined(OPEN_SOUND_SYSTEM) && !defined(__FreeBSD__) && !defined(__NetBSD__)
- # warning:
- # warning: sys/soundcard.h did not define OPEN_SOUND_SYSTEM
- # warning: SOUND SUPPORT DISABLED
-@@ -274,6 +279,34 @@
-
- int snd_AvailableSpace(void)
- {
-+#ifdef NETBSD_OSS_HACK
-+/*
-+ This is to work around a bug in NetBSD-1.5.1 and earlier, in which
-+ the SNDCTL_DSP_GETOSPACE(&buf_info) ioctl was not handled properly.
-+ The correct information is always available via the native audio
-+ driver, so use that instead.
-+*/
-+ 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 = info.hiwat - (info.play.seek + info.blocksize - 1)/info.blocksize;
-+ if (freeBlocks > 0)
-+ {
-+ return info.blocksize;
-+ }
-+ else
-+ {
-+ auSemaWaiting= true;
-+ return 0;
-+#else
- audio_buf_info info;
- if (auFd == -1)
- return -1;
-@@ -294,6 +326,7 @@
- else
- {
- return info.fragsize;
-+#endif
- }
- }
-
+--- platforms/unix/config/Makefile.install 2004-04-01 20:17:33.000000000 -0600
++++ platforms/unix/config/Makefile.install 2004-04-25 21:38:16.000000000 -0500
+@@ -63,7 +63,7 @@
+ echo $(INSTALL_DATA) $(topdir)/platforms/unix/doc/$$f $(ROOT)$(docdir); \
+ $(INSTALL_DATA) $(topdir)/platforms/unix/doc/$$f $(ROOT)$(docdir); \
+ done
+- gzip -f9 $(ROOT)$(docdir)/*
++ #gzip -f9 $(ROOT)$(docdir)/*
+ $(MKINSTALLDIRS) $(ROOT)$(mandir)/man1
+ $(INSTALL_DATA) squeak.1 $(ROOT)$(mandir)/man1
+ rm -f $(ROOT)$(mandir)/man1/inisqueak.1
diff --git a/lang/squeak/patches/patch-ac b/lang/squeak/patches/patch-ac
index 49566c55a3a..45903fc8c14 100644
--- a/lang/squeak/patches/patch-ac
+++ b/lang/squeak/patches/patch-ac
@@ -1,22 +1,12 @@
-$NetBSD: patch-ac,v 1.3 2001/05/16 02:27:53 fredb Exp $
+$NetBSD: patch-ac,v 1.4 2004/04/26 07:10:16 fredb Exp $
---- ../src/unix/sqXWindow.c.orig Fri Mar 23 16:47:37 2001
-+++ ../src/unix/sqXWindow.c
-@@ -4220,7 +4220,7 @@
- error("Segmentation fault");
- }
+--- platforms/unix/config/config.h.in 2003-09-03 10:43:23.000000000 -0500
++++ platforms/unix/config/config.h.in 2003-09-15 15:15:41.000000000 -0500
+@@ -65,6 +65,7 @@
+ #undef USE_AUDIO_OSS
+ #undef USE_AUDIO_MACOSX
+ #undef OSS_DEVICE
++#undef USE_AUDIO_NETBSD
--#ifdef __alpha__
-+#if defined(__alpha__) && !defined(__NetBSD__)
- /* headers for setsysinfo (see below) */
- # include <sys/sysinfo.h>
- # include <sys/proc.h>
-@@ -4254,7 +4254,7 @@
+ /* header files */
- /* initialisation */
-
--# if defined(__alpha__)
-+#if defined(__alpha__) && !defined(__NetBSD__)
- /* disable printing of unaligned access exceptions */
- {
- int buf[2]= { SSIN_UACPROC, UAC_NOPRINT };
diff --git a/lang/squeak/patches/patch-ad b/lang/squeak/patches/patch-ad
index 4da90d76b9f..f81aa7c64f4 100644
--- a/lang/squeak/patches/patch-ad
+++ b/lang/squeak/patches/patch-ad
@@ -1,22 +1,12 @@
-$NetBSD: patch-ad,v 1.1 2001/05/16 02:27:53 fredb Exp $
+$NetBSD: patch-ad,v 1.2 2004/04/26 07:10:16 fredb Exp $
---- ../src/unix/acinclude.m4.orig Mon Feb 12 15:59:05 2001
-+++ ../src/unix/acinclude.m4
-@@ -149,10 +149,16 @@
- AC_DEFUN(AC_HAVE_OSS,
- [AC_CACHE_CHECK([for Open Sound System], ac_cv_oss,
- AC_TRY_COMPILE([#include <sys/soundcard.h>],[OPEN_SOUND_SYSTEM;],
-- ac_cv_oss="yes", ac_cv_oss="no"))
-+ ac_cv_oss="yes",
-+ AC_TRY_COMPILE([#include <soundcard.h>],[SOUND_VERSION;],
-+ ac_cv_oss="yes", ac_cv_oss="no")))
- if $test "$ac_cv_oss" = "yes" -a -e /dev/dsp; then
- AC_DEFINE(HAVE_OSS,1)
- AC_DEFINE(OSS_DEVICE,"/dev/dsp")
-+elif $test "$ac_cv_oss" = "yes" -a -e /dev/audio; then
-+ AC_DEFINE(HAVE_OSS,1)
-+ AC_DEFINE(OSS_DEVICE,"/dev/audio")
-+ AC_CHECK_LIB([ossaudio], [_oss_ioctl])
- fi])
+--- platforms/unix/config/configure.ac 2004-04-01 06:57:04.000000000 -0600
++++ platforms/unix/config/configure.ac 2004-04-25 15:08:29.000000000 -0500
+@@ -161,6 +161,7 @@
+ AC_HAVE_HEADERS(features.h)
+ AC_HEADER_TIME
+ AC_HEADER_DIRENT
++AC_HAVE_HEADERS(sys/audioio.h)
+
+ AC_STRUCT_TIMEZONE
- AC_DEFUN(AC_C_BYTEORDER,
diff --git a/lang/squeak/patches/patch-ae b/lang/squeak/patches/patch-ae
index 23c36dacc07..ceb54b26e0b 100644
--- a/lang/squeak/patches/patch-ae
+++ b/lang/squeak/patches/patch-ae
@@ -1,21 +1,13 @@
-$NetBSD: patch-ae,v 1.1 2001/08/23 21:18:31 fredb Exp $
+$NetBSD: patch-ae,v 1.2 2004/04/26 07:10:16 fredb Exp $
-*** ../src/unix/util/relpath 21 May 2001 03:43:46 -0000 1.1.1.1
---- ../src/unix/util/relpath 21 May 2001 03:45:25 -0000
-***************
-*** 44,50 ****
- path=$2
-
- for dir in `echo $cwd | tr '/' ' '`; do
-! if expr match $path "/$dir" >/dev/null; then
- path=`echo $path | sed "s,^/$dir,,"`
- cwd=`echo $cwd | sed "s,^/$dir,,"`
- fi
---- 44,50 ----
- path=$2
-
- for dir in `echo $cwd | tr '/' ' '`; do
-! if expr X$path : X"/$dir" >/dev/null; then
- path=`echo $path | sed "s,^/$dir,,"`
- cwd=`echo $cwd | sed "s,^/$dir,,"`
- fi
+--- platforms/unix/config/make.cfg.in 2003-08-31 12:55:21.000000000 -0500
++++ platforms/unix/config/make.cfg.in 2004-04-25 21:38:41.000000000 -0500
+@@ -74,7 +74,7 @@
+ mandir= @mandir@
+ imgdir= @imgdir@
+ plgdir= @plgdir@
+-docdir= $(prefix)/doc/squeak
++docdir= $(prefix)/share/doc/squeak
+
+ SHELL= @SHELL@
+ MKINSTALLDIRS= $(SHELL) $(cfgdir)/mkinstalldirs
diff --git a/lang/squeak/patches/patch-af b/lang/squeak/patches/patch-af
index 3dec2edd7c9..7a6c1a119a7 100644
--- a/lang/squeak/patches/patch-af
+++ b/lang/squeak/patches/patch-af
@@ -1,60 +1,14 @@
-$NetBSD: patch-af,v 1.1 2001/08/23 21:18:31 fredb Exp $
+$NetBSD: patch-af,v 1.2 2004/04/26 07:10:16 fredb Exp $
-*** ../src/unix/inisqueak.in 21 May 2001 03:43:46 -0000 1.1.1.1
---- ../src/unix/inisqueak.in 21 May 2001 04:05:03 -0000
-***************
-*** 56,64 ****
- CHANGES=Squeak${VERSION}.changes
- SOURCES=SqueakV${MAJOR}.sources
-
-- # Sun's /bin/sh does not understand "test -e", but [/usr]/bin/test does
-- test="`which test`"
--
- startup="yes"
-
- if test ! -w .; then
---- 56,61 ----
-***************
-*** 81,90 ****
- {
- file="${1}"
- dir="${2}"
-! if ${test} ! -e ${1}; then
-! if ${test} -e ${2}/${1}; then
- echo "+ ${3} ${2}/${1} ."
- ${3} ${2}/${1} .
- else
- missing "${2}/${1}"
- fi
---- 78,89 ----
- {
- file="${1}"
- dir="${2}"
-! if test ! -f ${1} ; then
-! if test -f ${2}/${1} ; then
- echo "+ ${3} ${2}/${1} ."
- ${3} ${2}/${1} .
-+ echo "+ chmod u+w ${1}"
-+ chmod u+w ${1}
- else
- missing "${2}/${1}"
- fi
-***************
-*** 95,103 ****
- }
-
- install "${SOURCES}" "${SQDATADIR}" "ln -s"
-! install "${IMAGE}" "${VSQDATADIR}" "cp -p"
-! install "${CHANGES}" "${VSQDATADIR}" "cp -p"
-!
-! echo "Running ${SQUEAK}"
-
-! exec ${SQUEAK}
---- 94,100 ----
- }
-
- install "${SOURCES}" "${SQDATADIR}" "ln -s"
-! install "${IMAGE}" "${VSQDATADIR}" "cp"
-! install "${CHANGES}" "${VSQDATADIR}" "cp"
-
-! echo "Done. Now start 'squeak'!"
+--- platforms/unix/doc/squeak.1 2003-09-16 00:05:38.000000000 -0500
++++ platforms/unix/doc/squeak.1 2004-04-25 20:45:36.000000000 -0500
+@@ -370,6 +370,9 @@
+ .B \ \ \ sound=NAS
+ provides sound i/o via the Network Audio System.
+ .TP
++.B \ \ \ sound=NetBSD
++provides sound via the NetBSD device-independent audio layer.
++.TP
+ .B \ \ \ sound=Sun
+ provides sound on Sun Microsystems hardware.
+ .TP
diff --git a/lang/squeak/patches/patch-ag b/lang/squeak/patches/patch-ag
index e1ddaacb3eb..6eaba95a052 100644
--- a/lang/squeak/patches/patch-ag
+++ b/lang/squeak/patches/patch-ag
@@ -1,104 +1,24 @@
-$NetBSD: patch-ag,v 1.1 2002/10/02 22:00:10 dillo Exp $
+$NetBSD: patch-ag,v 1.2 2004/04/26 07:10:16 fredb Exp $
---- ../src/unix/configure.orig Wed Oct 2 23:48:40 2002
-+++ ../src/unix/configure
-@@ -3737,7 +4463,22 @@ int main() {
- OPEN_SOUND_SYSTEM;
- ; return 0; }
- EOF
--if { (eval echo configure:3741: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-+if { (eval echo configure:4467: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-+ rm -rf conftest*
-+ ac_cv_oss="yes"
-+else
-+ echo "configure: failed program was:" >&5
-+ cat conftest.$ac_ext >&5
-+ rm -rf conftest*
-+ cat > conftest.$ac_ext <<EOF
-+#line 4475 "configure"
-+#include "confdefs.h"
-+#include <soundcard.h>
-+int main() {
-+SOUND_VERSION;
-+; return 0; }
-+EOF
-+if { (eval echo configure:4482: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_oss="yes"
- else
-@@ -3748,6 +4489,8 @@ else
- fi
- rm -f conftest*
- fi
-+rm -f conftest*
-+fi
+--- platforms/unix/vm/sqUnixCharConv.c 2003-11-18 12:30:32.000000000 -0600
++++ platforms/unix/vm/sqUnixCharConv.c 2004-04-25 15:02:13.000000000 -0500
+@@ -151,14 +151,18 @@
- echo "$ac_t""$ac_cv_oss" 1>&6
- if $test "$ac_cv_oss" = "yes" -a -e /dev/dsp; then
-@@ -3759,9 +4502,65 @@ EOF
- #define OSS_DEVICE "/dev/dsp"
- EOF
+ typedef char ichar_t;
-+elif $test "$ac_cv_oss" = "yes" -a -e /dev/audio; then
-+ cat >> confdefs.h <<\EOF
-+#define HAVE_OSS 1
-+EOF
-+
-+ cat >> confdefs.h <<\EOF
-+#define OSS_DEVICE "/dev/audio"
-+EOF
-+
-+ echo $ac_n "checking for _oss_ioctl in -lossaudio""... $ac_c" 1>&6
-+echo "configure:4516: checking for _oss_ioctl in -lossaudio" >&5
-+ac_lib_var=`echo ossaudio'_'_oss_ioctl | sed 'y%./+-%__p_%'`
-+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-+ echo $ac_n "(cached) $ac_c" 1>&6
-+else
-+ ac_save_LIBS="$LIBS"
-+LIBS="-lossaudio $LIBS"
-+cat > conftest.$ac_ext <<EOF
-+#line 4524 "configure"
-+#include "confdefs.h"
-+/* Override any gcc2 internal prototype to avoid an error. */
-+/* We use char because int might match the return type of a gcc2
-+ builtin and then its argument prototype would still apply. */
-+char _oss_ioctl();
-+
-+int main() {
-+_oss_ioctl()
-+; return 0; }
-+EOF
-+if { (eval echo configure:4535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+ rm -rf conftest*
-+ eval "ac_cv_lib_$ac_lib_var=yes"
-+else
-+ echo "configure: failed program was:" >&5
-+ cat conftest.$ac_ext >&5
-+ rm -rf conftest*
-+ eval "ac_cv_lib_$ac_lib_var=no"
-+fi
-+rm -f conftest*
-+LIBS="$ac_save_LIBS"
-+
-+fi
-+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-+ echo "$ac_t""yes" 1>&6
-+ ac_tr_lib=HAVE_LIB`echo ossaudio | sed -e 's/[^a-zA-Z0-9_]/_/g' \
-+ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
-+ cat >> confdefs.h <<EOF
-+#define $ac_tr_lib 1
-+EOF
-+
-+ LIBS="-lossaudio $LIBS"
-+
-+else
-+ echo "$ac_t""no" 1>&6
-+fi
-+
- fi
- echo $ac_n "checking for prefix to use for loadable modules""... $ac_c" 1>&6
--echo "configure:3765: checking for prefix to use for loadable modules" >&5
-+echo "configure:4564: checking for prefix to use for loadable modules" >&5
- if eval "test \"`echo '$''{'ac_cv_module_prefix'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
+-#ifdef __sparc
++#if defined(__sparc) && !defined(__NetBSD__)
+ void *sqTextEncoding= (void *)"mac"; /* xxxFIXME -> "ISO-8859-15" */
+ void *uxPathEncoding= (void *)"iso";
+ void *uxTextEncoding= (void *)"iso";
+ void *uxXWinEncoding= (void *)"iso";
+ void *uxUTF8Encoding= (void *)"UTF-8";
+ #else
++#ifdef __NetBSD__
++void *sqTextEncoding= (void *)"ISO-8859-15";
++#else
+ void *sqTextEncoding= (void *)"MACINTOSH"; /* xxxFIXME -> "ISO-8859-15" */
++#endif
+ void *uxPathEncoding= (void *)"UTF-8";
+ void *uxTextEncoding= (void *)"ISO-8859-15";
+ void *uxXWinEncoding= (void *)"ISO-8859-1";
diff --git a/lang/squeak/patches/patch-ah b/lang/squeak/patches/patch-ah
new file mode 100644
index 00000000000..bca78da0994
--- /dev/null
+++ b/lang/squeak/patches/patch-ah
@@ -0,0 +1,30 @@
+$NetBSD: patch-ah,v 1.1 2004/04/26 07:10:16 fredb Exp $
+
+--- platforms/unix/vm/sqUnixMain.c 2003-11-23 06:23:43.000000000 -0600
++++ platforms/unix/vm/sqUnixMain.c 2004-04-25 21:29:44.000000000 -0500
+@@ -62,7 +62,7 @@
+ #include <signal.h>
+ #include <fcntl.h>
+
+-#if defined(__alpha__)
++#if defined(__alpha__) && !defined(__NetBSD__)
+ # include <sys/sysinfo.h>
+ # include <sys/proc.h>
+ #endif
+@@ -677,6 +677,7 @@
+ { &soundModule, "sound", "NAS" }, /*** NO DEFAULT ***/
+ { &displayModule, "display", "Quartz" },
+ { &soundModule, "sound", "MacOSX" },
++ { &soundModule, "sound", "NetBSD" },
+ { &soundModule, "sound", "Sun" },
+ { &soundModule, "sound", "OSS" },
+ { &soundModule, "sound", "null" },
+@@ -1275,7 +1276,7 @@
+
+ signal(SIGSEGV, sigsegv);
+
+-#if defined(__alpha__)
++#if defined(__alpha__) && !defined(__NetBSD__)
+ /* disable printing of unaligned access exceptions */
+ {
+ int buf[2]= { SSIN_UACPROC, UAC_NOPRINT };
diff --git a/lang/squeak/patches/patch-ai b/lang/squeak/patches/patch-ai
new file mode 100644
index 00000000000..9b0403dc27f
--- /dev/null
+++ b/lang/squeak/patches/patch-ai
@@ -0,0 +1,36 @@
+$NetBSD: patch-ai,v 1.1 2004/04/26 07:10:16 fredb Exp $
+
+--- platforms/unix/vm-display-X11/acinclude.m4 2004-01-29 21:58:37.000000000 -0600
++++ platforms/unix/vm-display-X11/acinclude.m4 2004-04-25 15:04:40.000000000 -0500
+@@ -27,12 +27,31 @@
+ AC_DEFINE(USE_X11, [1])
+ AC_DEFINE_UNQUOTED(VM_X11DIR, "${x_libraries}")
+ LIBS="${LIBS} -lX11"
++ case "$host" in
++ *-netbsd*)
++ LIBS="${LIBS} -L${x_libraries} -R${x_libraries}" ;;
++ esac
+ AC_CHECK_LIB(Xext, XShmAttach)
+ if test "$have_gl" = ""; then have_gl="no"; fi
+ AC_CHECK_HEADERS(GL/gl.h, [
+ have_gl=yes
+ AC_DEFINE(USE_X11_GLX, [1])
+ AC_CHECK_LIB(GL,glIsEnabled)
++ case "$host" in
++ *-netbsd*)
++ case "$host" in
++ *-netbsd1*)
++ ;;
++ *-netbsdelf1*)
++ break
++ ;;
++ *)
++ CFLAGS="${CFLAGS} -pthread"
++ LDFLAGS="${LDFLAGS} -pthread"
++ ;;
++ esac
++ ;;
++ esac
+ ])
+ ],[
+ AC_PLUGIN_DISABLE
diff --git a/lang/squeak/patches/patch-aj b/lang/squeak/patches/patch-aj
new file mode 100644
index 00000000000..1345d0a938c
--- /dev/null
+++ b/lang/squeak/patches/patch-aj
@@ -0,0 +1,17 @@
+$NetBSD: patch-aj,v 1.1 2004/04/26 07:10:16 fredb Exp $
+
+--- platforms/unix/vm-sound-NetBSD/acinclude.m4 1969-12-31 18:00:00.000000000 -0600
++++ platforms/unix/vm-sound-NetBSD/acinclude.m4 2004-04-25 15:05:47.000000000 -0500
+@@ -0,0 +1,12 @@
++# -*- sh -*-
++
++AC_MSG_CHECKING([for NetBSD audio])
++AC_TRY_COMPILE([#include <sys/types.h>
++#include <sys/audioio.h>],
++ [struct audio_info info; info.blocksize;],[
++ AC_MSG_RESULT(yes)
++ AC_DEFINE_UNQUOTED(USE_AUDIO_NETBSD,1)
++],[
++ AC_MSG_RESULT(no)
++ AC_PLUGIN_DISABLE
++])
diff --git a/lang/squeak/patches/patch-ak b/lang/squeak/patches/patch-ak
new file mode 100644
index 00000000000..a62c37fb85f
--- /dev/null
+++ b/lang/squeak/patches/patch-ak
@@ -0,0 +1,383 @@
+$NetBSD: patch-ak,v 1.1 2004/04/26 07:10:16 fredb Exp $
+
+--- platforms/unix/vm-sound-NetBSD/sqUnixSoundNetBSD.c 1969-12-31 18:00:00.000000000 -0600
++++ platforms/unix/vm-sound-NetBSD/sqUnixSoundNetBSD.c 2004-04-25 15:05:47.000000000 -0500
+@@ -0,0 +1,378 @@
++/* sqUnixSoundNetBSD.c -- sound support for NetBSD
++ *
++ * Copyright (C) 1996-2002 Ian Piumarta and other authors/contributors
++ * as listed elsewhere in this file.
++ * All rights reserved.
++ *
++ * This file is part of Unix Squeak.
++ *
++ * This file is distributed in the hope that it will be useful, but WITHOUT
++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
++ * FITNESS FOR A PARTICULAR PURPOSE.
++ *
++ * You may use and/or distribute this file ONLY as part of Squeak, under
++ * the terms of the Squeak License as described in `LICENSE' in the base of
++ * this distribution, subject to the following restrictions:
++ *
++ * 1. The origin of this software must not be misrepresented; you must not
++ * claim that you wrote the original software. If you use this software
++ * in a product, an acknowledgment to the original author(s) (and any
++ * other contributors mentioned herein) in the product documentation
++ * would be appreciated but is not required.
++ *
++ * 2. This notice must not be removed or altered in any source distribution.
++ *
++ * Using (or modifying this file for use) in any context other than Squeak
++ * changes these copyright conditions. Read the file `COPYING' in the
++ * directory `platforms/unix/doc' before proceeding with any such use.
++ *
++ * You are not allowed to distribute a modified version of this file
++ * under its original name without explicit permission to do so. If
++ * you change it, rename it.
++ *
++ * Authors: Ian.Piumarta@inria.fr, Lex Spoon <lex@cc.gatech.edu> and
++ * Frederick Bruckman <fredb@NetBSD.org>.
++ *
++ */
++
++#include "sq.h"
++#include "aio.h"
++
++#include <stdio.h>
++#include <unistd.h>
++#include <fcntl.h>
++#include <sys/ioctl.h>
++#include <sys/audioio.h>
++#include <errno.h>
++
++
++/* Globals */
++static int auFd= -1; /* open file descriptor on AUDIODEVICE */
++static int fmtStereo; /* whether to use stereo or not */
++static int auBlockCount; /* VM's block size, in frames */
++static int auBlockSize; /* hardware blocksize, in bytes */
++static int auDuplexMode; /* 0: half duplex, !0: full duplex */
++static int auLatency; /* "fudge factor", to help keep the audio
++ hardware buffer filled */
++static int auPlaySemaIndex; /* identifier of audio system semaphore */
++static const char *auDevice; /* AUDIODEVICE, or "/dev/audio" by default */
++
++
++static int sound_AvailableSpace(void);
++
++
++static void auHandle(int fd, void *data, int flags)
++{
++ if (auFd == -1)
++ return;
++
++ if (sound_AvailableSpace() >= (auBlockSize >> 1))
++ signalSemaphoreWithIndex(auPlaySemaIndex);
++
++ aioHandle(fd, auHandle, flags);
++ return;
++}
++
++
++static int sound_Stop(void)
++{
++ if (auFd == -1)
++ return false;
++
++ aioDisable(auFd);
++ close(auFd);
++ auFd= -1;
++
++ return true;
++}
++
++
++static int sound_Start(int frameCount, int samplesPerSec, int stereo, int semaIndex)
++{
++ struct audio_info info;
++
++ /* Set some globals. */
++ auBlockCount= frameCount;
++ fmtStereo= stereo;
++ auPlaySemaIndex= semaIndex;
++
++ if (auFd != -1)
++ sound_Stop();
++
++ if ((auFd= open(auDevice, O_RDWR|O_NONBLOCK)) == -1)
++ {
++ perror(auDevice);
++ return false;
++ }
++
++ AUDIO_INITINFO(&info);
++ info.play.precision= 16;
++ info.play.encoding= AUDIO_ENCODING_SLINEAR;
++ info.play.channels= stereo ? 2 : 1;
++ info.play.sample_rate= samplesPerSec;
++ /*
++ Request desired HW blocksize to be the same as the VM's blocksize.
++ The blocksize could end up being different than what we asked for.
++ */
++ info.blocksize= auBlockSize= frameCount * (stereo ? 4 : 2);
++ info.mode= AUMODE_PLAY|AUMODE_PLAY_ALL;
++
++ if (ioctl(auFd, AUDIO_SETINFO, &info) == -1)
++ {
++ perror("AUDIO_SETINFO");
++ close(auFd);
++ auFd= -1;
++ return false;
++ }
++
++ if (info.blocksize == auBlockSize && info.hiwat > 1)
++ {
++ /*
++ Hurrah! Now tune the high- and low- water marks. Because of the
++ auLatency term, sound_AvailableSpace() will return slightly more
++ than one block after the VM returns from select(). The VM will
++ utilize the headroom to "sync up" when necessary, and thereafter
++ mostly write one full block at a time.
++ */
++ info.hiwat= (info.hiwat > 2) ? 2 : info.hiwat;
++ info.lowat= info.hiwat - 1;
++ if (ioctl(auFd, AUDIO_SETINFO, &info) == -1)
++ {
++ perror("AUDIO_SETINFO");
++ close(auFd);
++ auFd= -1;
++ return false;
++ }
++ /*
++ Set the initial fudge factor to 1/8 of the blocksize.
++ */
++ if (auLatency == 0)
++ auLatency= info.blocksize >> 3;
++ }
++ else
++ {
++ /*
++ The hardware buffer is probably too small, so just use the
++ defaults for high- and low- water marks. Don't bother with the
++ latency term, either, as we can't now sensibly calculate it.
++ */
++ warn("%s: asked for blocksize of %d, got %d!",
++ auDevice, auBlockSize, info.blocksize);
++ auBlockSize= info.blocksize;
++ }
++
++ aioEnable(auFd, 0, AIO_EXT);
++ aioHandle(auFd, auHandle, AIO_W);
++ return true;
++}
++
++
++static int sound_AvailableSpace(void)
++{
++ struct audio_info info;
++ int space;
++
++ if (auFd == -1)
++ return 0;
++
++ if (ioctl(auFd, AUDIO_GETINFO, &info) == -1)
++ {
++ perror("AUDIO_GETINFO");
++ return 0;
++ }
++
++ space= info.hiwat * info.blocksize - info.play.seek + auLatency;
++ return space;
++}
++
++
++static int sound_PlaySamplesFromAtLength(int frameCount, int arrayIndex, int startIndex)
++{
++ int size, totalWritten, written;
++ char *start;
++
++ if (auFd == -1 || frameCount == 0)
++ return 0;
++
++ start= (char *)arrayIndex + 4 * startIndex;
++ size= frameCount * (fmtStereo ? 4 : 2);
++ totalWritten= 0;
++
++ while (totalWritten < size)
++ if ((written= write(auFd, start, size)) == -1)
++ {
++ if (errno == EAGAIN)
++ /*
++ Astute listeners may now hear a "tick", but only the first
++ time the audio is started, as auLatency is preserved across
++ sound_Start() calls.
++ */
++ auLatency= auLatency >> 1;
++ else
++ perror(auDevice);
++ /*
++ In any case, bail. Typically, we've gotten an EAGAIN because
++ the auLatency was initially too high. This means the audio
++ hardware buffer is already full, so there's no sense sitting
++ here in a tight loop, while if write() failed for some other
++ reason, then we *really* want to return control to the VM.
++ */
++#ifdef AUDIO_DEBUG
++ printf("Bytes written: %d; Latency: %d\n", totalWritten, auLatency);
++#endif
++ frameCount= totalWritten/(fmtStereo ? 4 : 2);
++ return frameCount;
++ }
++ else
++ {
++ start += written;
++ size -= written;
++ totalWritten += written;
++ }
++
++#ifdef AUDIO_DEBUG
++ printf("Bytes written: %d; Latency: %d\n", totalWritten, auLatency);
++#endif
++ frameCount= totalWritten/(fmtStereo ? 4 : 2);
++ return frameCount;
++}
++
++
++static int sound_InsertSamplesFromLeadTime(int frameCount, int srcBufPtr,
++ int samplesOfLeadTime)
++{
++ /*
++ We could actually implement this with an mmap()-able audio device,
++ via double-buffering, but it doesn't seem to be worth the trouble.
++ */
++ success(false);
++ return 0;
++}
++
++
++static int sound_PlaySilence(void)
++{
++ int framesWritten;
++ char *buffer;
++
++ if (auFd == -1 || auBlockCount == 0)
++ return 0;
++
++ if ((buffer= calloc(auBlockCount, (fmtStereo ? 4 : 2))) == 0)
++ {
++ perror("calloc");
++ return 0;
++ }
++
++ framesWritten= sound_PlaySamplesFromAtLength(auBlockCount, (int)buffer, 0);
++ return framesWritten;
++}
++
++
++/*
++ Keep it clean, and try to use the simplified "audio" interface to set the
++ level, even though, due to a bug, it will do nothing on most systems older
++ than NetBSD 2.0. In that case, the user may still access the real mixer
++ controls via the command line tool "mixerctl", or various grapical mixers.
++ */
++static int sound_SetRecordLevel(int level)
++{
++ struct audio_info info;
++
++ AUDIO_INITINFO (&info);
++ info.record.gain= (level > AUDIO_MAX_GAIN) ? AUDIO_MAX_GAIN : level;
++
++ if (ioctl(auFd, AUDIO_SETINFO, &info) == -1)
++ perror("AUDIO_SETINFO");
++
++ return;
++}
++
++
++static int sound_StartRecording(int desiredSamplesPerSec, int stereo, int semaIndex)
++{
++ success(false);
++ return 0;
++}
++
++
++static int sound_StopRecording(void)
++{
++ success(false);
++ return 0;
++}
++
++
++static double sound_GetRecordingSampleRate(void)
++{
++ success(false);
++ return 0;
++}
++
++
++static int sound_RecordSamplesIntoAtLength(int buf, int startSliceIndex,
++ int bufferSizeInBytes)
++{
++ success(false);
++ return 0;
++}
++
++
++/*
++ See the comment associated with sound_SetRecordLevel().
++ */
++static void sound_Volume(double *left, double *right)
++{
++ struct audio_info info;
++
++ if (ioctl(auFd, AUDIO_GETINFO, &info) == -1)
++ {
++ perror("AUDIO_GETINFO");
++ success(false);
++ return;
++ }
++
++ *left= *right= (double)info.play.gain/AUDIO_MAX_GAIN;
++
++ return;
++}
++
++
++/*
++ This may not do anything at all. See the comment associated with
++ sound_SetRecordLevel().
++ */
++static void sound_SetVolume(double left, double right)
++{
++ struct audio_info info;
++
++ AUDIO_INITINFO (&info);
++ info.play.gain= AUDIO_MAX_GAIN * left;
++
++ if (ioctl(auFd, AUDIO_SETINFO, &info) == -1)
++ perror("AUDIO_SETINFO");
++
++ return;
++}
++
++
++#include "SqSound.h"
++
++SqSoundDefine(NetBSD);
++
++
++#include "SqModule.h"
++
++static void sound_parseEnvironment(void)
++{
++ char *ev= 0;
++ if ((ev= getenv("AUDIODEVICE"))) auDevice= strdup(ev);
++ else auDevice= strdup("/dev/audio");
++}
++
++static int sound_parseArgument(int argc, char **argv) { return 0; }
++static void sound_printUsage(void) {}
++static void sound_printUsageNotes(void) {}
++static void *sound_makeInterface(void) { return &sound_NetBSD_itf; }
++
++SqModuleDefine(sound, NetBSD);
diff --git a/lang/squeak/patches/patch-al b/lang/squeak/patches/patch-al
new file mode 100644
index 00000000000..652bad17570
--- /dev/null
+++ b/lang/squeak/patches/patch-al
@@ -0,0 +1,18 @@
+$NetBSD: patch-al,v 1.1 2004/04/26 07:10:16 fredb Exp $
+
+--- platforms/unix/vm-sound-Sun/acinclude.m4 2003-02-09 10:35:06.000000000 -0600
++++ platforms/unix/vm-sound-Sun/acinclude.m4 2003-09-15 15:15:42.000000000 -0500
+@@ -3,11 +3,12 @@
+ AC_MSG_CHECKING([for SunOS/Solaris audio])
+ AC_TRY_COMPILE([#include <sys/audioio.h>],[AUDIO_SUNVTS;],[
+ AC_MSG_RESULT(yes)
+- AC_DEFINE_UNQUOTED(HAVE_SYS_AUDIOIO_H,1)
++ AC_DEFINE_UNQUOTED(USE_SUN_AUDIO,1)
+ ],[
+ AC_TRY_COMPILE([#include <sun/audioio.h>],[AUDIO_SUNVTS;],[
+ AC_MSG_RESULT(yes)
+ AC_DEFINE_UNQUOTED(HAVE_SUN_AUDIOIO_H,1)
++ AC_DEFINE_UNQUOTED(USE_SUN_AUDIO,1)
+ ],[
+ AC_MSG_RESULT(no)
+ AC_PLUGIN_DISABLE
diff --git a/lang/squeak/patches/patch-ba b/lang/squeak/patches/patch-ba
deleted file mode 100644
index ffc20699d60..00000000000
--- a/lang/squeak/patches/patch-ba
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-ba,v 1.2 2001/08/24 14:46:29 mjl Exp $
-
---- ../src/unix/sqGnu.h.orig Fri Aug 24 02:24:08 2001
-+++ ../src/unix/sqGnu.h Fri Aug 24 02:24:24 2001
-@@ -174,7 +174,7 @@
- # define SP_REG asm("%edi")
- # define CB_REG /* asm("%ebx") ; avoid undue register pressure */
- #endif
--#if defined(PPC) || defined(_POWER) || defined(_IBMR2)
-+#if defined(PPC) || defined(_POWER) || defined(_IBMR2) || defined(__powerpc__)
- # define IP_REG asm("26")
- # define SP_REG asm("27")
- # define CB_REG asm("28")