Attached is an update to an up to date snapshot of the Tremor decoder.
What is currently in the ports tree is pretty old and has a few security
related issues and there have been a good number of bug fixes along the
way as well. Also attached are some fixes for the dependent ports.

Tested on amd64 with xmms-tremor/xmms2/tremor-tools.

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

Index: Makefile
===================================================================
RCS file: /home/cvs/ports/audio/tremor/Makefile,v
retrieving revision 1.17
diff -u -p -r1.17 Makefile
--- Makefile    17 Aug 2011 12:38:35 -0000      1.17
+++ Makefile    11 Apr 2012 00:13:45 -0000
@@ -2,10 +2,12 @@
 
 COMMENT=       integer-only, fully Ogg Vorbis compliant decoder library
 
-DISTNAME=      tremor-20080326
-REVISION=      0
-SHARED_LIBS += vorbisidec           2.0      # .1.2
+DISTNAME=      tremor-20120410
 CATEGORIES=    audio
+MASTER_SITES=  http://comstyle.com/source/
+EXTRACT_SUFX=  .tar.bz2
+
+SHARED_LIBS=   vorbisidec      3.0
 
 HOMEPAGE=      http://www.xiph.org/vorbis/
 
@@ -15,25 +17,24 @@ PERMIT_DISTFILES_FTP=       Yes
 PERMIT_PACKAGE_CDROM=  Yes
 PERMIT_PACKAGE_FTP=    Yes
 
-MASTER_SITES=  http://distfiles.bsdfrog.org/                       
+WANTLIB=       ogg
+
+LIB_DEPENDS=   audio/libogg
 
 # autogen.sh needs libtoolize
 BUILD_DEPENDS=         ${MODGNU_AUTOCONF_DEPENDS} \
                        ${MODGNU_AUTOMAKE_DEPENDS} \
                        devel/libtool
 
-AUTOCONF_VERSION=2.61
-AUTOMAKE_VERSION=1.9
+AUTOCONF_VERSION=      2.61
+AUTOMAKE_VERSION=      1.10
 
 USE_LIBTOOL=   Yes
-CONFIGURE_STYLE=gnu
+CONFIGURE_STYLE= gnu
 
 WRKDIST=       ${WRKDIR}/Tremor
 
-post-extract:
-       @perl -pi -e 's/\r\n/\n/g' ${WRKSRC}/Version_script.in
-
-pre-configure:
+post-patch:
        @cd ${WRKSRC} && env AUTOCONF_VERSION=${AUTOCONF_VERSION} \
            AUTOMAKE_VERSION=${AUTOMAKE_VERSION} ./autogen.sh
 
