--- /dev/null
+--- freecraft-020630/src/sound/flac.c.orig Sun Jun 16 18:52:49 2002
++++ freecraft-020630/src/sound/flac.c Sun Dec 22 21:38:31 2002
+@@ -96,10 +96,10 @@
+ if ((i = CLread(f, buffer, *bytes)) != *bytes) {
+ *bytes = i;
+ if (!i) {
+- return FLAC__STREAM_DECODER_READ_END_OF_STREAM;
++ return FLAC__STREAM_DECODER_READ_STATUS_END_OF_STREAM;
+ }
+ }
+- return FLAC__STREAM_DECODER_READ_CONTINUE;
++ return FLAC__STREAM_DECODER_READ_STATUS_CONTINUE;
+ }
+
+ /**
+@@ -111,7 +111,7 @@
+ */
+ local void FLAC_metadata_callback(
+ const FLAC__StreamDecoder * stream __attribute__((unused)),
+- const FLAC__StreamMetaData * metadata, void *user)
++ const FLAC__StreamMetadata * metadata, void *user)
+ {
+ Sample *sample;
+
+@@ -139,7 +139,7 @@
+ */
+ local FLAC__StreamDecoderWriteStatus FLAC_write_callback(const
+ FLAC__StreamDecoder * stream __attribute__((unused)),
+- const FLAC__Frame * frame, const FLAC__int32 * buffer[], void *user)
++ const FLAC__Frame * frame, const FLAC__int32 * const buffer[], void *user)
+ {
+ Sample *sample;
+ int i;
+@@ -187,7 +187,7 @@
+ ExitFatal(-1);
+ }
+
+- return FLAC__STREAM_DECODER_WRITE_CONTINUE;
++ return FLAC__STREAM_DECODER_WRITE_STATUS_CONTINUE;
+ }
+
+ /**
#
# TODO:
# - build all svga/sdl/X versions instead of bconds
-# - does %{_datadir}/games contain any binaries??? if so, they must be moved!
#
# Conditional build:
-# _with_svga - SVGALIB Suppor
-# _with_sdl - SDL Support
-# _with_sdlsvga - SDL/SVGALIB Support
-# _with_cda_internal - internal CD Audio Support
-# _with_cda_sdl - SDL CD Audio Support
-# _with_wc2 - WarCraft 2 Expansion CD
+# video (default: X11-only version):
+# _with_svga - SVGALIB version
+# _with_sdl - SDL version
+# _with_sdlsvga - SDL/SVGALIB version
+# CD-Audio support:
+# _with_cda_internal - internal CD Audio Support
+# _with_cda_sdl - SDL CD Audio Support
+# other:
+# _with_flac - with FLAC audio codec support
+# _with_wc2 - WarCraft 2 Expansion CD
#
Summary: Free cross-platform real-time strategy gaming engine
Summary(pl): Wolnodostêpny, miêdzyplatformowy silnik gier strategicznych czasu rzeczywistego
Patch0: %{name}-opt.patch
Patch1: %{name}-nonint.patch
Patch2: %{name}-fix.patch
+Patch3: %{name}-flac-update.patch
URL: http://freecraft.sourceforge.net/
%{?_with_sdl:BuildRequires: SDL-devel}
%{?_with_sdlsvga:BuildRequires: SDL-devel}
BuildRequires: bzip2-devel
-#BuildRequires: flac-devel
+%{?_with_flac:BuildRequires: flac-devel >= 1.0.3}
BuildRequires: libpng-devel
BuildRequires: libvorbis-devel
BuildRequires: mad-devel
# threaded sound
WITH_THREADEDSOUND="y"; export WITH_THREADEDSOUND
-# FLAC support (not working jet)
-WITH_FLAC="n"; export WITH_FLAC
+# FLAC support
+WITH_FLAC="%{?_with_flac:y}%{!?_with_flac:n}"; export WITH_FLAC
# OGG support
WITH_OGG="y"; export WITH_OGG