[assimp/f17] Initial import

rmattes rmattes at fedoraproject.org
Fri Apr 13 02:44:30 UTC 2012


commit cb9a14eaf03d80c580967e133ef3b2f6d68357bb
Author: Rich Mattes <richmattes at gmail.com>
Date:   Thu Apr 12 22:43:37 2012 -0400

    Initial import

 .gitignore                          |    1 +
 assimp-1.1.700.docfix.patch         |   21 ++
 assimp-1071-gcc47.patch             |   46 ++++
 assimp-2.0.863.pkgconfig.patch      |   14 +
 assimp-2.0.863.unbundleirrxml.patch |  500 +++++++++++++++++++++++++++++++++++
 assimp.spec                         |  135 ++++++++++
 assimp_generate_tarball.sh          |    7 +
 sources                             |    1 +
 8 files changed, 725 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..d995f8f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/assimp-1071.tar.bz2
diff --git a/assimp-1.1.700.docfix.patch b/assimp-1.1.700.docfix.patch
new file mode 100644
index 0000000..e3717ff
--- /dev/null
+++ b/assimp-1.1.700.docfix.patch
@@ -0,0 +1,21 @@
+diff -up ./doc/Doxyfile.docfix ./doc/Doxyfile
+--- ./doc/Doxyfile.docfix	2010-09-20 20:16:34.273588329 -0400
++++ ./doc/Doxyfile	2010-09-20 20:29:36.654459555 -0400
+@@ -160,7 +160,7 @@ IGNORE_PREFIX          = 
+ # configuration options related to the HTML output
+ #---------------------------------------------------------------------------
+ GENERATE_HTML          = YES
+-HTML_OUTPUT            = AssimpDoc_Html
++HTML_OUTPUT            = html
+ HTML_FILE_EXTENSION    = .html
+ HTML_HEADER            = 
+ HTML_FOOTER            = 
+@@ -170,7 +170,7 @@ HTML_DYNAMIC_SECTIONS  = NO
+ GENERATE_DOCSET        = NO
+ DOCSET_FEEDNAME        = "Doxygen generated docs"
+ DOCSET_BUNDLE_ID       = org.doxygen.Project
+-GENERATE_HTMLHELP      = YES
++GENERATE_HTMLHELP      = NO
+ CHM_FILE               = AssimpDoc.chm
+ HHC_LOCATION           = "C:\Program Files (x86)\HTML Help Workshop/hhc.exe"
+ GENERATE_CHI           = NO
diff --git a/assimp-1071-gcc47.patch b/assimp-1071-gcc47.patch
new file mode 100644
index 0000000..dd74e51
--- /dev/null
+++ b/assimp-1071-gcc47.patch
@@ -0,0 +1,46 @@
+diff -up ./code/PolyTools.h.gcc47 ./code/PolyTools.h
+--- ./code/PolyTools.h.gcc47	2012-04-12 00:03:17.653420693 -0400
++++ ./code/PolyTools.h	2012-04-12 00:13:22.410132366 -0400
+@@ -44,6 +44,16 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ #define AI_POLYTOOLS_H_INCLUDED
+ 
+ namespace Assimp {
++// -------------------------------------------------------------------------------
++/** Compute the signed area of a triangle.
++ *  The function accepts an unconstrained template parameter for use with
++ *  both aiVector3D and aiVector2D, but generally ignores the third coordinate.*/
++template <typename T>
++inline double GetArea2D(const T& v1, const T& v2, const T& v3) 
++{
++	return 0.5 * (v1.x * ((double)v3.y - v2.y) + v2.x * ((double)v1.y - v3.y) + v3.x * ((double)v2.y - v1.y));
++}
++
+ 
+ // -------------------------------------------------------------------------------
+ /** Test if a given point p2 is on the left side of the line formed by p0-p1.
+@@ -55,6 +65,7 @@ inline bool OnLeftSideOfLine2D(const T&
+ 	return GetArea2D(p0,p2,p1) > 0;
+ }
+ 
++
+ // -------------------------------------------------------------------------------
+ /** Test if a given point is inside a given triangle in R2.
+  * The function accepts an unconstrained template parameter for use with
+@@ -81,17 +92,6 @@ inline bool PointInTriangle2D(const T& p
+ }
+ 
+ 
+-// -------------------------------------------------------------------------------
+-/** Compute the signed area of a triangle.
+- *  The function accepts an unconstrained template parameter for use with
+- *  both aiVector3D and aiVector2D, but generally ignores the third coordinate.*/
+-template <typename T>
+-inline double GetArea2D(const T& v1, const T& v2, const T& v3) 
+-{
+-	return 0.5 * (v1.x * ((double)v3.y - v2.y) + v2.x * ((double)v1.y - v3.y) + v3.x * ((double)v2.y - v1.y));
+-}
+-
+-
+ // -------------------------------------------------------------------------------
+ /** Check whether the winding order of a given polygon is counter-clockwise.
+  *  The function accepts an unconstrained template parameter, but is intended 
diff --git a/assimp-2.0.863.pkgconfig.patch b/assimp-2.0.863.pkgconfig.patch
new file mode 100644
index 0000000..3dba2df
--- /dev/null
+++ b/assimp-2.0.863.pkgconfig.patch
@@ -0,0 +1,14 @@
+diff -up ./assimp.pc.in.pkgconfig ./assimp.pc.in
+--- ./assimp.pc.in.pkgconfig	2011-12-16 20:06:44.272286603 -0500
++++ ./assimp.pc.in	2011-12-16 20:07:06.063011349 -0500
+@@ -1,7 +1,7 @@
+ prefix=@CMAKE_INSTALL_PREFIX@
+-exec_prefix=@CMAKE_INSTALL_PREFIX@/@BIN_INSTALL_DIR@
+-libdir=@CMAKE_INSTALL_PREFIX@/@LIB_INSTALL_DIR@
+-includedir=@CMAKE_INSTALL_PREFIX@/@INCLUDE_INSTALL_DIR@/assimp
++exec_prefix=@BIN_INSTALL_DIR@
++libdir=@LIB_INSTALL_DIR@
++includedir=@INCLUDE_INSTALL_DIR@/assimp
+ 
+ Name: @CMAKE_PROJECT_NAME@
+ Description: Import various well-known 3D model formats in an uniform manner.
diff --git a/assimp-2.0.863.unbundleirrxml.patch b/assimp-2.0.863.unbundleirrxml.patch
new file mode 100644
index 0000000..01ad5fb
--- /dev/null
+++ b/assimp-2.0.863.unbundleirrxml.patch
@@ -0,0 +1,500 @@
+unchanged:
+--- ./code/ACLoader.cpp.unbundle	2011-03-23 21:41:01.125343648 -0400
++++ ./code/ACLoader.cpp	2011-03-23 21:41:21.987343659 -0400
+@@ -53,7 +53,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ #include "Subdivision.h"
+ 
+ using namespace Assimp;
+-
++using namespace irr::core;
+ 
+ // ------------------------------------------------------------------------------------------------
+ // skip to the next token
+unchanged:
+--- ./code/ASEParser.cpp.unbundle	2011-03-23 21:41:47.254343631 -0400
++++ ./code/ASEParser.cpp	2011-03-23 21:42:15.258343625 -0400
+@@ -53,6 +53,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ 
+ using namespace Assimp;
+ using namespace Assimp::ASE;
++using namespace irr::core;
+ 
+ 
+ // ------------------------------------------------------------------------------------------------
+unchanged:
+--- ./code/BlenderDNA.cpp.unbundle	2011-03-23 21:44:29.224343605 -0400
++++ ./code/BlenderDNA.cpp	2011-03-23 21:44:41.802343605 -0400
+@@ -52,7 +52,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ using namespace Assimp;
+ using namespace Assimp::Blender;
+ using namespace Assimp::Formatter;
+-
++using namespace irr::core;
+ #define for_each BOOST_FOREACH
+ bool match4(StreamReaderAny& stream, const char* string) {
+ 	char tmp[] = { 
+unchanged:
+--- ./code/BVHLoader.cpp.unbundle	2011-03-23 21:44:56.331343598 -0400
++++ ./code/BVHLoader.cpp	2011-03-23 21:45:12.305343508 -0400
+@@ -48,6 +48,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ #include "SkeletonMeshBuilder.h"
+ 
+ using namespace Assimp;
++using namespace irr::core;
+ 
+ // ------------------------------------------------------------------------------------------------
+ // Constructor to be privately used by Importer
+unchanged:
+--- ./code/COBLoader.cpp.unbundle	2011-03-23 21:45:31.765343574 -0400
++++ ./code/COBLoader.cpp	2011-03-23 21:45:46.945343598 -0400
+@@ -57,6 +57,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ using namespace Assimp;
+ using namespace Assimp::COB;
+ using namespace Assimp::Formatter;
++using namespace irr::core;
+ 
+ #define for_each BOOST_FOREACH
+ 
+unchanged:
+--- ./code/ColladaLoader.cpp.unbundle	2011-03-23 21:45:55.314343575 -0400
++++ ./code/ColladaLoader.cpp	2011-03-23 21:46:10.225343577 -0400
+@@ -55,6 +55,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ #include "time.h"
+ 
+ using namespace Assimp;
++using namespace irr::core;
+ 
+ // ------------------------------------------------------------------------------------------------
+ // Constructor to be privately used by Importer
+unchanged:
+--- ./code/ColladaParser.cpp.unbundle	2011-03-23 21:46:24.981343567 -0400
++++ ./code/ColladaParser.cpp	2011-03-23 21:46:47.605343536 -0400
+@@ -52,6 +52,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ 
+ using namespace Assimp;
+ using namespace Assimp::Collada;
++using namespace irr::core;
+ 
+ // ------------------------------------------------------------------------------------------------
+ // Constructor to be privately used by Importer
+unchanged:
+--- ./code/CSMLoader.cpp.unbundle	2011-03-23 21:46:59.343343561 -0400
++++ ./code/CSMLoader.cpp	2011-03-23 21:47:18.005343554 -0400
+@@ -53,6 +53,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ #include "fast_atof.h"
+ 
+ using namespace Assimp;
++using namespace irr::core;
+ 
+ // ------------------------------------------------------------------------------------------------
+ // Constructor to be privately used by Importer
+unchanged:
+--- ./code/DXFHelper.h.unbundle	2011-03-23 22:05:57.754343272 -0400
++++ ./code/DXFHelper.h	2011-03-23 22:12:02.645343177 -0400
+@@ -52,7 +52,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ namespace Assimp {
+ 	namespace DXF {
+ 
+-
++using namespace irr::core;
+ // read pairs of lines, parse group code and value and provide utilities
+ // to convert the data to the target data type.
+ class LineReader
+@@ -99,17 +99,17 @@ public:
+ 
+ 	// -----------------------------------------
+ 	unsigned int ValueAsUnsignedInt() const {
+-		return strtoul10(value.c_str());
++		return irr::core::strtoul10(value.c_str());
+ 	}
+ 
+ 	// -----------------------------------------
+ 	int ValueAsSignedInt() const {
+-		return strtol10(value.c_str());
++		return irr::core::strtol10(value.c_str());
+ 	}
+ 
+ 	// -----------------------------------------
+ 	float ValueAsFloat() const {
+-		return fast_atof(value.c_str());
++		return irr::core::fast_atof(value.c_str());
+ 	}
+ 
+ public:
+@@ -125,7 +125,7 @@ public:
+ 		}
+ 
+ 		try {
+-			groupcode = strtol10(splitter->c_str());
++			groupcode = irr::core::strtol10(splitter->c_str());
+ 			splitter++;
+ 
+ 			value = *splitter;
+unchanged:
+--- ./code/DXFLoader.cpp.unbundle	2011-03-23 21:47:31.836343565 -0400
++++ ./code/DXFLoader.cpp	2011-03-23 21:47:49.751343542 -0400
+@@ -54,6 +54,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ #include "DXFHelper.h"
+ 
+ using namespace Assimp;
++using namespace irr::core;
+ 
+ // AutoCAD Binary DXF<CR><LF><SUB><NULL> 
+ #define AI_DXF_BINARY_IDENT ("AutoCAD Binary DXF\r\n\x1a\0")
+unchanged:
+--- ./code/IRRLoader.cpp.unbundle	2011-03-23 21:49:20.457343529 -0400
++++ ./code/IRRLoader.cpp	2011-03-23 21:50:01.779343515 -0400
+@@ -60,7 +60,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ using namespace Assimp;
+ using namespace irr;
+ using namespace irr::io;
+-
++using namespace irr::core;
+ 
+ // ------------------------------------------------------------------------------------------------
+ // Constructor to be privately used by Importer
+unchanged:
+--- ./code/IRRMeshLoader.cpp.unbundle	2011-03-23 21:49:26.022343523 -0400
++++ ./code/IRRMeshLoader.cpp	2011-03-23 21:50:17.416343509 -0400
+@@ -50,7 +50,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ using namespace Assimp;
+ using namespace irr;
+ using namespace irr::io;
+-
++using namespace irr::core;
+ // ------------------------------------------------------------------------------------------------
+ // Constructor to be privately used by Importer
+ IRRMeshImporter::IRRMeshImporter()
+unchanged:
+--- ./code/IRRShared.cpp.unbundle	2011-03-23 21:49:41.669343519 -0400
++++ ./code/IRRShared.cpp	2011-03-23 21:50:27.889343507 -0400
+@@ -52,6 +52,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ using namespace Assimp;
+ using namespace irr;
+ using namespace irr::io;
++using namespace irr::core;
+ 
+ // Transformation matrix to convert from Assimp to IRR space
+ const aiMatrix4x4 Assimp::AI_TO_IRR_MATRIX = aiMatrix4x4 ( 
+unchanged:
+--- ./code/irrXMLWrapper.h.unbundle	2011-03-23 20:52:45.743344385 -0400
++++ ./code/irrXMLWrapper.h	2011-03-23 20:57:17.692344314 -0400
+@@ -42,7 +42,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ #define INCLUDED_AI_IRRXML_WRAPPER
+ 
+ // some long includes ....
+-#include "./../contrib/irrXML/irrXML.h"
++#include "irrXML.h"
+ #include "./../include/IOStream.h"
+ namespace Assimp	{
+ 
+@@ -115,7 +115,7 @@ public:
+ 
+ 	// ----------------------------------------------------------------------------------
+ 	//! Returns size of file in bytes
+-	virtual int getSize()	{
++	virtual long getSize() const	{
+ 		return (int)data.size();
+ 	}
+ 
+unchanged:
+--- ./code/MD5Parser.cpp.unbundle	2011-03-23 21:52:52.063343472 -0400
++++ ./code/MD5Parser.cpp	2011-03-23 21:53:02.696343467 -0400
+@@ -53,6 +53,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ 
+ using namespace Assimp;
+ using namespace Assimp::MD5;
++using namespace irr::core;
+ 
+ // ------------------------------------------------------------------------------------------------
+ // Parse the segment structure fo a MD5 file
+unchanged:
+--- ./code/NFFLoader.cpp.unbundle	2011-03-23 21:53:28.996343462 -0400
++++ ./code/NFFLoader.cpp	2011-03-23 21:53:39.807343522 -0400
+@@ -52,6 +52,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ #include "RemoveComments.h"
+ 
+ using namespace Assimp;
++using namespace irr::core;
+ 
+ // ------------------------------------------------------------------------------------------------
+ // Constructor to be privately used by Importer
+unchanged:
+--- ./code/ObjFileMtlImporter.cpp.unbundle	2011-03-23 21:54:14.222343453 -0400
++++ ./code/ObjFileMtlImporter.cpp	2011-03-23 21:54:35.751343456 -0400
+@@ -47,6 +47,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ #include "ObjFileData.h"
+ #include "fast_atof.h"
+ 
++using namespace irr::core;
+ namespace Assimp	{
+ 
+ // -------------------------------------------------------------------
+unchanged:
+--- ./code/ObjTools.h.unbundle	2011-03-23 21:54:56.550343444 -0400
++++ ./code/ObjTools.h	2011-03-23 21:55:09.938343448 -0400
+@@ -45,6 +45,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ #define OBJ_TOOLS_H_INC
+ 
+ #include "fast_atof.h"
++using namespace irr::core;
+ 
+ namespace Assimp
+ {
+unchanged:
+--- ./code/OFFLoader.cpp.unbundle	2011-03-23 21:55:19.651343434 -0400
++++ ./code/OFFLoader.cpp	2011-03-23 21:55:37.045343406 -0400
+@@ -53,6 +53,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ 
+ 
+ using namespace Assimp;
++using namespace irr::core;
+ 
+ // ------------------------------------------------------------------------------------------------
+ // Constructor to be privately used by Importer
+unchanged:
+--- ./code/OgreXmlHelper.h.unbundle	2011-03-23 21:55:58.418343421 -0400
++++ ./code/OgreXmlHelper.h	2011-03-23 21:56:25.438343414 -0400
+@@ -1,6 +1,7 @@
+ 
+ #include "irrXMLWrapper.h"
+ #include "fast_atof.h"
++using namespace irr::core;
+ 
+ namespace Assimp
+ {
+unchanged:
+--- ./code/PlyParser.cpp.unbundle	2011-03-23 21:56:40.350343411 -0400
++++ ./code/PlyParser.cpp	2011-03-23 21:56:51.269343393 -0400
+@@ -48,6 +48,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ #include "fast_atof.h"
+ 
+ using namespace Assimp;
++using namespace irr::core;
+ 
+ // ------------------------------------------------------------------------------------------------
+ PLY::EDataType PLY::Property::ParseDataType(const char* pCur,const char** pCurOut)
+unchanged:
+--- ./code/RawLoader.cpp.unbundle	2011-03-23 21:57:57.564343410 -0400
++++ ./code/RawLoader.cpp	2011-03-23 21:58:07.303343389 -0400
+@@ -52,6 +52,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ #include "fast_atof.h"
+ 
+ using namespace Assimp;
++using namespace irr::core;
+ 
+ // ------------------------------------------------------------------------------------------------
+ // Constructor to be privately used by Importer
+unchanged:
+--- ./code/SceneCombiner.cpp.unbundle	2011-03-23 21:58:24.127343385 -0400
++++ ./code/SceneCombiner.cpp	2011-03-23 21:58:51.071343379 -0400
+@@ -52,6 +52,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ #include "Hash.h"
+ #include "time.h"
+ 
++using namespace irr::core;
++
+ namespace Assimp	{
+ 
+ // ------------------------------------------------------------------------------------------------
+unchanged:
+--- ./code/SMDLoader.cpp.unbundle	2011-03-23 21:59:04.323343376 -0400
++++ ./code/SMDLoader.cpp	2011-03-23 21:59:14.629343374 -0400
+@@ -52,6 +52,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ #include "SkeletonMeshBuilder.h"
+ 
+ using namespace Assimp;
++using namespace irr::core;
+ 
+ // ------------------------------------------------------------------------------------------------
+ // Constructor to be privately used by Importer
+unchanged:
+--- ./code/STLLoader.cpp.unbundle	2011-03-23 21:59:30.182343374 -0400
++++ ./code/STLLoader.cpp	2011-03-23 21:59:47.109343351 -0400
+@@ -50,6 +50,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ #include "fast_atof.h"
+ 
+ using namespace Assimp;
++using namespace irr::core;
+ 
+ 
+ // ------------------------------------------------------------------------------------------------
+unchanged:
+--- ./code/UnrealLoader.cpp.unbundle	2011-03-23 21:59:57.342343413 -0400
++++ ./code/UnrealLoader.cpp	2011-03-23 22:00:06.991343406 -0400
+@@ -57,6 +57,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ #include "ConvertToLHProcess.h"
+ 
+ using namespace Assimp;
++using namespace irr::core;
+ 
+ // ------------------------------------------------------------------------------------------------
+ // Constructor to be privately used by Importer
+unchanged:
+--- ./code/XFileParser.cpp.unbundle	2011-03-23 22:00:21.502343355 -0400
++++ ./code/XFileParser.cpp	2011-03-23 22:00:37.987343352 -0400
+@@ -50,6 +50,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ 
+ using namespace Assimp;
+ using namespace Assimp::XFile;
++using namespace irr::core;
+ 
+ #ifndef ASSIMP_BUILD_NO_COMPRESSED_X
+ 
+diff -u ./tools/assimp_cmd/ImageExtractor.cpp ./tools/assimp_cmd/ImageExtractor.cpp
+--- ./tools/assimp_cmd/ImageExtractor.cpp	2011-03-23 22:01:45.684343323 -0400
++++ ./tools/assimp_cmd/ImageExtractor.cpp	2011-08-24 21:11:13.728999240 -0400
+@@ -44,9 +44,10 @@
+  */
+ 
+ #include "Main.h"
+-#include <../code/fast_atof.h>
++#include <fast_atof.h>
+ #include <../code/StringComparison.h>
+ 
++using namespace irr::core;
+ const char* AICMD_MSG_DUMP_HELP_E = 
+ "assimp extract <model> [<out>] [-t<n>] [-f<fmt>] [-ba] [-s] [common parameters]\n"
+ "\t -ba   Writes BMP's with alpha channel\n"
+@@ -58,6 +59,7 @@
+ 
+ #define AI_EXTRACT_WRITE_BMP_ALPHA 0x1
+ #include "Compiler/pushpack1.h"
++using namespace irr::core;
+ 
+ // -----------------------------------------------------------------------------------
+ // Data structure for the first header of a BMP
+@@ -269,10 +271,10 @@
+ 			nosuffix = true;
+ 		}
+ 		else if ( !strncmp( params[i], "--texture=",10)) {
+-			texIdx = Assimp::strtoul10(params[i]+10);
++			texIdx = strtoul10(params[i]+10);
+ 		}
+ 		else if ( !strncmp( params[i], "-t",2)) {
+-			texIdx = Assimp::strtoul10(params[i]+2);
++			texIdx = strtoul10(params[i]+2);
+ 		}
+ 		else if ( !strcmp( params[i], "-ba") ||  !strcmp( params[i], "--bmp-with-alpha")) {
+ 			flags |= AI_EXTRACT_WRITE_BMP_ALPHA;
+unchanged:
+--- ./CMakeLists.txt.irrxml	2011-08-24 19:58:48.590392282 -0400
++++ ./CMakeLists.txt	2011-08-24 20:52:56.758647734 -0400
+@@ -97,6 +97,12 @@ if (PKG_CONFIG_FOUND)
+ 	PKG_CHECK_MODULES(UNZIP minizip)
+ endif (PKG_CONFIG_FOUND)
+ 
++# Search for irrXML
++FIND_LIBRARY(IRRXML_LIB IrrXML HINTS ${IRRXML_LIB_PATH})
++FIND_FILE(IRRXML_H irrXML.h PATHS ${IRRXML_INCLUDE_PATH})
++  message (STATUS "Found External IrrXML")
++  set(HAVE_IRRXML true)
++
+ IF ( NO_EXPORT )
+ 	ADD_DEFINITIONS( -DASSIMP_BUILD_NO_EXPORT)
+ 	MESSAGE( STATUS "Build an import-only version of Assimp." )
+unchanged:
+--- ./code/CMakeLists.txt.irrxml	2011-08-24 20:01:47.895466510 -0400
++++ ./code/CMakeLists.txt	2011-08-24 20:46:03.550302122 -0400
+@@ -89,7 +89,7 @@ SET( Logging_SRCS
+ SOURCE_GROUP(Logging FILES ${Logging_SRCS})
+ 
+ SET( Common_SRCS
+-	fast_atof.h
++    #fast_atof.h
+ 	qnan.h
+ 	BaseImporter.cpp
+ 	BaseImporter.h
+@@ -592,9 +592,9 @@ ADD_LIBRARY( assimp SHARED
+ 	${IFC_SRCS}
+ 	
+ 	# Third-party libraries
+-	${IrrXML_SRCS}
+-	${ConvertUTF_SRCS}
+-	${unzip_compile_SRCS}
++	#${IrrXML_SRCS}
++	${ConvertUTF_SRCS}
++	#${unzip_compile_SRCS}
+ 	# Necessary to show the headers in the project when using the VC++ generator:
+ 	${Boost_SRCS}
+ 
+@@ -616,6 +616,13 @@ else (UNZIP_FOUND)
+ 	INCLUDE_DIRECTORIES("../contrib/unzip")
+ endif (UNZIP_FOUND)
+ 
++if (HAVE_IRRXML)
++  INCLUDE_DIRECTORIES(${IRRXML_INCLUDE_PATH})
++  TARGET_LINK_LIBRARIES(assimp ${IRRXML_LIB})
++else (HAVE_IRRXML)
++  INCLUDE_DIRECTORIES("../contrib/irrXML")
++endif (HAVE_IRRXML)
++
+ INSTALL( TARGETS assimp DESTINATION ${LIB_INSTALL_DIR} COMPONENT libassimp${ASSIMP_VERSION_MAJOR})
+ INSTALL( FILES ${PUBLIC_HEADERS} DESTINATION ${INCLUDE_INSTALL_DIR}/assimp COMPONENT assimp-dev)
+ INSTALL( FILES ${COMPILER_HEADERS} DESTINATION ${INCLUDE_INSTALL_DIR}/assimp/Compiler COMPONENT assimp-dev)
+only in patch2:
+unchanged:
+--- ./code/FileSystemFilter.h.unbundle	2011-08-24 20:20:40.500037178 -0400
++++ ./code/FileSystemFilter.h	2011-08-24 20:20:53.539428337 -0400
+@@ -234,7 +234,7 @@ private:
+ 			
+ 				// Hex sequence in URIs
+ 				if( IsHex((&*it)[0]) && IsHex((&*it)[1]) ) {
+-					*it = HexOctetToDecimal(&*it);
++					*it = irr::core::HexOctetToDecimal(&*it);
+ 					it = in.erase(it+1,it+2);
+ 					--it;
+ 				}
+only in patch2:
+unchanged:
+--- ./code/LWSLoader.cpp.unbundle	2011-08-24 21:04:54.737754312 -0400
++++ ./code/LWSLoader.cpp	2011-08-24 20:59:35.286381910 -0400
+@@ -56,7 +56,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ #include "Importer.h"
+ 
+ using namespace Assimp;
+-
++using namespace irr::core;
+ // ------------------------------------------------------------------------------------------------
+ // Recursive parsing of LWS files
+ void LWS::Element::Parse (const char*& buffer)
+only in patch2:
+unchanged:
+--- ./code/MaterialSystem.cpp.unbundle	2011-08-24 20:24:34.927884069 -0400
++++ ./code/MaterialSystem.cpp	2011-08-24 20:24:51.464354603 -0400
+@@ -50,7 +50,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ #include "MaterialSystem.h"
+ 
+ using namespace Assimp;
+-
++using namespace irr::core;
+ // ------------------------------------------------------------------------------------------------
+ // Get a specific property from a material
+ aiReturn aiGetMaterialProperty(const aiMaterial* pMat, 
+only in patch2:
+unchanged:
+--- ./code/STEPFileReader.cpp.unbundle	2011-08-24 21:03:11.001539590 -0400
++++ ./code/STEPFileReader.cpp	2011-08-24 21:03:31.053359977 -0400
+@@ -48,6 +48,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ #include "fast_atof.h"
+ 
+ using namespace Assimp;
++using namespace irr::core;
+ namespace EXPRESS = STEP::EXPRESS;
+ 
+ #include <functional>
+only in patch2:
+unchanged:
+--- ./tools/assimp_cmd/CMakeLists.txt.unbundle	2011-08-24 21:07:32.570036019 -0400
++++ ./tools/assimp_cmd/CMakeLists.txt	2011-08-24 21:12:35.384289299 -0400
+@@ -16,8 +16,9 @@ ADD_EXECUTABLE( assimp_cmd
+ 	Info.cpp
+ 	Export.cpp
+ )
+-
++INCLUDE_DIRECTORIES(${IRRXML_INCLUDE_PATH})
+ TARGET_LINK_LIBRARIES( assimp_cmd assimp ${ZLIB_LIBRARIES})
++TARGET_LINK_LIBRARIES( assimp_cmd ${IRRXML_LIB})
+ SET_TARGET_PROPERTIES( assimp_cmd PROPERTIES
+ 	OUTPUT_NAME assimp
+ )
diff --git a/assimp.spec b/assimp.spec
new file mode 100644
index 0000000..04d6e39
--- /dev/null
+++ b/assimp.spec
@@ -0,0 +1,135 @@
+%global svnrev 1071
+
+Name:           assimp
+Version:        2.0.863
+Release:        5.20110824svn%{?dist}
+Summary:        Library to import various 3D model formats into applications
+
+Group:          Development/Libraries
+License:        BSD
+URL:            http://assimp.sourceforge.net
+# Used 'assimp_generate_tarball svnrev' to generate source
+Source0:        %{name}-%{svnrev}.tar.bz2
+Source1:        assimp_generate_tarball.sh
+BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
+# Strips bundled irrXML out of build files, and allows project to build
+# against system versions of the libraries (not yet submitted upstream) 
+Patch0:         %{name}-2.0.863.unbundleirrxml.patch
+# Change a doxygen setting so CHM help isn't generated
+Patch1:         %{name}-1.1.700.docfix.patch
+Patch2:         %{name}-2.0.863.pkgconfig.patch
+Patch3:         %{name}-1071-gcc47.patch
+BuildRequires:  boost-devel
+BuildRequires:  cmake
+BuildRequires:  dos2unix
+BuildRequires:  irrlicht-devel
+BuildRequires:  irrXML-devel
+BuildRequires:  zlib-devel
+BuildRequires:  doxygen
+BuildRequires:  minizip-devel
+
+%description
+Assimp, the Open Asset Import Library, is a free library to import 
+various well-known 3D model formats into applications.  Assimp aims 
+to provide a full asset conversion pipeline for use in game 
+engines and real-time rendering systems, but is not limited 
+to these applications.
+
+%package devel
+Summary: Header files and libraries for assimp
+Group: Development/Libraries
+Requires: %{name} = %{version}-%{release}
+
+%description devel
+This package contains the header files and libraries
+for assimp. If you would like to develop programs using assimp,
+you will need to install assimp-devel.
+
+%prep
+%setup -q -n %{name}
+# Get rid of bundled libs so we can't accidently build against them
+rm -rf contrib/irrXML
+rm -rf contrib/zlib
+rm -rf contrib/unzip
+rm -rf code/fast_atof.h
+%patch0 -p0
+%patch1 -p1
+%patch2 -p1
+%patch3 -p0
+
+%build
+mkdir build
+pushd build
+%cmake  -DLIB_INSTALL_DIR=%{_libdir} -DINCLUDE_INSTALL_DIR=%{_includedir} -DBIN_INSTALL_DIR=%{_bindir} -DIRRXML_LIB_PATH=${_libdir} -DIRRXML_INCLUDE_PATH=%{_includedir}/irrlicht/ -DUSE_EXTERNAL_LIBS=ON ..
+popd
+make %{?_smp_mflags} -C build
+
+# Generate docs, copy assimp logo image and stylesheet into generated docs
+pushd doc
+doxygen Doxyfile
+dos2unix style.css
+cp style.css html/style.css
+cp AssimpDoc_Html/dragonsplash.png html/dragonsplash.png
+popd
+
+# Fix file encoding
+dos2unix README LICENSE CREDITS
+iconv -f iso8859-1 -t utf-8 CREDITS > CREDITS.conv && mv -f CREDITS.conv CREDITS
+
+%install
+rm -rf %{buildroot}
+make -C build install DESTDIR=%{buildroot}
+
+
+%clean
+rm -rf %{buildroot}
+
+%post -p /sbin/ldconfig
+
+%postun -p /sbin/ldconfig
+
+
+%files
+%defattr(-,root,root,-)
+%doc README LICENSE CREDITS
+%{_bindir}/assimp
+%{_libdir}/*.so.*
+
+%files devel
+%defattr(-,root,root,-)
+%doc doc/html
+%{_includedir}/assimp
+%{_libdir}/*.so
+%{_libdir}/pkgconfig/*.pc
+
+
+%changelog
+* Wed Apr 11 2012 Rich Mattes <richmattes at gmail.com> - 2.0.863-5.20110824svn
+- Changed spec to use buildroot macro
+
+* Sat Dec 17 2011 Rich Mattes <richmattes at gmail.com> - 2.0.863-4.20110824svn
+- Fixed pkgconfig paths
+
+* Wed Aug 24 2011 Rich Mattes <richmattes at gmail.com> - 2.0.863-3.20110824svn
+- Upgrade to latest svn snapshot
+- Port changes to link against system irrXML
+- Removed upstreamed zlib/unzip unbundling patches
+
+* Thu Mar 24 2011 Rich Mattes <richmattes at gmail.com> - 2.0.863-2.20110324svn
+- Upgrade to latest svn snapshot
+- Port changes to link against libIrrXML
+
+* Sat Dec 18 2010 Rich Mattes <richmattes at gmail.com> - 2.0.863-1
+- Upgrade to release 2.0
+
+* Mon Sep 20 2010 Rich Mattes <richmattes at gmail.com> - 1.1.700-3
+- Remove extra buildrequires
+- Generate doxygen docs manually
+
+* Mon Sep 20 2010 Rich Mattes <richmattes at gmail.com> - 1.1.700-2
+- Included doxygen-generated docs
+- Using original .zip file from project download page
+
+* Sun Sep 19 2010 Rich Mattes <richmattes at gmail.com> - 1.1.700-1
+- First build
diff --git a/assimp_generate_tarball.sh b/assimp_generate_tarball.sh
new file mode 100644
index 0000000..c16af7e
--- /dev/null
+++ b/assimp_generate_tarball.sh
@@ -0,0 +1,7 @@
+#!/bin/bash
+svn export -r $1 http://assimp.svn.sourceforge.net/svnroot/assimp/trunk assimp
+pushd assimp
+find ./ -name "*.dll" -exec rm -r {} \;
+rm -rf test/models-nonbsd
+popd
+tar cjf assimp-$1.tar.bz2 assimp/
diff --git a/sources b/sources
index e69de29..12b076f 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+fe207f70cd3acb960b9ab6fe06ebead2  assimp-1071.tar.bz2


More information about the scm-commits mailing list