[63833] trunk/dports/science
nox at macports.org
nox at macports.org
Tue Feb 16 14:44:08 PST 2010
Revision: 63833
http://trac.macports.org/changeset/63833
Author: nox at macports.org
Date: 2010-02-16 14:44:05 -0800 (Tue, 16 Feb 2010)
Log Message:
-----------
Create new port collada-dom
The COLLADA Document Object Model (DOM) is an application programming
interface (API) that provides a C++ object representation of a COLLADA
XML instance document.
Added Paths:
-----------
trunk/dports/science/collada-dom/
trunk/dports/science/collada-dom/Portfile
trunk/dports/science/collada-dom/files/
trunk/dports/science/collada-dom/files/patch-src-dae-daeUtils.cpp.diff
trunk/dports/science/collada-dom/files/patch-test-1.4-domTest.cpp.diff
trunk/dports/science/collada-dom/files/patch-test-1.5-domTest.cpp.diff
Added: trunk/dports/science/collada-dom/Portfile
===================================================================
--- trunk/dports/science/collada-dom/Portfile (rev 0)
+++ trunk/dports/science/collada-dom/Portfile 2010-02-16 22:44:05 UTC (rev 63833)
@@ -0,0 +1,98 @@
+# $Id$
+
+PortSystem 1.0
+PortGroup archcheck 1.0
+
+name collada-dom
+version 2.2
+set branch [join [lrange [split ${version} .] 0 1] .]
+categories science devel
+maintainers nox openmaintainer
+platforms darwin
+description COLLADA Document Object Model (DOM)
+
+long_description \
+ The COLLADA Document Object Model (DOM) is an application programming \
+ interface (API) that provides a C++ object representation of a COLLADA XML \
+ instance document.
+
+homepage http://collada.org/mediawiki/index.php/Portal:COLLADA_DOM
+master_sites sourceforge
+use_zip yes
+
+checksums md5 bbb76ef2a8037c945c5cdf26829dcb7d \
+ sha1 e6b72ca4c0327fbc342ab87a1d9d76530a980b5d \
+ rmd160 b2d4387dfe97d97b30b702f39e4ee312dba6d13a
+
+worksrcdir ${name}/dom
+
+patchfiles \
+ patch-src-dae-daeUtils.cpp.diff \
+ patch-test-1.4-domTest.cpp.diff \
+ patch-test-1.5-domTest.cpp.diff
+
+post-patch {
+ reinplace {s/filter-out x86 ppc/& x86_64/} ${worksrcpath}/Makefile
+ reinplace {s/\$(subst x86,i386,\$(archs))/$(subst i386_64,x86_64,&)/} \
+ ${worksrcpath}/make/common.mk
+ reinplace s:/usr/include:${prefix}/include: ${worksrcpath}/make/dom.mk
+ reinplace "s:-lxml2:-L${prefix}/lib &:" ${worksrcpath}/make/dom.mk
+ reinplace -E s:-Iexternal-libs/(pcre|boost):-I${prefix}/include: \
+ ${worksrcpath}/make/dom.mk \
+ ${worksrcpath}/make/domTest.mk
+ reinplace s:external-libs/pcre/lib/\\\$(buildID)/:${prefix}/lib/: \
+ ${worksrcpath}/make/dom.mk
+ reinplace {/libpcre/s/\.a/\.dylib/g} ${worksrcpath}/make/dom.mk
+ reinplace -E \
+ s:external-libs/boost/lib/\\\$\\(buildID\\)/(libboost_\[a-z\]*)\.a:${prefix}/lib/\\1.dylib: \
+ ${worksrcpath}/make/dom.mk ${worksrcpath}/make/domTest.mk
+ reinplace {s/# minizip/dependentLibs += $(outPath)libminizip.a/} \
+ ${worksrcpath}/make/dom.mk
+}
+
+depends_lib \
+ port:boost \
+ port:libxml2 \
+ port:pcre
+
+archcheck.files \
+ lib/libboost_system.dylib \
+ lib/libpcre.dylib \
+ lib/libxml2.dylib
+
+use_configure no
+
+build.args \
+ colladaVersion=all \
+ parsers=libxml
+
+pre-build {
+ if {[variant_isset universal]} {
+ build.args-append \
+ arch="${configure.universal_archs}"
+ } else {
+ build.args-append \
+ arch=${build_arch}
+ }
+}
+
+test.run yes
+test.args ${build.args}
+
+destroot {
+ foreach v {1.4 1.5} {
+ set fw Collada[join [split ${v} .] ""]Dom
+ set path ${prefix}/Library/Frameworks/${fw}.framework
+ copy ${worksrcpath}/build/mac-${v}/${fw}.framework \
+ ${destroot}${path}
+ set dylib [lindex [glob -tails -types d -directory ${destroot}${path} Versions/*] 0]/${fw}
+ system "install_name_tool -id ${path}/${dylib} ${destroot}${path}/${dylib}"
+ }
+
+ set docdir ${prefix}/share/doc/${name}
+ xinstall -d ${destroot}${docdir}
+ xinstall -m 644 -W ${worksrcpath} license.txt license/minizip-license.txt \
+ readme.txt ${destroot}${docdir}
+}
+
+variant universal {}
Property changes on: trunk/dports/science/collada-dom/Portfile
___________________________________________________________________
Added: svn:keywords
+ Id
Added: svn:eol-style
+ native
Added: trunk/dports/science/collada-dom/files/patch-src-dae-daeUtils.cpp.diff
===================================================================
--- trunk/dports/science/collada-dom/files/patch-src-dae-daeUtils.cpp.diff (rev 0)
+++ trunk/dports/science/collada-dom/files/patch-src-dae-daeUtils.cpp.diff 2010-02-16 22:44:05 UTC (rev 63833)
@@ -0,0 +1,26 @@
+--- src/dae/daeUtils.cpp.orig 2010-02-03 05:00:28.000000000 +0100
++++ src/dae/daeUtils.cpp 2010-02-03 05:02:40.000000000 +0100
+@@ -11,6 +11,9 @@
+ #include <dae/daeUtils.h>
+ #include <dae/daeURI.h>
+
++#include <unistd.h>
++#include <sys/syslimits.h>
++
+ #ifdef _WIN32
+ #include <direct.h> // for getcwd (windows)
+ #else
+@@ -149,7 +152,12 @@
+ #elif defined(__linux__) || defined(__linux)
+ static string tmpDir = "/tmp/";
+ #elif defined __APPLE_CC__
+-static string tmpDir = string(getenv("TMPDIR"));
++ static string tmpDir = "";
++ if (tmpDir == "") {
++ char tmp[PATH_MAX];
++ confstr(_CS_DARWIN_USER_TEMP_DIR, tmp, sizeof(tmp));
++ tmpDir = tmp;
++ }
+ #elif defined __CELLOS_LV2__
+ #error tmp dir for your system unknown
+ #else
Added: trunk/dports/science/collada-dom/files/patch-test-1.4-domTest.cpp.diff
===================================================================
--- trunk/dports/science/collada-dom/files/patch-test-1.4-domTest.cpp.diff (rev 0)
+++ trunk/dports/science/collada-dom/files/patch-test-1.4-domTest.cpp.diff 2010-02-16 22:44:05 UTC (rev 63833)
@@ -0,0 +1,61 @@
+--- test/1.4/domTest.cpp.orig 2010-02-16 18:34:11.000000000 +0100
++++ test/1.4/domTest.cpp 2010-02-16 18:35:22.000000000 +0100
+@@ -1,9 +1,9 @@
+-/*
+-* Copyright 2006 Sony Computer Entertainment Inc.
+-*
+-* Licensed under the MIT Open Source License, for details please see license.txt or the website
+-* http://www.opensource.org/licenses/mit-license.php
+-*
++/*
++* Copyright 2006 Sony Computer Entertainment Inc.
++*
++* Licensed under the MIT Open Source License, for details please see license.txt or the website
++* http://www.opensource.org/licenses/mit-license.php
++*
+ */
+ #include <cstdarg>
+ #include <iostream>
+@@ -123,15 +123,15 @@
+ CheckResult(replace("abc123", "bc12", "b") == "ab3");
+ CheckResult(replace("abracadabra", "a", "") == "brcdbr");
+
+- CheckResult(tokenize("1|2|3|4", "|") == makeStringList("1", "2", "3", "4", 0));
+- CheckResult(tokenize("|1|", "|") == makeStringList("1", 0));
+- CheckResult(tokenize("1|||2||3|", "|") == makeStringList("1", "2", "3", 0));
++ CheckResult(tokenize("1|2|3|4", "|") == makeStringList("1", "2", "3", "4", NULL));
++ CheckResult(tokenize("|1|", "|") == makeStringList("1", NULL));
++ CheckResult(tokenize("1|||2||3|", "|") == makeStringList("1", "2", "3", NULL));
+ CheckResult(tokenize("1|||2||3|", "|", true) ==
+- makeStringList("1", "|", "|", "|", "2", "|", "|", "3", "|", 0));
++ makeStringList("1", "|", "|", "|", "2", "|", "|", "3", "|", NULL));
+ CheckResult(tokenize("this/is some#text", "/#", true) ==
+- makeStringList("this", "/", "is some", "#", "text", 0));
++ makeStringList("this", "/", "is some", "#", "text", NULL));
+ CheckResult(tokenize("this/is some#text", "/# ", false) ==
+- makeStringList("this", "is", "some", "text", 0));
++ makeStringList("this", "is", "some", "text", NULL));
+
+ CheckResult(toString(5) == "5");
+ CheckResult(toFloat(toString(4.0f)) == 4.0f);
+@@ -822,17 +822,17 @@
+ daeElement* node = dae.getDatabase()->idLookup("Box").at(0);
+
+ CheckResult(getChildNames(node) == makeStringArray(
+- "rotate", "rotate", "rotate", "instance_geometry", 0));
++ "rotate", "rotate", "rotate", "instance_geometry", NULL));
+
+ // Place a new <translate> after the first <rotate> using placeElementAfter, and
+ // make sure the <translate> shows up in the right spot.
+ node->placeElementAfter(node->getChildren()[0], node->createElement("translate"));
+ CheckResult(getChildNames(node) == makeStringArray(
+- "rotate", "translate", "rotate", "rotate", "instance_geometry", 0));
++ "rotate", "translate", "rotate", "rotate", "instance_geometry", NULL));
+
+ node->placeElementBefore(node->getChildren()[0], node->createElement("scale"));
+ CheckResult(getChildNames(node) == makeStringArray(
+- "scale", "rotate", "translate", "rotate", "rotate", "instance_geometry", 0));
++ "scale", "rotate", "translate", "rotate", "rotate", "instance_geometry", NULL));
+
+ return testResult(true);
+ };
Added: trunk/dports/science/collada-dom/files/patch-test-1.5-domTest.cpp.diff
===================================================================
--- trunk/dports/science/collada-dom/files/patch-test-1.5-domTest.cpp.diff (rev 0)
+++ trunk/dports/science/collada-dom/files/patch-test-1.5-domTest.cpp.diff 2010-02-16 22:44:05 UTC (rev 63833)
@@ -0,0 +1,45 @@
+--- test/1.5/domTest.cpp.orig 2010-02-16 18:34:25.000000000 +0100
++++ test/1.5/domTest.cpp 2010-02-16 18:56:12.000000000 +0100
+@@ -124,15 +124,15 @@
+ CheckResult(replace("abc123", "bc12", "b") == "ab3");
+ CheckResult(replace("abracadabra", "a", "") == "brcdbr");
+
+- CheckResult(tokenize("1|2|3|4", "|") == makeStringList("1", "2", "3", "4", 0));
+- CheckResult(tokenize("|1|", "|") == makeStringList("1", 0));
+- CheckResult(tokenize("1|||2||3|", "|") == makeStringList("1", "2", "3", 0));
++ CheckResult(tokenize("1|2|3|4", "|") == makeStringList("1", "2", "3", "4", NULL));
++ CheckResult(tokenize("|1|", "|") == makeStringList("1", NULL));
++ CheckResult(tokenize("1|||2||3|", "|") == makeStringList("1", "2", "3", NULL));
+ CheckResult(tokenize("1|||2||3|", "|", true) ==
+- makeStringList("1", "|", "|", "|", "2", "|", "|", "3", "|", 0));
++ makeStringList("1", "|", "|", "|", "2", "|", "|", "3", "|", NULL));
+ CheckResult(tokenize("this/is some#text", "/#", true) ==
+- makeStringList("this", "/", "is some", "#", "text", 0));
++ makeStringList("this", "/", "is some", "#", "text", NULL));
+ CheckResult(tokenize("this/is some#text", "/# ", false) ==
+- makeStringList("this", "is", "some", "text", 0));
++ makeStringList("this", "is", "some", "text", NULL));
+
+ CheckResult(toString(5) == "5");
+ CheckResult(toFloat(toString(4.0f)) == 4.0f);
+@@ -825,17 +825,17 @@
+ daeElement* node = dae.getDatabase()->idLookup("Box").at(0);
+
+ CheckResult(getChildNames(node) == makeStringArray(
+- "rotate", "rotate", "rotate", "instance_geometry", 0));
++ "rotate", "rotate", "rotate", "instance_geometry", NULL));
+
+ // Place a new <translate> after the first <rotate> using placeElementAfter, and
+ // make sure the <translate> shows up in the right spot.
+ node->placeElementAfter(node->getChildren()[0], node->createElement("translate"));
+ CheckResult(getChildNames(node) == makeStringArray(
+- "rotate", "translate", "rotate", "rotate", "instance_geometry", 0));
++ "rotate", "translate", "rotate", "rotate", "instance_geometry", NULL));
+
+ node->placeElementBefore(node->getChildren()[0], node->createElement("scale"));
+ CheckResult(getChildNames(node) == makeStringArray(
+- "scale", "rotate", "translate", "rotate", "rotate", "instance_geometry", 0));
++ "scale", "rotate", "translate", "rotate", "rotate", "instance_geometry", NULL));
+
+ return testResult(true);
+ };
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100216/0020d8cb/attachment-0001.html>
More information about the macports-changes
mailing list