orion pushed to irrlicht (epel7). "1.7.2, fastatof patch from assimp, and irrXML subpackages"

notifications at fedoraproject.org notifications at fedoraproject.org
Sat Mar 28 03:52:31 UTC 2015


>From 2aba1d42191850d27e9f7f4a528203a299a6fbea Mon Sep 17 00:00:00 2001
From: "Tom \"spot\" Callaway" <tcallawa at redhat.com>
Date: Wed, 15 Dec 2010 14:53:14 -0500
Subject: 1.7.2, fastatof patch from assimp, and irrXML subpackages


diff --git a/.gitignore b/.gitignore
index 14783b8..7aa1e64 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
 irrlicht-1.7.1.zip
+/irrlicht-1.7.2.zip
diff --git a/irrlicht-1.7.2-fastatof-improvements.patch b/irrlicht-1.7.2-fastatof-improvements.patch
new file mode 100644
index 0000000..660c775
--- /dev/null
+++ b/irrlicht-1.7.2-fastatof-improvements.patch
@@ -0,0 +1,391 @@
+diff -up irrlicht-1.7.2/include/fast_atof.h.fastatof irrlicht-1.7.2/include/fast_atof.h
+--- irrlicht-1.7.2/include/fast_atof.h.fastatof	2010-10-24 09:42:58.000000000 -0400
++++ irrlicht-1.7.2/include/fast_atof.h	2010-11-17 15:35:45.278571002 -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,7 +30,6 @@ const float fast_atof_table[17] = {
+ 	0.0000000000001f,
+ 	0.00000000000001f,
+ 	0.000000000000001f,
+-	0.0000000000000001f
+ };
+ 
+ //! Convert a simple string of base 10 digits into a signed 32 bit integer.
+@@ -39,42 +38,132 @@ const float fast_atof_table[17] = {
+ //!					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 signed integer value of the digits. If the string specifies too many
+-//!			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)
++//! \return The unsigned integer value of the digits.
++inline u32 strtol10(const char* in, const char** out=0)
+ {
+-	if(!in)
+-		return 0;
++	unsigned int value = 0;
+ 
+-	bool negative = false;
+-	if('-' == *in)
++	bool running = true;
++	while ( running )
+ 	{
+-		negative = true;
++		if ( *in < '0' || *in > '9' )
++			break;
++
++		value = ( value * 10 ) + ( *in - '0' );
+ 		++in;
+ 	}
+-	else if('+' == *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
++//!					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 signed integer value of the digits. If the string specifies too many
++//!			digits to encode in an s32 then +INT_MAX or -INT_MAX will be returned.
++inline s32 strtol10s(const char* in, const char** out=0)
++{
++	bool inv = (*in=='-');
++	if (inv || *in=='+')
+ 		++in;
+ 
+-	u32 unsignedValue = 0;
++	int value = strtol10(in,out);
++	if (inv) {
++		value = -value;
++	}
++	return value;
++}
+ 
+-	while ( ( *in >= '0') && ( *in <= '9' ))
++//! 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 strtol8(const char* in, const char** out=0)
++{
++	unsigned int value = 0;
++
++	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 strtol16( 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;
++}
++
++//! 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';
+ 
+-	if(negative)
+-		return -((s32)unsignedValue);
+-	else
+-		return (s32)unsignedValue;
++	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 strtol10_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) strtol10_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) strtol10_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)strtol10_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 strtol_cppstyle( const char* in, const char** out=0)
++{
++	if ('0' == in[0])
++	{
++		return 'x' == in[1] ? strtol16(in+2,out) : strtol8(in+1,out);
++	}
++	return strtol10(in, out);
++}
++
+ } // end namespace core
+ } // end namespace irr
+ 
+diff -up irrlicht-1.7.2/include/irrTypes.h.fastatof irrlicht-1.7.2/include/irrTypes.h
+--- irrlicht-1.7.2/include/irrTypes.h.fastatof	2010-10-24 09:43:00.000000000 -0400
++++ irrlicht-1.7.2/include/irrTypes.h	2010-11-17 15:35:17.651571001 -0500
+@@ -67,14 +67,21 @@ typedef signed int		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;
++#else
++typedef unsigned 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;
++#else
++typedef signed long			s64;
++#endif
+ 
+ //! 32 bit floating point variable.
+ /** This is a typedef for float, it ensures portability of the engine. */
diff --git a/irrlicht-1.7.2-irrXML-shared-library.patch b/irrlicht-1.7.2-irrXML-shared-library.patch
new file mode 100644
index 0000000..90a5d05
--- /dev/null
+++ b/irrlicht-1.7.2-irrXML-shared-library.patch
@@ -0,0 +1,80 @@
+diff -up irrlicht-1.7.2/source/Irrlicht/Makefile.irrXML irrlicht-1.7.2/source/Irrlicht/Makefile
+--- irrlicht-1.7.2/source/Irrlicht/Makefile.irrXML	2010-12-15 14:19:07.457930004 -0500
++++ irrlicht-1.7.2/source/Irrlicht/Makefile	2010-12-15 14:22:18.641929916 -0500
+@@ -36,9 +36,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 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 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 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
+@@ -79,9 +80,11 @@ 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 -lpng -lbz2 -laesgm
++irrxml_sharedlib install: IRRXML_SHARED_LIB = libIrrXML.so
++irrlicht_sharedlib install: SHARED_LIB = libIrrlicht.so
++staticlib irrlicht_sharedlib irrxml_sharedlib: LDFLAGS += --no-export-all-symbols --add-stdcall-alias
++irrlicht_sharedlib irrxml_sharedlib: LDFLAGS += -L/usr/X11R6/lib$(LIBSELECT) -lGL -lXxf86vm -lz -ljpeg -lpng -lbz2 -laesgm
++irrlicht_sharedlib: LDFLAGS += -L$(LIB_PATH) -lIrrXML
+ staticlib sharedlib: CXXINCS += -I/usr/X11R6/include
+ 
+ #OSX specific options
+@@ -105,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).$(VERSION_MINOR) -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).$(VERSION_MINOR) -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
+@@ -140,7 +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) $(SHARED_LIB)
++	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:
+@@ -164,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/irrlicht.spec b/irrlicht.spec
index 40fe360..558a815 100644
--- a/irrlicht.spec
+++ b/irrlicht.spec
@@ -1,6 +1,8 @@
+%global irrxml_version 1.2
+
 Name:		irrlicht
 Summary: 	A high performance realtime 3D engine