Index: distinfo
===================================================================
RCS file: /home/cvs/ports/audio/tremor/distinfo,v
retrieving revision 1.3
diff -u -p -r1.3 distinfo
--- distinfo    7 Apr 2008 04:08:35 -0000       1.3
+++ distinfo    11 Apr 2012 00:14:29 -0000
@@ -1,5 +1,5 @@
-MD5 (tremor-20080326.tar.gz) = //zUUE/tHg9nxv1fTvJJ/w==
-RMD160 (tremor-20080326.tar.gz) = 5SPJbqKCzgCC4i2QCDAKWPniWIo=
-SHA1 (tremor-20080326.tar.gz) = 7p0VLjkcSlY3Bn9pLhWR7Eycu6Q=
-SHA256 (tremor-20080326.tar.gz) = TIqNDWm6RsdEZpy19fNmi6+xWnqdeWbteLVi1G4wxUY=
-SIZE (tremor-20080326.tar.gz) = 313582
+MD5 (tremor-20120410.tar.bz2) = eXAO0PXXjhsQi0zZ/Q13sw==
+RMD160 (tremor-20120410.tar.bz2) = QvPTs7uOeACVa9ZuHtapOXhE2fM=
+SHA1 (tremor-20120410.tar.bz2) = BHdlg+w+DZImxXZkI5Ojz9EQucA=
+SHA256 (tremor-20120410.tar.bz2) = RM3oW90YOsiG9Vjf57Ms03BdmgdtONrQTu7l+dc7tOA=
+SIZE (tremor-20120410.tar.bz2) = 256053
Index: patches/patch-Version_script_in
===================================================================
RCS file: patches/patch-Version_script_in
diff -N patches/patch-Version_script_in
--- patches/patch-Version_script_in     17 Aug 2011 12:38:35 -0000      1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,21 +0,0 @@
-$OpenBSD: patch-Version_script_in,v 1.1 2011/08/17 12:38:35 jasper Exp $
---- Version_script.in.orig     Sat Jul 30 20:16:15 2011
-+++ Version_script.in  Sat Jul 30 20:21:11 2011
-@@ -43,6 +43,17 @@
-               vorbis_comment_query;
-               vorbis_comment_query_count;
-               vorbis_comment_clear;
-+              vorbis_block_init;
-+              vorbis_block_clear;
-+              vorbis_dsp_clear;
-+              vorbis_synthesis_headerin;
-+              vorbis_synthesis_init;
-+              vorbis_synthesis_restart;
-+              vorbis_synthesis;
-+              vorbis_synthesis_blockin;
-+              vorbis_synthesis_pcmout;
-+              vorbis_synthesis_read;
-+              vorbis_packet_blocksize;
- 
-       local:
-               *;
Index: patches/patch-configure_in
===================================================================
RCS file: /home/cvs/ports/audio/tremor/patches/patch-configure_in,v
retrieving revision 1.1
diff -u -p -r1.1 patch-configure_in
--- patches/patch-configure_in  17 Aug 2011 12:38:35 -0000      1.1
+++ patches/patch-configure_in  5 Oct 2011 05:23:48 -0000
@@ -1,7 +1,7 @@
 $OpenBSD: patch-configure_in,v 1.1 2011/08/17 12:38:35 jasper Exp $
---- configure.in.orig  Tue Mar 25 22:56:24 2008
-+++ configure.in       Sat Jul 30 20:33:10 2011
-@@ -59,13 +59,13 @@ else
+--- configure.in.orig  Wed Oct  5 01:12:59 2011
++++ configure.in       Wed Oct  5 01:23:43 2011
+@@ -62,13 +62,13 @@ else
          case $host in 
          arm-*-*)
                  DEBUG="-g -Wall -D__NO_MATH_INLINES -fsigned-char 
-D_ARM_ASSEM_"
@@ -19,21 +19,3 @@ $OpenBSD: patch-configure_in,v 1.1 2011/
          esac
  fi
  CFLAGS="$CFLAGS $cflags_save -D_REENTRANT"
-@@ -76,16 +76,7 @@ LDFLAGS="$LDFLAGS $ldflags_save"
- AC_PROG_LD
- AC_PROG_LD_GNU
- if test "x$lt_cv_prog_gnu_ld" = "xyes"; then
--   SHLIB_VERSION_ARG="Wl,--version-script=Version_script"
--
--   dnl Set extra linker options
--   case "$target_os" in
--  linux* | solaris* )
--    SHLIB_VERSION_ARG="-Wl,--version-script=Version_script"
--    ;;
--  *)
--    ;;
--   esac
-+   SHLIB_VERSION_ARG="-Wl,--version-script=Version_script"
-    LDFLAGS="$LDFLAGS $SHLIB_VERSION_ARG"
- fi
- 
Index: pkg/PLIST
===================================================================
RCS file: /home/cvs/ports/audio/tremor/pkg/PLIST,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 PLIST
--- pkg/PLIST   15 Apr 2005 02:21:31 -0000      1.1.1.1
+++ pkg/PLIST   5 Oct 2011 05:30:23 -0000
@@ -4,7 +4,7 @@ include/tremor/
 include/tremor/config_types.h
 include/tremor/ivorbiscodec.h
 include/tremor/ivorbisfile.h
-include/tremor/ogg.h
-include/tremor/os_types.h
 lib/libvorbisidec.a
 lib/libvorbisidec.la
