pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/audio/nosefart Initial import of nosefart, an NSF (NES...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/ed4d21fb4fe5
branches:  trunk
changeset: 469706:ed4d21fb4fe5
user:      snj <snj%pkgsrc.org@localhost>
date:      Fri Feb 27 02:58:06 2004 +0000

description:
Initial import of nosefart, an NSF (NES (8-bit Nintendo) Sound Format)
player.

Packaged by David Griffith, modified by wiz@ and me.

diffstat:

 audio/nosefart/DESCR            |   1 +
 audio/nosefart/Makefile         |  26 ++++++++++++++
 audio/nosefart/PLIST            |   2 +
 audio/nosefart/distinfo         |   6 +++
 audio/nosefart/patches/patch-aa |  17 +++++++++
 audio/nosefart/patches/patch-ab |  72 +++++++++++++++++++++++++++++++++++++++++
 6 files changed, 124 insertions(+), 0 deletions(-)

diffs (148 lines):

diff -r c741851a9572 -r ed4d21fb4fe5 audio/nosefart/DESCR
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/nosefart/DESCR      Fri Feb 27 02:58:06 2004 +0000
@@ -0,0 +1,1 @@
+Nosefart is an NSF (NES (8-bit Nintendo) Sound Format) player.
diff -r c741851a9572 -r ed4d21fb4fe5 audio/nosefart/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/nosefart/Makefile   Fri Feb 27 02:58:06 2004 +0000
@@ -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@localhost
+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 -r c741851a9572 -r ed4d21fb4fe5 audio/nosefart/PLIST
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/nosefart/PLIST      Fri Feb 27 02:58:06 2004 +0000
@@ -0,0 +1,2 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2004/02/27 02:58:06 snj Exp $
+bin/nosefart
diff -r c741851a9572 -r ed4d21fb4fe5 audio/nosefart/distinfo
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/nosefart/distinfo   Fri Feb 27 02:58:06 2004 +0000
@@ -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 -r c741851a9572 -r ed4d21fb4fe5 audio/nosefart/patches/patch-aa
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/nosefart/patches/patch-aa   Fri Feb 27 02:58:06 2004 +0000
@@ -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 -r c741851a9572 -r ed4d21fb4fe5 audio/nosefart/patches/patch-ab
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/nosefart/patches/patch-ab   Fri Feb 27 02:58:06 2004 +0000
@@ -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);
+ }



Home | Main Index | Thread Index | Old Index