-Version:	1.7.1
+Version:	1.7.2
 Release:	2%{?dist}
 License:	zlib
 Group:		System Environment/Libraries
@@ -12,6 +14,11 @@ Patch0:		irrlicht-1.7.1-optflags.patch
 Patch1:		irrlicht-1.5.1-glext.patch
 # Use system libaesgm
 Patch2:		irrlicht-1.7.1-libaesgm.patch
+# Use improved fastatof from assimp
+Patch3:		irrlicht-1.7.2-fastatof-improvements.patch
+# Make libIrrXML.so
+Patch4:		irrlicht-1.7.2-irrXML-shared-library.patch
+
 URL:		http://irrlicht.sourceforge.net/
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildRequires:	libXxf86vm-devel, mesa-libGL-devel, mesa-libGLU-devel
@@ -30,16 +37,36 @@ Summary:	Development headers and libraries for irrlicht
 Requires:	%{name} = %{version}-%{release}
 Requires:	mesa-libGL-devel, mesa-libGLU-devel, libXxf86vm-devel
 Requires:	libjpeg-devel, zlib-devel, libpng-devel
+Requires:	irrXML-devel = %{irrxml_version}
 Group:		Development/Libraries
 
 %description devel
 Development headers and libraries for irrlicht.
 
+%package -n irrXML
+Summary:	Simple and fast XML parser for C++
+Group:		System Environment/Libraries
+Version:	%{irrxml_version}
+
+%description -n irrXML
+irrXML is a simple and fast open source xml parser for C++.
+
+%package -n irrXML-devel
+Summary:	Development headers and libraries for irrXML
+Requires:	irrXML = %{irrxml_version}-%{release}
+Group:		Development/Libraries
+
+%description -n irrXML-devel
+Development headers and libraries for irrXML.
+
 %prep
 %setup -q
 %patch0 -p1 -b .optflags
 %patch1 -p1 -b .glext
 %patch2 -p1 -b .libaesgm
+%patch3 -p1 -b .fastatof
+%patch4 -p1 -b .irrXML
+
 sed -i 's/\r//' readme.txt
 iconv -o readme.txt.iso88591 -f iso88591 -t utf8 readme.txt
 mv readme.txt.iso88591 readme.txt
@@ -76,14 +103,45 @@ rm -rf %{buildroot}
 %defattr(-,root,root,-)
 %doc readme.txt
 %{_libdir}/libIrrlicht*.so.*
+%{_libdir}/libIrrXML*.so.*
 
 %files devel
 %defattr(-,root,root,-)
 %doc doc/upgrade-guide.txt
 %{_includedir}/%{name}/
+%exclude %{_includedir}/%{name}/fast_atof.h
+%exclude %{_includedir}/%{name}/heapsort.h
+%exclude %{_includedir}/%{name}/irrArray.h
+%exclude %{_includedir}/%{name}/irrString.h
+%exclude %{_includedir}/%{name}/irrTypes.h
+%exclude %{_includedir}/%{name}/irrXML.h
 %{_libdir}/libIrrlicht*.so
+%{_libdir}/libIrrXML*.so
+
+%files -n irrXML
+%defattr(-,root,root,-)
+%doc readme.txt
+%{_libdir}/libIrrXML*.so.*
+
+%files -n irrXML-devel
+%defattr(-,root,root,-)
+%dir %{_includedir}/%{name}/
+%{_includedir}/%{name}/fast_atof.h
+%{_includedir}/%{name}/heapsort.h
+%{_includedir}/%{name}/irrArray.h
+%{_includedir}/%{name}/irrString.h
+%{_includedir}/%{name}/irrTypes.h
+%{_includedir}/%{name}/irrXML.h
+%{_libdir}/libIrrXML*.so
 
 %changelog
+* Wed Dec 15 2010 Tom "spot" Callaway <tcallawa at redhat.com> - 1.7.2-2
+- make subpackages for irrXML
+- use assimp patch for performance improvement in IrrXML
+
+* Wed Nov 17 2010 Tom "spot" Callaway <tcallawa at redhat.com> - 1.7.2-1
+- update to 1.7.2
+
 * Mon May 24 2010 Tom "spot" Callaway <tcallawa at redhat.com> - 1.7.1-2
 - rebuild against fixed libaesgm
 
diff --git a/sources b/sources
index 8c73ea6..124de43 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-1a6d32b3014fdb91d27af64f735c5226  irrlicht-1.7.1.zip
+eb627d4c432bf73f12bc6d9ddc700b07  irrlicht-1.7.2.zip
-- 
cgit v0.10.2


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


More information about the scm-commits mailing list