ports/157704: [patch] graphics/inventor -- enable AMD64
Pietro Cerutti
gahr at FreeBSD.org
Wed Jun 8 13:50:08 UTC 2011
>Number: 157704
>Category: ports
>Synopsis: [patch] graphics/inventor -- enable AMD64
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Wed Jun 08 13:50:07 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator: Pietro Cerutti
>Release:
>Organization:
The FreeBSD Project
>Environment:
FreeBSD SN2000.medacta.ch 9.0-CURRENT FreeBSD 9.0-CURRENT #13: Tue May 31 14:08:42 CEST 2011 root at SN2000.medacta.ch:/usr/obj/usr/src/sys/IMAC amd64
>Description:
The attached patch adds amd64 to the list of supported archs for inventor. I use it daily, it works just fine.
>How-To-Repeat:
>Fix:
Patch attached with submission follows:
Index: Makefile
===================================================================
RCS file: /home/pcvs/ports/graphics/inventor/Makefile,v
retrieving revision 1.20
diff -u -r1.20 Makefile
--- Makefile 2 May 2011 12:44:37 -0000 1.20
+++ Makefile 8 Jun 2011 12:55:36 -0000
@@ -26,7 +26,7 @@
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
Index: distinfo
===================================================================
RCS file: /home/pcvs/ports/graphics/inventor/distinfo,v
retrieving revision 1.3
diff -u -r1.3 distinfo
--- distinfo 22 Jan 2006 12:34:53 -0000 1.3
+++ distinfo 8 Jun 2011 12:53:48 -0000
@@ -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
Index: files/patch-SoDragger.c++
===================================================================
RCS file: files/patch-SoDragger.c++
diff -N files/patch-SoDragger.c++
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ files/patch-SoDragger.c++ 8 Jun 2011 12:34:26 -0000
@@ -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];
Index: files/patch-SoNkCatalog.c++
===================================================================
RCS file: files/patch-SoNkCatalog.c++
diff -N files/patch-SoNkCatalog.c++
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ files/patch-SoNkCatalog.c++ 8 Jun 2011 12:36:43 -0000
@@ -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 );
Index: files/patch-SoOutput.c++
===================================================================
RCS file: files/patch-SoOutput.c++
diff -N files/patch-SoOutput.c++
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ files/patch-SoOutput.c++ 8 Jun 2011 12:31:31 -0000
@@ -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;
Index: files/patch-SoType.c++
===================================================================
RCS file: files/patch-SoType.c++
diff -N files/patch-SoType.c++
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ files/patch-SoType.c++ 8 Jun 2011 12:29:54 -0000
@@ -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;
Index: files/patch-SoV1NkCatalog.c++
===================================================================
RCS file: /home/pcvs/ports/graphics/inventor/files/patch-SoV1NkCatalog.c++,v
retrieving revision 1.1
diff -u -r1.1 patch-SoV1NkCatalog.c++
--- files/patch-SoV1NkCatalog.c++ 3 Aug 2003 06:56:12 -0000 1.1
+++ files/patch-SoV1NkCatalog.c++ 8 Jun 2011 12:38:57 -0000
@@ -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 );
Index: files/patch-SoXtRsrc.c++
===================================================================
RCS file: files/patch-SoXtRsrc.c++
diff -N files/patch-SoXtRsrc.c++
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ files/patch-SoXtRsrc.c++ 8 Jun 2011 12:40:04 -0000
@@ -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
Index: files/patch-ivcommondefs
===================================================================
RCS file: /home/pcvs/ports/graphics/inventor/files/patch-ivcommondefs,v
retrieving revision 1.2
diff -u -r1.2 patch-ivcommondefs
--- files/patch-ivcommondefs 19 Apr 2008 17:50:16 -0000 1.2
+++ files/patch-ivcommondefs 8 Jun 2011 13:07:25 -0000
@@ -61,7 +61,7 @@
#
+ifeq ($(usingFreeBSD), 1)
-+IVPREFIX = ${LOCALBASE}
++IVPREFIX = ${PREFIX}
+else
IVPREFIX = /usr
+endif
Index: files/patch-machine.h
===================================================================
RCS file: /home/pcvs/ports/graphics/inventor/files/patch-machine.h,v
retrieving revision 1.1
diff -u -r1.1 patch-machine.h
--- files/patch-machine.h 19 Aug 2003 00:31:42 -0000 1.1
+++ files/patch-machine.h 8 Jun 2011 12:30:43 -0000
@@ -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);
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list