diff --git a/media-libs/opencollada/opencollada-1.6.61.recipe b/media-libs/opencollada/opencollada-1.6.61.recipe new file mode 100644 index 000000000..b634c404f --- /dev/null +++ b/media-libs/opencollada/opencollada-1.6.61.recipe @@ -0,0 +1,118 @@ +SUMMARY="A stream based reader and writer library for COLLADA files" +DESCRIPTION="COLLADA defines an open standard XML schema for exchanging \ +digital assets among various graphics software applications that might \ +otherwise store their assets in incompatible file formats. COLLADA documents \ +that describe digital assets are XML files, usually identified with a .dae \ +(digital asset exchange) filename extension." +HOMEPAGE="http://www.opencollada.org/" +COPYRIGHT="2013 The Khronos Group Inc." +LICENSE="MIT" +REVISION="1" +SOURCE_URI="https://github.com/KhronosGroup/OpenCOLLADA/archive/v$portVersion.tar.gz" +CHECKSUM_SHA256='c0b19d315bf7eaed5f29636ddd962ee7d3c2f7067039dba124bf9f0c94aa9e1e' +PATCHES="opencollada-$portVersion.patchset" +SOURCE_DIR="OpenCOLLADA-$portVersion" + +ARCHITECTURES="!x86_gcc2 x86 x86_64" +SECONDARY_ARCHITECTURES="x86" + +PROVIDES=" + opencollada$secondaryArchSuffix = $portVersion + lib:libbuffer$secondaryArchSuffix = $portVersion + lib:libftoa$secondaryArchSuffix = $portVersion + lib:libGeneratedSaxParser$secondaryArchSuffix = $portVersion + lib:libMathMLSolver$secondaryArchSuffix = $portVersion + lib:libOpenCOLLADABaseUtils$secondaryArchSuffix = $portVersion + lib:libOpenCOLLADAFramework$secondaryArchSuffix = $portVersion + lib:libOpenCOLLADASaxFrameworkLoader$secondaryArchSuffix = $portVersion + lib:libOpenCOLLADAStreamWriter$secondaryArchSuffix = $portVersion + lib:libUTF$secondaryArchSuffix = $portVersion + lib:libzlib$secondaryArchSuffix = $portVersion + " +REQUIRES=" + haiku$secondaryArchSuffix + lib:libpcre$secondaryArchSuffix + lib:libpcreposix$secondaryArchSuffix + lib:libxml2$secondaryArchSuffix + " + +PROVIDES_devel=" + opencollada${secondaryArchSuffix}_devel = $portVersion + devel:libbuffer$secondaryArchSuffix = $portVersion + devel:libftoa$secondaryArchSuffix = $portVersion + devel:libGeneratedSaxParser$secondaryArchSuffix = $portVersion + devel:libMathMLSolver$secondaryArchSuffix = $portVersion + devel:libOpenCOLLADABaseUtils$secondaryArchSuffix = $portVersion + devel:libOpenCOLLADAFramework$secondaryArchSuffix = $portVersion + devel:libOpenCOLLADASaxFrameworkLoader$secondaryArchSuffix = $portVersion + devel:libOpenCOLLADAStreamWriter$secondaryArchSuffix = $portVersion + devel:libUTF$secondaryArchSuffix = $portVersion + devel:libzlib$secondaryArchSuffix = $portVersion + " +REQUIRES_devel=" + opencollada$secondaryArchSuffix == $portVersion base + " + +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel + devel:libpcre$secondaryArchSuffix + devel:libpcreposix$secondaryArchSuffix + devel:libxml2$secondaryArchSuffix + " +BUILD_PREREQUIRES=" + cmd:cmake + cmd:gcc$secondaryArchSuffix + cmd:make + " + +defineDebugInfoPackage opencollada$secondaryArchSuffix \ + $libDir/libbuffer.so \ + $libDir/libftoa.so \ + $libDir/libGeneratedSaxParser.so \ + $libDir/libMathMLSolver.so \ + $libDir/libOpenCOLLADABaseUtils.so \ + $libDir/libOpenCOLLADAFramework.so \ + $libDir/libOpenCOLLADASaxFrameworkLoader.so \ + $libDir/libOpenCOLLADAStreamWriter.so \ + $libDir/libUTF.so \ + $libDir/libzlib.so + +PATCH() +{ + sed -i 's,${CMAKE_INSTALL_PREFIX}/include',$includeDir, CMakeLists.txt + sed -i 's,${CMAKE_INSTALL_PREFIX}/lib/opencollada',$libDir, CMakeLists.txt +} + +BUILD() +{ + mkdir -p build + cd build + cmake .. \ + -DCMAKE_CXX_FLAGS="-D_BSD_SOURCE" \ + -DUSE_SHARED=ON \ + $cmakeDirArgs + + make $jobArgs +} + +INSTALL() +{ + cd build + make install $jobArgs + + prepareInstalledDevelLibs \ + libbuffer \ + libftoa \ + libGeneratedSaxParser \ + libMathMLSolver \ + libOpenCOLLADABaseUtils \ + libOpenCOLLADAFramework \ + libOpenCOLLADASaxFrameworkLoader \ + libOpenCOLLADAStreamWriter \ + libUTF \ + libzlib + + packageEntries devel \ + $developDir \ + $libDir/cmake +} diff --git a/media-libs/opencollada/patches/opencollada-1.6.61.patchset b/media-libs/opencollada/patches/opencollada-1.6.61.patchset new file mode 100644 index 000000000..2a0415d05 --- /dev/null +++ b/media-libs/opencollada/patches/opencollada-1.6.61.patchset @@ -0,0 +1,106 @@ +From 98321937c536739df43dd7d04ca8a3f71bd4acd3 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= +Date: Fri, 8 Dec 2017 18:14:31 +0100 +Subject: [PATCH] Build fix + +--- + COLLADABaseUtils/include/COLLADABUPlatform.h | 2 +- + DAEValidator/library/src/PathUtil.cpp | 10 +++++++++- + common/libBuffer/include/CommonFWriteBufferFlusher.h | 2 +- + common/libBuffer/src/CommonFWriteBufferFlusher.cpp | 6 +++--- + 4 files changed, 14 insertions(+), 6 deletions(-) + mode change 100755 => 100644 COLLADABaseUtils/include/COLLADABUPlatform.h + mode change 100755 => 100644 DAEValidator/library/src/PathUtil.cpp + mode change 100755 => 100644 common/libBuffer/include/CommonFWriteBufferFlusher.h + mode change 100755 => 100644 common/libBuffer/src/CommonFWriteBufferFlusher.cpp + +diff --git a/COLLADABaseUtils/include/COLLADABUPlatform.h b/COLLADABaseUtils/include/COLLADABUPlatform.h +old mode 100755 +new mode 100644 +index 097845b..0b7b46f +--- a/COLLADABaseUtils/include/COLLADABUPlatform.h ++++ b/COLLADABaseUtils/include/COLLADABUPlatform.h +@@ -23,7 +23,7 @@ + # define COLLADABU_OS_WIN64 + #elif (defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__)) + # define COLLADABU_OS_WIN32 +-#elif defined(__linux__) || defined(__linux) || defined(__FreeBSD__) ++#elif defined(__linux__) || defined(__linux) || defined(__FreeBSD__) || defined(__HAIKU__) + # define COLLADABU_OS_LINUX + #endif + +diff --git a/DAEValidator/library/src/PathUtil.cpp b/DAEValidator/library/src/PathUtil.cpp +old mode 100755 +new mode 100644 +index fd2afae..529355c +--- a/DAEValidator/library/src/PathUtil.cpp ++++ b/DAEValidator/library/src/PathUtil.cpp +@@ -125,8 +125,16 @@ namespace opencollada + if ((dir = opendir(dirs.front().c_str())) != nullptr) { + while ((ent = readdir(dir)) != nullptr) { + string d_name = ent->d_name; ++ #ifdef __HAIKU__ ++ struct stat sp; ++ stat(ent->d_name, &sp); ++ #endif + if (recursive && +- (ent->d_type & DT_DIR) && ++ #ifndef __HAIKU__ ++ (ent->d_type & DT_DIR) && ++ #else ++ (S_ISDIR(sp.st_mode)) && ++ #endif + d_name != "." && + d_name != "..") + { +diff --git a/common/libBuffer/include/CommonFWriteBufferFlusher.h b/common/libBuffer/include/CommonFWriteBufferFlusher.h +old mode 100755 +new mode 100644 +index c7af45b..42ff162 +--- a/common/libBuffer/include/CommonFWriteBufferFlusher.h ++++ b/common/libBuffer/include/CommonFWriteBufferFlusher.h +@@ -35,7 +35,7 @@ namespace std { + #ifdef __GNUC__ + # include /* size_t */ + # include /* FILE */ +-#ifdef __FreeBSD__ ++#if defined(__FreeBSD__) || defined(__HAIKU__) + #include /* int64_t */ + #endif + #endif +diff --git a/common/libBuffer/src/CommonFWriteBufferFlusher.cpp b/common/libBuffer/src/CommonFWriteBufferFlusher.cpp +old mode 100755 +new mode 100644 +index 97480a1..2c1d2cb +--- a/common/libBuffer/src/CommonFWriteBufferFlusher.cpp ++++ b/common/libBuffer/src/CommonFWriteBufferFlusher.cpp +@@ -90,7 +90,7 @@ namespace Common + FilePosType currentPos = ftello64(mStream); + #elif defined( _WIN32) + FilePosType currentPos = _ftelli64(mStream); +-#elif defined (__APPLE__) || defined(__FreeBSD__) ++#elif defined (__APPLE__) || defined(__FreeBSD__) || defined(__HAIKU__) + FilePosType currentPos = ftello(mStream); + #else + FilePosType currentPos = ftello64(mStream); +@@ -115,7 +115,7 @@ namespace Common + return (fseeko64(mStream,0,SEEK_END) == 0); + #elif defined( _WIN32) + return (_fseeki64(mStream, 0, SEEK_END) == 0); +-#elif defined (__APPLE__) || defined(__FreeBSD__) ++#elif defined (__APPLE__) || defined(__FreeBSD__) || defined(__HAIKU__) + return (fseeko(mStream, 0, SEEK_END) == 0); + #else + return (fseeko64(mStream, 0, SEEK_END) == 0); +@@ -135,7 +135,7 @@ namespace Common + bool success = (fseeko64(mStream,pos,SEEK_SET) == 0); + #elif defined( _WIN32) + bool success = (_fseeki64(mStream, pos, SEEK_SET) == 0); +-#elif defined (__APPLE__) || defined(__FreeBSD__) ++#elif defined (__APPLE__) || defined(__FreeBSD__) || defined(__HAIKU__) + bool success = (fseeko(mStream, pos, SEEK_SET) == 0); + #else + bool success = (fseeko64(mStream, pos, SEEK_SET) == 0); +-- +2.15.0 +