summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /sci-libs/opencascade
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'sci-libs/opencascade')
-rw-r--r--sci-libs/opencascade/Manifest6
-rw-r--r--sci-libs/opencascade/files/env.sh.template40
-rw-r--r--sci-libs/opencascade/files/opencascade-6.5-fixed-DESTDIR.patch174
-rw-r--r--sci-libs/opencascade/files/opencascade-6.5-ftgl.patch77
-rw-r--r--sci-libs/opencascade/files/opencascade-6.5-tcl8.6.patch46
-rw-r--r--sci-libs/opencascade/files/opencascade-6.5.4-fixed-DESTDIR.patch46
-rw-r--r--sci-libs/opencascade/files/opencascade-6.5.4-fixed-tbb-VERSION.patch10
-rw-r--r--sci-libs/opencascade/files/opencascade-6.5.4-tcl8.6.patch38
-rw-r--r--sci-libs/opencascade/files/opencascade-6.5.5-deprecated-glx-api.patch30
-rw-r--r--sci-libs/opencascade/files/opencascade-6.6.0-deprecated-glx-api.patch50
-rw-r--r--sci-libs/opencascade/files/opencascade-6.6.0-fixed-DESTDIR.patch45
-rw-r--r--sci-libs/opencascade/files/opencascade-6.7.0-fixed-DESTDIR.patch51
-rw-r--r--sci-libs/opencascade/files/opencascade-6.7.1-deprecated-glx-api.patch89
-rw-r--r--sci-libs/opencascade/files/opencascade-6.8.0-fixed-DESTDIR.patch47
-rw-r--r--sci-libs/opencascade/metadata.xml13
-rw-r--r--sci-libs/opencascade/opencascade-6.5.5.ebuild171
-rw-r--r--sci-libs/opencascade/opencascade-6.5.ebuild187
-rw-r--r--sci-libs/opencascade/opencascade-6.6.0.ebuild169
-rw-r--r--sci-libs/opencascade/opencascade-6.7.1.ebuild166
-rw-r--r--sci-libs/opencascade/opencascade-6.8.0.ebuild163
-rw-r--r--sci-libs/opencascade/opencascade-6.9.0.ebuild163
21 files changed, 1781 insertions, 0 deletions
diff --git a/sci-libs/opencascade/Manifest b/sci-libs/opencascade/Manifest
new file mode 100644
index 000000000000..fc426c219883
--- /dev/null
+++ b/sci-libs/opencascade/Manifest
@@ -0,0 +1,6 @@
+DIST OpenCASCADE650.tar.gz 214819922 SHA256 fb95d8a542bbfc26af6186495f752a683b40137b34d6afd8f9bb02730c2436c6 SHA512 ea2c3703e3338584d84fb8e06664e79f5f113a117e94a4eefcf39bac3bcc28d81ace2340c83399ecbe5774c348faa3713e90623f8329562e10700ad7e2048be7 WHIRLPOOL 78e092b9ea892d7686578696bcba67f649b65b8d520f358cf2aac9a2c49baf75ff3717899865d7f752a5577b123f8d0eadce06173e5b1bad3dcf0c31052b09d6
+DIST OpenCASCADE655.tgz 146901035 SHA256 f5c6ab58aeb5c514428ae1b802e2820ca9267d19eecd64776f06baa60098d1b6 SHA512 848057a8a9fd41f1d13c4634c5e3366d37f3b4c81b7b194be9d4e48f5608f0bdfbc8cedd2a466e1724649a04ee87bfd0d1a445be47d832cc12fba5647689ceb2 WHIRLPOOL 18413460491c8a2fd10e97c22dd4b9b4772d97f19d27f59f33faa6618a1aac348877abc3ab9526878b38aba22328986a5c656ac91930cad460d33e93653bb463
+DIST OpenCASCADE660.tgz 119153607 SHA256 e39fa4b2255b9bd9bf97aa122043f4608d97b6b79d922375da53275e42b25d60 SHA512 8ee232f96ad650e55ac1f5fb1fe684b9d8198279dee4d7fd80a569c35562fffa643dd362fed7c5aff79541dbc463acc38b1364d8396c2c92c2d73f4955893866 WHIRLPOOL 29f0eaee2c64e4fb3fbb958e7cd043a2738a9d62414f332b81c65a009a100f39f56c38b20ffad4e76754522bfcbdc915470c84f9c218109650f9fd23d7bb3813
+DIST opencascade-6.7.1.tgz 194568487 SHA256 c918cb554c0c22d322dc1d2f3a31069e1d5dcbae869db741339e1d4903e864b1 SHA512 31df4bd172d51b1ebee7e67075fa9cdbeb73eccb326f428b1911f15c9ac0feedc5977e2490f54a130b409f292dd6bfb7d40143263a47aa0330c28337639fe828 WHIRLPOOL d6fc042a4aca381ce74eaf1ca2adead5b0f88b599176c13ecd7a967f9dd92e4589c73ebde53ee3b374a78f696bacf674eb18a356ffcf38bbc8d7e60b30043fa6
+DIST opencascade-6.8.0.tgz 198319238 SHA256 50b145655fd3a4448e291388650cd0dcab8f9d99201aba32e8d26aeff03e8e1c SHA512 4fa95bc244001fd27ad1248acf44d6fd6633fa21fa2479bbea42977bdc9688b638eaca5df8442120d3e075113a031a7f894d0525a6b54e537cb3363c0a698c8b WHIRLPOOL 5b57de759208668e970ef0f3cf55589ea13d2295bac8d12ee597d7a40be402427c3c67e232d68df5a0f91ed87c9f7157faa717490f774e8431910d8223c49bf1
+DIST opencascade-6.9.0.tgz 203915299 SHA256 e9da098b304f6b65c3958947c3c687f00128ce020b67d97554a3e3be9cf3d090 SHA512 79c7f715087ca627447a1cfd0b19a216150d71865f53f791978842ca9663181c5b608d93a7dc81945ad0dba287ea003cfa3ff47ebae07602a8fd38e6e1344aee WHIRLPOOL ab3bf2d1e369f87501bc5f3f63c092b6586a76b56443179e542fc2c1b10e9d504429c60096b7bd555c578ba54212693d4b495f34bb9045c3e1fb519b1d480538
diff --git a/sci-libs/opencascade/files/env.sh.template b/sci-libs/opencascade/files/env.sh.template
new file mode 100644
index 000000000000..146c86ba6d8c
--- /dev/null
+++ b/sci-libs/opencascade/files/env.sh.template
@@ -0,0 +1,40 @@
+#!/bin/sh -f
+
+export CASROOT=VAR_CASROOT
+
+if [ -z "PATH" ];
+then PATH=VAR_CASROOT/Linux/bin;
+else PATH=VAR_CASROOT/Linux/bin:$PATH;
+fi
+export PATH
+if [ -z "LD_LIBRARY_PATH" ];
+then LD_LIBRARY_PATH=VAR_CASROOT/Linux/lib;
+else LD_LIBRARY_PATH=VAR_CASROOT/Linux/lib:$LD_LIBRARY_PATH;
+fi
+export LD_LIBRARY_PATH
+export CSF_MDTVFontDirectory=VAR_CASROOT/src/FontMFT
+export CSF_LANGUAGE=us
+export MMGT_CLEAR=1
+export CSF_EXCEPTION_PROMPT=1
+export CSF_SHMessage=VAR_CASROOT/src/SHMessage
+export CSF_MDTVTexturesDirectory=VAR_CASROOT/src/Textures
+export CSF_XSMessage=VAR_CASROOT/src/XSMessage
+export CSF_StandardDefaults=VAR_CASROOT/src/StdResource
+export CSF_PluginDefaults=VAR_CASROOT/src/StdResource
+export CSF_XCAFDefaults=VAR_CASROOT/src/StdResource
+export CSF_StandardLiteDefaults=VAR_CASROOT/src/StdResource
+export CSF_GraphicShr=VAR_CASROOT/Linux/lib/libTKOpenGl.so
+export CSF_UnitsLexicon=VAR_CASROOT/src/UnitsAPI/Lexi_Expr.dat
+export CSF_UnitsDefinition=VAR_CASROOT/src/UnitsAPI/Units.dat
+export CSF_IGESDefaults=VAR_CASROOT/src/XSTEPResource
+export CSF_STEPDefaults=VAR_CASROOT/src/XSTEPResource
+export CSF_XmlOcafResource=VAR_CASROOT/src/XmlOcafResource
+export CSF_MIGRATION_TYPES=VAR_CASROOT/src/StdResource/MigrationSheet.txt
+
+export TCLHOME=VAR_SYS_BIN
+export TCLLIBPATH=VAR_SYS_LIB
+export ITK_LIBRARY=VAR_SYS_LIB/VAR_ITK
+export ITCL_LIBRARY=VAR_SYS_LIB/VAR_ITCL
+export TIX_LIBRARY=VAR_SYS_LIB/VAR_TIX
+export TK_LIBRARY=VAR_SYS_LIB/VAR_TK
+export TCL_LIBRARY=VAR_SYS_LIB/VAR_TCL
diff --git a/sci-libs/opencascade/files/opencascade-6.5-fixed-DESTDIR.patch b/sci-libs/opencascade/files/opencascade-6.5-fixed-DESTDIR.patch
new file mode 100644
index 000000000000..ea0f9b6f166f
--- /dev/null
+++ b/sci-libs/opencascade/files/opencascade-6.5-fixed-DESTDIR.patch
@@ -0,0 +1,174 @@
+diff -urN opencascade.orig/ros/Makefile.am opencascade/ros/Makefile.am
+--- opencascade.orig/ros/Makefile.am 2011-03-06 16:08:59.000000000 +0100
++++ opencascade/ros/Makefile.am 2011-03-06 16:13:35.000000000 +0100
+@@ -86,106 +86,106 @@
+ dir_SunOS=sun
+
+ install-exec-local:
+- $(INSTALL) -d $(prefix)/$(platform)
+- if [ -e $(prefix)/bin -a ! -e $(prefix)/$(platform)/bin ]; then \
+- cd $(prefix)/$(platform) && ln -s ../bin bin; \
++ $(INSTALL) -d $(DESTDIR)$(prefix)/$(platform)
++ if [ -e $(DESTDIR)$(prefix)/bin -a ! -e $(DESTDIR)$(prefix)/$(platform)/bin ]; then \
++ cd $(DESTDIR)$(prefix)/$(platform) && ln -s ../bin bin; \
+ fi
+- if [ -e $(prefix)/lib -a ! -e $(prefix)/$(platform)/lib ]; then \
+- cd $(prefix)/$(platform) && ln -s ../lib lib; \
++ if [ -e $(DESTDIR)$(prefix)/lib -a ! -e $(DESTDIR)$(prefix)/$(platform)/lib ]; then \
++ cd $(DESTDIR)$(prefix)/$(platform) && ln -s ../lib lib; \
+ fi
+- $(INSTALL) -d $(prefix)/$(dir_$(platform))
+- if [ -e $(prefix)/bin -a ! -e $(prefix)/$(dir_$(platform))/bin ]; then \
+- cd $(prefix)/$(dir_$(platform)) && ln -s ../bin bin; \
++ $(INSTALL) -d $(DESTDIR)$(prefix)/$(dir_$(platform))
++ if [ -e $(DESTDIR)$(prefix)/bin -a ! -e $(DESTDIR)$(prefix)/$(dir_$(platform))/bin ]; then \
++ cd $(DESTDIR)$(prefix)/$(dir_$(platform)) && ln -s ../bin bin; \
+ fi
+- if [ -e $(prefix)/lib -a ! -e $(prefix)/$(dir_$(platform))/lib ]; then \
+- cd $(prefix)/$(dir_$(platform)) && ln -s ../lib lib; \
++ if [ -e $(DESTDIR)$(prefix)/lib -a ! -e $(DESTDIR)$(prefix)/$(dir_$(platform))/lib ]; then \
++ cd $(DESTDIR)$(prefix)/$(dir_$(platform)) && ln -s ../lib lib; \
+ fi
+- bd=`pwd`; cd $(top_srcdir); sd=`pwd`; cd $(prefix); pd=`pwd`; cd $$bd; \
++ bd=`pwd`; cd $(top_srcdir); sd=`pwd`; cd $(DESTDIR)$(prefix); pd=`pwd`; cd $$bd; \
+ if [ "$$pd" != "$$sd" ]; then \
+- $(INSTALL) -d $(prefix)/inc; \
+- cp -fr$(CP_$(platform)) $(top_srcdir)/inc $(prefix); \
++ $(INSTALL) -d $(DESTDIR)$(prefix)/inc; \
++ cp -fr$(CP_$(platform)) $(top_srcdir)/inc $(DESTDIR)$(prefix); \
+ fi; \
+ if [ "$$pd" != "$$bd" ]; then \
+- cp -fr$(CP_$(platform)) $$bd/config.h $(prefix); \
++ cp -fr$(CP_$(platform)) $$bd/config.h $(DESTDIR)$(prefix); \
+ fi
+- if [ -e $(prefix)/inc/config.h ]; then \
+- unlink $(prefix)/inc/config.h; \
++ if [ -e $(DESTDIR)$(prefix)/inc/config.h ]; then \
++ unlink $(DESTDIR)$(prefix)/inc/config.h; \
+ fi
+- cd $(prefix)/inc && ln -s ../config.h config.h
+- bd=`pwd`; cd $(top_srcdir); sd=`pwd`; cd $(prefix); pd=`pwd`; cd $$bd; \
++ cd $(DESTDIR)$(prefix)/inc && ln -s ../config.h config.h
++ bd=`pwd`; cd $(top_srcdir); sd=`pwd`; cd $(DESTDIR)$(prefix); pd=`pwd`; cd $$bd; \
+ if [ "$$pd" != "$$sd" -a -d $(top_srcdir)/src/UnitsAPI ]; then \
+- $(INSTALL) -d $(prefix)/src; \
+- $(INSTALL) -d $(prefix)/src/UnitsAPI; \
+- cp -fr$(CP_$(platform)) $(top_srcdir)/src/UnitsAPI $(prefix)/src; \
+- cp -f$(CP_$(platform)) $(top_srcdir)/env_DRAW.sh $(prefix); \
++ $(INSTALL) -d $(DESTDIR)$(prefix)/src; \
++ $(INSTALL) -d $(DESTDIR)$(prefix)/src/UnitsAPI; \
++ cp -fr$(CP_$(platform)) $(top_srcdir)/src/UnitsAPI $(DESTDIR)$(prefix)/src; \
++ cp -f$(CP_$(platform)) $(top_srcdir)/env_DRAW.sh $(DESTDIR)$(prefix); \
+ fi
+- bd=`pwd`; cd $(top_srcdir); sd=`pwd`; cd $(prefix); pd=`pwd`; cd $$bd; \
++ bd=`pwd`; cd $(top_srcdir); sd=`pwd`; cd $(DESTDIR)$(prefix); pd=`pwd`; cd $$bd; \
+ if [ "$$pd" != "$$sd" ]; then \
+ inst_dirs="$(FoundationClasses_DIRS)"; \
+ if test "x$(FoundationClasses_DIRS)" != "x"; then \
+ for d in $$inst_dirs; do \
+- $(INSTALL) -d $(prefix)/src/$$d; \
+- cp -fr$(CP_$(platform)) $(top_srcdir)/src/$$d $(prefix)/src; \
++ $(INSTALL) -d $(DESTDIR)$(prefix)/src/$$d; \
++ cp -fr$(CP_$(platform)) $(top_srcdir)/src/$$d $(DESTDIR)$(prefix)/src; \
+ done; \
+ fi; \
+ fi
+- bd=`pwd`; cd $(top_srcdir); sd=`pwd`; cd $(prefix); pd=`pwd`; cd $$bd; \
++ bd=`pwd`; cd $(top_srcdir); sd=`pwd`; cd $(DESTDIR)$(prefix); pd=`pwd`; cd $$bd; \
+ if [ "$$pd" != "$$sd" ]; then \
+ inst_dirs="$(ModelingData_DIRS)"; \
+ if test "x$(ModelingData_DIRS)" != "x"; then \
+ for d in $$inst_dirs; do \
+- $(INSTALL) -d $(prefix)/src/$$d; \
+- cp -fr$(CP_$(platform)) $(top_srcdir)/src/$$d $(prefix)/src; \
++ $(INSTALL) -d $(DESTDIR)$(prefix)/src/$$d; \
++ cp -fr$(CP_$(platform)) $(top_srcdir)/src/$$d $(DESTDIR)$(prefix)/src; \
+ done; \
+ fi; \
+ fi
+- bd=`pwd`; cd $(top_srcdir); sd=`pwd`; cd $(prefix); pd=`pwd`; cd $$bd; \
++ bd=`pwd`; cd $(top_srcdir); sd=`pwd`; cd $(DESTDIR)$(prefix); pd=`pwd`; cd $$bd; \
+ if [ "$$pd" != "$$sd" ]; then \
+ inst_dirs="$(ModelingAlgorithms_DIRS)"; \
+ if test "x$(ModelingAlgorithms_DIRS)" != "x"; then \
+ for d in $$inst_dirs; do \
+- $(INSTALL) -d $(prefix)/src/$$d; \
+- cp -fr$(CP_$(platform)) $(top_srcdir)/src/$$d $(prefix)/src; \
++ $(INSTALL) -d $(DESTDIR)$(prefix)/src/$$d; \
++ cp -fr$(CP_$(platform)) $(top_srcdir)/src/$$d $(DESTDIR)$(prefix)/src; \
+ done; \
+ fi; \
+ fi
+- bd=`pwd`; cd $(top_srcdir); sd=`pwd`; cd $(prefix); pd=`pwd`; cd $$bd; \
++ bd=`pwd`; cd $(top_srcdir); sd=`pwd`; cd $(DESTDIR)$(prefix); pd=`pwd`; cd $$bd; \
+ if [ "$$pd" != "$$sd" ]; then \
+ inst_dirs="$(Visualization_DIRS)"; \
+ if test "x$(Visualization_DIRS)" != "x"; then \
+ for d in $$inst_dirs; do \
+- $(INSTALL) -d $(prefix)/src/$$d; \
+- cp -fr$(CP_$(platform)) $(top_srcdir)/src/$$d $(prefix)/src; \
++ $(INSTALL) -d $(DESTDIR)$(prefix)/src/$$d; \
++ cp -fr$(CP_$(platform)) $(top_srcdir)/src/$$d $(DESTDIR)$(prefix)/src; \
+ done; \
+ fi; \
+ fi
+- bd=`pwd`; cd $(top_srcdir); sd=`pwd`; cd $(prefix); pd=`pwd`; cd $$bd; \
++ bd=`pwd`; cd $(top_srcdir); sd=`pwd`; cd $(DESTDIR)$(prefix); pd=`pwd`; cd $$bd; \
+ if [ "$$pd" != "$$sd" ]; then \
+ inst_dirs="$(ApplicationFramework_DIRS)"; \
+ if test "x$(ApplicationFramework_DIRS)" != "x"; then \
+ for d in $$inst_dirs; do \
+- $(INSTALL) -d $(prefix)/src/$$d; \
+- cp -fr$(CP_$(platform)) $(top_srcdir)/src/$$d $(prefix)/src; \
++ $(INSTALL) -d $(DESTDIR)$(prefix)/src/$$d; \
++ cp -fr$(CP_$(platform)) $(top_srcdir)/src/$$d $(DESTDIR)$(prefix)/src; \
+ done; \
+ fi; \
+ fi
+- bd=`pwd`; cd $(top_srcdir); sd=`pwd`; cd $(prefix); pd=`pwd`; cd $$bd; \
++ bd=`pwd`; cd $(top_srcdir); sd=`pwd`; cd $(DESTDIR)$(prefix); pd=`pwd`; cd $$bd; \
+ if [ "$$pd" != "$$sd" ]; then \
+ inst_dirs="$(DataExchange_DIRS)"; \
+ if test "x$(DataExchange_DIRS)" != "x"; then \
+ for d in $$inst_dirs; do \
+- $(INSTALL) -d $(prefix)/src/$$d; \
+- cp -fr$(CP_$(platform)) $(top_srcdir)/src/$$d $(prefix)/src; \
++ $(INSTALL) -d $(DESTDIR)$(prefix)/src/$$d; \
++ cp -fr$(CP_$(platform)) $(top_srcdir)/src/$$d $(DESTDIR)$(prefix)/src; \
+ done; \
+ fi; \
+ fi
+- bd=`pwd`; cd $(top_srcdir); sd=`pwd`; cd $(prefix); pd=`pwd`; cd $$bd; \
++ bd=`pwd`; cd $(top_srcdir); sd=`pwd`; cd $(DESTDIR)$(prefix); pd=`pwd`; cd $$bd; \
+ if [ "$$pd" != "$$sd" ]; then \
+ inst_dirs="$(Draw_DIRS)"; \
+ if test "x$(Draw_DIRS)" != "x"; then \
+ for d in $$inst_dirs; do \
+- $(INSTALL) -d $(prefix)/src/$$d; \
+- cp -fr$(CP_$(platform)) $(top_srcdir)/src/$$d $(prefix)/src; \
++ $(INSTALL) -d $(DESTDIR)$(prefix)/src/$$d; \
++ cp -fr$(CP_$(platform)) $(top_srcdir)/src/$$d $(DESTDIR)$(prefix)/src; \
+ done; \
+ fi; \
+ fi
+diff -urN opencascade.orig/ros/configure.in opencascade/ros/configure.in
+--- opencascade/ros/configure.in.orig 2011-03-06 19:36:08.000000000 +0100
++++ opencascade/ros/configure.in 2011-03-06 22:24:04.000000000 +0100
+@@ -422,7 +422,7 @@
+ HAVE_FTGL=yes
+ HAVE_FTGL_INC=yes
+ CPPFLAGS="-I$ftgl/include $CPPFLAGS";
+- AC_CHECK_HEADER( [FTGL/FTGL.h], [], [HAVE_FTGL_INC=no] )
++ AC_CHECK_HEADER( [FTGL/ftgl.h], [], [HAVE_FTGL_INC=no] )
+ if test "x$HAVE_FTGL_INC" = "xyes"; then
+ CSF_FTGL_INCLUDES="-I$ftgl/include/FTGL"
+ HAVE_FTGL_LIB=yes
+@@ -433,7 +433,7 @@
+ #we have problem with unresolved symbols on 64 stations
+ CSF_FTGL_LIB="-L$ftgl/lib -lftgl"
+ AC_TRY_LINK([
+-#include <FTGL/FTGL.h>
++#include <FTGL/ftgl.h>
+ #include <FTGL/FTGLTextureFont.h>
+ ], [
+ FTGLTextureFont font("");], [
diff --git a/sci-libs/opencascade/files/opencascade-6.5-ftgl.patch b/sci-libs/opencascade/files/opencascade-6.5-ftgl.patch
new file mode 100644
index 000000000000..b2729f4f403b
--- /dev/null
+++ b/sci-libs/opencascade/files/opencascade-6.5-ftgl.patch
@@ -0,0 +1,77 @@
+--- opencascade/ros/src/OpenGl/OpenGl_FontMgr.cxx.orig 2011-03-06 21:55:55.000000000 +0100
++++ opencascade/ros/src/OpenGl/OpenGl_FontMgr.cxx 2011-03-06 23:06:05.000000000 +0100
+@@ -1,8 +1,9 @@
+ #include <OpenGl_FontMgr.hxx>
+
+-#include <FTGLTextureFont.h>
+-#include <FTLibrary.h>
+-#include <FTFace.h>
++#include <ftgl.h>
++// #include <FTGLTextureFont.h>
++// #include <FTLibrary.h>
++// #include <FTFace.h>
+ #include <Standard_Stream.hxx>
+
+ #undef TRACE
+@@ -71,10 +72,29 @@
+ if ( it.Value()->FontAspect() == OSD_FA_Regular ) {
+ //this workaround for fonts with names dependent on system locale.
+ //for example: "Times New Roman Fett Kursive" or "Times New Roman Gras Italiqui"
+- FTFace face(it.Value()->FontPath()->ToCString());
++// FTFace face(it.Value()->FontPath()->ToCString());
++
++ FT_Library* library = new FT_Library;
++ FT_Error ftErrLib = FT_Init_FreeType( library);
++
++ const FT_Long DEFAULT_FACE_INDEX = 0;
++ FT_Face* ftFace = new FT_Face;
++
++ FT_Error err = FT_New_Face( (*library), it.Value()->FontPath()->ToCString(), DEFAULT_FACE_INDEX, ftFace);
++
++// if( err)
++// {
++// delete ftFace;
++// ftFace = 0;
++// }
++// else
++// {
++// numGlyphs = (*ftFace)->num_glyphs;
++// hasKerningTable = FT_HAS_KERNING((*ftFace));
++// }
+
+- if ( face.Error() == FT_Err_Ok ) {
+- if ( (*face.Face())->style_flags == 0 ) {
++ if ( err == FT_Err_Ok ) {
++ if ( (*ftFace)->style_flags == 0 ) {
+ info->SysFont = it.Value();
+ }
+ else {
+@@ -82,22 +102,22 @@
+ #ifdef TRACE
+ cout << "TKOpenGl::initializeFontDB() detected new font!\n"
+ << "\tFont Previous Name: " << it.Value()->FontName()->ToCString() << endl
+- << "\tFont New Name: " << (*face.Face())->family_name << endl
+- << "\tFont Aspect: " << (*face.Face())->style_flags << endl;
++ << "\tFont New Name: " << (*ftFace)->family_name << endl
++ << "\tFont Aspect: " << (*ftFace)->style_flags << endl;
+ #endif
+ OSD_FontAspect aspect = OSD_FA_Regular;
+- if ( (*face.Face())->style_flags == (FT_STYLE_FLAG_ITALIC | FT_STYLE_FLAG_BOLD) )
++ if ( (*ftFace)->style_flags == (FT_STYLE_FLAG_ITALIC | FT_STYLE_FLAG_BOLD) )
+ aspect = OSD_FA_BoldItalic;
+- else if ( (*face.Face())->style_flags == FT_STYLE_FLAG_ITALIC )
++ else if ( (*ftFace)->style_flags == FT_STYLE_FLAG_ITALIC )
+ aspect = OSD_FA_Italic;
+- else if ( (*face.Face())->style_flags == FT_STYLE_FLAG_BOLD )
++ else if ( (*ftFace)->style_flags == FT_STYLE_FLAG_BOLD )
+ aspect = OSD_FA_Bold;
+
+ #ifdef TRACE
+ cout << "\tOSD_FontAspect: " << aspect << endl;
+ #endif
+ Handle(TCollection_HAsciiString) aFontName =
+- new TCollection_HAsciiString( (*face.Face())->family_name );
++ new TCollection_HAsciiString( (*ftFace)->family_name );
+ info->SysFont = new OSD_SystemFont( aFontName, aspect, it.Value()->FontPath() );
+ }
+ }
diff --git a/sci-libs/opencascade/files/opencascade-6.5-tcl8.6.patch b/sci-libs/opencascade/files/opencascade-6.5-tcl8.6.patch
new file mode 100644
index 000000000000..f8b20f94887d
--- /dev/null
+++ b/sci-libs/opencascade/files/opencascade-6.5-tcl8.6.patch
@@ -0,0 +1,46 @@
+Fix build failure with tcl 8.6
+
+With this patch, opencascade still builds with tcl 8.5.
+
+Submitted upstream: http://www.opencascade.org/org/forum/thread_20125/
+
+Index: opencascade/ros/src/Draw/Draw_Window.cxx
+===================================================================
+--- opencascade.orig/ros/src/Draw/Draw_Window.cxx
++++ opencascade/ros/src/Draw/Draw_Window.cxx
+@@ -70,7 +70,7 @@
+ errChannel = Tcl_GetStdChannel(TCL_STDERR);
+ if (code != TCL_OK) {
+ if (errChannel) {
+- Tcl_Write(errChannel, Interp->result, -1);
++ Tcl_Write(errChannel, Tcl_GetStringResult(Interp), -1);
+ Tcl_Write(errChannel, "\n", 1);
+ }
+ Tcl_AddErrorInfo(Interp,
+@@ -1044,7 +1044,7 @@
+ mainWindow =
+ Tk_MainWindow(interp) ;
+ if (mainWindow == NULL) {
+- fprintf(stderr, "%s\n", interp->result);
++ fprintf(stderr, "%s\n", Tcl_GetStringResult(interp));
+ exit(1);
+ }
+ Tk_Name(mainWindow) =
+@@ -2064,7 +2064,7 @@
+ OCC_CATCH_SIGNALS
+ Standard_Integer res = Tk_Init(interp) ;
+ if (res != TCL_OK)
+- cout << "tkLoop: error in Tk initialization. Tcl reported: " << interp->result << endl;
++ cout << "tkLoop: error in Tk initialization. Tcl reported: " << Tcl_GetStringResult(interp) << endl;
+
+ } catch (Standard_Failure) {
+ cout <<"tkLoop: exception in TK_Init "<<endl;
+@@ -2074,7 +2074,7 @@
+ mainWindow =
+ Tk_MainWindow(interp) ;
+ if (mainWindow == NULL) {
+- fprintf(stderr, "%s\n", interp->result);
++ fprintf(stderr, "%s\n", Tcl_GetStringResult(interp));
+ cout << "tkLoop: Tk_MainWindow() returned NULL. Exiting..." << endl;
+ Tcl_Exit(0);
+ }
diff --git a/sci-libs/opencascade/files/opencascade-6.5.4-fixed-DESTDIR.patch b/sci-libs/opencascade/files/opencascade-6.5.4-fixed-DESTDIR.patch
new file mode 100644
index 000000000000..15a9fa607216
--- /dev/null
+++ b/sci-libs/opencascade/files/opencascade-6.5.4-fixed-DESTDIR.patch
@@ -0,0 +1,46 @@
+--- opencascade-6.5.4/Makefile.am
++++ opencascade-6.5.4/Makefile.am
+@@ -82,27 +82,27 @@
+ cd $(top_builddir)/adm/make && $(MAKE) $(AM_MAKEFLAGS) Draw
+
+ install-exec-local:
+- $(INSTALL) -d $(prefix)/$(platform)
+- if [ -e $(prefix)/bin -a ! -e $(prefix)/$(platform)/bin ]; then \
+- cd $(prefix)/$(platform) && ln -s ../bin bin; \
++ $(INSTALL) -d $(DESTDIR)$(prefix)/$(platform)
++ if [ -e $(DESTDIR)$(prefix)/bin -a ! -e $(DESTDIR)$(prefix)/$(platform)/bin ]; then \
++ cd $(DESTDIR)$(prefix)/$(platform) && ln -s ../bin bin; \
+ fi
+- if [ -e $(prefix)/lib -a ! -e $(prefix)/$(platform)/lib ]; then \
+- cd $(prefix)/$(platform) && ln -s ../lib lib; \
++ if [ -e $(DESTDIR)$(prefix)/lib -a ! -e $(DESTDIR)$(prefix)/$(platform)/lib ]; then \
++ cd $(DESTDIR)$(prefix)/$(platform) && ln -s ../lib lib; \
+ fi
+- buildd=`pwd`; cd $(top_srcdir); sourced=`pwd`; cd $(prefix); installd=`pwd`; cd $$buildd; \
++ buildd=`pwd`; cd $(top_srcdir); sourced=`pwd`; cd $(DESTDIR)$(prefix); installd=`pwd`; cd $$buildd; \
+ if [ "$$installd" != "$$sourced" ]; then \
+- $(INSTALL) -d $(prefix)/inc; \
+- cp -frL $(top_srcdir)/inc $(prefix); \
+- cp -frL $$buildd/config.h $(prefix); \
++ $(INSTALL) -d $(DESTDIR)$(prefix)/inc; \
++ cp -frL $(top_srcdir)/inc $(DESTDIR)$(prefix); \
++ cp -frL $$buildd/config.h $(DESTDIR)$(prefix); \
+ for d in $(FoundationClasses_DIRS) $(ModelingData_DIRS) $(ModelingAlgorithms_DIRS) $(Visualization_DIRS) $(ApplicationFramework_DIRS) $(DataExchange_DIRS) $(Draw_DIRS); do \
+- $(INSTALL) -d $(prefix)/src/$$d; \
+- cp -frL $(top_srcdir)/src/$$d $(prefix)/src; \
++ $(INSTALL) -d $(DESTDIR)$(prefix)/src/$$d; \
++ cp -frL $(top_srcdir)/src/$$d $(DESTDIR)$(prefix)/src; \
+ done; \
+ fi
+- if [ -e $(prefix)/inc/config.h ]; then \
+- unlink $(prefix)/inc/config.h; \
++ if [ -e $(DESTDIR)$(prefix)/inc/config.h ]; then \
++ unlink $(DESTDIR)$(prefix)/inc/config.h; \
+ fi
+- cd $(prefix)/inc && ln -s ../config.h config.h
+- cd $(top_srcdir) && cp *.sh $(prefix)
++ cd $(DESTDIR)$(prefix)/inc && ln -s ../config.h config.h
++ cd $(top_srcdir) && cp *.sh $(DESTDIR)$(prefix)
+
+ .PHONY: FoundationClasses ModelingData ModelingAlgorithms Visualization ApplicationFramework DataExchange Draw
+\ Brak znaku nowej linii na końcu pliku
diff --git a/sci-libs/opencascade/files/opencascade-6.5.4-fixed-tbb-VERSION.patch b/sci-libs/opencascade/files/opencascade-6.5.4-fixed-tbb-VERSION.patch
new file mode 100644
index 000000000000..88b13acd21c4
--- /dev/null
+++ b/sci-libs/opencascade/files/opencascade-6.5.4-fixed-tbb-VERSION.patch
@@ -0,0 +1,10 @@
+--- src/Standard/Standard_MMgrTBBalloc.cxx
++++ src/Standard/Standard_MMgrTBBalloc.cxx
+@@ -12,6 +12,7 @@
+
+ // paralleling with Intel TBB
+ #ifdef HAVE_TBB
++#undef VERSION
+ #include <tbb/scalable_allocator.h>
+ using namespace tbb;
+ #else
diff --git a/sci-libs/opencascade/files/opencascade-6.5.4-tcl8.6.patch b/sci-libs/opencascade/files/opencascade-6.5.4-tcl8.6.patch
new file mode 100644
index 000000000000..28c3a11afdf9
--- /dev/null
+++ b/sci-libs/opencascade/files/opencascade-6.5.4-tcl8.6.patch
@@ -0,0 +1,38 @@
+--- ros/src/Draw/Draw_Window.cxx.orig 2013-01-10 23:40:07.279470692 +0100
++++ ros/src/Draw/Draw_Window.cxx 2013-01-10 23:45:00.498784426 +0100
+@@ -84,7 +84,7 @@
+ errChannel = Tcl_GetStdChannel(TCL_STDERR);
+ if (code != TCL_OK) {
+ if (errChannel) {
+- Tcl_Write(errChannel, Interp->result, -1);
++ Tcl_Write(errChannel, Tcl_GetStringResult(Interp), -1);
+ Tcl_Write(errChannel, "\n", 1);
+ }
+ Tcl_AddErrorInfo(Interp,
+@@ -1055,7 +1055,7 @@
+ mainWindow =
+ Tk_MainWindow(interp) ;
+ if (mainWindow == NULL) {
+- fprintf(stderr, "%s\n", interp->result);
++ fprintf(stderr, "%s\n", Tcl_GetStringResult(interp));
+ exit(1);
+ }
+ Tk_Name(mainWindow) =
+@@ -2061,7 +2061,7 @@
+ Standard_Integer res = Tk_Init (interp);
+ if (res != TCL_OK)
+ {
+- cout << "tkLoop: error in Tk initialization. Tcl reported: " << interp->result << endl;
++ cout << "tkLoop: error in Tk initialization. Tcl reported: " << Tcl_GetStringResult(interp) << endl;
+ }
+ }
+ catch (Standard_Failure)
+@@ -2072,7 +2072,7 @@
+ mainWindow = Tk_MainWindow (interp);
+ if (mainWindow == NULL)
+ {
+- fprintf (stderr, "%s\n", interp->result);
++ fprintf (stderr, "%s\n", Tcl_GetStringResult(interp));
+ cout << "tkLoop: Tk_MainWindow() returned NULL. Exiting...\n";
+ Tcl_Exit (0);
+ } \ No newline at end of file
diff --git a/sci-libs/opencascade/files/opencascade-6.5.5-deprecated-glx-api.patch b/sci-libs/opencascade/files/opencascade-6.5.5-deprecated-glx-api.patch
new file mode 100644
index 000000000000..930b73484fee
--- /dev/null
+++ b/sci-libs/opencascade/files/opencascade-6.5.5-deprecated-glx-api.patch
@@ -0,0 +1,30 @@
+--- opencascade-6.5.5/ros/inc/InterfaceGraphic_X11.hxx
++++ opencascade-6.5.5/ros/inc/InterfaceGraphic_X11.hxx
+@@ -25,6 +25,7 @@
+ # include <X11/Xlib.h>
+ # include <X11/Xutil.h>
+ # include <X11/Xatom.h>
++#define GLX_GLXEXT_LEGACY
+ # include <GL/glx.h>
+
+ # if defined (sun) || defined (SUNOS) || defined (__alpha) || defined (DECOSF1) || defined (sgi) || defined (IRIX) || defined (__hpux)|| defined (HPUX)
+--- opencascade-6.5.5/ros/src/InterfaceGraphic/InterfaceGraphic_X11.hxx
++++ opencascade-6.5.5/ros/src/InterfaceGraphic/InterfaceGraphic_X11.hxx
+@@ -25,6 +25,7 @@
+ # include <X11/Xlib.h>
+ # include <X11/Xutil.h>
+ # include <X11/Xatom.h>
++#define GLX_GLXEXT_LEGACY
+ # include <GL/glx.h>
+
+ # if defined (sun) || defined (SUNOS) || defined (__alpha) || defined (DECOSF1) || defined (sgi) || defined (IRIX) || defined (__hpux)|| defined (HPUX)
+--- opencascade-6.5.5/ros/src/OpenGl/OpenGl_Context.cxx
++++ opencascade-6.5.5/ros/src/OpenGl/OpenGl_Context.cxx
+@@ -38,6 +38,7 @@
+ #elif defined(__APPLE__) && !defined(MACOSX_USE_GLX)
+ #include <dlfcn.h>
+ #else
++ #define GLX_GLXEXT_LEGACY
+ #include <GL/glx.h> // glXGetProcAddress()
+ #endif
+
diff --git a/sci-libs/opencascade/files/opencascade-6.6.0-deprecated-glx-api.patch b/sci-libs/opencascade/files/opencascade-6.6.0-deprecated-glx-api.patch
new file mode 100644
index 000000000000..d3ae6ae7f4c4
--- /dev/null
+++ b/sci-libs/opencascade/files/opencascade-6.6.0-deprecated-glx-api.patch
@@ -0,0 +1,50 @@
+--- opencascade-6.6.0/ros/inc/InterfaceGraphic_X11.hxx
++++ opencascade-6.6.0/ros/inc/InterfaceGraphic_X11.hxx
+@@ -25,6 +25,7 @@
+ # include <X11/Xlib.h>
+ # include <X11/Xutil.h>
+ # include <X11/Xatom.h>
++#define GLX_GLXEXT_LEGACY
+ # include <GL/glx.h>
+
+ # if defined (sun) || defined (SUNOS) || defined (__alpha) || defined (DECOSF1) || defined (sgi) || defined (IRIX) || defined (__hpux)|| defined (HPUX)
+--- opencascade-6.6.0/ros/samples/qt/Common/src/View.cxx
++++ opencascade-6.6.0/ros/samples/qt/Common/src/View.cxx
+@@ -25,6 +25,7 @@
+ #include <Cocoa_Window.hxx>
+ #else
+ #include <QX11Info>
++#define GLX_GLXEXT_LEGACY
+ #include <GL/glx.h>
+ #include <X11/Xutil.h>
+ #include <X11/Xatom.h>
+--- opencascade-6.6.0/ros/src/InterfaceGraphic/InterfaceGraphic_X11.hxx
++++ opencascade-6.6.0/ros/src/InterfaceGraphic/InterfaceGraphic_X11.hxx
+@@ -25,6 +25,7 @@
+ # include <X11/Xlib.h>
+ # include <X11/Xutil.h>
+ # include <X11/Xatom.h>
++#define GLX_GLXEXT_LEGACY
+ # include <GL/glx.h>
+
+ # if defined (sun) || defined (SUNOS) || defined (__alpha) || defined (DECOSF1) || defined (sgi) || defined (IRIX) || defined (__hpux)|| defined (HPUX)
+--- opencascade-6.6.0/ros/src/OpenGl/OpenGl_Context.cxx
++++ opencascade-6.6.0/ros/src/OpenGl/OpenGl_Context.cxx
+@@ -39,6 +39,7 @@
+ #elif defined(__APPLE__) && !defined(MACOSX_USE_GLX)
+ #include <dlfcn.h>
+ #else
++ #define GLX_GLXEXT_LEGACY
+ #include <GL/glx.h> // glXGetProcAddress()
+ #endif
+
+--- opencascade-6.6.0/ros/src/Xw/Xw_Window.cxx
++++ opencascade-6.6.0/ros/src/Xw/Xw_Window.cxx
+@@ -24,6 +24,7 @@
+ #include <Aspect_Convert.hxx>
+ #include <Aspect_WindowDefinitionError.hxx>
+
++#define GLX_GLXEXT_LEGACY
+ #include <GL/glx.h>
+
+ namespace
diff --git a/sci-libs/opencascade/files/opencascade-6.6.0-fixed-DESTDIR.patch b/sci-libs/opencascade/files/opencascade-6.6.0-fixed-DESTDIR.patch
new file mode 100644
index 000000000000..54143db4d491
--- /dev/null
+++ b/sci-libs/opencascade/files/opencascade-6.6.0-fixed-DESTDIR.patch
@@ -0,0 +1,45 @@
+--- opencascade-6.6.0/Makefile.am
++++ opencascade-6.6.0/Makefile.am
+@@ -82,27 +82,27 @@
+ cd $(top_builddir)/adm/lin/amk && $(MAKE) $(AM_MAKEFLAGS) Draw
+
+ install-exec-local:
+- $(INSTALL) -d $(prefix)/$(platform)
+- if [ -e $(prefix)/bin -a ! -e $(prefix)/$(platform)/bin ]; then \
+- cd $(prefix)/$(platform) && ln -s ../bin bin; \
++ $(INSTALL) -d $(DESTDIR)$(prefix)/$(platform)
++ if [ -e $(DESTDIR)$(prefix)/bin -a ! -e $(DESTDIR)$(prefix)/$(platform)/bin ]; then \
++ cd $(DESTDIR)$(prefix)/$(platform) && ln -s ../bin bin; \
+ fi
+- if [ -e $(prefix)/lib -a ! -e $(prefix)/$(platform)/lib ]; then \
+- cd $(prefix)/$(platform) && ln -s ../lib lib; \
++ if [ -e $(DESTDIR)$(prefix)/lib -a ! -e $(DESTDIR)$(prefix)/$(platform)/lib ]; then \
++ cd $(DESTDIR)$(prefix)/$(platform) && ln -s ../lib lib; \
+ fi
+- buildd=`pwd`; cd $(top_srcdir); sourced=`pwd`; cd $(prefix); installd=`pwd`; cd $$buildd; \
++ buildd=`pwd`; cd $(top_srcdir); sourced=`pwd`; cd $(DESTDIR)$(prefix); installd=`pwd`; cd $$buildd; \
+ if [ "$$installd" != "$$sourced" ]; then \
+- $(INSTALL) -d $(prefix)/inc; \
+- cp -frL $(top_srcdir)/inc $(prefix); \
+- cp -frL $$buildd/config.h $(prefix); \
++ $(INSTALL) -d $(DESTDIR)$(prefix)/inc; \
++ cp -frL $(top_srcdir)/inc $(DESTDIR)$(prefix); \
++ cp -frL $$buildd/config.h $(DESTDIR)$(prefix); \
+ for d in $(FoundationClasses_DIRS) $(ModelingData_DIRS) $(ModelingAlgorithms_DIRS) $(Visualization_DIRS) $(ApplicationFramework_DIRS) $(DataExchange_DIRS) $(Draw_DIRS); do \
+- $(INSTALL) -d $(prefix)/src/$$d; \
+- cp -frL $(top_srcdir)/src/$$d $(prefix)/src; \
++ $(INSTALL) -d $(DESTDIR)$(prefix)/src/$$d; \
++ cp -frL $(top_srcdir)/src/$$d $(DESTDIR)$(prefix)/src; \
+ done; \
+ fi
+- if [ -e $(prefix)/inc/config.h ]; then \
+- rm -f $(prefix)/inc/config.h; \
++ if [ -e $(DESTDIR)$(prefix)/inc/config.h ]; then \
++ rm -f $(DESTDIR)$(prefix)/inc/config.h; \
+ fi
+- cd $(prefix)/inc && ln -s ../config.h config.h
+- cd $(top_srcdir) && cp *amk.sh $(prefix)
++ cd $(DESTDIR)$(prefix)/inc && ln -s ../config.h config.h
++ cd $(top_srcdir) && cp *amk.sh $(DESTDIR)$(prefix)
+
+ .PHONY: FoundationClasses ModelingData ModelingAlgorithms Visualization ApplicationFramework DataExchange Draw
diff --git a/sci-libs/opencascade/files/opencascade-6.7.0-fixed-DESTDIR.patch b/sci-libs/opencascade/files/opencascade-6.7.0-fixed-DESTDIR.patch
new file mode 100644
index 000000000000..3a3f98093443
--- /dev/null
+++ b/sci-libs/opencascade/files/opencascade-6.7.0-fixed-DESTDIR.patch
@@ -0,0 +1,51 @@
+--- Makefile.am.old 2014-01-13 09:43:18.530500362 +0100
++++ Makefile.am 2014-01-13 09:45:40.430496833 +0100
+@@ -82,29 +82,29 @@
+ cd $(top_builddir)/adm/lin/amk && $(MAKE) $(AM_MAKEFLAGS) Draw
+
+ install-exec-local:
+- $(INSTALL) -d $(prefix)/$(platform)
+- if [ -e $(prefix)/bin -a ! -e $(prefix)/$(platform)/bin ]; then \
+- cd $(prefix)/$(platform) && ln -s ../bin bin; \
++ $(INSTALL) -d $(DESTDIR)$(prefix)/$(platform)
++ if [ -e $(DESTDIR)$(prefix)/bin -a ! -e $(DESTDIR)$(prefix)/$(platform)/bin ]; then \
++ cd $(DESTDIR)$(prefix)/$(platform) && ln -s ../bin bin; \
+ fi
+- if [ -e $(prefix)/lib -a ! -e $(prefix)/$(platform)/lib ]; then \
+- cd $(prefix)/$(platform) && ln -s ../lib lib; \
++ if [ -e $(DESTDIR)$(prefix)/lib -a ! -e $(DESTDIR)$(prefix)/$(platform)/lib ]; then \
++ cd $(DESTDIR)$(prefix)/$(platform) && ln -s ../lib lib; \
+ fi
+- buildd=`pwd`; cd $(top_srcdir); sourced=`pwd`; cd $(prefix); installd=`pwd`; cd $$buildd; \
++ buildd=`pwd`; cd $(top_srcdir); sourced=`pwd`; cd $(DESTDIR)$(prefix); installd=`pwd`; cd $$buildd; \
+ if [ "$$installd" != "$$sourced" ]; then \
+- $(INSTALL) -d $(prefix)/inc; \
+- cp -frL $(top_srcdir)/inc $(prefix); \
+- cp -frL $$buildd/config.h $(prefix); \
++ $(INSTALL) -d $(DESTDIR)$(prefix)/inc; \
++ cp -frL $(top_srcdir)/inc $(DESTDIR)$(prefix); \
++ cp -frL $$buildd/config.h $(DESTDIR)$(prefix); \
+ for d in $(FoundationClasses_DIRS) $(ModelingData_DIRS) $(ModelingAlgorithms_DIRS) $(Visualization_DIRS) $(ApplicationFramework_DIRS) $(DataExchange_DIRS) $(Draw_DIRS); do \
+- $(INSTALL) -d $(prefix)/src/$$d; \
+- cp -frL $(top_srcdir)/src/$$d $(prefix)/src; \
++ $(INSTALL) -d $(DESTDIR)$(prefix)/src/$$d; \
++ cp -frL $(top_srcdir)/src/$$d $(DESTDIR)$(prefix)/src; \
+ done; \
+ fi
+- if [ -e $(prefix)/inc/config.h ]; then \
+- rm -f $(prefix)/inc/config.h; \
++ if [ -e $(DESTDIR)$(prefix)/inc/config.h ]; then \
++ rm -f $(DESTDIR)$(prefix)/inc/config.h; \
+ fi
+- cd $(prefix)/inc && ln -s ../config.h config.h
+- cd $(top_srcdir) && cp draw.sh $(prefix)
+- cd $(top_srcdir) && cp custom.sh $(prefix)
+- cd $(top_srcdir) && cp env.sh $(prefix)
++ cd $(DESTDIR)$(prefix)/inc && ln -s ../config.h config.h
++ cd $(top_srcdir) && cp draw.sh $(DESTDIR)$(prefix)
++ cd $(top_srcdir) && cp custom.sh $(DESTDIR)$(prefix)
++ cd $(top_srcdir) && cp env.sh $(DESTDIR)$(prefix)
+
+-.PHONY: FoundationClasses ModelingData ModelingAlgorithms Visualization ApplicationFramework DataExchange Draw
+\ Brak znaku nowej linii na końcu pliku
++.PHONY: FoundationClasses ModelingData ModelingAlgorithms Visualization ApplicationFramework DataExchange Draw
diff --git a/sci-libs/opencascade/files/opencascade-6.7.1-deprecated-glx-api.patch b/sci-libs/opencascade/files/opencascade-6.7.1-deprecated-glx-api.patch
new file mode 100644
index 000000000000..b3c3629aada1
--- /dev/null
+++ b/sci-libs/opencascade/files/opencascade-6.7.1-deprecated-glx-api.patch
@@ -0,0 +1,89 @@
+From ba7e14489e14f08aae3e0f48b419b2149290b163 Mon Sep 17 00:00:00 2001
+From: Matthias Maier <tamiko@kyomu.43-1.org>
+Date: Tue, 23 Dec 2014 21:15:59 +0100
+Subject: [PATCH] Define GLX_GLXEXT_LEGACY prior to inclusion of GL/glx.h
+
+---
+ inc/InterfaceGraphic_X11.hxx | 1 +
+ samples/qt/Common/src/View.cxx | 1 +
+ src/InterfaceGraphic/InterfaceGraphic_X11.hxx | 1 +
+ src/OpenGl/OpenGl_Context.cxx | 1 +
+ src/OpenGl/OpenGl_Workspace_Raytrace.cxx | 1 +
+ src/Xw/Xw_Window.cxx | 1 +
+ 6 files changed, 6 insertions(+)
+
+diff --git a/inc/InterfaceGraphic_X11.hxx b/inc/InterfaceGraphic_X11.hxx
+index 280bb9b..98d7415 100755
+--- a/inc/InterfaceGraphic_X11.hxx
++++ b/inc/InterfaceGraphic_X11.hxx
+@@ -21,6 +21,7 @@
+ #include <X11/Xlib.h>
+ #include <X11/Xutil.h>
+ #include <X11/Xatom.h>
++#define GLX_GLXEXT_LEGACY
+ #include <GL/glx.h>
+
+ #if defined (sun) || defined (SUNOS) || defined (__alpha) || defined (DECOSF1) || defined (sgi) || defined (IRIX) || defined (__hpux)|| defined (HPUX)
+diff --git a/samples/qt/Common/src/View.cxx b/samples/qt/Common/src/View.cxx
+index 77f51b8..9b3f4e2 100755
+--- a/samples/qt/Common/src/View.cxx
++++ b/samples/qt/Common/src/View.cxx
+@@ -28,6 +28,7 @@
+ #include <Cocoa_Window.hxx>
+ #else
+ #include <QX11Info>
++#define GLX_GLXEXT_LEGACY
+ #include <GL/glx.h>
+ #include <X11/Xutil.h>
+ #include <X11/Xatom.h>
+diff --git a/src/InterfaceGraphic/InterfaceGraphic_X11.hxx b/src/InterfaceGraphic/InterfaceGraphic_X11.hxx
+index 280bb9b..98d7415 100755
+--- a/src/InterfaceGraphic/InterfaceGraphic_X11.hxx
++++ b/src/InterfaceGraphic/InterfaceGraphic_X11.hxx
+@@ -21,6 +21,7 @@
+ #include <X11/Xlib.h>
+ #include <X11/Xutil.h>
+ #include <X11/Xatom.h>
++#define GLX_GLXEXT_LEGACY
+ #include <GL/glx.h>
+
+ #if defined (sun) || defined (SUNOS) || defined (__alpha) || defined (DECOSF1) || defined (sgi) || defined (IRIX) || defined (__hpux)|| defined (HPUX)
+diff --git a/src/OpenGl/OpenGl_Context.cxx b/src/OpenGl/OpenGl_Context.cxx
+index 9e2f074..1ddf6a4 100755
+--- a/src/OpenGl/OpenGl_Context.cxx
++++ b/src/OpenGl/OpenGl_Context.cxx
+@@ -39,6 +39,7 @@
+ #elif defined(__APPLE__) && !defined(MACOSX_USE_GLX)
+ #include <dlfcn.h>
+ #else
++ #define GLX_GLXEXT_LEGACY
+ #include <GL/glx.h> // glXGetProcAddress()
+ #endif
+
+diff --git a/src/OpenGl/OpenGl_Workspace_Raytrace.cxx b/src/OpenGl/OpenGl_Workspace_Raytrace.cxx
+index f1b5afe..870eb7d 100755
+--- a/src/OpenGl/OpenGl_Workspace_Raytrace.cxx
++++ b/src/OpenGl/OpenGl_Workspace_Raytrace.cxx
+@@ -32,6 +32,7 @@
+ #elif defined(__APPLE__) && !defined(MACOSX_USE_GLX)
+ #include <OpenGL/CGLCurrent.h>
+ #else
++ #define GLX_GLXEXT_LEGACY
+ #include <GL/glx.h>
+ #endif
+
+diff --git a/src/Xw/Xw_Window.cxx b/src/Xw/Xw_Window.cxx
+index 5442365..0e80444 100755
+--- a/src/Xw/Xw_Window.cxx
++++ b/src/Xw/Xw_Window.cxx
+@@ -20,6 +20,7 @@
+ #include <Aspect_Convert.hxx>
+ #include <Aspect_WindowDefinitionError.hxx>
+
++#define GLX_GLXEXT_LEGACY
+ #include <GL/glx.h>
+
+ namespace
+--
+2.0.5
+
diff --git a/sci-libs/opencascade/files/opencascade-6.8.0-fixed-DESTDIR.patch b/sci-libs/opencascade/files/opencascade-6.8.0-fixed-DESTDIR.patch
new file mode 100644
index 000000000000..1f37eace7602
--- /dev/null
+++ b/sci-libs/opencascade/files/opencascade-6.8.0-fixed-DESTDIR.patch
@@ -0,0 +1,47 @@
+--- opencascade-6.8.0/Makefile.am
++++ opencascade-6.8.0/Makefile.am
+@@ -82,27 +82,27 @@
+ cd $(top_builddir)/adm/lin/amk && $(MAKE) $(AM_MAKEFLAGS) Draw
+
+ install-exec-local:
+- $(INSTALL) -d $(prefix)/$(platform)
+- if [ -e $(prefix)/bin -a ! -e $(prefix)/$(platform)/bin ]; then \
+- cd $(prefix)/$(platform) && ln -s ../bin bin; \
++ $(INSTALL) -d $(DESTDIR)$(prefix)/$(platform)
++ if [ -e $(DESTDIR)$(prefix)/bin -a ! -e $(DESTDIR)$(prefix)/$(platform)/bin ]; then \
++ cd $(DESTDIR)$(prefix)/$(platform) && ln -s ../bin bin; \
+ fi
+- if [ -e $(prefix)/lib -a ! -e $(prefix)/$(platform)/lib ]; then \
+- cd $(prefix)/$(platform) && ln -s ../lib lib; \
++ if [ -e $(DESTDIR)$(prefix)/lib -a ! -e $(DESTDIR)$(prefix)/$(platform)/lib ]; then \
++ cd $(DESTDIR)$(prefix)/$(platform) && ln -s ../lib lib; \
+ fi
+- buildd=`pwd`; cd $(top_srcdir); sourced=`pwd`; cd $(prefix); installd=`pwd`; cd $$buildd; \
++ buildd=`pwd`; cd $(top_srcdir); sourced=`pwd`; cd $(DESTDIR)$(prefix); installd=`pwd`; cd $$buildd; \
+ if [ "$$installd" != "$$sourced" ]; then \
+- $(INSTALL) -d $(prefix)/inc; \
+- cp -frL $(top_srcdir)/inc $(prefix); \
+- cp -frL $$buildd/config.h $(prefix); \
++ $(INSTALL) -d $(DESTDIR)$(prefix)/inc; \
++ cp -frL $(top_srcdir)/inc $(DESTDIR)$(prefix); \
++ cp -frL $$buildd/config.h $(DESTDIR)$(prefix); \
+ for d in $(FoundationClasses_DIRS) $(ModelingData_DIRS) $(ModelingAlgorithms_DIRS) $(Visualization_DIRS) $(ApplicationFramework_DIRS) $(DataExchange_DIRS) $(Draw_DIRS); do \
+- $(INSTALL) -d $(prefix)/src/$$d; \
+- cp -frL $(top_srcdir)/src/$$d $(prefix)/src; \
++ $(INSTALL) -d $(DESTDIR)$(prefix)/src/$$d; \
++ cp -frL $(top_srcdir)/src/$$d $(DESTDIR)$(prefix)/src; \
+ done; \
+ fi
+- if [ -e $(prefix)/inc/config.h ]; then \
+- rm -f $(prefix)/inc/config.h; \
++ if [ -e $(DESTDIR)$(prefix)/inc/config.h ]; then \
++ rm -f $(DESTDIR)$(prefix)/inc/config.h; \
+ fi
+- cd $(prefix)/inc && ln -s ../config.h config.h
+- cd $(top_srcdir) && cp *.sh $(prefix)
++ cd $(DESTDIR)$(prefix)/inc && ln -s ../config.h config.h
++ cd $(top_srcdir) && cp *.sh $(DESTDIR)$(prefix)
+
+-.PHONY: FoundationClasses ModelingData ModelingAlgorithms Visualization ApplicationFramework DataExchange Draw
+\ No newline at end of file
++.PHONY: FoundationClasses ModelingData ModelingAlgorithms Visualization ApplicationFramework DataExchange Draw
diff --git a/sci-libs/opencascade/metadata.xml b/sci-libs/opencascade/metadata.xml
new file mode 100644
index 000000000000..ccbd7c2de568
--- /dev/null
+++ b/sci-libs/opencascade/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>xmw@gentoo.org</email>
+ <name>Michael Weber</name>
+ </maintainer>
+ <use>
+ <flag name="freeimage">Enable support for image i/o via media-libs/freeimage</flag>
+ <flag name="gl2ps">Use gl2ps PostScript printing library</flag>
+ <flag name="tbb">tEnable multithreading with the Intel Threads Building Block dev-cpp/tbb</flag>
+ </use>
+</pkgmetadata>
diff --git a/sci-libs/opencascade/opencascade-6.5.5.ebuild b/sci-libs/opencascade/opencascade-6.5.5.ebuild
new file mode 100644
index 000000000000..bc4b667cc9b4
--- /dev/null
+++ b/sci-libs/opencascade/opencascade-6.5.5.ebuild
@@ -0,0 +1,171 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools eutils check-reqs multilib java-pkg-opt-2 flag-o-matic
+
+DESCRIPTION="Software development platform for CAD/CAE, 3D surface/solid modeling and data exchange"
+HOMEPAGE="http://www.opencascade.org/"
+SRC_URI="http://files.opencascade.com/OCCT/OCC_${PV}_release/OpenCASCADE${PV//\./}.tgz"
+
+LICENSE="Open-CASCADE-Technology-Public-License-6.5"
+SLOT="${PV}"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug doc examples freeimage gl2ps java qt4 +tbb"
+
+DEPEND="app-eselect/eselect-opencascade
+ dev-lang/tcl:0=
+ dev-lang/tk:0=
+ dev-tcltk/itcl
+ dev-tcltk/itk
+ dev-tcltk/tix
+ media-libs/ftgl
+ virtual/glu
+ virtual/opengl
+ x11-libs/libXmu
+ freeimage? ( media-libs/freeimage )
+ gl2ps? ( x11-libs/gl2ps )
+ java? ( virtual/jdk:= )
+ tbb? ( dev-cpp/tbb )"
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}/ros
+
+# http://bugs.gentoo.org/show_bug.cgi?id=352435
+# http://www.gentoo.org/foundation/en/minutes/2011/20110220_trustees.meeting_log.txt
+RESTRICT="bindist mirror"
+
+CHECKREQS_MEMORY="256M"
+CHECKREQS_DISK_BUILD="3584M"
+
+pkg_setup() {
+ check-reqs_pkg_setup
+ java-pkg-opt-2_pkg_setup
+}
+
+src_prepare() {
+ java-pkg-opt-2_src_prepare
+
+ epatch \
+ "${FILESDIR}"/${P}-deprecated-glx-api.patch \
+ "${FILESDIR}"/${PN}-6.5.4-fixed-DESTDIR.patch \
+ "${FILESDIR}"/${PN}-6.5.4-tcl8.6.patch \
+ "${FILESDIR}"/${PN}-6.5.4-fixed-tbb-VERSION.patch
+
+ # Feed environment variables used by Opencascade compilation
+ my_install_dir=${EROOT}usr/$(get_libdir)/${P}/ros
+ local my_env_install="#!/bin/sh -f
+if [ -z \"\$PATH\" ]; then
+ export PATH=VAR_CASROOT/Linux/bin
+else
+ export PATH=VAR_CASROOT/Linux/bin:\$PATH
+fi
+if [ -z \"\$LD_LIBRARY_PATH\" ]; then
+ export LD_LIBRARY_PATH=VAR_CASROOT/Linux/lib
+else
+ export LD_LIBRARY_PATH=VAR_CASROOT/Linux/lib:\$LD_LIBRARY_PATH
+fi"
+ local my_sys_lib=${EROOT}usr/$(get_libdir)
+ local my_env="CASROOT=VAR_CASROOT
+CSF_MDTVFontDirectory=VAR_CASROOT/src/FontMFT
+CSF_LANGUAGE=us
+MMGT_CLEAR=1
+CSF_EXCEPTION_PROMPT=1
+CSF_SHMessage=VAR_CASROOT/src/SHMessage
+CSF_MDTVTexturesDirectory=VAR_CASROOT/src/Textures
+CSF_XSMessage=VAR_CASROOT/src/XSMessage
+CSF_StandardDefaults=VAR_CASROOT/src/StdResource
+CSF_PluginDefaults=VAR_CASROOT/src/StdResource
+CSF_XCAFDefaults=VAR_CASROOT/src/StdResource
+CSF_StandardLiteDefaults=VAR_CASROOT/src/StdResource
+CSF_GraphicShr=VAR_CASROOT/Linux/lib/libTKOpenGl.so
+CSF_UnitsLexicon=VAR_CASROOT/src/UnitsAPI/Lexi_Expr.dat
+CSF_UnitsDefinition=VAR_CASROOT/src/UnitsAPI/Units.dat
+CSF_IGESDefaults=VAR_CASROOT/src/XSTEPResource
+CSF_STEPDefaults=VAR_CASROOT/src/XSTEPResource
+CSF_XmlOcafResource=VAR_CASROOT/src/XmlOcafResource
+CSF_MIGRATION_TYPES=VAR_CASROOT/src/StdResource/MigrationSheet.txt
+TCLHOME=${EROOT}usr/bin
+TCLLIBPATH=${my_sys_lib}
+ITK_LIBRARY=${my_sys_lib}/itk$(grep ITK_VER /usr/include/itk.h | sed 's/^.*"\(.*\)".*/\1/')
+ITCL_LIBRARY=${my_sys_lib}/itcl$(grep ITCL_VER /usr/include/itcl.h | sed 's/^.*"\(.*\)".*/\1/')
+TIX_LIBRARY=${my_sys_lib}/tix$(grep TIX_VER /usr/include/tix.h | sed 's/^.*"\(.*\)".*/\1/')
+TK_LIBRARY=${my_sys_lib}/tk$(grep TK_VER /usr/include/tk.h | sed 's/^.*"\(.*\)".*/\1/')
+TCL_LIBRARY=${my_sys_lib}/tcl$(grep TCL_VER /usr/include/tcl.h | sed 's/^.*"\(.*\)".*/\1/')"
+
+ ( echo "${my_env_install}"
+ echo "${my_env}" | sed -e "s:^:export :" ) \
+ | sed -e "s:VAR_CASROOT:${S}:g" > env.sh || die
+ source env.sh
+
+ ( echo "PATH=${my_install_dir}/lin/bin"
+ echo "LDPATH=${my_install_dir}/lin/$(get_libdir)"
+ echo "${my_env}" | sed \
+ -e "s:VAR_CASROOT:${my_install_dir}/lin:g" \
+ -e "s:/Linux/lib/:/$(get_libdir)/:g" || die
+ ) > 50${PN}
+
+ append-cxxflags "-fpermissive"
+
+ sed -e "/^AM_C_PROTOTYPES$/d" \
+ -e "s/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/" \
+ -e "s:\$qt/include:\$qt/include/qt4:g"\
+ -e "s:\$qt/lib:\$qt/$(get_libdir)/qt4:g"\
+ -i configure.* || die
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --prefix=${my_install_dir}/lin --exec-prefix=${my_install_dir}/lin \
+ --with-tcl="${EROOT}usr/$(get_libdir)" --with-tk="${EROOT}usr/$(get_libdir)" \
+ --with-freetype="${EROOT}usr" \
+ --with-ftgl="${EROOT}usr" \
+ $(usex freeimage "--with-freeimage=${EROOT}usr" "") \
+ $(usex gl2ps "--with-gl2ps=${EROOT}usr" "") \
+ $(usex qt4 "--with-qt=${EROOT}usr" "") \
+ $(usex tbb "--with-tbb-include=${EROOT}usr" "") \
+ $(usex tbb "--with-tbb-library=${EROOT}usr" "") \
+ $(use java && echo "--with-java-include=$(java-config -O)/include" || echo "--without-java-include") \
+ $(use_enable debug) \
+ $(use_enable !debug production)
+ #$(use_with freeimage) \
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ prune_libtool_files
+
+ # Symlinks for keeping original OpenCascade folder structure and
+ # add a link lib to $(get_libdir) if we are e.g. on amd64 multilib
+ if [ "$(get_libdir)" != "lib" ]; then
+ dosym "$(get_libdir)" "${my_install_dir}/lin/lib"
+ fi
+
+ insinto /etc/env.d/${PN}
+ newins 50${PN} ${PV}
+
+ cd "${WORKDIR}"
+ if use examples ; then
+ insinto /usr/share/doc/${PF}/examples
+ doins -r data
+ doins -r samples
+ fi
+ dodoc doc/*.pdf
+ if use doc; then
+ insinto /usr/share/doc/${PF}
+ doins -r doc/{overview,ReferenceDocumentation}
+ fi
+}
+
+pkg_postinst() {
+ eselect ${PN} set ${PV}
+ einfo
+ elog "After upgrading OpenCASCADE you may have to rebuild packages depending on it."
+ elog "You get a list by running \"equery depends sci-libs/opencascade\""
+ elog "revdep-rebuild does NOT suffice."
+ einfo
+}
diff --git a/sci-libs/opencascade/opencascade-6.5.ebuild b/sci-libs/opencascade/opencascade-6.5.ebuild
new file mode 100644
index 000000000000..28b8a12d2017
--- /dev/null
+++ b/sci-libs/opencascade/opencascade-6.5.ebuild
@@ -0,0 +1,187 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools eutils check-reqs multilib java-pkg-opt-2 flag-o-matic
+
+DESCRIPTION="Software development platform for CAD/CAE, 3D surface/solid modeling and data exchange"
+HOMEPAGE="http://www.opencascade.org/"
+SRC_URI="http://files.opencascade.com/OCCT/OCC_${PV}_release/OpenCASCADE650.tar.gz"
+
+LICENSE="Open-CASCADE-Technology-Public-License-6.5"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug doc examples gl2ps java"
+
+DEPEND="
+ dev-lang/tcl:0=
+ dev-lang/tk:0=
+ dev-tcltk/itcl
+ dev-tcltk/itk
+ dev-tcltk/tix
+ media-libs/ftgl
+ virtual/glu
+ virtual/opengl
+ x11-libs/libXmu
+ gl2ps? ( x11-libs/gl2ps )
+ java? ( virtual/jdk:= )
+"
+RDEPEND=${DEPEND}
+
+S=${WORKDIR}/ros
+
+# http://bugs.gentoo.org/show_bug.cgi?id=352435
+# http://www.gentoo.org/foundation/en/minutes/2011/20110220_trustees.meeting_log.txt
+RESTRICT="bindist mirror"
+
+CHECKREQS_MEMORY="256M"
+CHECKREQS_DISK_BUILD="3584M"
+
+pkg_setup() {
+ check-reqs_pkg_setup
+ java-pkg-opt-2_pkg_setup
+
+ # Determine itk, itcl, tix, tk and tcl versions
+ itk_version=$(grep ITK_VER /usr/include/itk.h | sed 's/^.*"\(.*\)".*/\1/')
+ itcl_version=$(grep ITCL_VER /usr/include/itcl.h | sed 's/^.*"\(.*\)".*/\1/')
+ tix_version=$(grep TIX_VER /usr/include/tix.h | sed 's/^.*"\(.*\)".*/\1/')
+ tk_version=$(grep TK_VER /usr/include/tk.h | sed 's/^.*"\(.*\)".*/\1/')
+ tcl_version=$(grep TCL_VER /usr/include/tcl.h | sed 's/^.*"\(.*\)".*/\1/')
+
+ INSTALL_DIR=/usr/$(get_libdir)/${P}/ros
+
+ ewarn " Please note that building OpenCascade takes a lot of time and "
+ ewarn " hardware ressources: 3.5-4 GB free diskspace and 256 MB RAM are "
+ ewarn " the minimum requirements. "
+}
+
+src_prepare() {
+ java-pkg-opt-2_src_prepare
+
+ # Substitute with our ready-made env.sh script
+ cp -f "${FILESDIR}"/env.sh.template env.sh || die
+
+ # Feed environment variables used by Opencascade compilation
+ sed -i \
+ -e "s:VAR_CASROOT:${S}:g" \
+ -e 's:VAR_SYS_BIN:/usr/bin:g' \
+ -e "s:VAR_SYS_LIB:/usr/$(get_libdir):g" env.sh \
+ || die "Environment variables feed in env.sh failed!"
+
+ # Tweak itk, itcl, tix, tk and tcl versions
+ sed -i \
+ -e "s:VAR_ITK:itk${itk_version}:g" \
+ -e "s:VAR_ITCL:itcl${itcl_version}:g" \
+ -e "s:VAR_TIX:tix${tix_version}:g" \
+ -e "s:VAR_TK:tk${tk_version}:g" \
+ -e "s:VAR_TCL:tcl${tcl_version}:g" env.sh \
+ || die "itk, itcl, tix, tk and tcl version tweaking failed!"
+
+ epatch \
+ "${FILESDIR}"/${P}-ftgl.patch \
+ "${FILESDIR}"/${P}-fixed-DESTDIR.patch \
+ "${FILESDIR}"/${P}-tcl8.6.patch
+
+ source env.sh
+
+ append-cxxflags "-fpermissive"
+
+ sed -e "/^AM_C_PROTOTYPES/d" \
+ -e "s/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/" \
+ -i configure.* || die
+
+ eautoreconf
+}
+
+src_configure() {
+ # Add the configure options
+ local confargs="--prefix=${INSTALL_DIR}/lin --exec-prefix=${INSTALL_DIR}/lin --with-tcl=/usr/$(get_libdir) --with-tk=/usr/$(get_libdir)"
+
+ confargs+=" --with-freetype=/usr"
+ confargs+=" --with-ftgl=/usr"
+
+ use gl2ps && confargs+=" --with-gl2ps=/usr"
+
+ if use java ; then
+ confargs+=" --with-java-include=$(java-config -O)/include"
+ else
+ confargs+=" --without-java-include"
+ fi
+
+ econf ${confargs} \
+ $(use_enable debug ) $(use_enable !debug production ) \
+ || die "Configuration failed"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ # .la files kill cute little kittens
+ find "${D}" -name '*.la' -exec rm {} +
+
+ # Symlinks for keeping original OpenCascade folder structure and
+ # add a link lib to $(get_libdir) if we are e.g. on amd64 multilib
+ if [ "$(get_libdir)" != "lib" ]; then
+ dosym "$(get_libdir)" "${INSTALL_DIR}/lin/lib"
+ fi
+
+ # Tweak the environment variables script again with new destination
+ cp "${FILESDIR}"/env.sh.template env.sh
+ sed -i "s:VAR_CASROOT:${INSTALL_DIR}/lin:g" env.sh || die
+
+ # Build the env.d environment variables
+ cp "${FILESDIR}"/env.sh.template 50${PN} || die
+ sed -i \
+ -e 's:export ::g' \
+ -e "s:VAR_CASROOT:${INSTALL_DIR}/lin:g" \
+ -e '1,2d' \
+ -e '4,14d' \
+ -e "s:/Linux/lib/:/$(get_libdir)/:g" ./50${PN} \
+ || die "Creation of the /etc/env.d/50opencascade failed!"
+
+ sed -i "2i\PATH=${INSTALL_DIR}/lin/bin\nLDPATH=${INSTALL_DIR}/lin/$(get_libdir)" ./50${PN} \
+ || die "Creation of the /etc/env.d/50opencascade failed!"
+
+ # Update both env.d and script with the libraries variables
+ sed -i \
+ -e 's:VAR_SYS_BIN:/usr/bin:g' \
+ -e "s:VAR_SYS_LIB:/usr/$(get_libdir):g" \
+ -e "s:VAR_ITK:itk${itk_version}:g" \
+ -e "s:VAR_ITCL:itcl${itcl_version}:g" \
+ -e "s:VAR_TIX:tix${tix_version}:g" \
+ -e "s:VAR_TK:tk${tk_version}:g" \
+ -e "s:VAR_TCL:tcl${tcl_version}:g" env.sh 50${PN} \
+ || die "Tweaking of the Tcl/Tk libraries location in env.sh and 50opencascade failed!"
+
+ # Install the env.d variables file
+ doenvd 50${PN}
+
+ cd "${S}"/../ || die
+
+ if use examples; then
+ insinto /usr/share/doc/${PF}/examples
+ doins -r data
+
+ insinto /usr/share/doc/${PF}/examples
+ doins -r samples
+ fi
+
+ cd "${S}"/../doc || die
+ dodoc *.pdf
+
+ # Install the documentation
+ if use doc; then
+ insinto /usr/share/doc/${PF}
+ doins -r {overview,ReferenceDocumentation}
+ fi
+}
+
+pkg_postinst() {
+ einfo
+ elog "After upgrading OpenCASCADE you may have to rebuild packages depending on it."
+ elog "You get a list by running \"equery depends sci-libs/opencascade\""
+ elog "revdep-rebuild does NOT suffice."
+ einfo
+}
diff --git a/sci-libs/opencascade/opencascade-6.6.0.ebuild b/sci-libs/opencascade/opencascade-6.6.0.ebuild
new file mode 100644
index 000000000000..14b37a1c8316
--- /dev/null
+++ b/sci-libs/opencascade/opencascade-6.6.0.ebuild
@@ -0,0 +1,169 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools eutils check-reqs multilib java-pkg-opt-2 flag-o-matic versionator
+
+DESCRIPTION="Software development platform for CAD/CAE, 3D surface/solid modeling and data exchange"
+HOMEPAGE="http://www.opencascade.org/"
+SRC_URI="http://files.opencascade.com/OCCT/OCC_${PV}_release/OpenCASCADE$(delete_all_version_separators).tgz"
+
+LICENSE="Open-CASCADE-Technology-Public-License-6.6"
+SLOT="${PV}"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug doc examples freeimage gl2ps java qt4 +tbb"
+
+DEPEND="app-eselect/eselect-opencascade
+ dev-lang/tcl:0=
+ dev-lang/tk:0=
+ dev-tcltk/itcl
+ dev-tcltk/itk
+ dev-tcltk/tix
+ media-libs/ftgl
+ virtual/glu
+ virtual/opengl
+ x11-libs/libXmu
+ freeimage? ( media-libs/freeimage )
+ gl2ps? ( x11-libs/gl2ps )
+ java? ( virtual/jdk:= )
+ tbb? ( dev-cpp/tbb )"
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}/ros
+
+# http://bugs.gentoo.org/show_bug.cgi?id=352435
+# http://www.gentoo.org/foundation/en/minutes/2011/20110220_trustees.meeting_log.txt
+RESTRICT="bindist mirror"
+
+CHECKREQS_MEMORY="256M"
+CHECKREQS_DISK_BUILD="3584M"
+
+pkg_setup() {
+ check-reqs_pkg_setup
+ java-pkg-opt-2_pkg_setup
+}
+
+src_prepare() {
+ java-pkg-opt-2_src_prepare
+
+ epatch \
+ "${FILESDIR}"/${P}-deprecated-glx-api.patch \
+ "${FILESDIR}"/${P}-fixed-DESTDIR.patch \
+ "${FILESDIR}"/${PN}-6.5.4-fixed-tbb-VERSION.patch
+
+ # Feed environment variables used by Opencascade compilation
+ my_install_dir=${EROOT}usr/$(get_libdir)/${P}/ros
+ local my_env_install="#!/bin/sh -f
+if [ -z \"\$PATH\" ]; then
+ export PATH=VAR_CASROOT/Linux/bin
+else
+ export PATH=VAR_CASROOT/Linux/bin:\$PATH
+fi
+if [ -z \"\$LD_LIBRARY_PATH\" ]; then
+ export LD_LIBRARY_PATH=VAR_CASROOT/Linux/lib
+else
+ export LD_LIBRARY_PATH=VAR_CASROOT/Linux/lib:\$LD_LIBRARY_PATH
+fi"
+ local my_sys_lib=${EROOT}usr/$(get_libdir)
+ local my_env="CASROOT=VAR_CASROOT
+CSF_MDTVFontDirectory=VAR_CASROOT/src/FontMFT
+CSF_LANGUAGE=us
+MMGT_CLEAR=1
+CSF_EXCEPTION_PROMPT=1
+CSF_SHMessage=VAR_CASROOT/src/SHMessage
+CSF_MDTVTexturesDirectory=VAR_CASROOT/src/Textures
+CSF_XSMessage=VAR_CASROOT/src/XSMessage
+CSF_StandardDefaults=VAR_CASROOT/src/StdResource
+CSF_PluginDefaults=VAR_CASROOT/src/StdResource
+CSF_XCAFDefaults=VAR_CASROOT/src/StdResource
+CSF_StandardLiteDefaults=VAR_CASROOT/src/StdResource
+CSF_GraphicShr=VAR_CASROOT/Linux/lib/libTKOpenGl.so
+CSF_UnitsLexicon=VAR_CASROOT/src/UnitsAPI/Lexi_Expr.dat
+CSF_UnitsDefinition=VAR_CASROOT/src/UnitsAPI/Units.dat
+CSF_IGESDefaults=VAR_CASROOT/src/XSTEPResource
+CSF_STEPDefaults=VAR_CASROOT/src/XSTEPResource
+CSF_XmlOcafResource=VAR_CASROOT/src/XmlOcafResource
+CSF_MIGRATION_TYPES=VAR_CASROOT/src/StdResource/MigrationSheet.txt
+TCLHOME=${EROOT}usr/bin
+TCLLIBPATH=${my_sys_lib}
+ITK_LIBRARY=${my_sys_lib}/itk$(grep ITK_VER /usr/include/itk.h | sed 's/^.*"\(.*\)".*/\1/')
+ITCL_LIBRARY=${my_sys_lib}/itcl$(grep ITCL_VER /usr/include/itcl.h | sed 's/^.*"\(.*\)".*/\1/')
+TIX_LIBRARY=${my_sys_lib}/tix$(grep TIX_VER /usr/include/tix.h | sed 's/^.*"\(.*\)".*/\1/')
+TK_LIBRARY=${my_sys_lib}/tk$(grep TK_VER /usr/include/tk.h | sed 's/^.*"\(.*\)".*/\1/')
+TCL_LIBRARY=${my_sys_lib}/tcl$(grep TCL_VER /usr/include/tcl.h | sed 's/^.*"\(.*\)".*/\1/')"
+
+ ( echo "${my_env_install}"
+ echo "${my_env}" | sed -e "s:^:export :" ) \
+ | sed -e "s:VAR_CASROOT:${S}:g" > env.sh || die
+ source env.sh
+
+ ( echo "PATH=${my_install_dir}/lin/bin"
+ echo "LDPATH=${my_install_dir}/lin/$(get_libdir)"
+ echo "${my_env}" | sed \
+ -e "s:VAR_CASROOT:${my_install_dir}/lin:g" \
+ -e "s:/Linux/lib/:/$(get_libdir)/:g" || die
+ ) > 50${PN}
+
+ append-cxxflags "-fpermissive"
+
+ sed -e "/^AM_C_PROTOTYPES$/d" \
+ -e "s/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/" \
+ -e "s:\$qt/include:\$qt/include/qt4:g"\
+ -e "s:\$qt/lib:\$qt/$(get_libdir)/qt4:g"\
+ -i configure.* || die
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --prefix=${my_install_dir}/lin --exec-prefix=${my_install_dir}/lin \
+ --with-tcl="${EROOT}usr/$(get_libdir)" --with-tk="${EROOT}usr/$(get_libdir)" \
+ --with-freetype="${EROOT}usr" \
+ --with-ftgl="${EROOT}usr" \
+ $(usex freeimage "--with-freeimage=${EROOT}usr" "") \
+ $(usex gl2ps "--with-gl2ps=${EROOT}usr" "") \
+ $(usex qt4 "--with-qt=${EROOT}usr" "") \
+ $(usex tbb "--with-tbb-include=${EROOT}usr" "") \
+ $(usex tbb "--with-tbb-library=${EROOT}usr" "") \
+ $(use java && echo "--with-java-include=$(java-config -O)/include" || echo "--without-java-include") \
+ $(use_enable debug) \
+ $(use_enable !debug production)
+ #$(use_with freeimage) \
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ prune_libtool_files
+
+ # Symlinks for keeping original OpenCascade folder structure and
+ # add a link lib to $(get_libdir) if we are e.g. on amd64 multilib
+ if [ "$(get_libdir)" != "lib" ]; then
+ dosym "$(get_libdir)" "${my_install_dir}/lin/lib"
+ fi
+
+ insinto /etc/env.d/${PN}
+ newins 50${PN} ${PV}
+
+ if use examples ; then
+ insinto /usr/share/doc/${PF}/examples
+ doins -r data
+ doins -r samples
+ fi
+ dodoc doc/*.pdf
+ if use doc; then
+ insinto /usr/share/doc/${PF}
+ doins -r doc/{overview,ReferenceDocumentation}
+ fi
+}
+
+pkg_postinst() {
+ eselect ${PN} set ${PV}
+ einfo
+ elog "After upgrading OpenCASCADE you may have to rebuild packages depending on it."
+ elog "You get a list by running \"equery depends sci-libs/opencascade\""
+ elog "revdep-rebuild does NOT suffice."
+ einfo
+}
diff --git a/sci-libs/opencascade/opencascade-6.7.1.ebuild b/sci-libs/opencascade/opencascade-6.7.1.ebuild
new file mode 100644
index 000000000000..e18a372a8687
--- /dev/null
+++ b/sci-libs/opencascade/opencascade-6.7.1.ebuild
@@ -0,0 +1,166 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools eutils check-reqs multilib java-pkg-opt-2 flag-o-matic
+
+DESCRIPTION="Software development platform for CAD/CAE, 3D surface/solid modeling and data exchange"
+HOMEPAGE="http://www.opencascade.org/"
+SRC_URI="http://files.opencascade.com/OCCT/OCC_${PV}_release/opencascade-${PV}.tgz"
+
+LICENSE="|| ( Open-CASCADE-LGPL-2.1-Exception-1.0 LGPL-2.1 )"
+SLOT="${PV}"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug doc examples freeimage gl2ps java qt4 +tbb"
+
+DEPEND="app-eselect/eselect-opencascade
+ dev-lang/tcl:0=
+ dev-lang/tk:0=
+ dev-tcltk/itcl
+ dev-tcltk/itk
+ dev-tcltk/tix
+ media-libs/ftgl
+ virtual/glu
+ virtual/opengl
+ x11-libs/libXmu
+ freeimage? ( media-libs/freeimage )
+ gl2ps? ( x11-libs/gl2ps )
+ java? ( virtual/jdk:= )
+ tbb? ( dev-cpp/tbb )"
+RDEPEND="${DEPEND}"
+
+# http://bugs.gentoo.org/show_bug.cgi?id=352435
+# http://www.gentoo.org/foundation/en/minutes/2011/20110220_trustees.meeting_log.txt
+RESTRICT="bindist mirror"
+
+CHECKREQS_MEMORY="256M"
+CHECKREQS_DISK_BUILD="3584M"
+
+pkg_setup() {
+ check-reqs_pkg_setup
+ java-pkg-opt-2_pkg_setup
+}
+
+src_prepare() {
+ java-pkg-opt-2_src_prepare
+
+ epatch \
+ "${FILESDIR}"/${P}-deprecated-glx-api.patch \
+ "${FILESDIR}"/${PN}-6.7.0-fixed-DESTDIR.patch \
+ "${FILESDIR}"/${PN}-6.5.4-fixed-tbb-VERSION.patch
+
+ # Feed environment variables used by Opencascade compilation
+ my_install_dir=${EROOT}usr/$(get_libdir)/${P}/ros
+ local my_env_install="#!/bin/sh -f
+if [ -z \"\$PATH\" ]; then
+ export PATH=VAR_CASROOT/Linux/bin
+else
+ export PATH=VAR_CASROOT/Linux/bin:\$PATH
+fi
+if [ -z \"\$LD_LIBRARY_PATH\" ]; then
+ export LD_LIBRARY_PATH=VAR_CASROOT/Linux/lib
+else
+ export LD_LIBRARY_PATH=VAR_CASROOT/Linux/lib:\$LD_LIBRARY_PATH
+fi"
+ local my_sys_lib=${EROOT}usr/$(get_libdir)
+ local my_env="CASROOT=VAR_CASROOT
+CSF_MDTVFontDirectory=VAR_CASROOT/src/FontMFT
+CSF_LANGUAGE=us
+MMGT_CLEAR=1
+CSF_EXCEPTION_PROMPT=1
+CSF_SHMessage=VAR_CASROOT/src/SHMessage
+CSF_MDTVTexturesDirectory=VAR_CASROOT/src/Textures
+CSF_XSMessage=VAR_CASROOT/src/XSMessage
+CSF_StandardDefaults=VAR_CASROOT/src/StdResource
+CSF_PluginDefaults=VAR_CASROOT/src/StdResource
+CSF_XCAFDefaults=VAR_CASROOT/src/StdResource
+CSF_StandardLiteDefaults=VAR_CASROOT/src/StdResource
+CSF_GraphicShr=VAR_CASROOT/Linux/lib/libTKOpenGl.so
+CSF_UnitsLexicon=VAR_CASROOT/src/UnitsAPI/Lexi_Expr.dat
+CSF_UnitsDefinition=VAR_CASROOT/src/UnitsAPI/Units.dat
+CSF_IGESDefaults=VAR_CASROOT/src/XSTEPResource
+CSF_STEPDefaults=VAR_CASROOT/src/XSTEPResource
+CSF_XmlOcafResource=VAR_CASROOT/src/XmlOcafResource
+CSF_MIGRATION_TYPES=VAR_CASROOT/src/StdResource/MigrationSheet.txt
+TCLHOME=${EROOT}usr/bin
+TCLLIBPATH=${my_sys_lib}
+ITK_LIBRARY=${my_sys_lib}/itk$(grep ITK_VER /usr/include/itk.h | sed 's/^.*"\(.*\)".*/\1/')
+ITCL_LIBRARY=${my_sys_lib}/itcl$(grep ITCL_VER /usr/include/itcl.h | sed 's/^.*"\(.*\)".*/\1/')
+TIX_LIBRARY=${my_sys_lib}/tix$(grep TIX_VER /usr/include/tix.h | sed 's/^.*"\(.*\)".*/\1/')
+TK_LIBRARY=${my_sys_lib}/tk$(grep TK_VER /usr/include/tk.h | sed 's/^.*"\(.*\)".*/\1/')
+TCL_LIBRARY=${my_sys_lib}/tcl$(grep TCL_VER /usr/include/tcl.h | sed 's/^.*"\(.*\)".*/\1/')"
+
+ ( echo "${my_env_install}"
+ echo "${my_env}" | sed -e "s:^:export :" ) \
+ | sed -e "s:VAR_CASROOT:${S}:g" > env.sh || die
+ source env.sh
+
+ ( echo "PATH=${my_install_dir}/lin/bin"
+ echo "LDPATH=${my_install_dir}/lin/$(get_libdir)"
+ echo "${my_env}" | sed \
+ -e "s:VAR_CASROOT:${my_install_dir}/lin:g" \
+ -e "s:/Linux/lib/:/$(get_libdir)/:g" || die
+ ) > 50${PN}
+
+ append-cxxflags "-fpermissive"
+
+ sed -e "/^AM_C_PROTOTYPES$/d" \
+ -e "s/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/" \
+ -e "s:\$qt/include:\$qt/include/qt4:g"\
+ -e "s:\$qt/lib:\$qt/$(get_libdir)/qt4:g"\
+ -i configure.ac || die
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --prefix=${my_install_dir}/lin --exec-prefix=${my_install_dir}/lin \
+ --with-tcl="${EROOT}usr/$(get_libdir)" --with-tk="${EROOT}usr/$(get_libdir)" \
+ --with-freetype="${EROOT}usr" \
+ --with-ftgl="${EROOT}usr" \
+ $(usex freeimage "--with-freeimage=${EROOT}usr" "") \
+ $(usex gl2ps "--with-gl2ps=${EROOT}usr" "") \
+ $(usex qt4 "--with-qt=${EROOT}usr" "") \
+ $(usex tbb "--with-tbb-include=${EROOT}usr" "") \
+ $(usex tbb "--with-tbb-library=${EROOT}usr" "") \
+ $(use java && echo "--with-java-include=$(java-config -O)/include" || echo "--without-java-include") \
+ $(use_enable debug) \
+ $(use_enable !debug production)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ prune_libtool_files
+
+ # Symlinks for keeping original OpenCascade folder structure and
+ # add a link lib to $(get_libdir) if we are e.g. on amd64 multilib
+ if [ "$(get_libdir)" != "lib" ]; then
+ dosym "$(get_libdir)" "${my_install_dir}/lin/lib"
+ fi
+
+ insinto /etc/env.d/${PN}
+ newins 50${PN} ${PV}
+
+ #cd "${S}"
+ if use examples ; then
+ insinto /usr/share/doc/${PF}/examples
+ doins -r data
+ doins -r samples
+ fi
+ if use doc; then
+ insinto /usr/share/doc/${PF}
+ doins -r doc/{overview,pdf,refman}
+ fi
+}
+
+pkg_postinst() {
+ eselect ${PN} set ${PV}
+ einfo
+ elog "After upgrading OpenCASCADE you may have to rebuild packages depending on it."
+ elog "You get a list by running \"equery depends sci-libs/opencascade\""
+ elog "revdep-rebuild does NOT suffice."
+ einfo
+}
diff --git a/sci-libs/opencascade/opencascade-6.8.0.ebuild b/sci-libs/opencascade/opencascade-6.8.0.ebuild
new file mode 100644
index 000000000000..0c09d22eb749
--- /dev/null
+++ b/sci-libs/opencascade/opencascade-6.8.0.ebuild
@@ -0,0 +1,163 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools eutils check-reqs multilib java-pkg-opt-2 flag-o-matic
+
+DESCRIPTION="Software development platform for CAD/CAE, 3D surface/solid modeling and data exchange"
+HOMEPAGE="http://www.opencascade.org/"
+SRC_URI="http://files.opencascade.com/OCCT/OCC_${PV}_release/opencascade-${PV}.tgz"
+
+LICENSE="|| ( Open-CASCADE-LGPL-2.1-Exception-1.0 LGPL-2.1 )"
+SLOT="${PV}"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug doc examples freeimage gl2ps java qt4 +tbb"
+
+DEPEND="app-eselect/eselect-opencascade
+ dev-lang/tcl:0=
+ dev-lang/tk:0=
+ dev-tcltk/itcl
+ dev-tcltk/itk
+ dev-tcltk/tix
+ media-libs/ftgl
+ virtual/glu
+ virtual/opengl
+ x11-libs/libXmu
+ freeimage? ( media-libs/freeimage )
+ gl2ps? ( x11-libs/gl2ps )
+ java? ( virtual/jdk:= )
+ tbb? ( dev-cpp/tbb )"
+RDEPEND="${DEPEND}"
+
+# http://bugs.gentoo.org/show_bug.cgi?id=352435
+# http://www.gentoo.org/foundation/en/minutes/2011/20110220_trustees.meeting_log.txt
+RESTRICT="bindist mirror"
+
+CHECKREQS_MEMORY="256M"
+CHECKREQS_DISK_BUILD="3584M"
+
+pkg_setup() {
+ check-reqs_pkg_setup
+ java-pkg-opt-2_pkg_setup
+}
+
+src_prepare() {
+ java-pkg-opt-2_src_prepare
+
+ epatch \
+ "${FILESDIR}"/${P}-fixed-DESTDIR.patch
+
+ # Feed environment variables used by Opencascade compilation
+ my_install_dir=${EROOT}usr/$(get_libdir)/${P}/ros
+ local my_env_install="#!/bin/sh -f
+if [ -z \"\$PATH\" ]; then
+ export PATH=VAR_CASROOT/Linux/bin
+else
+ export PATH=VAR_CASROOT/Linux/bin:\$PATH
+fi
+if [ -z \"\$LD_LIBRARY_PATH\" ]; then
+ export LD_LIBRARY_PATH=VAR_CASROOT/Linux/lib
+else
+ export LD_LIBRARY_PATH=VAR_CASROOT/Linux/lib:\$LD_LIBRARY_PATH
+fi"
+ local my_sys_lib=${EROOT}usr/$(get_libdir)
+ local my_env="CASROOT=VAR_CASROOT
+CSF_MDTVFontDirectory=VAR_CASROOT/src/FontMFT
+CSF_LANGUAGE=us
+MMGT_CLEAR=1
+CSF_EXCEPTION_PROMPT=1
+CSF_SHMessage=VAR_CASROOT/src/SHMessage
+CSF_MDTVTexturesDirectory=VAR_CASROOT/src/Textures
+CSF_XSMessage=VAR_CASROOT/src/XSMessage
+CSF_StandardDefaults=VAR_CASROOT/src/StdResource
+CSF_PluginDefaults=VAR_CASROOT/src/StdResource
+CSF_XCAFDefaults=VAR_CASROOT/src/StdResource
+CSF_StandardLiteDefaults=VAR_CASROOT/src/StdResource
+CSF_GraphicShr=VAR_CASROOT/Linux/lib/libTKOpenGl.so
+CSF_UnitsLexicon=VAR_CASROOT/src/UnitsAPI/Lexi_Expr.dat
+CSF_UnitsDefinition=VAR_CASROOT/src/UnitsAPI/Units.dat
+CSF_IGESDefaults=VAR_CASROOT/src/XSTEPResource
+CSF_STEPDefaults=VAR_CASROOT/src/XSTEPResource
+CSF_XmlOcafResource=VAR_CASROOT/src/XmlOcafResource
+CSF_MIGRATION_TYPES=VAR_CASROOT/src/StdResource/MigrationSheet.txt
+TCLHOME=${EROOT}usr/bin
+TCLLIBPATH=${my_sys_lib}
+ITK_LIBRARY=${my_sys_lib}/itk$(grep ITK_VER /usr/include/itk.h | sed 's/^.*"\(.*\)".*/\1/')
+ITCL_LIBRARY=${my_sys_lib}/itcl$(grep ITCL_VER /usr/include/itcl.h | sed 's/^.*"\(.*\)".*/\1/')
+TIX_LIBRARY=${my_sys_lib}/tix$(grep TIX_VER /usr/include/tix.h | sed 's/^.*"\(.*\)".*/\1/')
+TK_LIBRARY=${my_sys_lib}/tk$(grep TK_VER /usr/include/tk.h | sed 's/^.*"\(.*\)".*/\1/')
+TCL_LIBRARY=${my_sys_lib}/tcl$(grep TCL_VER /usr/include/tcl.h | sed 's/^.*"\(.*\)".*/\1/')"
+
+ ( echo "${my_env_install}"
+ echo "${my_env}" | sed -e "s:^:export :" ) \
+ | sed -e "s:VAR_CASROOT:${S}:g" > env.sh || die
+ source env.sh
+
+ ( echo "PATH=${my_install_dir}/lin/bin"
+ echo "LDPATH=${my_install_dir}/lin/$(get_libdir)"
+ echo "${my_env}" | sed \
+ -e "s:VAR_CASROOT:${my_install_dir}/lin:g" \
+ -e "s:/Linux/lib/:/$(get_libdir)/:g" || die
+ ) > 50${PN}
+
+ append-cxxflags "-fpermissive"
+
+ sed -e "/^AM_C_PROTOTYPES$/d" \
+ -e "s/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/" \
+ -e "s:\$qt/include:\$qt/include/qt4:g"\
+ -e "s:\$qt/lib:\$qt/$(get_libdir)/qt4:g"\
+ -i configure.ac || die
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --prefix=${my_install_dir}/lin --exec-prefix=${my_install_dir}/lin \
+ --with-tcl="${EROOT}usr/$(get_libdir)" --with-tk="${EROOT}usr/$(get_libdir)" \
+ --with-freetype="${EROOT}usr" \
+ --with-ftgl="${EROOT}usr" \
+ $(usex freeimage "--with-freeimage=${EROOT}usr" "") \
+ $(usex gl2ps "--with-gl2ps=${EROOT}usr" "") \
+ $(usex qt4 "--with-qt=${EROOT}usr" "") \
+ $(usex tbb "--with-tbb-include=${EROOT}usr" "") \
+ $(usex tbb "--with-tbb-library=${EROOT}usr" "") \
+ $(use java && echo "--with-java-include=$(java-config -O)/include" || echo "--without-java-include") \
+ $(use_enable debug) \
+ $(use_enable !debug production)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ prune_libtool_files
+
+ # Symlinks for keeping original OpenCascade folder structure and
+ # add a link lib to $(get_libdir) if we are e.g. on amd64 multilib
+ if [ "$(get_libdir)" != "lib" ]; then
+ dosym "$(get_libdir)" "${my_install_dir}/lin/lib"
+ fi
+
+ insinto /etc/env.d/${PN}
+ newins 50${PN} ${PV}
+
+ if use examples ; then
+ insinto /usr/share/doc/${PF}/examples
+ doins -r data
+ doins -r samples
+ fi
+ if use doc; then
+ insinto /usr/share/doc/${PF}
+ doins -r doc/{overview,pdf,refman}
+ fi
+}
+
+pkg_postinst() {
+ eselect ${PN} set ${PV}
+ einfo
+ elog "After upgrading OpenCASCADE you may have to rebuild packages depending on it."
+ elog "You get a list by running \"equery depends sci-libs/opencascade\""
+ elog "revdep-rebuild does NOT suffice."
+ einfo
+}
diff --git a/sci-libs/opencascade/opencascade-6.9.0.ebuild b/sci-libs/opencascade/opencascade-6.9.0.ebuild
new file mode 100644
index 000000000000..da82dfc81b49
--- /dev/null
+++ b/sci-libs/opencascade/opencascade-6.9.0.ebuild
@@ -0,0 +1,163 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools eutils check-reqs multilib java-pkg-opt-2 flag-o-matic
+
+DESCRIPTION="Software development platform for CAD/CAE, 3D surface/solid modeling and data exchange"
+HOMEPAGE="http://www.opencascade.org/"
+SRC_URI="http://files.opencascade.com/OCCT/OCC_${PV}_release/opencascade-${PV}.tgz"
+
+LICENSE="|| ( Open-CASCADE-LGPL-2.1-Exception-1.0 LGPL-2.1 )"
+SLOT="${PV}"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug doc examples freeimage gl2ps java qt4 +tbb"
+
+DEPEND="app-eselect/eselect-opencascade
+ dev-lang/tcl:0=
+ dev-lang/tk:0=
+ dev-tcltk/itcl
+ dev-tcltk/itk
+ dev-tcltk/tix
+ media-libs/ftgl
+ virtual/glu
+ virtual/opengl
+ x11-libs/libXmu
+ freeimage? ( media-libs/freeimage )
+ gl2ps? ( x11-libs/gl2ps )
+ java? ( virtual/jdk:= )
+ tbb? ( dev-cpp/tbb )"
+RDEPEND="${DEPEND}"
+
+# http://bugs.gentoo.org/show_bug.cgi?id=352435
+# http://www.gentoo.org/foundation/en/minutes/2011/20110220_trustees.meeting_log.txt
+RESTRICT="bindist mirror"
+
+CHECKREQS_MEMORY="256M"
+CHECKREQS_DISK_BUILD="3584M"
+
+pkg_setup() {
+ check-reqs_pkg_setup
+ java-pkg-opt-2_pkg_setup
+}
+
+src_prepare() {
+ java-pkg-opt-2_src_prepare
+
+ epatch \
+ "${FILESDIR}"/${PN}-6.8.0-fixed-DESTDIR.patch
+
+ # Feed environment variables used by Opencascade compilation
+ my_install_dir=${EROOT}usr/$(get_libdir)/${P}/ros
+ local my_env_install="#!/bin/sh -f
+if [ -z \"\$PATH\" ]; then
+ export PATH=VAR_CASROOT/Linux/bin
+else
+ export PATH=VAR_CASROOT/Linux/bin:\$PATH
+fi
+if [ -z \"\$LD_LIBRARY_PATH\" ]; then
+ export LD_LIBRARY_PATH=VAR_CASROOT/Linux/lib
+else
+ export LD_LIBRARY_PATH=VAR_CASROOT/Linux/lib:\$LD_LIBRARY_PATH
+fi"
+ local my_sys_lib=${EROOT}usr/$(get_libdir)
+ local my_env="CASROOT=VAR_CASROOT
+CSF_MDTVFontDirectory=VAR_CASROOT/src/FontMFT
+CSF_LANGUAGE=us
+MMGT_CLEAR=1
+CSF_EXCEPTION_PROMPT=1
+CSF_SHMessage=VAR_CASROOT/src/SHMessage
+CSF_MDTVTexturesDirectory=VAR_CASROOT/src/Textures
+CSF_XSMessage=VAR_CASROOT/src/XSMessage
+CSF_StandardDefaults=VAR_CASROOT/src/StdResource
+CSF_PluginDefaults=VAR_CASROOT/src/StdResource
+CSF_XCAFDefaults=VAR_CASROOT/src/StdResource
+CSF_StandardLiteDefaults=VAR_CASROOT/src/StdResource
+CSF_GraphicShr=VAR_CASROOT/Linux/lib/libTKOpenGl.so
+CSF_UnitsLexicon=VAR_CASROOT/src/UnitsAPI/Lexi_Expr.dat
+CSF_UnitsDefinition=VAR_CASROOT/src/UnitsAPI/Units.dat
+CSF_IGESDefaults=VAR_CASROOT/src/XSTEPResource
+CSF_STEPDefaults=VAR_CASROOT/src/XSTEPResource
+CSF_XmlOcafResource=VAR_CASROOT/src/XmlOcafResource
+CSF_MIGRATION_TYPES=VAR_CASROOT/src/StdResource/MigrationSheet.txt
+TCLHOME=${EROOT}usr/bin
+TCLLIBPATH=${my_sys_lib}
+ITK_LIBRARY=${my_sys_lib}/itk$(grep ITK_VER /usr/include/itk.h | sed 's/^.*"\(.*\)".*/\1/')
+ITCL_LIBRARY=${my_sys_lib}/itcl$(grep ITCL_VER /usr/include/itcl.h | sed 's/^.*"\(.*\)".*/\1/')
+TIX_LIBRARY=${my_sys_lib}/tix$(grep TIX_VER /usr/include/tix.h | sed 's/^.*"\(.*\)".*/\1/')
+TK_LIBRARY=${my_sys_lib}/tk$(grep TK_VER /usr/include/tk.h | sed 's/^.*"\(.*\)".*/\1/')
+TCL_LIBRARY=${my_sys_lib}/tcl$(grep TCL_VER /usr/include/tcl.h | sed 's/^.*"\(.*\)".*/\1/')"
+
+ ( echo "${my_env_install}"
+ echo "${my_env}" | sed -e "s:^:export :" ) \
+ | sed -e "s:VAR_CASROOT:${S}:g" > env.sh || die
+ source env.sh
+
+ ( echo "PATH=${my_install_dir}/lin/bin"
+ echo "LDPATH=${my_install_dir}/lin/$(get_libdir)"
+ echo "${my_env}" | sed \
+ -e "s:VAR_CASROOT:${my_install_dir}/lin:g" \
+ -e "s:/Linux/lib/:/$(get_libdir)/:g" || die
+ ) > 50${PN}
+
+ append-cxxflags "-fpermissive"
+
+ sed -e "/^AM_C_PROTOTYPES$/d" \
+ -e "s/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/" \
+ -e "s:\$qt/include:\$qt/include/qt4:g"\
+ -e "s:\$qt/lib:\$qt/$(get_libdir)/qt4:g"\
+ -i configure.ac || die
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --prefix=${my_install_dir}/lin --exec-prefix=${my_install_dir}/lin \
+ --with-tcl="${EROOT}usr/$(get_libdir)" --with-tk="${EROOT}usr/$(get_libdir)" \
+ --with-freetype="${EROOT}usr" \
+ --with-ftgl="${EROOT}usr" \
+ $(usex freeimage "--with-freeimage=${EROOT}usr" "") \
+ $(usex gl2ps "--with-gl2ps=${EROOT}usr" "") \
+ $(usex qt4 "--with-qt=${EROOT}usr" "") \
+ $(usex tbb "--with-tbb-include=${EROOT}usr" "") \
+ $(usex tbb "--with-tbb-library=${EROOT}usr" "") \
+ $(use java && echo "--with-java-include=$(java-config -O)/include" || echo "--without-java-include") \
+ $(use_enable debug) \
+ $(use_enable !debug production)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ prune_libtool_files
+
+ # Symlinks for keeping original OpenCascade folder structure and
+ # add a link lib to $(get_libdir) if we are e.g. on amd64 multilib
+ if [ "$(get_libdir)" != "lib" ]; then
+ dosym "$(get_libdir)" "${my_install_dir}/lin/lib"
+ fi
+
+ insinto /etc/env.d/${PN}
+ newins 50${PN} ${PV}
+
+ if use examples ; then
+ insinto /usr/share/doc/${PF}/examples
+ doins -r data
+ doins -r samples
+ fi
+ if use doc; then
+ insinto /usr/share/doc/${PF}
+ doins -r doc/{overview,pdf,refman}
+ fi
+}
+
+pkg_postinst() {
+ eselect ${PN} set ${PV}
+ einfo
+ elog "After upgrading OpenCASCADE you may have to rebuild packages depending on it."
+ elog "You get a list by running \"equery depends sci-libs/opencascade\""
+ elog "revdep-rebuild does NOT suffice."
+ einfo
+}