- fix build on amd64, enable that platform

PR:		157704
Submitted by:	gahr@FreeBSD.org
Approved by:	Christian Gusenbauer <c47g@gmx.at> (maintainer)
This commit is contained in:
Pietro Cerutti 2011-06-08 15:26:57 +00:00
parent d22a784cb0
commit 6d73d3b156
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=275229
10 changed files with 117 additions and 40 deletions

View File

@ -26,7 +26,7 @@ USE_GMAKE= yes
USE_ICONV= yes
USE_MOTIF= yes
USE_LDCONFIG= yes
ONLY_FOR_ARCHS= i386
ONLY_FOR_ARCHS= i386 amd64
WRKSRC= ${WRKDIR}/${PORTNAME}
MAKE_ENV= LD_LIBRARY_PATH=${WRKSRC}/lib:${WRKSRC}/libSoXt

View File

@ -1,3 +1,2 @@
MD5 (inventor-2.1.5-10.src.tar.gz) = 82208096f1e0b111160e864e239c3a51
SHA256 (inventor-2.1.5-10.src.tar.gz) = 1b0106a705191f525fc89a9f3def37bdeae5ab9ceb1b4d9e5ede8a442bdf8d6b
SIZE (inventor-2.1.5-10.src.tar.gz) = 8282780

View File

@ -0,0 +1,11 @@
--- lib/interaction/src/draggers/SoDragger.c++.orig 2011-06-08 14:34:05.000000000 +0200
+++ lib/interaction/src/draggers/SoDragger.c++ 2011-06-08 14:34:13.000000000 +0200
@@ -686,7 +686,7 @@
int indexInPath = tempPathToThis->getIndex(numFmHead+1);
int numKidsNow = children->getLength();
-#if (_MIPS_SZPTR == 64 || __ia64)
+#if (_MIPS_SZPTR == 64 || __ia64 || __amd64__)
int numKidsBefore = (int) ((long) (*tempPathNumKidsHack)[numFmHead]);
#else
int numKidsBefore = (int) (*tempPathNumKidsHack)[numFmHead];

View File

@ -0,0 +1,11 @@
--- lib/nodekits/src/nodekits/SoNkCatalog.c++.orig 2011-06-08 14:36:19.000000000 +0200
+++ lib/nodekits/src/nodekits/SoNkCatalog.c++ 2011-06-08 14:36:30.000000000 +0200
@@ -336,7 +336,7 @@
void *castPNum;
if ( partNameDict.find( (unsigned long) theName.getString(), castPNum ) )
-#if (_MIPS_SZPTR == 64 || __ia64)
+#if (_MIPS_SZPTR == 64 || __ia64 || __amd64__)
return ( (int) ((long) castPNum) ); // System long
#else
return ( (int) castPNum );

View File

@ -0,0 +1,11 @@
--- lib/database/src/so/SoOutput.c++.orig 2011-06-08 14:31:06.000000000 +0200
+++ lib/database/src/so/SoOutput.c++ 2011-06-08 14:31:15.000000000 +0200
@@ -1462,7 +1462,7 @@
// Generates a CC warning. Ho hum.
if (refDict->find((unsigned long) base, ref))
-#if (_MIPS_SZPTR == 64 || __ia64)
+#if (_MIPS_SZPTR == 64 || __ia64 || __amd64__)
referenceId = (int) ((unsigned long) ref);
#else
referenceId = (int)ref;

View File

@ -0,0 +1,11 @@
--- lib/database/src/so/SoType.c++.orig 2011-06-08 14:29:24.000000000 +0200
+++ lib/database/src/so/SoType.c++ 2011-06-08 14:29:37.000000000 +0200
@@ -331,7 +331,7 @@
if (b == NULL)
return SoType::badType();
-#if (_MIPS_SZPTR == 64 || __ia64)
+#if (_MIPS_SZPTR == 64 || __ia64 || __amd64__)
SoType result = typeData[(int) ((unsigned long) b)].type;
#else
SoType result = typeData[(int)b].type;

View File

