Patch by wjwwood to make colladadom build on OSX x86_64

This commit is contained in:
Wim Meeussen 2011-08-31 16:11:00 -07:00
parent 815f972907
commit c3141bba97
3 changed files with 109 additions and 1 deletions

View File

@ -4,7 +4,7 @@ TARBALL_URL = http://pr.willowgarage.com/downloads/collada-dom-2.2.zip
SOURCE_DIR = build/colladadom
INITIAL_DIR = build/collada-dom
UNPACK_CMD = unzip
TARBALL_PATCH = collada-dom.patch
TARBALL_PATCH = collada-dom.patch mac-x86_64.patch
MD5SUM_FILE = collada-dom-2.2.zip.md5sum
include $(shell rospack find mk)/download_unpack_build.mk

View File

@ -98,3 +98,19 @@ Index: dom/make/domTest.mk
// SID resolution was successful.
return result;
}
--- dom/test/1.5/domTest.cpp
+++ dom/test/1.5/domTest.cpp
@@ -88,11 +88,11 @@
string lookupTestFile(const string& fileName) {
- return (dataPath() / fileName).native_file_string();
+ return (dataPath() / fileName).string();
}
string getTmpFile(const string& fileName) {
- return (tmpPath() / fileName).native_file_string();
+ return (tmpPath() / fileName).string();
}

View File

@ -0,0 +1,92 @@
--- dom/external-libs/boost/build/filesystem/Makefile 2008-04-23 19:21:32.000000000 -0500
+++ dom/external-libs/boost/build/filesystem/Makefile 2011-08-19 17:10:32.000000000 -0500
@@ -6,7 +6,7 @@
# Mac
compiler := g++
linker := ar
-compilerFlags += -arch ppc -arch i386
+compilerFlags += -arch i386 -arch x86_64
outPath := mac/
sources := operations.cpp path.cpp portability.cpp utf8_codecvt_facet.cpp
else
--- dom/external-libs/boost/build/system/Makefile 2008-04-23 19:21:32.000000000 -0500
+++ dom/external-libs/boost/build/system/Makefile 2011-08-19 17:11:12.000000000 -0500
@@ -6,7 +6,7 @@
# Mac
compiler := g++
linker := ar
-compilerFlags += -arch ppc -arch i386
+compilerFlags += -arch x86_64 -arch i386
outPath := mac/
else
# PS3
--- dom/external-libs/tinyxml/build/Makefile 2008-04-23 19:21:32.000000000 -0500
+++ dom/external-libs/tinyxml/build/Makefile 2011-08-19 17:11:29.000000000 -0500
@@ -19,7 +19,7 @@
compilerFlags += -Wall -c -O2
ifeq ($(platform),mac)
-compilerFlags += -arch i386 -arch ppc
+compilerFlags += -arch i386 -arch x86_64
endif
linkerFlags += rcs
--- dom/make/common.mk 2011-08-19 17:57:41.000000000 -0500
+++ dom/make/common.mk 2011-08-19 17:01:39.000000000 -0500
@@ -21,7 +21,8 @@
ifeq ($(os),mac)
# Add the -arch flags to specify what architectures we're building for.
-ccFlags += $(addprefix -arch ,$(subst x86,i386,$(archs)))
+# ccFlags += $(addprefix -arch ,$(subst x86,i386,$(archs)))
+ccFlags += $(addprefix -arch ,x86_64)
endif
libOpts :=
--- dom/make/dom.mk 2008-10-09 13:01:48.000000000 -0500
+++ dom/make/dom.mk 2011-08-19 17:46:27.000000000 -0500
@@ -31,14 +31,18 @@
ifneq ($(findstring tinyxml,$(xmlparsers)),)
ccFlags += -DDOM_INCLUDE_TINYXML
+ifeq ($(os),mac)
+libOpts += -ltinyxml
+else
includeOpts += -Iexternal-libs/tinyxml/
libOpts += external-libs/tinyxml/lib/$(buildID)/libtinyxml.a
endif
+endif
-ifeq ($(os),linux)
+ifneq ($(findstring $(os),linux mac),)
libOpts += -lpcre -lpcrecpp
else
-# On Mac, Windows and PS3 we need to be told where to find pcre
+# On Windows and PS3 we need to be told where to find pcre
ifeq ($(os),windows)
ccFlags += -DPCRE_STATIC
endif
@@ -52,9 +56,8 @@
libOpts += external-libs/boost/lib/$(buildID)/libboost_system.a
libOpts += external-libs/boost/lib/$(buildID)/libboost_filesystem.a
else ifeq ($(os),mac)
-includeOpts += -Iexternal-libs/boost
-libOpts += external-libs/boost/lib/$(buildID)/libboost_system.a
-libOpts += external-libs/boost/lib/$(buildID)/libboost_filesystem.a
+libOpts += $(shell rosboost-cfg --libs system)
+libOpts += /usr/local/lib/libboost_filesystem-mt.dylib
endif
# minizip
--- rt/make/common.mk 2008-09-04 17:50:38.000000000 -0500
+++ rt/make/common.mk 2011-08-19 17:12:43.000000000 -0500
@@ -19,7 +19,8 @@
ifeq ($(os),mac)
# Add the -arch flags to specify what architectures we're building for.
-ccFlags += $(addprefix -arch ,$(subst x86,i386,$(archs)))
+# ccFlags += $(addprefix -arch ,$(subst x86,i386,$(archs)))
+ccFlags += $(addprefix -arch ,x86_64)
endif
libOpts :=