rpms/ClanLib/F-8 ClanLib-0.8.0-alsa.patch, NONE, 1.1 ClanLib-0.8.0-gcc43.patch, NONE, 1.1 ClanLib-0.8.0-memset.patch, NONE, 1.1 .cvsignore, 1.3, 1.4 ClanLib.spec, 1.11, 1.12 sources, 1.3, 1.4 ClanLib-0.8.0-gcc41.patch, 1.1, NONE ClanLib-0.8.0-grave_key.patch, 1.1, NONE

Hans de Goede (jwrdegoede) fedora-extras-commits at redhat.com
Sun Mar 9 18:45:58 UTC 2008


Author: jwrdegoede

Update of /cvs/extras/rpms/ClanLib/F-8
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv3540

Modified Files:
	.cvsignore ClanLib.spec sources 
Added Files:
	ClanLib-0.8.0-alsa.patch ClanLib-0.8.0-gcc43.patch 
	ClanLib-0.8.0-memset.patch 
Removed Files:
	ClanLib-0.8.0-gcc41.patch ClanLib-0.8.0-grave_key.patch 
Log Message:
* Sat Mar  8 2008 Hans de Goede <j.w.r.degoede at hhs.nl> 0.8.0-11
- Add a patch from Dave Jones fixing various wrong invocations of memset


ClanLib-0.8.0-alsa.patch:

--- NEW FILE ClanLib-0.8.0-alsa.patch ---
diff -up ClanLib-0.8.0/Sources/Sound/Makefile.am.alsa ClanLib-0.8.0/Sources/Sound/Makefile.am
--- ClanLib-0.8.0/Sources/Sound/Makefile.am.alsa	2008-03-02 10:43:33.000000000 +0100
+++ ClanLib-0.8.0/Sources/Sound/Makefile.am	2008-03-02 10:54:51.000000000 +0100
@@ -38,12 +38,15 @@ else
 libclanSound_la_SOURCES += \
 Unix/soundoutput_oss.cpp \
 Unix/soundoutput_oss.h \
+Unix/soundoutput_alsa.cpp \
+Unix/soundoutput_alsa.h \
 SoundProviders/Unix/soundprovider_recorder_oss.cpp \
 SoundProviders/Unix/soundprovider_recorder_oss.h
 endif
 
 libclanSound_la_LDFLAGS = \
   -release $(LT_RELEASE) \
-  -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
+  -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
+  -lasound
 
 # EOF #
diff -up ClanLib-0.8.0/Sources/Sound/soundoutput.cpp.alsa ClanLib-0.8.0/Sources/Sound/soundoutput.cpp
--- ClanLib-0.8.0/Sources/Sound/soundoutput.cpp.alsa	2005-10-25 12:39:25.000000000 +0200
+++ ClanLib-0.8.0/Sources/Sound/soundoutput.cpp	2008-03-02 10:48:33.000000000 +0100
@@ -40,6 +40,7 @@
 #ifdef __APPLE__
 #include "MacOSX/soundoutput_macosx.h"
 #else
+#include "Unix/soundoutput_alsa.h"
 #include "Unix/soundoutput_oss.h"
 #endif
 #endif
