Update to 2.0.4, add XMMS plugin.
This commit is contained in:
parent
95ca16834a
commit
2fdd5bce32
@ -1,30 +1,63 @@
|
||||
# $OpenBSD: Makefile,v 1.18 2003/04/27 19:38:16 margarida Exp $
|
||||
# $OpenBSD: Makefile,v 1.19 2003/05/18 07:40:55 naddy Exp $
|
||||
|
||||
COMMENT= "extended Module Player; many formats plus an X11 display"
|
||||
DISTNAME= xmp-1.1.5
|
||||
COMMENT= "extended module player"
|
||||
COMMENT-xmms= "extended module player plugin for XMMS"
|
||||
DISTNAME= xmp-2.0.4
|
||||
PKGNAME-xmms= xmms-${DISTNAME}
|
||||
CATEGORIES= audio
|
||||
|
||||
HOMEPAGE= http://xmp.sourceforge.net/
|
||||
|
||||
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=xmp/}
|
||||
|
||||
# GPL
|
||||
PERMIT_PACKAGE_CDROM= Yes
|
||||
PERMIT_PACKAGE_FTP= Yes
|
||||
PERMIT_DISTFILES_CDROM= Yes
|
||||
PERMIT_DISTFILES_FTP= Yes
|
||||
|
||||
PATCH_DIST_STRIP= -p1
|
||||
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=xmp/}
|
||||
|
||||
PSEUDO_FLAVORS= no_xmms
|
||||
.if ${MACHINE_ARCH} == "hppa" || ${MACHINE_ARCH} == "vax"
|
||||
FLAVOR?= no_xmms
|
||||
.else
|
||||
FLAVOR?=
|
||||
.endif
|
||||
|
||||
MULTI_PACKAGES=
|
||||
.if !{FLAVOR:L:Mno_xmms}
|
||||
MULTI_PACKAGES+= -xmms
|
||||
.endif
|
||||
SUBPACKAGE?=
|
||||
|
||||
LIB_DEPENDS= esd.2::audio/esound
|
||||
.if ${MULTI_PACKAGES:M-xmms}
|
||||
LIB_DEPENDS+= xmms.3::audio/xmms
|
||||
.else
|
||||
CONFIGURE_ARGS+= --disable-xmms
|
||||
.endif
|
||||
|
||||
USE_X11= Yes
|
||||
USE_GMAKE= Yes
|
||||
|
||||
CONFIGURE_STYLE=gnu
|
||||
MODGNU_CONFIG_GUESS_DIRS= ${WRKSRC}/scripts
|
||||
USE_GMAKE= Yes
|
||||
USE_X11= Yes
|
||||
CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
|
||||
LDFLAGS="-L${LOCALBASE}/lib"
|
||||
|
||||
do-install:
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/src/main/xmp ${PREFIX}/bin
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/src/main/xxmp ${PREFIX}/bin
|
||||
${INSTALL_MAN} ${WRKSRC}/docs/xmp.1 ${PREFIX}/man/man1
|
||||
@ln -sf xmp.1 ${PREFIX}/man/man1/xxmp.1
|
||||
FAKE_FLAGS= DEST_DIR=${WRKINST} \
|
||||
SYSCONF_DIR=${PREFIX}/share/examples/xmp
|
||||
|
||||
pre-install:
|
||||
@${INSTALL_DATA_DIR} ${PREFIX}/share/examples/xmp \
|
||||
${PREFIX}/lib/xmms/Input
|
||||
|
||||
.if defined(PACKAGING)
|
||||
. if ${SUBPACKAGE} == "-xmms"
|
||||
LIB_DEPENDS=
|
||||
RUN_DEPENDS= ::audio/xmms
|
||||
. else
|
||||
LIB_DEPENDS= esd.2::audio/esound
|
||||
. endif
|
||||
.endif
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
@ -1,3 +1,3 @@
|
||||
MD5 (xmp-1.1.5.tar.gz) = 73c6500ffc3e05a666d1a7c17f5f5f81
|
||||
RMD160 (xmp-1.1.5.tar.gz) = 7a934e0a270d61bc2c853db2ed67d8ec44ee370e
|
||||
SHA1 (xmp-1.1.5.tar.gz) = 549f36c4db2ca106ebc2faa86edc1fb765b108d8
|
||||
MD5 (xmp-2.0.4.tar.gz) = 281e979eb5fb64e8fd0b7afd052c6191
|
||||
RMD160 (xmp-2.0.4.tar.gz) = 50f61514c8fd212a0c2575fbadb90c0207accce6
|
||||
SHA1 (xmp-2.0.4.tar.gz) = 102efeadd3dd976acd2ab40dd80ff9bdc22bfba0
|
||||
|
11
audio/xmp/patches/patch-Makefile_rules_in
Normal file
11
audio/xmp/patches/patch-Makefile_rules_in
Normal file
@ -0,0 +1,11 @@
|
||||
$OpenBSD: patch-Makefile_rules_in,v 1.1 2003/05/18 07:40:55 naddy Exp $
|
||||
--- Makefile.rules.in.orig Fri May 16 23:21:04 2003
|
||||
+++ Makefile.rules.in Fri May 16 23:21:18 2003
|
||||
@@ -10,6 +10,7 @@ exec_prefix= $(DEST_DIR)@prefix@
|
||||
BIN_DIR = @bindir@
|
||||
LIB_DIR = @libdir@
|
||||
MAN_DIR = @mandir@/man1
|
||||
+SYSCONF_DIR = @sysconfdir@
|
||||
|
||||
CC = @CC@
|
||||
CFLAGS = -c @CFLAGS@ @DEFS@ @CINCS@
|
@ -1,17 +1,13 @@
|
||||
$OpenBSD: patch-configure,v 1.1 2001/04/05 19:31:42 espie Exp $
|
||||
--- configure.orig Wed May 20 20:43:13 1998
|
||||
+++ configure Thu Apr 5 20:52:58 2001
|
||||
@@ -1317,6 +1317,13 @@ EOF
|
||||
#define DRIVER_SUNOS 1
|
||||
EOF
|
||||
$OpenBSD: patch-configure,v 1.2 2003/05/18 07:40:55 naddy Exp $
|
||||
--- configure.orig Fri May 16 22:41:43 2003
|
||||
+++ configure Fri May 16 22:42:21 2003
|
||||
@@ -593,9 +593,6 @@ CINCS="${CPPFLAGS}"
|
||||
PLUGIN=""
|
||||
|
||||
|
||||
-LDFLAGS=""
|
||||
-
|
||||
-
|
||||
X_XMP="xxmp"
|
||||
|
||||
+ ;;
|
||||
+ openbsd*)
|
||||
+ DRIVERS="${DRIVERS} solaris.o"
|
||||
+ cat >> confdefs.h <<\EOF
|
||||
+#define DRIVER_SOLARIS 1
|
||||
+EOF
|
||||
+ ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
|
20
audio/xmp/patches/patch-etc_Makefile
Normal file
20
audio/xmp/patches/patch-etc_Makefile
Normal file
@ -0,0 +1,20 @@
|
||||
$OpenBSD: patch-etc_Makefile,v 1.1 2003/05/18 07:40:55 naddy Exp $
|
||||
--- etc/Makefile.orig Fri Dec 29 11:06:28 2000
|
||||
+++ etc/Makefile Sat May 17 01:27:10 2003
|
||||
@@ -14,11 +14,11 @@ include ../Makefile.rules
|
||||
|
||||
install::
|
||||
@echo Installing xmp.conf and xmp-modules.conf in $(DEST_DIR)...
|
||||
- @if [ -f $(DEST_DIR)/etc/xmp.conf ]; then \
|
||||
- mv -f $(DEST_DIR)/etc/xmp.conf $(DEST_DIR)/etc/xmp.conf.old; \
|
||||
+ @if [ -f $(DEST_DIR)/$(SYSCONF_DIR)/xmp.conf ]; then \
|
||||
+ mv -f $(DEST_DIR)/$(SYSCONF_DIR)/xmp.conf $(DEST_DIR)/$(SYSCONF_DIR)/xmp.conf.old; \
|
||||
fi
|
||||
- @if [ -f $(DEST_DIR)/etc/xmp-modules.conf ]; then \
|
||||
- mv -f $(DEST_DIR)/etc/xmp-modules.conf $(DEST_DIR)/etc/xmp-modules.conf.old; \
|
||||
+ @if [ -f $(DEST_DIR)/$(SYSCONF_DIR)/xmp-modules.conf ]; then \
|
||||
+ mv -f $(DEST_DIR)/$(SYSCONF_DIR)/xmp-modules.conf $(DEST_DIR)/$(SYSCONF_DIR)/xmp-modules.conf.old; \
|
||||
fi
|
||||
- $(INSTALL) -m644 xmp.conf xmp-modules.conf $(DEST_DIR)/etc
|
||||
+ $(INSTALL) -m644 xmp.conf xmp-modules.conf $(DEST_DIR)/$(SYSCONF_DIR)
|
||||
|
@ -1,51 +0,0 @@
|
||||
$OpenBSD: patch-src_api_load_c,v 1.1 2001/04/05 19:31:42 espie Exp $
|
||||
--- src/api/load.c.orig Thu Apr 5 20:54:02 2001
|
||||
+++ src/api/load.c Thu Apr 5 20:59:30 2001
|
||||
@@ -14,6 +14,8 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
+#include <sys/types.h>
|
||||
+#include <sys/stat.h>
|
||||
#include "xmpi.h"
|
||||
#include "xxm.h"
|
||||
|
||||
@@ -26,7 +28,8 @@ extern struct xmp_fmt_info *__fmt_head;
|
||||
extern struct xmp_ord_info xmpi_oinfo[256];
|
||||
extern int __pause;
|
||||
|
||||
-static char *temp;
|
||||
+static char tmplate[] = "/tmp/xmp.XXXXXXXXXX";
|
||||
+static char temp[50];
|
||||
|
||||
|
||||
static int decompress (char **mod, char *suffix, char *decomp)
|
||||
@@ -56,8 +59,14 @@ int xmp_load_module (char *s)
|
||||
FILE *f;
|
||||
int i, t;
|
||||
struct xmp_fmt_info *fmt;
|
||||
-
|
||||
- temp = tempnam (NULL, "xmp_");
|
||||
+ int fd;
|
||||
+ struct stat buf;
|
||||
+
|
||||
+ strcpy(temp, tmplate);
|
||||
+ fd = mkstemp(temp);
|
||||
+ if (fd == -1)
|
||||
+ return -3;
|
||||
+ close(fd);
|
||||
|
||||
if ((decompress (&s, ".gz", "gzip -dc") *
|
||||
decompress (&s, ".Z", "uncompress -c") *
|
||||
@@ -71,6 +80,11 @@ int xmp_load_module (char *s)
|
||||
if ((f = fopen (s, "r")) == NULL)
|
||||
return -3;
|
||||
|
||||
+ if (fstat(fileno(f), &buf) == -1 || buf.st_size == 0) {
|
||||
+ fclose(f);
|
||||
+ return -3;
|
||||
+ }
|
||||
+
|
||||
drv->clearmem ();
|
||||
|
||||
opt.filename = s; /* For ALM */
|
42
audio/xmp/patches/patch-src_drivers_openbsd_c
Normal file
42
audio/xmp/patches/patch-src_drivers_openbsd_c
Normal file
@ -0,0 +1,42 @@
|
||||
$OpenBSD: patch-src_drivers_openbsd_c,v 1.1 2003/05/18 07:40:55 naddy Exp $
|
||||
--- src/drivers/openbsd.c.orig Sat May 17 14:40:43 2003
|
||||
+++ src/drivers/openbsd.c Sat May 17 15:15:37 2003
|
||||
@@ -39,7 +39,6 @@ static void shutdown (void);
|
||||
static void dummy () { }
|
||||
|
||||
static char *help[] = {
|
||||
- "gain=val", "Audio output gain (0 to 255)",
|
||||
"buffer=val", "Audio buffer size (default is 32768)",
|
||||
NULL
|
||||
};
|
||||
@@ -75,29 +74,22 @@ struct xmp_drv_info drv_openbsd = {
|
||||
static int setaudio (struct xmp_control *ctl)
|
||||
{
|
||||
audio_info_t ainfo;
|
||||
- int gain = 128;
|
||||
int bsize = 32 * 1024;
|
||||
char *token;
|
||||
char **parm = ctl->parm;
|
||||
|
||||
parm_init ();
|
||||
- chkparm1 ("gain", gain = atoi (token));
|
||||
chkparm1 ("buffer", bsize = atoi (token));
|
||||
parm_end ();
|
||||
|
||||
- if (gain < AUDIO_MIN_GAIN)
|
||||
- gain = AUDIO_MIN_GAIN;
|
||||
- if (gain > AUDIO_MAX_GAIN)
|
||||
- gain = AUDIO_MAX_GAIN;
|
||||
-
|
||||
AUDIO_INITINFO (&ainfo);
|
||||
|
||||
+ ainfo.mode = AUMODE_PLAY;
|
||||
ainfo.play.sample_rate = ctl->freq;
|
||||
ainfo.play.channels = ctl->outfmt & XMP_FMT_MONO ? 1 : 2;
|
||||
ainfo.play.precision = ctl->resol;
|
||||
ainfo.play.encoding = ctl->resol > 8 ?
|
||||
AUDIO_ENCODING_SLINEAR : AUDIO_ENCODING_ULINEAR;
|
||||
- ainfo.play.gain = gain;
|
||||
ainfo.play.buffer_size = bsize;
|
||||
|
||||
if (ioctl (audio_fd, AUDIO_SETINFO, &ainfo) == -1) {
|
@ -1,80 +0,0 @@
|
||||
$OpenBSD: patch-src_drivers_solaris_c,v 1.1 2001/04/05 19:31:42 espie Exp $
|
||||
--- src/drivers/solaris.c.orig Mon May 18 06:21:17 1998
|
||||
+++ src/drivers/solaris.c Thu Apr 5 21:23:52 2001
|
||||
@@ -55,7 +55,9 @@ static void dummy () { }
|
||||
|
||||
static char *help[] = {
|
||||
"gain=val", "Audio output gain (0 to 255)",
|
||||
+#if !defined(__OpenBSD__)
|
||||
"port={s|h|l}", "Audio port (s[peaker], h[eadphones], l[ineout])",
|
||||
+#endif
|
||||
"buffer=val", "Audio buffer size (default is 32768)",
|
||||
NULL
|
||||
};
|
||||
@@ -86,6 +88,50 @@ struct xmp_drv_info drv_solaris = {
|
||||
NULL
|
||||
};
|
||||
|
||||
+#if defined(__OpenBSD__)
|
||||
+static int setaudio (struct drv_config *cfg)
|
||||
+{
|
||||
+ audio_info_t ainfo;
|
||||
+ int gain = 128;
|
||||
+ int bsize = 32 * 1024;
|
||||
+ char *token;
|
||||
+ char **parm = cfg->parm;
|
||||
+
|
||||
+ parm_init ();
|
||||
+ chkparm1 ("gain", gain = atoi (token));
|
||||
+ chkparm1 ("buffer", bsize = atoi (token));
|
||||
+ parm_end ();
|
||||
+
|
||||
+ if (gain < AUDIO_MIN_GAIN)
|
||||
+ gain = AUDIO_MIN_GAIN;
|
||||
+ if (gain > AUDIO_MAX_GAIN)
|
||||
+ gain = AUDIO_MAX_GAIN;
|
||||
+
|
||||
+ AUDIO_INITINFO (&ainfo);
|
||||
+
|
||||
+ ainfo.play.sample_rate = cfg->rate;
|
||||
+ ainfo.play.channels = cfg->mode + 1;
|
||||
+ ainfo.play.precision = cfg->fmt & MIX_16BIT ? 16 : 8;
|
||||
+ ainfo.play.encoding = cfg->fmt & MIX_16BIT ? AUDIO_ENCODING_SLINEAR : AUDIO_ENCODING_ULINEAR;
|
||||
+ ainfo.play.buffer_size = bsize;
|
||||
+
|
||||
+ if (ioctl (audio_fd, AUDIO_SETINFO, &ainfo) == -1) {
|
||||
+ close (audio_fd);
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ AUDIO_INITINFO (&ainfo);
|
||||
+ ainfo.play.gain = gain;
|
||||
+ ioctl(audio_fd, AUDIO_SETINFO, &ainfo);
|
||||
+
|
||||
+ drv_solaris.description = "OpenBSD Generic Audio";
|
||||
+
|
||||
+ cfg->mode++;
|
||||
+
|
||||
+ return 1;
|
||||
+}
|
||||
+
|
||||
+#else
|
||||
|
||||
static int setaudio (struct drv_config *cfg)
|
||||
{
|
||||
@@ -150,10 +196,15 @@ static int setaudio (struct drv_config *
|
||||
return 1;
|
||||
}
|
||||
|
||||
+#endif
|
||||
|
||||
static int init (struct drv_config *cfg)
|
||||
{
|
||||
+#if defined(__OpenBSD__)
|
||||
+ audio_fd = open ("/dev/sound", O_WRONLY);
|
||||
+#else
|
||||
audio_fd = open ("/dev/audio", O_WRONLY);
|
||||
+#endif
|
||||
|
||||
if (audio_fd == -1)
|
||||
return 0;
|
@ -1,11 +0,0 @@
|
||||
$OpenBSD: patch-src_main_xstuff_c,v 1.1 2001/04/05 19:31:42 espie Exp $
|
||||
--- src/main/xstuff.c.orig Wed Jan 28 23:33:38 1998
|
||||
+++ src/main/xstuff.c Thu Apr 5 20:52:58 2001
|
||||
@@ -6,6 +6,7 @@
|
||||
* for more information.
|
||||
*/
|
||||
|
||||
+#include <sys/types.h>
|
||||
#include <sys/ipc.h>
|
||||
#include <sys/shm.h>
|
||||
|
12
audio/xmp/patches/patch-src_player_Makefile
Normal file
12
audio/xmp/patches/patch-src_player_Makefile
Normal file
@ -0,0 +1,12 @@
|
||||
$OpenBSD: patch-src_player_Makefile,v 1.1 2003/05/18 07:40:55 naddy Exp $
|
||||
--- src/player/Makefile.orig Fri May 16 23:23:55 2003
|
||||
+++ src/player/Makefile Fri May 16 23:24:54 2003
|
||||
@@ -1,7 +1,7 @@
|
||||
# Extended Module Player src/player/Makefile
|
||||
# $Id: patch-src_player_Makefile,v 1.1 2003/05/18 07:40:55 naddy Exp $
|
||||
|
||||
-XCFLAGS = -I../include
|
||||
+XCFLAGS = -I../include -DSYSCONF_DIR=\"$(SYSCONF_DIR)\"
|
||||
OBJS = convert.o driver.o formats.o misc.o period.o player.o \
|
||||
readrc.o scan.o ulaw.o med_synth.o cruncher.o filter.o \
|
||||
fmopl.o synth.o
|
21
audio/xmp/patches/patch-src_player_readrc_c
Normal file
21
audio/xmp/patches/patch-src_player_readrc_c
Normal file
@ -0,0 +1,21 @@
|
||||
$OpenBSD: patch-src_player_readrc_c,v 1.1 2003/05/18 07:40:55 naddy Exp $
|
||||
--- src/player/readrc.c.orig Fri May 16 23:25:25 2003
|
||||
+++ src/player/readrc.c Fri May 16 23:26:34 2003
|
||||
@@ -58,7 +58,7 @@ int xmpi_read_rc (struct xmp_control *ct
|
||||
if ((rc = fopen (myrc2, "r")) == NULL) {
|
||||
if ((rc = fopen (myrc, "r")) == NULL) {
|
||||
#ifndef __EMX__
|
||||
- if ((rc = fopen ("/etc/xmp.conf", "r")) == NULL) {
|
||||
+ if ((rc = fopen (SYSCONF_DIR "/xmp.conf", "r")) == NULL) {
|
||||
#else
|
||||
if ((rc = fopen ("xmp.conf", "r")) == NULL) {
|
||||
#endif
|
||||
@@ -206,7 +206,7 @@ void xmpi_read_modconf (struct xmp_contr
|
||||
myrc = malloc ((home ? strlen (home) : 0) + 20);
|
||||
#ifndef __EMX__
|
||||
sprintf (myrc, "%s/.xmp/modules.conf", home);
|
||||
- parse_modconf (ctl, "/etc/xmp-modules.conf", crc, size);
|
||||
+ parse_modconf (ctl, SYSCONF_DIR "/xmp-modules.conf", crc, size);
|
||||
#else
|
||||
sprintf (myrc, "%s\\.xmp\\modules.conf", home);
|
||||
parse_modconf (ctl, "xmp-modules.conf", crc, size);
|
@ -1,8 +1,4 @@
|
||||
XMP is a tracked music module player.
|
||||
xmp is a multi-format module player for UNIX. It supports more
|
||||
than 40 module formats, such as Soundtracker, Impulse Tracker, etc.
|
||||
|
||||
The current version recognizes the following module formats:
|
||||
Fasttracker II (XM), 1 to 32 instruments Noise/Fast/Protracker and
|
||||
variants (MOD,NST,WOW), Scream Tracker 3 (S3M), Scream Tracker 2 (STM),
|
||||
Composer 669 (669), Poly Tracker (PTM), Oktalyzer, Multitracker (MTM),
|
||||
Aley's modules (ALM), Farandole Composer (FAR), Amusic Adlib Tracker (AMD)
|
||||
and Realty Adlib Tracker (RAD).
|
||||
WWW: ${HOMEPAGE}
|
||||
|
6
audio/xmp/pkg/DESCR-xmms
Normal file
6
audio/xmp/pkg/DESCR-xmms
Normal file
@ -0,0 +1,6 @@
|
||||
xmp is a multi-format module player for UNIX. It supports more
|
||||
than 40 module formats, such as Soundtracker, Impulse Tracker, etc.
|
||||
|
||||
This is an XMMS input plugin based on xmp.
|
||||
|
||||
WWW: ${HOMEPAGE}
|
@ -1,5 +1,8 @@
|
||||
@comment $OpenBSD: PLIST,v 1.3 2000/06/10 17:39:29 espie Exp $
|
||||
@comment $OpenBSD: PLIST,v 1.4 2003/05/18 07:40:55 naddy Exp $
|
||||
bin/xmp
|
||||
bin/xxmp
|
||||
man/man1/xmp.1
|
||||
man/man1/xxmp.1
|
||||
share/examples/xmp/xmp-modules.conf
|
||||
share/examples/xmp/xmp.conf
|
||||
@dirrm share/examples/xmp
|
||||
|
2
audio/xmp/pkg/PLIST-xmms
Normal file
2
audio/xmp/pkg/PLIST-xmms
Normal file
@ -0,0 +1,2 @@
|
||||
@comment $OpenBSD: PLIST-xmms,v 1.1 2003/05/18 07:40:55 naddy Exp $
|
||||
lib/xmms/Input/xmp-plugin.so
|
Loading…
Reference in New Issue
Block a user