diff --git a/audio/soundtracker/Makefile b/audio/soundtracker/Makefile new file mode 100644 index 00000000000..ad660dd0adf --- /dev/null +++ b/audio/soundtracker/Makefile @@ -0,0 +1,70 @@ +# $OpenBSD: Makefile,v 1.1.1.1 2002/02/05 18:04:10 espie Exp $ +# Uses pthreads + +COMMENT= "Music tracking tool for X11" + +VERSION= 0.6.4 +DISTNAME= soundtracker-${VERSION} +CATEGORIES= audio +NEED_VERSION= 1.504 +HOMEPAGE= http://www.soundtracker.org/ + +MAINTAINER= Wilbern Cobb + +# GPL +PERMIT_PACKAGE_CDROM= Yes +PERMIT_PACKAGE_FTP= Yes +PERMIT_DISTFILES_CDROM= Yes +PERMIT_DISTFILES_FTP= Yes + +MASTER_SITE_SUBDIR= v0.6 +MASTER_SITES= http://www.soundtracker.org/dl/%SUBDIR%/ \ + ftp://vedge.com.ar/pub/mirror/soundtracker/%SUBDIR%/ + +LIB_DEPENDS= gtk.1.2::x11/gtk+ \ + intl.1::devel/gettext \ + iconv.2::converters/libiconv \ + audiofile::devel/libaudiofile + +FLAVORS= gnome sun esd +FLAVOR?= sun + +USE_GMAKE= Yes +USE_X11= Yes +CONFIGURE_STYLE= gnu autoconf +CONFIGURE_ARGS+= --with-audiofile-prefix=${LOCALBASE} \ + --disable-alsa \ + --disable-sgi \ + --disable-oss + +.if ${FLAVOR:L:Mgnome} +LIB_DEPENDS+= gnome.36,gnomesupport.0,gnomeui.46,art_lgpl.4::x11/gnome/libs +.else +CONFIGURE_ARGS+= --disable-gnome +.endif + +.if empty(FLAVOR:L:Msun) +CONFIGURE_ARGS+= --disable-sun +.endif + +.if empty(FLAVOR:L:Mesd) +CONFIGURE_ARGS+= --disable-esd +.endif + +.if ${MACHINE_ARCH} != "i386" +CONFIGURE_ARGS+= --disable-assembler +.endif + +DOCS= FAQ NEWS README TODO \ + doc/hacking.txt doc/xi.txt doc/xm.txt + +post-extract: + @ln -s ${FILESDIR}/sun-input.c ${WRKSRC}/app/drivers + @ln -s ${FILESDIR}/sun-output.c ${WRKSRC}/app/drivers + +post-install: + ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/soundtracker + cd ${WRKSRC} && \ + ${INSTALL_DATA} ${DOCS} ${PREFIX}/share/doc/soundtracker + +.include diff --git a/audio/soundtracker/distinfo b/audio/soundtracker/distinfo new file mode 100644 index 00000000000..d508a136c97 --- /dev/null +++ b/audio/soundtracker/distinfo @@ -0,0 +1,3 @@ +MD5 (soundtracker-0.6.4.tar.gz) = 9208aca40dae30d17a15b0c5deb22a67 +RMD160 (soundtracker-0.6.4.tar.gz) = 36e93a404bfb95de6a783e0f7c07eb028ab261ad +SHA1 (soundtracker-0.6.4.tar.gz) = 86e432756abca304fec1128fd7f62bc713d9f08e diff --git a/audio/soundtracker/files/sun-input.c b/audio/soundtracker/files/sun-input.c new file mode 100644 index 00000000000..54ddc40c41f --- /dev/null +++ b/audio/soundtracker/files/sun-input.c @@ -0,0 +1,388 @@ +/* + * The Real SoundTracker - Sun (input) driver. + * + * Copyright (C) 2001 CubeSoft Communications, Inc. + * + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program 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. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#include + +#if DRIVER_SUN + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include +#include + +#include "i18n.h" +#include "driver-in.h" +#include "mixer.h" +#include "errors.h" +#include "gui-subs.h" + +typedef struct sun_driver { + GtkWidget *configwidget; + GtkWidget *prefs_devaudio_w; + + int playrate; + int stereo; + int bits; + int bufsize; + int numbufs; + int mf; + + pthread_mutex_t configmutex; + + int soundfd; + void *sndbuf; + int polltag; + + audio_info_t info; + gchar p_devaudio[128]; + int p_resolution; + int p_channels; + int p_mixfreq; + int p_bufsize; +} sun_driver; + +static void +sun_poll_ready_sampling (gpointer data, + gint source, + GdkInputCondition condition) +{ + sun_driver * const d = data; + + printf("sampling...\n"); + + read(d->soundfd, d->sndbuf, d->bufsize); + + sample_editor_sampled(d->sndbuf, d->bufsize, d->playrate, d->mf); +} + +static void +prefs_init_from_structure (sun_driver *d) +{ + gtk_entry_set_text(GTK_ENTRY(d->prefs_devaudio_w), d->p_devaudio); +} + +static void +sun_devaudio_changed (void *a, + sun_driver *d) +{ + strncpy(d->p_devaudio, gtk_entry_get_text(GTK_ENTRY(d->prefs_devaudio_w)), + 127); +} + +static void +sun_make_config_widgets (sun_driver *d) +{ + GtkWidget *thing, *mainbox, *box2; + + d->configwidget = mainbox = gtk_vbox_new(FALSE, 2); + + thing = gtk_label_new( + _("These changes won't take effect until you restart sampling.")); + gtk_widget_show(thing); + gtk_box_pack_start(GTK_BOX(mainbox), thing, FALSE, TRUE, 0); + + thing = gtk_hseparator_new(); + gtk_widget_show(thing); + gtk_box_pack_start(GTK_BOX(mainbox), thing, FALSE, TRUE, 0); + + box2 = gtk_hbox_new(FALSE, 4); + gtk_widget_show(box2); + gtk_box_pack_start(GTK_BOX(mainbox), box2, FALSE, TRUE, 0); + + thing = gtk_label_new(_("Input device (e.g. '/dev/audio'):")); + gtk_widget_show(thing); + gtk_box_pack_start(GTK_BOX(box2), thing, FALSE, TRUE, 0); + add_empty_hbox(box2); + thing = gtk_entry_new_with_max_length(126); + gtk_widget_show(thing); + gtk_box_pack_start(GTK_BOX(box2), thing, FALSE, TRUE, 0); + gtk_entry_set_text(GTK_ENTRY(thing), d->p_devaudio); + gtk_signal_connect_after(GTK_OBJECT(thing), "changed", + GTK_SIGNAL_FUNC(sun_devaudio_changed), d); + d->prefs_devaudio_w = thing; + + prefs_init_from_structure(d); +} + +static GtkWidget * +sun_getwidget (void *dp) +{ + sun_driver * const d = dp; + + return d->configwidget; +} + +static void * +sun_new (void) +{ + sun_driver *d = g_new(sun_driver, 1); + + strcpy(d->p_devaudio, "/dev/audio"); + d->p_mixfreq = 44100; + d->p_channels = 1; + d->p_resolution = 16; + d->p_bufsize = 9; + d->soundfd = -1; + d->sndbuf = NULL; + d->polltag = 0; + if (pthread_mutex_init(&d->configmutex, NULL) != 0) { + return NULL; + } + + sun_make_config_widgets(d); + + return d; +} + +static void +sun_destroy (void *dp) +{ + sun_driver * const d = dp; + + gtk_widget_destroy(d->configwidget); + pthread_mutex_destroy(&d->configmutex); + + g_free(dp); +} + +static gboolean +sun_try_format (sun_driver *d, int fmt, int precision) +{ + audio_encoding_t enc; + + for(enc.index = 0; ioctl(d->soundfd, AUDIO_GETENC, &enc) == 0; + enc.index++) { + if (enc.encoding == fmt && enc.precision == precision) { + d->info.record.encoding = enc.encoding; + d->info.record.precision = enc.precision; + if (ioctl(d->soundfd, AUDIO_SETINFO, &d->info) == 0) { + return TRUE; + } else { + return FALSE; + } + } + } + + return FALSE; +} + +static gboolean +sun_try_channels (sun_driver *d, int nch) +{ + d->info.record.channels = nch; + if(ioctl(d->soundfd, AUDIO_SETINFO, &d->info) != 0) { + return FALSE; + } + + return TRUE; +} + +static void +sun_release (void *dp) +{ + sun_driver * const d = dp; + + free(d->sndbuf); + d->sndbuf = NULL; + + if(d->polltag != 0) { + gdk_input_remove(d->polltag); + d->polltag = 0; + } + + if(d->soundfd >= 0) { + close(d->soundfd); + d->soundfd = -1; + } +} + +static gboolean +sun_open (void *dp) +{ + char buf[256]; + sun_driver * const d = dp; + int mf, i, fullduplex; + + AUDIO_INITINFO(&d->info); + + d->soundfd = open(d->p_devaudio, O_RDONLY|O_NONBLOCK); + if(d->soundfd < 0) { + sprintf(buf, _("%s: %s"), d->p_devaudio, strerror(errno)); + goto out; + } + + fullduplex = 1; + if (ioctl(d->soundfd, AUDIO_SETFD, &fullduplex) != 0) { + fprintf(stderr, "%s: does not support full-duplex operation\n", + d->p_devaudio); + fullduplex = 0; + } + + d->info.mode = AUMODE_RECORD; + if(ioctl(d->soundfd, AUDIO_SETINFO, &d->info) != 0) { + sprintf(buf, _("%s: Cannot record (%s)"), d->p_devaudio, + strerror(errno)); + goto out; + } + + d->playrate = d->p_mixfreq; + d->info.record.sample_rate = d->playrate; + if(ioctl(d->soundfd, AUDIO_SETINFO, &d->info) != 0) { + sprintf(buf, _("%s: Cannot handle %dHz (%s)"), d->p_devaudio, + d->playrate, strerror(errno)); + goto out; + } + + d->bits = 0; + mf = 0; + if(d->p_resolution == 16) { + if(sun_try_format(d, AUDIO_ENCODING_SLINEAR_LE, 16)) { + d->bits = 16; + mf = ST_MIXER_FORMAT_S16_LE; + } else if(sun_try_format(d, AUDIO_ENCODING_SLINEAR_BE, 16)) { + d->bits = 16; + mf = ST_MIXER_FORMAT_S16_BE; + } else if(sun_try_format(d, AUDIO_ENCODING_ULINEAR_LE, 16)) { + d->bits = 16; + mf = ST_MIXER_FORMAT_U16_LE; + } else if(sun_try_format(d, AUDIO_ENCODING_ULINEAR_BE, 16)) { + d->bits = 16; + mf = ST_MIXER_FORMAT_U16_BE; + } + } + if(d->bits != 16) { + if(sun_try_format(d, AUDIO_ENCODING_SLINEAR, 8)) { + d->bits = 8; + mf = ST_MIXER_FORMAT_S8; + } else if(sun_try_format(d, AUDIO_ENCODING_PCM8, 8)) { + d->bits = 8; + mf = ST_MIXER_FORMAT_U8; + } else { + sprintf(buf, _("%s: Required sound encoding not supported.\n"), + d->p_devaudio); + goto out; + } + } + + if(d->p_channels == 2 && sun_try_channels(d, 2)) { + d->stereo = 1; + mf |= ST_MIXER_FORMAT_STEREO; + } else if(sun_try_channels(d, 1)) { + d->stereo = 0; + } + + d->mf = mf; + + i = 0x00040000 + d->p_bufsize + d->stereo + (d->bits / 8 - 1); + d->info.blocksize = 1 << (i & 0xffff); + d->info.record.buffer_size = d->info.blocksize; + d->info.hiwat = ((unsigned)i >> 16) & 0x7fff; + printf("input blocksize %d hiwat %d\n", d->info.blocksize, d->info.hiwat); + d->info.hiwat = 1; + if (d->info.hiwat == 0) { + d->info.hiwat = 65536; + } + if (ioctl(d->soundfd, AUDIO_SETINFO, &d->info) != 0) { + sprintf(buf, _("%s: Cannot set block size (%s)"), d->p_devaudio, + strerror(errno)); + goto out; + } + + if (ioctl(d->soundfd, AUDIO_GETINFO, &d->info) != 0) { + sprintf(buf, _("%s: %s"), d->p_devaudio, strerror(errno)); + goto out; + } + d->bufsize = d->info.blocksize; + d->numbufs = d->info.hiwat; + d->sndbuf = calloc(1, d->bufsize); + + if(d->stereo == 1) { + d->bufsize /= 2; + } + if(d->bits == 16) { + d->bufsize /= 2; + } + + printf("reading...\n"); + read(d->soundfd, d->sndbuf, d->bufsize); + printf("done\n"); + + d->polltag = gdk_input_add(d->soundfd, GDK_INPUT_READ, + sun_poll_ready_sampling, d); + + return TRUE; + + out: + error_error(buf); + sun_release(dp); + return FALSE; +} + +static gboolean +sun_loadsettings (void *dp, + prefs_node *f) +{ + sun_driver * const d = dp; + + prefs_get_string(f, "sun-devaudio", d->p_devaudio); + + prefs_init_from_structure(d); + + return TRUE; +} + +static gboolean +sun_savesettings (void *dp, + prefs_node *f) +{ + sun_driver * const d = dp; + + prefs_put_string(f, "sun-devaudio", d->p_devaudio); + + return TRUE; +} + +st_in_driver driver_in_sun = { + { "Sun Sampling", + + sun_new, + sun_destroy, + + sun_open, + sun_release, + + sun_getwidget, + sun_loadsettings, + sun_savesettings, + } +}; + +#endif /* DRIVER_SUN */ diff --git a/audio/soundtracker/files/sun-output.c b/audio/soundtracker/files/sun-output.c new file mode 100644 index 00000000000..4902346aba8 --- /dev/null +++ b/audio/soundtracker/files/sun-output.c @@ -0,0 +1,577 @@ + +/* + * The Real SoundTracker - Sun (output) driver. + * + * Copyright (C) 2001 CubeSoft Communications, Inc. + * + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program 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. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#include + +#if DRIVER_SUN + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include +#include + +#include "i18n.h" +#include "driver-out.h" +#include "mixer.h" +#include "errors.h" +#include "gui-subs.h" +#include "preferences.h" + +typedef struct sun_driver { + GtkWidget *configwidget; + GtkWidget *prefs_devaudio_w; + GtkWidget *prefs_resolution_w[2]; + GtkWidget *prefs_channels_w[2]; + GtkWidget *prefs_mixfreq_w[4]; + GtkWidget *bufsizespin_w, *bufsizelabel_w, *estimatelabel_w; + + int playrate; + int stereo; + int bits; + int fragsize; + int numfrags; + int mf; + gboolean realtimecaps; + + pthread_mutex_t configmutex; + + int soundfd; + void *sndbuf; + gpointer polltag; + int firstpoll; + + gchar p_devaudio[128]; + int p_resolution; + int p_channels; + int p_mixfreq; + int p_fragsize; + + double outtime; + double playtime; + + audio_info_t info; +} sun_driver; + +static const int mixfreqs[] = { 8000, 16000, 22050, 44100, -1 }; + +static void +sun_poll_ready_playing (gpointer data, + gint source, + GdkInputCondition condition) +{ + sun_driver * const d = data; + static int w; + static int size; + static struct timeval tv; + + if(!d->firstpoll) { + size = (d->stereo + 1) * (d->bits / 8) * d->fragsize; + write(d->soundfd, d->sndbuf, size); + + if(!d->realtimecaps) { + gettimeofday(&tv, NULL); + d->outtime = tv.tv_sec + tv.tv_usec / 1e6; + d->playtime += (double) d->fragsize / d->playrate; + } + } + + d->firstpoll = FALSE; + + audio_mix(d->sndbuf, d->fragsize, d->playrate, d->mf); +} + +static void +prefs_init_from_structure (sun_driver *d) +{ + int i; + + gtk_toggle_button_set_state( + GTK_TOGGLE_BUTTON(d->prefs_resolution_w[d->p_resolution / 8 - 1]), + TRUE); + gtk_toggle_button_set_state( + GTK_TOGGLE_BUTTON(d->prefs_channels_w[d->p_channels - 1]), + TRUE); + + for(i = 0; mixfreqs[i] != -1; i++) { + if(d->p_mixfreq == mixfreqs[i]) + break; + } + if(mixfreqs[i] == -1) { + i = 3; + } + gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(d->prefs_mixfreq_w[i]), TRUE); + gtk_spin_button_set_value(GTK_SPIN_BUTTON(d->bufsizespin_w), d->p_fragsize); + + gtk_entry_set_text(GTK_ENTRY(d->prefs_devaudio_w), d->p_devaudio); +} + +static void +prefs_update_estimate (sun_driver *d) +{ + char buf[64]; + + sprintf(buf, _("Estimated audio delay: %f milliseconds"), + (double)(1000 * (1 << d->p_fragsize)) / d->p_mixfreq); + gtk_label_set_text(GTK_LABEL(d->estimatelabel_w), buf); +} + +static void +prefs_resolution_changed (void *a, + sun_driver *d) +{ + d->p_resolution = (find_current_toggle(d->prefs_resolution_w, 2) + 1) * 8; +} + +static void +prefs_channels_changed (void *a, + sun_driver *d) +{ + d->p_channels = find_current_toggle(d->prefs_channels_w, 2) + 1; +} + +static void +prefs_mixfreq_changed (void *a, + sun_driver *d) +{ + d->p_mixfreq = mixfreqs[find_current_toggle(d->prefs_mixfreq_w, 4)]; + prefs_update_estimate(d); +} + +static void +prefs_fragsize_changed (GtkSpinButton *w, + sun_driver *d) +{ + char buf[30]; + + d->p_fragsize = gtk_spin_button_get_value_as_int(w); + + sprintf(buf, _("(%d samples)"), 1 << d->p_fragsize); + gtk_label_set_text(GTK_LABEL(d->bufsizelabel_w), buf); + prefs_update_estimate(d); +} + +static void +sun_devaudio_changed (void *a, + sun_driver *d) +{ + strncpy(d->p_devaudio, gtk_entry_get_text(GTK_ENTRY(d->prefs_devaudio_w)), + 127); +} + +static void +sun_make_config_widgets (sun_driver *d) +{ + GtkWidget *thing, *mainbox, *box2, *box3; + static const char *resolutionlabels[] = { "8 bits", "16 bits", NULL }; + static const char *channelslabels[] = { "Mono", "Stereo", NULL }; + static const char *mixfreqlabels[] = { "8000", "16000", "22050", "44100", + NULL }; + + d->configwidget = mainbox = gtk_vbox_new(FALSE, 2); + + thing = gtk_label_new( + _("These changes won't take effect until you restart playing.")); + gtk_widget_show(thing); + gtk_box_pack_start(GTK_BOX(mainbox), thing, FALSE, TRUE, 0); + + thing = gtk_hseparator_new(); + gtk_widget_show(thing); + gtk_box_pack_start(GTK_BOX(mainbox), thing, FALSE, TRUE, 0); + + box2 = gtk_hbox_new(FALSE, 4); + gtk_widget_show(box2); + gtk_box_pack_start(GTK_BOX(mainbox), box2, FALSE, TRUE, 0); + + thing = gtk_label_new(_("Output device (e.g. '/dev/audio'):")); + gtk_widget_show(thing); + gtk_box_pack_start(GTK_BOX(box2), thing, FALSE, TRUE, 0); + add_empty_hbox(box2); + thing = gtk_entry_new_with_max_length(126); + gtk_widget_show(thing); + gtk_box_pack_start(GTK_BOX(box2), thing, FALSE, TRUE, 0); + gtk_entry_set_text(GTK_ENTRY(thing), d->p_devaudio); + gtk_signal_connect_after(GTK_OBJECT(thing), "changed", + GTK_SIGNAL_FUNC(sun_devaudio_changed), d); + d->prefs_devaudio_w = thing; + + box2 = gtk_hbox_new(FALSE, 4); + gtk_widget_show(box2); + gtk_box_pack_start(GTK_BOX(mainbox), box2, FALSE, TRUE, 0); + + thing = gtk_label_new(_("Resolution:")); + gtk_widget_show(thing); + gtk_box_pack_start(GTK_BOX(box2), thing, FALSE, TRUE, 0); + add_empty_hbox(box2); + make_radio_group_full(resolutionlabels, box2, d->prefs_resolution_w, + FALSE, TRUE, (void(*)())prefs_resolution_changed, d); + + box2 = gtk_hbox_new(FALSE, 4); + gtk_widget_show(box2); + gtk_box_pack_start(GTK_BOX(mainbox), box2, FALSE, TRUE, 0); + + thing = gtk_label_new(_("Channels:")); + gtk_widget_show(thing); + gtk_box_pack_start(GTK_BOX(box2), thing, FALSE, TRUE, 0); + add_empty_hbox(box2); + make_radio_group_full(channelslabels, box2, d->prefs_channels_w, + FALSE, TRUE, (void(*)())prefs_channels_changed, d); + + box2 = gtk_hbox_new(FALSE, 4); + gtk_widget_show(box2); + gtk_box_pack_start(GTK_BOX(mainbox), box2, FALSE, TRUE, 0); + + thing = gtk_label_new(_("Frequency [Hz]:")); + gtk_widget_show(thing); + gtk_box_pack_start(GTK_BOX(box2), thing, FALSE, TRUE, 0); + add_empty_hbox(box2); + make_radio_group_full(mixfreqlabels, box2, d->prefs_mixfreq_w, + FALSE, TRUE, (void(*)())prefs_mixfreq_changed, d); + + box2 = gtk_hbox_new(FALSE, 4); + gtk_widget_show(box2); + gtk_box_pack_start(GTK_BOX(mainbox), box2, FALSE, TRUE, 0); + + thing = gtk_label_new(_("Buffer Size:")); + gtk_widget_show(thing); + gtk_box_pack_start(GTK_BOX(box2), thing, FALSE, TRUE, 0); + add_empty_hbox(box2); + + box3 = gtk_vbox_new(FALSE, 2); + gtk_box_pack_start(GTK_BOX(box2), box3, FALSE, TRUE, 0); + gtk_widget_show(box3); + + d->bufsizespin_w = thing = gtk_spin_button_new(GTK_ADJUSTMENT( + gtk_adjustment_new(5.0, 5.0, 15.0, 1.0, 1.0, 0.0)), 0, 0); + gtk_box_pack_start(GTK_BOX(box3), thing, FALSE, TRUE, 0); + gtk_widget_show(thing); + gtk_signal_connect (GTK_OBJECT(thing), "changed", + GTK_SIGNAL_FUNC(prefs_fragsize_changed), d); + + d->bufsizelabel_w = thing = gtk_label_new(""); + gtk_box_pack_start(GTK_BOX(box3), thing, FALSE, TRUE, 0); + gtk_widget_show(thing); + + box2 = gtk_hbox_new(FALSE, 4); + gtk_widget_show(box2); + gtk_box_pack_start(GTK_BOX(mainbox), box2, FALSE, TRUE, 0); + + add_empty_hbox(box2); + d->estimatelabel_w = thing = gtk_label_new(""); + gtk_box_pack_start(GTK_BOX(box2), thing, FALSE, TRUE, 0); + gtk_widget_show(thing); + add_empty_hbox(box2); + + prefs_init_from_structure(d); +} + +static GtkWidget * +sun_getwidget (void *dp) +{ + sun_driver * const d = dp; + + return d->configwidget; +} + +static void * +sun_new (void) +{ + sun_driver *d = g_new(sun_driver, 1); + + strcpy(d->p_devaudio, "/dev/audio"); + d->p_mixfreq = 44100; + d->p_channels = 2; + d->p_resolution = 16; + d->p_fragsize = 11; // 2048; + d->soundfd = -1; + d->sndbuf = NULL; + d->polltag = NULL; + if (pthread_mutex_init(&d->configmutex, NULL) != 0) { + return (NULL); + } + + sun_make_config_widgets(d); + + return d; +} + +static void +sun_destroy (void *dp) +{ + sun_driver * const d = dp; + + gtk_widget_destroy(d->configwidget); + pthread_mutex_destroy(&d->configmutex); + + g_free(dp); +} + +static gboolean +sun_try_format (sun_driver *d, int fmt, int precision) +{ + audio_encoding_t enc; + + for(enc.index = 0; ioctl(d->soundfd, AUDIO_GETENC, &enc) == 0; + enc.index++) { + if (enc.encoding == fmt && enc.precision == precision) { + d->info.play.encoding = enc.encoding; + d->info.play.precision = enc.precision; + if (ioctl(d->soundfd, AUDIO_SETINFO, &d->info) == 0) { + return TRUE; + } else { + return FALSE; + } + } + } + + return FALSE; +} + +static gboolean +sun_try_channels (sun_driver *d, int nch) +{ + d->info.play.channels = nch; + if(ioctl(d->soundfd, AUDIO_SETINFO, &d->info) != 0) { + return FALSE; + } + + return TRUE; +} + +static void +sun_release (void *dp) +{ + sun_driver * const d = dp; + + free(d->sndbuf); + d->sndbuf = NULL; + + audio_poll_remove(d->polltag); + d->polltag = NULL; + + if(d->soundfd >= 0) { + ioctl(d->soundfd, AUDIO_FLUSH, NULL); + close(d->soundfd); + d->soundfd = -1; + } +} + +static gboolean +sun_open (void *dp) +{ + char buf[256]; + sun_driver * const d = dp; + int mf = 0, i; + + AUDIO_INITINFO(&d->info); + + d->soundfd = open(d->p_devaudio, O_WRONLY); + if(d->soundfd < 0) { + sprintf(buf, _("%s: %s"), d->p_devaudio, strerror(errno)); + goto out; + } + + d->info.mode = AUMODE_PLAY; + if(ioctl(d->soundfd, AUDIO_SETINFO, &d->info) != 0) { + sprintf(buf, _("%s: Cannot play (%s)"), d->p_devaudio, strerror(errno)); + goto out; + } + + d->playrate = d->p_mixfreq; + d->info.play.sample_rate = d->playrate; + if(ioctl(d->soundfd, AUDIO_SETINFO, &d->info) != 0) { + sprintf(buf, _("%s: Cannot handle %dHz (%s)"), d->p_devaudio, + d->playrate, strerror(errno)); + goto out; + } + + d->bits = 0; + if(d->p_resolution == 16) { + if(sun_try_format(d, AUDIO_ENCODING_SLINEAR_LE, 16)) { + d->bits = 16; + mf = ST_MIXER_FORMAT_S16_LE; + } else if(sun_try_format(d, AUDIO_ENCODING_SLINEAR_BE, 16)) { + d->bits = 16; + mf = ST_MIXER_FORMAT_S16_BE; + } else if(sun_try_format(d, AUDIO_ENCODING_ULINEAR_LE, 16)) { + d->bits = 16; + mf = ST_MIXER_FORMAT_U16_LE; + } else if(sun_try_format(d, AUDIO_ENCODING_ULINEAR_BE, 16)) { + d->bits = 16; + mf = ST_MIXER_FORMAT_U16_BE; + } + } + if(d->bits != 16) { + if(sun_try_format(d, AUDIO_ENCODING_SLINEAR, 8)) { + d->bits = 8; + mf = ST_MIXER_FORMAT_S8; + } else if(sun_try_format(d, AUDIO_ENCODING_PCM8, 8)) { + d->bits = 8; + mf = ST_MIXER_FORMAT_U8; + } else { + sprintf(buf, _("%s: Required sound encoding not supported.\n"), + d->p_devaudio); + goto out; + } + } + + if(d->p_channels == 2 && sun_try_channels(d, 2)) { + d->stereo = 1; + mf |= ST_MIXER_FORMAT_STEREO; + } else if(sun_try_channels(d, 1)) { + d->stereo = 0; + } + + + d->mf = mf; + + i = 0x00020000 + d->p_fragsize + d->stereo + (d->bits / 8 - 1); + d->info.blocksize = 1 << (i & 0xffff); + d->info.hiwat = ((unsigned)i >> 16) & 0x7fff; + if (d->info.hiwat == 0) { + d->info.hiwat = 65536; + } + if (ioctl(d->soundfd, AUDIO_SETINFO, &d->info) != 0) { + sprintf(buf, _("%s: Cannot set block size (%s)"), d->p_devaudio, + strerror(errno)); + goto out; + } + + if (ioctl(d->soundfd, AUDIO_GETINFO, &d->info) != 0) { + sprintf(buf, _("%s: %s"), d->p_devaudio, strerror(errno)); + goto out; + } + d->fragsize = d->info.blocksize; + d->numfrags = d->info.hiwat; + +#if 0 + if (ioctl(d->soundfd, AUDIO_GETPROPS, &i) == 0) { + /* XXX use only if we are recording. */ + d->realtimecaps = i & AUDIO_PROP_FULLDUPLEX; + } +#endif + + d->sndbuf = calloc(1, d->fragsize); + + if(d->stereo == 1) { + d->fragsize /= 2; + } + if(d->bits == 16) { + d->fragsize /= 2; + } + + d->polltag = audio_poll_add(d->soundfd, GDK_INPUT_WRITE, + sun_poll_ready_playing, d); + d->firstpoll = TRUE; + d->playtime = 0; + + return TRUE; + + out: + error_error(buf); + sun_release(dp); + return FALSE; +} + +static double +sun_get_play_time (void *dp) +{ + sun_driver * const d = dp; + + if(d->realtimecaps) { + static audio_offset_t ooffs; + + ioctl(d->soundfd, AUDIO_GETOOFFS, &ooffs); + + return (double)ooffs.samples / + (d->stereo + 1) / (d->bits / 8) / d->playrate; + } else { + struct timeval tv; + double curtime; + + gettimeofday(&tv, NULL); + curtime = tv.tv_sec + tv.tv_usec / 1e6; + + return d->playtime + curtime - d->outtime - + d->numfrags * ((double) d->fragsize / d->playrate); + } +} + +static gboolean +sun_loadsettings (void *dp, + prefs_node *f) +{ + sun_driver * const d = dp; + + prefs_get_string(f, "sun-devaudio", d->p_devaudio); + prefs_get_int(f, "sun-resolution", &d->p_resolution); + prefs_get_int(f, "sun-channels", &d->p_channels); + prefs_get_int(f, "sun-mixfreq", &d->p_mixfreq); + prefs_get_int(f, "sun-fragsize", &d->p_fragsize); + + prefs_init_from_structure(d); + + return TRUE; +} + +static gboolean +sun_savesettings (void *dp, + prefs_node *f) +{ + sun_driver * const d = dp; + + prefs_put_string(f, "sun-devaudio", d->p_devaudio); + prefs_put_int(f, "sun-resolution", d->p_resolution); + prefs_put_int(f, "sun-channels", d->p_channels); + prefs_put_int(f, "sun-mixfreq", d->p_mixfreq); + prefs_put_int(f, "sun-fragsize", d->p_fragsize); + + return TRUE; +} + +st_out_driver driver_out_sun = { + { "Sun Output", + + sun_new, + sun_destroy, + + sun_open, + sun_release, + + sun_getwidget, + sun_loadsettings, + sun_savesettings, + }, + + sun_get_play_time, +}; + +#endif /* DRIVER_SUN */ diff --git a/audio/soundtracker/patches/patch-FAQ b/audio/soundtracker/patches/patch-FAQ new file mode 100644 index 00000000000..fb12f468415 --- /dev/null +++ b/audio/soundtracker/patches/patch-FAQ @@ -0,0 +1,53 @@ +--- FAQ.orig Wed Jul 25 11:22:56 2001 ++++ FAQ Mon Feb 4 23:35:44 2002 +@@ -2,39 +2,11 @@ + FAQ + ==== + +-QQQQ: SoundTracker crashes as soon as I start it or as I press a +-button in its window, giving weird X errors. +- +-a: You don't have thread-safe X libraries (you have a libc5 +-system). Read the INSTALL file. +- +------------------------------------------------------------------------- +- +-QQQQ: SoundTracker complains about not being able to open /dev/dsp. +- +-a: Either you have not configured a sound driver for your system (you +-could check that by running an MP3 player or something) - or you are +-running GNOME and your soundcard is kept busy by the E Sound Daemon, +-which you can get rid of by using "killall esd" in a shell. +- +-There's also an "ESD" driver in the Audio settings, but it's not +-possible to do any serious tracking work because of the delay +-introduced by it. +- +------------------------------------------------------------------------- +- +-QQQQ: SoundTracker crashes as soon as I use the menu bar. +- +-a: You have a too old gtk+. Read the INSTALL file. +- + ------------------------------------------------------------------------ + + QQQQ: The sound output gets quite choppy under machine load. + +-a1: Don't run the compiled executable directly, but do a full 'make +-install', this installs the executable setuid root and the audio +-thread gets a much higher priority. Read the notes in the INSTALL file +-about this subject. ++a1: Assign the soundtracker process a higher user priority (renice). + + a2: Increase size of mixer buffer in the Preferences section. + +@@ -47,9 +19,6 @@ scopes. + + a5: Reduce scopes and patterns update frequency in the Preferences + section. +- +-a6: Install at least glibc2.1.1pre3, this fixed a strange sound bug +-for me. + + ------------------------------------------------------------------------ + diff --git a/audio/soundtracker/patches/patch-acconfig_h b/audio/soundtracker/patches/patch-acconfig_h new file mode 100644 index 00000000000..12083a8fa6e --- /dev/null +++ b/audio/soundtracker/patches/patch-acconfig_h @@ -0,0 +1,11 @@ +$OpenBSD: patch-acconfig_h,v 1.1.1.1 2002/02/05 18:04:10 espie Exp $ +--- acconfig.h.orig Mon Feb 4 12:37:14 2002 ++++ acconfig.h Mon Feb 4 12:37:19 2002 +@@ -6,6 +6,7 @@ + #undef DRIVER_ALSA_050 + #undef DRIVER_ESD + #undef DRIVER_SGI ++#undef DRIVER_SUN + #undef USE_GNOME + #undef NO_AUDIOFILE + #undef NO_GASP diff --git a/audio/soundtracker/patches/patch-app_Makefile_am b/audio/soundtracker/patches/patch-app_Makefile_am new file mode 100644 index 00000000000..caa8a74948a --- /dev/null +++ b/audio/soundtracker/patches/patch-app_Makefile_am @@ -0,0 +1,21 @@ +$OpenBSD: patch-app_Makefile_am,v 1.1.1.1 2002/02/05 18:04:10 espie Exp $ +--- app/Makefile.am.orig Mon Sep 25 07:06:00 2000 ++++ app/Makefile.am Mon Feb 4 21:59:26 2002 +@@ -46,17 +46,6 @@ soundtracker_SOURCES = \ + + soundtracker_LDADD = drivers/libdrivers.a mixers/libmixers.a + +-install-exec-local: +- chown root.root $(bindir)/soundtracker +- chmod +s $(bindir)/soundtracker +- @echo "" +- @echo "***" +- @echo "*** Installing SoundTracker suid root." +- @echo "*** This improves sound responsivity, but may be a security risk" +- @echo "*** if this is a multi-user machine. See file INSTALL." +- @echo "***" +- @echo "" +- + stdir = $(datadir)/soundtracker + + #INCLUDES = -DDATADIR=\"$(stdir)\" \ diff --git a/audio/soundtracker/patches/patch-app_Makefile_in b/audio/soundtracker/patches/patch-app_Makefile_in new file mode 100644 index 00000000000..71d143537c6 --- /dev/null +++ b/audio/soundtracker/patches/patch-app_Makefile_in @@ -0,0 +1,228 @@ +$OpenBSD: patch-app_Makefile_in,v 1.1.1.1 2002/02/05 18:04:10 espie Exp $ +--- app/Makefile.in.orig Sun Aug 12 07:07:24 2001 ++++ app/Makefile.in Mon Feb 4 22:01:15 2002 +@@ -1,6 +1,6 @@ +-# Makefile.in generated automatically by automake 1.4 from Makefile.am ++# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am + +-# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. ++# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation + # gives unlimited permission to copy and/or distribute it, + # with or without modifications, as long as this notice is preserved. +@@ -57,9 +57,12 @@ POST_INSTALL = : + NORMAL_UNINSTALL = : + PRE_UNINSTALL = : + POST_UNINSTALL = : ++host_alias = @host_alias@ ++host_triplet = @host@ + AUDIOFILE_CFLAGS = @AUDIOFILE_CFLAGS@ + AUDIOFILE_CONFIG = @AUDIOFILE_CONFIG@ + AUDIOFILE_LIBS = @AUDIOFILE_LIBS@ ++BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@ + CATALOGS = @CATALOGS@ + CATOBJEXT = @CATOBJEXT@ + CC = @CC@ +@@ -69,18 +72,18 @@ ESD_CONFIG = @ESD_CONFIG@ + ESD_LIBS = @ESD_LIBS@ + GASPPATH = @GASPPATH@ + GENCAT = @GENCAT@ ++GLIBC21 = @GLIBC21@ + GMOFILES = @GMOFILES@ + GMSGFMT = @GMSGFMT@ + GTK_CFLAGS = @GTK_CFLAGS@ + GTK_CONFIG = @GTK_CONFIG@ + GTK_LIBS = @GTK_LIBS@ +-GT_NO = @GT_NO@ +-GT_YES = @GT_YES@ +-INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@ + INSTOBJEXT = @INSTOBJEXT@ +-INTLDEPS = @INTLDEPS@ ++INTLBISON = @INTLBISON@ + INTLLIBS = @INTLLIBS@ + INTLOBJS = @INTLOBJS@ ++INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@ ++LIBICONV = @LIBICONV@ + MAKEINFO = @MAKEINFO@ + MKINSTALLDIRS = @MKINSTALLDIRS@ + MSGFMT = @MSGFMT@ +@@ -92,7 +95,6 @@ USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIB + USE_NLS = @USE_NLS@ + VERSION = @VERSION@ + gnomepath = @gnomepath@ +-l = @l@ + sedpath = @sedpath@ + + SUBDIRS = drivers mixers +@@ -238,7 +240,8 @@ maintainer-clean-recursive: + dot_seen=no; \ + rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \ + rev="$$subdir $$rev"; \ +- test "$$subdir" = "." && dot_seen=yes; \ ++ test "$$subdir" != "." || dot_seen=yes; \ ++ true; \ + done; \ + test "$$dot_seen" = "no" && rev=". $$rev"; \ + target=`echo $@ | sed s/-recursive//`; \ +@@ -299,7 +302,7 @@ distdir: $(DISTFILES) + @for file in $(DISTFILES); do \ + d=$(srcdir); \ + if test -d $$d/$$file; then \ +- cp -pr $$/$$file $(distdir)/$$file; \ ++ cp -pr $$d/$$file $(distdir)/$$file; \ + else \ + test -f $(distdir)/$$file \ + || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ +@@ -316,112 +319,6 @@ distdir: $(DISTFILES) + || exit 1; \ + fi; \ + done +-audio.o: audio.c ../config.h poll.h i18n.h audio.h mixer.h driver-out.h \ +- driver.h preferences.h time-buffer.h event-waiter.h main.h xm.h \ +- xm-player.h endian-conv.h scope-group.h sample-display.h \ +- errors.h gui-settings.h +-audioconfig.o: audioconfig.c ../config.h i18n.h audioconfig.h gui-subs.h \ +- audio.h mixer.h driver-out.h driver.h preferences.h \ +- time-buffer.h event-waiter.h sample-editor.h xm.h driver-in.h \ +- gui.h +-cheat-sheet.o: cheat-sheet.c ../config.h i18n.h +-clavier.o: clavier.c clavier.h +-endian-conv.o: endian-conv.c ../config.h endian-conv.h +-envelope-box.o: envelope-box.c ../config.h i18n.h gui-subs.h \ +- envelope-box.h xm.h mixer.h gui-settings.h +-errors.o: errors.c audio.h mixer.h driver-out.h driver.h preferences.h \ +- time-buffer.h event-waiter.h +-event-waiter.o: event-waiter.c event-waiter.h +-extspinbutton.o: extspinbutton.c extspinbutton.h gui.h gui-subs.h \ +- audio.h mixer.h driver-out.h driver.h preferences.h \ +- time-buffer.h event-waiter.h +-file-operations.o: file-operations.c ../config.h i18n.h \ +- file-operations.h keys.h track-editor.h tracker.h xm.h mixer.h \ +- tracker-settings.h gui-subs.h gui.h audio.h driver-out.h \ +- driver.h preferences.h time-buffer.h event-waiter.h errors.h +-gui-settings.o: gui-settings.c ../config.h i18n.h gui.h gui-subs.h \ +- audio.h mixer.h driver-out.h driver.h preferences.h \ +- time-buffer.h event-waiter.h gui-settings.h scope-group.h \ +- sample-display.h track-editor.h tracker.h xm.h \ +- tracker-settings.h extspinbutton.h +-gui-subs.o: gui-subs.c ../config.h i18n.h gui.h gui-subs.h audio.h \ +- mixer.h driver-out.h driver.h preferences.h time-buffer.h \ +- event-waiter.h extspinbutton.h +-gui.o: gui.c ../config.h poll.h i18n.h gui.h gui-subs.h audio.h mixer.h \ +- driver-out.h driver.h preferences.h time-buffer.h \ +- event-waiter.h xm.h st-subs.h xm-player.h tracker.h main.h \ +- keys.h instrument-editor.h sample-editor.h driver-in.h \ +- track-editor.h tracker-settings.h scope-group.h \ +- sample-display.h module-info.h menubar.h tips-dialog.h \ +- gui-settings.h file-operations.h playlist.h extspinbutton.h +-instrument-editor.o: instrument-editor.c i18n.h ../config.h \ +- instrument-editor.h xm.h mixer.h envelope-box.h st-subs.h gui.h \ +- gui-subs.h audio.h driver-out.h driver.h preferences.h \ +- time-buffer.h event-waiter.h keys.h track-editor.h tracker.h \ +- tracker-settings.h clavier.h errors.h sample-editor.h \ +- driver-in.h gui-settings.h module-info.h file-operations.h +-keys.o: keys.c ../config.h i18n.h keys.h gui-subs.h gui.h audio.h \ +- mixer.h driver-out.h driver.h preferences.h time-buffer.h \ +- event-waiter.h menubar.h +-main.o: main.c ../config.h i18n.h gui.h gui-subs.h audio.h mixer.h \ +- driver-out.h driver.h preferences.h time-buffer.h \ +- event-waiter.h xm.h keys.h gui-settings.h audioconfig.h \ +- tips-dialog.h menubar.h track-editor.h tracker.h \ +- tracker-settings.h midi.h midi-settings.h +-menubar.o: menubar.c ../config.h i18n.h menubar.h gui.h gui-subs.h \ +- audio.h mixer.h driver-out.h driver.h preferences.h \ +- time-buffer.h event-waiter.h main.h xm.h st-subs.h keys.h \ +- module-info.h scope-group.h sample-display.h track-editor.h \ +- tracker.h tracker-settings.h audioconfig.h gui-settings.h \ +- tips-dialog.h transposition.h cheat-sheet.h file-operations.h \ +- instrument-editor.h midi-settings.h +-midi-settings.o: midi-settings.c ../config.h +-midi-utils.o: midi-utils.c ../config.h +-midi.o: midi.c ../config.h +-module-info.o: module-info.c i18n.h ../config.h module-info.h gui.h \ +- gui-subs.h audio.h mixer.h driver-out.h driver.h preferences.h \ +- time-buffer.h event-waiter.h xm.h st-subs.h main.h \ +- sample-editor.h driver-in.h instrument-editor.h keys.h \ +- track-editor.h tracker.h tracker-settings.h +-playlist.o: playlist.c ../config.h i18n.h playlist.h gui-subs.h +-poll.o: poll.c ../config.h +-preferences.o: preferences.c ../config.h i18n.h gui-subs.h preferences.h \ +- menubar.h scope-group.h sample-display.h track-editor.h \ +- tracker.h xm.h mixer.h tracker-settings.h errors.h +-recode.o: recode.c recode.h +-sample-display.o: sample-display.c sample-display.h +-sample-editor.o: sample-editor.c ../config.h i18n.h sample-editor.h xm.h \ +- mixer.h driver-in.h driver.h preferences.h st-subs.h gui.h \ +- gui-subs.h audio.h driver-out.h time-buffer.h event-waiter.h \ +- instrument-editor.h sample-display.h endian-conv.h keys.h \ +- track-editor.h tracker.h tracker-settings.h errors.h \ +- module-info.h file-operations.h gui-settings.h +-scope-group.o: scope-group.c ../config.h scope-group.h sample-display.h \ +- audio.h mixer.h driver-out.h driver.h preferences.h \ +- time-buffer.h event-waiter.h gui-subs.h gui-settings.h +-st-subs.o: st-subs.c st-subs.h xm.h mixer.h gui-settings.h +-time-buffer.o: time-buffer.c time-buffer.h +-tips-dialog.o: tips-dialog.c ../config.h i18n.h tips-dialog.h \ +- preferences.h +-track-editor.o: track-editor.c i18n.h ../config.h track-editor.h \ +- tracker.h xm.h mixer.h tracker-settings.h gui.h gui-subs.h \ +- audio.h driver-out.h driver.h preferences.h time-buffer.h \ +- event-waiter.h st-subs.h keys.h xm-player.h main.h \ +- gui-settings.h menubar.h +-tracker-settings.o: tracker-settings.c ../config.h tracker-settings.h \ +- tracker.h xm.h mixer.h i18n.h gui-subs.h preferences.h +-tracker.o: tracker.c tracker.h xm.h mixer.h main.h gui-settings.h +-transposition.o: transposition.c i18n.h ../config.h transposition.h \ +- main.h xm.h mixer.h gui-subs.h gui.h audio.h driver-out.h \ +- driver.h preferences.h time-buffer.h event-waiter.h st-subs.h \ +- track-editor.h tracker.h tracker-settings.h +-xm-player.o: xm-player.c ../config.h i18n.h xm-player.h xm.h mixer.h \ +- main.h audio.h driver-out.h driver.h preferences.h \ +- time-buffer.h event-waiter.h +-xm.o: xm.c i18n.h ../config.h gui-settings.h xm.h mixer.h xm-player.h \ +- endian-conv.h st-subs.h recode.h errors.h audio.h driver-out.h \ +- driver.h preferences.h time-buffer.h event-waiter.h +- + info-am: + info: info-recursive + dvi-am: +@@ -430,7 +327,7 @@ check-am: all-am + check: check-recursive + installcheck-am: + installcheck: installcheck-recursive +-install-exec-am: install-binPROGRAMS install-exec-local ++install-exec-am: install-binPROGRAMS + install-exec: install-exec-recursive + + install-data-am: +@@ -492,24 +389,12 @@ all-recursive check-recursive installche + dvi-recursive mostlyclean-recursive distclean-recursive clean-recursive \ + maintainer-clean-recursive tags tags-recursive mostlyclean-tags \ + distclean-tags clean-tags maintainer-clean-tags distdir info-am info \ +-dvi-am dvi check check-am installcheck-am installcheck \ +-install-exec-local install-exec-am install-exec install-data-am \ +-install-data install-am install uninstall-am uninstall all-redirect \ +-all-am all installdirs-am installdirs mostlyclean-generic \ +-distclean-generic clean-generic maintainer-clean-generic clean \ +-mostlyclean distclean maintainer-clean +- +- +-install-exec-local: +- chown root.root $(bindir)/soundtracker +- chmod +s $(bindir)/soundtracker +- @echo "" +- @echo "***" +- @echo "*** Installing SoundTracker suid root." +- @echo "*** This improves sound responsivity, but may be a security risk" +- @echo "*** if this is a multi-user machine. See file INSTALL." +- @echo "***" +- @echo "" ++dvi-am dvi check check-am installcheck-am installcheck install-exec-am \ ++install-exec install-data-am install-data install-am install \ ++uninstall-am uninstall all-redirect all-am all installdirs-am \ ++installdirs mostlyclean-generic distclean-generic clean-generic \ ++maintainer-clean-generic clean mostlyclean distclean maintainer-clean ++ + + # Tell versions [3.59,3.63) of GNU make to not export all variables. + # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/audio/soundtracker/patches/patch-app_drivers_Makefile_am b/audio/soundtracker/patches/patch-app_drivers_Makefile_am new file mode 100644 index 00000000000..a1a7075f725 --- /dev/null +++ b/audio/soundtracker/patches/patch-app_drivers_Makefile_am @@ -0,0 +1,13 @@ +$OpenBSD: patch-app_drivers_Makefile_am,v 1.1.1.1 2002/02/05 18:04:10 espie Exp $ +--- app/drivers/Makefile.am.orig Mon Feb 4 12:39:19 2002 ++++ app/drivers/Makefile.am Mon Feb 4 12:39:27 2002 +@@ -12,6 +12,8 @@ libdrivers_a_SOURCES = \ + file-output.c \ + irix-output.c \ + oss-output.c \ +- oss-input.c ++ oss-input.c \ ++ sun-output.c \ ++ sun-input.c + + INCLUDES = -I.. diff --git a/audio/soundtracker/patches/patch-app_drivers_Makefile_in b/audio/soundtracker/patches/patch-app_drivers_Makefile_in new file mode 100644 index 00000000000..2411343cce2 --- /dev/null +++ b/audio/soundtracker/patches/patch-app_drivers_Makefile_in @@ -0,0 +1,106 @@ +$OpenBSD: patch-app_drivers_Makefile_in,v 1.1.1.1 2002/02/05 18:04:11 espie Exp $ +--- app/drivers/Makefile.in.orig Sun Aug 12 07:07:27 2001 ++++ app/drivers/Makefile.in Mon Feb 4 22:01:15 2002 +@@ -1,6 +1,6 @@ +-# Makefile.in generated automatically by automake 1.4 from Makefile.am ++# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am + +-# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. ++# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation + # gives unlimited permission to copy and/or distribute it, + # with or without modifications, as long as this notice is preserved. +@@ -57,9 +57,12 @@ POST_INSTALL = : + NORMAL_UNINSTALL = : + PRE_UNINSTALL = : + POST_UNINSTALL = : ++host_alias = @host_alias@ ++host_triplet = @host@ + AUDIOFILE_CFLAGS = @AUDIOFILE_CFLAGS@ + AUDIOFILE_CONFIG = @AUDIOFILE_CONFIG@ + AUDIOFILE_LIBS = @AUDIOFILE_LIBS@ ++BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@ + CATALOGS = @CATALOGS@ + CATOBJEXT = @CATOBJEXT@ + CC = @CC@ +@@ -69,18 +72,18 @@ ESD_CONFIG = @ESD_CONFIG@ + ESD_LIBS = @ESD_LIBS@ + GASPPATH = @GASPPATH@ + GENCAT = @GENCAT@ ++GLIBC21 = @GLIBC21@ + GMOFILES = @GMOFILES@ + GMSGFMT = @GMSGFMT@ + GTK_CFLAGS = @GTK_CFLAGS@ + GTK_CONFIG = @GTK_CONFIG@ + GTK_LIBS = @GTK_LIBS@ +-GT_NO = @GT_NO@ +-GT_YES = @GT_YES@ +-INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@ + INSTOBJEXT = @INSTOBJEXT@ +-INTLDEPS = @INTLDEPS@ ++INTLBISON = @INTLBISON@ + INTLLIBS = @INTLLIBS@ + INTLOBJS = @INTLOBJS@ ++INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@ ++LIBICONV = @LIBICONV@ + MAKEINFO = @MAKEINFO@ + MKINSTALLDIRS = @MKINSTALLDIRS@ + MSGFMT = @MSGFMT@ +@@ -92,12 +95,11 @@ USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIB + USE_NLS = @USE_NLS@ + VERSION = @VERSION@ + gnomepath = @gnomepath@ +-l = @l@ + sedpath = @sedpath@ + + noinst_LIBRARIES = libdrivers.a + +-libdrivers_a_SOURCES = alsa-output.c alsa-input.c alsa2-output.c alsa2-input.c dsound-output.c dummy-drivers.c esd-output.c file-output.c irix-output.c oss-output.c oss-input.c ++libdrivers_a_SOURCES = alsa-output.c alsa-input.c alsa2-output.c alsa2-input.c dsound-output.c dummy-drivers.c esd-output.c file-output.c irix-output.c oss-output.c oss-input.c sun-output.c sun-input.c + + + INCLUDES = -I.. +@@ -114,7 +116,8 @@ LIBS = @LIBS@ + libdrivers_a_LIBADD = + libdrivers_a_OBJECTS = alsa-output.o alsa-input.o alsa2-output.o \ + alsa2-input.o dsound-output.o dummy-drivers.o esd-output.o \ +-file-output.o irix-output.o oss-output.o oss-input.o ++file-output.o irix-output.o oss-output.o oss-input.o sun-output.o \ ++sun-input.o + AR = ar + CFLAGS = @CFLAGS@ + COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +@@ -211,32 +214,13 @@ distdir: $(DISTFILES) + @for file in $(DISTFILES); do \ + d=$(srcdir); \ + if test -d $$d/$$file; then \ +- cp -pr $$/$$file $(distdir)/$$file; \ ++ cp -pr $$d/$$file $(distdir)/$$file; \ + else \ + test -f $(distdir)/$$file \ + || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ + || cp -p $$d/$$file $(distdir)/$$file || :; \ + fi; \ + done +-alsa-input.o: alsa-input.c ../../config.h +-alsa-output.o: alsa-output.c ../../config.h +-alsa2-input.o: alsa2-input.c ../../config.h +-alsa2-output.o: alsa2-output.c ../../config.h +-dsound-output.o: dsound-output.c ../../config.h +-dummy-drivers.o: dummy-drivers.c ../../config.h ../i18n.h ../driver-in.h \ +- ../driver.h ../preferences.h ../driver-out.h +-esd-output.o: esd-output.c ../../config.h +-file-output.o: file-output.c ../../config.h ../i18n.h ../driver-out.h \ +- ../driver.h ../preferences.h ../mixer.h ../errors.h \ +- ../gui-subs.h +-irix-output.o: irix-output.c ../../config.h +-oss-input.o: oss-input.c ../../config.h ../i18n.h ../driver-in.h \ +- ../driver.h ../preferences.h ../mixer.h ../errors.h \ +- ../gui-subs.h +-oss-output.o: oss-output.c ../../config.h ../i18n.h ../driver-out.h \ +- ../driver.h ../preferences.h ../mixer.h ../errors.h \ +- ../gui-subs.h +- + info-am: + info: info-am + dvi-am: diff --git a/audio/soundtracker/patches/patch-app_drivers_oss_input_c b/audio/soundtracker/patches/patch-app_drivers_oss_input_c new file mode 100644 index 00000000000..17ba69b94e1 --- /dev/null +++ b/audio/soundtracker/patches/patch-app_drivers_oss_input_c @@ -0,0 +1,47 @@ +$OpenBSD: patch-app_drivers_oss_input_c,v 1.1.1.1 2002/02/05 18:04:10 espie Exp $ +--- app/drivers/oss-input.c.orig Sat Aug 4 07:14:49 2001 ++++ app/drivers/oss-input.c Mon Feb 4 04:10:05 2002 +@@ -32,7 +32,13 @@ + #include + #include + #include +-#include ++#ifdef HAVE_SYS_SOUNDCARD_H ++# include ++#elif HAVE_MACHINE_SOUNDCARD_H ++# include ++#elif HAVE_SOUNDCARD_H ++# include ++#endif + #include + + #include +@@ -54,7 +60,7 @@ typedef struct oss_driver { + int fragsize; + int mf; + +- GMutex *configmutex; ++ pthread_mutex_t configmutex; + + int soundfd; + void *sndbuf; +@@ -150,7 +156,9 @@ oss_new (void) + d->soundfd = -1; + d->sndbuf = NULL; + d->polltag = 0; +- d->configmutex = g_mutex_new(); ++ if (pthread_mutex_init(&d->configmutex, NULL) != 0) { ++ return NULL; ++ } + + oss_make_config_widgets(d); + +@@ -163,7 +171,7 @@ oss_destroy (void *dp) + oss_driver * const d = dp; + + gtk_widget_destroy(d->configwidget); +- g_mutex_free(d->configmutex); ++ pthread_mutex_destroy(&d->configmutex); + + g_free(dp); + } diff --git a/audio/soundtracker/patches/patch-app_drivers_oss_output_c b/audio/soundtracker/patches/patch-app_drivers_oss_output_c new file mode 100644 index 00000000000..b61d3fcb023 --- /dev/null +++ b/audio/soundtracker/patches/patch-app_drivers_oss_output_c @@ -0,0 +1,47 @@ +$OpenBSD: patch-app_drivers_oss_output_c,v 1.1.1.1 2002/02/05 18:04:10 espie Exp $ +--- app/drivers/oss-output.c.orig Sat Aug 4 07:06:18 2001 ++++ app/drivers/oss-output.c Mon Feb 4 04:17:56 2002 +@@ -32,7 +32,13 @@ + #include + #include + #include +-#include ++#ifdef HAVE_SYS_SOUNDCARD_H ++# include ++#elif HAVE_MACHINE_SOUNDCARD_H ++# include ++#elif HAVE_SOUNDCARD_H ++# include ++#endif + #include + + #include +@@ -61,7 +67,7 @@ typedef struct oss_driver { + int mf; + gboolean realtimecaps; + +- GMutex *configmutex; ++ pthread_mutex_t configmutex; + + int soundfd; + void *sndbuf; +@@ -307,7 +313,9 @@ oss_new (void) + d->soundfd = -1; + d->sndbuf = NULL; + d->polltag = NULL; +- d->configmutex = g_mutex_new(); ++ if (pthread_mutex_init(&d->configmutex, NULL) != 0) { ++ return (NULL); ++ } + + oss_make_config_widgets(d); + +@@ -320,7 +328,7 @@ oss_destroy (void *dp) + oss_driver * const d = dp; + + gtk_widget_destroy(d->configwidget); +- g_mutex_free(d->configmutex); ++ pthread_mutex_destroy(&d->configmutex); + + g_free(dp); + } diff --git a/audio/soundtracker/patches/patch-app_event-waiter_c b/audio/soundtracker/patches/patch-app_event-waiter_c new file mode 100644 index 00000000000..088b553979b --- /dev/null +++ b/audio/soundtracker/patches/patch-app_event-waiter_c @@ -0,0 +1,89 @@ +$OpenBSD: patch-app_event-waiter_c,v 1.1.1.1 2002/02/05 18:04:10 espie Exp $ +--- app/event-waiter.c.orig Mon Feb 4 04:24:29 2002 ++++ app/event-waiter.c Mon Feb 4 04:37:54 2002 +@@ -22,9 +22,10 @@ + #include "event-waiter.h" + + #include ++#include + + struct event_waiter { +- GMutex *mutex; ++ pthread_mutex_t mutex; + int counter; + double time; + }; +@@ -35,7 +36,9 @@ event_waiter_new (void) + event_waiter *e = g_new(event_waiter, 1); + + if(e) { +- e->mutex = g_mutex_new(); ++ if (pthread_mutex_init(&e->mutex, NULL) != 0) { ++ return NULL; ++ } + event_waiter_reset(e); + } + +@@ -46,7 +49,7 @@ void + event_waiter_destroy (event_waiter *e) + { + if(e) { +- g_mutex_free(e->mutex); ++ pthread_mutex_destroy(&e->mutex); + g_free(e); + } + } +@@ -56,10 +59,10 @@ event_waiter_reset (event_waiter *e) + { + g_assert(e); + +- g_mutex_lock(e->mutex); ++ pthread_mutex_lock(&e->mutex); + e->counter = 0; + e->time = 0.0; +- g_mutex_unlock(e->mutex); ++ pthread_mutex_unlock(&e->mutex); + } + + void +@@ -67,9 +70,9 @@ event_waiter_start (event_waiter *e) + { + g_assert(e); + +- g_mutex_lock(e->mutex); ++ pthread_mutex_lock(&e->mutex); + e->counter++; +- g_mutex_unlock(e->mutex); ++ pthread_mutex_unlock(&e->mutex); + } + + void +@@ -78,14 +81,14 @@ event_waiter_confirm (event_waiter *e, + { + g_assert(e); + +- g_mutex_lock(e->mutex); ++ pthread_mutex_lock(&e->mutex); + if(e->counter > 0) { + e->counter--; + } + if(readytime >= e->time) { + e->time = readytime; + } +- g_mutex_unlock(e->mutex); ++ pthread_mutex_unlock(&e->mutex); + } + + gboolean +@@ -96,9 +99,9 @@ event_waiter_ready (event_waiter *e, + + g_assert(e); + +- g_mutex_lock(e->mutex); ++ pthread_mutex_lock(&e->mutex); + result = (e->counter == 0 && currenttime >= e->time); +- g_mutex_unlock(e->mutex); ++ pthread_mutex_unlock(&e->mutex); + + return result; + } diff --git a/audio/soundtracker/patches/patch-app_main_c b/audio/soundtracker/patches/patch-app_main_c new file mode 100644 index 00000000000..e787e23efb8 --- /dev/null +++ b/audio/soundtracker/patches/patch-app_main_c @@ -0,0 +1,37 @@ +$OpenBSD: patch-app_main_c,v 1.1.1.1 2002/02/05 18:04:10 espie Exp $ +--- app/main.c.orig Sun Aug 12 06:52:17 2001 ++++ app/main.c Mon Feb 4 22:04:53 2002 +@@ -79,6 +79,9 @@ main (int argc, + #ifdef DRIVER_SGI + driver_out_irix, + #endif ++#ifdef DRIVER_SUN ++ driver_out_sun, driver_in_sun, ++#endif + #ifndef NO_AUDIOFILE + // driver_out_file, + #endif +@@ -91,7 +94,9 @@ main (int argc, + mixer_kbfloat, + mixer_integer32; + ++#ifndef __OpenBSD__ + g_thread_init(NULL); ++#endif + + if(pipe(pipea) || pipe(pipeb)) { + fprintf(stderr, "Cränk. Can't pipe().\n"); +@@ -168,6 +173,13 @@ main (int argc, + #ifdef DRIVER_SGI + drivers[DRIVER_OUTPUT] = g_list_append(drivers[DRIVER_OUTPUT], + &driver_out_irix); ++#endif ++ ++#ifdef DRIVER_SUN ++ drivers[DRIVER_OUTPUT] = g_list_append(drivers[DRIVER_OUTPUT], ++ &driver_out_sun); ++ drivers[DRIVER_INPUT] = g_list_append(drivers[DRIVER_INPUT], ++ &driver_in_sun); + #endif + + #ifdef _WIN32 diff --git a/audio/soundtracker/patches/patch-app_mixer_h b/audio/soundtracker/patches/patch-app_mixer_h new file mode 100644 index 00000000000..6c389418ff9 --- /dev/null +++ b/audio/soundtracker/patches/patch-app_mixer_h @@ -0,0 +1,20 @@ +$OpenBSD: patch-app_mixer_h,v 1.1.1.1 2002/02/05 18:04:10 espie Exp $ +--- app/mixer.h.orig Mon Feb 4 04:21:58 2002 ++++ app/mixer.h Mon Feb 4 04:37:12 2002 +@@ -23,6 +23,7 @@ + #define _ST_MIXER_H + + #include ++#include + + typedef struct st_mixer_sample_info { + guint32 looptype; /* see ST_MIXER_SAMPLE_LOOPTYPE_ defines below */ +@@ -30,7 +31,7 @@ typedef struct st_mixer_sample_info { + guint32 loopstart; /* offset in samples, not in bytes */ + guint32 loopend; /* offset to first sample not being played */ + gint16 *data; /* pointer to sample data */ +- GMutex *lock; ++ pthread_mutex_t *lock; + } st_mixer_sample_info; + + /* values for st_mixer_sample_info.looptype */ diff --git a/audio/soundtracker/patches/patch-app_mixers_integer32_asm_S b/audio/soundtracker/patches/patch-app_mixers_integer32_asm_S new file mode 100644 index 00000000000..47c8f5ddf89 --- /dev/null +++ b/audio/soundtracker/patches/patch-app_mixers_integer32_asm_S @@ -0,0 +1,59 @@ +$OpenBSD: patch-app_mixers_integer32_asm_S,v 1.1.1.1 2002/02/05 18:04:10 espie Exp $ +--- app/mixers/integer32-asm.S.orig Sun Sep 24 14:26:09 2000 ++++ app/mixers/integer32-asm.S Thu Jan 31 08:55:03 2002 +@@ -28,14 +28,23 @@ + -------------------------------------------------------------------------- + */ + ++#ifndef _C_LABEL ++# ifdef __ELF__ ++# define _C_LABEL(x) x ++# else ++# define _C_LABEL(x) _ ## x ++# endif ++#endif ++#undef GLOBAL ++#define GLOBAL(x) .globl _C_LABEL(x); _C_LABEL(x): ++ + #if defined(__i386__) + + #define ACCURACY 12 + + .text + +-.globl mixerasm_stereo_16_scopes +-mixerasm_stereo_16_scopes: ++GLOBAL(mixerasm_stereo_16_scopes) + pushl %ebp + movl %esp,%ebp + +@@ -89,8 +98,7 @@ mixerasm_stereo_16_scopes: + leave + ret + +-.globl mixerasm_mono_16_scopes +-mixerasm_mono_16_scopes: ++GLOBAL(mixerasm_mono_16_scopes) + pushl %ebp + movl %esp,%ebp + +@@ -136,8 +144,7 @@ mixerasm_mono_16_scopes: + leave + ret + +-.globl mixerasm_stereo_16 +-mixerasm_stereo_16: ++GLOBAL(mixerasm_stereo_16) + pushl %ebp + movl %esp,%ebp + +@@ -183,8 +190,7 @@ mixerasm_stereo_16: + leave + ret + +-.globl mixerasm_mono_16 +-mixerasm_mono_16: ++GLOBAL(mixerasm_mono_16) + pushl %ebp + movl %esp,%ebp + diff --git a/audio/soundtracker/patches/patch-app_mixers_integer32_c b/audio/soundtracker/patches/patch-app_mixers_integer32_c new file mode 100644 index 00000000000..3140da42d7c --- /dev/null +++ b/audio/soundtracker/patches/patch-app_mixers_integer32_c @@ -0,0 +1,21 @@ +$OpenBSD: patch-app_mixers_integer32_c,v 1.1.1.1 2002/02/05 18:04:10 espie Exp $ +--- app/mixers/integer32.c.orig Mon Feb 4 04:35:50 2002 ++++ app/mixers/integer32.c Mon Feb 4 04:36:16 2002 +@@ -277,7 +277,7 @@ integer32_mix (void *dest, + } + + g_assert(c->sample->lock); +- g_mutex_lock(c->sample->lock); ++ pthread_mutex_lock(c->sample->lock); + + while(t) { + /* Check how much of the sample we can fill in one run */ +@@ -414,7 +414,7 @@ integer32_mix (void *dest, + c->current = j; + } + +- g_mutex_unlock(c->sample->lock); ++ pthread_mutex_unlock(c->sample->lock); + } + + /* modules with many channels get additional amplification here */ diff --git a/audio/soundtracker/patches/patch-app_mixers_kb-x86_c b/audio/soundtracker/patches/patch-app_mixers_kb-x86_c new file mode 100644 index 00000000000..b82df68408d --- /dev/null +++ b/audio/soundtracker/patches/patch-app_mixers_kb-x86_c @@ -0,0 +1,21 @@ +$OpenBSD: patch-app_mixers_kb-x86_c,v 1.1.1.1 2002/02/05 18:04:10 espie Exp $ +--- app/mixers/kb-x86.c.orig Mon Feb 4 04:35:55 2002 ++++ app/mixers/kb-x86.c Mon Feb 4 04:36:34 2002 +@@ -739,7 +739,7 @@ kb_x86_mix (void *dest, + } + + g_assert(ch->sample->lock); +- g_mutex_lock(ch->sample->lock); ++ pthread_mutex_lock(ch->sample->lock); + + while(num_samples_left && (ch->flags & KB_FLAG_SAMPLE_RUNNING)) { + int num_samples = 0; +@@ -770,7 +770,7 @@ kb_x86_mix (void *dest, + } + } + +- g_mutex_unlock(ch->sample->lock); ++ pthread_mutex_unlock(ch->sample->lock); + } + + clipflag = kbasm_post_mixing(kb_x86_tempbuf, (gint16*)dest, count, kb_x86_amplification); diff --git a/audio/soundtracker/patches/patch-app_mixers_kb_x86_asm_S b/audio/soundtracker/patches/patch-app_mixers_kb_x86_asm_S new file mode 100644 index 00000000000..fe2dcc63eb0 --- /dev/null +++ b/audio/soundtracker/patches/patch-app_mixers_kb_x86_asm_S @@ -0,0 +1,50 @@ +$OpenBSD: patch-app_mixers_kb_x86_asm_S,v 1.1.1.1 2002/02/05 18:04:10 espie Exp $ +--- app/mixers/kb-x86-asm.S.orig Sun Sep 24 09:50:51 2000 ++++ app/mixers/kb-x86-asm.S Thu Jan 31 08:55:03 2002 +@@ -24,6 +24,16 @@ + * + */ + ++#ifndef _C_LABEL ++# ifdef __ELF__ ++# define _C_LABEL(x) x ++# else ++# define _C_LABEL(x) _ ## x ++# endif ++#endif ++#undef GLOBAL ++#define GLOBAL(x) .globl _C_LABEL(x); _C_LABEL(x): ++ + #if defined(__i386__) + + .section .data +@@ -53,8 +63,7 @@ minuseins: .float -1.0 + + .text + +-.globl kbasm_post_mixing +-kbasm_post_mixing: ++GLOBAL(kbasm_post_mixing) + pushl %ebp + movl %esp, %ebp + +@@ -129,8 +138,7 @@ clipstereo: // convert/clip samples, 16b + fstp %st // - + ret + +-.globl kbasm_mix +-kbasm_mix: ++GLOBAL(kbasm_mix) + pushl %ebp + movl %esp, %ebp + +@@ -360,8 +368,7 @@ kbasm_mix_cubic_scopes_filtered_backward + CUBICMIXER 1 1 1 1 + + .section .data +-.globl kbasm_mixers +-kbasm_mixers: ++GLOBAL(kbasm_mixers) + .long kbasm_mix_cubic_noscopes_unfiltered_forward_noramp + .long kbasm_mix_cubic_noscopes_unfiltered_backward_noramp + .long kbasm_mix_cubic_noscopes_filtered_forward_noramp diff --git a/audio/soundtracker/patches/patch-app_sample_editor_c b/audio/soundtracker/patches/patch-app_sample_editor_c new file mode 100644 index 00000000000..c218faadf14 --- /dev/null +++ b/audio/soundtracker/patches/patch-app_sample_editor_c @@ -0,0 +1,30 @@ +$OpenBSD: patch-app_sample_editor_c,v 1.1.1.1 2002/02/05 18:04:10 espie Exp $ +--- app/sample-editor.c.orig Wed Jul 25 11:46:45 2001 ++++ app/sample-editor.c Mon Feb 4 04:38:32 2002 +@@ -183,7 +183,7 @@ static void sample_editor_reverse_clicke + static void + sample_editor_lock_sample (void) + { +- g_mutex_lock(current_sample->sample.lock); ++ pthread_mutex_lock(current_sample->sample.lock); + } + + static void +@@ -192,7 +192,7 @@ sample_editor_unlock_sample (void) + if(gui_playing_mode) { + mixer->updatesample(¤t_sample->sample); + } +- g_mutex_unlock(current_sample->sample.lock); ++ pthread_mutex_unlock(current_sample->sample.lock); + } + + void +@@ -462,7 +462,7 @@ sample_editor_page_create (GtkNotebook * + #if !defined(NO_AUDIOFILE) && HAVE_DLFCN_H + { // hack, hack + void *handle, *function; +- handle = dlopen(NULL, RTLD_NOW); ++ handle = dlopen(NULL, DL_LAZY); + function = dlsym(handle, "afSetVirtualPCMMapping"); + if(function == NULL) { + libaf2 = FALSE; diff --git a/audio/soundtracker/patches/patch-app_st-subs_c b/audio/soundtracker/patches/patch-app_st-subs_c new file mode 100644 index 00000000000..68143cce44c --- /dev/null +++ b/audio/soundtracker/patches/patch-app_st-subs_c @@ -0,0 +1,25 @@ +$OpenBSD: patch-app_st-subs_c,v 1.1.1.1 2002/02/05 18:04:10 espie Exp $ +--- app/st-subs.c.orig Mon Feb 4 04:18:39 2002 ++++ app/st-subs.c Mon Feb 4 04:38:47 2002 +@@ -359,7 +359,7 @@ void + st_clean_sample (STSample *s, + const char *name) + { +- GMutex *lock = s->sample.lock; ++ pthread_mutex_t *lock = s->sample.lock; + free(s->sample.data); + memset(s, 0, sizeof(STSample)); + if(name) +@@ -367,8 +367,10 @@ st_clean_sample (STSample *s, + s->sample.loopend = 1; + if(lock) + s->sample.lock = lock; +- else +- s->sample.lock = g_mutex_new(); ++ else { ++ s->sample.lock = malloc(sizeof(pthread_mutex_t)); ++ pthread_mutex_init(s->sample.lock, NULL); ++ } + } + + void diff --git a/audio/soundtracker/patches/patch-app_time-buffer_c b/audio/soundtracker/patches/patch-app_time-buffer_c new file mode 100644 index 00000000000..afec3ebb939 --- /dev/null +++ b/audio/soundtracker/patches/patch-app_time-buffer_c @@ -0,0 +1,75 @@ +$OpenBSD: patch-app_time-buffer_c,v 1.1.1.1 2002/02/05 18:04:10 espie Exp $ +--- app/time-buffer.c.orig Mon Feb 4 04:06:19 2002 ++++ app/time-buffer.c Mon Feb 4 04:39:34 2002 +@@ -21,13 +21,14 @@ + + #include "time-buffer.h" + ++#include + #include + + /* This implementation of the time buffer interface might be rather + suboptimal... */ + + struct time_buffer { +- GMutex *mutex; ++ pthread_mutex_t mutex; + GList *list; + }; + +@@ -42,7 +43,9 @@ time_buffer_new (double maxtimedelta) + time_buffer *t = g_new(time_buffer, 1); + + if(t) { +- t->mutex = g_mutex_new(); ++ if (pthread_mutex_init(&t->mutex, NULL) != 0) { ++ return NULL; ++ } + t->list = NULL; + } + +@@ -54,7 +57,7 @@ time_buffer_destroy (time_buffer *t) + { + if(t) { + g_list_free(t->list); +- g_mutex_free(t->mutex); ++ pthread_mutex_destroy(&t->mutex); + g_free(t); + } + } +@@ -75,10 +78,10 @@ time_buffer_add (time_buffer *t, + { + time_buffer_item *a = item; + +- g_mutex_lock(t->mutex); ++ pthread_mutex_lock(&t->mutex); + a->time = time; + t->list = g_list_append(t->list, a); +- g_mutex_unlock(t->mutex); ++ pthread_mutex_unlock(&t->mutex); + + return TRUE; + } +@@ -91,11 +94,11 @@ time_buffer_get (time_buffer *t, + void *result = NULL; + GList *list; + +- g_mutex_lock(t->mutex); ++ pthread_mutex_lock(&t->mutex); + l = g_list_length(t->list); + + if(l == 0) { +- g_mutex_unlock(t->mutex); ++ pthread_mutex_unlock(&t->mutex); + return NULL; + } + +@@ -114,7 +117,7 @@ time_buffer_get (time_buffer *t, + + result = t->list->data; + +- g_mutex_unlock(t->mutex); ++ pthread_mutex_unlock(&t->mutex); + + return result; + } diff --git a/audio/soundtracker/patches/patch-app_xm_c b/audio/soundtracker/patches/patch-app_xm_c new file mode 100644 index 00000000000..2ae301bbe34 --- /dev/null +++ b/audio/soundtracker/patches/patch-app_xm_c @@ -0,0 +1,24 @@ +$OpenBSD: patch-app_xm_c,v 1.1.1.1 2002/02/05 18:04:10 espie Exp $ +--- app/xm.c.orig Mon Feb 4 04:08:11 2002 ++++ app/xm.c Mon Feb 4 04:39:22 2002 +@@ -760,7 +760,8 @@ xm_init_locks (XM *xm) + for(i = 0; i < sizeof(xm->instruments) / sizeof(xm->instruments[0]); i++) { + STInstrument *ins = &xm->instruments[i]; + for(j = 0; j < sizeof(ins->samples) / sizeof(ins->samples[0]); j++) { +- ins->samples[j].sample.lock = g_mutex_new(); ++ ins->samples[j].sample.lock = malloc(sizeof(pthread_mutex_t)); ++ pthread_mutex_init(ins->samples[j].sample.lock, NULL); + } + } + } +@@ -1089,7 +1090,9 @@ XM_Free (XM *xm) + STInstrument *ins = &xm->instruments[i]; + st_clean_instrument(ins, NULL); + for(j = 0; j < sizeof(ins->samples) / sizeof(ins->samples[0]); j++) { +- g_mutex_free(ins->samples[j].sample.lock); ++ pthread_mutex_destroy(ins->samples[j].sample.lock); ++ free(ins->samples[j].sample.lock); ++ ins->samples[j].sample.lock = NULL; + } + } + diff --git a/audio/soundtracker/patches/patch-config_h_in b/audio/soundtracker/patches/patch-config_h_in new file mode 100644 index 00000000000..d673d05b52d --- /dev/null +++ b/audio/soundtracker/patches/patch-config_h_in @@ -0,0 +1,133 @@ +$OpenBSD: patch-config_h_in,v 1.1.1.1 2002/02/05 18:04:10 espie Exp $ +--- config.h.in.orig Mon Feb 4 12:36:39 2002 ++++ config.h.in Mon Feb 4 12:37:24 2002 +@@ -25,9 +25,6 @@ + /* Define to `long' if doesn't define. */ + #undef off_t + +-/* Define if you need to in order for stat and other things to work. */ +-#undef _POSIX_SOURCE +- + /* Define to `unsigned' if doesn't define. */ + #undef size_t + +@@ -52,17 +49,12 @@ + #undef DRIVER_ALSA_050 + #undef DRIVER_ESD + #undef DRIVER_SGI ++#undef DRIVER_SUN + #undef USE_GNOME + #undef NO_AUDIOFILE + #undef NO_GASP + #undef NO_ASM + +-#undef ENABLE_NLS +-#undef HAVE_CATGETS +-#undef HAVE_GETTEXT +-#undef HAVE_LC_MESSAGES +-#undef HAVE_STPCPY +- + /* Define if you have the __argz_count function. */ + #undef HAVE___ARGZ_COUNT + +@@ -78,12 +70,33 @@ + /* Define if you have the esd_play_stream function. */ + #undef HAVE_ESD_PLAY_STREAM + ++/* Define if you have the feof_unlocked function. */ ++#undef HAVE_FEOF_UNLOCKED ++ ++/* Define if you have the fgets_unlocked function. */ ++#undef HAVE_FGETS_UNLOCKED ++ + /* Define if you have the getcwd function. */ + #undef HAVE_GETCWD + ++/* Define if you have the getegid function. */ ++#undef HAVE_GETEGID ++ ++/* Define if you have the geteuid function. */ ++#undef HAVE_GETEUID ++ ++/* Define if you have the getgid function. */ ++#undef HAVE_GETGID ++ + /* Define if you have the getpagesize function. */ + #undef HAVE_GETPAGESIZE + ++/* Define if you have the getuid function. */ ++#undef HAVE_GETUID ++ ++/* Define if you have the mempcpy function. */ ++#undef HAVE_MEMPCPY ++ + /* Define if you have the munmap function. */ + #undef HAVE_MUNMAP + +@@ -117,6 +130,12 @@ + /* Define if you have the strdup function. */ + #undef HAVE_STRDUP + ++/* Define if you have the strtoul function. */ ++#undef HAVE_STRTOUL ++ ++/* Define if you have the tsearch function. */ ++#undef HAVE_TSEARCH ++ + /* Define if you have the header file. */ + #undef HAVE_ARGZ_H + +@@ -138,9 +157,21 @@ + /* Define if you have the header file. */ + #undef HAVE_NL_TYPES_H + ++/* Define if you have the header file. */ ++#undef HAVE_SOUNDCARD_H ++ ++/* Define if you have the header file. */ ++#undef HAVE_STDDEF_H ++ ++/* Define if you have the header file. */ ++#undef HAVE_STDLIB_H ++ + /* Define if you have the header file. */ + #undef HAVE_STRING_H + ++/* Define if you have the header file. */ ++#undef HAVE_SYS_AUDIOIO_H ++ + /* Define if you have the header file. */ + #undef HAVE_SYS_PARAM_H + +@@ -153,12 +184,28 @@ + /* Define if you have the header file. */ + #undef HAVE_UNISTD_H + +-/* Define if you have the i library (-li). */ +-#undef HAVE_LIBI +- + /* Name of package */ + #undef PACKAGE + + /* Version number of package */ + #undef VERSION ++ ++/* Define if you have the iconv() function. */ ++#undef HAVE_ICONV ++ ++/* Define as const if the declaration of iconv() needs const. */ ++#undef ICONV_CONST ++ ++/* Define if you have and nl_langinfo(CODESET). */ ++#undef HAVE_LANGINFO_CODESET ++ ++/* Define if your file defines LC_MESSAGES. */ ++#undef HAVE_LC_MESSAGES ++ ++/* Define to 1 if translation of program messages to the user's native language ++ is requested. */ ++#undef ENABLE_NLS ++ ++/* Define if the GNU gettext() function is already present or preinstalled. */ ++#undef HAVE_GETTEXT + diff --git a/audio/soundtracker/patches/patch-config_sub b/audio/soundtracker/patches/patch-config_sub new file mode 100644 index 00000000000..36221dbc61c --- /dev/null +++ b/audio/soundtracker/patches/patch-config_sub @@ -0,0 +1,1378 @@ +--- config.sub.orig Mon Feb 4 12:49:59 2002 ++++ config.sub Mon Feb 4 12:50:13 2002 +@@ -0,0 +1,1375 @@ ++#! /bin/sh ++# Configuration validation subroutine script. ++# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 ++# Free Software Foundation, Inc. ++ ++timestamp='2001-06-08' ++ ++# This file is (in principle) common to ALL GNU software. ++# The presence of a machine in this file suggests that SOME GNU software ++# can handle that machine. It does not imply ALL GNU software can. ++# ++# This file is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 2 of the License, or ++# (at your option) any later version. ++# ++# This program 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. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program; if not, write to the Free Software ++# Foundation, Inc., 59 Temple Place - Suite 330, ++# Boston, MA 02111-1307, USA. ++ ++# As a special exception to the GNU General Public License, if you ++# distribute this file as part of a program that contains a ++# configuration script generated by Autoconf, you may include it under ++# the same distribution terms that you use for the rest of that program. ++ ++# Please send patches to . ++# ++# Configuration subroutine to validate and canonicalize a configuration type. ++# Supply the specified configuration type as an argument. ++# If it is invalid, we print an error message on stderr and exit with code 1. ++# Otherwise, we print the canonical config type on stdout and succeed. ++ ++# This file is supposed to be the same for all GNU packages ++# and recognize all the CPU types, system types and aliases ++# that are meaningful with *any* GNU software. ++# Each package is responsible for reporting which valid configurations ++# it does not support. The user should be able to distinguish ++# a failure to support a valid configuration from a meaningless ++# configuration. ++ ++# The goal of this file is to map all the various variations of a given ++# machine specification into a single specification in the form: ++# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM ++# or in some cases, the newer four-part form: ++# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM ++# It is wrong to echo any other type of specification. ++ ++me=`echo "$0" | sed -e 's,.*/,,'` ++ ++usage="\ ++Usage: $0 [OPTION] CPU-MFR-OPSYS ++ $0 [OPTION] ALIAS ++ ++Canonicalize a configuration name. ++ ++Operation modes: ++ -h, --help print this help, then exit ++ -t, --time-stamp print date of last modification, then exit ++ -v, --version print version number, then exit ++ ++Report bugs and patches to ." ++ ++version="\ ++GNU config.sub ($timestamp) ++ ++Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 ++Free Software Foundation, Inc. ++ ++This is free software; see the source for copying conditions. There is NO ++warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." ++ ++help=" ++Try \`$me --help' for more information." ++ ++# Parse command line ++while test $# -gt 0 ; do ++ case $1 in ++ --time-stamp | --time* | -t ) ++ echo "$timestamp" ; exit 0 ;; ++ --version | -v ) ++ echo "$version" ; exit 0 ;; ++ --help | --h* | -h ) ++ echo "$usage"; exit 0 ;; ++ -- ) # Stop option processing ++ shift; break ;; ++ - ) # Use stdin as input. ++ break ;; ++ -* ) ++ echo "$me: invalid option $1$help" ++ exit 1 ;; ++ ++ *local*) ++ # First pass through any local machine types. ++ echo $1 ++ exit 0;; ++ ++ * ) ++ break ;; ++ esac ++done ++ ++case $# in ++ 0) echo "$me: missing argument$help" >&2 ++ exit 1;; ++ 1) ;; ++ *) echo "$me: too many arguments$help" >&2 ++ exit 1;; ++esac ++ ++# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). ++# Here we must recognize all the valid KERNEL-OS combinations. ++maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` ++case $maybe_os in ++ nto-qnx* | linux-gnu* | storm-chaos* | os2-emx* | windows32-*) ++ os=-$maybe_os ++ basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ++ ;; ++ *) ++ basic_machine=`echo $1 | sed 's/-[^-]*$//'` ++ if [ $basic_machine != $1 ] ++ then os=`echo $1 | sed 's/.*-/-/'` ++ else os=; fi ++ ;; ++esac ++ ++### Let's recognize common machines as not being operating systems so ++### that things like config.sub decstation-3100 work. We also ++### recognize some manufacturers as not being operating systems, so we ++### can provide default operating systems below. ++case $os in ++ -sun*os*) ++ # Prevent following clause from handling this invalid input. ++ ;; ++ -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ ++ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ ++ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ ++ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ ++ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ ++ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ ++ -apple | -axis) ++ os= ++ basic_machine=$1 ++ ;; ++ -sim | -cisco | -oki | -wec | -winbond) ++ os= ++ basic_machine=$1 ++ ;; ++ -scout) ++ ;; ++ -wrs) ++ os=-vxworks ++ basic_machine=$1 ++ ;; ++ -chorusos*) ++ os=-chorusos ++ basic_machine=$1 ++ ;; ++ -chorusrdb) ++ os=-chorusrdb ++ basic_machine=$1 ++ ;; ++ -hiux*) ++ os=-hiuxwe2 ++ ;; ++ -sco5) ++ os=-sco3.2v5 ++ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ++ ;; ++ -sco4) ++ os=-sco3.2v4 ++ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ++ ;; ++ -sco3.2.[4-9]*) ++ os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` ++ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ++ ;; ++ -sco3.2v[4-9]*) ++ # Don't forget version if it is 3.2v4 or newer. ++ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ++ ;; ++ -sco*) ++ os=-sco3.2v2 ++ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ++ ;; ++ -udk*) ++ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ++ ;; ++ -isc) ++ os=-isc2.2 ++ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ++ ;; ++ -clix*) ++ basic_machine=clipper-intergraph ++ ;; ++ -isc*) ++ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ++ ;; ++ -lynx*) ++ os=-lynxos ++ ;; ++ -ptx*) ++ basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ++ ;; ++ -windowsnt*) ++ os=`echo $os | sed -e 's/windowsnt/winnt/'` ++ ;; ++ -psos*) ++ os=-psos ++ ;; ++ -mint | -mint[0-9]*) ++ basic_machine=m68k-atari ++ os=-mint ++ ;; ++esac ++ ++# Decode aliases for certain CPU-COMPANY combinations. ++case $basic_machine in ++ # Recognize the basic CPU types without company name. ++ # Some are omitted here because they have special meanings below. ++ tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc \ ++ | arm | arme[lb] | arm[bl]e | armv[2345] | armv[345][lb] | strongarm | xscale \ ++ | pyramid | mn10200 | mn10300 | tron | a29k \ ++ | 580 | i960 | h8300 \ ++ | x86 | ppcbe | mipsbe | mipsle | shbe | shle \ ++ | hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \ ++ | hppa64 \ ++ | alpha | alphaev[4-8] | alphaev56 | alphapca5[67] \ ++ | alphaev6[78] \ ++ | we32k | ns16k | clipper | i370 | sh | sh[34] \ ++ | powerpc | powerpcle \ ++ | 1750a | dsp16xx | pdp10 | pdp11 \ ++ | mips16 | mips64 | mipsel | mips64el \ ++ | mips64orion | mips64orionel | mipstx39 | mipstx39el \ ++ | mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \ ++ | mips64vr5000 | mips64vr5000el | mcore | s390 | s390x \ ++ | sparc | sparclet | sparclite | sparc64 | sparcv9 | sparcv9b \ ++ | v850 | c4x \ ++ | thumb | d10v | d30v | fr30 | avr | openrisc | tic80 \ ++ | pj | pjl | h8500 | z8k) ++ basic_machine=$basic_machine-unknown ++ ;; ++ m6811 | m68hc11 | m6812 | m68hc12) ++ # Motorola 68HC11/12. ++ basic_machine=$basic_machine-unknown ++ os=-none ++ ;; ++ m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ++ ;; ++ ++ # We use `pc' rather than `unknown' ++ # because (1) that's what they normally are, and ++ # (2) the word "unknown" tends to confuse beginning users. ++ i*86 | x86_64) ++ basic_machine=$basic_machine-pc ++ ;; ++ # Object if more than one company name word. ++ *-*-*) ++ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 ++ exit 1 ++ ;; ++ # Recognize the basic CPU types with company name. ++ # FIXME: clean up the formatting here. ++ vax-* | tahoe-* | i*86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \ ++ | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | c[123]* \ ++ | arm-* | armbe-* | armle-* | armv*-* | strongarm-* | xscale-* \ ++ | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \ ++ | power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \ ++ | xmp-* | ymp-* \ ++ | x86-* | ppcbe-* | mipsbe-* | mipsle-* | shbe-* | shle-* \ ++ | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* \ ++ | hppa2.0n-* | hppa64-* \ ++ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphapca5[67]-* \ ++ | alphaev6[78]-* \ ++ | we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \ ++ | clipper-* | orion-* \ ++ | sparclite-* | pdp10-* | pdp11-* | sh-* | sh[34]-* | sh[34]eb-* \ ++ | powerpc-* | powerpcle-* | sparc64-* | sparcv9-* | sparcv9b-* | sparc86x-* \ ++ | mips16-* | mips64-* | mipsel-* \ ++ | mips64el-* | mips64orion-* | mips64orionel-* \ ++ | mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \ ++ | mipstx39-* | mipstx39el-* | mcore-* \ ++ | f30[01]-* | f700-* | s390-* | s390x-* | sv1-* | t3e-* \ ++ | [cjt]90-* \ ++ | m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \ ++ | thumb-* | v850-* | d30v-* | tic30-* | tic80-* | c30-* | fr30-* \ ++ | bs2000-* | tic54x-* | c54x-* | x86_64-* | pj-* | pjl-*) ++ ;; ++ # Recognize the various machine names and aliases which stand ++ # for a CPU type and a company and sometimes even an OS. ++ 386bsd) ++ basic_machine=i386-unknown ++ os=-bsd ++ ;; ++ 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) ++ basic_machine=m68000-att ++ ;; ++ 3b*) ++ basic_machine=we32k-att ++ ;; ++ a29khif) ++ basic_machine=a29k-amd ++ os=-udi ++ ;; ++ adobe68k) ++ basic_machine=m68010-adobe ++ os=-scout ++ ;; ++ alliant | fx80) ++ basic_machine=fx80-alliant ++ ;; ++ altos | altos3068) ++ basic_machine=m68k-altos ++ ;; ++ am29k) ++ basic_machine=a29k-none ++ os=-bsd ++ ;; ++ amdahl) ++ basic_machine=580-amdahl ++ os=-sysv ++ ;; ++ amiga | amiga-*) ++ basic_machine=m68k-unknown ++ ;; ++ amigaos | amigados) ++ basic_machine=m68k-unknown ++ os=-amigaos ++ ;; ++ amigaunix | amix) ++ basic_machine=m68k-unknown ++ os=-sysv4 ++ ;; ++ apollo68) ++ basic_machine=m68k-apollo ++ os=-sysv ++ ;; ++ apollo68bsd) ++ basic_machine=m68k-apollo ++ os=-bsd ++ ;; ++ aux) ++ basic_machine=m68k-apple ++ os=-aux ++ ;; ++ balance) ++ basic_machine=ns32k-sequent ++ os=-dynix ++ ;; ++ convex-c1) ++ basic_machine=c1-convex ++ os=-bsd ++ ;; ++ convex-c2) ++ basic_machine=c2-convex ++ os=-bsd ++ ;; ++ convex-c32) ++ basic_machine=c32-convex ++ os=-bsd ++ ;; ++ convex-c34) ++ basic_machine=c34-convex ++ os=-bsd ++ ;; ++ convex-c38) ++ basic_machine=c38-convex ++ os=-bsd ++ ;; ++ cray | ymp) ++ basic_machine=ymp-cray ++ os=-unicos ++ ;; ++ cray2) ++ basic_machine=cray2-cray ++ os=-unicos ++ ;; ++ [cjt]90) ++ basic_machine=${basic_machine}-cray ++ os=-unicos ++ ;; ++ crds | unos) ++ basic_machine=m68k-crds ++ ;; ++ cris | cris-* | etrax*) ++ basic_machine=cris-axis ++ ;; ++ da30 | da30-*) ++ basic_machine=m68k-da30 ++ ;; ++ decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) ++ basic_machine=mips-dec ++ ;; ++ delta | 3300 | motorola-3300 | motorola-delta \ ++ | 3300-motorola | delta-motorola) ++ basic_machine=m68k-motorola ++ ;; ++ delta88) ++ basic_machine=m88k-motorola ++ os=-sysv3 ++ ;; ++ dpx20 | dpx20-*) ++ basic_machine=rs6000-bull ++ os=-bosx ++ ;; ++ dpx2* | dpx2*-bull) ++ basic_machine=m68k-bull ++ os=-sysv3 ++ ;; ++ ebmon29k) ++ basic_machine=a29k-amd ++ os=-ebmon ++ ;; ++ elxsi) ++ basic_machine=elxsi-elxsi ++ os=-bsd ++ ;; ++ encore | umax | mmax) ++ basic_machine=ns32k-encore ++ ;; ++ es1800 | OSE68k | ose68k | ose | OSE) ++ basic_machine=m68k-ericsson ++ os=-ose ++ ;; ++ fx2800) ++ basic_machine=i860-alliant ++ ;; ++ genix) ++ basic_machine=ns32k-ns ++ ;; ++ gmicro) ++ basic_machine=tron-gmicro ++ os=-sysv ++ ;; ++ go32) ++ basic_machine=i386-pc ++ os=-go32 ++ ;; ++ h3050r* | hiux*) ++ basic_machine=hppa1.1-hitachi ++ os=-hiuxwe2 ++ ;; ++ h8300hms) ++ basic_machine=h8300-hitachi ++ os=-hms ++ ;; ++ h8300xray) ++ basic_machine=h8300-hitachi ++ os=-xray ++ ;; ++ h8500hms) ++ basic_machine=h8500-hitachi ++ os=-hms ++ ;; ++ harris) ++ basic_machine=m88k-harris ++ os=-sysv3 ++ ;; ++ hp300-*) ++ basic_machine=m68k-hp ++ ;; ++ hp300bsd) ++ basic_machine=m68k-hp ++ os=-bsd ++ ;; ++ hp300hpux) ++ basic_machine=m68k-hp ++ os=-hpux ++ ;; ++ hp3k9[0-9][0-9] | hp9[0-9][0-9]) ++ basic_machine=hppa1.0-hp ++ ;; ++ hp9k2[0-9][0-9] | hp9k31[0-9]) ++ basic_machine=m68000-hp ++ ;; ++ hp9k3[2-9][0-9]) ++ basic_machine=m68k-hp ++ ;; ++ hp9k6[0-9][0-9] | hp6[0-9][0-9]) ++ basic_machine=hppa1.0-hp ++ ;; ++ hp9k7[0-79][0-9] | hp7[0-79][0-9]) ++ basic_machine=hppa1.1-hp ++ ;; ++ hp9k78[0-9] | hp78[0-9]) ++ # FIXME: really hppa2.0-hp ++ basic_machine=hppa1.1-hp ++ ;; ++ hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) ++ # FIXME: really hppa2.0-hp ++ basic_machine=hppa1.1-hp ++ ;; ++ hp9k8[0-9][13679] | hp8[0-9][13679]) ++ basic_machine=hppa1.1-hp ++ ;; ++ hp9k8[0-9][0-9] | hp8[0-9][0-9]) ++ basic_machine=hppa1.0-hp ++ ;; ++ hppa-next) ++ os=-nextstep3 ++ ;; ++ hppaosf) ++ basic_machine=hppa1.1-hp ++ os=-osf ++ ;; ++ hppro) ++ basic_machine=hppa1.1-hp ++ os=-proelf ++ ;; ++ i370-ibm* | ibm*) ++ basic_machine=i370-ibm ++ ;; ++# I'm not sure what "Sysv32" means. Should this be sysv3.2? ++ i*86v32) ++ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` ++ os=-sysv32 ++ ;; ++ i*86v4*) ++ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` ++ os=-sysv4 ++ ;; ++ i*86v) ++ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` ++ os=-sysv ++ ;; ++ i*86sol2) ++ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` ++ os=-solaris2 ++ ;; ++ i386mach) ++ basic_machine=i386-mach ++ os=-mach ++ ;; ++ i386-vsta | vsta) ++ basic_machine=i386-unknown ++ os=-vsta ++ ;; ++ iris | iris4d) ++ basic_machine=mips-sgi ++ case $os in ++ -irix*) ++ ;; ++ *) ++ os=-irix4 ++ ;; ++ esac ++ ;; ++ isi68 | isi) ++ basic_machine=m68k-isi ++ os=-sysv ++ ;; ++ m88k-omron*) ++ basic_machine=m88k-omron ++ ;; ++ magnum | m3230) ++ basic_machine=mips-mips ++ os=-sysv ++ ;; ++ merlin) ++ basic_machine=ns32k-utek ++ os=-sysv ++ ;; ++ mingw32) ++ basic_machine=i386-pc ++ os=-mingw32 ++ ;; ++ miniframe) ++ basic_machine=m68000-convergent ++ ;; ++ *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) ++ basic_machine=m68k-atari ++ os=-mint ++ ;; ++ mipsel*-linux*) ++ basic_machine=mipsel-unknown ++ os=-linux-gnu ++ ;; ++ mips*-linux*) ++ basic_machine=mips-unknown ++ os=-linux-gnu ++ ;; ++ mips3*-*) ++ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ++ ;; ++ mips3*) ++ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ++ ;; ++ mmix*) ++ basic_machine=mmix-knuth ++ os=-mmixware ++ ;; ++ monitor) ++ basic_machine=m68k-rom68k ++ os=-coff ++ ;; ++ msdos) ++ basic_machine=i386-pc ++ os=-msdos ++ ;; ++ mvs) ++ basic_machine=i370-ibm ++ os=-mvs ++ ;; ++ ncr3000) ++ basic_machine=i486-ncr ++ os=-sysv4 ++ ;; ++ netbsd386) ++ basic_machine=i386-unknown ++ os=-netbsd ++ ;; ++ netwinder) ++ basic_machine=armv4l-rebel ++ os=-linux ++ ;; ++ news | news700 | news800 | news900) ++ basic_machine=m68k-sony ++ os=-newsos ++ ;; ++ news1000) ++ basic_machine=m68030-sony ++ os=-newsos ++ ;; ++ news-3600 | risc-news) ++ basic_machine=mips-sony ++ os=-newsos ++ ;; ++ necv70) ++ basic_machine=v70-nec ++ os=-sysv ++ ;; ++ next | m*-next ) ++ basic_machine=m68k-next ++ case $os in ++ -nextstep* ) ++ ;; ++ -ns2*) ++ os=-nextstep2 ++ ;; ++ *) ++ os=-nextstep3 ++ ;; ++ esac ++ ;; ++ nh3000) ++ basic_machine=m68k-harris ++ os=-cxux ++ ;; ++ nh[45]000) ++ basic_machine=m88k-harris ++ os=-cxux ++ ;; ++ nindy960) ++ basic_machine=i960-intel ++ os=-nindy ++ ;; ++ mon960) ++ basic_machine=i960-intel ++ os=-mon960 ++ ;; ++ nonstopux) ++ basic_machine=mips-compaq ++ os=-nonstopux ++ ;; ++ np1) ++ basic_machine=np1-gould ++ ;; ++ nsr-tandem) ++ basic_machine=nsr-tandem ++ ;; ++ op50n-* | op60c-*) ++ basic_machine=hppa1.1-oki ++ os=-proelf ++ ;; ++ OSE68000 | ose68000) ++ basic_machine=m68000-ericsson ++ os=-ose ++ ;; ++ os68k) ++ basic_machine=m68k-none ++ os=-os68k ++ ;; ++ pa-hitachi) ++ basic_machine=hppa1.1-hitachi ++ os=-hiuxwe2 ++ ;; ++ paragon) ++ basic_machine=i860-intel ++ os=-osf ++ ;; ++ pbd) ++ basic_machine=sparc-tti ++ ;; ++ pbb) ++ basic_machine=m68k-tti ++ ;; ++ pc532 | pc532-*) ++ basic_machine=ns32k-pc532 ++ ;; ++ pentium | p5 | k5 | k6 | nexgen) ++ basic_machine=i586-pc ++ ;; ++ pentiumpro | p6 | 6x86 | athlon) ++ basic_machine=i686-pc ++ ;; ++ pentiumii | pentium2) ++ basic_machine=i686-pc ++ ;; ++ pentium-* | p5-* | k5-* | k6-* | nexgen-*) ++ basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ++ ;; ++ pentiumpro-* | p6-* | 6x86-* | athlon-*) ++ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ++ ;; ++ pentiumii-* | pentium2-*) ++ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ++ ;; ++ pn) ++ basic_machine=pn-gould ++ ;; ++ power) basic_machine=power-ibm ++ ;; ++ ppc) basic_machine=powerpc-unknown ++ ;; ++ ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ++ ;; ++ ppcle | powerpclittle | ppc-le | powerpc-little) ++ basic_machine=powerpcle-unknown ++ ;; ++ ppcle-* | powerpclittle-*) ++ basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ++ ;; ++ ps2) ++ basic_machine=i386-ibm ++ ;; ++ pw32) ++ basic_machine=i586-unknown ++ os=-pw32 ++ ;; ++ rom68k) ++ basic_machine=m68k-rom68k ++ os=-coff ++ ;; ++ rm[46]00) ++ basic_machine=mips-siemens ++ ;; ++ rtpc | rtpc-*) ++ basic_machine=romp-ibm ++ ;; ++ sa29200) ++ basic_machine=a29k-amd ++ os=-udi ++ ;; ++ sequent) ++ basic_machine=i386-sequent ++ ;; ++ sh) ++ basic_machine=sh-hitachi ++ os=-hms ++ ;; ++ sparclite-wrs) ++ basic_machine=sparclite-wrs ++ os=-vxworks ++ ;; ++ sps7) ++ basic_machine=m68k-bull ++ os=-sysv2 ++ ;; ++ spur) ++ basic_machine=spur-unknown ++ ;; ++ st2000) ++ basic_machine=m68k-tandem ++ ;; ++ stratus) ++ basic_machine=i860-stratus ++ os=-sysv4 ++ ;; ++ sun2) ++ basic_machine=m68000-sun ++ ;; ++ sun2os3) ++ basic_machine=m68000-sun ++ os=-sunos3 ++ ;; ++ sun2os4) ++ basic_machine=m68000-sun ++ os=-sunos4 ++ ;; ++ sun3os3) ++ basic_machine=m68k-sun ++ os=-sunos3 ++ ;; ++ sun3os4) ++ basic_machine=m68k-sun ++ os=-sunos4 ++ ;; ++ sun4os3) ++ basic_machine=sparc-sun ++ os=-sunos3 ++ ;; ++ sun4os4) ++ basic_machine=sparc-sun ++ os=-sunos4 ++ ;; ++ sun4sol2) ++ basic_machine=sparc-sun ++ os=-solaris2 ++ ;; ++ sun3 | sun3-*) ++ basic_machine=m68k-sun ++ ;; ++ sun4) ++ basic_machine=sparc-sun ++ ;; ++ sun386 | sun386i | roadrunner) ++ basic_machine=i386-sun ++ ;; ++ sv1) ++ basic_machine=sv1-cray ++ os=-unicos ++ ;; ++ symmetry) ++ basic_machine=i386-sequent ++ os=-dynix ++ ;; ++ t3e) ++ basic_machine=t3e-cray ++ os=-unicos ++ ;; ++ tic54x | c54x*) ++ basic_machine=tic54x-unknown ++ os=-coff ++ ;; ++ tx39) ++ basic_machine=mipstx39-unknown ++ ;; ++ tx39el) ++ basic_machine=mipstx39el-unknown ++ ;; ++ tower | tower-32) ++ basic_machine=m68k-ncr ++ ;; ++ udi29k) ++ basic_machine=a29k-amd ++ os=-udi ++ ;; ++ ultra3) ++ basic_machine=a29k-nyu ++ os=-sym1 ++ ;; ++ v810 | necv810) ++ basic_machine=v810-nec ++ os=-none ++ ;; ++ vaxv) ++ basic_machine=vax-dec ++ os=-sysv ++ ;; ++ vms) ++ basic_machine=vax-dec ++ os=-vms ++ ;; ++ vpp*|vx|vx-*) ++ basic_machine=f301-fujitsu ++ ;; ++ vxworks960) ++ basic_machine=i960-wrs ++ os=-vxworks ++ ;; ++ vxworks68) ++ basic_machine=m68k-wrs ++ os=-vxworks ++ ;; ++ vxworks29k) ++ basic_machine=a29k-wrs ++ os=-vxworks ++ ;; ++ w65*) ++ basic_machine=w65-wdc ++ os=-none ++ ;; ++ w89k-*) ++ basic_machine=hppa1.1-winbond ++ os=-proelf ++ ;; ++ windows32) ++ basic_machine=i386-pc ++ os=-windows32-msvcrt ++ ;; ++ xmp) ++ basic_machine=xmp-cray ++ os=-unicos ++ ;; ++ xps | xps100) ++ basic_machine=xps100-honeywell ++ ;; ++ z8k-*-coff) ++ basic_machine=z8k-unknown ++ os=-sim ++ ;; ++ none) ++ basic_machine=none-none ++ os=-none ++ ;; ++ ++# Here we handle the default manufacturer of certain CPU types. It is in ++# some cases the only manufacturer, in others, it is the most popular. ++ w89k) ++ basic_machine=hppa1.1-winbond ++ ;; ++ op50n) ++ basic_machine=hppa1.1-oki ++ ;; ++ op60c) ++ basic_machine=hppa1.1-oki ++ ;; ++ mips) ++ if [ x$os = x-linux-gnu ]; then ++ basic_machine=mips-unknown ++ else ++ basic_machine=mips-mips ++ fi ++ ;; ++ romp) ++ basic_machine=romp-ibm ++ ;; ++ rs6000) ++ basic_machine=rs6000-ibm ++ ;; ++ vax) ++ basic_machine=vax-dec ++ ;; ++ pdp10) ++ # there are many clones, so DEC is not a safe bet ++ basic_machine=pdp10-unknown ++ ;; ++ pdp11) ++ basic_machine=pdp11-dec ++ ;; ++ we32k) ++ basic_machine=we32k-att ++ ;; ++ sh3 | sh4) ++ basic_machine=sh-unknown ++ ;; ++ sparc | sparcv9 | sparcv9b) ++ basic_machine=sparc-sun ++ ;; ++ cydra) ++ basic_machine=cydra-cydrome ++ ;; ++ orion) ++ basic_machine=orion-highlevel ++ ;; ++ orion105) ++ basic_machine=clipper-highlevel ++ ;; ++ mac | mpw | mac-mpw) ++ basic_machine=m68k-apple ++ ;; ++ pmac | pmac-mpw) ++ basic_machine=powerpc-apple ++ ;; ++ c4x*) ++ basic_machine=c4x-none ++ os=-coff ++ ;; ++ *-unknown) ++ # Make sure to match an already-canonicalized machine name. ++ ;; ++ *) ++ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 ++ exit 1 ++ ;; ++esac ++ ++# Here we canonicalize certain aliases for manufacturers. ++case $basic_machine in ++ *-digital*) ++ basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ++ ;; ++ *-commodore*) ++ basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ++ ;; ++ *) ++ ;; ++esac ++ ++# Decode manufacturer-specific aliases for certain operating systems. ++ ++if [ x"$os" != x"" ] ++then ++case $os in ++ # First match some system type aliases ++ # that might get confused with valid system types. ++ # -solaris* is a basic system type, with this one exception. ++ -solaris1 | -solaris1.*) ++ os=`echo $os | sed -e 's|solaris1|sunos4|'` ++ ;; ++ -solaris) ++ os=-solaris2 ++ ;; ++ -svr4*) ++ os=-sysv4 ++ ;; ++ -unixware*) ++ os=-sysv4.2uw ++ ;; ++ -gnu/linux*) ++ os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ++ ;; ++ # First accept the basic system types. ++ # The portable systems comes first. ++ # Each alternative MUST END IN A *, to match a version number. ++ # -sysv* is not here because it comes later, after sysvr4. ++ -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ ++ | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ ++ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ ++ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ ++ | -aos* \ ++ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ ++ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ ++ | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \ ++ | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ ++ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ ++ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ ++ | -chorusos* | -chorusrdb* \ ++ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ ++ | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ ++ | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \ ++ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ ++ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* | -os2*) ++ # Remember, each alternative MUST END IN *, to match a version number. ++ ;; ++ -qnx*) ++ case $basic_machine in ++ x86-* | i*86-*) ++ ;; ++ *) ++ os=-nto$os ++ ;; ++ esac ++ ;; ++ -nto*) ++ os=-nto-qnx ++ ;; ++ -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ ++ | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ ++ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ++ ;; ++ -mac*) ++ os=`echo $os | sed -e 's|mac|macos|'` ++ ;; ++ -linux*) ++ os=`echo $os | sed -e 's|linux|linux-gnu|'` ++ ;; ++ -sunos5*) ++ os=`echo $os | sed -e 's|sunos5|solaris2|'` ++ ;; ++ -sunos6*) ++ os=`echo $os | sed -e 's|sunos6|solaris3|'` ++ ;; ++ -opened*) ++ os=-openedition ++ ;; ++ -wince*) ++ os=-wince ++ ;; ++ -osfrose*) ++ os=-osfrose ++ ;; ++ -osf*) ++ os=-osf ++ ;; ++ -utek*) ++ os=-bsd ++ ;; ++ -dynix*) ++ os=-bsd ++ ;; ++ -acis*) ++ os=-aos ++ ;; ++ -386bsd) ++ os=-bsd ++ ;; ++ -ctix* | -uts*) ++ os=-sysv ++ ;; ++ -ns2 ) ++ os=-nextstep2 ++ ;; ++ -nsk*) ++ os=-nsk ++ ;; ++ # Preserve the version number of sinix5. ++ -sinix5.*) ++ os=`echo $os | sed -e 's|sinix|sysv|'` ++ ;; ++ -sinix*) ++ os=-sysv4 ++ ;; ++ -triton*) ++ os=-sysv3 ++ ;; ++ -oss*) ++ os=-sysv3 ++ ;; ++ -svr4) ++ os=-sysv4 ++ ;; ++ -svr3) ++ os=-sysv3 ++ ;; ++ -sysvr4) ++ os=-sysv4 ++ ;; ++ # This must come after -sysvr4. ++ -sysv*) ++ ;; ++ -ose*) ++ os=-ose ++ ;; ++ -es1800*) ++ os=-ose ++ ;; ++ -xenix) ++ os=-xenix ++ ;; ++ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) ++ os=-mint ++ ;; ++ -none) ++ ;; ++ *) ++ # Get rid of the `-' at the beginning of $os. ++ os=`echo $os | sed 's/[^-]*-//'` ++ echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 ++ exit 1 ++ ;; ++esac ++else ++ ++# Here we handle the default operating systems that come with various machines. ++# The value should be what the vendor currently ships out the door with their ++# machine or put another way, the most popular os provided with the machine. ++ ++# Note that if you're going to try to match "-MANUFACTURER" here (say, ++# "-sun"), then you have to tell the case statement up towards the top ++# that MANUFACTURER isn't an operating system. Otherwise, code above ++# will signal an error saying that MANUFACTURER isn't an operating ++# system, and we'll never get to this point. ++ ++case $basic_machine in ++ *-acorn) ++ os=-riscix1.2 ++ ;; ++ arm*-rebel) ++ os=-linux ++ ;; ++ arm*-semi) ++ os=-aout ++ ;; ++ pdp10-*) ++ os=-tops20 ++ ;; ++ pdp11-*) ++ os=-none ++ ;; ++ *-dec | vax-*) ++ os=-ultrix4.2 ++ ;; ++ m68*-apollo) ++ os=-domain ++ ;; ++ i386-sun) ++ os=-sunos4.0.2 ++ ;; ++ m68000-sun) ++ os=-sunos3 ++ # This also exists in the configure program, but was not the ++ # default. ++ # os=-sunos4 ++ ;; ++ m68*-cisco) ++ os=-aout ++ ;; ++ mips*-cisco) ++ os=-elf ++ ;; ++ mips*-*) ++ os=-elf ++ ;; ++ *-tti) # must be before sparc entry or we get the wrong os. ++ os=-sysv3 ++ ;; ++ sparc-* | *-sun) ++ os=-sunos4.1.1 ++ ;; ++ *-be) ++ os=-beos ++ ;; ++ *-ibm) ++ os=-aix ++ ;; ++ *-wec) ++ os=-proelf ++ ;; ++ *-winbond) ++ os=-proelf ++ ;; ++ *-oki) ++ os=-proelf ++ ;; ++ *-hp) ++ os=-hpux ++ ;; ++ *-hitachi) ++ os=-hiux ++ ;; ++ i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) ++ os=-sysv ++ ;; ++ *-cbm) ++ os=-amigaos ++ ;; ++ *-dg) ++ os=-dgux ++ ;; ++ *-dolphin) ++ os=-sysv3 ++ ;; ++ m68k-ccur) ++ os=-rtu ++ ;; ++ m88k-omron*) ++ os=-luna ++ ;; ++ *-next ) ++ os=-nextstep ++ ;; ++ *-sequent) ++ os=-ptx ++ ;; ++ *-crds) ++ os=-unos ++ ;; ++ *-ns) ++ os=-genix ++ ;; ++ i370-*) ++ os=-mvs ++ ;; ++ *-next) ++ os=-nextstep3 ++ ;; ++ *-gould) ++ os=-sysv ++ ;; ++ *-highlevel) ++ os=-bsd ++ ;; ++ *-encore) ++ os=-bsd ++ ;; ++ *-sgi) ++ os=-irix ++ ;; ++ *-siemens) ++ os=-sysv4 ++ ;; ++ *-masscomp) ++ os=-rtu ++ ;; ++ f30[01]-fujitsu | f700-fujitsu) ++ os=-uxpv ++ ;; ++ *-rom68k) ++ os=-coff ++ ;; ++ *-*bug) ++ os=-coff ++ ;; ++ *-apple) ++ os=-macos ++ ;; ++ *-atari*) ++ os=-mint ++ ;; ++ *) ++ os=-none ++ ;; ++esac ++fi ++ ++# Here we handle the case where we know the os, and the CPU type, but not the ++# manufacturer. We pick the logical manufacturer. ++vendor=unknown ++case $basic_machine in ++ *-unknown) ++ case $os in ++ -riscix*) ++ vendor=acorn ++ ;; ++ -sunos*) ++ vendor=sun ++ ;; ++ -aix*) ++ vendor=ibm ++ ;; ++ -beos*) ++ vendor=be ++ ;; ++ -hpux*) ++ vendor=hp ++ ;; ++ -mpeix*) ++ vendor=hp ++ ;; ++ -hiux*) ++ vendor=hitachi ++ ;; ++ -unos*) ++ vendor=crds ++ ;; ++ -dgux*) ++ vendor=dg ++ ;; ++ -luna*) ++ vendor=omron ++ ;; ++ -genix*) ++ vendor=ns ++ ;; ++ -mvs* | -opened*) ++ vendor=ibm ++ ;; ++ -ptx*) ++ vendor=sequent ++ ;; ++ -vxsim* | -vxworks*) ++ vendor=wrs ++ ;; ++ -aux*) ++ vendor=apple ++ ;; ++ -hms*) ++ vendor=hitachi ++ ;; ++ -mpw* | -macos*) ++ vendor=apple ++ ;; ++ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) ++ vendor=atari ++ ;; ++ esac ++ basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ++ ;; ++esac ++ ++echo $basic_machine$os ++exit 0 ++ ++# Local variables: ++# eval: (add-hook 'write-file-hooks 'time-stamp) ++# time-stamp-start: "timestamp='" ++# time-stamp-format: "%:y-%02m-%02d" ++# time-stamp-end: "'" ++# End: diff --git a/audio/soundtracker/patches/patch-configure_in b/audio/soundtracker/patches/patch-configure_in new file mode 100644 index 00000000000..4cca761f094 --- /dev/null +++ b/audio/soundtracker/patches/patch-configure_in @@ -0,0 +1,71 @@ +--- configure.in.orig Wed Jul 25 11:07:33 2001 ++++ configure.in Tue Feb 5 05:54:53 2002 +@@ -61,10 +61,17 @@ + dnl Test for GTK+ / GNOME + dnl ----------------------------------------------------------------------- + ++gtk_threads="gthreads" ++case `uname` in ++ OpenBSD*) ++ gtk_threads="" ++ LIBS="$LIBS -pthread -lintl" ++ ;; ++esac + AM_PATH_GTK(1.2.2, + , + AC_MSG_ERROR(Cannot find GTK: Is gtk-config in path?), +- "gthread") ++ $gtk_threads) + + gnome=yes + AC_ARG_ENABLE(gnome, +@@ -76,7 +83,7 @@ + AC_MSG_CHECKING(for Gnome compile flags) + GNOME_CFLAGS=`$gnomepath gnomeui --cflags 2>/dev/null` + GNOME_VER=`$gnomepath --version |$sedpath 's/gnome-libs //'` +- GNOME_MAJOR=`echo $GNOME_VER |$sedpath 's/\([[0-9]*]*\).\([[0-9]*]*\).\([[0-9]*]*\)/\1/'` ++ GNOME_MAJOR=`echo $GNOME_VER |$sedpath 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'` + if test "_$GNOME_MAJOR" = "_0"; then + gnome=no + AC_MSG_RESULT([old Gnome found, building without it.]) +@@ -133,9 +140,15 @@ + oss_support=no) + + if test x$oss_support != xno; then +- AC_CHECK_HEADERS(sys/soundcard.h machine/soundcard.h) ++ AC_CHECK_HEADERS(sys/soundcard.h machine/soundcard.h soundcard.h) + if test "${ac_cv_header_sys_soundcard_h}" = "yes" || \ +- test "${ac_cv_header_machine_soundcard_h}" = "yes"; then ++ test "${ac_cv_header_machine_soundcard_h}" = "yes" || \ ++ test "${ac_cv_header_soundcard_h}" = "yes"; then ++ case `uname` in ++ OpenBSD*) ++ LIBS="$LIBS -lossaudio" ++ ;; ++ esac + AC_DEFINE(DRIVER_OSS) + fi + fi +@@ -204,6 +217,22 @@ + fi + ;; + esac ++ ++dnl ----------------------------------------------------------------------- ++dnl Test for Sun audio ++dnl ----------------------------------------------------------------------- ++ ++AC_ARG_ENABLE(sun, ++[ --disable-sun Disable Sun driver (default = try)], ++sun_support=no) ++ ++if test x$sun_support != xno; then ++ AC_CHECK_HEADERS(sys/audioio.h) ++ if test "${ac_cv_header_sys_audioio_h}" = "yes"; then ++ AC_DEFINE(DRIVER_SUN) ++ fi ++fi ++ + + dnl ----------------------------------------------------------------------- + dnl Other tests diff --git a/audio/soundtracker/patches/patch-intl_Makefile_in b/audio/soundtracker/patches/patch-intl_Makefile_in new file mode 100644 index 00000000000..79fd850e5d4 --- /dev/null +++ b/audio/soundtracker/patches/patch-intl_Makefile_in @@ -0,0 +1,51 @@ +$OpenBSD: patch-intl_Makefile_in,v 1.1.1.1 2002/02/05 18:04:10 espie Exp $ +--- intl/Makefile.in.orig Wed Aug 11 09:59:15 1999 ++++ intl/Makefile.in Thu Jan 31 08:55:03 2002 +@@ -62,11 +62,11 @@ SOURCES = $(COMSRCS) intl-compat.c cat-c + COMSRCS = bindtextdom.c dcgettext.c dgettext.c gettext.c \ + finddomain.c loadmsgcat.c localealias.c textdomain.c l10nflist.c \ + explodename.c +-OBJECTS = @INTLOBJS@ bindtextdom.$lo dcgettext.$lo dgettext.$lo gettext.$lo \ +-finddomain.$lo loadmsgcat.$lo localealias.$lo textdomain.$lo l10nflist.$lo \ +-explodename.$lo +-CATOBJS = cat-compat.$lo ../po/cat-id-tbl.$lo +-GETTOBJS = intl-compat.$lo ++OBJECTS = @INTLOBJS@ bindtextdom.o dcgettext.o dgettext.o gettext.o \ ++finddomain.o loadmsgcat.o localealias.o textdomain.o l10nflist.o \ ++explodename.o ++CATOBJS = cat-compat.o ../po/cat-id-tbl.o ++GETTOBJS = intl-compat.o + DISTFILES.common = ChangeLog Makefile.in linux-msg.sed po2tbl.sed.in \ + xopen-msg.sed $(HEADERS) $(SOURCES) + DISTFILES.normal = VERSION +@@ -83,7 +83,7 @@ INCLUDES = -I.. -I. -I$(top_srcdir)/intl + + all: all-@USE_INCLUDED_LIBINTL@ + +-all-yes: libintl.$la intlh.inst ++all-yes: libintl.a + all-no: + + libintl.a: $(OBJECTS) +@@ -95,8 +95,8 @@ libintl.la: $(OBJECTS) + $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ $(OBJECTS) \ + -version-info 1:0 -rpath $(libdir) + +-../po/cat-id-tbl.$lo: ../po/cat-id-tbl.c $(top_srcdir)/po/$(PACKAGE).pot +- cd ../po && $(MAKE) cat-id-tbl.$lo ++../po/cat-id-tbl.o: ../po/cat-id-tbl.c $(top_srcdir)/po/$(PACKAGE).pot ++ cd ../po && $(MAKE) cat-id-tbl.o + + check: all + +@@ -151,8 +151,8 @@ uninstall: + info dvi: + + $(OBJECTS): ../config.h libgettext.h +-bindtextdom.$lo finddomain.$lo loadmsgcat.$lo: gettextP.h gettext.h loadinfo.h +-dcgettext.$lo: gettextP.h gettext.h hash-string.h loadinfo.h ++bindtextdom.o finddomain.o loadmsgcat.o: gettextP.h gettext.h loadinfo.h ++dcgettext.o: gettextP.h gettext.h hash-string.h loadinfo.h + + tags: TAGS + diff --git a/audio/soundtracker/patches/patch-po_Makefile_in_in b/audio/soundtracker/patches/patch-po_Makefile_in_in new file mode 100644 index 00000000000..3ad7b7bbc9e --- /dev/null +++ b/audio/soundtracker/patches/patch-po_Makefile_in_in @@ -0,0 +1,58 @@ +$OpenBSD: patch-po_Makefile_in_in,v 1.1.1.1 2002/02/05 18:04:11 espie Exp $ +--- po/Makefile.in.in.orig Sat Feb 17 04:46:32 2001 ++++ po/Makefile.in.in Sun May 20 16:47:27 2001 +@@ -111,9 +111,9 @@ install-data: install-data-@USE_NLS@ + install-data-no: all + install-data-yes: all + if test -r "$(MKINSTALLDIRS)"; then \ +- $(MKINSTALLDIRS) $(datadir); \ ++ $(MKINSTALLDIRS) $(DESTDIR)$(datadir); \ + else \ +- $(SHELL) $(top_srcdir)/mkinstalldirs $(datadir); \ ++ $(SHELL) $(top_srcdir)/mkinstalldirs $(DESTDIR)$(datadir); \ + fi + @catalogs='$(CATALOGS)'; \ + for cat in $$catalogs; do \ +@@ -123,7 +123,7 @@ install-data-yes: all + *) destdir=$(localedir);; \ + esac; \ + lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \ +- dir=$$destdir/$$lang/LC_MESSAGES; \ ++ dir=$(DESTDIR)$$destdir/$$lang/LC_MESSAGES; \ + if test -r "$(MKINSTALLDIRS)"; then \ + $(MKINSTALLDIRS) $$dir; \ + else \ +@@ -153,12 +153,12 @@ install-data-yes: all + done + if test "$(PACKAGE)" = "gettext"; then \ + if test -r "$(MKINSTALLDIRS)"; then \ +- $(MKINSTALLDIRS) $(gettextsrcdir); \ ++ $(MKINSTALLDIRS) $(DESTDIR)$(gettextsrcdir); \ + else \ +- $(SHELL) $(top_srcdir)/mkinstalldirs $(gettextsrcdir); \ ++ $(SHELL) $(top_srcdir)/mkinstalldirs $(DESTDIR)$(gettextsrcdir); \ + fi; \ + $(INSTALL_DATA) $(srcdir)/Makefile.in.in \ +- $(gettextsrcdir)/Makefile.in.in; \ ++ $(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \ + else \ + : ; \ + fi +@@ -171,12 +171,12 @@ uninstall: + for cat in $$catalogs; do \ + cat=`basename $$cat`; \ + lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \ +- rm -f $(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \ +- rm -f $(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \ +- rm -f $(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \ +- rm -f $(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \ ++ rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \ ++ rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \ ++ rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \ ++ rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \ + done +- rm -f $(gettextsrcdir)/po-Makefile.in.in ++ rm -f $(DESTDIR)$(gettextsrcdir)/po-Makefile.in.in + + check: all + diff --git a/audio/soundtracker/pkg/DESCR b/audio/soundtracker/pkg/DESCR new file mode 100644 index 00000000000..147948aeb5a --- /dev/null +++ b/audio/soundtracker/pkg/DESCR @@ -0,0 +1,13 @@ +SoundTracker is a music tracking tool for X11 similar in design to the +DOS program `FastTracker' and the Amiga legend `ProTracker'. + +Packages can be built with additional FLAVORs: + + gnome: SoundTracker built with gnome libraries. This is required + by the graphical volume/panning envelope editors. + + sun: SoundTracker built with our native audio driver. + + esd: SoundTracker built with the esound package. + +WWW: ${HOMEPAGE} diff --git a/audio/soundtracker/pkg/PFRAG.gnome b/audio/soundtracker/pkg/PFRAG.gnome new file mode 100644 index 00000000000..cfda8967d61 --- /dev/null +++ b/audio/soundtracker/pkg/PFRAG.gnome @@ -0,0 +1,2 @@ +@comment $OpenBSD: PFRAG.gnome,v 1.1.1.1 2002/02/05 18:04:10 espie Exp $ +share/gnome/apps/Multimedia/soundtracker.desktop diff --git a/audio/soundtracker/pkg/PLIST b/audio/soundtracker/pkg/PLIST new file mode 100644 index 00000000000..de29de25e53 --- /dev/null +++ b/audio/soundtracker/pkg/PLIST @@ -0,0 +1,19 @@ +@comment $OpenBSD: PLIST,v 1.1.1.1 2002/02/05 18:04:10 espie Exp $ +bin/soundtracker +share/doc/soundtracker/FAQ +share/doc/soundtracker/NEWS +share/doc/soundtracker/README +share/doc/soundtracker/hacking.txt +share/doc/soundtracker/xi.txt +share/doc/soundtracker/xm.txt +share/locale/de/LC_MESSAGES/soundtracker.mo +share/locale/es/LC_MESSAGES/soundtracker.mo +share/locale/fr/LC_MESSAGES/soundtracker.mo +share/locale/gl/LC_MESSAGES/soundtracker.mo +share/locale/it/LC_MESSAGES/soundtracker.mo +share/locale/pl/LC_MESSAGES/soundtracker.mo +share/locale/ja/LC_MESSAGES/soundtracker.mo +share/locale/ru/LC_MESSAGES/soundtracker.mo +share/locale/sl/LC_MESSAGES/soundtracker.mo +%%gnome%% +@dirrm share/doc/soundtracker