+lib/pkgconfig/
+lib/pkgconfig/vorbisidec.pc
Index: Makefile
===================================================================
RCS file: /home/cvs/ports/games/uqm/Makefile,v
retrieving revision 1.29
diff -u -p -r1.29 Makefile
--- Makefile    18 Nov 2011 12:38:00 -0000      1.29
+++ Makefile    13 Apr 2012 05:31:31 -0000
@@ -23,7 +23,7 @@ SUPDISTFILES=         ${MDIST} ${VDIST} ${RM1DI
 DIST_SUBDIR=           uqm
 CATEGORIES=            games x11
 PKGNAME-main=          uqm-0.6.2
-REVISION-main =                1
+REVISION-main =                2
 PKGNAME-content=       uqm-content-${VER}
 PKGNAME-remix1=                uqm-remix1-${VER}
 PKGNAME-remix2=                uqm-remix2-${VER}
@@ -42,7 +42,7 @@ PERMIT_DISTFILES_CDROM=       Yes
 PERMIT_DISTFILES_FTP=  Yes
 
 LIB_DEPENDS-main=      audio/libmikmod \
-                       audio/tremor \
+                       audio/tremor>=20120410 \
                        devel/sdl-image
 PKG_ARCH-content=      *
 PKG_ARCH-remix1=       *
@@ -53,7 +53,7 @@ PKG_ARCH-voice=               *
 RUN_DEPENDS=           ${PKGNAME-main}:games/uqm
 RUN_DEPENDS-content=   
 RUN_DEPENDS-main=      ${PKGNAME-content}:games/uqm,-content
-WANTLIB-main=          c m pthread z SDL mikmod>=2.4 vorbisidec>=1 \
+WANTLIB-main=          c m pthread z SDL mikmod>=2.4 vorbisidec>=3 \
                        SDL_image
 
 NO_REGRESS=    Yes
Index: patches/patch-sc2_src_sc2code_libs_sound_decoders_oggaud_c
===================================================================
RCS file: patches/patch-sc2_src_sc2code_libs_sound_decoders_oggaud_c
diff -N patches/patch-sc2_src_sc2code_libs_sound_decoders_oggaud_c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-sc2_src_sc2code_libs_sound_decoders_oggaud_c  13 Apr 2012 
05:29:27 -0000
@@ -0,0 +1,14 @@
+$OpenBSD$
+--- sc2/src/sc2code/libs/sound/decoders/oggaud.c.orig  Fri Apr 13 01:18:24 2012
++++ sc2/src/sc2code/libs/sound/decoders/oggaud.c       Fri Apr 13 01:28:54 2012
+@@ -270,10 +270,6 @@ ova_GetFrame (THIS_PTR)
+       TFB_OggSoundDecoder* ova = (TFB_OggSoundDecoder*) This;
+       // this is the closest to a frame there is in ogg vorbis stream
+       // doesn't seem to be a func to retrive it
+-#ifdef OVCODEC_TREMOR
+-      return ova->vf.os->pageno;
+-#else
+       return ova->vf.os.pageno;
+-#endif  /* OVCODEC_TREMOR */
+ }
+ 
Index: Makefile
===================================================================
RCS file: /home/cvs/ports/audio/xmms-tremor/Makefile,v
retrieving revision 1.14
diff -u -p -r1.14 Makefile
--- Makefile    12 Oct 2011 12:54:31 -0000      1.14
+++ Makefile    13 Apr 2012 06:49:14 -0000
@@ -3,7 +3,7 @@ SHARED_ONLY=    Yes
 
 COMMENT=       Ogg Vorbis input plugin for XMMS using tremor
 DISTNAME=      xmms-tremor-1.0
-REVISION=      5
+REVISION=      6
 EXTRACT_SUFX=  .tar.bz2
 CATEGORIES=    audio
 MASTER_SITES=  http://mirror1.pdaxrom.org/source/src/
@@ -14,18 +14,19 @@ PERMIT_DISTFILES_FTP=       Yes
 PERMIT_PACKAGE_CDROM=  Yes
 PERMIT_PACKAGE_FTP=    Yes
 
-LIB_DEPENDS=   audio/tremor
+LIB_DEPENDS=   audio/tremor>=20120410
 BUILD_DEPENDS= ${RUN_DEPENDS}
 RUN_DEPENDS=   audio/xmms
 
