diff options
author | hubertf <hubertf@pkgsrc.org> | 1999-09-17 00:48:26 +0000 |
---|---|---|
committer | hubertf <hubertf@pkgsrc.org> | 1999-09-17 00:48:26 +0000 |
commit | 2b984e1ff3f0553fca7f0c37a721fb8fe375ad4e (patch) | |
tree | c0d6de9524b9728615ebf5e23cb24295c7869fce /audio/xamp/patches | |
parent | 9e9a5d0eb078bd6920b76863c2b15f2c81792e5e (diff) | |
download | pkgsrc-2b984e1ff3f0553fca7f0c37a721fb8fe375ad4e.tar.gz |
A version of amp (stands for `Audio Mpeg Player') plus a Qt GUI
Submitted in PR 8424 by Rui-Xiang Guo <rxg@ms25.url.com.tw>
Diffstat (limited to 'audio/xamp/patches')
-rw-r--r-- | audio/xamp/patches/patch-aa | 69 | ||||
-rw-r--r-- | audio/xamp/patches/patch-ab | 55 | ||||
-rw-r--r-- | audio/xamp/patches/patch-ac | 65 | ||||
-rw-r--r-- | audio/xamp/patches/patch-ad | 13 | ||||
-rw-r--r-- | audio/xamp/patches/patch-ae | 32 |
5 files changed, 234 insertions, 0 deletions
diff --git a/audio/xamp/patches/patch-aa b/audio/xamp/patches/patch-aa new file mode 100644 index 00000000000..2e713c03e20 --- /dev/null +++ b/audio/xamp/patches/patch-aa @@ -0,0 +1,69 @@ +$NetBSD: patch-aa,v 1.1.1.1 1999/09/17 00:48:27 hubertf Exp $ + +--- ../audioIO.c.old Sun Oct 26 10:55:27 1997 ++++ ../audioIO.c Sun Oct 26 10:56:03 1997 +@@ -18,7 +18,7 @@ + #include "audioIO_HPUX.c" + #endif + +-#ifdef OS_SunOS ++#if defined(OS_SunOS) || defined(OS_NetBSD) + #include "audioIO_SunOS.c" + #endif + +--- ../audioIO.h.old Sun Oct 26 10:57:10 1997 ++++ ../audioIO.h Fri Oct 31 06:43:07 1997 +@@ -27,3 +27,7 @@ + #ifdef OS_SunOS + #define AUSIZ 4096 + #endif ++ ++#ifdef OS_NetBSD ++ #define AUSIZ 32768 ++#endif +--- ../audioIO_SunOS.c.old Sun Oct 26 10:58:36 1997 ++++ ../audioIO_SunOS.c Sun Oct 26 11:13:51 1997 +@@ -8,7 +8,11 @@ + + #include "amp.h" + #include <sys/types.h> ++#ifndef OS_NetBSD + #include <sys/stropts.h> ++#else ++#include <sys/ioctl.h> ++#endif + #include <fcntl.h> + #include <unistd.h> + #include <stdio.h> +@@ -36,8 +40,7 @@ + } + DB(audio, msg("Audio device opened on %d\n",audio_fd) ); + +- if (ioctl(audio_fd,AUDIO_GETINFO,&auinfo)<0) +- die("Unable to get audio info\n"); ++ AUDIO_INITINFO(&auinfo); + + auinfo.play.precision=16; + auinfo.play.encoding=AUDIO_ENCODING_LINEAR; +--- configure.in.old Sun Oct 26 10:53:03 1997 ++++ configure.in Sun Oct 26 10:54:32 1997 +@@ -58,7 +58,7 @@ + DEFINES="-DOS_$OS_TYPE -DARCH_$ARCH_TYPE" + ;; + +- Linux|FreeBSD) ++ Linux|FreeBSD|NetBSD) + CC="gcc" + if test "$ARCH_TYPE" = "i486" ; then + CFLAGS_ARCH="-m486" +--- configure.old Sun Oct 26 11:18:18 1997 ++++ configure Sun Oct 26 11:18:45 1997 +@@ -1398,7 +1398,7 @@ + DEFINES="-DOS_$OS_TYPE -DARCH_$ARCH_TYPE" + ;; + +- Linux|FreeBSD) ++ Linux|FreeBSD|NetBSD) + CC="gcc" + if test "$ARCH_TYPE" = "i486" ; then + CFLAGS_ARCH="-m486" diff --git a/audio/xamp/patches/patch-ab b/audio/xamp/patches/patch-ab new file mode 100644 index 00000000000..150e047cb83 --- /dev/null +++ b/audio/xamp/patches/patch-ab @@ -0,0 +1,55 @@ +$NetBSD: patch-ab,v 1.1.1.1 1999/09/17 00:48:27 hubertf Exp $ + +*** ../guicontrol.c~ Sat Aug 23 07:30:51 1997 +--- ../guicontrol.c Thu Mar 5 21:31:06 1998 +*************** +*** 312,317 **** +--- 312,325 ---- + if (quit_flag) + { + /* fprintf(stderr, "quit_flag is true\n"); */ ++ ++ if((flags = fcntl(STDOUT_FILENO, F_GETFL, 0)) < 0) ++ perror("fcntl"); ++ flags &= ~O_NONBLOCK; ++ ++ if(fcntl(STDOUT_FILENO, F_SETFL, flags) < 0) ++ perror("fcntl"); ++ + exit(0); + } + while(GUI_FD_TO_PLAY != -1) +*************** +*** 334,340 **** + + if((flags = fcntl(STDIN_FILENO, F_GETFL, 0)) < 0) + perror("fcntl"); +! flags ^= O_NONBLOCK; + + if(fcntl(STDIN_FILENO, F_SETFL, flags) < 0) + perror("fcntl"); +--- 342,348 ---- + + if((flags = fcntl(STDIN_FILENO, F_GETFL, 0)) < 0) + perror("fcntl"); +! flags &= ~O_NONBLOCK; + + if(fcntl(STDIN_FILENO, F_SETFL, flags) < 0) + perror("fcntl"); +*************** +*** 394,400 **** + /* Set stdin to blocking */ + if((flags = fcntl(STDIN_FILENO, F_GETFL, 0)) < 0) + perror("fcntl"); +! flags ^= O_NONBLOCK; + if(fcntl(STDIN_FILENO, F_SETFL, flags) < 0) + perror("fcntl"); + } +--- 402,408 ---- + /* Set stdin to blocking */ + if((flags = fcntl(STDIN_FILENO, F_GETFL, 0)) < 0) + perror("fcntl"); +! flags &= ~O_NONBLOCK; + if(fcntl(STDIN_FILENO, F_SETFL, flags) < 0) + perror("fcntl"); + } diff --git a/audio/xamp/patches/patch-ac b/audio/xamp/patches/patch-ac new file mode 100644 index 00000000000..11899cb6691 --- /dev/null +++ b/audio/xamp/patches/patch-ac @@ -0,0 +1,65 @@ +$NetBSD: patch-ac,v 1.1.1.1 1999/09/17 00:48:27 hubertf Exp $ + +--- QtAMP.cpp Wed Feb 11 17:53:35 1998 ++++ QtAMP.cpp Wed Jul 29 22:21:08 1998 +@@ -24,10 +24,9 @@ + + #include <sys/types.h> + #include <sys/stat.h> +-#include <sched.h> + #include <sys/socket.h> + #include <sys/ioctl.h> +-#include <sys/soundcard.h> ++#include <soundcard.h> + #include <sys/time.h> + #include <sys/resource.h> + #include <errno.h> +@@ -84,11 +84,11 @@ + splash->show(); + + // init mixer +-#ifdef OS_Linux ++#if defined(OS_Linux) || defined(OS_NetBSD) + if ((mixer = open("/dev/mixer", O_RDWR)) < 0) + die("Error opening /dev/mixer, exiting\n"); + ioctl(mixer, SOUND_MIXER_READ_PCM, &v); +-#endif OS_Linux ++#endif + + /* where mine resource file is located */ + char home[500]; +@@ -262,7 +262,7 @@ + + QtAMP::~QtAMP() + { +-#ifdef OS_Linux ++#if defined(OS_Linux) || defined(OS_NetBSD) + close(mixer); + #endif + real_quit(); +@@ -348,7 +348,7 @@ + sprintf(volum,"Volume: %d",vr); + playLabel->setText( volum ); + // printf("%d %d\n",tvr,tv); +-#ifdef OS_Linux ++#if defined(OS_Linux) || defined(OS_NetBSD) + int x = (tv*256 + tvl); + ioctl(mixer, SOUND_MIXER_WRITE_PCM, &x); + #endif +@@ -884,14 +884,14 @@ + { + if (mute == 1) + { +-#ifdef OS_Linux ++#if defined(OS_Linux) || defined(OS_NetBSD) + int x = (tv*256 + tvl); + ioctl(mixer, SOUND_MIXER_WRITE_PCM, &x); + #endif + } + if (mute == 0) + { +-#ifdef OS_Linux ++#if defined(OS_Linux) || defined(OS_NetBSD) + int x = (7*256 + 7); + ioctl(mixer, SOUND_MIXER_WRITE_PCM, &x); + #endif diff --git a/audio/xamp/patches/patch-ad b/audio/xamp/patches/patch-ad new file mode 100644 index 00000000000..c3ca0bbda43 --- /dev/null +++ b/audio/xamp/patches/patch-ad @@ -0,0 +1,13 @@ +$NetBSD: patch-ad,v 1.1.1.1 1999/09/17 00:48:27 hubertf Exp $ + +--- plDlg.cpp Wed Feb 11 07:01:12 1998 ++++ plDlg.cpp Wed Jul 29 23:59:01 1998 +@@ -87,6 +87,8 @@ + void plDlg::id3_clicked() + { + strcpy(ime,listEditor->text(listEditor->currentItem())); ++ if(!ime[0]) //to prevent from seg-fault on id3 editor at empty playlist ++ return; + id3Dialog = new id3(); + id3Dialog->show(); + } diff --git a/audio/xamp/patches/patch-ae b/audio/xamp/patches/patch-ae new file mode 100644 index 00000000000..27262eeb13c --- /dev/null +++ b/audio/xamp/patches/patch-ae @@ -0,0 +1,32 @@ +$NetBSD: patch-ae,v 1.1.1.1 1999/09/17 00:48:27 hubertf Exp $ + +--- Makefile.in.orig Wed Feb 11 06:37:20 1998 ++++ Makefile.in Fri Sep 17 02:30:10 1999 +@@ -14,7 +14,8 @@ + DEFINES = -DOS_@OS_TYPE@ -DARCH_@ARCH_TYPE@ + CFLAGS = @CFLAGS@ ${DEFINES} ${DEBUG} ${BACK} + LDFLAGS = @LDFLAGS@ +-INSTALL= @INSTALL@ ++INSTALL= @INSTALL@ -s ++DESTDIR= ${PREFIX}/bin + + # + # uncomment both of these if you want profiling support +@@ -37,7 +38,7 @@ + id3.o id3Data.o QLayer.o mid3.o mid3Data.o pixmaps/pixmaps.o \ + backs/backs.o + +-LIBS = @QT_LDFLAGS@ -lm -lqt ++LIBS = @QT_LDFLAGS@ -lm -lqt -Wl,-rpath,$(X11BASE)/lib -lX11 -lXext + + all: xamp + +@@ -59,7 +60,7 @@ + cd pixmaps ; make + + xamp: images $(OBJ) +- $(CC) -o xamp $(OBJ) $(LDFLAGS) $(LIBS) ++ $(CXX) -o xamp $(OBJ) $(LDFLAGS) $(LIBS) -lossaudio + + install: + $(INSTALL) -m 755 xamp $(DESTDIR) |