@ -1,14 +1,21 @@
*** lib/nodekits/src/upgraders/SoV1NkCatalog.c++.orig Thu Jan 2 20:19:39 2003
--- lib/nodekits/src/upgraders/SoV1NkCatalog.c++ Thu Jan 2 20:20:07 2003
***************
*** 51,56 ****
--- 51,59 ----
_______________________________________________________________________
*/
+ #ifdef __FreeBSD__
+ #include <stdlib.h>
+ #endif
#include <Inventor/misc/upgraders/SoV1NodekitCatalog.h>
#include <Inventor/SoDB.h>
--- lib/nodekits/src/upgraders/SoV1NkCatalog.c++.orig 2001-09-25 02:45:47.000000000 +0200
+++ lib/nodekits/src/upgraders/SoV1NkCatalog.c++ 2011-06-08 14:38:38.000000000 +0200
@@ -51,6 +51,9 @@
_______________________________________________________________________
*/
+#ifdef __FreeBSD__
+#include <stdlib.h>
+#endif
#include <Inventor/misc/upgraders/SoV1NodekitCatalog.h>
#include <Inventor/SoDB.h>
@@ -330,7 +333,7 @@
void *castPNum;
if ( partNameDict.find( (unsigned long) theName.getString(), castPNum ) )
-#if (_MIPS_SZPTR == 64 || __ia64)
+#if (_MIPS_SZPTR == 64 || __ia64 || __amd64__)
return ( (int) ((long) castPNum) ); // System long
#else
return ( (int) castPNum );

View File

@ -0,0 +1,11 @@
--- libSoXt/src/SoXtRsrc.c++.orig 2011-06-08 14:39:34.000000000 +0200
+++ libSoXt/src/SoXtRsrc.c++ 2011-06-08 14:39:43.000000000 +0200
@@ -145,7 +145,7 @@
classList = new XrmQuark[listSize];
for (q = 0, s = len - 1;
s >= 0; q++, s--) {
-#if (_MIPS_SZPTR == 64 || __ia64)
+#if (_MIPS_SZPTR == 64 || __ia64 || __amd64__)
nameList[q] = (XrmQuark) ((long) nameplist[s]);
classList[q] = (XrmQuark) ((long) classplist[s]);
#else

View File

@ -61,7 +61,7 @@
#
+ifeq ($(usingFreeBSD), 1)
+IVPREFIX = ${LOCALBASE}
+IVPREFIX = ${PREFIX}
+else
IVPREFIX = /usr
+endif

View File

@ -1,23 +1,39 @@
*** lib/database/include/machine.h.orig Mon Aug 18 18:36:50 2003
--- lib/database/include/machine.h Mon Aug 18 18:48:17 2003
***************
*** 152,157 ****
--- 152,169 ----
/*
+ * Alpha under FreeBSD
+ */
+
+ #if __alpha__ && __FreeBSD__
+
+ #define MACHINE_WORD_FORMAT DGL_LITTLE_ENDIAN
+ #define MACHINE_FLOAT_FORMAT DGL_NON_IEEE
+
+ #endif /* __alpha__ && __FreeBSD__ */
+
+
+ /*
* Apple Darwin (Mac OS X) machine dependent setup
*/
--- lib/database/include/machine.h.orig 2003-07-12 00:40:53.000000000 +0200
+++ lib/database/include/machine.h 2011-06-08 14:30:26.000000000 +0200
@@ -143,7 +143,7 @@
* Linux i386/ia64 machine dependent setup
*/
-#if __i386__ || __ia64__
+#if __i386__ || __ia64__ || __amd64__
#define MACHINE_WORD_FORMAT DGL_LITTLE_ENDIAN
#define MACHINE_FLOAT_FORMAT DGL_NON_IEEE
@@ -152,6 +152,18 @@
/*
+ * Alpha under FreeBSD
+ */
+
+#if __alpha__ && __FreeBSD__
+
+#define MACHINE_WORD_FORMAT DGL_LITTLE_ENDIAN
+#define MACHINE_FLOAT_FORMAT DGL_NON_IEEE
+
+#endif /* __alpha__ && __FreeBSD__ */
+
+
+/*
* Apple Darwin (Mac OS X) machine dependent setup
*/
@@ -321,7 +333,7 @@
*/
#if MACHINE_FLOAT_FORMAT == DGL_NON_IEEE
-#if __i386__ || __ia64__
+#if __i386__ || __ia64__ || __amd64__
void mem_hton_float(float *t, float *f);
void mem_ntoh_float(float *t, float *f);
void mem_hton_double(double *t, double *f);