diff options
-rw-r--r-- | audio/cmp3/Makefile | 27 | ||||
-rw-r--r-- | audio/cmp3/files/md5 | 3 | ||||
-rw-r--r-- | audio/cmp3/files/patch-sum | 6 | ||||
-rw-r--r-- | audio/cmp3/patches/patch-aa | 55 | ||||
-rw-r--r-- | audio/cmp3/patches/patch-ab | 18 | ||||
-rw-r--r-- | audio/cmp3/patches/patch-ac | 152 | ||||
-rw-r--r-- | audio/cmp3/patches/patch-ad | 24 | ||||
-rw-r--r-- | audio/cmp3/pkg/COMMENT | 1 | ||||
-rw-r--r-- | audio/cmp3/pkg/DESCR | 3 | ||||
-rw-r--r-- | audio/cmp3/pkg/PLIST | 6 |
10 files changed, 295 insertions, 0 deletions
diff --git a/audio/cmp3/Makefile b/audio/cmp3/Makefile new file mode 100644 index 00000000000..b13f62479a1 --- /dev/null +++ b/audio/cmp3/Makefile @@ -0,0 +1,27 @@ +# $NetBSD: Makefile,v 1.1.1.1 2001/02/10 14:18:35 hubertf Exp $ +# FreeBSD: ports/audio/cmp3/Makefile,v 1.13 2001/02/04 21:12:44 olgeni Exp +# + +DISTNAME= cmp3-2.0pre5 +PKGNAME= cmp3-2.0.p5 +CATEGORIES= audio +MASTER_SITES= http://www.personal.psu.edu/users/n/k/nkk104/cmp3/ + +MAINTAINER= rxg@ms25.url.com.tw +HOMEPAGE= http://www.personal.psu.edu/nkk104/cmp3/ + +DEPENDS+= mpg123-*:../../audio/mpg123 + +WRKSRC= ${WRKDIR}/cmp3 + +USE_GMAKE= yes +NEED_NCURSES= YES + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/cmp3 ${PREFIX}/bin + ${INSTALL_PROGRAM} ${WRKSRC}/rnmp3 ${PREFIX}/bin + @${MKDIR} ${PREFIX}/share/doc/cmp3 + ${INSTALL_DATA} ${WRKSRC}/README ${PREFIX}/share/doc/cmp3 + ${INSTALL_DATA} ${WRKSRC}/cmp3rc ${PREFIX}/share/doc/cmp3/sample.cmp3rc + +.include "../../mk/bsd.pkg.mk" diff --git a/audio/cmp3/files/md5 b/audio/cmp3/files/md5 new file mode 100644 index 00000000000..d0cb4524b88 --- /dev/null +++ b/audio/cmp3/files/md5 @@ -0,0 +1,3 @@ +$NetBSD: md5,v 1.1.1.1 2001/02/10 14:18:35 hubertf Exp $ + +MD5 (cmp3-2.0pre5.tar.gz) = 830b2bcf3c7d7daba67bf8752ddb102b diff --git a/audio/cmp3/files/patch-sum b/audio/cmp3/files/patch-sum new file mode 100644 index 00000000000..f4adfbe8264 --- /dev/null +++ b/audio/cmp3/files/patch-sum @@ -0,0 +1,6 @@ +$NetBSD: patch-sum,v 1.1.1.1 2001/02/10 14:18:35 hubertf Exp $ + +MD5 (patch-aa) = 2a8c2a438333dafcd04213d1fad44f8a +MD5 (patch-ab) = bdb69ad5e98597b2057124277b1ecabc +MD5 (patch-ac) = 593f6a4a7d829977f1c70e7a80754bab +MD5 (patch-ad) = ee5e5025e13191ec77f7749f322b17bc diff --git a/audio/cmp3/patches/patch-aa b/audio/cmp3/patches/patch-aa new file mode 100644 index 00000000000..e0719420347 --- /dev/null +++ b/audio/cmp3/patches/patch-aa @@ -0,0 +1,55 @@ +$NetBSD: patch-aa,v 1.1.1.1 2001/02/10 14:18:35 hubertf Exp $ + +--- Makefile.orig Fri Mar 17 09:35:33 2000 ++++ Makefile Fri Feb 9 23:21:25 2001 +@@ -2,23 +2,23 @@ + # Set these variables + # + # initial_directory is now set in the config file +-mpg123_location := "mpg123" +-install_directory := "$(HOME)/bin" ++mpg123_location := "$(LOCALBASE)/bin/mpg123" ++install_directory := "$(PREFIX)/bin" + + # + # Location of config file - Please edit this file before installing + # +-config_file := "$(HOME)/.cmp3rc" ++#config_file := "$(HOME)/.cmp3rc" + + # + # Uncomment and set if desired + # + + ## An ass repository is a nice thing to have. See README +-ass_repository := "$(HOME)/.cmp3ass" ++#ass_repository := "$(HOME)/.cmp3ass" + + ## Define this for bufferring or add other parameters to mpg123 +-mpg123_params := -b 320 ++#mpg123_params := -b 320 + + # You need debugging info? Uncomment this and check /tmp/cmp3log + #debugging := 1 +@@ -37,9 +37,9 @@ + # Something for me and my cd changer, you definately don't want it as it + # stands. Change the code to do something else you want it to do... + #PARAMS +=-DMY_CD +-LIBS= -lform -lncurses +-CFLAGS= -g -O -Inevlib +-CC= gcc ++LIBS= -lform -lncurses -L$(LOCALBASE)/lib -Wl,-R$(LOCALBASE)/lib ++CFLAGS+= -Inevlib -I$(LOCALBASE)/include ++CC?= gcc + OBJS= cmp3common.o cmp3fileio.o cmp3manager.o cmp3curses.o \ + cmp3llist.o cmp3main.o cmp3listfiles.o cmp3playlist.o cmp3volume.o \ + cmp3general.o cmp3id3.o +@@ -78,7 +78,7 @@ + $(CC) $(CFLAGS) $(OBJS) nevlib/libnev.a $(LIBS) -o cmp3 + + lib: +- @$(MAKE) -C nevlib lib ++ @$(MAKE) CC="$(CC)" CFLAGS="$(CFLAGS)" -C nevlib lib + + cleanlib: + @$(MAKE) -C nevlib clean diff --git a/audio/cmp3/patches/patch-ab b/audio/cmp3/patches/patch-ab new file mode 100644 index 00000000000..2c40b12ffad --- /dev/null +++ b/audio/cmp3/patches/patch-ab @@ -0,0 +1,18 @@ +$NetBSD: patch-ab,v 1.1.1.1 2001/02/10 14:18:35 hubertf Exp $ + +--- cmp3.h.orig Fri Mar 17 09:14:10 2000 ++++ cmp3.h Fri Feb 9 23:26:16 2001 +@@ -1,7 +1,12 @@ + #ifndef _CMP3_H + #define _CMP3_H + +-#include<curses.h> ++#if defined(__FreeBSD__) || defined(__NetBSD__) ++#include <ncurses.h> ++#include <termios.h> ++#else ++#include <curses.h> ++#endif + + #ifndef NCURSES_VERSION + #error "This program requires ncurses to function" diff --git a/audio/cmp3/patches/patch-ac b/audio/cmp3/patches/patch-ac new file mode 100644 index 00000000000..5f5c0ae0b99 --- /dev/null +++ b/audio/cmp3/patches/patch-ac @@ -0,0 +1,152 @@ +$NetBSD: patch-ac,v 1.1.1.1 2001/02/10 14:18:35 hubertf Exp $ + +--- cmp3volume.c.orig Fri Feb 9 15:54:18 2001 ++++ cmp3volume.c Fri Feb 9 23:45:24 2001 +@@ -3,7 +3,11 @@ + */ + + #include "cmp3funcs.h" +-#include<sys/soundcard.h> ++#if defined(__NetBSD__) ++#include <sys/audioio.h> ++#else ++#include <sys/soundcard.h> ++#endif + + static int mixernum, /* ID number for the mixer */ + vol; /* Current volume level */ +@@ -12,6 +16,63 @@ + * Initialize volume control + * Returns: nothing + ****************************************************************************/ ++#if defined(__NetBSD__) ++ ++int device_id; ++mixer_ctrl_t *m, *values; ++ ++extern void initvol() ++{ ++ int i, ndev; ++ char *mixer_device; ++ mixer_devinfo_t dinfo, *infos; ++ ++ mixer_device = getenv("MIXERDEVICE"); ++ if (mixer_device == NULL) ++ mixer_device = "/dev/mixer0"; ++ ++ if ((mixernum=open(mixer_device, O_RDWR)) < 0) { ++ fprintf(stderr, "open mixer device: %s", strerror(errno)); ++ enditall(SIGSEGV); ++ } ++ ++ for (ndev = 0; ; ndev++) { ++ dinfo.index = ndev; ++ if (ioctl(mixernum, AUDIO_MIXER_DEVINFO, &dinfo) < 0) ++ break; ++ } ++ infos = calloc(ndev, sizeof *infos); ++ values = calloc(ndev, sizeof *values); ++ ++ for (i = 0; i < ndev; i++) { ++ infos[i].index = i; ++ ioctl(mixernum, AUDIO_MIXER_DEVINFO, &infos[i]); ++ } ++ ++ for (i = 0; i < ndev; i++) { ++ if (infos[i].type == AUDIO_MIXER_VALUE) { ++ values[i].dev = i; ++ values[i].type = infos[i].type; ++ } ++ if (strcmp(infos[i].label.name, AudioNdac) == 0) { ++ device_id = i; ++ break; ++ } ++ } ++ ++ values[device_id].un.value.num_channels = 2; ++ ++ m = &values[device_id]; ++ ioctl(mixernum, AUDIO_MIXER_READ, m); ++ vol = m->un.value.level[0] * 100 / AUDIO_MAX_GAIN; ++ mvprintw(3,COLS/2-1,"-"); ++ mvprintw(LINES-7,COLS/2-1,"-"); ++ mvprintw((LINES-8)-(vol*(LINES-12)/100),COLS/2-1,"*"); ++ return; ++} ++ ++#else ++ + extern void initvol() + { + if ((mixernum=open("/dev/mixer", O_RDWR)) < 0) { +@@ -26,6 +87,8 @@ + return; + } + ++#endif ++ + extern void endvol() + { + close(mixernum); +@@ -57,6 +120,23 @@ + * Although I hate users in general, we should probably do it. + * Returns: nothing + ****************************************************************************/ ++#if defined(__NetBSD__) ++ ++extern void volup() ++{ ++ mvprintw((LINES-8)-(vol*(LINES-12)/100),COLS/2-1," "); ++ vol += 3; ++ if (vol > 100) ++ vol = 100; ++ m = &values[device_id]; ++ ioctl(mixernum, AUDIO_MIXER_WRITE, m); ++ m->un.value.level[0] = m->un.value.level[1] = vol * AUDIO_MAX_GAIN / 100; ++ mvprintw((LINES-8)-(vol*(LINES-12)/100), COLS/2-1, "*"); ++ return; ++} ++ ++#else ++ + extern void volup() + { + int i; +@@ -71,10 +151,29 @@ + return; + } + ++#endif ++ + /**************************************************************************** + * It's too loud junior, turn it down! + * Returns: nothing + ****************************************************************************/ ++#if defined(__NetBSD__) ++ ++extern void voldown() ++{ ++ mvprintw((LINES-8)-(vol*(LINES-12)/100),COLS/2-1," "); ++ vol -= 3; ++ if (vol < 0) ++ vol = 0; ++ m = &values[device_id]; ++ ioctl(mixernum, AUDIO_MIXER_WRITE, m); ++ m->un.value.level[0] = m->un.value.level[1] = vol * AUDIO_MAX_GAIN / 100; ++ mvprintw((LINES-8)-(vol*(LINES-12)/100), COLS/2-1, "*"); ++ return; ++} ++ ++#else ++ + extern void voldown() + { + int i; +@@ -89,4 +188,6 @@ + return; + } + ++#endif ++ + /* EOF */ +\ No newline at end of file diff --git a/audio/cmp3/patches/patch-ad b/audio/cmp3/patches/patch-ad new file mode 100644 index 00000000000..ff143ea9107 --- /dev/null +++ b/audio/cmp3/patches/patch-ad @@ -0,0 +1,24 @@ +$NetBSD: patch-ad,v 1.1.1.1 2001/02/10 14:18:35 hubertf Exp $ + +--- cmp3main.c.orig Fri Mar 17 08:40:00 2000 ++++ cmp3main.c Fri Jan 12 02:16:41 2001 +@@ -33,13 +33,18 @@ + int lastleftline = 0; + int lastrightline = 0; + char *init_dir = NULL; ++ char *home_dir = NULL; ++ char cmp3_config[4096]; + + if (argc > 1) + docmdline(argc, argv); + shm_init(); + + cmp3rc = ini_create(); +- if (ini_load(cmp3rc, CMP3_CONFIG) == INI_FAIL) ++ home_dir = getenv("HOME"); ++ strcpy (cmp3_config, home_dir); ++ strcat (cmp3_config, "/.cmp3rc"); ++ if (ini_load(cmp3rc, cmp3_config) == INI_FAIL) + { + ini_destroy(cmp3rc); + cmp3rc = NULL; diff --git a/audio/cmp3/pkg/COMMENT b/audio/cmp3/pkg/COMMENT new file mode 100644 index 00000000000..5e67e458678 --- /dev/null +++ b/audio/cmp3/pkg/COMMENT @@ -0,0 +1 @@ +ncurses based frontend to mpg123 diff --git a/audio/cmp3/pkg/DESCR b/audio/cmp3/pkg/DESCR new file mode 100644 index 00000000000..831cfd73cb9 --- /dev/null +++ b/audio/cmp3/pkg/DESCR @@ -0,0 +1,3 @@ +A simple yet featureful ncurses frontend to mpg123. Includes +playlist support, volume control and tools to help with file +management. diff --git a/audio/cmp3/pkg/PLIST b/audio/cmp3/pkg/PLIST new file mode 100644 index 00000000000..9ac496b47e3 --- /dev/null +++ b/audio/cmp3/pkg/PLIST @@ -0,0 +1,6 @@ +@comment $NetBSD: PLIST,v 1.1.1.1 2001/02/10 14:18:35 hubertf Exp $ +bin/cmp3 +bin/rnmp3 +share/doc/cmp3/README +share/doc/cmp3/sample.cmp3rc +@dirrm share/doc/cmp3 |