ports/62313: New port: audio/modplugplay and audio/libmodpluga commandline modplayer and its library

Emanuel Haupt ehaupt at beaver.critical.ch
Fri Feb 6 14:40:32 UTC 2004


The following reply was made to PR ports/62313; it has been noted by GNATS.

From: Emanuel Haupt <ehaupt at beaver.critical.ch>
To: freebsd-gnats-submit at FreeBSD.org
Cc:  
Subject: Re: ports/62313: New port: audio/modplugplay and audio/libmodplug  a 
 commandline modplayer and its library
Date: Fri, 06 Feb 2004 15:36:50 +0100

 This is a multi-part message in MIME format.
 
 --ZN9P81F26Y-=-JFY0L10VVH-CUT-HERE-1VZ8ESWZS4-=-NNFOL629W4
 Content-Type: text/plain;
  charset=iso-8859-1
 Content-Transfer-Encoding: 8bit
 Content-Disposition: attachment;
  filename="modplugplay.shar"
 
 audio/modplugplay #3 (new patches)
 
 # This is a shell archive.  Save it in a file, remove anything before
 # this line, and then unpack it by entering "sh file".  Note, it may
 # create directories; files and directories will be owned by you and
 # have default permissions.
 #
 # This archive contains:
 #
 #	modplugplay
 #	modplugplay/files
 #	modplugplay/files/patch-modplugplay.c
 #	modplugplay/files/patch-makefile
 #	modplugplay/Makefile
 #	modplugplay/pkg-descr
 #	modplugplay/pkg-plist
 #	modplugplay/distinfo
 #
 echo c - modplugplay
 mkdir -p modplugplay > /dev/null 2>&1
 echo c - modplugplay/files
 mkdir -p modplugplay/files > /dev/null 2>&1
 echo x - modplugplay/files/patch-modplugplay.c
 sed 's/^X//' >modplugplay/files/patch-modplugplay.c << 'END-of-modplugplay/files/patch-modplugplay.c'
 X--- modplugplay.c.orig	Mon Oct  6 09:33:56 2003
 X+++ modplugplay.c	Thu Feb  5 20:40:53 2004
 X@@ -1,8 +1,7 @@
 X-
 X /*
 X commandline interface to modplugxmms library
 X gurkan at linuks.mine.nu www.linuks.mine.nu
 X-Copyright (C) 2003 Gürkan Sengün
 X+Copyright (C) 2003 Gurkan Sengun
 X 
 X TODO
 X unlock /dev/dsp when in 'p'ause mode
 X@@ -69,7 +68,7 @@
 X #include <string.h>			/* strcpy */
 X #include <stdlib.h>			/* srand/rand */
 X #include <unistd.h>
 X-#include <modplug.h>			/* core */
 X+#include "/usr/local/include/libmodplug/modplug.h"	/* core */
 X #include <sys/ioctl.h>			/* control device */
 X #include <fcntl.h>
 X 
 X@@ -151,7 +150,7 @@
 X 
 X void help(char *s)
 X {
 X-	printf("Copyright (C) 2003 Gürkan Sengün\n");
 X+	printf("Copyright (C) 2003 Gurkan Sengun\n");
 X         printf("Version %s compiled on %s at %s.\n",VERSION,__DATE__,__TIME__);
 X 	printf("\n");
 X 	printf("%s: too few arguments\n",s);
 X@@ -183,10 +182,10 @@
 X     char t[sz];
 X     int i, lit, big;
 X 
 X-    for (i=0; i<sz; i++) s[i] = i;
 X+    for (i=0; i<(int)sz; i++) s[i] = i;
 X     ival = *(int *)s;
 X     big = lit = 0;
 X-    for (i=0; i<sz; i++) {
 X+    for (i=0; i<(int)sz; i++) {
 X         char c = ival&0xff;
 X         ival >>= 8;
 X         if (s[i] == c) lit++;
 X@@ -250,6 +249,7 @@
 X     }
 X     ioctl(mixer_fd,MIXER_WRITE(SOUND_MIXER_PCM),&newvol);
 X     close(mixer_fd);
 X+    return 0;
 X }
 X 
 X int main(int argc, char* argv[])
 X@@ -257,7 +257,7 @@
 X     FILE *f;
 X     long size;
 X     char *d;
 X-    int ch,x,y;
 X+    int x,y;
 X     ModPlugFile *f2;
 X     int len,mlen;
 X     struct timeval tvstart;
 X@@ -269,8 +269,11 @@
 X     char songname[41];
 X     char notpaus[4];
 X     
 X+    /*
 X     int vol=getpcmvol();
 X-    /*printf("V%02x\n",vol);*/
 X+    printf("V%02x\n",vol);
 X+    */
 X+
 X     /*
 X     struct count_info ci;
 X     ioctl(audio_fd,SNDCTL_DSP_GETOPTR,&ci);
 X@@ -289,7 +292,6 @@
 X     int channels = 2;
 X     int speed = 44100;
 X 
 X-    int c;
 X     char buffer[128];
 X     int result, nread;
 X     struct pollfd pollfds;
 X@@ -299,19 +301,10 @@
 X     int mono=0;
 X     int bits=0;
 X     int song;
 X-    int millisecond;
 X-    char *randplayed; /* randomly played songs
 X-			 songs that are n/N'd are done or not? */
 X     /* what about N if the previous song is not playable? */
 X     /* maybe mark it played in randplayed */
 X 
 X     // [rev--dly--] [sur--dly--] [bas--rng--]
 X-    int rev=0;    // a
 X-    int revdly=0; // s
 X-    int sur=0;    // d
 X-    int surdly=0; // y
 X-    int bas=0;    // x
 X-    int basrng=0; // c
 X 
 X     if (get_byteorder()==0) {
 X 	format=AFMT_S16_LE;
 X@@ -335,7 +328,7 @@
 X 
 X /*
 X     if (strstr(argv[1],"-v")) {
 X-        printf("Copyright (C) 2003 Gürkan Sengün\n");
 X+        printf("Copyright (C) 2003 Gurkan Sengun\n");
 X         printf("Version %s compiled on %s at %s.\n",VERSION,__DATE__,__TIME__);
 X         exit(0);
 X     }
 END-of-modplugplay/files/patch-modplugplay.c
 echo x - modplugplay/files/patch-makefile
 sed 's/^X//' >modplugplay/files/patch-makefile << 'END-of-modplugplay/files/patch-makefile'
 X--- makefile.orig	Mon Oct  6 09:01:09 2003
 X+++ makefile	Fri Feb  6 15:05:57 2004
 X@@ -1,20 +1,11 @@
 X-CC = g++
 X+CXX ?= g++
 X LIBS = -lmodplug
 X TARGET = modplugplay
 X+CFLAGS += -Wall -Werror
 X 
 X all:
 X-	$(CC) modplugplay.c -o $(TARGET) $(LIBS)
 X-
 X-test:
 X-	./$(TARGET) data/*
 X-
 X-clean:
 X-	rm $(TARGET)
 X+	$(CXX) modplugplay.c $(CFLAGS) -o $(TARGET) $(LIBS) -L/usr/local/lib/
 X 
 X install:
 X-	install -m 755 $(TARGET) /usr/bin/
 X-	install -m 644 modplugplay.1 /usr/share/man/man1/
 X-
 X-uninstall:
 X-	rm /usr/bin/$(TARGET)
 X-	rm /usr/share/man/man1/modplugplay.1*
 X+	install -m 755 $(TARGET) /usr/local/bin/
 X+	install -m 644 modplugplay.1 /usr/local/man/man1/
 END-of-modplugplay/files/patch-makefile
 echo x - modplugplay/Makefile
 sed 's/^X//' >modplugplay/Makefile << 'END-of-modplugplay/Makefile'
 X# New ports collection makefile for:   modplugplay
 X# Date created:		3 February 2004
 X# Whom:			Emanuel Haupt <ehaupt at critical.ch>
 X#
 X# $FreeBSD$
 X#
 X
 XPORTNAME=	modplugplay
 XPORTVERSION=	1.0
 XCATEGORIES=	audio
 XMASTER_SITES=	http://www.linuks.mine.nu/modplugplay/
 X
 XMAINTAINER=	ehaupt at critical.ch
 XCOMMENT=	A commandline music mod player using libmodplug
 X
 XBUILD_DEPENDS=	libmodplug-0.7:${PORTSDIR}/audio/libmodplug
 XRUN_DEPENDS=	libmodplug-0.7:${PORTSDIR}/audio/libmodplug
 X
 XMAN1=           modplugplay.1
 XMANCOMPRESSED=  no
 X
 XMAKEFILE=	makefile
 XPATCHDIR=	${MASTERDIR}/files
 X
 X.include <bsd.port.mk>
 END-of-modplugplay/Makefile
 echo x - modplugplay/pkg-descr
 sed 's/^X//' >modplugplay/pkg-descr << 'END-of-modplugplay/pkg-descr'
 Xmodplugplay  is a command line player for many music modules (669, amf,
 Xams, dbm, dmf, dsm, far, it, j2b, mdl, med mod,  mt2,  mtm,  okt,  psm,
 Xptm, s3m, stm, ult, umx and xm) using the libmodplug library.
 X
 XWWW: http://www.linuks.mine.nu/modplugplay/
 X
 X- ehaupt
 Xehaupt at critical.ch
 END-of-modplugplay/pkg-descr
 echo x - modplugplay/pkg-plist
 sed 's/^X//' >modplugplay/pkg-plist << 'END-of-modplugplay/pkg-plist'
 Xbin/modplugplay
 END-of-modplugplay/pkg-plist
 echo x - modplugplay/distinfo
 sed 's/^X//' >modplugplay/distinfo << 'END-of-modplugplay/distinfo'
 XMD5 (modplugplay-1.0.tar.gz) = ac8e98865d90dca25c85748b3916bf07
 END-of-modplugplay/distinfo
 exit
 
 
 --ZN9P81F26Y-=-JFY0L10VVH-CUT-HERE-1VZ8ESWZS4-=-NNFOL629W4--



More information about the freebsd-ports-bugs mailing list