New ebuild for SGI OpenInventor, fixes bug #31742
authorStefaan De Roeck <stefaan@gentoo.org>
Fri, 16 Sep 2005 21:49:31 +0000 (21:49 +0000)
committerStefaan De Roeck <stefaan@gentoo.org>
Fri, 16 Sep 2005 21:49:31 +0000 (21:49 +0000)
Package-Manager: portage-2.0.52-r1

12 files changed:
media-libs/openinventor/ChangeLog [new file with mode: 0644]
media-libs/openinventor/Manifest [new file with mode: 0644]
media-libs/openinventor/files/digest-openinventor-2.1.5.10 [new file with mode: 0644]
media-libs/openinventor/files/freetype2-activate.patch [new file with mode: 0644]
media-libs/openinventor/files/freetype2-includes.patch [new file with mode: 0644]
media-libs/openinventor/files/gcc4-support.patch [new file with mode: 0644]
media-libs/openinventor/files/gentoo-paths.patch [new file with mode: 0644]
media-libs/openinventor/files/no-csh.patch [new file with mode: 0644]
media-libs/openinventor/files/support-archs.patch [new file with mode: 0644]
media-libs/openinventor/files/use-byacc.patch [new file with mode: 0644]
media-libs/openinventor/metadata.xml [new file with mode: 0644]
media-libs/openinventor/openinventor-2.1.5.10.ebuild [new file with mode: 0644]

