summaryrefslogtreecommitdiff
path: root/audio/nosefart
diff options
context:
space:
mode:
authorsnj <snj@pkgsrc.org>2004-02-27 02:58:06 +0000
committersnj <snj@pkgsrc.org>2004-02-27 02:58:06 +0000
commit04469344fa52920cdfd090f791949f5b57c8c8e6 (patch)
tree6165a3d129e452f4fda6a1182626bc721616261f /audio/nosefart
parentfcf04e89db77b13f87b54e9093128ae111e88cd4 (diff)
downloadpkgsrc-04469344fa52920cdfd090f791949f5b57c8c8e6.tar.gz
Initial import of nosefart, an NSF (NES (8-bit Nintendo) Sound Format)
player. Packaged by David Griffith, modified by wiz@ and me.
Diffstat (limited to 'audio/nosefart')
-rw-r--r--audio/nosefart/DESCR1
-rw-r--r--audio/nosefart/Makefile26
-rw-r--r--audio/nosefart/PLIST2
-rw-r--r--audio/nosefart/distinfo6
-rw-r--r--audio/nosefart/patches/patch-aa17
-rw-r--r--audio/nosefart/patches/patch-ab72
6 files changed, 124 insertions, 0 deletions
diff --git a/audio/nosefart/DESCR b/audio/nosefart/DESCR
new file mode 100644
index 00000000000..f68ad8826ab
--- /dev/null
+++ b/audio/nosefart/DESCR
@@ -0,0 +1 @@
+Nosefart is an NSF (NES (8-bit Nintendo) Sound Format) player.
diff --git a/audio/nosefart/Makefile b/audio/nosefart/Makefile
new file mode 100644
index 00000000000..ef670e047f1
--- /dev/null
+++ b/audio/nosefart/Makefile
@@ -0,0 +1,26 @@
+# $NetBSD: Makefile,v 1.1.1.1 2004/02/27 02:58:06 snj Exp $
+
+DISTNAME= nosefart-1.92i-mls
+PKGNAME= ${DISTNAME:S/-mls//}
+CATEGORIES= audio
+MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=nosefart/}
+
+MAINTAINER= dgriffi@cs.csubak.edu
+HOMEPAGE= http://nosefart.sourceforge.net/
+COMMENT= Player for NES Sound Format (NSF) files
+
+USE_BUILDLINK3= YES
+USE_GNU_TOOLS+= make
+NO_CONFIGURE= YES
+
+SUBST_CLASSES+= ossaudio
+SUBST_STAGE.ossaudio= pre-build
+SUBST_MESSAGE.ossaudio= "Fixing audio device."
+SUBST_FILES.ossaudio= ${WRKSRC}/src/linux/main_linux.c
+SUBST_SED.ossaudio= -e 's|/dev/dsp|${DEVOSSSOUND}|'
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/nsfobj/nosefart ${PREFIX}/bin
+
+.include "../../mk/ossaudio.buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/audio/nosefart/PLIST b/audio/nosefart/PLIST
new file mode 100644
index 00000000000..725703bfcc7
--- /dev/null
+++ b/audio/nosefart/PLIST
@@ -0,0 +1,2 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2004/02/27 02:58:06 snj Exp $
+bin/nosefart
diff --git a/audio/nosefart/distinfo b/audio/nosefart/distinfo
new file mode 100644
index 00000000000..daf0bd51e90
--- /dev/null
+++ b/audio/nosefart/distinfo
@@ -0,0 +1,6 @@
+$NetBSD: distinfo,v 1.1.1.1 2004/02/27 02:58:06 snj Exp $
+
+SHA1 (nosefart-1.92i-mls.tar.gz) = bb52a1b2f1a1a95fbdc77cf7fe06f293bd30055f
+Size (nosefart-1.92i-mls.tar.gz) = 1054405 bytes
+SHA1 (patch-aa) = 03e9b1c45d8013637d597c30e120ddb17026d44c
+SHA1 (patch-ab) = da00f888447706a2ab2f42a638fb0a11a719af15
diff --git a/audio/nosefart/patches/patch-aa b/audio/nosefart/patches/patch-aa
new file mode 100644
index 00000000000..13772e7a3d1
--- /dev/null
+++ b/audio/nosefart/patches/patch-aa
@@ -0,0 +1,17 @@
+$NetBSD: patch-aa,v 1.1.1.1 2004/02/27 02:58:06 snj Exp $
+
+--- Makefile.orig 2003-09-25 10:35:54.000000000 -0700
++++ Makefile 2004-02-26 18:49:11.000000000 -0800
+@@ -1,9 +1,9 @@
+ ################################
+ # Configuration
+
+-CC = gcc
+-CFLAGS =
+-LDFLAGS = -lm
++#CC = gcc
++#CFLAGS =
++LDFLAGS += -lm ${LIBOSSAUDIO}
+ PREFIX = /usr/local
+ WANT_DEBUG=TRUE
+
diff --git a/audio/nosefart/patches/patch-ab b/audio/nosefart/patches/patch-ab
new file mode 100644
index 00000000000..6f87fcdb7ae
--- /dev/null
+++ b/audio/nosefart/patches/patch-ab
@@ -0,0 +1,72 @@
+$NetBSD: patch-ab,v 1.1.1.1 2004/02/27 02:58:06 snj Exp $
+
+--- src/linux/main_linux.c.orig 2003-10-22 18:31:57.000000000 +0200
++++ src/linux/main_linux.c
+@@ -3,6 +3,7 @@
+ UNIX systems */
+
+ #include <ctype.h>
++#include <signal.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
+@@ -234,6 +235,50 @@ static void printsonginfo(int current_fr
+ /*Why not printf directly? Our termios hijinks for input kills the output*/
+ char *hi = (char *)malloc(255);
+
++
++ /*
++ * The new hijinks seem to cause trouble for NetBSD (\r sometimes
++ * doesn't get printed), so I'm adding \r to the beginning of these
++ * strings. Suggested by Bruce J.A Nourish, implemented by David
++ * Griffith.
++ */
++
++ if (total_frames !=0) {
++ if (limited) {
++ snprintf(hi, 254, "\rPlaying track %d of %d, channels %c%c%c%c%c%c, %d/%d seconds, %d/%d frames\r",
++ nsf->current_song, nsf->num_songs,
++ enabled[0]?'1':'-', enabled[1]?'2':'-',
++ enabled[2]?'3':'-', enabled[3]?'4':'-',
++ enabled[4]?'5':'-', enabled[5]?'6':'-',
++ (int)((float)(current_frame + nsf->playback_rate - 1)/(float)nsf->playback_rate),
++ (int)((float)(total_frames + nsf->playback_rate - 1)/(float)nsf->playback_rate),
++ current_frame,
++ total_frames);
++ } else {
++ snprintf(hi, 254, "\rPlaying track %d of %d, channels %c%c%c%c%c%c, %d/? seconds, %d/? frames\r",
++ nsf->current_song, nsf->num_songs,
++ enabled[0]?'1':'-', enabled[1]?'2':'-',
++
++ enabled[2]?'3':'-', enabled[3]?'4':'-',
++ enabled[4]?'5':'-', enabled[5]?'6':'-',
++ (int)((float)(current_frame + nsf->playback_rate - 1)/(float)nsf->playback_rate),
++ current_frame);
++ }
++ } else {
++ snprintf(hi, 254, "\rPlaying track %d of %d, channels %c%c%c%c%c%c, %d seconds, %d frames\r",
++ nsf->current_song, nsf->num_songs,
++ enabled[0]?'1':'-', enabled[1]?'2':'-',
++ enabled[2]?'3':'-', enabled[3]?'4':'-',
++ enabled[4]?'5':'-', enabled[5]?'6':'-',
++ (int)((float)(current_frame + nsf->playback_rate - 1)/(float)nsf->playback_rate),
++ current_frame);
++ }
++
++/*
++ * This stuff doesn't seem to work.
++ */
++
++/*
+ snprintf(hi, 254,
+ total_frames != 0 ?
+ "Playing track %d of %d, channels %c%c%c%c%c%c, %d/%d seconds, %d/%d frames\r":
+@@ -249,7 +294,7 @@ static void printsonginfo(int current_fr
+ current_frame,
+ total_frames
+ );
+-
++*/
+ write(STDOUT_FILENO, (void *)hi, strlen(hi));
+ free(hi);
+ }