public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: media-libs/cal3d/, media-libs/cal3d/files/
@ 2017-09-20 21:35 Andreas Hüttel
  0 siblings, 0 replies; 2+ messages in thread
From: Andreas Hüttel @ 2017-09-20 21:35 UTC (permalink / raw
  To: gentoo-commits

commit:     17abb476be7dce66226989d2639fb73c4171edc8
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Wed Sep 20 21:35:35 2017 +0000
Commit:     Andreas Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Wed Sep 20 21:35:35 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=17abb476

media-libs/cal3d: Fix build with gcc-6, bug 594310

Maintainer timeout (>12 months). Patch by Peter Levine.

Closes: https://bugs.gentoo.org/594310
Package-Manager: Portage-2.3.10, Repoman-2.3.3

 media-libs/cal3d/cal3d-0.11.0-r1.ebuild        |   5 +-
 media-libs/cal3d/files/cal3d-0.11.0-gcc6.patch | 688 +++++++++++++++++++++++++
 2 files changed, 691 insertions(+), 2 deletions(-)

diff --git a/media-libs/cal3d/cal3d-0.11.0-r1.ebuild b/media-libs/cal3d/cal3d-0.11.0-r1.ebuild
index eae1d6625f6..40c49372639 100644
--- a/media-libs/cal3d/cal3d-0.11.0-r1.ebuild
+++ b/media-libs/cal3d/cal3d-0.11.0-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2014 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=5
@@ -23,7 +23,8 @@ src_prepare() {
 	epatch \
 		"${FILESDIR}"/${P}-gcc43.patch \
 	    "${FILESDIR}"/${P}-tests.patch \
-	    "${FILESDIR}"/${P}-verbose.patch
+	    "${FILESDIR}"/${P}-verbose.patch \
+	    "${FILESDIR}"/${P}-gcc6.patch
 	sed -i \
 		-e "s:db2html:docbook2html:g" \
 		configure.in \

diff --git a/media-libs/cal3d/files/cal3d-0.11.0-gcc6.patch b/media-libs/cal3d/files/cal3d-0.11.0-gcc6.patch
new file mode 100644
index 00000000000..98fc546eace
--- /dev/null
+++ b/media-libs/cal3d/files/cal3d-0.11.0-gcc6.patch
@@ -0,0 +1,688 @@
+--- cal3d-0.11.0/src/cal3d/loader.cpp.old	2016-09-24 00:58:09.968689367 -0400
++++ cal3d-0.11.0/src/cal3d/loader.cpp	2016-09-24 01:06:54.867068386 -0400
+@@ -886,7 +886,7 @@
+   if(!dataSrc.ok())
+   {
+     dataSrc.setError();
+-    return false;
++    return NULL;
+   }
+ 
+   // allocate a new core keyframe instance
+@@ -1338,13 +1338,13 @@
+ 		if(stricmp(skeleton->Attribute("MAGIC"),Cal::SKELETON_XMLFILE_MAGIC)!=0)
+ 		{
+ 			CalError::setLastError(CalError::INVALID_FILE_FORMAT, __FILE__, __LINE__, strFilename);
+-			return false;
++			return NULL;
+ 		}
+ 
+ 		if(atoi(skeleton->Attribute("VERSION")) < Cal::EARLIEST_COMPATIBLE_FILE_VERSION )
+ 		{
+ 			CalError::setLastError(CalError::INCOMPATIBLE_FILE_VERSION, __FILE__, __LINE__, strFilename);
+-			return false;
++			return NULL;
+ 		}
+ 
+ 		skeleton = skeleton->NextSiblingElement();
+@@ -1353,19 +1353,19 @@
+ 	if(!skeleton || stricmp(skeleton->Value(),"SKELETON")!=0)
+ 	{
+ 		CalError::setLastError(CalError::INVALID_FILE_FORMAT, __FILE__, __LINE__, strFilename);
+-		return false;
++		return NULL;
+ 	}
+ 
+ 	if(skeleton->Attribute("MAGIC")!=NULL && stricmp(skeleton->Attribute("MAGIC"),Cal::SKELETON_XMLFILE_MAGIC)!=0)
+ 	{
+ 		CalError::setLastError(CalError::INVALID_FILE_FORMAT, __FILE__, __LINE__, strFilename);
+-		return false;
++		return NULL;
+ 	}
+ 
+ 	if(skeleton->Attribute("VERSION")!=NULL && atoi(skeleton->Attribute("VERSION")) < Cal::EARLIEST_COMPATIBLE_FILE_VERSION )
+ 	{
+ 		CalError::setLastError(CalError::INCOMPATIBLE_FILE_VERSION, __FILE__, __LINE__, strFilename);
+-		return false;
++		return NULL;
+ 	}
+ 
+ 
+@@ -1383,7 +1383,7 @@
+ 		if(stricmp(bone->Value(),"BONE")!=0)
+ 		{
+ 			CalError::setLastError(CalError::INVALID_FILE_FORMAT, __FILE__, __LINE__, strFilename);
+-			return false;
++			return NULL;
+ 		}    
+ 
+ 		std::string strName=bone->Attribute("NAME");
+@@ -1395,7 +1395,7 @@
+ 		if(!translation || stricmp( translation->Value(),"TRANSLATION")!=0)
+ 		{
+ 			CalError::setLastError(CalError::INVALID_FILE_FORMAT, __FILE__, __LINE__, strFilename);
+-			return false;
++			return NULL;
+ 		}
+ 
+ 		float tx, ty, tz;
+@@ -1404,13 +1404,13 @@
+ 		if(!node)
+ 		{
+ 			CalError::setLastError(CalError::INVALID_FILE_FORMAT, __FILE__, __LINE__, strFilename);
+-			return false;
++			return NULL;
+ 		}    
+ 		TiXmlText* translationdata = node->ToText();
+ 		if(!translationdata)
+ 		{
+ 			CalError::setLastError(CalError::INVALID_FILE_FORMAT, __FILE__, __LINE__, strFilename);
+-			return false;
++			return NULL;
+ 		}    
+ 		str.clear();
+ 		str << translationdata->Value();
+@@ -1422,7 +1422,7 @@
+ 		if(!rotation || stricmp(rotation->Value(),"ROTATION")!=0)
+ 		{
+ 			CalError::setLastError(CalError::INVALID_FILE_FORMAT, __FILE__, __LINE__, strFilename);
+-			return false;
++			return NULL;
+ 		}
+ 
+ 		float rx, ry, rz, rw;
+@@ -1431,13 +1431,13 @@
+ 		if(!node)
+ 		{
+ 			CalError::setLastError(CalError::INVALID_FILE_FORMAT, __FILE__, __LINE__, strFilename);
+-			return false;
++			return NULL;
+ 		}
+ 		TiXmlText* rotationdata = node->ToText();
+ 		if(!rotationdata)
+ 		{
+ 			CalError::setLastError(CalError::INVALID_FILE_FORMAT, __FILE__, __LINE__, strFilename);
+-			return false;
++			return NULL;
+ 		}
+ 		str.clear();
+ 		str << rotationdata->Value();
+@@ -1450,7 +1450,7 @@
+ 		if(!rotation || stricmp(translationBoneSpace->Value(),"LOCALTRANSLATION")!=0)
+ 		{
+ 			CalError::setLastError(CalError::INVALID_FILE_FORMAT, __FILE__, __LINE__, strFilename);
+-			return false;
++			return NULL;
+ 		}
+ 
+ 		float txBoneSpace, tyBoneSpace, tzBoneSpace;
+@@ -1459,13 +1459,13 @@
+ 		if(!node)
+ 		{
+ 			CalError::setLastError(CalError::INVALID_FILE_FORMAT, __FILE__, __LINE__, strFilename);
+-			return false;
++			return NULL;
+ 		}
+ 		TiXmlText* translationBoneSpacedata = node->ToText();
+ 		if(!translationBoneSpacedata)
+ 		{
+ 			CalError::setLastError(CalError::INVALID_FILE_FORMAT, __FILE__, __LINE__, strFilename);
+-			return false;
++			return NULL;
+ 		}
+ 		str.clear();
+ 		str << translationBoneSpacedata->Value();
+@@ -1477,7 +1477,7 @@
+ 		if(!rotationBoneSpace || stricmp(rotationBoneSpace->Value(),"LOCALROTATION")!=0)
+ 		{
+ 			CalError::setLastError(CalError::INVALID_FILE_FORMAT, __FILE__, __LINE__, strFilename);
+-			return false;
++			return NULL;
+ 		}
+ 
+ 		float rxBoneSpace, ryBoneSpace, rzBoneSpace, rwBoneSpace;
+@@ -1486,13 +1486,13 @@
+ 		if(!node)
+ 		{
+ 			CalError::setLastError(CalError::INVALID_FILE_FORMAT, __FILE__, __LINE__, strFilename);
+-			return false;
++			return NULL;
+ 		}
+ 		TiXmlText* rotationBoneSpacedata = node->ToText();
+ 		if(!rotationBoneSpacedata)
+ 		{
+ 			CalError::setLastError(CalError::INVALID_FILE_FORMAT, __FILE__, __LINE__, strFilename);
+-			return false;
++			return NULL;
+ 		}
+ 		str.clear();
+ 		str << rotationBoneSpacedata->Value();
+@@ -1504,7 +1504,7 @@
+ 		if(!parent ||stricmp(parent->Value(),"PARENTID")!=0)
+ 		{
+ 			CalError::setLastError(CalError::INVALID_FILE_FORMAT, __FILE__, __LINE__, strFilename);
+-			return false;
++			return NULL;
+ 		}
+ 
+ 
+@@ -1514,13 +1514,13 @@
+ 		if(!node)
+ 		{
+ 			CalError::setLastError(CalError::INVALID_FILE_FORMAT, __FILE__, __LINE__, strFilename);
+-			return false;
++			return NULL;
+ 		}
+ 		TiXmlText* parentid = node->ToText();
+ 		if(!parentid)
+ 		{
+ 			CalError::setLastError(CalError::INVALID_FILE_FORMAT, __FILE__, __LINE__, strFilename);
+-			return false;
++			return NULL;
+ 		}
+ 		parentId = atoi(parentid->Value());
+ 
+@@ -1566,7 +1566,7 @@
+ 			{
+ 				CalError::setLastError(CalError::INVALID_FILE_FORMAT, __FILE__, __LINE__, strFilename);
+ 				delete pCoreBone;
+-				return false;
++				return NULL;
+ 			}
+ 
+ 			TiXmlNode *node= child->FirstChild();
+@@ -1574,14 +1574,14 @@
+ 			{
+ 				CalError::setLastError(CalError::INVALID_FILE_FORMAT, __FILE__, __LINE__, strFilename);
+ 				delete pCoreBone;
+-				return false;
++				return NULL;
+ 			}
+ 			TiXmlText* childid = node->ToText();
+ 			if(!childid)
+ 			{
+ 				CalError::setLastError(CalError::INVALID_FILE_FORMAT, __FILE__, __LINE__, strFilename);
+ 				delete pCoreBone;
+-				return false;
++				return NULL;
+ 			}
+ 
+ 			int childId = atoi(childid->Value());
+@@ -1633,7 +1633,7 @@
+ 	if(!animation)
+ 	{
+ 		CalError::setLastError(CalError::INVALID_FILE_FORMAT, __FILE__, __LINE__, strFilename);
+-		return false;
++		return NULL;
+ 	}
+ 
+ 	if(stricmp(animation->Value(),"HEADER")==0)
+@@ -1641,13 +1641,13 @@
+ 		if(stricmp(animation->Attribute("MAGIC"),Cal::ANIMATION_XMLFILE_MAGIC)!=0)
+ 		{
+ 			CalError::setLastError(CalError::INVALID_FILE_FORMAT, __FILE__, __LINE__, strFilename);
+-			return false;
++			return NULL;
+ 		}
+ 
+ 		if(atoi(animation->Attribute("VERSION")) < Cal::EARLIEST_COMPATIBLE_FILE_VERSION )
+ 		{
+ 			CalError::setLastError(CalError::INCOMPATIBLE_FILE_VERSION, __FILE__, __LINE__, strFilename);
+-			return false;
++			return NULL;
+ 		}
+ 
+ 		animation = animation->NextSiblingElement();
+@@ -1656,19 +1656,19 @@
+ 	if(!animation || stricmp(animation->Value(),"ANIMATION")!=0)
+ 	{
+ 		CalError::setLastError(CalError::INVALID_FILE_FORMAT, __FILE__, __LINE__, strFilename);
+-		return false;
++		return NULL;
+ 	}
+ 
+ 	if(animation->Attribute("MAGIC") !=NULL && stricmp(animation->Attribute("MAGIC"),Cal::ANIMATION_XMLFILE_MAGIC)!=0)
+ 	{
+ 		CalError::setLastError(CalError::INVALID_FILE_FORMAT, __FILE__, __LINE__, strFilename);
+-		return false;
++		return NULL;
+ 	}
+ 
+ 	if(animation->Attribute("VERSION")!=NULL && atoi(animation->Attribute("VERSION")) < Cal::EARLIEST_COMPATIBLE_FILE_VERSION )
+ 	{
+ 		CalError::setLastError(CalError::INCOMPATIBLE_FILE_VERSION, __FILE__, __LINE__, strFilename);
+-		return false;
++		return NULL;
+ 	}
+ 
+ 	int trackCount= atoi(animation->Attribute("NUMTRACKS"));
+@@ -1880,7 +1880,7 @@
+ 	if(!mesh)
+ 	{
+ 		CalError::setLastError(CalError::INVALID_FILE_FORMAT, __FILE__, __LINE__, strFilename);
+-		return false;
++		return NULL;
+ 	}
+ 
+ 	if(stricmp(mesh->Value(),"HEADER")==0)
+@@ -1888,13 +1888,13 @@
+ 		if(stricmp(mesh->Attribute("MAGIC"),Cal::MESH_XMLFILE_MAGIC)!=0)
+ 		{
+ 			CalError::setLastError(CalError::INVALID_FILE_FORMAT, __FILE__, __LINE__, strFilename);
+-			return false;
++			return NULL;
+ 		}
+ 
+ 		if(atoi(mesh->Attribute("VERSION")) < Cal::EARLIEST_COMPATIBLE_FILE_VERSION )
+ 		{
+ 			CalError::setLastError(CalError::INCOMPATIBLE_FILE_VERSION, __FILE__, __LINE__, strFilename);
+-			return false;
++			return NULL;
+ 		}
+ 
+ 		mesh = mesh->NextSiblingElement();
+@@ -1902,19 +1902,19 @@
+ 	if(!mesh || stricmp(mesh->Value(),"MESH")!=0)
+ 	{
+ 		CalError::setLastError(CalError::INVALID_FILE_FORMAT, __FILE__, __LINE__, strFilename);
+-		return false;
++		return NULL;
+ 	}
+ 
+ 	if(mesh->Attribute("MAGIC")!=NULL && stricmp(mesh->Attribute("MAGIC"),Cal::MESH_XMLFILE_MAGIC)!=0)
+ 	{
+ 		CalError::setLastError(CalError::INVALID_FILE_FORMAT, __FILE__, __LINE__, strFilename);
+-		return false;
++		return NULL;
+ 	}
+ 
+ 	if(mesh->Attribute("VERSION")!=NULL && atoi(mesh->Attribute("VERSION")) < Cal::EARLIEST_COMPATIBLE_FILE_VERSION )
+ 	{
+ 		CalError::setLastError(CalError::INCOMPATIBLE_FILE_VERSION, __FILE__, __LINE__, strFilename);
+-		return false;
++		return NULL;
+ 	}
+ 
+ 	// get the number of submeshes
+@@ -1937,7 +1937,7 @@
+ 		if(!submesh || stricmp(submesh->Value(),"SUBMESH")!=0)
+ 		{
+ 			CalError::setLastError(CalError::INVALID_FILE_FORMAT, __FILE__, __LINE__, strFilename);
+-			return false;
++			return NULL;
+ 		}
+ 
+ 		// get the material thread id of the submesh
+@@ -1986,7 +1986,7 @@
+ 			{
+ 				delete pCoreSubmesh;
+ 				CalError::setLastError(CalError::INVALID_FILE_FORMAT, __FILE__, __LINE__, strFilename);
+-				return false;
++				return NULL;
+ 			}      
+ 
+ 			CalCoreSubmesh::Vertex Vertex;
+@@ -1996,7 +1996,7 @@
+ 			{
+ 				delete pCoreSubmesh;
+ 				CalError::setLastError(CalError::INVALID_FILE_FORMAT, __FILE__, __LINE__, strFilename);
+-				return false;
++				return NULL;
+ 			}
+ 
+ 			node = pos->FirstChild();
+@@ -2004,14 +2004,14 @@
+ 			{
+ 				delete pCoreSubmesh;
+ 				CalError::setLastError(CalError::INVALID_FILE_FORMAT, __FILE__, __LINE__, strFilename);
+-				return false;
++				return NULL;
+ 			}      
+ 			TiXmlText* posdata = node->ToText();
+ 			if(!posdata)
+ 			{
+ 				delete pCoreSubmesh;
+ 				CalError::setLastError(CalError::INVALID_FILE_FORMAT, __FILE__, __LINE__, strFilename);
+-				return false;
++				return NULL;
+ 			}
+ 			str.clear();
+ 			str << posdata->Value();
+@@ -2022,7 +2022,7 @@
+ 			{
+ 				delete pCoreSubmesh;
+ 				CalError::setLastError(CalError::INVALID_FILE_FORMAT, __FILE__, __LINE__, strFilename);
+-				return false;
++				return NULL;
+ 			}
+ 
+ 			node = norm->FirstChild();
+@@ -2030,14 +2030,14 @@
+ 			{
+ 				delete pCoreSubmesh;
+ 				CalError::setLastError(CalError::INVALID_FILE_FORMAT, __FILE__, __LINE__, strFilename);
+-				return false;
++				return NULL;
+ 			}
+ 			TiXmlText* normdata = node->ToText();
+ 			if(!normdata)
+ 			{
+ 				delete pCoreSubmesh;
+ 				CalError::setLastError(CalError::INVALID_FILE_FORMAT, __FILE__, __LINE__, strFilename);
+-				return false;
++				return NULL;
+ 			}
+ 			str.clear();
+ 			str << normdata->Value();
+@@ -2051,14 +2051,14 @@
+ 				{
+ 					delete pCoreSubmesh;
+ 					CalError::setLastError(CalError::INVALID_FILE_FORMAT, __FILE__, __LINE__, strFilename);
+-					return false;
++					return NULL;
+ 				}
+ 				TiXmlText* collapseid = node->ToText();
+ 				if(!collapseid)
+ 				{
+ 					delete pCoreSubmesh;
+ 					CalError::setLastError(CalError::INVALID_FILE_FORMAT, __FILE__, __LINE__, strFilename);
+-					return false;
++					return NULL;
+ 				}
+ 				Vertex.collapseId = atoi(collapseid->Value());
+ 
+@@ -2067,7 +2067,7 @@
+ 				{
+ 					delete pCoreSubmesh;
+ 					CalError::setLastError(CalError::INVALID_FILE_FORMAT, __FILE__, __LINE__, strFilename);
+-					return false;
++					return NULL;
+ 				}
+ 
+ 				node = collapseCount->FirstChild();
+@@ -2075,14 +2075,14 @@
+ 				{
+ 					delete pCoreSubmesh;
+ 					CalError::setLastError(CalError::INVALID_FILE_FORMAT, __FILE__, __LINE__, strFilename);
+-					return false;
++					return NULL;
+ 				}
+ 				TiXmlText* collapseCountdata = node->ToText();
+ 				if(!collapseCountdata)
+ 				{
+ 					delete pCoreSubmesh;
+ 					CalError::setLastError(CalError::INVALID_FILE_FORMAT, __FILE__, __LINE__, strFilename);
+-					return false;
++					return NULL;
+ 				}
+ 				Vertex.faceCollapseCount= atoi(collapseCountdata->Value());
+ 				collapse = collapseCount->NextSiblingElement();        
+@@ -2106,7 +2106,7 @@
+ 				{
+ 					delete pCoreSubmesh;
+ 					CalError::setLastError(CalError::INVALID_FILE_FORMAT, __FILE__, __LINE__, strFilename);
+-					return false;
++					return NULL;
+ 				}
+ 
+ 				node = texcoord->FirstChild();
+@@ -2114,14 +2114,14 @@
+ 				{
+ 					delete pCoreSubmesh;
+ 					CalError::setLastError(CalError::INVALID_FILE_FORMAT, __FILE__, __LINE__, strFilename);
+-					return false;
++					return NULL;
+ 				}
+ 				TiXmlText* texcoorddata = node->ToText();
+ 				if(!texcoorddata)
+ 				{
+ 					delete pCoreSubmesh;
+ 					CalError::setLastError(CalError::INVALID_FILE_FORMAT, __FILE__, __LINE__, strFilename);
+-					return false;
++					return NULL;
+ 				}
+ 				str.clear();
+ 				str << texcoorddata->Value();
+@@ -2161,7 +2161,7 @@
+ 				{
+ 					delete pCoreSubmesh;
+ 					CalError::setLastError(CalError::INVALID_FILE_FORMAT, __FILE__, __LINE__, strFilename);
+-					return false;
++					return NULL;
+ 				}
+ 
+ 				node = influence->FirstChild();
+@@ -2169,14 +2169,14 @@
+ 				{
+ 					delete pCoreSubmesh;
+ 					CalError::setLastError(CalError::INVALID_FILE_FORMAT, __FILE__, __LINE__, strFilename);
+-					return false;
++					return NULL;
+ 				}
+ 				TiXmlText* influencedata = node->ToText();
+ 				if(!influencedata)
+ 				{
+ 					delete pCoreSubmesh;
+ 					CalError::setLastError(CalError::INVALID_FILE_FORMAT, __FILE__, __LINE__, strFilename);
+-					return false;
++					return NULL;
+ 				}
+ 
+ 				Vertex.vectorInfluence[influenceId].boneId = atoi(influence->Attribute("ID"));
+@@ -2202,21 +2202,21 @@
+ 				{
+ 					delete pCoreSubmesh;
+ 					CalError::setLastError(CalError::INVALID_FILE_FORMAT, __FILE__, __LINE__, strFilename);
+-					return false;
++					return NULL;
+ 				}
+ 				node = physique->FirstChild();
+ 				if(!node)
+ 				{
+ 					delete pCoreSubmesh;
+ 					CalError::setLastError(CalError::INVALID_FILE_FORMAT, __FILE__, __LINE__, strFilename);
+-					return false;
++					return NULL;
+ 				}
+ 				TiXmlText* physiquedata = node->ToText();
+ 				if(!physiquedata)
+ 				{
+ 					delete pCoreSubmesh;
+ 					CalError::setLastError(CalError::INVALID_FILE_FORMAT, __FILE__, __LINE__, strFilename);
+-					return false;
++					return NULL;
+ 				}
+ 
+ 				physicalProperty.weight = (float) atof(physiquedata->Value());
+@@ -2241,7 +2241,7 @@
+ 			{
+ 				delete pCoreSubmesh;
+ 				CalError::setLastError(CalError::INVALID_FILE_FORMAT, __FILE__, __LINE__, strFilename);
+-				return false;
++				return NULL;
+ 			}
+ 			str.clear();
+ 			str << spring->Attribute("VERTEXID");
+@@ -2266,7 +2266,7 @@
+ 			{
+ 				delete pCoreSubmesh;
+ 				CalError::setLastError(CalError::INVALID_FILE_FORMAT, __FILE__, __LINE__, strFilename);
+-				return false;
++				return NULL;
+ 			}
+ 
+ 			int tmp[3];
+@@ -2336,7 +2336,7 @@
+   if(!material)
+   {
+     CalError::setLastError(CalError::INVALID_FILE_FORMAT, __FILE__, __LINE__, strFilename);
+-        return false;
++        return NULL;
+   }
+ 
+   if(stricmp(material->Value(),"HEADER")==0)
+@@ -2344,13 +2344,13 @@
+     if(stricmp(material->Attribute("MAGIC"),Cal::MATERIAL_XMLFILE_MAGIC)!=0)
+   {
+     CalError::setLastError(CalError::INVALID_FILE_FORMAT, __FILE__, __LINE__, strFilename);
+-          return false;
++          return NULL;
+     }
+ 
+     if(atoi(material->Attribute("VERSION")) < Cal::EARLIEST_COMPATIBLE_FILE_VERSION )
+     {
+     CalError::setLastError(CalError::INCOMPATIBLE_FILE_VERSION, __FILE__, __LINE__, strFilename);
+-          return false;
++          return NULL;
+     }
+ 
+     material = material->NextSiblingElement();
+@@ -2359,19 +2359,19 @@
+   if(!material||stricmp(material->Value(),"MATERIAL")!=0)
+   {
+     CalError::setLastError(CalError::INVALID_FILE_FORMAT, __FILE__, __LINE__, strFilename);
+-      return false;
++      return NULL;
+   }
+ 
+   if(material->Attribute("MAGIC")!=NULL && stricmp(material->Attribute("MAGIC"),Cal::MATERIAL_XMLFILE_MAGIC)!=0)
+   {
+     CalError::setLastError(CalError::INVALID_FILE_FORMAT, __FILE__, __LINE__, strFilename);
+-        return false;
++        return NULL;
+   }
+ 
+   if(material->Attribute("VERSION") != NULL && atoi(material->Attribute("VERSION")) < Cal::EARLIEST_COMPATIBLE_FILE_VERSION )
+   {
+     CalError::setLastError(CalError::INCOMPATIBLE_FILE_VERSION, __FILE__, __LINE__, strFilename);
+-        return false;
++        return NULL;
+   }
+ 
+   CalCoreMaterialPtr pCoreMaterial = new CalCoreMaterial();
+@@ -2385,7 +2385,7 @@
+   if(!ambient ||stricmp(ambient->Value(),"AMBIENT")!=0)
+   {
+     CalError::setLastError(CalError::INVALID_FILE_FORMAT, __FILE__, __LINE__, strFilename);
+-    return false;
++    return NULL;
+   }
+ 
+   CalCoreMaterial::Color ambientColor; 
+@@ -2393,13 +2393,13 @@
+   if(!node)
+   {
+     CalError::setLastError(CalError::INVALID_FILE_FORMAT, __FILE__, __LINE__, strFilename);
+-    return false;
++    return NULL;
+   }
+   TiXmlText* ambientdata = node->ToText();
+   if(!ambientdata)
+   {
+     CalError::setLastError(CalError::INVALID_FILE_FORMAT, __FILE__, __LINE__, strFilename);
+-    return false;
++    return NULL;
+   }
+   str << ambientdata->Value();
+   str >> r >> g >> b >> a;
+@@ -2412,7 +2412,7 @@
+   if(!diffuse || stricmp(diffuse->Value(),"DIFFUSE")!=0)
+   {
+     CalError::setLastError(CalError::INVALID_FILE_FORMAT, __FILE__, __LINE__, strFilename);
+-    return false;
++    return NULL;
+   }
+ 
+   CalCoreMaterial::Color diffuseColor; 
+@@ -2420,13 +2420,13 @@
+   if(!node)
+   {
+     CalError::setLastError(CalError::INVALID_FILE_FORMAT, __FILE__, __LINE__, strFilename);
+-    return false;
++    return NULL;
+   }
+   TiXmlText* diffusedata = node->ToText();
+   if(!diffusedata)
+   {
+     CalError::setLastError(CalError::INVALID_FILE_FORMAT, __FILE__, __LINE__, strFilename);
+-    return false;
++    return NULL;
+   }
+   str.clear();
+   str << diffusedata->Value();
+@@ -2441,7 +2441,7 @@
+   if(!specular||stricmp(specular->Value(),"SPECULAR")!=0)
+   {
+     CalError::setLastError(CalError::INVALID_FILE_FORMAT, __FILE__, __LINE__, strFilename);
+-    return false;
++    return NULL;
+   }
+ 
+   CalCoreMaterial::Color specularColor; 
+@@ -2449,13 +2449,13 @@
+   if(!node)
+   {
+     CalError::setLastError(CalError::INVALID_FILE_FORMAT, __FILE__, __LINE__, strFilename);
+-    return false;
++    return NULL;
+   }
+   TiXmlText* speculardata = node->ToText();
+   if(!speculardata)
+   {
+     CalError::setLastError(CalError::INVALID_FILE_FORMAT, __FILE__, __LINE__, strFilename);
+-    return false;
++    return NULL;
+   }
+   str.clear();
+   str << speculardata->Value();
+@@ -2469,7 +2469,7 @@
+   if(!shininess||stricmp(shininess->Value(),"SHININESS")!=0)
+   {
+     CalError::setLastError(CalError::INVALID_FILE_FORMAT, __FILE__, __LINE__, strFilename);
+-    return false;
++    return NULL;
+   }
+ 
+   float fshininess;
+@@ -2477,13 +2477,13 @@
+   if(!node)
+   {
+     CalError::setLastError(CalError::INVALID_FILE_FORMAT, __FILE__, __LINE__, strFilename);
+-    return false;
++    return NULL;
+   }
+   TiXmlText* shininessdata = node->ToText();
+   if(!shininessdata)
+   {
+     CalError::setLastError(CalError::INVALID_FILE_FORMAT, __FILE__, __LINE__, strFilename);
+-    return false;
++    return NULL;
+   }
+   fshininess = (float)atof(shininessdata->Value());
+ 
+@@ -2502,7 +2502,7 @@
+     if(!map||stricmp(map->Value(),"MAP")!=0)
+     {
+       CalError::setLastError(CalError::INVALID_FILE_FORMAT, __FILE__, __LINE__, strFilename);
+-      return false;
++      return NULL;
+     }
+     
+ 
+@@ -2510,14 +2510,14 @@
+     if(!node)
+     {
+       CalError::setLastError(CalError::INVALID_FILE_FORMAT, __FILE__, __LINE__, strFilename);
+-      return false;
++      return NULL;
+     }
+ 
+     TiXmlText* mapfile = node->ToText();
+     if(!mapfile)
+     {
+       CalError::setLastError(CalError::INVALID_FILE_FORMAT, __FILE__, __LINE__, strFilename);
+-      return false;
++      return NULL;
+     }
+ 
+     MatFileName.push_back(mapfile->Value());


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-libs/cal3d/, media-libs/cal3d/files/
@ 2021-10-16 13:59 David Seifert
  0 siblings, 0 replies; 2+ messages in thread
From: David Seifert @ 2021-10-16 13:59 UTC (permalink / raw
  To: gentoo-commits

commit:     d72ae6aba2dd32706bbe05b22ec18f7b8c96c505
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 16 13:58:41 2021 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Sat Oct 16 13:58:41 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d72ae6ab

media-libs/cal3d: port to EAPI 8

Signed-off-by: David Seifert <soap <AT> gentoo.org>

 media-libs/cal3d/cal3d-0.11.0-r1.ebuild            | 45 ++++++++++------------
 .../cal3d/files/cal3d-0.11.0-docbook2html.patch    | 25 ++++++++++++
 media-libs/cal3d/files/cal3d-0.11.0-gcc43.patch    |  4 +-
 media-libs/cal3d/files/cal3d-0.11.0-gcc6.patch     |  4 +-
 media-libs/cal3d/files/cal3d-0.11.0-tests.patch    |  4 +-
 media-libs/cal3d/files/cal3d-0.11.0-verbose.patch  |  4 +-
 6 files changed, 54 insertions(+), 32 deletions(-)

diff --git a/media-libs/cal3d/cal3d-0.11.0-r1.ebuild b/media-libs/cal3d/cal3d-0.11.0-r1.ebuild
index 4ed4f9c971d..14ba7aa6fe8 100644
--- a/media-libs/cal3d/cal3d-0.11.0-r1.ebuild
+++ b/media-libs/cal3d/cal3d-0.11.0-r1.ebuild
@@ -1,11 +1,12 @@
 # Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=5
-inherit epatch autotools
+EAPI=8
+
+inherit autotools
 
 DESCRIPTION="Cal3D is a skeletal based character animation library"
-HOMEPAGE="http://home.gna.org/cal3d"
+HOMEPAGE="https://mp3butcher.github.io/Cal3D/"
 SRC_URI="http://download.gna.org/cal3d/sources/${P}.tar.gz"
 
 LICENSE="LGPL-2.1"
@@ -13,23 +14,22 @@ SLOT="0"
 KEYWORDS="amd64 ~ia64 ppc x86"
 IUSE="16bit-indices debug doc"
 
-DEPEND="doc? (
+BDEPEND="
+	doc? (
 		app-doc/doxygen
 		app-text/docbook-sgml-utils
 	)"
-RDEPEND=""
+
+PATCHES=(
+	"${FILESDIR}"/${P}-gcc43.patch
+	"${FILESDIR}"/${P}-tests.patch
+	"${FILESDIR}"/${P}-verbose.patch
+	"${FILESDIR}"/${P}-gcc6.patch
+	"${FILESDIR}"/${P}-docbook2html.patch
+)
 
 src_prepare() {
-	epatch \
-		"${FILESDIR}"/${P}-gcc43.patch \
-	    "${FILESDIR}"/${P}-tests.patch \
-	    "${FILESDIR}"/${P}-verbose.patch \
-	    "${FILESDIR}"/${P}-gcc6.patch
-	sed -i \
-		-e "s:db2html:docbook2html:g" \
-		configure.in \
-		docs/Makefile.am \
-		|| die "sed for doc failed"
+	default
 	eautoreconf
 }
 
@@ -41,17 +41,14 @@ src_configure() {
 
 src_compile() {
 	emake
+
 	if use doc; then
-		cd docs
+		cd docs || die
 		emake doc-api
 		emake doc-guide
-		mkdir -p html/{guide,api}
-		mv *.{html,gif} html/guide/
-		mv api/html/* html/api/
+		mkdir -p html/{guide,api} || die
+		mv *.{html,gif} html/guide/ || die
+		mv api/html/* html/api/ || die
+		HTML_DOCS=( docs/html/api docs/html/guide )
 	fi
 }
-
-src_install() {
-	default
-	use doc && dohtml -r docs/html/api docs/html/guide
-}

diff --git a/media-libs/cal3d/files/cal3d-0.11.0-docbook2html.patch b/media-libs/cal3d/files/cal3d-0.11.0-docbook2html.patch
new file mode 100644
index 00000000000..2e3e88e318e
--- /dev/null
+++ b/media-libs/cal3d/files/cal3d-0.11.0-docbook2html.patch
@@ -0,0 +1,25 @@
+--- a/configure.in
++++ b/configure.in
+@@ -50,9 +50,9 @@
+   AC_MSG_WARN([cannot find doxygen, unable to generate Cal3D API Reference!])
+ fi
+ 
+-AC_CHECK_PROG(DB2HTML, db2html, true, false)
++AC_CHECK_PROG(DB2HTML, docbook2html, true, false)
+ if test "$DB2HTML" = false; then
+-  AC_MSG_WARN([cannot find db2html, unable to generate Cal3D User's Guide!])
++  AC_MSG_WARN([cannot find docbook2html, unable to generate Cal3D User's Guide!])
+ fi
+ 
+ AC_PATH_PROG(BLENDER, [blender])
+--- a/docs/Makefile.am
++++ b/docs/Makefile.am
+@@ -18,7 +18,7 @@
+ 	doxygen cal3d.doxygen
+ 
+ doc-guide:
+-	db2html guide.sgml
++	docbook2html guide.sgml
+ 
+ clean-local:
+ 	rm -rf guide guide.junk

diff --git a/media-libs/cal3d/files/cal3d-0.11.0-gcc43.patch b/media-libs/cal3d/files/cal3d-0.11.0-gcc43.patch
index 80d73b27474..6f5bad7293e 100644
--- a/media-libs/cal3d/files/cal3d-0.11.0-gcc43.patch
+++ b/media-libs/cal3d/files/cal3d-0.11.0-gcc43.patch
@@ -1,5 +1,5 @@
---- src/cal3d/platform.h.old	2008-04-27 23:08:41.000000000 +0200
-+++ src/cal3d/platform.h	2008-04-27 23:08:56.000000000 +0200
+--- a/src/cal3d/platform.h
++++ b/src/cal3d/platform.h
 @@ -77,6 +77,7 @@
  // standard includes
  #include <stdlib.h>

diff --git a/media-libs/cal3d/files/cal3d-0.11.0-gcc6.patch b/media-libs/cal3d/files/cal3d-0.11.0-gcc6.patch
index 98fc546eace..f17d063e935 100644
--- a/media-libs/cal3d/files/cal3d-0.11.0-gcc6.patch
+++ b/media-libs/cal3d/files/cal3d-0.11.0-gcc6.patch
@@ -1,5 +1,5 @@
---- cal3d-0.11.0/src/cal3d/loader.cpp.old	2016-09-24 00:58:09.968689367 -0400
-+++ cal3d-0.11.0/src/cal3d/loader.cpp	2016-09-24 01:06:54.867068386 -0400
+--- a/src/cal3d/loader.cpp
++++ b/src/cal3d/loader.cpp
 @@ -886,7 +886,7 @@
    if(!dataSrc.ok())
    {

diff --git a/media-libs/cal3d/files/cal3d-0.11.0-tests.patch b/media-libs/cal3d/files/cal3d-0.11.0-tests.patch
index 3a6754f4015..d676d86f2d9 100644
--- a/media-libs/cal3d/files/cal3d-0.11.0-tests.patch
+++ b/media-libs/cal3d/files/cal3d-0.11.0-tests.patch
@@ -1,5 +1,5 @@
---- tests/Makefile.am.old	2014-10-27 12:14:44.534607920 +0100
-+++ tests/Makefile.am	2014-10-27 12:16:00.825891248 +0100
+--- a/tests/Makefile.am
++++ b/tests/Makefile.am
 @@ -14,7 +14,7 @@
  EXTRA_DIST = \
  	$(wildcard cal3d_converter/base.??f)

diff --git a/media-libs/cal3d/files/cal3d-0.11.0-verbose.patch b/media-libs/cal3d/files/cal3d-0.11.0-verbose.patch
index a6dfbd677bf..c50918cd899 100644
--- a/media-libs/cal3d/files/cal3d-0.11.0-verbose.patch
+++ b/media-libs/cal3d/files/cal3d-0.11.0-verbose.patch
@@ -1,5 +1,5 @@
---- tests/run.in.old	2012-06-29 13:27:55.413765822 +0200
-+++ tests/run.in	2012-06-29 13:29:02.092084095 +0200
+--- a/tests/run.in
++++ b/tests/run.in
 @@ -43,7 +43,7 @@
                  exit 1
                  ;;


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-10-16 13:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-16 13:59 [gentoo-commits] repo/gentoo:master commit in: media-libs/cal3d/, media-libs/cal3d/files/ David Seifert
  -- strict thread matches above, loose matches on Subject: below --
2017-09-20 21:35 Andreas Hüttel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox