aboutsummaryrefslogtreecommitdiff
path: root/audio/squash
diff options
context:
space:
mode:
Diffstat (limited to 'audio/squash')
-rw-r--r--audio/squash/Makefile67
-rw-r--r--audio/squash/distinfo2
-rw-r--r--audio/squash/files/patch-include::global.h13
-rw-r--r--audio/squash/files/patch-src::display.c36
-rw-r--r--audio/squash/files/pkg-message.in4
-rw-r--r--audio/squash/pkg-descr10
-rw-r--r--audio/squash/pkg-plist15
7 files changed, 147 insertions, 0 deletions
diff --git a/audio/squash/Makefile b/audio/squash/Makefile
new file mode 100644
index 000000000000..cee6758b32ca
--- /dev/null
+++ b/audio/squash/Makefile
@@ -0,0 +1,67 @@
+# New ports collection makefile for: squash
+# Date created: 5 August 2003
+# Whom: Matthias Andree <matthias.andree@gmx.de>
+#
+# $FreeBSD$
+
+PORTNAME= squash
+PORTVERSION= 1.0.p1
+CATEGORIES= audio
+MASTER_SITES= ${MASTER_SITE_SAVANNAH}
+MASTER_SITE_SUBDIR= squash
+DISTNAME= squash-1.0pre1
+
+MAINTAINER= matthias.andree@gmx.de
+COMMENT= Learning console-based MP3/OGG player
+
+LIB_DEPENDS+= FLAC.5:${PORTSDIR}/audio/flac \
+ fftw.2:${PORTSDIR}/math/fftw \
+ id3-3.8.2:${PORTSDIR}/audio/id3lib \
+ mad.1:${PORTSDIR}/audio/mad \
+ vorbis.2:${PORTSDIR}/audio/libvorbis \
+ ao.3:${PORTSDIR}/audio/libao
+RUN_DEPENDS= id3v2:${PORTSDIR}/audio/id3v2
+
+PKGMESSAGE= ${WRKDIR}/pkg-message
+USE_BZIP2= yes
+USE_GMAKE= yes
+USE_REINPLACE= yes
+USE_RUBY= yes
+
+.include <bsd.port.pre.mk>
+
+post-patch:
+ @${REINPLACE_CMD} -e "s|--std=gnu99|${CFLAGS} ${PTHREAD_CFLAGS}|; \
+ s|-Iinclude|-Iinclude -I${LOCALBASE}/include|; \
+ s|-lpthread|${PTHREAD_LIBS}|; s|-ldl|-L${LOCALBASE}/lib|" ${WRKSRC}/Makefile
+ @${REINPLACE_CMD} -e "s,/usr/bin/ruby,${RUBY}," \
+ ${WRKSRC}/extra/*.rb
+ @${REINPLACE_CMD} -e "s,/etc/squash.conf,${PREFIX}/etc/squash.conf," \
+ ${WRKSRC}/src/global.c
+ @${SED} "s,%%DD%%,${DOCSDIR}," ${FILESDIR}/pkg-message.in > ${PKGMESSAGE}
+
+do-install:
+ ${MKDIR} ${PREFIX}/bin
+ ${INSTALL_PROGRAM} ${WRKSRC}/squash ${PREFIX}/bin
+.for FILE in collect_info edit_tag export_music import_music joystick uncollect_info
+ ${INSTALL_SCRIPT} ${WRKSRC}/extra/${FILE}.rb ${PREFIX}/bin
+.endfor
+ ${INSTALL_DATA} ${WRKSRC}/extra/musicdb_lib.rb ${RUBY_SITELIBDIR}
+ ${INSTALL_DATA} ${WRKSRC}/extra/squash.conf ${PREFIX}/etc
+.if !defined(NOPORTDOCS)
+ ${MKDIR} ${DOCSDIR}
+.for i in README doc/FEATURES doc/LOCKS doc/INSTALL doc/USERS_GUIDE
+ ${INSTALL_DATA} ${WRKSRC}/${i} ${DOCSDIR}
+.endfor
+.endif
+
+post-install:
+ @${CAT} ${PKGMESSAGE}
+
+.if ${OSVERSION} < 501100
+
+IGNORE= "ignored: FreeBSD before 5.1 lacks the wordexp interface"
+
+.endif
+
+.include <bsd.port.post.mk>
diff --git a/audio/squash/distinfo b/audio/squash/distinfo
new file mode 100644
index 000000000000..b09cbde534ef
--- /dev/null
+++ b/audio/squash/distinfo
@@ -0,0 +1,2 @@
+$FreeBSD$
+MD5 (squash-1.0pre1.tar.bz2) = 017b935067e6f01058af76ad595ccae1
diff --git a/audio/squash/files/patch-include::global.h b/audio/squash/files/patch-include::global.h
new file mode 100644
index 000000000000..153a14df38f4
--- /dev/null
+++ b/audio/squash/files/patch-include::global.h
@@ -0,0 +1,13 @@
+$FreeBSD$
+
+--- include/global.h~ Mon Aug 4 16:43:16 2003
++++ include/global.h Tue Aug 5 11:54:11 2003
+@@ -40,7 +40,7 @@
+ #include <ao/ao.h>
+ #include <math.h>
+ #include <stdarg.h>
+-#include <wait.h>
++#include <sys/wait.h>
+ #include <sys/mman.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
diff --git a/audio/squash/files/patch-src::display.c b/audio/squash/files/patch-src::display.c
new file mode 100644
index 000000000000..ffc34b199f96
--- /dev/null
+++ b/audio/squash/files/patch-src::display.c
@@ -0,0 +1,36 @@
+$FreeBSD$
+
+--- src/display.c~ Tue Jul 29 06:56:49 2003
++++ src/display.c Tue Aug 5 11:59:03 2003
+@@ -673,6 +673,22 @@
+ wrefresh( win );
+ }
+
++char *mystrndup(const char *s, size_t sz)
++{
++ size_t l = strlen(s), i;
++ char *x;
++
++ i = l < sz ? l : sz;
++
++ x = malloc(i + 1);
++
++ if (x) {
++ memcpy(x, s, i);
++ x[i] = '\0';
++ }
++ return x;
++}
++
+ /*
+ * Draw the info window.
+ */
+@@ -744,7 +760,7 @@
+ }
+
+ /* Clip filename */
+- filename = strndup( filename, win_width - 2 );
++ filename = mystrndup( filename, win_width - 2 );
+
+ /* Display filename and songs loaded */
+ mvwprintw( win, 1, 1, "Current Selected Song filename:" );
diff --git a/audio/squash/files/pkg-message.in b/audio/squash/files/pkg-message.in
new file mode 100644
index 000000000000..22708b508d47
--- /dev/null
+++ b/audio/squash/files/pkg-message.in
@@ -0,0 +1,4 @@
+---------------------------------------------------------------------------
+NOTE: You MUST configure squash and run a script before you can use squash.
+Please see %%DD%%/INSTALL for details.
+---------------------------------------------------------------------------
diff --git a/audio/squash/pkg-descr b/audio/squash/pkg-descr
new file mode 100644
index 000000000000..373416571353
--- /dev/null
+++ b/audio/squash/pkg-descr
@@ -0,0 +1,10 @@
+Squash is a C/Ncurses based music player. It supports mp3 and ogg through
+libraries (and planned flac support). Squash uses statistics to determine songs
+to play automatically. It garners this information through whether or not a song
+is skipped. Squash also avoids picking the same song twice. Thus Squash is
+like a radio station that plays the songs you like -- and you don't even have to
+call in requests!
+
+WWW: http://savannah.nongnu.org/projects/squash/
+
+- Adam Luter, Matthias Andree
diff --git a/audio/squash/pkg-plist b/audio/squash/pkg-plist
new file mode 100644
index 000000000000..e3cb17054e66
--- /dev/null
+++ b/audio/squash/pkg-plist
@@ -0,0 +1,15 @@
+bin/collect_info.rb
+bin/edit_tag.rb
+bin/export_music.rb
+bin/import_music.rb
+bin/joystick.rb
+bin/squash
+bin/uncollect_info.rb
+etc/squash.conf
+%%RUBY_SITELIBDIR%%/musicdb_lib.rb
+%%DOCSDIR%%/FEATURES
+%%DOCSDIR%%/INSTALL
+%%DOCSDIR%%/LOCKS
+%%DOCSDIR%%/README
+%%DOCSDIR%%/USERS_GUIDE
+@dirrm %%DOCSDIR%%