assimp: Update to 3.3.1
This commit is contained in:
@@ -3,23 +3,22 @@
|
||||
_realname=assimp
|
||||
pkgbase=mingw-w64-${_realname}
|
||||
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
|
||||
pkgver=3.1.1
|
||||
pkgrel=2
|
||||
pkgver=3.3.1
|
||||
pkgrel=1
|
||||
pkgdesc="Portable Open Source library to import various well-known 3D model formats in an uniform manner (mingw-w64)"
|
||||
arch=('any')
|
||||
license=('BSD')
|
||||
depends=("${MINGW_PACKAGE_PREFIX}-boost"
|
||||
"${MINGW_PACKAGE_PREFIX}-zziplib"
|
||||
depends=("${MINGW_PACKAGE_PREFIX}-zziplib"
|
||||
"${MINGW_PACKAGE_PREFIX}-zlib")
|
||||
makedepends=("${MINGW_PACKAGE_PREFIX}-cmake"
|
||||
"${MINGW_PACKAGE_PREFIX}-gcc"
|
||||
"${MINGW_PACKAGE_PREFIX}-pkg-config")
|
||||
url=('http://assimp.sourceforge.net/')
|
||||
url="http://assimp.sourceforge.net/"
|
||||
source=(${_realname}-${pkgver}.tar.gz::https://github.com/assimp/assimp/archive/v${pkgver}.tar.gz
|
||||
build-fixes.patch)
|
||||
options=('!strip' 'staticlibs')
|
||||
sha256sums=('fd0c065476e9ed1fc3adc811a626c781f1e09f40ccf0fd8274808ca4568015a5'
|
||||
'8bfaf0500094cd9e1978101cb9448fb0f9b800bb9b03558ea97c6a1b502c7415')
|
||||
sha256sums=('d385c3f90876241343f09e45f4e5033a6a05861b971c63d1f6d512371ffdc7bf'
|
||||
'f4ab7687338a5bb5b711fd00fc170b1a86e778fec6dac1402762059ab3428e65')
|
||||
|
||||
prepare() {
|
||||
cd ${_realname}-${pkgver}
|
||||
@@ -36,7 +35,6 @@ build() {
|
||||
-DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \
|
||||
-DCMAKE_BUILD_TYPE=RELEASE \
|
||||
-DASSIMP_BUILD_ASSIMP_TOOLS=YES \
|
||||
-DASSIMP_ENABLE_BOOST_WORKAROUND=OFF \
|
||||
-DASSIMP_BUILD_STATIC_LIB=OFF \
|
||||
-DASSIMP_BUILD_TESTS=OFF \
|
||||
-DDirectX_DXERR_LIBRARY=${MINGW_PREFIX}/${MINGW_CHOST}/lib/libdxerr9.a \
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
--- assimp/tools/assimp_cmd/assimp_cmd.rc.orig 2014-06-12 21:50:48.160000000 +0400
|
||||
+++ assimp/tools/assimp_cmd/assimp_cmd.rc 2014-06-12 21:54:56.986400000 +0400
|
||||
diff -Naur assimp-3.3.1-orig/tools/assimp_view/assimp_view.h assimp-3.3.1/tools/assimp_view/assimp_view.h
|
||||
--- assimp-3.3.1-orig/tools/assimp_cmd/assimp_cmd.rc.orig 2014-06-12 21:50:48.160000000 +0400
|
||||
+++ assimp-3.3.1/tools/assimp_cmd/assimp_cmd.rc 2014-06-12 21:54:56.986400000 +0400
|
||||
@@ -1,7 +1,7 @@
|
||||
// Microsoft Visual C++ generated resource script.
|
||||
//
|
||||
@@ -9,18 +10,70 @@
|
||||
|
||||
#define APSTUDIO_READONLY_SYMBOLS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
--- assimp/test/unit/Main.cpp.orig 2014-06-12 22:00:03.635600000 +0400
|
||||
+++ assimp/test/unit/Main.cpp 2014-06-12 22:00:14.150000000 +0400
|
||||
@@ -25,10 +25,9 @@
|
||||
aiDefaultLogStream_DEBUGGER | aiDefaultLogStream_FILE);
|
||||
diff -Naur assimp-3.3.1-orig/tools/assimp_view/assimp_view.h assimp-3.3.1/tools/assimp_view/assimp_view.h
|
||||
--- assimp-3.3.1-orig/tools/assimp_view/assimp_view.h 2016-10-21 10:48:42.584965100 +0300
|
||||
+++ assimp-3.3.1/tools/assimp_view/assimp_view.h 2016-10-21 10:49:26.377751400 +0300
|
||||
@@ -71,6 +71,7 @@
|
||||
#include "../../code/MaterialSystem.h" // aiMaterial class
|
||||
#include "../../code/StringComparison.h" // ASSIMP_stricmp and ASSIMP_strincmp
|
||||
|
||||
// .. and C. They should smoothly work together
|
||||
+ aiLogStream logS = aiGetPredefinedLogStream(aiDefaultLogStream_FILE, "AssimpLog_C.txt");
|
||||
aiEnableVerboseLogging(AI_TRUE);
|
||||
- aiAttachLogStream(&aiGetPredefinedLogStream(
|
||||
- aiDefaultLogStream_FILE,
|
||||
- "AssimpLog_C.txt"));
|
||||
+ aiAttachLogStream(&logS);
|
||||
+#if !defined(__MINGW32__)
|
||||
// in order for std::min and std::max to behave properly
|
||||
#ifndef max
|
||||
#define max(a,b) (((a) > (b)) ? (a) : (b))
|
||||
@@ -78,6 +79,7 @@
|
||||
#ifndef min
|
||||
#define min(a,b) (((a) < (b)) ? (a) : (b))
|
||||
#endif // min
|
||||
+#endif
|
||||
|
||||
#include <time.h>
|
||||
|
||||
@@ -183,7 +185,7 @@
|
||||
{
|
||||
// for unsigned types only ...
|
||||
intype mask = (0x1u << (sizeof(type)*8))-1;
|
||||
- return (type)max((intype)0,min(in,mask));
|
||||
+ return (type)std::max((intype)0,std::min(in,mask));
|
||||
}
|
||||
|
||||
|
||||
// ............................................................................
|
||||
diff -Naur assimp-3.3.1-orig/tools/assimp_view/Display.cpp assimp-3.3.1/tools/assimp_view/Display.cpp
|
||||
--- assimp-3.3.1-orig/tools/assimp_view/Display.cpp 2016-10-21 10:48:46.191201000 +0300
|
||||
+++ assimp-3.3.1/tools/assimp_view/Display.cpp 2016-10-21 10:49:17.437250000 +0300
|
||||
@@ -2249,7 +2249,7 @@
|
||||
const float ny = (float)sRect.bottom;
|
||||
const float x = (float)sDesc.Width;
|
||||
const float y = (float)sDesc.Height;
|
||||
- float f = min((nx-30) / x,(ny-30) / y) * (m_fTextureZoom/1000.0f);
|
||||
+ float f = std::min((nx-30) / x,(ny-30) / y) * (m_fTextureZoom/1000.0f);
|
||||
|
||||
float fHalfX = (nx - (f * x)) / 2.0f;
|
||||
float fHalfY = (ny - (f * y)) / 2.0f;
|
||||
diff -Naur assimp-3.3.1-orig/tools/assimp_view/Material.cpp assimp-3.3.1/tools/assimp_view/Material.cpp
|
||||
--- assimp-3.3.1-orig/tools/assimp_view/Material.cpp 2016-07-08 20:29:51.000000000 +0300
|
||||
+++ assimp-3.3.1/tools/assimp_view/Material.cpp 2016-10-21 10:49:47.462604500 +0300
|
||||
@@ -275,7 +275,7 @@
|
||||
for (unsigned int i = 0; i < iSizeFound;++i)
|
||||
info.cFileName[i] = (CHAR)tolower(info.cFileName[i]);
|
||||
|
||||
- if (0 == memcmp(info.cFileName,szFile2, min(iSizeFound,iSize)))
|
||||
+ if (0 == memcmp(info.cFileName,szFile2, std::min(iSizeFound,iSize)))
|
||||
{
|
||||
// we have it. Build the full path ...
|
||||
char* sz = strrchr(szTempB,'*');
|
||||
diff -Naur assimp-3.3.1-orig/tools/assimp_view/MessageProc.cpp assimp-3.3.1/tools/assimp_view/MessageProc.cpp
|
||||
--- assimp-3.3.1-orig/tools/assimp_view/MessageProc.cpp 2016-07-08 20:29:51.000000000 +0300
|
||||
+++ assimp-3.3.1/tools/assimp_view/MessageProc.cpp 2016-10-21 10:50:42.072467800 +0300
|
||||
@@ -1056,9 +1056,9 @@
|
||||
ai_assert(strlen(szFileName) <= MAX_PATH);
|
||||
|
||||
// invent a nice default file name
|
||||
- char* sz = max(strrchr(szFileName,'\\'),strrchr(szFileName,'/'));
|
||||
+ char* sz = std::max(strrchr(szFileName,'\\'),strrchr(szFileName,'/'));
|
||||
if (sz) {
|
||||
- strncpy(sz,max(strrchr(g_szFileName,'\\'),strrchr(g_szFileName,'/')),MAX_PATH);
|
||||
+ strncpy(sz,std::max(strrchr(g_szFileName,'\\'),strrchr(g_szFileName,'/')),MAX_PATH);
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user