diff --git a/media-libs/openinventor/ChangeLog b/media-libs/openinventor/ChangeLog
new file mode 100644 (file)
index 0000000..570d541
--- /dev/null
@@ -0,0 +1,13 @@
+# ChangeLog for media-libs/openinventor
+# Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/media-libs/openinventor/ChangeLog,v 1.1 2005/09/16 21:49:31 stefaan Exp $
+
+*openinventor-2.1.5.10 (16 Sep 2005)
+
+  16 Sep 2005; Stefaan De Roeck <stefaan@gentoo.org>
+  +files/freetype2-activate.patch, +files/freetype2-includes.patch,
+  +files/gcc4-support.patch, +files/gentoo-paths.patch, +files/no-csh.patch,
+  +files/support-archs.patch, +files/use-byacc.patch, +metadata.xml,
+  +openinventor-2.1.5.10.ebuild:
+  New ebuild for SGI OpenInventor, fixes bug #31742
+
diff --git a/media-libs/openinventor/Manifest b/media-libs/openinventor/Manifest
new file mode 100644 (file)
index 0000000..1b36988
--- /dev/null
@@ -0,0 +1,11 @@
+MD5 becc32657afbba143f427b8ee7f521a7 openinventor-2.1.5.10.ebuild 2357
+MD5 0f7895c10f859b7a86f1df293a1e602b metadata.xml 515
+MD5 8de10aaeaef788a7a9de0aacf8c2e43d ChangeLog 611
+MD5 8ce8331fdab79fb938507af45228210f files/digest-openinventor-2.1.5.10 74
+MD5 e44139ff4ff396e391630ccff2cab27b files/no-csh.patch 1053
+MD5 bd1dcb17d80481152c4856c899b21144 files/gcc4-support.patch 4155
+MD5 43d9fc3b8d7b147ca5378116eb24d558 files/gentoo-paths.patch 10582
+MD5 3b720d5d1e432dec6ec597f5391caef1 files/use-byacc.patch 1444
+MD5 1a742e312c436314783b6b91b8a485d4 files/freetype2-includes.patch 291
+MD5 481f4b44d5f9f6b9af804116c4d2bcc0 files/freetype2-activate.patch 261
+MD5 3514d32986d95c1a1edd9c8503913121 files/support-archs.patch 1116
diff --git a/media-libs/openinventor/files/digest-openinventor-2.1.5.10 b/media-libs/openinventor/files/digest-openinventor-2.1.5.10
new file mode 100644 (file)
index 0000000..95d1053
--- /dev/null
@@ -0,0 +1 @@
+MD5 82208096f1e0b111160e864e239c3a51 inventor-2.1.5-10.src.tar.gz 8282780
diff --git a/media-libs/openinventor/files/freetype2-activate.patch b/media-libs/openinventor/files/freetype2-activate.patch
new file mode 100644 (file)
index 0000000..7ec1d28
--- /dev/null
@@ -0,0 +1,11 @@
+--- inventor/make/ivcommondefs.old     2005-09-14 20:41:11.000000000 +0200
++++ inventor/make/ivcommondefs 2005-09-14 20:41:30.000000000 +0200
+@@ -49,6 +49,8 @@
+ 
+ ifeq ($(usingLinux), 1)
+ 
++FREETYPE = 1
++
+ CC  = /usr/bin/gcc
+ C++ = /usr/bin/g++
+ LD  = /usr/bin/g++
diff --git a/media-libs/openinventor/files/freetype2-includes.patch b/media-libs/openinventor/files/freetype2-includes.patch
new file mode 100644 (file)
index 0000000..f2d12a9
--- /dev/null
@@ -0,0 +1,10 @@
+--- inventor/libFL/ang/flfreetype.h.orig       2001-03-24 03:34:24.000000000 +0100
++++ inventor/libFL/ang/flfreetype.h    2005-02-27 00:50:41.000000000 +0100
+@@ -1,6 +1,7 @@
+ #ifndef __flfreetype_h_
+ #define __flfreetype_h_
+ 
++#include <ft2build.h>
+ #include <freetype/freetype.h>
+ 
+ #ifndef __fl_h_
diff --git a/media-libs/openinventor/files/gcc4-support.patch b/media-libs/openinventor/files/gcc4-support.patch
new file mode 100644 (file)
index 0000000..3f2c4af
--- /dev/null
@@ -0,0 +1,103 @@
+--- ./inventor/lib/database/include/Inventor/SoPath.h.old      2005-09-15 22:19:05.000000000 +0000
++++ ./inventor/lib/database/include/Inventor/SoPath.h  2005-09-15 22:19:08.000000000 +0000
+@@ -61,6 +61,8 @@
+ #include <Inventor/nodes/SoNode.h>
+ #include <Inventor/SoLists.h>
+ 
++class SoTempPath;
++
+ //////////////////////////////////////////////////////////////////////////////
+ //
+ //  Class: SoPath
+diff -urN ./inventor-old/lib/database/src/so/SoOutput.c++ ./inventor/lib/database/src/so/SoOutput.c++
+--- ./inventor-old/lib/database/src/so/SoOutput.c++    2001-09-25 00:45:35.000000000 +0000
++++ ./inventor/lib/database/src/so/SoOutput.c++        2005-09-15 22:57:00.000000000 +0000
+@@ -1462,11 +1462,7 @@
+ 
+     // Generates a CC warning. Ho hum.
+     if (refDict->find((unsigned long) base, ref))
+-#if (_MIPS_SZPTR == 64 || __ia64)
+         referenceId = (int) ((unsigned long) ref);
+-#else
+-      referenceId = (int)ref;
+-#endif
+ 
+     return referenceId;
+ }
+diff -urN ./inventor-old/lib/database/src/so/SoType.c++ ./inventor/lib/database/src/so/SoType.c++
+--- ./inventor-old/lib/database/src/so/SoType.c++      2003-07-11 22:40:53.000000000 +0000
++++ ./inventor/lib/database/src/so/SoType.c++  2005-09-15 22:57:06.000000000 +0000
+@@ -331,11 +331,7 @@
+     if (b == NULL)
+       return SoType::badType();
+ 
+-#if (_MIPS_SZPTR == 64 || __ia64)
+     SoType result = typeData[(int) ((unsigned long) b)].type;
+-#else
+-    SoType result = typeData[(int)b].type;
+-#endif
+ 
+     if (result.storage.isPublic == 0) {
+ #ifdef DEBUG
+diff -urN ./inventor-old/lib/interaction/src/draggers/SoDragger.c++ ./inventor/lib/interaction/src/draggers/SoDragger.c++
+--- ./inventor-old/lib/interaction/src/draggers/SoDragger.c++  2001-09-25 00:45:44.000000000 +0000
++++ ./inventor/lib/interaction/src/draggers/SoDragger.c++      2005-09-15 22:58:56.000000000 +0000
+@@ -686,11 +686,7 @@
+               int indexInPath = tempPathToThis->getIndex(numFmHead+1);
+ 
+               int numKidsNow    = children->getLength();
+-#if (_MIPS_SZPTR == 64 || __ia64)
+               int numKidsBefore = (int) ((long) (*tempPathNumKidsHack)[numFmHead]);
+-#else
+-              int numKidsBefore = (int) (*tempPathNumKidsHack)[numFmHead];
+-#endif
+ 
+               // To be correct, the childNode has to be the correct numbered
+               // child under the parent, and the parent should still
+diff -urN ./inventor-old/lib/nodekits/src/nodekits/SoNkCatalog.c++ ./inventor/lib/nodekits/src/nodekits/SoNkCatalog.c++
+--- ./inventor-old/lib/nodekits/src/nodekits/SoNkCatalog.c++   2001-09-25 00:45:46.000000000 +0000
++++ ./inventor/lib/nodekits/src/nodekits/SoNkCatalog.c++       2005-09-15 22:59:09.000000000 +0000
+@@ -336,11 +336,7 @@
+     void *castPNum;
+ 
+     if ( partNameDict.find( (unsigned long) theName.getString(), castPNum ) )
+-#if (_MIPS_SZPTR == 64 || __ia64)
+       return ( (int) ((long) castPNum) );  // System long
+-#else
+-      return ( (int) castPNum );
+-#endif
+     else 
+       return SO_CATALOG_NAME_NOT_FOUND;
+ }
+diff -urN ./inventor-old/lib/nodekits/src/upgraders/SoV1NkCatalog.c++ ./inventor/lib/nodekits/src/upgraders/SoV1NkCatalog.c++
+--- ./inventor-old/lib/nodekits/src/upgraders/SoV1NkCatalog.c++        2001-09-25 00:45:47.000000000 +0000
++++ ./inventor/lib/nodekits/src/upgraders/SoV1NkCatalog.c++    2005-09-15 22:59:03.000000000 +0000
+@@ -330,11 +330,7 @@
+     void *castPNum;
+ 
+     if ( partNameDict.find( (unsigned long) theName.getString(), castPNum ) )
+-#if (_MIPS_SZPTR == 64 || __ia64)
+       return ( (int) ((long) castPNum) );  // System long
+-#else
+-      return ( (int) castPNum );
+-#endif
+     else 
+       return SO_V1_CATALOG_NAME_NOT_FOUND;
+ }
+diff -urN ./inventor-old/libSoXt/src/SoXtRsrc.c++ ./inventor/libSoXt/src/SoXtRsrc.c++
+--- ./inventor-old/libSoXt/src/SoXtRsrc.c++    2001-09-25 00:45:48.000000000 +0000
++++ ./inventor/libSoXt/src/SoXtRsrc.c++        2005-09-15 22:59:19.000000000 +0000
+@@ -145,13 +145,8 @@
+     classList = new XrmQuark[listSize];
+     for (q = 0, s = len - 1;
+        s >= 0; q++, s--) {
+-#if (_MIPS_SZPTR == 64 || __ia64)
+        nameList[q]  = (XrmQuark) ((long) nameplist[s]);
+        classList[q] = (XrmQuark) ((long) classplist[s]);
+-#else
+-       nameList[q]  = (XrmQuark) nameplist[s];
+-       classList[q] = (XrmQuark) classplist[s];
+-#endif
+     }
+ 
+     // make the last entry the NULL sentinel
diff --git a/media-libs/openinventor/files/gentoo-paths.patch b/media-libs/openinventor/files/gentoo-paths.patch
new file mode 100644 (file)
index 0000000..67b5c02
--- /dev/null
@@ -0,0 +1,258 @@
+diff -u -urN ./apps/demos/SceneViewer/SoSceneViewer.c++ ../inventor/apps/demos/SceneViewer/SoSceneViewer.c++
+--- ./apps/demos/SceneViewer/SoSceneViewer.c++ 2003-06-11 03:20:09.000000000 +0200
++++ ../inventor/apps/demos/SceneViewer/SoSceneViewer.c++       2005-09-15 11:27:05.000000000 +0200
+@@ -4734,10 +4734,10 @@
+ //
+ ////////////////////////////////////////////////////////////////////////
+ {
+-    if (access(IVPREFIX "/demos/Inventor/SceneViewer.about", R_OK) != 0)
++    if (access(IVPREFIX "/share/openinventor/demos/Inventor/SceneViewer.about", R_OK) != 0)
+     {
+       system("xmessage 'Sorry, could not find "
+-             IVPREFIX "/demos/Inventor/SceneViewer.about' > /dev/null");
++             IVPREFIX "/share/openinventor/demos/Inventor/SceneViewer.about' > /dev/null");
+       return;
+     }
+ 
+@@ -4753,7 +4753,7 @@
+     }
+ 
+     sprintf(command, "acroread "
+-            IVPREFIX "/demos/Inventor/SceneViewer.about &");
++            IVPREFIX "/share/openinventor/demos/Inventor/SceneViewer.about &");
+     system(command);
+ }
+ 
+diff -u -urN ./apps/demos/gview/DisplayGraph.c++ ../inventor/apps/demos/gview/DisplayGraph.c++
+--- ./apps/demos/gview/DisplayGraph.c++        2002-06-01 04:22:20.000000000 +0200
++++ ../inventor/apps/demos/gview/DisplayGraph.c++      2005-09-15 11:27:15.000000000 +0200
+@@ -67,7 +67,7 @@
+ SbDict        *DisplayGraph::iconDict;
+ 
+ #define ICON_FILE     "gviewIcons.iv"
+-#define ICON_INST_DIR IVPREFIX "/demos/data/Inventor"
++#define ICON_INST_DIR IVPREFIX "/share/openinventor/demos/data/Inventor"
+ #define ICON_ENV_VAR  "IV_GRAPH_DIR"
+ 
+ ////////////////////////////////////////////////////////////////////////
+diff -u -urN ./apps/demos/noodle/Interface.c++ ../inventor/apps/demos/noodle/Interface.c++
+--- ./apps/demos/noodle/Interface.c++  2002-06-01 04:22:20.000000000 +0200
++++ ../inventor/apps/demos/noodle/Interface.c++        2005-09-15 11:30:08.000000000 +0200
+@@ -399,9 +399,9 @@
+ void
+ Interface::showAboutDialog()
+ {
+-   if (access(IVPREFIX "/demos/Inventor/noodle.about", R_OK) != 0) {
++   if (access(IVPREFIX "/share/inventor/demos/Inventor/noodle.about", R_OK) != 0) {
+         system("xmessage 'Sorry, could not find "
+-               IVPREFIX "/demos/Inventor/noodle.about' > /dev/null");
++               IVPREFIX "/share/inventor/demos/Inventor/noodle.about' > /dev/null");
+         return;
+     }
+ 
+@@ -415,7 +415,7 @@
+         return;
+     }
+ 
+-    sprintf(command, "acroread " IVPREFIX "/demos/Inventor/noodle.about &");
++    sprintf(command, "acroread " IVPREFIX "/share/inventor/demos/Inventor/noodle.about &");
+     system(command);
+ }
+ 
+diff -u -urN ./apps/demos/qmorf/qmorf.c++ ../inventor/apps/demos/qmorf/qmorf.c++
+--- ./apps/demos/qmorf/qmorf.c++       2002-06-01 04:22:20.000000000 +0200
++++ ../inventor/apps/demos/qmorf/qmorf.c++     2005-09-15 11:30:55.000000000 +0200
+@@ -414,7 +414,7 @@
+               "they must contain QuadMeshes (qmorf can\n");
+       fprintf(stderr, "only morph QuadMesh nodes).\n");
+       fprintf(stderr, "The directory "
+-              IVPREFIX "/share/data/models/CyberHeads "
++              IVPREFIX "/share/openinventor/data/models/CyberHeads "
+               "contains good data to morph.\n");
+ 
+       exit(7);
+@@ -436,10 +436,10 @@
+ void
+ showAboutDialog(Widget, XtPointer, XtPointer)
+ {
+-    if (access(IVPREFIX "/demos/Inventor/qmorf.about", R_OK) != 0)
++    if (access(IVPREFIX "/share/openinventor/demos/Inventor/qmorf.about", R_OK) != 0)
+     {
+       system("xmessage 'Sorry, could not find "
+-             IVPREFIX "/demos/Inventor/qmorf.about' > /dev/null");
++             IVPREFIX "/share/openinventor/demos/Inventor/qmorf.about' > /dev/null");
+       return;
+     }
+     char command[100];
+@@ -453,7 +453,7 @@
+       return;
+     }
+ 
+-    sprintf(command, "acroread " IVPREFIX "/demos/Inventor/qmorf.about &");
++    sprintf(command, "acroread " IVPREFIX "/share/openinventor/demos/Inventor/qmorf.about &");
+     system(command);
+ }     
+ 
+diff -u -urN ./apps/demos/revo/revo.c++ ../inventor/apps/demos/revo/revo.c++
+--- ./apps/demos/revo/revo.c++ 2002-06-01 04:22:21.000000000 +0200
++++ ../inventor/apps/demos/revo/revo.c++       2005-09-15 11:31:09.000000000 +0200
+@@ -78,10 +78,10 @@
+ void
+ showAboutDialog(Widget, XtPointer, XtPointer)
+ {
+-    if (access(IVPREFIX "/demos/Inventor/revo.about", R_OK) != 0)
++    if (access(IVPREFIX "/share/openinventor/demos/Inventor/revo.about", R_OK) != 0)
+     {
+       system("xmessage 'Sorry, could not find "
+-             IVPREFIX "/demos/Inventor/revo.about' > /dev/null");
++             IVPREFIX "/share/openinventor/demos/Inventor/revo.about' > /dev/null");
+       return;
+     }
+ 
+@@ -96,7 +96,7 @@
+       return;
+     }
+ 
+-    sprintf(command, "acroread " IVPREFIX "/demos/Inventor/revo.about &");
++    sprintf(command, "acroread " IVPREFIX "/share/openinventor/demos/Inventor/revo.about &");
+     system(command);
+ }     
+ 
+diff -u -urN ./apps/demos/textomatic/textomatic.c++ ../inventor/apps/demos/textomatic/textomatic.c++
+--- ./apps/demos/textomatic/textomatic.c++     2003-07-12 00:40:53.000000000 +0200
++++ ../inventor/apps/demos/textomatic/textomatic.c++   2005-09-15 11:31:21.000000000 +0200
+@@ -160,10 +160,10 @@
+ void
+ showAboutDialog(Widget, XtPointer, XtPointer)
+ {
+-    if (access(IVPREFIX "/demos/Inventor/textomatic.about", R_OK) != 0)
++    if (access(IVPREFIX "/share/openinventor/demos/Inventor/textomatic.about", R_OK) != 0)
+     {
+       system("xmessage 'Sorry, could not find "
+-             IVPREFIX "/demos/Inventor/textomatic.about' > /dev/null");
++             IVPREFIX "/share/openinventor/demos/Inventor/textomatic.about' > /dev/null");
+       return;
+     }
+ 
+@@ -177,7 +177,7 @@
+       return;
+     }
+ 
+-    sprintf(command, "acroread " IVPREFIX "/demos/Inventor/textomatic.about &");
++    sprintf(command, "acroread " IVPREFIX "/share/openinventor/demos/Inventor/textomatic.about &");
+     system(command);
+ }     
+ 
+diff -u -urN ./apps/samples/widgets/MyMtlPal.c++ ../inventor/apps/samples/widgets/MyMtlPal.c++
+--- ./apps/samples/widgets/MyMtlPal.c++        2002-06-01 04:22:21.000000000 +0200
++++ ../inventor/apps/samples/widgets/MyMtlPal.c++      2005-09-15 11:31:33.000000000 +0200
+@@ -193,7 +193,7 @@
+ };
+ 
+ static char *editorTitle = "Material Palette";
+-static char *defaultDir = IVPREFIX "/share/data/materials";
++static char *defaultDir = IVPREFIX "/share/openinventor/data/materials";
+ 
+ 
+ static char *geometryBuffer = "\
+diff -u -urN ./apps/samples/widgets/MyTextureEd.c++ ../inventor/apps/samples/widgets/MyTextureEd.c++
+--- ./apps/samples/widgets/MyTextureEd.c++     2002-06-01 04:22:21.000000000 +0200
++++ ../inventor/apps/samples/widgets/MyTextureEd.c++   2005-09-15 11:31:43.000000000 +0200
+@@ -228,7 +228,7 @@
+ 
+ 
+ static char *customTextureDir = ".textures";
+-static char *defaultDir = IVPREFIX "/share/data/textures";
++static char *defaultDir = IVPREFIX "/share/openinventor/data/textures";
+ static char *editorTitle = "Texture Editor";
+ static char *noFileNameStr = "<empty>";
+ 
+diff -u -urN ./apps/tools/ivview/ivview.c++ ../inventor/apps/tools/ivview/ivview.c++
+--- ./apps/tools/ivview/ivview.c++     2002-06-01 04:22:21.000000000 +0200
++++ ../inventor/apps/tools/ivview/ivview.c++   2005-09-15 11:31:59.000000000 +0200
+@@ -715,9 +715,9 @@
+ static void
+ showAboutDialog()
+ {
+-   if (access(IVPREFIX "/share/help/ivview/ivview.about", R_OK) != 0) {
++   if (access(IVPREFIX "/share/openinventor/help/ivview/ivview.about", R_OK) != 0) {
+         system("xmessage 'Sorry, could not find "
+-               IVPREFIX "/share/help/ivview/ivview.about' > /dev/null");
++               IVPREFIX "/share/openinventor/help/ivview/ivview.about' > /dev/null");
+         return;
+     }
+ 
+@@ -731,7 +731,7 @@
+         return;
+     }
+ 
+-    sprintf(command, "acroread " IVPREFIX "/share/help/ivview/ivview.about &");
++    sprintf(command, "acroread " IVPREFIX "/share/openinventor/help/ivview/ivview.about &");
+     system(command);
+ }
+ 
+diff -u -urN ./libFL/ang/fl.c ../inventor/libFL/ang/fl.c
+--- ./libFL/ang/fl.c   2003-07-12 00:40:53.000000000 +0200
++++ ../inventor/libFL/ang/fl.c 2005-09-15 11:32:55.000000000 +0200
+@@ -95,7 +95,7 @@
+   NULL
+ };
+ 
+-static char *fontPath = IVPREFIX "/share/data/fonts";
++static char *fontPath = IVPREFIX "/share/openinventor/fonts";
+ int fl_debug = FALSE;
+ 
+ /*
+diff -u -urN ./libSoXt/src/SoXtComponent.c++ ../inventor/libSoXt/src/SoXtComponent.c++
+--- ./libSoXt/src/SoXtComponent.c++    2002-06-01 04:16:10.000000000 +0200
++++ ../inventor/libSoXt/src/SoXtComponent.c++  2005-09-15 11:33:41.000000000 +0200
+@@ -622,7 +622,7 @@
+     }
+     
+     // else check for the default location
+-    strcpy(cardPath, IVPREFIX "/share/help/Inventor/");
++    strcpy(cardPath, IVPREFIX "/share/openinventor/help/Inventor/");
+     strcat(cardPath, cardName);
+     if ( access(cardPath, R_OK) == 0 ) {
+       strcat(pgrCmd, cardPath);
+diff -u -urN ./libSoXt/src/mtlEdit/SoXtMtlEdit.c++ ../inventor/libSoXt/src/mtlEdit/SoXtMtlEdit.c++
+--- ./libSoXt/src/mtlEdit/SoXtMtlEdit.c++      2002-06-01 04:16:10.000000000 +0200
++++ ../inventor/libSoXt/src/mtlEdit/SoXtMtlEdit.c++    2005-09-15 11:33:48.000000000 +0200
+@@ -156,7 +156,7 @@
+       "Material Emissive Color"
+ };
+ 
+-static char *mtlDir  = IVPREFIX "/share/data/materials";
++static char *mtlDir  = IVPREFIX "/share/openinventor/data/materials";
+ 
+ static char *slider_labels[] = { (char *)NULL, (char *)NULL, (char *)NULL,
+                                (char *)NULL, (char *)NULL, (char *)NULL
+diff -u -urN ./libSoXt/src/mtlEdit/SoXtMtlList.c++ ../inventor/libSoXt/src/mtlEdit/SoXtMtlList.c++
+--- ./libSoXt/src/mtlEdit/SoXtMtlList.c++      2002-06-01 04:16:10.000000000 +0200
++++ ../inventor/libSoXt/src/mtlEdit/SoXtMtlList.c++    2005-09-15 11:33:55.000000000 +0200
+@@ -264,7 +264,7 @@
+     setClassName("SoXtMaterialList");
+     if (dir != NULL)
+       materialDir = strdup(dir);
+-    else materialDir = strdup(IVPREFIX "/share/data/materials");
++    else materialDir = strdup(IVPREFIX "/share/openinventor/data/materials");
+ 
+     callbackList = new SoCallbackList;
+     curPalette = -1;
+Binary files ./make/.ivcommonrules.swp and ../inventor/make/.ivcommonrules.swp differ
+diff -u -urN ./make/ivcommondefs ../inventor/make/ivcommondefs
+--- ./make/ivcommondefs        2003-07-12 00:40:54.000000000 +0200
++++ ../inventor/make/ivcommondefs      2005-09-15 11:25:31.000000000 +0200
+@@ -194,9 +194,9 @@
+ IVHDRDIR = $(IVHDRTOP)/$(HDRSUBDIR)
+ IVMAN1DIR = $(IVROOT)/$(IVPREFIX)/man/man1
+ IVMAN3DIR = $(IVROOT)/$(IVPREFIX)/man/man3
+-IVHELPDIR = $(IVROOT)/$(IVPREFIX)/share/help
+-IVDATADIR = $(IVROOT)/$(IVPREFIX)/share/data/models
+-IVDEMODIR = $(IVROOT)/$(IVPREFIX)/demos
++IVHELPDIR = $(IVROOT)/$(IVPREFIX)/share/openinventor/help
++IVDATADIR = $(IVROOT)/$(IVPREFIX)/share/openinventor/data/models
++IVDEMODIR = $(IVROOT)/$(IVPREFIX)/share/openinventor/demos
+ IVDEMOBINDIR = $(IVDEMODIR)/Inventor
+ IVDEMODATADIR = $(IVDEMODIR)/data/Inventor
+ 
diff --git a/media-libs/openinventor/files/no-csh.patch b/media-libs/openinventor/files/no-csh.patch
new file mode 100644 (file)
index 0000000..8135fc4
--- /dev/null
@@ -0,0 +1,43 @@
+--- inventor/doc/man/ivman/makeManDirs.old     2005-09-14 20:48:29.000000000 +0200
++++ inventor/doc/man/ivman/makeManDirs 2005-09-14 20:51:17.000000000 +0200
+@@ -1,4 +1,4 @@
+-#!/bin/csh -f
++#!/bin/bash
+ 
+ #
+ # Prepares command line info to create a man page for the given class name
+@@ -6,23 +6,22 @@
+ # Usage: makeManDirs className
+ #
+ 
+-set nonomatch
+-set toolDir = ../../ivman
+-set className = $1
+-set treeFile = $toolDir/manTree
++toolDir=../../ivman
++className=$1
++treeFile=$toolDir/manTree
+ 
+ # Get the list of derived classes
+-set classes = `grep "^$className " $treeFile`
++classes=$(grep "^$className " $treeFile)
+ 
+ # For each class, find the directory containing the man page. Build
+ # a final list from the {className,dir} pairs.
+-set list = ()
+-foreach class ($classes)
+-    if (-e */$class.ivm) then
+-      set path = `echo */$class.ivm`
+-      set list = ($list $path)
+-    endif
+-end
++list=""
++for class in ${classes}; do
++    if [ -e */$class.ivm ]; then
++      path=$(echo */$class.ivm)
++      list="$list $path"
++    fi
++done
+ 
+ # Print the result
+ echo $list
diff --git a/media-libs/openinventor/files/support-archs.patch b/media-libs/openinventor/files/support-archs.patch
new file mode 100644 (file)
index 0000000..7f9f7a1
--- /dev/null
@@ -0,0 +1,36 @@
+--- inventor/lib/database/include/machine.h.old        2005-08-16 21:42:31.000000000 +0000
++++ inventor/lib/database/include/machine.h    2005-08-16 21:44:31.000000000 +0000
+@@ -140,15 +140,15 @@
+ 
+ 
+ /*
+- * Linux i386/ia64 machine dependent setup
++ * Linux machine dependent setup
+  */
+ 
+-#if __i386__ || __ia64__
++#if __i386__ || __ia64__ || __amd64__ || __alpha__
+ 
+ #define MACHINE_WORD_FORMAT   DGL_LITTLE_ENDIAN
+ #define MACHINE_FLOAT_FORMAT  DGL_NON_IEEE
+ 
+-#endif /* __i386__ || __ia64__ */
++#endif /* __i386__ || __ia64__ || __alpha__ */
+ 
+ 
+ /*
+@@ -321,12 +321,12 @@
+  */
+ 
+ #if MACHINE_FLOAT_FORMAT == DGL_NON_IEEE
+-#if __i386__ || __ia64__
++#if __i386__ || __ia64__ || __amd64__ || __alpha__
+ void mem_hton_float(float *t, float *f);
+ void mem_ntoh_float(float *t, float *f);
+ void mem_hton_double(double *t, double *f);
+ void mem_ntoh_double(double *t, double *f);
+-#endif /* __i386__ || __ia64__ */
++#endif /* __i386__ || __ia64__ || __amd64__ || __alpha__ */
+ #define DGL_HTON_FLOAT(t,f) mem_hton_float(&t,&f)
+ #define DGL_NTOH_FLOAT(t,f) mem_ntoh_float(&t,&f)
+ #define DGL_HTON_DOUBLE(t,f) mem_hton_double(&t,&f)
diff --git a/media-libs/openinventor/files/use-byacc.patch b/media-libs/openinventor/files/use-byacc.patch
new file mode 100644 (file)
index 0000000..be2152d
--- /dev/null
@@ -0,0 +1,39 @@
+diff -u -ur inventor/doc/man/man1/GNUmakefile /var/tmp/portage/openinventor-2.1.5.10/work/inventor/doc/man/man1/GNUmakefile
+--- inventor/doc/man/man1/GNUmakefile  2000-09-18 11:11:13.000000000 +0200
++++ /var/tmp/portage/openinventor-2.1.5.10/work/inventor/doc/man/man1/GNUmakefile      2005-09-14 15:35:20.000000000 +0200
+@@ -11,6 +11,8 @@
+       ivinfo.1 \
+       ivview.1
+ 
+-all install: install_man1
++all:
++
++install: install_man1
+ 
+ include $(IVCOMMONRULES)
+diff -u -ur inventor/doc/man/man3/GNUmakefile /var/tmp/portage/openinventor-2.1.5.10/work/inventor/doc/man/man3/GNUmakefile
+--- inventor/doc/man/man3/GNUmakefile  2000-09-18 11:11:13.000000000 +0200
++++ /var/tmp/portage/openinventor-2.1.5.10/work/inventor/doc/man/man3/GNUmakefile      2005-09-14 15:35:37.000000000 +0200
+@@ -3,7 +3,9 @@
+ 
+ SUBDIRS = ivm
+ 
+-all install:
++all:
++
++install:
+       $(SUBDIRS_MAKERULE)
+ 
+ COMMONPREF = xxx
+diff -u -ur inventor/make/commondefs /var/tmp/portage/openinventor-2.1.5.10/work/inventor/make/commondefs
+--- inventor/make/commondefs   2001-06-16 01:27:00.000000000 +0200
++++ /var/tmp/portage/openinventor-2.1.5.10/work/inventor/make/commondefs       2005-09-14 15:27:17.000000000 +0200
+@@ -65,7 +65,7 @@
+ STRIP = $(TOOLROOT)/usr/bin/strip
+ TAG   = $(TOOLROOT)/usr/sbin/tag
+ TLINK = $(TOOLROOT)/usr/sbin/tlink
+-YACC    = $(TOOLROOTSAFE) $(TOOLROOT)/usr/bin/yacc
++YACC    = $(TOOLROOTSAFE) $(TOOLROOT)/usr/bin/byacc
+ ifeq ($(usingIrix), 1)
+ YACC  += -P $(ROOT)/usr/lib/yaccpar
+ endif
diff --git a/media-libs/openinventor/metadata.xml b/media-libs/openinventor/metadata.xml
new file mode 100644 (file)
index 0000000..6fd9b43
--- /dev/null
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>graphics</herd>
+<maintainer>
+  <email>stefaan@gentoo.org</email>
+  <name>Stefaan De Roeck</name>
+</maintainer>
+<longdescription>
+       OpenInventor is a toolkit written by SGI, that enables you to easily
+       design 3D object drawings, possibly with a user interface on defined
+       them.  It comes with an easy file format, and several useful sample
+       utilities. 
+</longdescription>
+</pkgmetadata>
diff --git a/media-libs/openinventor/openinventor-2.1.5.10.ebuild b/media-libs/openinventor/openinventor-2.1.5.10.ebuild
new file mode 100644 (file)
index 0000000..e2c915f
--- /dev/null
@@ -0,0 +1,82 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-libs/openinventor/openinventor-2.1.5.10.ebuild,v 1.1 2005/09/16 21:49:31 stefaan Exp $
+
+inherit eutils versionator
+
+MY_PV=$(replace_version_separator 3 '-')
+MY_PN="inventor"
+
+DESCRIPTION="SGI OpenInventor Toolkit and Utilities"
+HOMEPAGE="http://oss.sgi.com/projects/inventor/"
+SRC_URI="ftp://oss.sgi.com/projects/${MY_PN}/download/${MY_PN}-${MY_PV}.src.tar.gz"
+
+LICENSE="LGPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~x86"
+IUSE=""
+
+RDEPEND="virtual/x11
+       virtual/opengl
+       virtual/motif
+       >=media-libs/jpeg-6b
+       >=media-libs/freetype-2.0"
+DEPEND="dev-util/byacc
+       ${RDEPEND}"
+
+S="${WORKDIR}/${MY_PN}"
+
+src_unpack() {
+       unpack ${A}
+       cd ${S}
+       # ordinary yacc fails
+       epatch ${FILESDIR}/use-byacc.patch
+       # support for amd64, sparc and alpha
+       epatch ${FILESDIR}/support-archs.patch
+       # freetype2 wasn't enabled by default
+       epatch ${FILESDIR}/freetype2-activate.patch
+       # extra #include statement necessary for freetype2
+       epatch ${FILESDIR}/freetype2-includes.patch
+       # script aiding in manual installation required csh
+       epatch ${FILESDIR}/no-csh.patch
+       # put files in sane places
+       epatch ${FILESDIR}/gentoo-paths.patch
+       # fix compilation with gcc-4
+       epatch ${FILESDIR}/gcc4-support.patch
+}
+
+src_compile() {
+       # VLDOPTS: find libraries during linking of executables
+       # VLDDSOOPTS: find libraries during linking of libraries
+       # VCFLAGS / VCXXFLAGS: pass user-chosen compiler flags
+       # OPTIMIZER: do not override user-chosen compiler flags
+       # system
+       emake \
+               VLDOPTS="-L${S}/lib -L${S}/libSoXt" \
+               VLDDSOOPTS="-L${S}/lib -L${S}/libSoXt" \
+               VCFLAGS="${CFLAGS}" VCXXFLAGS="${CXXFLAGS}" \
+               OPTIMIZER= \
+               || die "Build failed"
+}
+
+src_install() {
+       # IVROOT: serves as DESTDIR
+       # LLDOPTS: delete, so it won't go linking with libraries already on the
+       # system
+       # LD_LIBRARY_PATH: support executables ran during install
+       make \
+               IVROOT="${D}" \
+               LLDOPTS= \
+               LD_LIBRARY_PATH="${D}/usr/lib" \
+               install \
+               || die "Install failed"
+
+       # OpenInventor aliases for TrueType fonts
+       local FONTDIR=/usr/share/fonts/corefonts
+       local ALIASDIR=/usr/share/${PN}/fonts
+       dodir ${ALIASDIR}
+       dosym ${FONTDIR}/times.ttf ${ALIASDIR}/Times-Roman
+       dosym ${FONTDIR}/arial.ttf ${ALIASDIR}/Helvetica
+       dosym ${FONTDIR}/cour.ttf ${ALIASDIR}/Utopia-Regular
+}
+