orion pushed to irrlicht (epel7). "create temporary irrlicht18 subpackages, which will be killed off when irrlicht 1.8 is final/stable"

notifications at fedoraproject.org notifications at fedoraproject.org
Sat Mar 28 03:51:34 UTC 2015


>From ad29477d49ffd2b8f58270b9a39beb1b11b5a4b8 Mon Sep 17 00:00:00 2001
From: Tom Callaway <spot at fedoraproject.org>
Date: Thu, 23 Aug 2012 15:00:34 -0500
Subject: create temporary irrlicht18 subpackages, which will be killed off
 when irrlicht 1.8 is final/stable


diff --git a/.gitignore b/.gitignore
index f731511..1c9b14f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
 irrlicht-1.7.1.zip
 /irrlicht-1.7.2.zip
 /irrlicht-1.7.3.zip
+/irrlicht18-svn3629.tar.bz2
diff --git a/irrlicht.spec b/irrlicht.spec
index 9ea0dad..a5dea9a 100644
--- a/irrlicht.spec
+++ b/irrlicht.spec
@@ -1,13 +1,22 @@
 %global irrxml_version 1.2
 %global irrlicht_version 1.7.3
+%global master_release 3
+
 
 Name:		irrlicht
 Summary: 	A high performance realtime 3D engine
 Version:	%{irrlicht_version}
-Release:	2%{?dist}
+Release:	%{master_release}%{?dist}
 License:	zlib
 Group:		System Environment/Libraries
 Source0:	http://downloads.sourceforge.net/irrlicht/%{name}-%{irrlicht_version}.zip
+# Until 1.8 comes out, we're making an SVN snapshot subpackage. (3629 is what supertuxcart wants)
+# svn export -r 3629 https://irrlicht.svn.sourceforge.net/svnroot/irrlicht/trunk/ irrlicht18-svn3629
+# cd irrlicht18-svn3629
+# rm -rf source/Irrlicht/jpeglib source/Irrlicht/zlib source/Irrlicht/libpng source/Irrlicht/aesGladman
+# cd ..
+# tar cf irrlicht18-svn3629.tar.bz2 irrlicht18-svn3629
+Source1:	irrlicht18-svn3629.tar.bz2
 # Various fixes, optflags, system libraries/headers
 # http://irrlicht.sourceforge.net/phpBB2/viewtopic.php?t=24076&highlight=
 Patch0:		irrlicht-1.7.3-optflags.patch
@@ -21,6 +30,15 @@ Patch3:		irrlicht-1.7.2-fastatof-improvements-typefixes.patch
 Patch4:		irrlicht-1.7.3-irrXML-shared-library.patch
 # Use png15
 Patch5:		irrlicht-1.7.2-png15.patch
+# 1.8 patches
+Patch6:		irrlicht18-optflags.patch
+Patch7:		irrlicht18-glext.patch
+Patch8:		irrlicht18-libaesgm.patch
+Patch9:		irrlicht18-fastatof-improvements-typefixes.patch
+Patch10:	irrlicht18-irrXML-shared-library.patch
+# Remove "-SVN" from Version
+Patch11:	irrlicht18-noSVN.patch
+
 URL:		http://irrlicht.sourceforge.net/
 BuildRequires:	libXxf86vm-devel, mesa-libGL-devel, mesa-libGLU-devel
 BuildRequires:	libjpeg-devel, zlib-devel, libaesgm-devel
@@ -61,6 +79,49 @@ Group:		Development/Libraries
 %description -n irrXML-devel
 Development headers and libraries for irrXML.
 
+%package -n irrlicht18
+Summary:	A high performance realtime 3D engine
+Version:	1.8
+Release:	0.%{master_release}.svn3629
+
+%description -n irrlicht18
+The Irrlicht Engine is an open source high performance realtime 3D engine
+written and usable in C++ and also available for .NET languages. It is
+completely cross-platform, using D3D, OpenGL and its own software renderer,
+and has all of the state-of-the-art features which can be found in
+commercial 3d engines. This is an SVN checkout of what will eventually become
+Irrlicht 1.8.
+
+%package -n irrlicht18-devel
+Summary:	Development headers and libraries for Irrlicht18
+Version:	1.8
+Release:	0.%{master_release}.svn3629
+Requires:	irrlicht18%{?_isa} = 1.8-0.%{master_release}.svn3629
+Requires:	mesa-libGL-devel, mesa-libGLU-devel, libXxf86vm-devel
+Requires:       libjpeg-devel, zlib-devel, libpng-devel
+Requires:       irrXML-devel%{?_isa} = %{irrxml_version}
+
+%description -n irrlicht18-devel
+Development headers and libraries for Irrlicht18
+
+%package -n irrXML18
+Summary:        Simple and fast XML parser for C++
+Version:        1.8
+Release:	0.%{master_release}.svn3629
+
+%description -n irrXML18
+irrXML is a simple and fast open source xml parser for C++.
+This is the corresponding irrXML for Irrlicht18.
+
+%package -n irrXML18-devel
+Summary:        Development headers and libraries for irrXML18
+Version:        1.8
+Release:	0.%{master_release}.svn3629
+Requires:       irrXML18%{?_isa} = 1.8-0.%{master_release}.svn3629
+
+%description -n irrXML18-devel
+Development headers and libraries for irrXML18.
+
 %prep
 %setup -q
 %patch0 -p1 -b .optflags