@@ -66,6 +67,15 @@ CL_SoundOutput::CL_SoundOutput(const CL_
 #ifdef __APPLE__
 	impl = new CL_SoundOutput_MacOSX(desc.get_mixing_frequency());
 #else
+#ifdef __linux__
+	CL_SoundOutput_alsa *alsa_impl;
+	alsa_impl = new CL_SoundOutput_alsa(desc.get_mixing_frequency());
+	if (alsa_impl->handle)
+		impl = alsa_impl;
+	else
+		delete alsa_impl;
+	if (!impl)
+#endif
 	impl = new CL_SoundOutput_OSS(desc.get_mixing_frequency());
 #endif
 #endif
diff -up ClanLib-0.8.0/Sources/Sound/Unix/soundoutput_alsa.cpp.alsa ClanLib-0.8.0/Sources/Sound/Unix/soundoutput_alsa.cpp
--- ClanLib-0.8.0/Sources/Sound/Unix/soundoutput_alsa.cpp.alsa	2008-03-02 10:49:14.000000000 +0100
+++ ClanLib-0.8.0/Sources/Sound/Unix/soundoutput_alsa.cpp	2008-03-02 11:03:43.000000000 +0100
@@ -0,0 +1,161 @@
+/*
+**  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 "Sound/precomp.h"
+#include "soundoutput_alsa.h"
+#include "API/Core/System/error.h"
+#include "API/Core/System/cl_assert.h"
+#include "API/Core/System/system.h"
+#include "API/Core/System/log.h"
+
+#ifdef __linux__
+
+/////////////////////////////////////////////////////////////////////////////
+// CL_SoundOutput_alsa construction:
+
+CL_SoundOutput_alsa::CL_SoundOutput_alsa(int mixing_frequency) :
+	CL_SoundOutput_Generic(mixing_frequency), frames_in_buffer(4096),
+	frames_in_period(1024)
+{
+	int rc;
+	snd_pcm_hw_params_t *hwparams;
+	
+	rc = snd_pcm_open(&handle, "default", SND_PCM_STREAM_PLAYBACK, 0);
+	if (rc < 0)
+	{
+		CL_Log::log("warn", "ClanSound: Couldn't open sound device, disabling sound");
+		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,
+				(unsigned int *)&this->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)
+	{
+		CL_Log::log("warn", "ClanSound: Couldn't initialize sound device, disabling sound");
+		snd_pcm_close(handle);
+		handle = NULL;
+		return;
+	}
+	
+	snd_pcm_hw_params_get_period_size(hwparams, &frames_in_period, 0);
+
+	start_mixer_thread();
+}
+
+CL_SoundOutput_alsa::~CL_SoundOutput_alsa()
+{
+	stop_mixer_thread();
+	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) {
+		CL_Log::log("debug", "ClanSound: snd_pcm_delay() failed!?");
+		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_fragment_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)
+		CL_Log::log("debug", "ClanSound: snd_pcm_writei() failed!");
+}
+
+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
diff -up ClanLib-0.8.0/Sources/Sound/Unix/soundoutput_alsa.h.alsa ClanLib-0.8.0/Sources/Sound/Unix/soundoutput_alsa.h
--- ClanLib-0.8.0/Sources/Sound/Unix/soundoutput_alsa.h.alsa	2008-03-02 10:49:20.000000000 +0100
+++ ClanLib-0.8.0/Sources/Sound/Unix/soundoutput_alsa.h	2008-03-02 10:43:09.000000000 +0100
@@ -0,0 +1,76 @@
+/*
+**  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 "../soundoutput_generic.h"
+#include <alsa/asoundlib.h> 
+
+class CL_SoundOutput_alsa : public CL_SoundOutput_Generic
+{
+//! Construction:
+public:
+	CL_SoundOutput_alsa(int mixing_frequency);
+	
+	~CL_SoundOutput_alsa();
+
+//! Attributes:
+public:
+	snd_pcm_t *handle;
+	snd_pcm_uframes_t frames_in_period;
+	snd_pcm_uframes_t frames_in_buffer;
+
+//! Operations:
+public:
+	//: Called when we have no samples to play - and wants to tell the soundcard
+	//: about this possible event.
+	virtual void silence();
+
+	//: Returns true if all fragments are filled with data.
+	virtual bool is_full();
+
+	//: Returns the buffer size used by device (returned as num [stereo] samples).
+	virtual int get_fragment_size();
+
+	//: Writes a fragment to the soundcard.
+	virtual void write_fragment(short *data);
+
+	//: Waits until output source isn't full anymore.
+	virtual void wait();
+
+//! Implementation:
+private:
+};
+
+#endif
+#endif
diff -up ClanLib-0.8.0/Sources/Sound/Makefile.in.alsa ClanLib-0.8.0/Sources/Sound/Makefile.in
--- ClanLib-0.8.0/Sources/Sound/Makefile.in.alsa	2008-03-02 10:43:38.000000000 +0100
+++ ClanLib-0.8.0/Sources/Sound/Makefile.in	2008-03-02 10:54:53.000000000 +0100
@@ -46,6 +46,8 @@ target_triplet = @target@
 @WIN32_FALSE at am__append_2 = \
 @WIN32_FALSE at Unix/soundoutput_oss.cpp \
 @WIN32_FALSE at Unix/soundoutput_oss.h \
+ at WIN32_FALSE@Unix/soundoutput_alsa.cpp \
+ at WIN32_FALSE@Unix/soundoutput_alsa.h \
 @WIN32_FALSE at SoundProviders/Unix/soundprovider_recorder_oss.cpp \
 @WIN32_FALSE at SoundProviders/Unix/soundprovider_recorder_oss.h
 
@@ -90,12 +92,13 @@ am__libclanSound_la_SOURCES_DIST =  \
 	SoundProviders/Win32/soundprovider_recorder_directsound.cpp \
 	SoundProviders/Win32/soundprovider_recorder_directsound.h \
 	Unix/soundoutput_oss.cpp Unix/soundoutput_oss.h \
+	Unix/soundoutput_alsa.cpp Unix/soundoutput_alsa.h \
 	SoundProviders/Unix/soundprovider_recorder_oss.cpp \
 	SoundProviders/Unix/soundprovider_recorder_oss.h
 am__dirstamp = $(am__leading_dot)dirstamp
 @WIN32_TRUE at am__objects_1 = Win32/soundoutput_directsound.lo \
 @WIN32_TRUE@	SoundProviders/Win32/soundprovider_recorder_directsound.lo
- at WIN32_FALSE@am__objects_2 = Unix/soundoutput_oss.lo \
+ at WIN32_FALSE@am__objects_2 = Unix/soundoutput_oss.lo Unix/soundoutput_alsa.lo \
 @WIN32_FALSE@	SoundProviders/Unix/soundprovider_recorder_oss.lo
 am_libclanSound_la_OBJECTS = SoundFilters/echofilter_generic.lo \
 	SoundFilters/fadefilter_generic.lo \
@@ -324,7 +327,8 @@ libclanSound_la_SOURCES = SoundFilters/e
 	soundprovider_session.cpp $(am__append_1) $(am__append_2)
 libclanSound_la_LDFLAGS = \
   -release $(LT_RELEASE) \
-  -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
+  -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
+  -lasound
 
 all: all-am
 
@@ -448,6 +452,8 @@ Unix/$(DEPDIR)/$(am__dirstamp):
 	@: > Unix/$(DEPDIR)/$(am__dirstamp)
 Unix/soundoutput_oss.lo: Unix/$(am__dirstamp) \
 	Unix/$(DEPDIR)/$(am__dirstamp)
+Unix/soundoutput_alsa.lo: Unix/$(am__dirstamp) \
+	Unix/$(DEPDIR)/$(am__dirstamp)
 SoundProviders/Unix/$(am__dirstamp):
 	@$(mkdir_p) SoundProviders/Unix
 	@: > SoundProviders/Unix/$(am__dirstamp)
@@ -488,6 +494,8 @@ mostlyclean-compile:
 	-rm -f SoundProviders/soundprovider_wave_session.lo
 	-rm -f Unix/soundoutput_oss.$(OBJEXT)
 	-rm -f Unix/soundoutput_oss.lo
+	-rm -f Unix/soundoutput_alsa.$(OBJEXT)
+	-rm -f Unix/soundoutput_alsa.lo
 	-rm -f Win32/soundoutput_directsound.$(OBJEXT)
 	-rm -f Win32/soundoutput_directsound.lo
 
@@ -522,6 +530,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote at SoundProviders/Unix/$(DEPDIR)/soundprovider_recorder_oss.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at SoundProviders/Win32/$(DEPDIR)/soundprovider_recorder_directsound.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at Unix/$(DEPDIR)/soundoutput_oss.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at Unix/$(DEPDIR)/soundoutput_alsa.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at Win32/$(DEPDIR)/soundoutput_directsound.Plo at am__quote@
 
 .cpp.o:

ClanLib-0.8.0-gcc43.patch:

--- NEW FILE ClanLib-0.8.0-gcc43.patch ---
diff -up ClanLib-0.8.0/Sources/Sound/precomp.h~ ClanLib-0.8.0/Sources/Sound/precomp.h
--- ClanLib-0.8.0/Sources/Sound/precomp.h~	2008-01-04 22:14:27.000000000 +0100
+++ ClanLib-0.8.0/Sources/Sound/precomp.h	2008-01-04 22:14:27.000000000 +0100
@@ -47,6 +47,8 @@
 #include <conio.h>
 #endif
 
+#include <string.h>
+
 #include "API/signals.h"
 #include "API/Core/System/error.h"
 
diff -up ClanLib-0.8.0/Sources/Core/precomp.h~ ClanLib-0.8.0/Sources/Core/precomp.h
--- ClanLib-0.8.0/Sources/Core/precomp.h~	2008-01-04 22:15:04.000000000 +0100
+++ ClanLib-0.8.0/Sources/Core/precomp.h	2008-01-04 22:15:04.000000000 +0100
@@ -47,6 +47,8 @@
 #include "API/Core/System/error.h"
 #include "API/Core/System/clanstring.h"
 
+#include <string.h>
+
 #ifdef __BORLANDC__
 #define BAD_MATH
 #endif
diff -up ClanLib-0.8.0/Sources/Core/IOData/Unix/directory_scanner_unix.cpp~ ClanLib-0.8.0/Sources/Core/IOData/Unix/directory_scanner_unix.cpp
--- ClanLib-0.8.0/Sources/Core/IOData/Unix/directory_scanner_unix.cpp~	2008-01-04 22:05:44.000000000 +0100
+++ ClanLib-0.8.0/Sources/Core/IOData/Unix/directory_scanner_unix.cpp	2008-01-04 22:05:44.000000000 +0100
@@ -33,6 +33,7 @@
 #endif
 #include <fnmatch.h>
 #include <unistd.h>
+#include <string.h>
 #include "directory_scanner_unix.h"
 
 CL_DirectoryScanner_Unix::CL_DirectoryScanner_Unix ()
diff -up ClanLib-0.8.0/Sources/Network/Socket/ip_address_getaddr.cpp~ ClanLib-0.8.0/Sources/Network/Socket/ip_address_getaddr.cpp
--- ClanLib-0.8.0/Sources/Network/Socket/ip_address_getaddr.cpp~	2008-01-04 22:41:21.000000000 +0100
+++ ClanLib-0.8.0/Sources/Network/Socket/ip_address_getaddr.cpp	2008-01-04 22:41:21.000000000 +0100
@@ -29,6 +29,7 @@
 
 #ifdef USE_GETADDR
 
+#include <string.h>
 #include "ip_address_getaddr.h"
 #include "API/Core/System/error.h"
 #include "API/Core/System/mutex.h"
diff -up ClanLib-0.8.0/Sources/Network/Socket/socket_generic.cpp~ ClanLib-0.8.0/Sources/Network/Socket/socket_generic.cpp
--- ClanLib-0.8.0/Sources/Network/Socket/socket_generic.cpp~	2008-01-04 22:42:11.000000000 +0100
+++ ClanLib-0.8.0/Sources/Network/Socket/socket_generic.cpp	2008-01-04 22:42:11.000000000 +0100
@@ -38,6 +38,7 @@
 
 #include "socket_generic.h"
 #include <stdio.h>
+#include <string.h>
 #include "API/Core/System/clanstring.h"
 
 /////////////////////////////////////////////////////////////////////////////
diff -up ClanLib-0.8.0/Sources/Network/Socket/socket.cpp~ ClanLib-0.8.0/Sources/Network/Socket/socket.cpp
--- ClanLib-0.8.0/Sources/Network/Socket/socket.cpp~	2008-01-04 22:41:45.000000000 +0100
+++ ClanLib-0.8.0/Sources/Network/Socket/socket.cpp	2008-01-04 22:41:45.000000000 +0100
@@ -42,6 +42,7 @@
 #define INVALID_SOCKET -1
 #endif
 
+#include <string.h>
 #include "socket_generic.h"
 #include "API/Core/System/error.h"
 #include "API/Core/System/log.h"
diff -up ClanLib-0.8.0/Sources/Network/NetVariables/netvariables_generic.h~ ClanLib-0.8.0/Sources/Network/NetVariables/netvariables_generic.h
--- ClanLib-0.8.0/Sources/Network/NetVariables/netvariables_generic.h~	2008-01-04 22:43:16.000000000 +0100
+++ ClanLib-0.8.0/Sources/Network/NetVariables/netvariables_generic.h	2008-01-04 22:43:16.000000000 +0100
@@ -35,6 +35,7 @@
 #endif
 
 #include <list>
+#include <cstring>
 #include "API/Core/IOData/inputsource.h"
 #include "API/Core/IOData/outputsource.h"
 
diff -up ClanLib-0.8.0/Sources/Network/NetSession/netstream.cpp~ ClanLib-0.8.0/Sources/Network/NetSession/netstream.cpp
--- ClanLib-0.8.0/Sources/Network/NetSession/netstream.cpp~	2008-01-04 22:39:20.000000000 +0100
+++ ClanLib-0.8.0/Sources/Network/NetSession/netstream.cpp	2008-01-04 22:39:20.000000000 +0100
@@ -27,6 +27,7 @@
 **    (if your name is missing here, please add it)
 */
 
+#include <string.h>
 #include "API/Network/NetSession/netstream.h"
 #include "API/Network/NetSession/netsession.h"
 #include "netstream_generic.h"
diff -up ClanLib-0.8.0/Sources/Network/NetSession/netcomputer_generic.cpp~ ClanLib-0.8.0/Sources/Network/NetSession/netcomputer_generic.cpp
--- ClanLib-0.8.0/Sources/Network/NetSession/netcomputer_generic.cpp~	2008-01-04 22:40:28.000000000 +0100
+++ ClanLib-0.8.0/Sources/Network/NetSession/netcomputer_generic.cpp	2008-01-04 22:40:28.000000000 +0100
@@ -27,6 +27,7 @@
 **    (if your name is missing here, please add it)
 */
 
+#include <string.h>
 #include "netcomputer_generic.h"
 #include "netstream_generic.h"
 #include "netsession_generic.h"
diff -up ClanLib-0.8.0/Sources/Network/NetSession/outputsource_netpacket.cpp~ ClanLib-0.8.0/Sources/Network/NetSession/outputsource_netpacket.cpp
--- ClanLib-0.8.0/Sources/Network/NetSession/outputsource_netpacket.cpp~	2008-01-04 22:40:01.000000000 +0100
+++ ClanLib-0.8.0/Sources/Network/NetSession/outputsource_netpacket.cpp	2008-01-04 22:40:01.000000000 +0100
@@ -27,6 +27,7 @@
 **    (if your name is missing here, please add it)
 */
 
+#include <string.h>
 #include "API/Network/NetSession/outputsource_netpacket.h"
 #include "API/Network/NetSession/netpacket.h"
 #include "outputsource_netpacket_generic.h"
diff -up ClanLib-0.8.0/Sources/Network/NetSession/inputsource_netpacket.cpp~ ClanLib-0.8.0/Sources/Network/NetSession/inputsource_netpacket.cpp
--- ClanLib-0.8.0/Sources/Network/NetSession/inputsource_netpacket.cpp~	2008-01-04 22:26:18.000000000 +0100
+++ ClanLib-0.8.0/Sources/Network/NetSession/inputsource_netpacket.cpp	2008-01-04 22:26:18.000000000 +0100
@@ -27,6 +27,7 @@
 **    (if your name is missing here, please add it)
 */
 
+#include <string.h>
 #include "API/Core/System/cl_assert.h"
 #include "API/Network/NetSession/inputsource_netpacket.h"
 #include "API/Network/NetSession/netpacket.h"
diff -up ClanLib-0.8.0/Sources/GUIStyleSilver/inputbox_silver.cpp~ ClanLib-0.8.0/Sources/GUIStyleSilver/inputbox_silver.cpp
--- ClanLib-0.8.0/Sources/GUIStyleSilver/inputbox_silver.cpp~	2008-01-04 22:25:14.000000000 +0100
+++ ClanLib-0.8.0/Sources/GUIStyleSilver/inputbox_silver.cpp	2008-01-04 22:25:14.000000000 +0100
@@ -27,6 +27,7 @@
 **    (if your name is missing here, please add it)
 */
 
+#include <string.h>
 #include "API/Display/font.h"
 #include "API/Display/display.h"
 #include "API/Core/System/system.h"
diff -up ClanLib-0.8.0/Sources/GL/GLX/input_device_linuxusbmouse.cpp~ ClanLib-0.8.0/Sources/GL/GLX/input_device_linuxusbmouse.cpp
--- ClanLib-0.8.0/Sources/GL/GLX/input_device_linuxusbmouse.cpp~	2008-01-04 22:22:25.000000000 +0100
+++ ClanLib-0.8.0/Sources/GL/GLX/input_device_linuxusbmouse.cpp	2008-01-04 22:22:25.000000000 +0100
@@ -32,6 +32,7 @@
 #include <unistd.h>
 #include <iostream>
 #include <errno.h>
+#include <string.h>
 
 #include "API/Core/System/error.h"
 #include "API/Display/keys.h"
diff -up ClanLib-0.8.0/Sources/GL/GLX/input_device_xinput.cpp~ ClanLib-0.8.0/Sources/GL/GLX/input_device_xinput.cpp
--- ClanLib-0.8.0/Sources/GL/GLX/input_device_xinput.cpp~	2008-01-04 22:23:19.000000000 +0100
+++ ClanLib-0.8.0/Sources/GL/GLX/input_device_xinput.cpp	2008-01-04 22:23:19.000000000 +0100
@@ -28,6 +28,7 @@
 */
 
 #include <iostream>
+#include <cstring>
 #include "API/Core/System/log.h"
 #include "API/Display/input_device.h"
 #include "API/Display/input_event.h"
diff -up ClanLib-0.8.0/Sources/GL/GLX/input_device_x11keyboard.cpp~ ClanLib-0.8.0/Sources/GL/GLX/input_device_x11keyboard.cpp
--- ClanLib-0.8.0/Sources/GL/GLX/input_device_x11keyboard.cpp~	2008-01-04 22:22:51.000000000 +0100
+++ ClanLib-0.8.0/Sources/GL/GLX/input_device_x11keyboard.cpp	2008-01-04 22:22:51.000000000 +0100
@@ -28,6 +28,7 @@
 */
 
 #include <cstdio>
+#include <cstring>
 #include "API/Display/input_device.h"
 #include "API/Display/input_event.h"
 #include "API/Display/keys.h"
diff -up ClanLib-0.8.0/Sources/GL/GLX/input_device_linuxevent.cpp~ ClanLib-0.8.0/Sources/GL/GLX/input_device_linuxevent.cpp
--- ClanLib-0.8.0/Sources/GL/GLX/input_device_linuxevent.cpp~	2008-01-04 22:18:55.000000000 +0100
+++ ClanLib-0.8.0/Sources/GL/GLX/input_device_linuxevent.cpp	2008-01-04 22:18:55.000000000 +0100
@@ -34,6 +34,7 @@
 #include <unistd.h>
 #include <iostream>
 #include <errno.h>
+#include <string.h>
 
 #include "API/Core/System/error.h"
 #include "API/Core/System/clanstring.h"
diff -up ClanLib-0.8.0/Sources/GL/GLX/input_device_linuxjoystick.cpp~ ClanLib-0.8.0/Sources/GL/GLX/input_device_linuxjoystick.cpp
--- ClanLib-0.8.0/Sources/GL/GLX/input_device_linuxjoystick.cpp~	2008-01-04 22:18:00.000000000 +0100
+++ ClanLib-0.8.0/Sources/GL/GLX/input_device_linuxjoystick.cpp	2008-01-04 22:18:00.000000000 +0100
@@ -33,6 +33,7 @@
 #include <linux/joystick.h>
 #include <iostream>
 #include <errno.h>
+#include <string.h>
 
 #include "API/Core/Math/point.h"
 #include "API/Core/System/clanstring.h"
diff -up ClanLib-0.8.0/Sources/API/GL/opengl_wrap.h~ ClanLib-0.8.0/Sources/API/GL/opengl_wrap.h
--- ClanLib-0.8.0/Sources/API/GL/opengl_wrap.h~	2008-01-04 22:07:15.000000000 +0100
+++ ClanLib-0.8.0/Sources/API/GL/opengl_wrap.h	2008-01-04 22:07:15.000000000 +0100
@@ -2530,7 +2530,7 @@ public:
 	typedef CLuint (CL_GLFUNC *ptr_glCreateShaderObjectARB )(CLenum shaderType);
 	typedef CLvoid (CL_GLFUNC *ptr_glShaderSourceARB)(CLuint shaderObj, CLsizei count, const CLchar* *string, const CLint *length);
 	typedef CLvoid (CL_GLFUNC *ptr_glCompileShaderARB)(CLuint shaderObj);
-	typedef CLuint (CL_GLFUNC *ptr_glCreateProgramObjectARB)(CLvoid);
+	typedef CLuint (CL_GLFUNC *ptr_glCreateProgramObjectARB)(void);
 	typedef CLvoid (CL_GLFUNC *ptr_glAttachObjectARB)(CLuint containerObj, CLuint attachedObj);
 	typedef CLvoid (CL_GLFUNC *ptr_glLinkProgramARB)(CLuint programObj);
 	typedef CLvoid (CL_GLFUNC *ptr_glUseProgramObjectARB)(CLuint programObj);
diff -up ClanLib-0.8.0/Sources/API/Display/Collision/outline_provider_file.h~ ClanLib-0.8.0/Sources/API/Display/Collision/outline_provider_file.h
--- ClanLib-0.8.0/Sources/API/Display/Collision/outline_provider_file.h~	2008-01-04 22:12:09.000000000 +0100
+++ ClanLib-0.8.0/Sources/API/Display/Collision/outline_provider_file.h	2008-01-04 22:12:09.000000000 +0100
@@ -48,6 +48,7 @@
 #pragma once
 #endif
 
+#include <string>
 #include "outline_provider.h"
 
 class CL_OutlineProviderFile_Generic;
diff -up ClanLib-0.8.0/Sources/Display/display_precomp.h~ ClanLib-0.8.0/Sources/Display/display_precomp.h
--- ClanLib-0.8.0/Sources/Display/display_precomp.h~	2008-01-04 22:09:47.000000000 +0100
+++ ClanLib-0.8.0/Sources/Display/display_precomp.h	2008-01-04 22:09:47.000000000 +0100
@@ -33,5 +33,7 @@
 #include <windows.h>
 #endif
 
+#include <string.h>
+
 #include "API/Core/System/cl_assert.h"
 
diff -up ClanLib-0.8.0/Sources/GUI/precomp.h~ ClanLib-0.8.0/Sources/GUI/precomp.h
--- ClanLib-0.8.0/Sources/GUI/precomp.h~	2008-01-04 22:16:06.000000000 +0100
+++ ClanLib-0.8.0/Sources/GUI/precomp.h	2008-01-04 22:16:06.000000000 +0100
@@ -37,6 +37,8 @@
 #ifdef _MSC_VER
 #pragma warning (disable:4786)
 
+#include <string.h>
+
 #include "API/core.h"
 #include "API/display.h"
 
diff -up ClanLib-0.8.0/Examples/CTalk/precomp.h~ ClanLib-0.8.0/Examples/CTalk/precomp.h
--- ClanLib-0.8.0/Examples/CTalk/precomp.h~	2008-01-04 22:15:50.000000000 +0100
+++ ClanLib-0.8.0/Examples/CTalk/precomp.h	2008-01-04 22:15:50.000000000 +0100
@@ -10,4 +10,6 @@
 #include <ClanLib/gui.h>
 #include <ClanLib/guistylesilver.h>
 
+#include <string.h>
+
 #endif
diff -up ClanLib-0.8.0/Utilities/GUIEditor/precomp.h~ ClanLib-0.8.0/Utilities/GUIEditor/precomp.h
--- ClanLib-0.8.0/Utilities/GUIEditor/precomp.h~	2008-01-04 22:16:07.000000000 +0100
+++ ClanLib-0.8.0/Utilities/GUIEditor/precomp.h	2008-01-04 22:16:07.000000000 +0100
@@ -9,4 +9,6 @@
 #include <ClanLib/display.h>
 #include <ClanLib/gl.h>
 
+#include <string.h>
+
 #endif
diff -up ClanLib-0.8.0/Sources/Core/IOData/Generic/directory.cpp~ ClanLib-0.8.0/Sources/Core/IOData/Generic/directory.cpp
--- ClanLib-0.8.0/Sources/Core/IOData/Generic/directory.cpp~	2008-01-04 21:54:35.000000000 +0100
+++ ClanLib-0.8.0/Sources/Core/IOData/Generic/directory.cpp	2008-01-04 21:54:35.000000000 +0100
@@ -53,6 +53,7 @@
 
 #include <sys/stat.h>
 #include <sys/types.h>
+#include <sys/param.h> // for PATH_MAX
 
 /////////////////////////////////////////////////////////////////////////////
 // Operations

ClanLib-0.8.0-memset.patch:

--- NEW FILE ClanLib-0.8.0-memset.patch ---
--- ClanLib-0.8.0/Sources/Core/System/Generic/clanstring.cpp~	2008-03-07 20:23:48.000000000 -0500
+++ ClanLib-0.8.0/Sources/Core/System/Generic/clanstring.cpp	2008-03-07 20:25:20.000000000 -0500
@@ -87,7 +87,7 @@ void CL_String::arg(std::string &format,
 	char number[10];
 	std::string num_string = "%";
 	
-	memset(number, 10, 0);
+	memset(number, 0, 10);
 	snprintf(number, 10, "%d", num);
 	
 	num_string += number;
@@ -112,7 +112,7 @@ void CL_String::arg(std::string &format,
 {
 	char arg[10];
 	
-	memset(arg, 10, 0);
+	memset(arg, 0, 10);
 	snprintf(arg, 10, "%d", number);
 	
 	CL_String::arg(format, arg, num);
@@ -122,7 +122,7 @@ void CL_String::arg(std::string &format,
 {
 	char arg[32];
 
-	memset(arg, 32, 0);
+	memset(arg, 0, 32);
 	snprintf(arg, 32, "%f", number);
 	
 	CL_String::arg(format, arg, num);
@@ -132,7 +132,7 @@ void CL_String::arg(std::string &format,
 {
 	char arg[32];
 	
-	memset(arg, 32, 0);
+	memset(arg, 0, 32);
 	snprintf(arg, 32, "%#f", number);
 	
 	CL_String::arg(format, arg, num);
@@ -141,7 +141,7 @@ void CL_String::arg(std::string &format,
 std::string CL_String::from_int(int value)
 {
 	char str[32];
-	memset(str, 32, 0);
+	memset(str, 0, 32);
 	snprintf(str, 32, "%d", value);
 	return std::string(str);
 }
@@ -149,7 +149,7 @@ std::string CL_String::from_int(int valu
 std::string CL_String::from_float(float value)
 {
 	char str[32];
-	memset(str, 32, 0);
+	memset(str, 0, 32);
 	snprintf(str, 32, "%f", value);
 	return std::string(str);
 }
@@ -157,7 +157,7 @@ std::string CL_String::from_float(float 
 std::string CL_String::from_double(double value)
 {
 	char str[32];
-	memset(str, 32, 0);
+	memset(str, 0, 32);
 	snprintf(str, 32, "%#f", value);
 	return std::string(str);
 }


Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/ClanLib/F-8/.cvsignore,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- .cvsignore	13 Aug 2006 10:39:27 -0000	1.3
+++ .cvsignore	9 Mar 2008 18:45:21 -0000	1.4
@@ -1 +1,2 @@
 ClanLib-0.8.0.tgz
+ClanLib-0.8.0-generated-docs.tar.gz


Index: ClanLib.spec
===================================================================
RCS file: /cvs/extras/rpms/ClanLib/F-8/ClanLib.spec,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- ClanLib.spec	3 Aug 2007 11:03:41 -0000	1.11
+++ ClanLib.spec	9 Mar 2008 18:45:21 -0000	1.12
@@ -1,18 +1,26 @@
 Summary:        Cross platform C++ game library
 Name:           ClanLib
 Version:        0.8.0
-Release:        6%{?dist}
+Release:        11%{?dist}
 Group:          System Environment/Libraries
 License:        zlib
 URL:            http://www.clanlib.org/
 Source0:        http://www.clanlib.org/download/releases-0.8/%{name}-%{version}.tgz
+# Prebuild docs to avoid multilib conflicts. To regenerate, build and install
+# ClanLib without passing --disable-docs (requires perl, libxslt) and then:
+# mv $RPM_BUILD_ROOT%{_datadir}/doc/clanlib html
+# tar cvfz ClanLib-%{version}-generated-docs.tar.gz html
+Source1:        ClanLib-%{version}-generated-docs.tar.gz
 Patch0:         ClanLib-0.8.0-fullscreen.patch
 Patch1:         ClanLib-0.8.0-tex-format.patch
+Patch2:         ClanLib-0.8.0-gcc43.patch
+Patch3:         ClanLib-0.8.0-alsa.patch
+Patch4:         ClanLib-0.8.0-memset.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildRequires:  libX11-devel libXi-devel libXmu-devel libGLU-devel libICE-devel
 BuildRequires:  libXext-devel libXxf86vm-devel libXt-devel xorg-x11-proto-devel
 BuildRequires:  libvorbis-devel mikmod-devel SDL-devel SDL_gfx-devel
-BuildRequires:  libpng-devel libjpeg-devel libxslt perl
+BuildRequires:  libpng-devel libjpeg-devel
 Provides:       clanlib = %{version}-%{release}
 
 %description
@@ -31,9 +39,12 @@
 
 
 %prep
-%setup -q
+%setup -q -a 1
 %patch0 -p1 -z .fs
 %patch1 -p1 -z .texfmt
+%patch2 -p1 -z .gcc43
+%patch3 -p1 -z .alsa
+%patch4 -p1 -z .memset
 # fixup pc files
 sed -i 's|libdir=${exec_prefix}/lib|libdir=@libdir@|' pkgconfig/clan*.pc.in
 sed -i 's|Libs:   -L${libdir}|Libs:   -L${libdir}/%{name}-0.8|' \
@@ -41,7 +52,8 @@
 
 
 %build
-%configure --disable-dependency-tracking --disable-static --enable-dyn
+%configure --disable-dependency-tracking --disable-static --enable-dyn \
+  --disable-docs
 make %{?_smp_mflags}
 
 
@@ -57,8 +69,6 @@
 for i in $RPM_BUILD_ROOT%{_libdir}/%{name}-0.8/*; do
   ln -sf ../`readlink $i` $i
 done
-# for %doc
-mv $RPM_BUILD_ROOT%{_datadir}/doc/clanlib html
 
 
 %clean
@@ -84,6 +94,22 @@
 
 
 %changelog
+* Sat Mar  8 2008 Hans de Goede <j.w.r.degoede at hhs.nl> 0.8.0-11
+- Add a patch from Dave Jones fixing various wrong invocations of memset
+
+* Sun Mar  2 2008 Hans de Goede <j.w.r.degoede at hhs.nl> 0.8.0-10
+- Add support for audio output through alsa (original ClanLib only supports
+  OSS??), this also adds support for using pulseaudio through alsa
+
+* Tue Feb 19 2008 Fedora Release Engineering <rel-eng at fedoraproject.org> - 0.8.0-9
+- Autorebuild for GCC 4.3
+
+* Fri Jan  4 2008 Hans de Goede <j.w.r.degoede at hhs.nl> 0.8.0-8
+- Fix building with gcc 4.3
+
+* Sun Oct 21 2007 Hans de Goede <j.w.r.degoede at hhs.nl> 0.8.0-7
+- Fix multilib conflicts in generated Reference documentation (bz 340851)
+
 * Fri Aug  3 2007 Hans de Goede <j.w.r.degoede at hhs.nl> 0.8.0-6
 - Update License tag for new Licensing Guidelines compliance
 


Index: sources
===================================================================
RCS file: /cvs/extras/rpms/ClanLib/F-8/sources,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- sources	13 Aug 2006 10:39:28 -0000	1.3
+++ sources	9 Mar 2008 18:45:21 -0000	1.4
@@ -1 +1,2 @@
 3e183a801a31f646b012db2d82f97ff3  ClanLib-0.8.0.tgz
+e552916511247b59b1f220421dd68539  ClanLib-0.8.0-generated-docs.tar.gz


--- ClanLib-0.8.0-gcc41.patch DELETED ---


--- ClanLib-0.8.0-grave_key.patch DELETED ---




More information about the fedora-extras-commits mailing list