From 60a9d6b0d9ef466052013a0f171814aba0d1f510 Mon Sep 17 00:00:00 2001 From: downsj Date: Fri, 24 Jul 1998 03:11:20 +0000 Subject: [PATCH] Add XMP. --- audio/Makefile | 3 +- audio/xmp/Makefile | 29 ++++++++++ audio/xmp/files/md5 | 1 + audio/xmp/patches/patch-aa | 115 +++++++++++++++++++++++++++++++++++++ audio/xmp/pkg/COMMENT | 1 + audio/xmp/pkg/DESCR | 8 +++ audio/xmp/pkg/PLIST | 3 + 7 files changed, 159 insertions(+), 1 deletion(-) create mode 100644 audio/xmp/Makefile create mode 100644 audio/xmp/files/md5 create mode 100644 audio/xmp/patches/patch-aa create mode 100644 audio/xmp/pkg/COMMENT create mode 100644 audio/xmp/pkg/DESCR create mode 100644 audio/xmp/pkg/PLIST diff --git a/audio/Makefile b/audio/Makefile index daf2ae36b2f..eb1d6b6c20a 100644 --- a/audio/Makefile +++ b/audio/Makefile @@ -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 diff --git a/audio/xmp/Makefile b/audio/xmp/Makefile new file mode 100644 index 00000000000..f8e2aed0d44 --- /dev/null +++ b/audio/xmp/Makefile @@ -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 diff --git a/audio/xmp/files/md5 b/audio/xmp/files/md5 new file mode 100644 index 00000000000..d3bbc734373 --- /dev/null +++ b/audio/xmp/files/md5 @@ -0,0 +1 @@ +MD5 (xmp-1.1.5.tar.gz) = 73c6500ffc3e05a666d1a7c17f5f5f81 diff --git a/audio/xmp/patches/patch-aa b/audio/xmp/patches/patch-aa new file mode 100644 index 00000000000..3749fffeca0 --- /dev/null +++ b/audio/xmp/patches/patch-aa @@ -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 + #include + #include + diff --git a/audio/xmp/pkg/COMMENT b/audio/xmp/pkg/COMMENT new file mode 100644 index 00000000000..5d17ee3f4b9 --- /dev/null +++ b/audio/xmp/pkg/COMMENT @@ -0,0 +1 @@ +Extended Module Player; supports many formats and includes an X11 display. diff --git a/audio/xmp/pkg/DESCR b/audio/xmp/pkg/DESCR new file mode 100644 index 00000000000..624698f5a35 --- /dev/null +++ b/audio/xmp/pkg/DESCR @@ -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). diff --git a/audio/xmp/pkg/PLIST b/audio/xmp/pkg/PLIST new file mode 100644 index 00000000000..a37f49a03cd --- /dev/null +++ b/audio/xmp/pkg/PLIST @@ -0,0 +1,3 @@ +bin/xmp +bin/xxmp +man/man1/xmp.1