From 0b4744352e9fd530584deeb030562ae45700e71c Mon Sep 17 00:00:00 2001 From: hubertf Date: Fri, 17 Sep 1999 00:48:26 +0000 Subject: A version of amp (stands for `Audio Mpeg Player') plus a Qt GUI Submitted in PR 8424 by Rui-Xiang Guo --- audio/xamp/Makefile | 26 +++++++++++++++++ audio/xamp/files/md5 | 3 ++ audio/xamp/patches/patch-aa | 69 +++++++++++++++++++++++++++++++++++++++++++++ audio/xamp/patches/patch-ab | 55 ++++++++++++++++++++++++++++++++++++ audio/xamp/patches/patch-ac | 65 ++++++++++++++++++++++++++++++++++++++++++ audio/xamp/patches/patch-ad | 13 +++++++++ audio/xamp/patches/patch-ae | 32 +++++++++++++++++++++ audio/xamp/pkg/COMMENT | 1 + audio/xamp/pkg/DESCR | 11 ++++++++ audio/xamp/pkg/PLIST | 3 ++ 10 files changed, 278 insertions(+) create mode 100644 audio/xamp/Makefile create mode 100644 audio/xamp/files/md5 create mode 100644 audio/xamp/patches/patch-aa create mode 100644 audio/xamp/patches/patch-ab create mode 100644 audio/xamp/patches/patch-ac create mode 100644 audio/xamp/patches/patch-ad create mode 100644 audio/xamp/patches/patch-ae create mode 100644 audio/xamp/pkg/COMMENT create mode 100644 audio/xamp/pkg/DESCR create mode 100644 audio/xamp/pkg/PLIST (limited to 'audio') diff --git a/audio/xamp/Makefile b/audio/xamp/Makefile new file mode 100644 index 00000000000..a97f89b1313 --- /dev/null +++ b/audio/xamp/Makefile @@ -0,0 +1,26 @@ +# $NetBSD: Makefile,v 1.1.1.1 1999/09/17 00:48:26 hubertf Exp $ +# FreeBSD: ports/audio/xamp/Makefile,v 1.5 1999/08/25 04:36:22 obrien Exp +# + +DISTNAME= xamp-0.8-7 +PKGNAME= xamp-0.8.7 +CATEGORIES= audio +MASTER_SITES= ftp://ftp.simcb.ru/pub/unix/x11/ +EXTRACT_SUFX= .tgz + +MAINTAINER= rxg@ms25.url.com.tw +HOMEPAGE= http://edu.lahti.fi/xamp/ + +DEPENDS+= qt-1.44:../../x11/qt + +WRKSRC= ${WRKDIR}/xamp-0.8/xamp-0.8 +GNU_CONFIGURE= yes +CONFIGURE_ENV= CXXFLAGS="${CFLAGS}" +USE_GMAKE= yes +USE_X11BASE= yes + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/xamp ${PREFIX}/bin + ${INSTALL_MAN} ${WRKSRC}/xamp.1 ${PREFIX}/man/man1 + +.include "../../mk/bsd.pkg.mk" diff --git a/audio/xamp/files/md5 b/audio/xamp/files/md5 new file mode 100644 index 00000000000..dda2559c842 --- /dev/null +++ b/audio/xamp/files/md5 @@ -0,0 +1,3 @@ +$NetBSD: md5,v 1.1.1.1 1999/09/17 00:48:26 hubertf Exp $ + +MD5 (xamp-0.8-7.tgz) = 96cb75347f7ae69390f9d30161b25b97 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 ++#ifndef OS_NetBSD + #include ++#else ++#include ++#endif + #include + #include + #include +@@ -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 + #include +-#include + #include + #include +-#include ++#include + #include + #include + #include +@@ -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) diff --git a/audio/xamp/pkg/COMMENT b/audio/xamp/pkg/COMMENT new file mode 100644 index 00000000000..165544219be --- /dev/null +++ b/audio/xamp/pkg/COMMENT @@ -0,0 +1 @@ +A version of amp (stands for `Audio Mpeg Player') plus a Qt GUI diff --git a/audio/xamp/pkg/DESCR b/audio/xamp/pkg/DESCR new file mode 100644 index 00000000000..bd252c389b8 --- /dev/null +++ b/audio/xamp/pkg/DESCR @@ -0,0 +1,11 @@ +Xamp is a version of amp with graphical interface provided by +qt toolkit. It comes with the amp-0.7.6 as the core player, as +well as two album management tools: Playlist Editor and ID3 Tag +Editor, and is able to change the background on the fly. + +Although it's not as nifty as x11amp is, hopefully it takes less +CPU time and doesn't require OSS sound driver to run. + +The program pretty much speaks for itself. You may consult the +man page or the document in the "About Xamp" panel for more +detail. diff --git a/audio/xamp/pkg/PLIST b/audio/xamp/pkg/PLIST new file mode 100644 index 00000000000..e3d1dbfbf07 --- /dev/null +++ b/audio/xamp/pkg/PLIST @@ -0,0 +1,3 @@ +@comment $NetBSD: PLIST,v 1.1.1.1 1999/09/17 00:48:28 hubertf Exp $ +bin/xamp +man/man1/xamp.1.gz -- cgit v1.2.3