summaryrefslogtreecommitdiff
path: root/audio
diff options
context:
space:
mode:
authorbjs <bjs>2008-04-07 16:15:24 +0000
committerbjs <bjs>2008-04-07 16:15:24 +0000
commit0748603b24d33d07baaac9ebbee0b9c5e9be90bc (patch)
treee8afdd75b5b593bc37908dfeed7fffd2dd1653cf /audio
parent42a168241235420b169c793a6510d0a92d64ce73 (diff)
downloadpkgsrc-0748603b24d33d07baaac9ebbee0b9c5e9be90bc.tar.gz
Update to moc-2.4.3. While here, add a check for sched_get_priority_max
in librt and remove ffmpeg patch, which is no longer needed. Also, I've changed options.mk so that selecting 'samplerate' implies 'sndfile', as the former is dependent on the latter.
Diffstat (limited to 'audio')
-rw-r--r--audio/moc/Makefile16
-rw-r--r--audio/moc/distinfo12
-rw-r--r--audio/moc/options.mk19
-rw-r--r--audio/moc/patches/patch-aa307
-rw-r--r--audio/moc/patches/patch-ab16
-rw-r--r--audio/moc/patches/patch-ac10
-rw-r--r--audio/moc/patches/patch-ad77
7 files changed, 133 insertions, 324 deletions
diff --git a/audio/moc/Makefile b/audio/moc/Makefile
index b410fa03d22..d1f7ab45e0d 100644
--- a/audio/moc/Makefile
+++ b/audio/moc/Makefile
@@ -1,7 +1,6 @@
-# $NetBSD: Makefile,v 1.10 2007/01/07 12:25:52 wiz Exp $
+# $NetBSD: Makefile,v 1.11 2008/04/07 16:15:24 bjs Exp $
-DISTNAME= moc-2.4.0
-PKGREVISION= 2
+DISTNAME= moc-2.4.3
CATEGORIES= audio
MASTER_SITES= ftp://ftp.daper.net/pub/soft/moc/stable/
EXTRACT_SUFX= .tar.bz2
@@ -10,6 +9,10 @@ MAINTAINER= peter.schuller@infidyne.com
HOMEPAGE= http://moc.daper.net/
COMMENT= Curses based console audio player
+PKG_DESTDIR_SUPPORT= user-destdir
+
+CONFLICTS= moc-devel-[0-9]*
+
GNU_CONFIGURE= yes
USE_PKGLOCALEDIR= yes
USE_LIBTOOL= yes
@@ -26,6 +29,13 @@ SUBST_SED.oss= -e s,/dev/dsp,${DEVOSSAUDIO},g
SUBST_MESSAGE.oss= Fixing hardcoded audio device.
.include "options.mk"
+###
+### This target is [currently] for regenerating configure to add the
+### sched_get_priority_max check of librt.
+###
+#USE_TOOLS+= autoconf automake
+#pre-configure:
+# cd ${WRKSRC} && autoreconf -v -i
.include "../../audio/libid3tag/buildlink3.mk"
.include "../../audio/libmad/buildlink3.mk"
diff --git a/audio/moc/distinfo b/audio/moc/distinfo
index 7a6b1038892..445973258eb 100644
--- a/audio/moc/distinfo
+++ b/audio/moc/distinfo
@@ -1,6 +1,8 @@
-$NetBSD: distinfo,v 1.5 2007/01/12 20:26:05 wiz Exp $
+$NetBSD: distinfo,v 1.6 2008/04/07 16:15:25 bjs Exp $
-SHA1 (moc-2.4.0.tar.bz2) = 4741fd9098af8b1c375b5232ba460da2077a5cb8
-RMD160 (moc-2.4.0.tar.bz2) = 084411d527bbeabd7caaae5acf8a3391a2d07f8f
-Size (moc-2.4.0.tar.bz2) = 419792 bytes
-SHA1 (patch-aa) = a797dc880a550e2acdb3b6f0e362b3a27666bc72
+SHA1 (moc-2.4.3.tar.bz2) = d9b54636f51f5366e94b684ddff3e869b1c634ac
+RMD160 (moc-2.4.3.tar.bz2) = 34470535b16ab329a9055b05550028ceb0a860f7
+Size (moc-2.4.3.tar.bz2) = 459706 bytes
+SHA1 (patch-ab) = f57747c60db76ed8105f78618a4847fe018d16fc
+SHA1 (patch-ac) = d8c11caf51841021bc3d9999e1454922e89a370c
+SHA1 (patch-ad) = 9b8d44fa58312d455851de85e43dbae1cf39690f
diff --git a/audio/moc/options.mk b/audio/moc/options.mk
index 0b6eac256c8..aa301ee44f1 100644
--- a/audio/moc/options.mk
+++ b/audio/moc/options.mk
@@ -1,4 +1,4 @@
-# $NetBSD: options.mk,v 1.2 2006/02/12 18:35:55 xtraeme Exp $
+# $NetBSD: options.mk,v 1.3 2008/04/07 16:15:25 bjs Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.moc
PKG_SUPPORTED_OPTIONS= sndfile flac vorbis speex curl samplerate
@@ -6,7 +6,15 @@ PKG_SUGGESTED_OPTIONS= sndfile flac vorbis curl
.include "../../mk/bsd.options.mk"
-.if !empty(PKG_OPTIONS:Msndfile)
+.if !empty(PKG_OPTIONS:Msamplerate)
+PKG_OPTIONS+= sndfile
+CONFIGURE_ARGS+= --with-samplerate
+. include "../../audio/libsamplerate/buildlink3.mk"
+.else
+CONFIGURE_ARGS+= --without-samplerate
+.endif
+
+.if !empty(PKG_OPTIONS:Msndfile) || defined(PKG_OPTIONS:Msamplerate)
PLIST_SUBST+= SNDFILE=
CONFIGURE_ARGS+= --with-sndfile
. include "../../audio/libsndfile/buildlink3.mk"
@@ -48,10 +56,3 @@ CONFIGURE_ARGS+= --with-curl
.else
CONFIGURE_ARGS+= --without-curl
.endif
-
-.if !empty(PKG_OPTIONS:Msamplerate)
-CONFIGURE_ARGS+= --with-samplerate
-. include "../../audio/libsamplerate/buildlink3.mk"
-.else
-CONFIGURE_ARGS+= --without-samplerate
-.endif
diff --git a/audio/moc/patches/patch-aa b/audio/moc/patches/patch-aa
deleted file mode 100644
index 4d13fe599f8..00000000000
--- a/audio/moc/patches/patch-aa
+++ /dev/null
@@ -1,307 +0,0 @@
-$NetBSD: patch-aa,v 1.4 2007/01/12 20:26:05 wiz Exp $
-
---- decoder_plugins/flac/flac.c.orig 2006-02-12 11:55:10.000000000 +0000
-+++ decoder_plugins/flac/flac.c
-@@ -28,6 +28,13 @@
- #include "log.h"
- #include "io.h"
-
-+/* by LEGACY_FLAC we mean pre-1.1.3, before FLAC__SeekableStreamDecoder was merged into FLAC__StreamDecoder */
-+#if !defined(FLAC_API_VERSION_CURRENT) || FLAC_API_VERSION_CURRENT < 8
-+#define LEGACY_FLAC
-+#else
-+#undef LEGACY_FLAC
-+#endif
-+
- #define MAX_SUPPORTED_CHANNELS 2
-
- #define SAMPLES_PER_WRITE 512
-@@ -35,7 +42,11 @@
-
- struct flac_data
- {
-+#ifdef LEGACY_FLAC
- FLAC__SeekableStreamDecoder *decoder;
-+#else
-+ FLAC__StreamDecoder *decoder;
-+#endif
- struct io_stream *stream;
- int bitrate;
- int abort; /* abort playing (due to an error) */
-@@ -109,7 +120,11 @@ static size_t pack_pcm_signed (FLAC__byt
- }
-
- static FLAC__StreamDecoderWriteStatus write_callback (
-+#ifdef LEGACY_FLAC
- const FLAC__SeekableStreamDecoder *decoder ATTR_UNUSED,
-+#else
-+ const FLAC__StreamDecoder *decoder ATTR_UNUSED,
-+#endif
- const FLAC__Frame *frame,
- const FLAC__int32 * const buffer[], void *client_data)
- {
-@@ -127,7 +142,11 @@ static FLAC__StreamDecoderWriteStatus wr
- }
-
- static void metadata_callback (
-+#ifdef LEGACY_FLAC
- const FLAC__SeekableStreamDecoder *decoder ATTR_UNUSED,
-+#else
-+ const FLAC__StreamDecoder *decoder ATTR_UNUSED,
-+#endif
- const FLAC__StreamMetadata *metadata, void *client_data)
- {
- struct flac_data *data = (struct flac_data *)client_data;
-@@ -147,7 +166,11 @@ static void metadata_callback (
- }
-
- static void error_callback (
-+#ifdef LEGACY_FLAC
- const FLAC__SeekableStreamDecoder *decoder ATTR_UNUSED,
-+#else
-+ const FLAC__StreamDecoder *decoder ATTR_UNUSED,
-+#endif
- FLAC__StreamDecoderErrorStatus status, void *client_data)
- {
- struct flac_data *data = (struct flac_data *)client_data;
-@@ -160,9 +183,15 @@ static void error_callback (
- decoder_error (&data->error, ERROR_FATAL, 0, "FLAC: lost sync");
- }
-
-+#ifdef LEGACY_FLAC
- static FLAC__SeekableStreamDecoderReadStatus read_callback (
- const FLAC__SeekableStreamDecoder *decoder ATTR_UNUSED,
- FLAC__byte buffer[], unsigned *bytes, void *client_data)
-+#else
-+static FLAC__StreamDecoderReadStatus read_callback (
-+ const FLAC__StreamDecoder *decoder ATTR_UNUSED,
-+ FLAC__byte buffer[], size_t *bytes, void *client_data)
-+#endif
- {
- struct flac_data *data = (struct flac_data *)client_data;
- ssize_t res;
-@@ -171,52 +200,97 @@ static FLAC__SeekableStreamDecoderReadSt
-
- if (res > 0) {
- *bytes = res;
-+#ifdef LEGACY_FLAC
-+ return FLAC__SEEKABLE_STREAM_DECODER_READ_STATUS_OK;
-+#else
- return FLAC__STREAM_DECODER_READ_STATUS_CONTINUE;
-+#endif
- }
-
- if (res == 0) {
- *bytes = 0;
-+ /* not sure why this works, but if it ain't broke... */
- return FLAC__STREAM_DECODER_READ_STATUS_END_OF_STREAM;
- }
-
- error ("read error: %s", io_strerror(data->stream));
-
-+#ifdef LEGACY_FLAC
-+ return FLAC__SEEKABLE_STREAM_DECODER_READ_STATUS_ERROR;
-+#else
- return FLAC__STREAM_DECODER_READ_STATUS_ABORT;
-+#endif
- }
-
-+#ifdef LEGACY_FLAC
- static FLAC__SeekableStreamDecoderSeekStatus seek_callback (
- const FLAC__SeekableStreamDecoder *decoder ATTR_UNUSED,
- FLAC__uint64 absolute_byte_offset, void *client_data)
-+#else
-+static FLAC__StreamDecoderSeekStatus seek_callback (
-+ const FLAC__StreamDecoder *decoder ATTR_UNUSED,
-+ FLAC__uint64 absolute_byte_offset, void *client_data)
-+#endif
- {
- struct flac_data *data = (struct flac_data *)client_data;
-
-+#ifdef LEGACY_FLAC
- return io_seek(data->stream, absolute_byte_offset, SEEK_SET) >= 0
- ? FLAC__SEEKABLE_STREAM_DECODER_SEEK_STATUS_OK
- : FLAC__SEEKABLE_STREAM_DECODER_SEEK_STATUS_ERROR;
-+#else
-+ return io_seek(data->stream, absolute_byte_offset, SEEK_SET) >= 0
-+ ? FLAC__STREAM_DECODER_SEEK_STATUS_OK
-+ : FLAC__STREAM_DECODER_SEEK_STATUS_ERROR;
-+#endif
- }
-
-+#ifdef LEGACY_FLAC
- static FLAC__SeekableStreamDecoderTellStatus tell_callback (
- const FLAC__SeekableStreamDecoder *decoder ATTR_UNUSED,
- FLAC__uint64 *absolute_byte_offset, void *client_data)
-+#else
-+static FLAC__StreamDecoderTellStatus tell_callback (
-+ const FLAC__StreamDecoder *decoder ATTR_UNUSED,
-+ FLAC__uint64 *absolute_byte_offset, void *client_data)
-+#endif
- {
- struct flac_data *data = (struct flac_data *)client_data;
-
- *absolute_byte_offset = io_tell (data->stream);
-+#ifdef LEGACY_FLAC
- return FLAC__SEEKABLE_STREAM_DECODER_TELL_STATUS_OK;
-+#else
-+ return FLAC__STREAM_DECODER_TELL_STATUS_OK;
-+#endif
- }
-
-+#ifdef LEGACY_FLAC
- static FLAC__SeekableStreamDecoderLengthStatus length_callback (
- const FLAC__SeekableStreamDecoder *decoder ATTR_UNUSED,
- FLAC__uint64 *stream_length, void *client_data)
-+#else
-+static FLAC__StreamDecoderLengthStatus length_callback (
-+ const FLAC__StreamDecoder *decoder ATTR_UNUSED,
-+ FLAC__uint64 *stream_length, void *client_data)
-+#endif
- {
- struct flac_data *data = (struct flac_data *)client_data;
-
- *stream_length = io_file_size (data->stream);
-+#ifdef LEGACY_FLAC
- return FLAC__SEEKABLE_STREAM_DECODER_LENGTH_STATUS_OK;
-+#else
-+ return FLAC__STREAM_DECODER_LENGTH_STATUS_OK;
-+#endif
- }
-
- static FLAC__bool eof_callback (
-+#ifdef LEGACY_FLAC
- const FLAC__SeekableStreamDecoder *decoder ATTR_UNUSED,
-+#else
-+ const FLAC__StreamDecoder *decoder ATTR_UNUSED,
-+#endif
- void *client_data)
- {
- struct flac_data *data = (struct flac_data *)client_data;
-@@ -248,6 +322,7 @@ static void *flac_open_internal (const c
-
- data->ok = 1;
-
-+#ifdef LEGACY_FLAC
- if (!(data->decoder = FLAC__seekable_stream_decoder_new())) {
- decoder_error (&data->error, ERROR_FATAL, 0,
- "FLAC__seekable_stream_decoder_new() failed");
-@@ -279,7 +354,7 @@ static void *flac_open_internal (const c
- eof_callback);
-
- if (FLAC__seekable_stream_decoder_init(data->decoder)
-- != FLAC__FILE_DECODER_OK) {
-+ != FLAC__SEEKABLE_STREAM_DECODER_OK) {
- decoder_error (&data->error, ERROR_FATAL, 0,
- "FLAC__seekable_stream_decoder_init() failed");
- data->ok = 0;
-@@ -294,6 +369,36 @@ static void *flac_open_internal (const c
- data->ok = 0;
- return data;
- }
-+#else
-+ if (!(data->decoder = FLAC__stream_decoder_new())) {
-+ decoder_error (&data->error, ERROR_FATAL, 0,
-+ "FLAC__stream_decoder_new() failed");
-+ data->ok = 0;
-+ return data;
-+ }
-+
-+ FLAC__stream_decoder_set_md5_checking (data->decoder, false);
-+
-+ FLAC__stream_decoder_set_metadata_ignore_all (data->decoder);
-+ FLAC__stream_decoder_set_metadata_respond (data->decoder,
-+ FLAC__METADATA_TYPE_STREAMINFO);
-+
-+ if (FLAC__stream_decoder_init_stream(data->decoder, read_callback, seek_callback, tell_callback, length_callback, eof_callback, write_callback, metadata_callback, error_callback, data)
-+ != FLAC__STREAM_DECODER_INIT_STATUS_OK) {
-+ decoder_error (&data->error, ERROR_FATAL, 0,
-+ "FLAC__stream_decoder_init() failed");
-+ data->ok = 0;
-+ return data;
-+ }
-+
-+ if (!FLAC__stream_decoder_process_until_end_of_metadata(data->decoder)) {
-+ decoder_error (&data->error, ERROR_FATAL, 0,
-+ "FLAC__stream_decoder_process_until_end_of_metadata()"
-+ " failed.");
-+ data->ok = 0;
-+ return data;
-+ }
-+#endif
-
- return data;
- }
-@@ -309,8 +414,13 @@ static void flac_close (void *void_data)
-
- if (data->ok) {
- if (data->decoder) {
-+#ifdef LEGACY_FLAC
- FLAC__seekable_stream_decoder_finish (data->decoder);
- FLAC__seekable_stream_decoder_delete (data->decoder);
-+#else
-+ FLAC__stream_decoder_finish (data->decoder);
-+ FLAC__stream_decoder_delete (data->decoder);
-+#endif
- }
- io_close (data->stream);
- }
-@@ -430,11 +540,19 @@ static int flac_seek (void *void_data, i
- target_sample = (FLAC__uint64)((sec/(double)data->length) *
- (double)data->total_samples);
-
-+#ifdef LEGACY_FLAC
- if (FLAC__seekable_stream_decoder_seek_absolute(data->decoder,
- target_sample))
-+#else
-+ if (FLAC__stream_decoder_seek_absolute(data->decoder, target_sample))
-+#endif
- return sec;
- else {
-+#ifdef LEGACY_FLAC
- logit ("FLAC__seekable_stream_decoder_seek_absolute() failed.");
-+#else
-+ logit ("FLAC__stream_decoder_seek_absolute() failed.");
-+#endif
- return -1;
- }
- }
-@@ -469,22 +587,34 @@ static int flac_decode (void *void_data,
- if (!data->sample_buffer_fill) {
- debug ("decoding...");
-
-- if (FLAC__seekable_stream_decoder_get_state(data->decoder)
-- == FLAC__FILE_DECODER_END_OF_FILE) {
-+#ifdef LEGACY_FLAC
-+ if (FLAC__seekable_stream_decoder_get_state(data->decoder) == FLAC__SEEKABLE_STREAM_DECODER_END_OF_STREAM)
-+#else
-+ if (FLAC__stream_decoder_get_state(data->decoder) == FLAC__STREAM_DECODER_END_OF_STREAM)
-+#endif
-+ {
- logit ("EOF");
- return 0;
- }
-
-- if (!FLAC__seekable_stream_decoder_process_single(
-- data->decoder)) {
-+#ifdef LEGACY_FLAC
-+ if (!FLAC__seekable_stream_decoder_process_single(data->decoder))
-+#else
-+ if (!FLAC__stream_decoder_process_single(data->decoder))
-+#endif
-+ {
- decoder_error (&data->error, ERROR_FATAL, 0,
- "Read error processing frame.");
- return 0;
- }
-
- /* Count the bitrate */
-+#ifdef LEGACY_FLAC
- if(!FLAC__seekable_stream_decoder_get_decode_position(
- data->decoder, &decode_position))
-+#else
-+ if(!FLAC__stream_decoder_get_decode_position(data->decoder, &decode_position))
-+#endif
- decode_position = 0;
- if (decode_position > data->last_decode_position) {
- int bytes_per_sec = bytes_per_sample * data->sample_rate
diff --git a/audio/moc/patches/patch-ab b/audio/moc/patches/patch-ab
new file mode 100644
index 00000000000..03b49a40b1c
--- /dev/null
+++ b/audio/moc/patches/patch-ab
@@ -0,0 +1,16 @@
+$NetBSD: patch-ab,v 1.1 2008/04/07 16:15:25 bjs Exp $
+
+--- configure.in.orig 2007-07-30 11:48:41.000000000 -0400
++++ configure.in
+@@ -49,7 +49,10 @@ AC_CHECK_HEADERS([fcntl.h string.h strin
+ AC_MSG_ERROR([Can't find required header files.]))
+ AC_CHECK_HEADERS([sys/select.h inttypes.h limits.h stdint.h])
+
+-AC_CHECK_FUNCS([sched_get_priority_max])
++AC_CHECK_FUNCS([sched_get_priority_max], ,
++ [AC_CHECK_LIB([rt],
++ [sched_get_priority_max],
++ [EXTRA_LIBS="$EXTRA_LIBS -lrt"])])
+
+ dnl langinfo
+ AC_CHECK_HEADERS([langinfo.h])
diff --git a/audio/moc/patches/patch-ac b/audio/moc/patches/patch-ac
new file mode 100644
index 00000000000..973ae99d8fc
--- /dev/null
+++ b/audio/moc/patches/patch-ac
@@ -0,0 +1,10 @@
+$NetBSD: patch-ac,v 1.1 2008/04/07 16:15:25 bjs Exp $
+
+--- Makefile.am.orig 2006-02-12 06:55:10.000000000 -0500
++++ Makefile.am
+@@ -1,4 +1,5 @@
+ SUBDIRS = themes decoder_plugins
++ACLOCAL_AMFLAGS = -I m4
+ AM_CPPFLAGS = -DSYSTEM_THEMES_DIR=\"$(pkgdatadir)/themes\" \
+ -DPLUGIN_DIR=\"$(plugindir)/$(DECODER_PLUGIN_DIR)\"
+
diff --git a/audio/moc/patches/patch-ad b/audio/moc/patches/patch-ad
new file mode 100644
index 00000000000..f895f59c10f
--- /dev/null
+++ b/audio/moc/patches/patch-ad
@@ -0,0 +1,77 @@
+$NetBSD: patch-ad,v 1.1 2008/04/07 16:15:25 bjs Exp $
+
+--- configure.orig 2008-04-07 11:52:43.000000000 -0400
++++ configure
+@@ -22583,6 +22805,72 @@ if test `eval echo '${'$as_ac_var'}'` =
+ #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+ _ACEOF
+
++else
++ { echo "$as_me:$LINENO: checking for sched_get_priority_max in -lrt" >&5
++echo $ECHO_N "checking for sched_get_priority_max in -lrt... $ECHO_C" >&6; }
++if test "${ac_cv_lib_rt_sched_get_priority_max+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_check_lib_save_LIBS=$LIBS
++LIBS="-lrt $LIBS"
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char sched_get_priority_max ();
++int
++main ()
++{
++return sched_get_priority_max ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } && {
++ test -z "$ac_c_werror_flag" ||
++ test ! -s conftest.err
++ } && test -s conftest$ac_exeext &&
++ $as_test_x conftest$ac_exeext; then
++ ac_cv_lib_rt_sched_get_priority_max=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_lib_rt_sched_get_priority_max=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
++ conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_rt_sched_get_priority_max" >&5
++echo "${ECHO_T}$ac_cv_lib_rt_sched_get_priority_max" >&6; }
++if test $ac_cv_lib_rt_sched_get_priority_max = yes; then
++ EXTRA_LIBS="$EXTRA_LIBS -lrt"
++fi
++
+ fi
+ done
+