-WANTLIB=       X11 Xext Xi gdk glib gmodule gtk m \
-               xcb vorbisidec>=1
+WANTLIB=       X11 Xext Xi gdk glib gmodule gtk m ogg \
+               vorbisidec>=3 xcb
 
 MODULES +=     devel/gettext
 
 USE_LIBTOOL=   Yes
 
-CONFIGURE_STYLE=gnu
+CONFIGURE_STYLE= autoconf
+AUTOCONF_VERSION= 2.57
 CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" LDFLAGS="-L${LOCALBASE}/lib"
 LIBTOOL_FLAGS= --tag=disable-static
 
Index: patches/patch-configure_ac
===================================================================
RCS file: patches/patch-configure_ac
diff -N patches/patch-configure_ac
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-configure_ac  13 Apr 2012 06:40:53 -0000
@@ -0,0 +1,12 @@
+$OpenBSD$
+--- configure.ac.orig  Fri Apr 13 02:40:25 2012
++++ configure.ac       Fri Apr 13 02:40:44 2012
+@@ -18,7 +18,7 @@ AM_PROG_LIBTOOL
+ # Checks for headers
+ AC_CHECK_HEADERS(sys/time.h fcntl.h libgen.h stdio.h assert.h sys/socket.h)
+ AC_CHECK_HEADERS(netinet/in.h arpa/inet.h netdb.h)
+-AC_CHECK_HEADERS(tremor/ogg.h tremor/ivorbiscodec.h 
tremor/ivorbisfile.h,,AC_MSG_ERROR([*** Tremor headers not installed - please 
install first ***]))
++AC_CHECK_HEADERS(tremor/ivorbiscodec.h 
tremor/ivorbisfile.h,,AC_MSG_ERROR([*** Tremor headers not installed - please 
install first ***]))
+ 
+ # Checks for libraries
+ AM_PATH_XMMS(1.2.4)
Index: patches/patch-src_fileinfo_c
===================================================================
RCS file: patches/patch-src_fileinfo_c
diff -N patches/patch-src_fileinfo_c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_fileinfo_c        13 Apr 2012 06:47:30 -0000
@@ -0,0 +1,11 @@
+$OpenBSD$
+--- src/fileinfo.c.orig        Fri Apr 13 02:44:59 2012
++++ src/fileinfo.c     Fri Apr 13 02:45:11 2012
+@@ -28,7 +28,6 @@
+ #include <pthread.h>
+ #include <glib.h>
+ #include <gtk/gtk.h>
+-#include <tremor/ogg.h>
+ #include <tremor/ivorbiscodec.h>
+ #include <tremor/ivorbisfile.h>
+ 
Index: patches/patch-src_vcedit_c
===================================================================
RCS file: patches/patch-src_vcedit_c
diff -N patches/patch-src_vcedit_c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_vcedit_c  13 Apr 2012 06:47:26 -0000
@@ -0,0 +1,11 @@
+$OpenBSD$
+--- src/vcedit.c.orig  Fri Apr 13 02:46:48 2012
++++ src/vcedit.c       Fri Apr 13 02:46:56 2012
+@@ -13,7 +13,6 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
+-#include <tremor/ogg.h>
+ #include <tremor/ivorbiscodec.h>
+ 
+ #include "vcedit.h"
Index: patches/patch-src_vcedit_h
===================================================================
RCS file: patches/patch-src_vcedit_h
diff -N patches/patch-src_vcedit_h
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_vcedit_h  13 Apr 2012 06:47:26 -0000
@@ -0,0 +1,11 @@
+$OpenBSD$
+--- src/vcedit.h.orig  Fri Apr 13 02:45:31 2012
++++ src/vcedit.h       Fri Apr 13 02:45:44 2012
+@@ -15,7 +15,6 @@ extern "C" {
+ #endif 
+ 
+ #include <stdio.h>
+-#include <tremor/ogg.h>
+ #include <tremor/ivorbiscodec.h>
+ 
+ typedef size_t (*vcedit_read_func)(void *, size_t, size_t, void *);
Index: patches/patch-src_vorbis_c
===================================================================
RCS file: patches/patch-src_vorbis_c
diff -N patches/patch-src_vorbis_c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_vorbis_c  13 Apr 2012 06:47:26 -0000
@@ -0,0 +1,11 @@
+$OpenBSD$
+--- src/vorbis.c.orig  Fri Apr 13 02:47:14 2012
++++ src/vorbis.c       Fri Apr 13 02:47:19 2012
+@@ -32,7 +32,6 @@
+ #include <pthread.h>
+ #include <glib.h>
+ #include <gtk/gtk.h>
+-#include <tremor/ogg.h>
+ #include <tremor/ivorbiscodec.h>
+ #include <tremor/ivorbisfile.h>
+ 
Index: Makefile
===================================================================
RCS file: /home/cvs/ports/multimedia/gstreamer-0.10/plugins-base/Makefile,v
retrieving revision 1.48
diff -u -p -r1.48 Makefile
--- Makefile    21 Feb 2012 08:45:43 -0000      1.48
+++ Makefile    13 Apr 2012 06:06:42 -0000
@@ -7,6 +7,7 @@ V =                     0.10.36
 DISTNAME =             gst-plugins-base-${V}
 
 PKGNAME-main =         gstreamer-plugins-base-${V}
+REVISION-main =                0
 PKGNAME-cdda =         gstreamer-cdda-${V}
 
 MULTI_PACKAGES =       -main -cdda
@@ -46,14 +47,14 @@ WANTLIB-main += Xv Xxf86vm c cairo drm e
 WANTLIB-main += gstbase-0.10 gstcontroller-0.10 gstdataprotocol-0.10
 WANTLIB-main += ogg orc-0.4 orc-test-0.4 pango-1.0 pangocairo-1.0 pangoft2-1.0
 WANTLIB-main += pixman-1 png pthread pthread-stubs stdc++ theoradec
-WANTLIB-main += theoraenc vorbis vorbisenc vorbisidec xcb xcb-render
+WANTLIB-main += theoraenc vorbis vorbisenc vorbisidec>=3 xcb xcb-render
 WANTLIB-main += xcb-shm
 LIB_DEPENDS-main =     ${LIB_DEPENDS} \
                        devel/orc>=0.4.11 \
                        audio/libvorbis \
                        devel/pango \
                        multimedia/libtheora \
-                       audio/tremor
+                       audio/tremor>=20120410
 RUN_DEPENDS-main +=    ${MODGETTEXT_RUN_DEPENDS}
 # needed for the gio plugin
 RUN_DEPENDS-main +=    x11/gnome/gvfs
Index: patches/patch-ext_vorbis_gstvorbisdeclib_h
===================================================================
RCS file: patches/patch-ext_vorbis_gstvorbisdeclib_h
diff -N patches/patch-ext_vorbis_gstvorbisdeclib_h
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-ext_vorbis_gstvorbisdeclib_h  13 Apr 2012 06:05:45 -0000
@@ -0,0 +1,116 @@
+$OpenBSD$
+--- ext/vorbis/gstvorbisdeclib.h.orig  Sun Dec 11 13:47:07 2011
++++ ext/vorbis/gstvorbisdeclib.h       Fri Apr 13 02:05:04 2012
+@@ -29,11 +29,6 @@
+ 
+ #ifndef TREMOR
+ 
+-#include <vorbis/codec.h>
+-
+-typedef float                          vorbis_sample_t;
+-typedef ogg_packet                     ogg_packet_wrapper;
+-
+ #define GST_VORBIS_DEC_DESCRIPTION "decode raw vorbis streams to float audio"
+ 
+ #define GST_VORBIS_DEC_SRC_CAPS \
+@@ -47,6 +42,42 @@ typedef ogg_packet                     ogg_packet_wrap
+ 
+ #define GST_VORBIS_DEC_GLIB_TYPE_NAME      GstVorbisDec
+ 
++#else /* TREMOR */
++
++#define GST_VORBIS_DEC_DESCRIPTION "decode raw vorbis streams to integer 
audio"
++
++#define GST_VORBIS_DEC_SRC_CAPS \
++    GST_STATIC_CAPS ("audio/x-raw-int, "   \
++        "rate = (int) [ 1, MAX ], "        \
++        "channels = (int) [ 1, 6 ], "      \
++        "endianness = (int) BYTE_ORDER, "  \
++        "width = (int) { 16, 32 }, "       \
++        "depth = (int) 16, "               \
++        "signed = (boolean) true")
++
++#define GST_VORBIS_DEC_DEFAULT_SAMPLE_WIDTH           (16)
++
++/* we need a different type name here */
++#define GST_VORBIS_DEC_GLIB_TYPE_NAME      GstIVorbisDec
++
++/* and still have it compile */
++typedef struct _GstVorbisDec               GstIVorbisDec;
++typedef struct _GstVorbisDecClass          GstIVorbisDecClass;
++
++#endif /* TREMOR */
++
++#ifndef USE_TREMOLO
++
++#ifdef TREMOR
++ #include <tremor/ivorbiscodec.h>
++ typedef ogg_int32_t                    vorbis_sample_t;
++#else
++ #include <vorbis/codec.h>
++ typedef float                          vorbis_sample_t;
++#endif
++
++typedef ogg_packet                     ogg_packet_wrapper;
++
+ static inline guint8 *
+ gst_ogg_packet_data (ogg_packet * p)
+ {
+@@ -72,17 +103,11 @@ gst_ogg_packet_from_wrapper (ogg_packet_wrapper * pack
+   return packet;
+ }
+ 
+-#else
++#else /* USE_TREMOLO */
+ 
+-#ifdef USE_TREMOLO
+-  #include <Tremolo/ivorbiscodec.h>
+-  #include <Tremolo/codec_internal.h>
+-  typedef ogg_int16_t                    vorbis_sample_t;
+-#else
+-  #include <tremor/ivorbiscodec.h>
+-  typedef ogg_int32_t                    vorbis_sample_t;
+-#endif
+-
++#include <Tremolo/ivorbiscodec.h>
++#include <Tremolo/codec_internal.h>
++typedef ogg_int16_t                    vorbis_sample_t;
+ typedef struct _ogg_packet_wrapper     ogg_packet_wrapper;
+ 
+ struct _ogg_packet_wrapper {
+@@ -91,26 +116,6 @@ struct _ogg_packet_wrapper {
+   ogg_buffer          buf;
+ };
+ 
+-#define GST_VORBIS_DEC_DESCRIPTION "decode raw vorbis streams to integer 
audio"
+-
+-#define GST_VORBIS_DEC_SRC_CAPS \
+-    GST_STATIC_CAPS ("audio/x-raw-int, "   \
+-        "rate = (int) [ 1, MAX ], "        \
+-        "channels = (int) [ 1, 6 ], "      \
+-        "endianness = (int) BYTE_ORDER, "  \
+-        "width = (int) { 16, 32 }, "       \
+-        "depth = (int) 16, "               \
+-        "signed = (boolean) true")
+-
+-#define GST_VORBIS_DEC_DEFAULT_SAMPLE_WIDTH           (16)
+-
+-/* we need a different type name here */
+-#define GST_VORBIS_DEC_GLIB_TYPE_NAME      GstIVorbisDec
+-
+-/* and still have it compile */
+-typedef struct _GstVorbisDec               GstIVorbisDec;
+-typedef struct _GstVorbisDecClass          GstIVorbisDecClass;
+-
+ /* compensate minor variation */
+ #define vorbis_synthesis(a, b)             vorbis_synthesis (a, b, 1)
+ 
+@@ -154,7 +159,7 @@ gst_ogg_packet_from_wrapper (ogg_packet_wrapper * pack
+   return &(packet->packet);
+ }
+ 
+-#endif
++#endif /* USE_TREMOLO */
+ 
+ typedef void (*CopySampleFunc)(vorbis_sample_t *out, vorbis_sample_t **in,
+                            guint samples, gint channels, gint width);

Reply via email to