aboutsummaryrefslogtreecommitdiff
path: root/audio/moc
diff options
context:
space:
mode:
authorJean-Yves Lefort <jylefort@FreeBSD.org>2005-07-28 23:46:49 +0000
committerJean-Yves Lefort <jylefort@FreeBSD.org>2005-07-28 23:46:49 +0000
commit634e76de2ca43635fc6ba62d1d66e8eda5f3bb0c (patch)
tree17610a266676fd7c1d0dfee5d61897a3789219b9 /audio/moc
parent3c5e969a8e0ca2251913af127294662838020254 (diff)
downloadports-634e76de2ca43635fc6ba62d1d66e8eda5f3bb0c.tar.gz
ports-634e76de2ca43635fc6ba62d1d66e8eda5f3bb0c.zip
Notes
Diffstat (limited to 'audio/moc')
-rw-r--r--audio/moc/Makefile104
-rw-r--r--audio/moc/distinfo2
-rw-r--r--audio/moc/files/patch-audio__conversion.c45
-rw-r--r--audio/moc/files/patch-decoder__plugins_flac_flac.c16
-rw-r--r--audio/moc/files/patch-decoder__plugins_speex_speex.c11
-rw-r--r--audio/moc/files/patch-io__curl.c11
-rw-r--r--audio/moc/files/patch-server.c12
-rw-r--r--audio/moc/pkg-descr12
-rw-r--r--audio/moc/pkg-plist16
9 files changed, 229 insertions, 0 deletions
diff --git a/audio/moc/Makefile b/audio/moc/Makefile
new file mode 100644
index 000000000000..fa10e190b633
--- /dev/null
+++ b/audio/moc/Makefile
@@ -0,0 +1,104 @@
+# New ports collection makefile for: moc
+# Date created: 24 July 2005
+# Whom: Revis Zinkov <rzinkov@gmail.com>
+#
+# $FreeBSD$
+#
+
+PORTNAME= moc
+PORTVERSION= 2.3.0
+CATEGORIES= audio
+MASTER_SITES= ftp://ftp.daper.net/pub/soft/moc/stable/
+
+MAINTAINER= rzinkov@gmail.com
+COMMENT= A console audio player designed to be powerful and easy to use
+
+USE_GETOPT_LONG= yes
+USE_GMAKE= yes
+USE_BZIP2= yes
+USE_AUTOTOOLS= libtool:15
+CONFIGURE_ENV= CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}"
+
+MAN8= mocp.8
+
+CPPFLAGS= -I${LOCALBASE}/include
+LDFLAGS= -L${LOCALBASE}/lib
+
+OPTIONS= JACK "JACK support" off \
+ MP3 "MP3 support" on \
+ MUSEPACK "Musepack (mpc) support" off \
+ VORBIS "Ogg Vorbis support" on \
+ FLAC "FLAC support" off \
+ SNDFILE "libsndfile support" off \
+ SPEEX "Speex support" off \
+ SAMPLERATE "libsamplerate support" off \
+ CURL "curl support (Internet streams)" on
+
+.include <bsd.port.pre.mk>
+
+.if ${OSVERSION} < 400010
+LIB_DEPENDS+= ncurses.5:${PORTSDIR}/devel/ncurses
+.endif
+
+.if defined(WITH_JACK)
+LIB_DEPENDS+= jack.0:${PORTSDIR}/audio/jack
+.else
+CONFIGURE_ARGS+= --without-jack
+.endif
+
+.if defined(WITH_MP3)
+LIB_DEPENDS+= mad.2:${PORTSDIR}/audio/mad
+PLIST_FILES+= lib/moc/decoder_plugins/libmp3_decoder.so
+.else
+CONFIGURE_ARGS+= --without-mp3
+.endif
+
+.if defined(WITH_MUSEPACK)
+LIB_DEPENDS+= mpcdec.3:${PORTSDIR}/audio/libmpcdec \
+ tag_c.0:${PORTSDIR}/audio/taglib
+PLIST_FILES+= lib/moc/decoder_plugins/libmusepack_decoder.so
+.else
+CONFIGURE_ARGS+= --without-musepack
+.endif
+
+.if defined(WITH_VORBIS)
+LIB_DEPENDS+= vorbis.3:${PORTSDIR}/audio/libvorbis
+PLIST_FILES+= lib/moc/decoder_plugins/libogg_decoder.so
+.else
+CONFIGURE_ARGS+= --without-ogg
+.endif
+
+.if defined(WITH_FLAC)
+LIB_DEPENDS+= FLAC:${PORTSDIR}/audio/flac
+PLIST_FILES+= lib/moc/decoder_plugins/libflac_decoder.so
+.else
+CONFIGURE_ARGS+= --without-flac
+.endif
+
+.if defined(WITH_SNDFILE)
+LIB_DEPENDS+= sndfile.1:${PORTSDIR}/audio/libsndfile
+PLIST_FILES+= lib/moc/decoder_plugins/libsndfile_formats_decoder.so
+.else
+CONFIGURE_ARGS+= --without-sndfile
+.endif
+
+.if defined(WITH_SPEEX)
+LIB_DEPENDS+= speex.3:${PORTSDIR}/audio/speex
+PLIST_FILES+= lib/moc/decoder_plugins/libspeex_decoder.so
+.else
+CONFIGURE_ARGS+= --without-speex
+.endif
+
+.if defined(WITH_SAMPLERATE)
+LIB_DEPENDS+= samplerate.1:${PORTSDIR}/audio/libsamplerate
+.else
+CONFIGURE_ARGS+= --without-samplerate
+.endif
+
+.if defined(WITH_CURL)
+LIB_DEPENDS+= curl.3:${PORTSDIR}/ftp/curl
+.else
+CONFIGURE_ARGS+= --without-curl
+.endif
+
+.include <bsd.port.post.mk>
diff --git a/audio/moc/distinfo b/audio/moc/distinfo
new file mode 100644
index 000000000000..1f81259b3d3e
--- /dev/null
+++ b/audio/moc/distinfo
@@ -0,0 +1,2 @@
+MD5 (moc-2.3.0.tar.bz2) = 3d5d152c28f6e40162058fc1566c8109
+SIZE (moc-2.3.0.tar.bz2) = 402954
diff --git a/audio/moc/files/patch-audio__conversion.c b/audio/moc/files/patch-audio__conversion.c
new file mode 100644
index 000000000000..8d4484c56182
--- /dev/null
+++ b/audio/moc/files/patch-audio__conversion.c
@@ -0,0 +1,45 @@
+--- audio_conversion.c.orig Wed Jun 15 18:56:46 2005
++++ audio_conversion.c Fri Jul 29 01:19:15 2005
+@@ -27,7 +27,8 @@
+ #define __USE_ISOC99 1
+
+ #include <assert.h>
+-#include <stdint.h>
++#include <inttypes.h>
++#include <limits.h>
+ #include <stdlib.h>
+ #include <math.h>
+ #include <string.h>
+@@ -43,6 +44,32 @@
+ #include "main.h"
+ #include "log.h"
+ #include "options.h"
++
++/* FreeBSD 4.x lacks these */
++
++#ifndef INT8_MIN
++#define INT8_MIN CHAR_MIN
++#endif
++
++#ifndef INT8_MAX
++#define INT8_MAX CHAR_MAX
++#endif
++
++#ifndef INT16_MIN
++#define INT16_MIN SHRT_MIN
++#endif
++
++#ifndef INT16_MAX
++#define INT16_MAX SHRT_MAX
++#endif
++
++#ifndef INT32_MIN
++#define INT32_MIN INT_MIN
++#endif
++
++#ifndef INT32_MAX
++#define INT32_MAX INT_MAX
++#endif
+
+ /* Byte order conversion */
+ /* TODO: use functions from byteswap.h if available */
diff --git a/audio/moc/files/patch-decoder__plugins_flac_flac.c b/audio/moc/files/patch-decoder__plugins_flac_flac.c
new file mode 100644
index 000000000000..7fa26bf521ab
--- /dev/null
+++ b/audio/moc/files/patch-decoder__plugins_flac_flac.c
@@ -0,0 +1,16 @@
+--- decoder_plugins/flac/flac.c.orig Fri Jul 29 01:31:54 2005
++++ decoder_plugins/flac/flac.c Fri Jul 29 01:32:11 2005
+@@ -422,11 +422,12 @@
+ static int flac_seek (void *void_data, int sec)
+ {
+ struct flac_data *data = (struct flac_data *)void_data;
++ FLAC__uint64 target_sample;
+
+ if (sec < 0 || (unsigned)sec > data->length)
+ return -1;
+
+- FLAC__uint64 target_sample = (FLAC__uint64)((sec/(double)data->length)
++ target_sample = (FLAC__uint64)((sec/(double)data->length)
+ * (double)data->total_samples);
+
+ if (FLAC__seekable_stream_decoder_seek_absolute(data->decoder,
diff --git a/audio/moc/files/patch-decoder__plugins_speex_speex.c b/audio/moc/files/patch-decoder__plugins_speex_speex.c
new file mode 100644
index 000000000000..8420e7caa0b4
--- /dev/null
+++ b/audio/moc/files/patch-decoder__plugins_speex_speex.c
@@ -0,0 +1,11 @@
+--- decoder_plugins/speex/speex.c.orig Fri Jul 29 01:34:35 2005
++++ decoder_plugins/speex/speex.c Fri Jul 29 01:34:45 2005
+@@ -17,7 +17,7 @@
+ #endif
+
+ #include <string.h>
+-#include <stdint.h>
++#include <inttypes.h>
+ #include <assert.h>
+ #include <speex/speex.h>
+ #include <speex/speex_header.h>
diff --git a/audio/moc/files/patch-io__curl.c b/audio/moc/files/patch-io__curl.c
new file mode 100644
index 000000000000..0a34e79613c7
--- /dev/null
+++ b/audio/moc/files/patch-io__curl.c
@@ -0,0 +1,11 @@
+--- io_curl.c.orig Fri Jul 29 01:21:58 2005
++++ io_curl.c Fri Jul 29 01:22:25 2005
+@@ -24,7 +24,7 @@
+ #include <unistd.h>
+ #include <errno.h>
+ #include <assert.h>
+-#include <stdint.h>
++#include <inttypes.h>
+
+ #define DEBUG
+
diff --git a/audio/moc/files/patch-server.c b/audio/moc/files/patch-server.c
new file mode 100644
index 000000000000..c97f8ee942f7
--- /dev/null
+++ b/audio/moc/files/patch-server.c
@@ -0,0 +1,12 @@
+--- server.c.orig Fri Jul 29 01:02:48 2005
++++ server.c Fri Jul 29 01:02:54 2005
+@@ -212,8 +212,8 @@
+
+ static void del_client (struct client *cli)
+ {
+- cli->socket = -1;
+ struct event *e;
++ cli->socket = -1;
+
+ /* Free the event queue - we can't just use event_queue_free(), because
+ * it can't free() the event's data. */
diff --git a/audio/moc/pkg-descr b/audio/moc/pkg-descr
new file mode 100644
index 000000000000..8f0480e74078
--- /dev/null
+++ b/audio/moc/pkg-descr
@@ -0,0 +1,12 @@
+MOC (music on console) is a console audio player designed to be powerful and
+easy to use.
+
+MOC plays smoothly, regardless of system or I/O load, because it handles the
+output buffer in a separate thread. It does not cause gaps between files,
+because the next file to be played is pre-cached while playing the current
+file.
+
+Supported file formats are: MP3, Ogg Vorbis, FLAC, Musepack (mpc), Speex, WAVE,
+AIFF, AU, SVX, Sphere Nist WAV, IRCAM SF, Creative VOC.
+
+WWW: http://moc.daper.net/
diff --git a/audio/moc/pkg-plist b/audio/moc/pkg-plist
new file mode 100644
index 000000000000..04ec0de20d42
--- /dev/null
+++ b/audio/moc/pkg-plist
@@ -0,0 +1,16 @@
+bin/mocp
+share/doc/moc/README
+share/doc/moc/THANKS
+share/doc/moc/config.example
+share/doc/moc/keymap.example
+share/moc/themes/black_theme
+share/moc/themes/example_theme
+share/moc/themes/green_theme
+share/moc/themes/nightly_theme
+share/moc/themes/transparent-background
+share/moc/themes/yellow_red_theme
+@dirrm lib/moc/decoder_plugins
+@dirrm lib/moc
+@dirrm share/moc/themes
+@dirrm share/moc
+@dirrm share/doc/moc