tremor-tools-1.0, integer-only ogg vorbis command-line player
This commit is contained in:
parent
1e4c09dad8
commit
176826b6d3
57
audio/tremor-tools/Makefile
Normal file
57
audio/tremor-tools/Makefile
Normal file
@ -0,0 +1,57 @@
|
||||
# $OpenBSD: Makefile,v 1.1.1.1 2005/06/03 01:04:36 jolan Exp $
|
||||
|
||||
COMMENT= "integer-only ogg vorbis command-line player"
|
||||
DISTNAME= vorbis-tools-1.0
|
||||
PKGNAME= ${DISTNAME:S/vorbis/tremor/}
|
||||
CATEGORIES= audio
|
||||
MASTER_SITES= http://www.vorbis.com/files/1.0/unix/
|
||||
|
||||
HOMEPAGE= http://www.xiph.org/ogg/vorbis/
|
||||
|
||||
# GPL
|
||||
PERMIT_PACKAGE_CDROM= Yes
|
||||
PERMIT_PACKAGE_FTP= Yes
|
||||
PERMIT_DISTFILES_CDROM= Yes
|
||||
PERMIT_DISTFILES_FTP= Yes
|
||||
|
||||
USE_GMAKE= Yes
|
||||
|
||||
AUTOCONF_VERSION=2.59
|
||||
AUTOMAKE_VERSION=1.4
|
||||
|
||||
BUILD_DEPENDS= ::devel/autoconf/${AUTOCONF_VERSION} \
|
||||
::devel/automake/${AUTOMAKE_VERSION} \
|
||||
::devel/metaauto
|
||||
LIB_DEPENDS= ao.3::audio/libao \
|
||||
ogg.5::audio/libogg \
|
||||
vorbisidec.1::audio/tremor \
|
||||
iconv.2::converters/libiconv \
|
||||
curl.2::net/curl
|
||||
|
||||
WANTLIB= c crypto pthread ssl z
|
||||
|
||||
CONFIGURE_STYLE=gnu
|
||||
CONFIGURE_ARGS+=--disable-vorbistest
|
||||
CONFIGURE_ENV= AUTOMAKE_VERSION=${AUTOMAKE_VERSION} \
|
||||
CPPFLAGS="-I${LOCALBASE}/include" \
|
||||
LDFLAGS="-L${LOCALBASE}/lib" \
|
||||
PTHREAD_CFLAGS="-pthread" PTHREAD_LIBS="-pthread"
|
||||
|
||||
pre-configure:
|
||||
cd ${WRKSRC} && env AUTOMAKE_VERSION=${AUTOMAKE_VERSION} automake
|
||||
cd ${WRKSRC} && env AUTOCONF_VERSION=${AUTOCONF_VERSION} autoconf
|
||||
@perl -pi -e s,"hardcode_libdir_flag_spec=.*",,g ${WRKSRC}/configure
|
||||
@perl -pi -e s,-O20,,g ${WRKSRC}/configure
|
||||
@perl -pi -e s,'CFLAGS="-O"','CFLAGS=""',g ${WRKSRC}/configure
|
||||
|
||||
post-patch:
|
||||
@perl -pi -e s,'/etc/ogg123rc',${SYSCONFDIR}/igg123rc,g \
|
||||
${WRKSRC}/ogg123/cfgfile_options.c
|
||||
|
||||
post-install:
|
||||
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/tremor-tools
|
||||
${INSTALL_DATA} ${WRKSRC}/ogg123/ogg123rc-example \
|
||||
${PREFIX}/share/examples/tremor-tools/igg123rc
|
||||
${INSTALL_MAN} ${WRKSRC}/ogg123/ogg123.1 ${PREFIX}/man/man1/igg123.1
|
||||
|
||||
.include <bsd.port.mk>
|
4
audio/tremor-tools/distinfo
Normal file
4
audio/tremor-tools/distinfo
Normal file
@ -0,0 +1,4 @@
|
||||
MD5 (vorbis-tools-1.0.tar.gz) = c0a9fee54835e9c5b32d1f42c02964c9
|
||||
RMD160 (vorbis-tools-1.0.tar.gz) = 2f3874699be904fdf64c6edf09e21ccb8f0eee28
|
||||
SHA1 (vorbis-tools-1.0.tar.gz) = 5c2508786cf6a2a270c697d3debe66ee83df376d
|
||||
SIZE (vorbis-tools-1.0.tar.gz) = 425404
|
14
audio/tremor-tools/patches/patch-Makefile_am
Normal file
14
audio/tremor-tools/patches/patch-Makefile_am
Normal file
@ -0,0 +1,14 @@
|
||||
$OpenBSD: patch-Makefile_am,v 1.1.1.1 2005/06/03 01:04:36 jolan Exp $
|
||||
--- Makefile.am.orig Wed Jul 10 22:26:50 2002
|
||||
+++ Makefile.am Mon Apr 11 23:29:05 2005
|
||||
@@ -2,9 +2,7 @@
|
||||
|
||||
AUTOMAKE_OPTIONS = foreign dist-zip
|
||||
|
||||
-SUBDIRS = po intl include share oggenc ogg123 vorbiscomment vcut oggdec ogginfo debian win32
|
||||
-
|
||||
-EXTRA_DIST = README AUTHORS COPYING vorbis-tools.spec acinclude.m4 config.h
|
||||
+SUBDIRS = include share ogg123
|
||||
|
||||
debug:
|
||||
$(MAKE) all CFLAGS="@DEBUG@"
|
35
audio/tremor-tools/patches/patch-aclocal_m4
Normal file
35
audio/tremor-tools/patches/patch-aclocal_m4
Normal file
@ -0,0 +1,35 @@
|
||||
$OpenBSD: patch-aclocal_m4,v 1.1.1.1 2005/06/03 01:04:36 jolan Exp $
|
||||
--- aclocal.m4.orig Fri Jul 19 09:18:51 2002
|
||||
+++ aclocal.m4 Mon Apr 11 23:29:13 2005
|
||||
@@ -139,6 +139,7 @@ AC_ARG_ENABLE(vorbistest, [ --disable-v
|
||||
fi
|
||||
|
||||
VORBISFILE_LIBS="$VORBIS_LIBS -lvorbisfile"
|
||||
+ IVORBISFILE_LIBS="$VORBIS_LIBS -lvorbisidec"
|
||||
VORBISENC_LIBS="$VORBIS_LIBS -lvorbisenc"
|
||||
VORBIS_LIBS="$VORBIS_LIBS -lvorbis -lm"
|
||||
|
||||
@@ -194,7 +195,7 @@ int main ()
|
||||
LIBS="$LIBS $VORBIS_LIBS $OGG_LIBS"
|
||||
AC_TRY_LINK([
|
||||
#include <stdio.h>
|
||||
-#include <vorbis/codec.h>
|
||||
+#include <tremor/ivorbiscodec.h>
|
||||
], [ return 0; ],
|
||||
[ echo "*** The test program compiled, but did not run. This usually means"
|
||||
echo "*** that the run-time linker is not finding Vorbis or finding the wrong"
|
||||
@@ -214,12 +215,14 @@ int main ()
|
||||
VORBIS_CFLAGS=""
|
||||
VORBIS_LIBS=""
|
||||
VORBISFILE_LIBS=""
|
||||
+ IVORBISFILE_LIBS=""
|
||||
VORBISENC_LIBS=""
|
||||
ifelse([$2], , :, [$2])
|
||||
fi
|
||||
AC_SUBST(VORBIS_CFLAGS)
|
||||
AC_SUBST(VORBIS_LIBS)
|
||||
AC_SUBST(VORBISFILE_LIBS)
|
||||
+ AC_SUBST(IVORBISFILE_LIBS)
|
||||
AC_SUBST(VORBISENC_LIBS)
|
||||
rm -f conf.vorbistest
|
||||
])
|
13
audio/tremor-tools/patches/patch-configure_in
Normal file
13
audio/tremor-tools/patches/patch-configure_in
Normal file
@ -0,0 +1,13 @@
|
||||
$OpenBSD: patch-configure_in,v 1.1.1.1 2005/06/03 01:04:36 jolan Exp $
|
||||
--- configure.in.orig Thu Jul 11 09:10:34 2002
|
||||
+++ configure.in Mon Apr 11 23:29:15 2005
|
||||
@@ -19,9 +19,6 @@ CFLAGS="$cflags_save"
|
||||
|
||||
AM_PROG_LIBTOOL
|
||||
|
||||
-ALL_LINGUAS="fr nl sv"
|
||||
-AM_GNU_GETTEXT
|
||||
-
|
||||
dnl --------------------------------------------------
|
||||
dnl Set build flags based on environment
|
||||
dnl --------------------------------------------------
|
48
audio/tremor-tools/patches/patch-ogg123_Makefile_am
Normal file
48
audio/tremor-tools/patches/patch-ogg123_Makefile_am
Normal file
@ -0,0 +1,48 @@
|
||||
$OpenBSD: patch-ogg123_Makefile_am,v 1.1.1.1 2005/06/03 01:04:36 jolan Exp $
|
||||
--- ogg123/Makefile.am.orig Wed Jul 10 21:45:37 2002
|
||||
+++ ogg123/Makefile.am Thu Jun 2 15:34:53 2005
|
||||
@@ -2,9 +2,7 @@
|
||||
|
||||
AUTOMAKE_OPTIONS = foreign
|
||||
|
||||
-mans = ogg123.1
|
||||
-docs = ogg123rc-example
|
||||
-ogg123sources = audio.c buffer.c callbacks.c \
|
||||
+igg123sources = audio.c buffer.c callbacks.c \
|
||||
cfgfile_options.c cmdline_options.c \
|
||||
file_transport.c format.c http_transport.c \
|
||||
ogg123.c oggvorbis_format.c playlist.c \
|
||||
@@ -21,26 +19,23 @@ datadir = @datadir@
|
||||
localedir = $(datadir)/locale
|
||||
DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@
|
||||
|
||||
-bin_PROGRAMS = ogg123
|
||||
+bin_PROGRAMS = igg123
|
||||
docdir = $(datadir)/doc/$(PACKAGE)-$(VERSION)
|
||||
mandir = @MANDIR@
|
||||
|
||||
-INCLUDES = @OGG_CFLAGS@ @VORBIS_CFLAGS@ @AO_CFLAGS@ @CURL_CFLAGS@ \
|
||||
+INCLUDES = @OGG_CFLAGS@ @AO_CFLAGS@ @CURL_CFLAGS@ \
|
||||
@PTHREAD_CFLAGS@ @SHARE_CFLAGS@ @I18N_CFLAGS@
|
||||
|
||||
-ogg123_LDADD = @SHARE_LIBS@ \
|
||||
- @VORBISFILE_LIBS@ @VORBIS_LIBS@ @OGG_LIBS@ @AO_LIBS@ \
|
||||
+igg123_LDADD = @SHARE_LIBS@ \
|
||||
+ @IVORBISFILE_LIBS@ @OGG_LIBS@ @AO_LIBS@ \
|
||||
@SOCKET_LIBS@ @LIBICONV@ @CURL_LIBS@ @PTHREAD_CFLAGS@ \
|
||||
@PTHREAD_LIBS@ @I18N_LIBS@
|
||||
-ogg123_DEPENDENCIES = @SHARE_LIBS@
|
||||
-ogg123_SOURCES = $(ogg123sources)
|
||||
+igg123_DEPENDENCIES = @SHARE_LIBS@
|
||||
+igg123_SOURCES = $(igg123sources)
|
||||
|
||||
-man_MANS = $(mans)
|
||||
-doc_DATA = $(docs)
|
||||
-
|
||||
endif
|
||||
|
||||
-EXTRA_DIST = $(ogg123sources) $(mans) $(docs)
|
||||
+EXTRA_DIST = $(igg123sources)
|
||||
|
||||
|
||||
debug:
|
20
audio/tremor-tools/patches/patch-ogg123_ogg123_c
Normal file
20
audio/tremor-tools/patches/patch-ogg123_ogg123_c
Normal file
@ -0,0 +1,20 @@
|
||||
$OpenBSD: patch-ogg123_ogg123_c,v 1.1.1.1 2005/06/03 01:04:36 jolan Exp $
|
||||
--- ogg123/ogg123.c.orig Sat Jul 6 14:12:18 2002
|
||||
+++ ogg123/ogg123.c Mon Apr 11 23:29:11 2005
|
||||
@@ -453,6 +453,16 @@ void play (char *source_string)
|
||||
return;
|
||||
}
|
||||
|
||||
+ if ((new_audio_fmt.big_endian != (BYTE_ORDER == BIG_ENDIAN)) ||
|
||||
+ new_audio_fmt.signed_sample != 1 ||
|
||||
+ new_audio_fmt.word_size != 2)
|
||||
+ {
|
||||
+ /* Tremor can only do big_endian, signed, 16 bit samples */
|
||||
+ status_error(_("Error, Tremor can only decode signed 16 bit PCM "
|
||||
+ "host endian.\n"));
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
/* Decide which statistics are valid */
|
||||
select_stats(stat_format, &options, source, decoder, audio_buffer);
|
||||
|
45
audio/tremor-tools/patches/patch-ogg123_oggvorbis_format_c
Normal file
45
audio/tremor-tools/patches/patch-ogg123_oggvorbis_format_c
Normal file
@ -0,0 +1,45 @@
|
||||
$OpenBSD: patch-ogg123_oggvorbis_format_c,v 1.1.1.1 2005/06/03 01:04:36 jolan Exp $
|
||||
--- ogg123/oggvorbis_format.c.orig Fri Jul 19 05:31:53 2002
|
||||
+++ ogg123/oggvorbis_format.c Mon Apr 11 23:29:08 2005
|
||||
@@ -19,8 +19,8 @@
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <ogg/ogg.h>
|
||||
-#include <vorbis/codec.h>
|
||||
-#include <vorbis/vorbisfile.h>
|
||||
+#include <tremor/ivorbiscodec.h>
|
||||
+#include <tremor/ivorbisfile.h>
|
||||
#include "transport.h"
|
||||
#include "format.h"
|
||||
#include "utf8.h"
|
||||
@@ -150,8 +150,7 @@ int ovf_read (decoder_t *decoder, void *
|
||||
while (nbytes > 0) {
|
||||
|
||||
old_section = priv->current_section;
|
||||
- ret = ov_read(&priv->vf, ptr, nbytes, audio_fmt->big_endian,
|
||||
- audio_fmt->word_size, audio_fmt->signed_sample,
|
||||
+ ret = ov_read(&priv->vf, ptr, nbytes,
|
||||
&priv->current_section);
|
||||
|
||||
if (ret == 0) {
|
||||
@@ -193,15 +192,17 @@ int ovf_read (decoder_t *decoder, void *
|
||||
}
|
||||
|
||||
|
||||
-int ovf_seek (decoder_t *decoder, double offset, int whence)
|
||||
+int ovf_seek (decoder_t *decoder, double aoffset, int whence)
|
||||
{
|
||||
ovf_private_t *priv = decoder->private;
|
||||
int ret;
|
||||
- double cur;
|
||||
+ ogg_int64_t cur;
|
||||
+ ogg_int64_t offset = (aoffset * 1000);
|
||||
+
|
||||
|
||||
if (whence == DECODER_SEEK_CUR) {
|
||||
cur = ov_time_tell(&priv->vf);
|
||||
- if (cur >= 0.0)
|
||||
+ if (cur >= 0)
|
||||
offset += cur;
|
||||
else
|
||||
return 0;
|
2
audio/tremor-tools/pkg/DESCR
Normal file
2
audio/tremor-tools/pkg/DESCR
Normal file
@ -0,0 +1,2 @@
|
||||
tremor-tools is a conversion of ogg123 (now igg123) to use the
|
||||
integer-only decoder known as tremor.
|
7
audio/tremor-tools/pkg/PLIST
Normal file
7
audio/tremor-tools/pkg/PLIST
Normal file
@ -0,0 +1,7 @@
|
||||
@comment $OpenBSD: PLIST,v 1.1.1.1 2005/06/03 01:04:36 jolan Exp $
|
||||
bin/igg123
|
||||
@man man/man1/igg123.1
|
||||
share/examples/tremor-tools/
|
||||
share/examples/tremor-tools/igg123rc
|
||||
@cwd ${SYSCONFDIR}
|
||||
@extra igg123rc
|
Loading…
Reference in New Issue
Block a user