@@ -82,18 +143,48 @@ for i in include/*.h doc/upgrade-guide.txt source/Irrlicht/*.cpp source/Irrlicht
 	touch -r changes.txt $i
 done
 
+# unpack the svn tree separately
+tar xf %{SOURCE1}
+%patch6 -p0 -b .optflags18
+%patch7 -p0 -b .glext18
+%patch8 -p0 -b .libaesgm18
+%patch9 -p0 -b .fastatof18
+%patch10 -p0 -b .irrXML18
+%patch11 -p0 -b .noSVN
+pushd irrlicht18-svn3629
+sed -i 's/\r//' readme.txt
+iconv -o readme.txt.iso88591 -f iso88591 -t utf8 readme.txt
+mv readme.txt.iso88591 readme.txt
+popd
+
 %build
 cd source/Irrlicht
 make %{?_smp_mflags} sharedlib
 
+pushd ../../irrlicht18-svn3629/source/Irrlicht
+make %{?_smp_mflags} sharedlib
+popd
+
+
 %install
 mkdir -p %{buildroot}%{_libdir}
 mkdir -p %{buildroot}%{_includedir}/%{name}
 make -C source/Irrlicht INSTALL_DIR=%{buildroot}%{_libdir} install 
 cp -a include/*.h %{buildroot}%{_includedir}/%{name}/
-cd %{buildroot}%{_libdir}
+pushd %{buildroot}%{_libdir}
 ln -s libIrrlicht.so.%{irrlicht_version} libIrrlicht.so.1
 ln -s libIrrXML.so.%{irrlicht_version} libIrrXML.so.1
+popd
+
+mkdir -p %{buildroot}%{_includedir}/%{name}18
+pushd irrlicht18-svn3629
+make -C source/Irrlicht INSTALL_DIR=%{buildroot}%{_libdir} install
+cp -a include/*.h %{buildroot}%{_includedir}/%{name}18/
+popd
+pushd %{buildroot}%{_libdir}
+ln -s libIrrlicht18.so.1.8.0 libIrrlicht18.so.1
+ln -s libIrrXML18.so.1.8.0 libIrrXML18.so.1
+popd
 
 %post -p /sbin/ldconfig
 %postun -p /sbin/ldconfig
@@ -101,9 +192,15 @@ ln -s libIrrXML.so.%{irrlicht_version} libIrrXML.so.1
 %post -n irrXML -p /sbin/ldconfig
 %postun -n irrXML -p /sbin/ldconfig
 
+%post -n irrlicht18 -p /sbin/ldconfig
+%postun -n irrlicht18 -p /sbin/ldconfig
+
+%post -n irrXML18 -p /sbin/ldconfig
+%postun -n irrXML18 -p /sbin/ldconfig
+
 %files
 %doc readme.txt
-%{_libdir}/libIrrlicht*.so.*
+%{_libdir}/libIrrlicht.so.*
 
 %files devel
 %doc doc/upgrade-guide.txt
@@ -114,11 +211,40 @@ ln -s libIrrXML.so.%{irrlicht_version} libIrrXML.so.1
 %exclude %{_includedir}/%{name}/irrString.h
 %exclude %{_includedir}/%{name}/irrTypes.h
 %exclude %{_includedir}/%{name}/irrXML.h
-%{_libdir}/libIrrlicht*.so
+%{_libdir}/libIrrlicht.so
+
+%files -n irrlicht18
+%doc irrlicht18-svn3629/readme.txt
+%{_libdir}/libIrrlicht18.so.*
+
+%files -n irrlicht18-devel
+%doc irrlicht18-svn3629/doc/upgrade-guide.txt
+%{_includedir}/%{name}18/
+%exclude %{_includedir}/%{name}18/fast_atof.h
+%exclude %{_includedir}/%{name}18/heapsort.h
+%exclude %{_includedir}/%{name}18/irrArray.h
+%exclude %{_includedir}/%{name}18/irrString.h
+%exclude %{_includedir}/%{name}18/irrTypes.h
+%exclude %{_includedir}/%{name}18/irrXML.h
+%{_libdir}/libIrrlicht18.so
+
+%files -n irrXML18
+%doc irrlicht18-svn3629/readme.txt
+%{_libdir}/libIrrXML18.so.*
+
+%files -n irrXML18-devel
+%dir %{_includedir}/%{name}18/
+%{_includedir}/%{name}18/fast_atof.h
+%{_includedir}/%{name}18/heapsort.h
+%{_includedir}/%{name}18/irrArray.h
+%{_includedir}/%{name}18/irrString.h
+%{_includedir}/%{name}18/irrTypes.h
+%{_includedir}/%{name}18/irrXML.h
+%{_libdir}/libIrrXML18.so
 
 %files -n irrXML
 %doc readme.txt
-%{_libdir}/libIrrXML*.so.*
+%{_libdir}/libIrrXML.so.*
 
 %files -n irrXML-devel
 %dir %{_includedir}/%{name}/
@@ -128,9 +254,12 @@ ln -s libIrrXML.so.%{irrlicht_version} libIrrXML.so.1
 %{_includedir}/%{name}/irrString.h
 %{_includedir}/%{name}/irrTypes.h
 %{_includedir}/%{name}/irrXML.h
-%{_libdir}/libIrrXML*.so
+%{_libdir}/libIrrXML.so
 
 %changelog
+* Thu Aug 23 2012 Tom Callaway <spot at fedoraproject.org> - 1.7.3-3
+- add Irrlicht18 subpackages for supertuxkart (they'll be killed off when 1.8 is final/stable)
+
 * Thu Jul 19 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.7.3-2
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
 
diff --git a/irrlicht18-fastatof-improvements-typefixes.patch b/irrlicht18-fastatof-improvements-typefixes.patch
new file mode 100644
index 0000000..8e0ae66
--- /dev/null
+++ b/irrlicht18-fastatof-improvements-typefixes.patch
@@ -0,0 +1,677 @@
+diff -up irrlicht18-svn3629/examples/22.MaterialViewer/main.cpp.fastatof irrlicht18-svn3629/examples/22.MaterialViewer/main.cpp
+--- irrlicht18-svn3629/examples/22.MaterialViewer/main.cpp.fastatof	2010-02-02 14:53:57.341250000 -0600
++++ irrlicht18-svn3629/examples/22.MaterialViewer/main.cpp	2012-08-23 14:00:46.917580700 -0500
+@@ -230,7 +230,7 @@ protected:
+ 		u32 alpha=col.getAlpha();
+ 		if ( EditAlpha )
+ 		{
+-			alpha = (u32)core::strtol10(  core::stringc( EditAlpha->getText() ).c_str(), 0);
++			alpha = (u32)core::strtoul10(  core::stringc( EditAlpha->getText() ).c_str(), 0);
+ 			if ( alpha > 255 )
+ 				alpha = 255;
+ 		}
+@@ -239,7 +239,7 @@ protected:
+ 		u32 red=col.getRed();
+ 		if ( EditRed )
+ 		{
+-			red = (u32)core::strtol10( core::stringc( EditRed->getText() ).c_str(), 0);
++			red = (u32)core::strtoul10( core::stringc( EditRed->getText() ).c_str(), 0);
+ 			if ( red > 255 )
+ 				red = 255;
+ 		}
+@@ -248,7 +248,7 @@ protected:
+ 		u32 green=col.getGreen();
+ 		if ( EditGreen )
+ 		{
+-			green = (u32)core::strtol10( core::stringc( EditGreen->getText() ).c_str(), 0);
++			green = (u32)core::strtoul10( core::stringc( EditGreen->getText() ).c_str(), 0);
+ 			if ( green > 255 )
+ 				green = 255;
+ 		}
+@@ -257,7 +257,7 @@ protected:
+ 		u32 blue=col.getBlue();
+ 		if ( EditBlue )
+ 		{
+-			blue = (u32)core::strtol10( core::stringc( EditBlue->getText() ).c_str(), 0);
++			blue = (u32)core::strtoul10( core::stringc( EditBlue->getText() ).c_str(), 0);
+ 			if ( blue > 255 )
+ 				blue = 255;
+ 		}
+diff -up irrlicht18-svn3629/include/fast_atof.h.fastatof irrlicht18-svn3629/include/fast_atof.h
+--- irrlicht18-svn3629/include/fast_atof.h.fastatof	2011-01-14 07:24:40.897355000 -0600
++++ irrlicht18-svn3629/include/fast_atof.h	2012-08-23 14:00:46.918580700 -0500
+@@ -12,8 +12,8 @@ namespace irr
+ namespace core
+ {
+ 
+-// we write [17] here instead of [] to work around a swig bug
+-const float fast_atof_table[17] = {
++// we write [16] here instead of [] to work around a swig bug
++const float fast_atof_table[16] = {
+ 	0.f,
+ 	0.1f,
+ 	0.01f,
+@@ -30,9 +30,32 @@ const float fast_atof_table[17] = {
+ 	0.0000000000001f,
+ 	0.00000000000001f,
+ 	0.000000000000001f,
+-	0.0000000000000001f
+ };
+ 
++//! Convert a simple string of base 10 digits into an unsigned 32 bit integer.
++//! \param[in] in: The string of digits to convert. Only a leading - or + followed 
++//!					by digits 0 to 9 will be considered.  Parsing stops at the
++//!					first non-digit.
++//! \param[out] out: (optional) If provided, it will be set to point at the first
++//!					 character not used in the calculation.
++//! \return The unsigned integer value of the digits.
++inline u32 strtoul10(const char* in, const char** out=0)
++{
++	unsigned int value = 0;
++
++	bool running = true;
++	while ( running )
++	{
++		if ( *in < '0' || *in > '9' )
++			break;
++
++		value = ( value * 10 ) + ( *in - '0' );
++		++in;
++	}
++	if (out)*out = in;
++	return value;
++}
++
+ //! Convert a simple string of base 10 digits into a signed 32 bit integer.
+ //! \param[in] in: The string of digits to convert. Only a leading - or + followed 
+ //!					by digits 0 to 9 will be considered.  Parsing stops at the
+@@ -43,38 +66,104 @@ const float fast_atof_table[17] = {
+ //!			digits to encode in an s32 then +INT_MAX or -INT_MAX will be returned.
+ inline s32 strtol10(const char* in, const char** out=0)
+ {
+-	if(!in)
+-		return 0;
+-
+-	bool negative = false;
+-	if('-' == *in)
+-	{
+-		negative = true;
++	bool inv = (*in=='-');
++	if (inv || *in=='+')
+ 		++in;
++
++	int value = strtoul10(in,out);
++	if (inv) {
++		value = -value;
+ 	}
+-	else if('+' == *in)
+-		++in;
++	return value;
++}
+ 
+-	u32 unsignedValue = 0;
++//! Convert a simple string of base 8 (octal) digits into an unsigned 32 bit integer.
++//! \param[in] in: The string of digits to convert. Only digits 0 to 7 will be considered.  
++//!                               Parsing stops at the first non-digit.
++//! \param[out] out: (optional) If provided, it will be set to point at the first
++//!					 character not used in the calculation.
++//! \return The unsigned integer value of the digits.
++inline u32 strtoul8(const char* in, const char** out=0)
++{
++	unsigned int value = 0;
+ 
+-	while ( ( *in >= '0') && ( *in <= '9' ))
++	bool running = true;
++	while ( running )
+ 	{
+-		unsignedValue = ( unsignedValue * 10 ) + ( *in - '0' );
++		if ( *in < '0' || *in > '7' )
++			break;
++
++		value = ( value << 3 ) + ( *in - '0' );
+ 		++in;
++	}
++	if (out)*out = in;
++	return value;
++}
+ 
+-		if(unsignedValue > (u32)INT_MAX)
++//! Convert a simple string of base 16 (hex) digits into an unsigned 32 bit integer.
++//! \param[in] in: The string of digits to convert. Only digits 0 to 9, A to F will be considered.  
++//!                               Parsing stops at the first non-digit. Letters can be in either case.
++//! \param[out] out: (optional) If provided, it will be set to point at the first
++//!					 character not used in the calculation.
++//! \return The unsigned integer value of the digits.
++inline u32 strtoul16( const char* in, const char** out=0)
++{
++	unsigned int value = 0;
++
++	bool running = true;
++	while ( running )
++	{
++		if ( *in >= '0' && *in <= '9' )
+ 		{
+-			unsignedValue = (u32)INT_MAX;
+-			break;
++			value = ( value << 4u ) + ( *in - '0' );
+ 		}
++		else if (*in >= 'A' && *in <= 'F')
++		{
++			value = ( value << 4u ) + ( *in - 'A' ) + 10;
++		}
++		else if (*in >= 'a' && *in <= 'f')
++		{
++			value = ( value << 4u ) + ( *in - 'a' ) + 10;
++		}
++		else break;
++		++in;
+ 	}
+ 	if (out)
+ 		*out = in;
++	return value;
++}
+ 
+-	if(negative)
+-		return -((s32)unsignedValue);
+-	else
+-		return (s32)unsignedValue;
++//! Convert a hex-encoded digi (1 character) to an 8 bit unsigned integer.
++//! \param[in] in: The string of digits to convert. Only digits 0 to 9, A to F will be considered.  
++//!                               Parsing stops at the first non-digit. Letters can be in either case.
++//! \param[out] out: (optional) If provided, it will be set to point at the first
++//!					 character not used in the calculation.
++//! \return The unsigned integer value of the digits. 0xffffffff if the input is not hex
++inline u32 HexDigitToDecimal(char in)
++{
++	unsigned int out = 0xffffffff;
++	if (in >= '0' && in <= '9')
++		out = in - '0';
++
++	else if (in >= 'a' && in <= 'f')
++		out = 10u + in - 'a';
++
++	else if (in >= 'A' && in <= 'F')
++		out = 10u + in - 'A';
++
++	// return value is 0xffffffff if the input is not a hex digit
++	return out;
++}
++
++//! Convert a hex-encoded octet (2 characters) to an 8 bit unsigned integer.
++//! \param[in] in: The string of digits to convert. Only digits 0 to 9, A to F will be considered.  
++//!                               Parsing stops at the first non-digit. Letters can be in either case.
++//! \param[out] out: (optional) If provided, it will be set to point at the first
++//!					 character not used in the calculation.
++//! \return The unsigned integer value of the digits. 0xffffffff if the input is not hex
++inline u8 HexOctetToDecimal(const char* in)
++{
++	return ((u8)HexDigitToDecimal(in[0])<<4)+(u8)HexDigitToDecimal(in[1]);
+ }
+ 
+ //! Converts a sequence of digits into a whole positive floating point value.
+@@ -126,6 +215,56 @@ inline f32 strtof10(const char* in, cons
+ 	return floatValue;
+ }
+ 
++//! Convert a simple string of base 10 digits into an unsigned 64 bit integer.
++//! \param[in] in: The string of digits to convert. Only a leading - or + followed 
++//!					by digits 0 to 9 will be considered.  Parsing stops at the
++//!					first non-digit.
++//! \param[out] out: (optional) If provided, it will be set to point at the first
++//!					 character not used in the calculation.
++//! \return The unsigned 64 bit integer value of the digits.
++inline u64 strtoul10_64( const char* in, const char** out=0, unsigned int* max_inout=0)
++{
++	unsigned int cur = 0;
++	u64 value = 0;
++
++	bool running = true;
++	while ( running )
++	{
++		if ( *in < '0' || *in > '9' )
++			break;
++
++		const u64 new_value = ( value * 10 ) + ( *in - '0' );
++		
++		if (new_value < value) /* numeric overflow, we rely on you */
++			return value;
++
++		value = new_value;
++
++		++in;
++		++cur;
++
++		if (max_inout && *max_inout == cur) {
++					
++			if (out) { /* skip to end */
++				while (*in >= '0' && *in <= '9')
++					++in;
++				*out = in;
++			}
++
++			return value;
++		}
++	}
++	if (out)
++		*out = in;
++
++	if (max_inout)
++		*max_inout = cur;
++
++	return value;
++}
++// Number of relevant decimals for floating-point parsing.
++#define AI_FAST_ATOF_RELAVANT_DECIMALS 10
++
+ //! Provides a fast function for converting a string into a float.
+ //! This is not guaranteed to be as accurate as atof(), but is 
+ //! approximately 6 to 8 times as fast.
+@@ -138,46 +277,51 @@ inline const char* fast_atof_move( const
+ 	// Please run this regression test when making any modifications to this function:
+ 	// https://sourceforge.net/tracker/download.php?group_id=74339&atid=540676&file_id=298968&aid=1865300
+ 
+-	out = 0.f;
+-	if(!in)
+-		return 0;
++	float f;
+ 
+-	bool negative = false;
+-	if(*in == '-')
+-	{
+-		negative = true;
++	bool inv = (*in=='-');
++	if (inv || *in=='+')
+ 		++in;
+-	}
+-
+-	f32 value = strtof10 ( in, &in );
+ 
+-	if (*in == '.')
++	f = (float) strtoul10_64 ( in, &in);
++	if (*in == '.' || (in[0] == ',' && (in[1] >= '0' || in[1] <= '9'))) // allow for commas, too
+ 	{
+ 		++in;
+ 
+-		const char * afterDecimal = in;
+-		f32 decimal = strtof10 ( in, &afterDecimal );
+-		decimal *= fast_atof_table[afterDecimal - in];
+-
+-		value += decimal;
++		// NOTE: The original implementation is highly unaccurate here. The precision of a single
++		// IEEE 754 float is not high enough, everything behind the 6th digit tends to be more 
++		// inaccurate than it would need to be. Casting to double seems to solve the problem.
++		// strtol_64 is used to prevent integer overflow.
++
++		// Another fix: this tends to become 0 for long numbers if we don't limit the maximum 
++		// number of digits to be read. AI_FAST_ATOF_RELAVANT_DECIMALS can be a value between
++		// 1 and 15.
++		unsigned int diff = AI_FAST_ATOF_RELAVANT_DECIMALS;
++		double pl = (double) strtoul10_64 ( in, &in, &diff );
+ 
+-		in = afterDecimal;
++		pl *= fast_atof_table[diff];
++		f += (float)pl;
+ 	}
+ 
+-	if ('e' == *in || 'E' == *in)
++	// A major 'E' must be allowed. Necessary for proper reading of some DXF files.
++	// Thanks to Zhao Lei to point out that this if() must be outside the if (*c == '.' ..)
++	if (*in == 'e' || *in == 'E')
+ 	{
+ 		++in;
+-		// Assume that the exponent is a whole number.
+-		// strtol10() will deal with both + and - signs,
+-		// but cast to (f32) to prevent overflow at FLT_MAX
+-		value *= (f32)pow(10.0f, (f32)strtol10(in, &in));
+-	}
+-
+-	if(negative)
+-		out = -value;
+-	else
+-		out = value;
++		bool einv = (*in=='-');
++		if (einv || *in=='+')
++			++in;
++
++		float exp = (float)strtoul10_64(in, &in);
++		if (einv)
++			exp *= -1.0f;
+ 
++		f *= pow(10.0f, exp);
++	}
++	if (inv)
++		f *= -1.0f;
++	
++	out = f;
+ 	return in;
+ }
+ 
+@@ -190,6 +334,47 @@ inline float fast_atof(const char* float
+ 	return ret;
+ }
+ 
++//! Convert a string to a floating point number
++//! \param c: The string to convert.
++//! \param cout: A pointer to the first character in the string that wasn't
++//!         use to create the float value.
++inline float fast_atof( const char* c, const char** cout)
++{
++	float ret;
++	*cout = fast_atof_move(c, ret);
++
++	return ret;
++}
++
++//! Convert a string to a floating point number
++//! \param inout: The string to convert, returned 
++//!         as the pointer to the first character 
++//!         in the string that wasn't
++//!         use to create the float value.
++inline float fast_atof( const char** inout)
++{
++	float ret;
++	*inout = fast_atof_move(*inout, ret);
++
++	return ret;
++}
++
++//! Parse a C++-like integer literal - hex and oct prefixes - to an unsigned int
++//! 0xNNNN - hex
++//! 0NNN   - oct
++//! NNN    - dec
++//! \param[in] in: The string to convert. 
++//! \param cout: A pointer to the first character in the string that wasn't
++//!         use to create the float value.
++inline u32 strtoul_cppstyle( const char* in, const char** out=0)
++{
++	if ('0' == in[0])
++	{
++		return 'x' == in[1] ? strtoul16(in+2,out) : strtoul8(in+1,out);
++	}
++	return strtoul10(in, out);
++}
++
+ } // end namespace core
+ } // end namespace irr
+ 
+diff -up irrlicht18-svn3629/include/irrTypes.h.fastatof irrlicht18-svn3629/include/irrTypes.h
+--- irrlicht18-svn3629/include/irrTypes.h.fastatof	2011-01-14 07:24:40.897355000 -0600
++++ irrlicht18-svn3629/include/irrTypes.h	2012-08-23 14:00:46.919580700 -0500
+@@ -6,10 +6,25 @@
+ #define __IRR_TYPES_H_INCLUDED__
+ 
+ #include "IrrCompileConfig.h"
++#include <limits.h>
+ 
+ namespace irr
+ {
+ 
++#ifdef _LONGLONG
++#define NATIVE64
++#elif !((4294967290UL+7UL) == ((4294967290UL+7UL)&ULONG_MAX))
++#undef NATIVE64
++#elif !(((1UL << 31) * 2UL) != 0UL)
++#undef NATIVE64
++#elif !((((1UL << 31) * 2UL)&ULONG_MAX) != 0UL)
++#undef NATIVE64
++#elif !(ULONG_MAX > 4294967295UL)
++#undef NATIVE64
++#else
++#define NATIVE64
++#endif
++
+ //! 8 bit unsigned variable.
+ /** This is a typedef for unsigned char, it ensures portability of the engine. */
+ #ifdef _MSC_VER
+@@ -36,16 +51,20 @@ typedef char			c8;
+ /** This is a typedef for unsigned short, it ensures portability of the engine. */
+ #ifdef _MSC_VER
+ typedef unsigned __int16	u16;
+-#else
++#elif UINT_MAX >= 4294967295UL
+ typedef unsigned short		u16;
++#else
++typedef unsigned int		u16;
+ #endif
+ 
+ //! 16 bit signed variable.
+ /** This is a typedef for signed short, it ensures portability of the engine. */
+ #ifdef _MSC_VER
+ typedef __int16			s16;
+-#else
++#elif UINT_MAX >= 4294967295UL
+ typedef signed short		s16;
++#else
++typedef signed int		s16;
+ #endif
+ 
+ 
+@@ -54,27 +73,42 @@ typedef signed short		s16;
+ /** This is a typedef for unsigned int, it ensures portability of the engine. */
+ #ifdef _MSC_VER
+ typedef unsigned __int32	u32;
+-#else
++#elif UINT_MAX >= 4294967295UL
+ typedef unsigned int		u32;
++#else
++typedef unsigned long		u32;
+ #endif
+ 
+ //! 32 bit signed variable.
+ /** This is a typedef for signed int, it ensures portability of the engine. */
+ #ifdef _MSC_VER
+ typedef __int32			s32;
+-#else
++#elif UINT_MAX >= 4294967295UL
+ typedef signed int		s32;
++#else
++typedef signed long		s32;
+ #endif
+ 
+ 
++//! 64 bit unsigned variable.
++/** This is a typedef for unsigned long, it ensures portability of the engine */
++#ifdef _MSC_VER
++typedef unsigned __int64		u64;
++#elif defined( NATIVE64 )
++typedef unsigned long			u64;
++#else /** Not NATIVE64 or Windows */
++typedef unsigned long long		u64;
++#endif
+ 
+-// 64 bit signed variable.
+-// This is a typedef for __int64, it ensures portability of the engine.
+-// This type is currently not used by the engine and not supported by compilers
+-// other than Microsoft Compilers, so it is outcommented.
+-//typedef __int64				s64;
+-
+-
++//! 64 bit signed variable.
++/** This is a typedef for signed long, it ensures portability of the engine. */
++#ifdef _MSC_VER
++typedef __int64				s64;
++#elif defined ( NATIVE64 )
++typedef signed long			s64;
++#else /** Not NATIVE64 or Windows */
++typedef signed long long		s64;
++#endif
+ 
+ //! 32 bit floating point variable.
+ /** This is a typedef for float, it ensures portability of the engine. */
+diff -up irrlicht18-svn3629/source/Irrlicht/CImageLoaderPPM.cpp.fastatof irrlicht18-svn3629/source/Irrlicht/CImageLoaderPPM.cpp
+--- irrlicht18-svn3629/source/Irrlicht/CImageLoaderPPM.cpp.fastatof	2011-01-14 07:24:40.897355000 -0600
++++ irrlicht18-svn3629/source/Irrlicht/CImageLoaderPPM.cpp	2012-08-23 14:00:46.919580700 -0500
+@@ -64,10 +64,10 @@ IImage* CImageLoaderPPM::loadImage(io::I
+ 
+ 	core::stringc token;
+ 	getNextToken(file, token);
+-	const u32 width = core::strtol10(token.c_str());
++	const u32 width = core::strtoul10(token.c_str());
+ 
+ 	getNextToken(file, token);
+-	const u32 height = core::strtol10(token.c_str());
++	const u32 height = core::strtoul10(token.c_str());
+ 
+ 	u8* data = 0;
+ 	const u32 size = width*height;
+@@ -106,7 +106,7 @@ IImage* CImageLoaderPPM::loadImage(io::I
+ 	else
+ 	{
+ 		getNextToken(file, token);
+-		const u32 maxDepth = core::strtol10(token.c_str());
++		const u32 maxDepth = core::strtoul10(token.c_str());
+ 		if (maxDepth > 255) // no double bytes yet
+ 			return 0;
+ 
+@@ -144,7 +144,7 @@ IImage* CImageLoaderPPM::loadImage(io::I
+ 					for (u32 i=0; i<size; ++i)
+ 					{
+ 						getNextToken(file, token);
+-						const u8 num = (u8)core::strtol10(token.c_str());
++						const u8 num = (u8)core::strtoul10(token.c_str());
+ 						*ptr++ = num;
+ 						*ptr++ = num;
+ 						*ptr++ = num;
+@@ -186,11 +186,11 @@ IImage* CImageLoaderPPM::loadImage(io::I
+ 					for (u32 i=0; i<size; ++i)
+ 					{
+ 						getNextToken(file, token);
+-						*ptr++ = (u8)core::strtol10(token.c_str());
++						*ptr++ = (u8)core::strtoul10(token.c_str());
+ 						getNextToken(file, token);
+-						*ptr++ = (u8)core::strtol10(token.c_str());
++						*ptr++ = (u8)core::strtoul10(token.c_str());
+ 						getNextToken(file, token);
+-						*ptr++ = (u8)core::strtol10(token.c_str());
++						*ptr++ = (u8)core::strtoul10(token.c_str());
+ 						*ptr++ = 255;
+ 					}
+ 				}
+diff -up irrlicht18-svn3629/source/Irrlicht/COBJMeshFileLoader.cpp.fastatof irrlicht18-svn3629/source/Irrlicht/COBJMeshFileLoader.cpp
+--- irrlicht18-svn3629/source/Irrlicht/COBJMeshFileLoader.cpp.fastatof	2011-03-08 17:24:22.253030000 -0600
++++ irrlicht18-svn3629/source/Irrlicht/COBJMeshFileLoader.cpp	2012-08-23 14:00:46.920580700 -0500
+@@ -166,7 +166,7 @@ IAnimatedMesh* COBJMeshFileLoader::creat
+ 				if (core::stringc("off")==smooth)
+ 					smoothingGroup=0;
+ 				else
+-					smoothingGroup=core::strtol10(smooth, 0);
++					smoothingGroup=core::strtoul10(smooth, 0);
+ 			}
+ 			break;
+ 
+@@ -864,7 +864,7 @@ bool COBJMeshFileLoader::retrieveVertexI
+ 			// if no number was found index will become 0 and later on -1 by decrement
+ 			if (word[0]=='-')
+ 			{
+-				idx[idxType] = core::strtol10(word+1,0);
++				idx[idxType] = core::strtoul10(word+1,0);
+ 				idx[idxType] *= -1;
+ 				switch (idxType)
+ 				{
+@@ -880,7 +880,7 @@ bool COBJMeshFileLoader::retrieveVertexI
+ 				}
+ 			}
+ 			else
+-				idx[idxType] = core::strtol10(word,0)-1;
++				idx[idxType] = core::strtoul10(word,0)-1;
+ 
+ 			// reset the word
+ 			word[0] = '\0';
+diff -up irrlicht18-svn3629/source/Irrlicht/COgreMeshFileLoader.cpp.fastatof irrlicht18-svn3629/source/Irrlicht/COgreMeshFileLoader.cpp
+--- irrlicht18-svn3629/source/Irrlicht/COgreMeshFileLoader.cpp.fastatof	2011-01-14 07:24:40.897355000 -0600
++++ irrlicht18-svn3629/source/Irrlicht/COgreMeshFileLoader.cpp	2012-08-23 14:00:46.921580700 -0500
+@@ -1135,7 +1135,7 @@ void COgreMeshFileLoader::readPass(io::I
+ 				else if (token=="max_anisotropy")
+ 				{
+ 					getMaterialToken(file, token);
+-					pass.Material.TextureLayer[textureUnit].AnisotropicFilter=(u8)core::strtol10(token.c_str());
++					pass.Material.TextureLayer[textureUnit].AnisotropicFilter=(u8)core::strtoul10(token.c_str());
+ 				}
+ 				else if (token=="texture_alias")
+ 				{
+diff -up irrlicht18-svn3629/source/Irrlicht/CXMeshFileLoader.cpp.fastatof irrlicht18-svn3629/source/Irrlicht/CXMeshFileLoader.cpp
+--- irrlicht18-svn3629/source/Irrlicht/CXMeshFileLoader.cpp.fastatof	2011-01-14 07:24:40.897355000 -0600
++++ irrlicht18-svn3629/source/Irrlicht/CXMeshFileLoader.cpp	2012-08-23 14:00:46.923580700 -0500
+@@ -426,11 +426,11 @@ bool CXMeshFileLoader::readFileIntoMemor
+ 	tmp[2] = 0x0;
+ 	tmp[0] = Buffer[4];
+ 	tmp[1] = Buffer[5];
+-	MajorVersion = core::strtol10(tmp);
++	MajorVersion = core::strtoul10(tmp);
+ 
+ 	tmp[0] = Buffer[6];
+ 	tmp[1] = Buffer[7];
+-	MinorVersion = core::strtol10(tmp);
++	MinorVersion = core::strtoul10(tmp);
+ 
+ 	//! read format
+ 	if (strncmp(&Buffer[8], "txt ", 4) ==0)
+@@ -2307,7 +2307,7 @@ u32 CXMeshFileLoader::readInt()
+ 	else
+ 	{
+ 		findNextNoneWhiteSpaceNumber();
+-		return core::strtol10(P, &P);
++		return core::strtoul10(P, &P);
+ 	}
+ }
+ 
+diff -up irrlicht18-svn3629/source/Irrlicht/CXMLReaderImpl.h.fastatof irrlicht18-svn3629/source/Irrlicht/CXMLReaderImpl.h
+--- irrlicht18-svn3629/source/Irrlicht/CXMLReaderImpl.h.fastatof	2011-01-14 07:24:40.897355000 -0600
++++ irrlicht18-svn3629/source/Irrlicht/CXMLReaderImpl.h	2012-08-23 14:00:46.923580700 -0500
+@@ -144,7 +144,7 @@ public:
+ 			return 0;
+ 
+ 		core::stringc c(attr->Value.c_str());
+-		return core::strtol10(c.c_str());
++		return core::strtoul10(c.c_str());
+ 	}
+ 
+ 
+@@ -156,7 +156,7 @@ public:
+ 			return 0;
+ 
+ 		core::stringc c(attrvalue);
+-		return core::strtol10(c.c_str());
++		return core::strtoul10(c.c_str());
+ 	}
+ 
+ 
+diff -up irrlicht18-svn3629/source/Irrlicht/dmfsupport.h.fastatof irrlicht18-svn3629/source/Irrlicht/dmfsupport.h
+--- irrlicht18-svn3629/source/Irrlicht/dmfsupport.h.fastatof	2011-01-14 07:24:40.897355000 -0600
++++ irrlicht18-svn3629/source/Irrlicht/dmfsupport.h	2012-08-23 14:00:46.923580700 -0500
+@@ -330,7 +330,7 @@ bool GetDMFMaterials(const StringList& R
+ 		materials[i].pathName.replace('\\','/');
+ 		materials[i].pathName += "/";
+ 		// temp[3] is reserved, temp[4] is the number of texture layers
+-		materials[i].textureLayers = core::strtol10(temp[4].c_str());
++		materials[i].textureLayers = core::strtoul10(temp[4].c_str());
+ 		// Three values are separated by commas
+ 		temp1=SubdivideString(temp[5],",");
+ 
+@@ -449,7 +449,7 @@ bool GetDMFVerticesFaces(const StringLis
+ 		offs++;
+ 		// load vertices
+ 		core::array<core::vector3df> pos;
+-		const u32 posCount = core::strtol10(RawFile[offs].c_str());
++		const u32 posCount = core::strtoul10(RawFile[offs].c_str());
+ 		++offs;
+ 		pos.reallocate(posCount);
+ 		for (u32 i=0; i<posCount; ++i)
+@@ -470,7 +470,7 @@ bool GetDMFVerticesFaces(const StringLis
+ 				temp=SubdivideString(RawFile[offs+j],";");
+ 
+ 				//first value is vertices number for this face
+-				const s32 vert=core::strtol10(temp[0].c_str());
++				const s32 vert=core::strtoul10(temp[0].c_str());
+ 				faces[face_cnt].numVerts=vert;
+ 				//second is material ID
+ 				faces[face_cnt].materialID=atoi(temp[1].c_str());
+@@ -481,7 +481,7 @@ bool GetDMFVerticesFaces(const StringLis
+ 				for(s32 k=0; k<vert; ++k)
+ 				{
+ 					//copy position
+-					vertices[vert_cnt].pos.set(pos[core::strtol10(temp[2+k].c_str())]);
++					vertices[vert_cnt].pos.set(pos[core::strtoul10(temp[2+k].c_str())]);
+ 					//get uv coords for tex and light if any
+ 					vertices[vert_cnt].tc.set(core::fast_atof(temp[2+vert+(2*k)].c_str()),
+ 							core::fast_atof(temp[2+vert+(2*k)+1].c_str()));
diff --git a/irrlicht18-glext.patch b/irrlicht18-glext.patch
new file mode 100644
index 0000000..97b06f6
--- /dev/null
+++ b/irrlicht18-glext.patch
@@ -0,0 +1,25 @@
+diff -up irrlicht18-svn3629/source/Irrlicht/COpenGLExtensionHandler.h.glext irrlicht18-svn3629/source/Irrlicht/COpenGLExtensionHandler.h
+--- irrlicht18-svn3629/source/Irrlicht/COpenGLExtensionHandler.h.glext	2012-08-23 13:54:03.080574640 -0500
++++ irrlicht18-svn3629/source/Irrlicht/COpenGLExtensionHandler.h	2012-08-23 13:55:03.382575546 -0500
+@@ -49,7 +49,7 @@
+ 	#define NO_SDL_GLEXT
+ 	#include <SDL/SDL_video.h>
+ 	#include <SDL/SDL_opengl.h>
+-	#include "glext.h"
++	#include <GL/glext.h>
+ #else
+ 	#if defined(_IRR_OPENGL_USE_EXTPOINTER_)
+ 		#define GL_GLEXT_LEGACY 1
+@@ -61,9 +61,10 @@
+ 	#include <GL/gl.h>
+ 	#include <GL/glx.h>
+ 	#if defined(_IRR_OPENGL_USE_EXTPOINTER_)
+-	#include "glext.h"
++	#include <GL/glext.h>
++        typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data);
+ 	#undef GLX_ARB_get_proc_address // avoid problems with local glxext.h
+-	#include "glxext.h"
++	#include <GL/glxext.h>
+ 	#endif
+ #endif
+ #ifndef GL_VERSION_2_0
diff --git a/irrlicht18-irrXML-shared-library.patch b/irrlicht18-irrXML-shared-library.patch
new file mode 100644
index 0000000..953e014
--- /dev/null
+++ b/irrlicht18-irrXML-shared-library.patch
@@ -0,0 +1,80 @@
+diff -up irrlicht18-svn3629/source/Irrlicht/Makefile.irrXML18 irrlicht18-svn3629/source/Irrlicht/Makefile
+--- irrlicht18-svn3629/source/Irrlicht/Makefile.irrXML18	2012-08-23 14:48:20.000000000 -0500
++++ irrlicht18-svn3629/source/Irrlicht/Makefile	2012-08-23 14:52:59.654627706 -0500
+@@ -37,9 +37,10 @@ IRRIMAGEOBJ = CColorConverter.o CImage.o
+ 	CImageWriterBMP.o CImageWriterJPG.o CImageWriterPCX.o CImageWriterPNG.o CImageWriterPPM.o CImageWriterPSD.o CImageWriterTGA.o
+ IRRVIDEOOBJ = CVideoModeList.o CFPSCounter.o $(IRRDRVROBJ) $(IRRIMAGEOBJ)
+ IRRSWRENDEROBJ = CSoftwareDriver.o CSoftwareTexture.o CTRFlat.o CTRFlatWire.o CTRGouraud.o CTRGouraudWire.o CTRNormalMap.o CTRStencilShadow.o CTRTextureFlat.o CTRTextureFlatWire.o CTRTextureGouraud.o CTRTextureGouraudAdd.o CTRTextureGouraudNoZ.o CTRTextureGouraudWire.o CZBuffer.o CTRTextureGouraudVertexAlpha2.o CTRTextureGouraudNoZ2.o CTRTextureLightMap2_M2.o CTRTextureLightMap2_M4.o CTRTextureLightMap2_M1.o CSoftwareDriver2.o CSoftwareTexture2.o CTRTextureGouraud2.o CTRGouraud2.o CTRGouraudAlpha2.o CTRGouraudAlphaNoZ2.o CTRTextureDetailMap2.o CTRTextureGouraudAdd2.o CTRTextureGouraudAddNoZ2.o CTRTextureWire2.o CTRTextureLightMap2_Add.o CTRTextureLightMapGouraud2_M4.o IBurningShader.o CTRTextureBlend.o CTRTextureGouraudAlpha.o CTRTextureGouraudAlphaNoZ.o CDepthBuffer.o CBurningShader_Raster_Reference.o
+-IRRIOOBJ = CFileList.o CFileSystem.o CLimitReadFile.o CMemoryFile.o CReadFile.o CWriteFile.o CXMLReader.o CXMLWriter.o CWADReader.o CZipReader.o CPakReader.o CNPKReader.o CTarReader.o CMountPointReader.o irrXML.o CAttributes.o lzma/LzmaDec.o
++IRRIOOBJ = CFileList.o CFileSystem.o CLimitReadFile.o CMemoryFile.o CReadFile.o CWriteFile.o CXMLReader.o CXMLWriter.o CWADReader.o CZipReader.o CPakReader.o CNPKReader.o CTarReader.o CMountPointReader.o CAttributes.o lzma/LzmaDec.o
+ IRROTHEROBJ = CIrrDeviceSDL.o CIrrDeviceLinux.o CIrrDeviceConsole.o CIrrDeviceStub.o CIrrDeviceWin32.o CIrrDeviceFB.o CLogger.o COSOperator.o Irrlicht.o os.o
+ IRRGUIOBJ = CGUIButton.o CGUICheckBox.o CGUIComboBox.o CGUIContextMenu.o CGUIEditBox.o CGUIEnvironment.o CGUIFileOpenDialog.o CGUIFont.o CGUIImage.o CGUIInOutFader.o CGUIListBox.o CGUIMenu.o CGUIMeshViewer.o CGUIMessageBox.o CGUIModalScreen.o CGUIScrollBar.o CGUISpinBox.o CGUISkin.o CGUIStaticText.o CGUITabControl.o CGUITable.o CGUIToolBar.o CGUIWindow.o CGUIColorSelectDialog.o CDefaultGUIElementFactory.o CGUISpriteBank.o CGUIImageList.o CGUITreeView.o
++IRRXMLOBJ = irrXML.o
+ ZLIBOBJ = zlib/adler32.o zlib/compress.o zlib/crc32.o zlib/deflate.o zlib/inffast.o zlib/inflate.o zlib/inftrees.o zlib/trees.o zlib/uncompr.o zlib/zutil.o
+ JPEGLIBOBJ = jpeglib/jcapimin.o jpeglib/jcapistd.o jpeglib/jccoefct.o jpeglib/jccolor.o jpeglib/jcdctmgr.o jpeglib/jchuff.o jpeglib/jcinit.o jpeglib/jcmainct.o jpeglib/jcmarker.o jpeglib/jcmaster.o jpeglib/jcomapi.o jpeglib/jcparam.o jpeglib/jcprepct.o jpeglib/jcsample.o jpeglib/jctrans.o jpeglib/jdapimin.o jpeglib/jdapistd.o jpeglib/jdatadst.o jpeglib/jdatasrc.o jpeglib/jdcoefct.o jpeglib/jdcolor.o jpeglib/jddctmgr.o jpeglib/jdhuff.o jpeglib/jdinput.o jpeglib/jdmainct.o jpeglib/jdmarker.o jpeglib/jdmaster.o jpeglib/jdmerge.o jpeglib/jdpostct.o jpeglib/jdsample.o jpeglib/jdtrans.o jpeglib/jerror.o jpeglib/jfdctflt.o jpeglib/jfdctfst.o jpeglib/jfdctint.o jpeglib/jidctflt.o jpeglib/jidctfst.o jpeglib/jidctint.o jpeglib/jmemmgr.o jpeglib/jmemnobs.o jpeglib/jquant1.o jpeglib/jquant2.o jpeglib/jutils.o jpeglib/jcarith.o jpeglib/jdarith.o jpeglib/jaricom.o
+ LIBPNGOBJ = libpng/png.o libpng/pngerror.o libpng/pngget.o libpng/pngmem.o libpng/pngpread.o libpng/pngread.o libpng/pngrio.o libpng/pngrtran.o libpng/pngrutil.o libpng/pngset.o libpng/pngtrans.o libpng/pngwio.o libpng/pngwrite.o libpng/pngwtran.o libpng/pngwutil.o
+@@ -80,9 +81,10 @@ staticlib sharedlib install: SYSTEM = Li
+ STATIC_LIB = libIrrlicht.a
+ LIB_PATH = ../../lib/$(SYSTEM)
+ INSTALL_DIR = /usr/local/lib
+-sharedlib install: SHARED_LIB = libIrrlicht.so
+-staticlib sharedlib: LDFLAGS += --no-export-all-symbols --add-stdcall-alias
+-sharedlib: LDFLAGS += -L/usr/X11R6/lib$(LIBSELECT) -lGL -lXxf86vm -lz -ljpeg `libpng-config --libs` -lbz2 -laesgm
++irrxml_sharedlib install: IRRXML_SHARED_LIB = libIrrXML18.so
++irrlicht_sharedlib install: SHARED_LIB = libIrrlicht18.so
++irrlicht_sharedlib irrxml_sharedlib: LDFLAGS += -L/usr/X11R6/lib$(LIBSELECT) -lGL -lXxf86vm -lz -ljpeg `libpng-config --libs` -lbz2 -laesgm
++irrlicht_sharedlib: LDFLAGS += -L$(LIB_PATH) -lIrrXML18
+ staticlib sharedlib: CXXINCS += -I/usr/X11R6/include
+ 
+ #OSX specific options
+@@ -106,14 +108,24 @@ staticlib_win32: CPPFLAGS += -D_IRR_STAT
+ # All target, builds Irrlicht as static lib (libIrrlicht.a) and copies it into lib/Linux
+ all linux: staticlib
+ 
++sharedlib: irrxml_sharedlib irrlicht_sharedlib
++
++# Builds IrrXML as a shared lib (libIrrXML.so.versionNumber) and copies it into lib/Linux
++irrxml_sharedlib: $(IRRXMLOBJ)
++	$(CXX) $(CPPFLAGS) $(CXXFLAGS) -shared -Wl,-soname,$(IRRXML_SHARED_LIB).$(VERSION_MAJOR) -o $(IRRXML_SHARED_LIB).$(VERSION) $^ $(LDFLAGS)
++	mkdir -p $(LIB_PATH)
++	cp $(IRRXML_SHARED_LIB).$(VERSION) $(LIB_PATH)
++	# We need this for linking libIrrlicht.so
++	cd $(LIB_PATH) && ln -s $(IRRXML_SHARED_LIB).$(VERSION) $(IRRXML_SHARED_LIB)
++
+ # Builds Irrlicht as shared lib (libIrrlicht.so.versionNumber) and copies it into lib/Linux
+-sharedlib: $(LINKOBJ)
+-	$(CXX) $(CPPFLAGS) $(CXXFLAGS) -shared -Wl,-soname,$(SHARED_LIB).$(VERSION_MAJOR).$(VERSION_MINOR) -o $(SHARED_LIB).$(VERSION) $^ $(LDFLAGS)
++irrlicht_sharedlib: irrxml_sharedlib $(LINKOBJ)
++	$(CXX) $(CPPFLAGS) $(CXXFLAGS) -shared -Wl,-soname,$(SHARED_LIB).$(VERSION_MAJOR) -o $(SHARED_LIB).$(VERSION) $(LINKOBJ) $(LDFLAGS)
+ 	mkdir -p $(LIB_PATH)
+ 	cp $(SHARED_LIB).$(VERSION) $(LIB_PATH)
+ 
+ # Builds Irrlicht as static lib (libIrrlicht.a)
+-$(STATIC_LIB): $(LINKOBJ)
++$(STATIC_LIB): $(LINKOBJ) $(IRRXMLOBJ)
+ 	$(AR) rs $@ $^
+ 
+ # Copies static lib into lib/Linux
+@@ -141,8 +153,8 @@ install install_osx:
+ 	mkdir -p $(INSTALL_DIR)/../include/irrlicht
+ 	cp ../../include/*.h $(INSTALL_DIR)/../include/irrlicht/
+ 	cp $(LIB_PATH)/$(SHARED_LIB).$(VERSION) $(INSTALL_DIR)
+-	cd $(INSTALL_DIR) && ln -s -f $(SHARED_LIB).$(VERSION) $(COMPATIBILITY_VERSION)
+-
++	cp $(LIB_PATH)/$(IRRXML_SHARED_LIB).$(VERSION) $(INSTALL_DIR)
++	cd $(INSTALL_DIR) && ln -s -f $(SHARED_LIB).$(VERSION) $(SHARED_LIB) && ln -s -f $(IRRXML_SHARED_LIB).$(VERSION) $(IRRXML_SHARED_LIB)
+ #	ldconfig -n $(INSTALL_DIR)
+ 
+ TAGS:
+@@ -166,8 +178,10 @@ endif
+ 
+ help:
+ 	@echo "Available targets for Irrlicht"
+-	@echo " sharedlib: Build shared library Irrlicht.so for Linux"
++	@echo " sharedlib: Build all shared libraries for Linux"
+ 	@echo " staticlib: Build static library Irrlicht.a for Linux"
++	@echo " irrlicht_sharedlib: Build shared library libIrrlicht.so for Linux"
++	@echo " irrxml_sharedlib: Build shared library libIrrXML.so for Linux"
+ 	@echo " install: Copy shared library to /usr/local/lib"
+ 	@echo ""
+ 	@echo " sharedlib_win32: Build shared library Irrlicht.dll for Windows"
diff --git a/irrlicht18-libaesgm.patch b/irrlicht18-libaesgm.patch
new file mode 100644
index 0000000..5eb93ed
--- /dev/null
+++ b/irrlicht18-libaesgm.patch
@@ -0,0 +1,24 @@
+diff -up irrlicht18-svn3629/source/Irrlicht/CZipReader.cpp.libaesgm irrlicht18-svn3629/source/Irrlicht/CZipReader.cpp
+--- irrlicht18-svn3629/source/Irrlicht/CZipReader.cpp.libaesgm	2012-08-23 13:56:12.824576588 -0500
++++ irrlicht18-svn3629/source/Irrlicht/CZipReader.cpp	2012-08-23 13:56:31.497576866 -0500
+@@ -27,7 +27,7 @@ extern "C" void bz_internal_error(int er
+ 	#endif
+ 
+ 	#ifdef _IRR_COMPILE_WITH_ZIP_ENCRYPTION_
+-	#include "aesGladman/fileenc.h"
++	#include <aes/fileenc.h>
+ 	#endif
+ 	#ifdef _IRR_COMPILE_WITH_BZIP2_
+ 	#ifndef _IRR_USE_NON_SYSTEM_BZLIB_
+diff -up irrlicht18-svn3629/source/Irrlicht/Makefile.libaesgm irrlicht18-svn3629/source/Irrlicht/Makefile
+--- irrlicht18-svn3629/source/Irrlicht/Makefile.libaesgm	2012-08-23 13:56:41.010577010 -0500
++++ irrlicht18-svn3629/source/Irrlicht/Makefile	2012-08-23 13:57:08.195577417 -0500
+@@ -55,7 +55,7 @@ LINKOBJ = $(IRRMESHOBJ) $(IRROBJ) $(IRRP
+ ###############
+ #Compiler flags
+ CXXINCS = -I../../include `libpng-config --cflags`
+-CPPFLAGS += $(CXXINCS) -DIRRLICHT_EXPORTS=1 $(RPM_OPT_FLAGS)
++CPPFLAGS += $(CXXINCS) -DIRRLICHT_EXPORTS=1 -DUSE_SHA1 $(RPM_OPT_FLAGS)
+ CXXFLAGS += $(RPM_OPT_FLAGS) -Wall -pipe -fno-exceptions -fno-rtti -fstrict-aliasing
+ ifndef NDEBUG
+ CXXFLAGS += -g -D_DEBUG
diff --git a/irrlicht18-noSVN.patch b/irrlicht18-noSVN.patch
new file mode 100644
index 0000000..bbde0a8
--- /dev/null
+++ b/irrlicht18-noSVN.patch
@@ -0,0 +1,11 @@
+diff -up irrlicht18-svn3629/source/Irrlicht/Makefile.noSVN irrlicht18-svn3629/source/Irrlicht/Makefile
+--- irrlicht18-svn3629/source/Irrlicht/Makefile.noSVN	2012-08-23 14:31:08.540608033 -0500
++++ irrlicht18-svn3629/source/Irrlicht/Makefile	2012-08-23 14:32:12.792608998 -0500
+@@ -1,6 +1,6 @@
+ VERSION_MAJOR = 1
+ VERSION_MINOR = 8
+-VERSION_RELEASE = 0-SVN
++VERSION_RELEASE = 0
+ VERSION = $(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_RELEASE)
+ COMPATIBILITY_VERSION = $(VERSION_MAJOR).$(VERSION_MINOR)
+ # Irrlicht Engine 1.7.0-SVN
diff --git a/irrlicht18-optflags.patch b/irrlicht18-optflags.patch
new file mode 100644
index 0000000..18174df
--- /dev/null
+++ b/irrlicht18-optflags.patch
@@ -0,0 +1,75 @@
+diff -up irrlicht18-svn3629/include/IrrCompileConfig.h.optflags irrlicht18-svn3629/include/IrrCompileConfig.h
+--- irrlicht18-svn3629/include/IrrCompileConfig.h.optflags	2012-08-23 13:46:59.175568279 -0500
++++ irrlicht18-svn3629/include/IrrCompileConfig.h	2012-08-23 13:47:47.710569009 -0500
+@@ -236,7 +236,7 @@ the engine will no longer read .jpeg ima
+ //! Define _IRR_USE_NON_SYSTEM_JPEG_LIB_ to let irrlicht use the jpeglib which comes with irrlicht.
+ /** If this is commented out, Irrlicht will try to compile using the jpeg lib installed in the system.
+ 	This is only used when _IRR_COMPILE_WITH_LIBJPEG_ is defined. */
+-#define _IRR_USE_NON_SYSTEM_JPEG_LIB_
++// #define _IRR_USE_NON_SYSTEM_JPEG_LIB_
+ #ifdef NO_IRR_USE_NON_SYSTEM_JPEG_LIB_
+ #undef _IRR_USE_NON_SYSTEM_JPEG_LIB_
+ #endif
+@@ -252,7 +252,7 @@ the engine will no longer read .png imag
+ //! Define _IRR_USE_NON_SYSTEM_LIBPNG_ to let irrlicht use the libpng which comes with irrlicht.
+ /** If this is commented out, Irrlicht will try to compile using the libpng installed in the system.
+ 	This is only used when _IRR_COMPILE_WITH_LIBPNG_ is defined. */
+-#define _IRR_USE_NON_SYSTEM_LIB_PNG_
++// #define _IRR_USE_NON_SYSTEM_LIB_PNG_
+ #ifdef NO_IRR_USE_NON_SYSTEM_LIB_PNG_
+ #undef _IRR_USE_NON_SYSTEM_LIB_PNG_
+ #endif
+@@ -580,7 +580,7 @@ ones. */
+ /** If this is commented out, Irrlicht will try to compile using the zlib
+ installed on the system. This is only used when _IRR_COMPILE_WITH_ZLIB_ is
+ defined. */
+-#define _IRR_USE_NON_SYSTEM_ZLIB_
++// #define _IRR_USE_NON_SYSTEM_ZLIB_
+ #ifdef NO_IRR_USE_NON_SYSTEM_ZLIB_
+ #undef _IRR_USE_NON_SYSTEM_ZLIB_
+ #endif
+@@ -601,7 +601,7 @@ library. */
+ /** If this is commented out, Irrlicht will try to compile using the bzlib
+ installed on the system. This is only used when _IRR_COMPILE_WITH_BZLIB_ is
+ defined. */
+-#define _IRR_USE_NON_SYSTEM_BZLIB_
++// #define _IRR_USE_NON_SYSTEM_BZLIB_
+ #ifdef NO_IRR_USE_NON_SYSTEM_BZLIB_
+ #undef _IRR_USE_NON_SYSTEM_BZLIB_
+ #endif
+diff -up irrlicht18-svn3629/source/Irrlicht/Makefile.optflags irrlicht18-svn3629/source/Irrlicht/Makefile
+--- irrlicht18-svn3629/source/Irrlicht/Makefile.optflags	2012-08-23 13:51:13.785572099 -0500
++++ irrlicht18-svn3629/source/Irrlicht/Makefile	2012-08-23 13:51:19.002572178 -0500
+@@ -50,18 +50,17 @@ BZIP2OBJ = bzip2/blocksort.o bzip2/huffm
+ EXTRAOBJ =
+ LINKOBJ = $(IRRMESHOBJ) $(IRROBJ) $(IRRPARTICLEOBJ) $(IRRANIMOBJ) \
+ 	$(IRRVIDEOOBJ) $(IRRSWRENDEROBJ) $(IRRIOOBJ) $(IRROTHEROBJ) \
+-	$(IRRGUIOBJ) $(ZLIBOBJ) $(JPEGLIBOBJ) $(LIBPNGOBJ) $(LIBAESGM) \
+-	$(BZIP2OBJ) $(EXTRAOBJ)
++        $(IRRGUIOBJ) $(EXTRAOBJ)
+ 
+ ###############
+ #Compiler flags
+-CXXINCS = -I../../include -Izlib -Ijpeglib -Ilibpng
+-CPPFLAGS += $(CXXINCS) -DIRRLICHT_EXPORTS=1
+-CXXFLAGS += -Wall -pipe -fno-exceptions -fno-rtti -fstrict-aliasing
++CXXINCS = -I../../include `libpng-config --cflags`
++CPPFLAGS += $(CXXINCS) -DIRRLICHT_EXPORTS=1 $(RPM_OPT_FLAGS)
++CXXFLAGS += $(RPM_OPT_FLAGS) -Wall -pipe -fno-exceptions -fno-rtti -fstrict-aliasing
+ ifndef NDEBUG
+ CXXFLAGS += -g -D_DEBUG
+ else
+-CXXFLAGS += -fexpensive-optimizations -O3
++CXXFLAGS += -fexpensive-optimizations -O3 $(RPM_OPT_FLAGS)
+ endif
+ ifdef PROFILE
+ CXXFLAGS += -pg
+@@ -83,7 +82,7 @@ LIB_PATH = ../../lib/$(SYSTEM)
+ INSTALL_DIR = /usr/local/lib
+ sharedlib install: SHARED_LIB = libIrrlicht.so
+ staticlib sharedlib: LDFLAGS += --no-export-all-symbols --add-stdcall-alias
+-sharedlib: LDFLAGS += -L/usr/X11R6/lib$(LIBSELECT) -lGL -lXxf86vm
++sharedlib: LDFLAGS += -L/usr/X11R6/lib$(LIBSELECT) -lGL -lXxf86vm -lz -ljpeg `libpng-config --libs` -lbz2 -laesgm
+ staticlib sharedlib: CXXINCS += -I/usr/X11R6/include
+ 
+ #OSX specific options
diff --git a/sources b/sources
index 4f8dc6c..1f84458 100644
--- a/sources
+++ b/sources
@@ -1 +1,2 @@
 cfbdc8c68fbca544c7c8dfb3623ae086  irrlicht-1.7.3.zip
+2a505222ae9695dc358e18a634af4bcb  irrlicht18-svn3629.tar.bz2
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/irrlicht.git/commit/?h=epel7&id=ad29477d49ffd2b8f58270b9a39beb1b11b5a4b8


More information about the scm-commits mailing list