ports/devel/collada-dom/files/patch-dom_src_dae_daeUtils.cpp
Kurt Jaeger 239a6c9ead New port: devel/collada-dom
A C++ library that provides an API to the COLLADA Document Object Model

The COLLADA Document Object Model (DOM) is an application programming
interface (API) that provides a C++ object representation of a COLLADA
XML instance document.

This project is a library for loading and saving COLLADA documents
that can contain 2D, 3D, physics and other types of content. It allows
developers to create applications that can exchange COLLADA documents
with commercial content creation tools such as Maya, Max or Softimage.

This project is a very lightweight version of the Sourceforce Collada
Repository. It maintains only the base collada parser with minimal
dependencies.

WWW: https://github.com/rdiankov/collada-dom

PR:		240635
Submitted by:	Trenton Schulz <trueos@norwegianrockcat.com>
2019-09-22 08:30:26 +00:00

20 lines
927 B
C++

--- dom/src/dae/daeUtils.cpp.orig 2019-05-09 19:37:18 UTC
+++ dom/src/dae/daeUtils.cpp
@@ -152,7 +152,7 @@ char cdom::getFileSeparator() {
const string& cdom::getSystemTmpDir() {
#ifdef WIN32
static string tmpDir = string(getenv("TMP")) + getFileSeparator();
-#elif defined(__linux__) || defined(__linux)
+#elif defined(__linux__) || defined(__linux) || defined(__FreeBSD__)
static string tmpDir = "/tmp/";
#elif defined __APPLE_CC__
static string tmpDir = string(getenv("TMPDIR"));
@@ -171,7 +171,7 @@ string cdom::getRandomFileName() {
std::string tmp(tmpnam(&tmpbuffer[0]));
#ifdef WIN32
randomSegment = tmp.substr(tmp.find_last_of('\\')+1);
-#elif defined(__linux__) || defined(__linux)
+#elif defined(__linux__) || defined(__linux) || defined(__FreeBSD__)
randomSegment = tmp.substr(tmp.find_last_of('/')+1);
#elif defined __APPLE_CC__
randomSegment = tmp.substr(tmp.find_last_of('/')+1);