flesh out scummvm's tremor support and enable it on arm
ok jsg@
This commit is contained in:
parent
7f690168a4
commit
4d83799a18
@ -1,4 +1,4 @@
|
||||
# $OpenBSD: Makefile,v 1.14 2005/04/16 05:54:15 jsg Exp $
|
||||
# $OpenBSD: Makefile,v 1.15 2005/06/30 02:47:48 jolan Exp $
|
||||
|
||||
.if ${MACHINE_ARCH} == "hppa"
|
||||
BROKEN= "gcc bug"
|
||||
@ -6,6 +6,7 @@ BROKEN= "gcc bug"
|
||||
|
||||
COMMENT= "graphical adventure game interpreter"
|
||||
DISTNAME= scummvm-0.7.1
|
||||
PKGNAME= ${DISTNAME}p0
|
||||
CATEGORIES= games x11 emulators
|
||||
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=scummvm/}
|
||||
|
||||
@ -18,18 +19,26 @@ PERMIT_PACKAGE_CDROM= Yes
|
||||
PERMIT_PACKAGE_FTP= Yes
|
||||
PERMIT_DISTFILES_CDROM= Yes
|
||||
PERMIT_DISTFILES_FTP= Yes
|
||||
WANTLIB= X11 Xext c m ogg pthread stdc++ usbhid z
|
||||
WANTLIB= X11 Xext c m pthread stdc++ usbhid z
|
||||
|
||||
LIB_DEPENDS= SDL::devel/sdl \
|
||||
mad.2::audio/libmad \
|
||||
mpeg2::graphics/libmpeg2 \
|
||||
vorbis.0,vorbisfile.1::audio/libvorbis \
|
||||
FLAC.5::audio/flac
|
||||
|
||||
CONFIGURE_STYLE=simple
|
||||
CONFIGURE_ARGS+=--disable-alsa --disable-debug
|
||||
CONFIGURE_ENV+= CPPFLAGS="-I${LOCALBASE}/include" \
|
||||
LDFLAGS="-L${LOCALBASE}/lib"
|
||||
|
||||
.if ${MACHINE_ARCH} == "arm"
|
||||
CONFIGURE_ARGS+=--enable-tremor --disable-vorbis
|
||||
LIB_DEPENDS+= vorbisidec.1::audio/tremor
|
||||
.else
|
||||
LIB_DEPENDS+= vorbis.0,vorbisfile.1::audio/libvorbis
|
||||
WANTLIB+= ogg
|
||||
.endif
|
||||
|
||||
NO_REGRESS= Yes
|
||||
USE_GMAKE= Yes
|
||||
USE_X11= Yes
|
||||
|
@ -1,7 +1,86 @@
|
||||
$OpenBSD: patch-configure,v 1.1 2005/04/16 05:54:15 jsg Exp $
|
||||
--- configure.orig Thu Apr 14 16:53:48 2005
|
||||
+++ configure Thu Apr 14 16:53:51 2005
|
||||
@@ -1090,7 +1090,7 @@ cat > config.mak << EOF
|
||||
$OpenBSD: patch-configure,v 1.2 2005/06/30 02:47:49 jolan Exp $
|
||||
--- configure.orig Fri Jan 7 08:14:07 2005
|
||||
+++ configure Wed Jun 29 20:50:35 2005
|
||||
@@ -15,6 +15,7 @@ CXXFLAGS="$CXXFLAGS $CPPFLAGS"
|
||||
|
||||
# default lib behaviour yes/no/auto
|
||||
_vorbis=auto
|
||||
+_tremor=auto
|
||||
_flac=auto
|
||||
_mad=auto
|
||||
_alsa=auto
|
||||
@@ -280,6 +281,9 @@ Optional Libraries:
|
||||
--with-vorbis-prefix=DIR Prefix where libvorbis is installed (optional)
|
||||
--disable-vorbis disable Ogg Vorbis support [autodetect]
|
||||
|
||||
+ --with-tremor-prefix=DIR Prefix where tremor is installed (optional)
|
||||
+ --disable-tremor disable tremor support [autodetect]
|
||||
+
|
||||
--with-mad-prefix=DIR Prefix where libmad is installed (optional)
|
||||
--disable-mad disable libmad (MP3) support [autodetect]
|
||||
|
||||
@@ -326,6 +330,8 @@ for ac_option in $@; do
|
||||
--disable-alsa) _alsa=no ;;
|
||||
--enable-vorbis) _vorbis=yes ;;
|
||||
--disable-vorbis) _vorbis=no ;;
|
||||
+ --enable-tremor) _tremor=yes ;;
|
||||
+ --disable-tremor) _tremor=no ;;
|
||||
--enable-flac) _flac=yes ;;
|
||||
--disable-flac) _flac=no ;;
|
||||
--enable-mad) _mad=yes ;;
|
||||
@@ -358,6 +364,11 @@ for ac_option in $@; do
|
||||
VORBIS_CFLAGS="-I$_prefix/include"
|
||||
VORBIS_LIBS="-L$_prefix/lib"
|
||||
;;
|
||||
+ --with-tremor-prefix=*)
|
||||
+ _prefix=`echo $ac_option | cut -d '=' -f 2`
|
||||
+ TREMOR_CFLAGS="-I$_prefix/include"
|
||||
+ TREMOR_LIBS="-L$_prefix/lib"
|
||||
+ ;;
|
||||
--with-flac-prefix=*)
|
||||
_prefix=`echo $ac_option | cut -d '=' -f 2`
|
||||
FLAC_CFLAGS="-I$_prefix/include"
|
||||
@@ -822,6 +833,31 @@ else
|
||||
fi
|
||||
echo "$_vorbis"
|
||||
|
||||
+#
|
||||
+# Check for Tremor
|
||||
+#
|
||||
+echocheck "Tremor"
|
||||
+if test "$_tremor" = auto ; then
|
||||
+ _tremor=no
|
||||
+ cat > $TMPC << EOF
|
||||
+#include <tremor/ivorbiscodec.h>
|
||||
+int main(void) { vorbis_packet_blocksize(0,0); return 0; }
|
||||
+EOF
|
||||
+cc_check $LDFLAGS $CXXFLAGS $TREMOR_CFLAGS $TREMOR_LIBS -lvorbisidec && \
|
||||
+ _tremor=yes
|
||||
+fi
|
||||
+if test "$_tremor" = yes && test "$_vorbis" = no; then
|
||||
+ _def_tremor='#define USE_TREMOR'
|
||||
+ LIBS="$LIBS $TREMOR_LIBS -lvorbisidec"
|
||||
+ INCLUDES="$INCLUDES $TREMOR_CFLAGS"
|
||||
+else
|
||||
+ if test "$_vorbis" = yes; then
|
||||
+ _tremor="no (Ogg Vorbis/Tremor support is mutually exclusive)"
|
||||
+ fi
|
||||
+ _def_tremor='#undef USE_TREMOR'
|
||||
+fi
|
||||
+echo "$_tremor"
|
||||
+
|
||||
echocheck "FLAC >= 1.0.1"
|
||||
if test "$_flac" = auto ; then
|
||||
_flac=no
|
||||
@@ -1072,6 +1108,7 @@ typedef signed $type_4_byte int32;
|
||||
|
||||
/* Libs */
|
||||
$_def_vorbis
|
||||
+$_def_tremor
|
||||
$_def_flac
|
||||
$_def_mad
|
||||
$_def_alsa
|
||||
@@ -1090,7 +1127,7 @@ cat > config.mak << EOF
|
||||
# -------- Generated by configure -----------
|
||||
|
||||
CXX := $CXX
|
||||
|
24
games/scummvm/patches/patch-sound_vorbis_cpp
Normal file
24
games/scummvm/patches/patch-sound_vorbis_cpp
Normal file
@ -0,0 +1,24 @@
|
||||
$OpenBSD: patch-sound_vorbis_cpp,v 1.1 2005/06/30 02:47:49 jolan Exp $
|
||||
--- sound/vorbis.cpp.orig Sat Nov 27 07:54:08 2004
|
||||
+++ sound/vorbis.cpp Fri Jun 24 16:14:10 2005
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
#include "sound/vorbis.h"
|
||||
|
||||
-#ifdef USE_VORBIS
|
||||
+#if defined(USE_TREMOR) || defined(USE_VORBIS)
|
||||
|
||||
#include "common/file.h"
|
||||
#include "common/util.h"
|
||||
@@ -29,7 +29,11 @@
|
||||
#include "sound/audiostream.h"
|
||||
#include "sound/audiocd.h"
|
||||
|
||||
+#ifdef USE_TREMOR
|
||||
+#include <tremor/ivorbisfile.h>
|
||||
+#else
|
||||
#include <vorbis/vorbisfile.h>
|
||||
+#endif
|
||||
|
||||
|
||||
static AudioStream *makeVorbisStream(OggVorbis_File *file, int duration);
|
Loading…
Reference in New Issue
Block a user