This commit is contained in:
downsj 1998-07-24 03:11:20 +00:00
parent c259d3276d
commit 60a9d6b0d9
7 changed files with 159 additions and 1 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.12 1998/06/08 01:53:25 angelos Exp $
# $OpenBSD: Makefile,v 1.13 1998/07/24 03:11:20 downsj Exp $
# $FreeBSD: Makefile,v 1.40 1997/11/16 22:49:20 fenner Exp $
#
@ -32,6 +32,7 @@
SUBDIR += xmcd
SUBDIR += xmix
SUBDIR += xmmix
SUBDIR += xmp
# SUBDIR += xmpeg3
.include <bsd.port.subdir.mk>

29
audio/xmp/Makefile Normal file
View File

@ -0,0 +1,29 @@
# OpenBSD makefile for: xmp-1.1.5
# Version required: 1.1.5
# Date created: Thu Jul 23 19:27:58 PDT 1998
# Whom: downsj@openbsd.org
#
# $OpenBSD: Makefile,v 1.1 1998/07/24 03:11:23 downsj Exp $
#
DISTNAME= xmp-1.1.5
CATEGORIES= audio
MASTER_SITES= ${MASTER_SITE_SUNSITE}
MASTER_SITE_SUBDIR= apps/sound/players
MAINTAINER= downsj@openbsd.org
GNU_CONFIGURE= YES
USE_GMAKE= YES
PATCH_STRIP= -p1
PATCH_DIST_STRIP= -p1
MAN1= docs/xmp.1
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/src/main/xmp ${PREFIX}/bin
${INSTALL_PROGRAM} ${WRKSRC}/src/main/xxmp ${PREFIX}/bin
${INSTALL_MAN} ${WRKSRC}/docs/xmp.1 ${MANPREFIX}/man/man1
.include <bsd.port.mk>

1
audio/xmp/files/md5 Normal file
View File

@ -0,0 +1 @@
MD5 (xmp-1.1.5.tar.gz) = 73c6500ffc3e05a666d1a7c17f5f5f81

115
audio/xmp/patches/patch-aa Normal file
View File

@ -0,0 +1,115 @@
diff -cr xmp-1.1.5/configure xmp-1.1.5.mine/configure
*** xmp-1.1.5/configure Wed May 20 11:43:13 1998
--- xmp-1.1.5.mine/configure Thu Jul 23 18:11:16 1998
***************
*** 1317,1322 ****
--- 1317,1329 ----
#define DRIVER_SUNOS 1
EOF
+ ;;
+ openbsd*)
+ DRIVERS="${DRIVERS} solaris.o"
+ cat >> confdefs.h <<\EOF
+ #define DRIVER_SOLARIS 1
+ EOF
+ ;;
esac
fi
diff -cr xmp-1.1.5/src/drivers/solaris.c xmp-1.1.5.mine/src/drivers/solaris.c
*** xmp-1.1.5/src/drivers/solaris.c Sun May 17 21:21:17 1998
--- xmp-1.1.5.mine/src/drivers/solaris.c Thu Jul 23 19:23:08 1998
***************
*** 55,61 ****
--- 55,63 ----
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,91 ****
--- 88,134 ----
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.gain = gain;
+ ainfo.play.buffer_size = bsize;
+
+ if (ioctl (audio_fd, AUDIO_SETINFO, &ainfo) == -1) {
+ close (audio_fd);
+ return 0;
+ }
+
+ drv_solaris.description = "OpenBSD Generic Audio";
+
+ cfg->mode++;
+
+ return 1;
+ }
+
+ #else
static int setaudio (struct drv_config *cfg)
{
***************
*** 150,159 ****
--- 193,207 ----
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;
diff -cr xmp-1.1.5/src/main/xstuff.c xmp-1.1.5.mine/src/main/xstuff.c
*** xmp-1.1.5/src/main/xstuff.c Wed Jan 28 14:33:38 1998
--- xmp-1.1.5.mine/src/main/xstuff.c Thu Jul 23 18:13:02 1998
***************
*** 6,11 ****
--- 6,12 ----
* for more information.
*/
+ #include <sys/types.h>
#include <sys/ipc.h>
#include <sys/shm.h>

1
audio/xmp/pkg/COMMENT Normal file
View File

@ -0,0 +1 @@
Extended Module Player; supports many formats and includes an X11 display.

8
audio/xmp/pkg/DESCR Normal file
View File

@ -0,0 +1,8 @@
XMP is a tracked music module player.
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).

3
audio/xmp/pkg/PLIST Normal file
View File

@ -0,0 +1,3 @@
bin/xmp
bin/xxmp
man/man1/xmp.1