rpms/ClanLib06/F-8 ClanLib-0.6.5-alsa.patch, NONE, 1.1 ClanLib-0.6.5-gcc4.3.patch, NONE, 1.1 .cvsignore, 1.2, 1.3 ClanLib06.spec, 1.6, 1.7 sources, 1.2, 1.3
Hans de Goede (jwrdegoede)
fedora-extras-commits at redhat.com
Sun Mar 9 19:45:36 UTC 2008
Author: jwrdegoede
Update of /cvs/extras/rpms/ClanLib06/F-8
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv15652
Modified Files:
.cvsignore ClanLib06.spec sources
Added Files:
ClanLib-0.6.5-alsa.patch ClanLib-0.6.5-gcc4.3.patch
Log Message:
* Sun Mar 2 2008 Hans de Goede <j.w.r.degoede at hhs.nl> 0.6.5-12
- Add support for audio output through alsa (original ClanLib only supports
OSS??), this also adds support for using pulseaudio through alsa
ClanLib-0.6.5-alsa.patch:
--- NEW FILE ClanLib-0.6.5-alsa.patch ---
diff -up /dev/null ClanLib-0.6.5/Sources/Sound/Sound/ClanSound/alsa.cpp
--- /dev/null 2008-03-02 13:00:58.162258534 +0100
+++ ClanLib-0.6.5/Sources/Sound/Sound/ClanSound/alsa.cpp 2008-03-02 13:32:17.000000000 +0100
@@ -0,0 +1,167 @@
+/*
+** ClanLib SDK
+** Copyright (c) 1997-2008 The ClanLib Team
+**
+** This software is provided 'as-is', without any express or implied
+** warranty. In no event will the authors be held liable for any damages
+** arising from the use of this software.
+**
+** Permission is granted to anyone to use this software for any purpose,
+** including commercial applications, and to alter it and redistribute it
+** freely, subject to the following restrictions:
+**
+** 1. The origin of this software must not be misrepresented; you must not
+** claim that you wrote the original software. If you use this software
+** in a product, an acknowledgment in the product documentation would be
+** appreciated but is not required.
+** 2. Altered source versions must be plainly marked as such, and must not be
+** misrepresented as being the original software.
+** 3. This notice may not be removed or altered from any source distribution.
+**
+** Note: Some of the libraries ClanLib may link to may have additional
+** requirements or restrictions.
+**
+** File Author(s):
+**
+** Magnus Norddahl
+** Hans de Goede
+** (if your name is missing here, please add it)
+*/
+
+#include "alsa.h"
+#include "API/Core/System/error.h"
+#include "API/Core/System/cl_assert.h"
+#include "API/Core/System/system.h"
+#include <iostream>
+
+#ifdef USE_CLANSOUND
+#ifdef __linux__
+
+/////////////////////////////////////////////////////////////////////////////
+// CL_SoundOutput_alsa construction:
+
+CL_SoundOutput_alsa::CL_SoundOutput_alsa() :
+ frames_in_buffer(2048), frames_in_period(512)
+{
+ int rc;
+ snd_pcm_hw_params_t *hwparams;
+ unsigned int mixing_frequency = 22050;
+
+ rc = snd_pcm_open(&handle, "default", SND_PCM_STREAM_PLAYBACK, 0);
+ if (rc < 0)
+ {
+ std::cout << "ClanSound: Warning, Couldn't open sound device, disabling sound\n";
+ handle = NULL;
+ return;
+ }
+
+ snd_pcm_hw_params_alloca(&hwparams);
+ snd_pcm_hw_params_any(handle, hwparams);
+ snd_pcm_hw_params_set_access(handle, hwparams, SND_PCM_ACCESS_RW_INTERLEAVED);
+ snd_pcm_hw_params_set_format(handle, hwparams, SND_PCM_FORMAT_S16);
+ snd_pcm_hw_params_set_channels(handle, hwparams, 2);
+ snd_pcm_hw_params_set_rate_near(handle, hwparams, &mixing_frequency, 0);
+ snd_pcm_hw_params_set_buffer_size_near(handle, hwparams, &frames_in_buffer);
+ frames_in_period = frames_in_buffer / 4;
+ snd_pcm_hw_params_set_period_size_near(handle, hwparams, &frames_in_period, 0);
+
+ rc = snd_pcm_hw_params(handle, hwparams);
+ if (rc < 0)
+ {
+ std::cout << "ClanSound: Warning, Couldn't initialize sound device, disabling sound\n";
+ snd_pcm_close(handle);
+ handle = NULL;
+ return;
+ }
+
+ snd_pcm_hw_params_get_period_size(hwparams, &frames_in_period, 0);
+ snd_pcm_hw_params_get_rate(hwparams, &mixing_frequency, 0);
+
+ float percent_wrong = mixing_frequency / (float) 22050;
+ if (percent_wrong < 0.90 || percent_wrong > 1.10)
+ {
+ snd_pcm_close(handle);
+ /* Taken from oss driver, maybe make this a warning too? */
+ throw CL_Error("ClanSound: Mixing rate (22.05 kHz) not supported by soundcard.");
+ }
+}
+
+CL_SoundOutput_alsa::~CL_SoundOutput_alsa()
+{
+ if (handle) {
+ snd_pcm_close(handle);
+ handle = NULL;
+ }
+}
+
+/////////////////////////////////////////////////////////////////////////////
+// CL_SoundOutput_alsa operations:
+
+void CL_SoundOutput_alsa::silence()
+{
+ /* Note: not supported by all hardware! */
+ if (handle)
+ snd_pcm_pause(handle, 1);
+}
+
+bool CL_SoundOutput_alsa::is_full()
+{
+ int rc;
+ snd_pcm_sframes_t delay;
+
+ if (handle == NULL) return false;
+
+ rc = snd_pcm_delay(handle, &delay);
+ if (rc < 0) {
+ std::cout << "ClanSound: Warning, snd_pcm_delay() failed!?\n";
+ return false;
+ }
+
+ /* See if there is more then one period free in the buffer */
+ return delay > (snd_pcm_sframes_t)(frames_in_buffer - frames_in_period);
+}
+
+int CL_SoundOutput_alsa::get_frag_size()
+{
+ return frames_in_period;
+}
+
+void CL_SoundOutput_alsa::write_fragment(short *data)
+{
+ snd_pcm_sframes_t rc;
+
+ if (handle == NULL) return;
+
+ switch(snd_pcm_state(handle)) {
+ case SND_PCM_STATE_XRUN:
+ case SND_PCM_STATE_SUSPENDED:
+ snd_pcm_prepare(handle);
+ break;
+ case SND_PCM_STATE_PAUSED:
+ snd_pcm_pause(handle, 0);
+ break;
+ default:
+ break;
+ }
+
+ rc = snd_pcm_writei(handle, data, frames_in_period);
+ if (rc < 0)
+ std::cout << "ClanSound: Warning, snd_pcm_writei() failed!\n";
+}
+
+void CL_SoundOutput_alsa::wait()
+{
+ if(handle == NULL)
+ {
+ CL_System::sleep(100);
+ return;
+ }
+ /* wait upto 1 second */
+ snd_pcm_wait(handle, 1000);
+}
+
+/////////////////////////////////////////////////////////////////////////////
+// CL_SoundOutput_alsa implementation:
+
+#endif
+#endif
diff -up ClanLib-0.6.5/Sources/Sound/Sound/ClanSound/oss.h.alsa ClanLib-0.6.5/Sources/Sound/Sound/ClanSound/oss.h
--- ClanLib-0.6.5/Sources/Sound/Sound/ClanSound/oss.h.alsa 2001-09-08 21:24:21.000000000 +0200
+++ ClanLib-0.6.5/Sources/Sound/Sound/ClanSound/oss.h 2008-03-02 13:18:19.000000000 +0100
@@ -10,6 +10,8 @@
#ifndef header_oss
#define header_oss
+#include "alsa.h"
+
class CL_CSOutput
{
public:
@@ -35,6 +37,9 @@ public:
private:
int dev_dsp_fd;
int frag_size;
+#ifdef __linux__
+ CL_SoundOutput_alsa *alsa;
+#endif
};
#endif
diff -up ClanLib-0.6.5/Sources/Sound/Sound/ClanSound/oss.cpp.alsa ClanLib-0.6.5/Sources/Sound/Sound/ClanSound/oss.cpp
--- ClanLib-0.6.5/Sources/Sound/Sound/ClanSound/oss.cpp.alsa 2002-07-02 22:56:33.000000000 +0200
+++ ClanLib-0.6.5/Sources/Sound/Sound/ClanSound/oss.cpp 2008-03-02 13:18:19.000000000 +0100
@@ -37,6 +37,14 @@ bool has_sound = true;
CL_CSOutput::CL_CSOutput()
{
+#ifdef __linux__
+ alsa = new CL_SoundOutput_alsa();
+ if (!alsa->handle) {
+ delete alsa;
+ alsa = NULL;
+ } else
+ return;
+#endif
dev_dsp_fd = open(DSP_DEVICE, O_WRONLY|O_NONBLOCK);
if (dev_dsp_fd == -1)
{
@@ -99,6 +107,13 @@ CL_CSOutput::CL_CSOutput()
CL_CSOutput::~CL_CSOutput()
{
+#ifdef __linux__
+ if (alsa) {
+ delete alsa;
+ alsa = NULL;
+ return;
+ }
+#endif
if (dev_dsp_fd != -1) close(dev_dsp_fd);
}
@@ -106,12 +121,22 @@ void CL_CSOutput::silence()
// Called when we have no samples to play - and wants to tell the soundcard
// about this possible event.
{
+#ifdef __linux__
+ if (alsa) {
+ alsa->silence();
+ return;
+ }
+#endif
ioctl(dev_dsp_fd, SNDCTL_DSP_POST, 0);
}
bool CL_CSOutput::is_full()
// Returns true if all fragments are filled with data.
{
+#ifdef __linux__
+ if (alsa)
+ return alsa->is_full();
+#endif
if (!has_sound) return false;
audio_buf_info info;
int err = ioctl(dev_dsp_fd, SNDCTL_DSP_GETOSPACE, &info);
@@ -128,17 +153,33 @@ bool CL_CSOutput::is_full()
int CL_CSOutput::get_frag_size()
// Returns the buffer size used by device (returned as num [stereo] samples).
{
+#ifdef __linux__
+ if (alsa)
+ return alsa->get_frag_size();
+#endif
return frag_size/4;
}
void CL_CSOutput::write_fragment(short *data)
// Writes a fragment to the soundcard.
{
+#ifdef __linux__
+ if (alsa) {
+ alsa->write_fragment(data);
+ return;
+ }
+#endif
write(dev_dsp_fd, data, frag_size);
}
void CL_CSOutput::wait()
{
+#ifdef __linux__
+ if (alsa) {
+ alsa->wait();
+ return;
+ }
+#endif
if(!has_sound)
{
CL_System::sleep(100);
diff -up /dev/null ClanLib-0.6.5/Sources/Sound/Sound/ClanSound/alsa.h
--- /dev/null 2008-03-02 13:00:58.162258534 +0100
+++ ClanLib-0.6.5/Sources/Sound/Sound/ClanSound/alsa.h 2008-03-02 13:23:03.000000000 +0100
@@ -0,0 +1,75 @@
+/*
+** ClanLib SDK
+** Copyright (c) 1997-2008 The ClanLib Team
+**
+** This software is provided 'as-is', without any express or implied
+** warranty. In no event will the authors be held liable for any damages
+** arising from the use of this software.
+**
+** Permission is granted to anyone to use this software for any purpose,
+** including commercial applications, and to alter it and redistribute it
+** freely, subject to the following restrictions:
+**
+** 1. The origin of this software must not be misrepresented; you must not
+** claim that you wrote the original software. If you use this software
+** in a product, an acknowledgment in the product documentation would be
+** appreciated but is not required.
+** 2. Altered source versions must be plainly marked as such, and must not be
+** misrepresented as being the original software.
+** 3. This notice may not be removed or altered from any source distribution.
+**
+** Note: Some of the libraries ClanLib may link to may have additional
+** requirements or restrictions.
+**
+** File Author(s):
+**
+** Magnus Norddahl
+** Hans de Goede
+** (if your name is missing here, please add it)
+*/
+
+#ifndef header_soundoutput_alsa
+#define header_soundoutput_alsa
+
+#ifdef __linux__
+
+#include <alsa/asoundlib.h>
+
+class CL_SoundOutput_alsa
+{
+//! Construction:
+public:
+ CL_SoundOutput_alsa();
+
+ ~CL_SoundOutput_alsa();
+
+//! Attributes:
+public:
+ snd_pcm_t *handle;
+ snd_pcm_uframes_t frames_in_buffer;
+ snd_pcm_uframes_t frames_in_period;
+
+//! Operations:
+public:
+ //: Called when we have no samples to play - and wants to tell the soundcard
+ //: about this possible event.
+ void silence();
+
+ //: Returns true if all fragments are filled with data.
+ bool is_full();
+
+ //: Returns the buffer size used by device (returned as num [stereo] samples).
+ int get_frag_size();
+
+ //: Writes a fragment to the soundcard.
+ void write_fragment(short *data);
+
+ //: Waits until output source isn't full anymore.
+ void wait();
+
+//! Implementation:
+private:
+};
+
+#endif
+#endif
diff -up ClanLib-0.6.5/Setup/Unix/Makefile.sound.in.alsa ClanLib-0.6.5/Setup/Unix/Makefile.sound.in
--- ClanLib-0.6.5/Setup/Unix/Makefile.sound.in.alsa 2008-03-02 13:18:19.000000000 +0100
+++ ClanLib-0.6.5/Setup/Unix/Makefile.sound.in 2008-03-02 13:30:35.000000000 +0100
@@ -42,6 +42,7 @@ OBJF_SOUND_CLANSOUND = \
Libs/Intermediate/cardplayback_clan.o \
Libs/Intermediate/mixer.o \
Libs/Intermediate/oss.o \
+ Libs/Intermediate/alsa.o \
Libs/Intermediate/cdaudio_linux.o
OBJF_SOUND_INTEL_ASM = \
@@ -51,8 +52,8 @@ OBJF_SOUND_ALL = $(OBJF_SOUND_GENERIC) $
Libs/libclanSound.so: Libs/libclanCore.so $(OBJF_SOUND_ALL)
@echo "Building Libs/libclanSound.so"
- @echo $(LINK_COMMAND) -Wl,-soname=libclanSound.so.$(D_VERSION_MAJOR) -o Libs/libclanSound.so.$(D_VERSION_MINOR) $(OBJF_SOUND_ALL) -L Libs -lclanCore
- @$(LINK_COMMAND) -Wl,-soname=libclanSound.so.$(D_VERSION_MAJOR) -o Libs/libclanSound.so.$(D_VERSION_MINOR) $(OBJF_SOUND_ALL) -L Libs -lclanCore
+ @echo $(LINK_COMMAND) -Wl,-soname=libclanSound.so.$(D_VERSION_MAJOR) -o Libs/libclanSound.so.$(D_VERSION_MINOR) $(OBJF_SOUND_ALL) -L Libs -lclanCore -lasound
+ @$(LINK_COMMAND) -Wl,-soname=libclanSound.so.$(D_VERSION_MAJOR) -o Libs/libclanSound.so.$(D_VERSION_MINOR) $(OBJF_SOUND_ALL) -L Libs -lclanCore -lasound
@ln -s -f libclanSound.so.$(D_VERSION_MINOR) Libs/libclanSound.so.$(D_VERSION_MAJOR)
@ln -s -f libclanSound.so.$(D_VERSION_MAJOR) Libs/libclanSound.so
ClanLib-0.6.5-gcc4.3.patch:
--- NEW FILE ClanLib-0.6.5-gcc4.3.patch ---
diff -up ClanLib-0.6.5/Sources/Sound/Sound/ClanSound/playback_static.cpp~ ClanLib-0.6.5/Sources/Sound/Sound/ClanSound/playback_static.cpp
--- ClanLib-0.6.5/Sources/Sound/Sound/ClanSound/playback_static.cpp~ 2008-01-04 22:10:49.000000000 +0100
+++ ClanLib-0.6.5/Sources/Sound/Sound/ClanSound/playback_static.cpp 2008-01-04 22:10:49.000000000 +0100
@@ -18,6 +18,7 @@
#ifdef USE_CLANSOUND
+#include <string.h>
#include <Sound/Sound/ClanSound/soundbuffer_static_clan.h>
#include <Sound/Sound/ClanSound/cardplayback_clan.h>
#include <Sound/Sound/ClanSound/playback_static.h>
diff -up ClanLib-0.6.5/Sources/Sound/Sound/ClanSound/soundbuffer_static_clan.cpp~ ClanLib-0.6.5/Sources/Sound/Sound/ClanSound/soundbuffer_static_clan.cpp
--- ClanLib-0.6.5/Sources/Sound/Sound/ClanSound/soundbuffer_static_clan.cpp~ 2008-01-04 22:10:28.000000000 +0100
+++ ClanLib-0.6.5/Sources/Sound/Sound/ClanSound/soundbuffer_static_clan.cpp 2008-01-04 22:10:28.000000000 +0100
@@ -22,6 +22,7 @@
#ifdef USE_CLANSOUND
+#include <string.h>
#include <API/Sound/static_soundprovider.h>
#include "API/Core/System/cl_assert.h"
#include <Sound/Sound/Generic/cardsoundbuffer_playback.h>
diff -up ClanLib-0.6.5/Sources/Sound/Sound/ClanSound/playback_stream.cpp~ ClanLib-0.6.5/Sources/Sound/Sound/ClanSound/playback_stream.cpp
--- ClanLib-0.6.5/Sources/Sound/Sound/ClanSound/playback_stream.cpp~ 2008-01-04 22:17:25.000000000 +0100
+++ ClanLib-0.6.5/Sources/Sound/Sound/ClanSound/playback_stream.cpp 2008-01-04 22:17:25.000000000 +0100
@@ -22,6 +22,7 @@
#ifdef USE_CLANSOUND
+#include <string.h>
#include <API/Core/System/mutex.h>
#include <API/Sound/stream_soundprovider.h>
#include "API/Core/System/cl_assert.h"
diff -up ClanLib-0.6.5/Sources/Sound/Sound/ClanSound/mixer.cpp~ ClanLib-0.6.5/Sources/Sound/Sound/ClanSound/mixer.cpp
--- ClanLib-0.6.5/Sources/Sound/Sound/ClanSound/mixer.cpp~ 2008-01-04 22:24:13.000000000 +0100
+++ ClanLib-0.6.5/Sources/Sound/Sound/ClanSound/mixer.cpp 2008-01-04 22:24:13.000000000 +0100
@@ -14,6 +14,8 @@
#include <Sound/Sound/ClanSound/mixer.h>
#include <Sound/Sound/ClanSound/cardplayback_clan.h>
+#include <string.h>
+
#ifdef USE_I386_ASSEMBLER
#if defined(__BORLANDC__) && !defined(USE_TASM)
#undef USE_I386_ASSEMBLER
diff -up ClanLib-0.6.5/Sources/Sound/SoundProviders/static_provider_wave.cpp~ ClanLib-0.6.5/Sources/Sound/SoundProviders/static_provider_wave.cpp
--- ClanLib-0.6.5/Sources/Sound/SoundProviders/static_provider_wave.cpp~ 2008-01-04 22:07:45.000000000 +0100
+++ ClanLib-0.6.5/Sources/Sound/SoundProviders/static_provider_wave.cpp 2008-01-04 22:07:45.000000000 +0100
@@ -20,6 +20,7 @@
#pragma warning (disable:4786)
#endif
+#include <string.h>
#include "API/Core/IOData/cl_endian.h"
#include "API/Core/IOData/inputsource_provider.h"
#include "API/Core/IOData/inputsource.h"
diff -up ClanLib-0.6.5/Sources/Sound/SoundProviders/stream_provider_wave.cpp~ ClanLib-0.6.5/Sources/Sound/SoundProviders/stream_provider_wave.cpp
--- ClanLib-0.6.5/Sources/Sound/SoundProviders/stream_provider_wave.cpp~ 2008-01-04 22:08:27.000000000 +0100
+++ ClanLib-0.6.5/Sources/Sound/SoundProviders/stream_provider_wave.cpp 2008-01-04 22:08:27.000000000 +0100
@@ -20,6 +20,7 @@
#pragma warning (disable:4786)
#endif
+#include <string.h>
#include "API/Core/System/cl_assert.h"
#include "API/Core/System/error.h"
#include "API/Core/IOData/cl_endian.h"
diff -up ClanLib-0.6.5/Sources/Sound/SoundFilters/inverse_echofilter_generic.cpp~ ClanLib-0.6.5/Sources/Sound/SoundFilters/inverse_echofilter_generic.cpp
--- ClanLib-0.6.5/Sources/Sound/SoundFilters/inverse_echofilter_generic.cpp~ 2008-01-04 22:08:58.000000000 +0100
+++ ClanLib-0.6.5/Sources/Sound/SoundFilters/inverse_echofilter_generic.cpp 2008-01-04 22:08:58.000000000 +0100
@@ -21,6 +21,7 @@
#ifdef BORLAND
#include <memory.h>
#endif
+#include <string.h>
CL_InverseEchoFilter::CL_InverseEchoFilter(int buffer_size)
{
diff -up ClanLib-0.6.5/Sources/Core/precomp.h~ ClanLib-0.6.5/Sources/Core/precomp.h
--- ClanLib-0.6.5/Sources/Core/precomp.h~ 2008-01-04 22:00:37.000000000 +0100
+++ ClanLib-0.6.5/Sources/Core/precomp.h 2008-01-04 22:00:37.000000000 +0100
@@ -33,6 +33,8 @@
#include "API/signals.h"
#include "API/Core/System/error.h"
+#include <string.h>
+
#ifdef __BORLANDC__
#define BAD_MATH
#endif
diff -up ClanLib-0.6.5/Sources/Network/Generic/netvariables_generic.h~ ClanLib-0.6.5/Sources/Network/Generic/netvariables_generic.h
--- ClanLib-0.6.5/Sources/Network/Generic/netvariables_generic.h~ 2008-01-04 22:55:25.000000000 +0100
+++ ClanLib-0.6.5/Sources/Network/Generic/netvariables_generic.h 2008-01-04 22:55:25.000000000 +0100
@@ -16,6 +16,7 @@
#define header_netvariables_generic
#include <list>
+#include <cstring>
#include "API/Core/IOData/inputsource.h"
#include "API/Core/IOData/outputsource.h"
diff -up ClanLib-0.6.5/Sources/Network/Generic/ip_address.cpp~ ClanLib-0.6.5/Sources/Network/Generic/ip_address.cpp
--- ClanLib-0.6.5/Sources/Network/Generic/ip_address.cpp~ 2008-01-04 22:56:42.000000000 +0100
+++ ClanLib-0.6.5/Sources/Network/Generic/ip_address.cpp 2008-01-04 22:56:42.000000000 +0100
@@ -11,6 +11,7 @@
------------------------------------------------------------------------
*/
+#include <string.h>
#include "API/Network/ip_address.h"
#include "API/Core/System/error.h"
diff -up ClanLib-0.6.5/Sources/Network/Generic/socket_generic.cpp~ ClanLib-0.6.5/Sources/Network/Generic/socket_generic.cpp
--- ClanLib-0.6.5/Sources/Network/Generic/socket_generic.cpp~ 2008-01-04 22:56:19.000000000 +0100
+++ ClanLib-0.6.5/Sources/Network/Generic/socket_generic.cpp 2008-01-04 22:56:19.000000000 +0100
@@ -16,6 +16,7 @@
#pragma warning (disable:4786)
#endif
+#include <string.h>
#include "socket_generic.h"
/////////////////////////////////////////////////////////////////////////////
diff -up ClanLib-0.6.5/Sources/Network/Generic/socket.cpp~ ClanLib-0.6.5/Sources/Network/Generic/socket.cpp
--- ClanLib-0.6.5/Sources/Network/Generic/socket.cpp~ 2008-01-04 22:56:00.000000000 +0100
+++ ClanLib-0.6.5/Sources/Network/Generic/socket.cpp 2008-01-04 22:56:00.000000000 +0100
@@ -25,6 +25,7 @@
#define INVALID_SOCKET -1
#endif
+#include <string.h>
#include "socket_generic.h"
#include "API/Core/System/error.h"
diff -up ClanLib-0.6.5/Sources/Display/Display/X11/display_xwindow.h~ ClanLib-0.6.5/Sources/Display/Display/X11/display_xwindow.h
--- ClanLib-0.6.5/Sources/Display/Display/X11/display_xwindow.h~ 2008-01-04 22:06:31.000000000 +0100
+++ ClanLib-0.6.5/Sources/Display/Display/X11/display_xwindow.h 2008-01-04 22:06:31.000000000 +0100
@@ -25,6 +25,7 @@
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/cursorfont.h>
+#include <string.h>
#include "target_ximage_std.h"
#include "target_ximage_shm.h"
diff -up ClanLib-0.6.5/Sources/GUI/precomp.h~ ClanLib-0.6.5/Sources/GUI/precomp.h
--- ClanLib-0.6.5/Sources/GUI/precomp.h~ 2008-01-04 22:17:09.000000000 +0100
+++ ClanLib-0.6.5/Sources/GUI/precomp.h 2008-01-04 22:17:09.000000000 +0100
@@ -4,6 +4,8 @@
#ifdef WIN32
#pragma warning (disable:4786)
+#include <string.h>
+
// Framework
#include "API/GUI/component.h"
#include "API/GUI/component_manager.h"
Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/ClanLib06/F-8/.cvsignore,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- .cvsignore 24 Jul 2006 14:03:00 -0000 1.2
+++ .cvsignore 9 Mar 2008 19:45:03 -0000 1.3
@@ -1 +1,2 @@
ClanLib-0.6.5-1.tar.gz
+ClanLib-0.6.5-generated-docs.tar.gz
Index: ClanLib06.spec
===================================================================
RCS file: /cvs/extras/rpms/ClanLib06/F-8/ClanLib06.spec,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- ClanLib06.spec 3 Aug 2007 12:31:15 -0000 1.6
+++ ClanLib06.spec 9 Mar 2008 19:45:03 -0000 1.7
@@ -1,20 +1,27 @@
Summary: Version 0.6 of this Cross platform C++ game library
Name: ClanLib06
Version: 0.6.5
-Release: 8%{?dist}
+Release: 12%{?dist}
Group: System Environment/Libraries
License: LGPLv2
URL: http://www.clanlib.org/
Source0: http://www.clanlib.org/download/legacy/ClanLib-%{version}-1.tar.gz
+# prebuild docs to avoid multilib conflicts. To regenerate untar and configure,
+# cd Documentation, make, make install HTML_PREFIX=`pwd`/html, cd ..,
+# tar cvfz ClanLib-%{version}-generated-docs.tar.gz Documentation/html
+Source1: ClanLib-%{version}-generated-docs.tar.gz
Patch0: ClanLib-0.6.5-debian.patch
Patch1: ClanLib-0.6.5-suse.patch
Patch2: ClanLib-0.6.5-tolua++.patch
Patch3: ClanLib-0.6.5-smalljpg.patch
+Patch4: ClanLib-0.6.5-gcc4.3.patch
+Patch5: ClanLib-0.6.5-alsa.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: libX11-devel libXext-devel libXt-devel libGLU-devel
BuildRequires: libICE-devel libXxf86vm-devel xorg-x11-proto-devel
BuildRequires: libvorbis-devel libpng-devel libjpeg-devel mikmod-devel
-BuildRequires: tolua++-devel Hermes-devel freetype-devel autoconf perl
+BuildRequires: tolua++-devel Hermes-devel freetype-devel autoconf
+BuildRequires: alsa-lib-devel
Provides: clanlib06 = %{version}-%{release}
%description
@@ -34,11 +41,13 @@
%prep
-%setup -q -n ClanLib-%{version}
+%setup -q -a 1 -n ClanLib-%{version}
%patch0 -p1 -z .deb
%patch1 -p1 -z .suse
%patch2 -p1 -z .tolua++
%patch3 -p1 -z .smalljpg
+%patch4 -p1 -z .gcc43
+%patch5 -p1 -z .alsa
# mark asm files as NOT needing execstack
for i in `find Sources -name '*.s'`; do
echo '.section .note.GNU-stack,"", at progbits' >> $i
@@ -51,21 +60,16 @@
ARCH_CONFIG_FLAGS=--enable-asm386
%endif
%configure --disable-dependency-tracking --disable-debug --enable-dyn \
- $ARCH_CONFIG_FLAGS
+ --disable-directfb $ARCH_CONFIG_FLAGS
tolua++ -o Sources/Lua/clanbindings.cpp Sources/Lua/clanbindings.pkg
make %{?_smp_mflags}
-pushd Documentation
-make %{?_smp_mflags}
-popd
%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
rm $RPM_BUILD_ROOT%{_libdir}/*.a
-pushd Documentation
-make install HTML_PREFIX=`pwd`/html
-popd
+chmod -x $RPM_BUILD_ROOT%{_mandir}/man1/clanlib-config.1*
%clean
@@ -92,6 +96,22 @@
%changelog
+* Sun Mar 2 2008 Hans de Goede <j.w.r.degoede at hhs.nl> 0.6.5-12
+- Add support for audio output through alsa (original ClanLib only supports
+ OSS??), this also adds support for using pulseaudio through alsa
+
+* Sun Feb 17 2008 Hans de Goede <j.w.r.degoede at hhs.nl> 0.6.5-11
+- Rebuild for new libmikmod
+- Rebuild with gcc 4.3
+
+* Fri Jan 4 2008 Hans de Goede <j.w.r.degoede at hhs.nl> 0.6.5-10
+- Fix building with gcc 4.3
+
+* Sun Oct 21 2007 Hans de Goede <j.w.r.degoede at hhs.nl> 0.6.5-9
+- Explictily disable directfb support, so that it doesn't accidentally get
+ build on system which have directfb installed
+- Fix multilib conflict in the Reference documentation (bz 340861)
+
* Fri Aug 3 2007 Hans de Goede <j.w.r.degoede at hhs.nl> 0.6.5-8
- Update License tag for new Licensing Guidelines compliance
Index: sources
===================================================================
RCS file: /cvs/extras/rpms/ClanLib06/F-8/sources,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- sources 24 Jul 2006 14:03:00 -0000 1.2
+++ sources 9 Mar 2008 19:45:03 -0000 1.3
@@ -1 +1,2 @@
7115921953ef6fa45102c28622493650 ClanLib-0.6.5-1.tar.gz
+cfc8671faa0b41c6fb21433670edc109 ClanLib-0.6.5-generated-docs.tar.gz
More information about the fedora-extras-commits
mailing list