summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Hüttel <dilfridge@gentoo.org>2011-03-03 01:08:20 +0000
committerAndreas Hüttel <dilfridge@gentoo.org>2011-03-03 01:08:20 +0000
commitb0fc5a86fd348e5297b50db4e79fe75308daf2ab (patch)
treed8818254489b4ed58aa509068fefe8a92d88b6bf /sci-libs
parentAdded Open-CASCADE-Technology-Public-License-6.3 (diff)
downloadhistorical-b0fc5a86fd348e5297b50db4e79fe75308daf2ab.tar.gz
historical-b0fc5a86fd348e5297b50db4e79fe75308daf2ab.tar.bz2
historical-b0fc5a86fd348e5297b50db4e79fe75308daf2ab.zip
New library, bug 118656. Imported with cleanups from the sci overlay.
Package-Manager: portage-2.1.9.41/cvs/Linux x86_64
Diffstat (limited to 'sci-libs')
-rw-r--r--sci-libs/opencascade/ChangeLog13
-rw-r--r--sci-libs/opencascade/Manifest27
-rw-r--r--sci-libs/opencascade/files/env.ksh.template39
-rw-r--r--sci-libs/opencascade/files/opencascade-6.3-fixed-DESTDIR.patch358
-rw-r--r--sci-libs/opencascade/files/opencascade-6.3-missing-mode.patch12
-rw-r--r--sci-libs/opencascade/metadata.xml6
-rw-r--r--sci-libs/opencascade/opencascade-6.3-r3.ebuild165
7 files changed, 620 insertions, 0 deletions
diff --git a/sci-libs/opencascade/ChangeLog b/sci-libs/opencascade/ChangeLog
new file mode 100644
index 000000000000..92707f7cd9d2
--- /dev/null
+++ b/sci-libs/opencascade/ChangeLog
@@ -0,0 +1,13 @@
+# ChangeLog for sci-libs/opencascade
+# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/opencascade/ChangeLog,v 1.1 2011/03/03 01:08:20 dilfridge Exp $
+
+*opencascade-6.3-r3 (03 Mar 2011)
+
+ 03 Mar 2011; Andreas K. Huettel <dilfridge@gentoo.org>
+ +opencascade-6.3-r3.ebuild, +files/opencascade-6.3-fixed-DESTDIR.patch,
+ +files/opencascade-6.3-missing-mode.patch, +files/env.ksh.template,
+ +metadata.xml:
+ New library, bug 118656. Imported with cleanups from the sci overlay.
+ Thanks to all contributors from the bugzilla report.
+
diff --git a/sci-libs/opencascade/Manifest b/sci-libs/opencascade/Manifest
new file mode 100644
index 000000000000..c4dcb77ad6cc
--- /dev/null
+++ b/sci-libs/opencascade/Manifest
@@ -0,0 +1,27 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
+AUX env.ksh.template 1412 RMD160 aaf7c74e1aef841d669cf44c279e747cb336fd2b SHA1 e6f3a1157fdededd671c832ebeb8b25a900ec7ab SHA256 ac13e6d2b0dddbbac1350b24ab4fb44d38963fe43dc7732362500f8870dcccb7
+AUX opencascade-6.3-fixed-DESTDIR.patch 16811 RMD160 4cecc900ec5b3835f7d6f9b14e6655e82d496d1a SHA1 298df55796e208aee3e04798d69b5079b1ea8fce SHA256 84743f54bb8b8b9568b5a32b5af0384efe746d20500972c66050c3a1d5ebe814
+AUX opencascade-6.3-missing-mode.patch 625 RMD160 a2c7b729a121c4b25aaa7f1ee3e42020af5b58f8 SHA1 b3b95a8a93a2f14513ce8222f0e3a695e9c513b5 SHA256 4aa7338175c7b2dbbcb12eef72c61eb55ade58ad2c698c94ae16e1bc4b451e0a
+DIST opencascade-6.3.tgz 105877329 RMD160 b71f1b9a57d9624d2f079d4f7a8090f700c6126f SHA1 21a177fae5fa73263517aedbe60a4ee4926156f2 SHA256 1f1fc8d8be1d4ff6fe8df1059f856eec156385887880f3f69d147824957c2411
+EBUILD opencascade-6.3-r3.ebuild 5101 RMD160 48d9043e04e9bdbde1a7964a4e532f4e1cd76f9c SHA1 b618133daf6d5c639527ce725fdf5cae246fa5b5 SHA256 741a60dbd98b5adbcaf0b24c5f53a5b41a98fb732b06b7acd08a523c2ed9383c
+MISC ChangeLog 597 RMD160 2765e62f7a7aff4044ee85f78f7f6f90af174c23 SHA1 ef4ec45352bebce5af58a9aca03b14191761c973 SHA256 f8dfca05866d3de8f1b3f95bf7ec822e485fc6bd192391335443a3b3b46fd1f3
+MISC metadata.xml 217 RMD160 aa960d9d3f7d900bcaf1a9413f17c3662adc0820 SHA1 a8a3016deab1f6aca4951ea86977cfe5d509b695 SHA256 756924c88548f738071c2d39fa7e18737b063e3b8f4376737eb88ac307571478
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v2.0.17 (GNU/Linux)
+
+iQIcBAEBAgAGBQJNbupcAAoJENwGBM22xffeNzIP/0IMLXZagp/Rpz1rcc+PhvRC
+u/HwKoGuJMPhcjhkOizJdJQiLo4gkTww4Bf/6YcmhkgpuInRLsdteh4om+qKUlyi
++pwPVkufTpgSpeYMNVA7+iLl4A+KcejGiymGDwxSZmtfdOhHy4RhB7pRO47ahKeP
+riiWfFZZxWpIhwndxzSkgzDHn0IXGUBASQsNRy14C9A/M2JvT9gHNN84UECaBKoN
+RMboHzxhJHkH7R+pvWIAfunKE/OGyMnc7X84HY7tHYZ9WNgWIH2wxsX9A/uhyiZ6
+3Tn1S3hGM5yIXzcVsJr+tOu6PBRYTlruWLeOG348PiAan0Ko1bqkmp32blnkcJjj
+l+ameB5Cai7v/P0syi0QLRz+mkA+7ATxlGffPNWaTfBggOPXB0K1AcuLSsYkMnI3
+1KcosNNGZ7sdZH8hvnqQNK6NCaf6qV7teidtQUwg4ffgAP4tCaLkTdnkAVgvwyn1
+IaeD1izusxtgZt+cjmigIz6dtlnFah6hYq2Ld/2UjmLdo1ixg2P5d/HWG1op0RoZ
+60MJ80XboVe5Ens4UNeHX7em4sgpHYEjeRWXOZqKE/BpBw+c15P1wxXHB+t7DweM
+L2KdcFCj8LOFF5J4VofT6OEHqru/6sJYU+MCYW9XMIBKe4AMH8wmrNniF9K0EiyO
+jYG8nBVO57n5bPuaCFpI
+=v5BG
+-----END PGP SIGNATURE-----
diff --git a/sci-libs/opencascade/files/env.ksh.template b/sci-libs/opencascade/files/env.ksh.template
new file mode 100644
index 000000000000..55d772a9f39a
--- /dev/null
+++ b/sci-libs/opencascade/files/env.ksh.template
@@ -0,0 +1,39 @@
+#!/bin/ksh -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 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.3-fixed-DESTDIR.patch b/sci-libs/opencascade/files/opencascade-6.3-fixed-DESTDIR.patch
new file mode 100644
index 000000000000..757f65982052
--- /dev/null
+++ b/sci-libs/opencascade/files/opencascade-6.3-fixed-DESTDIR.patch
@@ -0,0 +1,358 @@
+diff -urN OpenCASCADE6.3.0/ros/Makefile.am OpenCASCADE6.3.0.FixedInstall/ros/Makefile.am
+--- OpenCASCADE6.3.0/ros/Makefile.am 2008-09-09 18:49:10.000000000 +0300
++++ OpenCASCADE6.3.0.FixedInstall/ros/Makefile.am 2009-02-20 15:01:08.000000000 +0200
+@@ -108,126 +108,126 @@
+ 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
+- 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="$(WOK_DIRS)"; \
+ if test "x$(WOK_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="$(Wrappers_DIRS)"; \
+ if test "x$(Wrappers_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 OpenCASCADE6.3.0/ros/Makefile.in OpenCASCADE6.3.0.FixedInstall/ros/Makefile.in
+--- OpenCASCADE6.3.0/ros/Makefile.in 2008-09-09 18:52:16.000000000 +0300
++++ OpenCASCADE6.3.0.FixedInstall/ros/Makefile.in 2009-02-20 15:01:59.000000000 +0200
+@@ -646,126 +646,126 @@
+ cd $(top_builddir)/adm/make && $(MAKE) $(AM_MAKEFLAGS) Wrappers
+
+ 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
+- 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="$(WOK_DIRS)"; \
+ if test "x$(WOK_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="$(Wrappers_DIRS)"; \
+ if test "x$(Wrappers_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 --git a/sci-libs/opencascade/files/opencascade-6.3-missing-mode.patch b/sci-libs/opencascade/files/opencascade-6.3-missing-mode.patch
new file mode 100644
index 000000000000..32b5aae9d45b
--- /dev/null
+++ b/sci-libs/opencascade/files/opencascade-6.3-missing-mode.patch
@@ -0,0 +1,12 @@
+diff -aur OpenCASCADE6.3.0.old/ros/src/WOKUnix/WOKUnix_FDescr.cxx OpenCASCADE6.3.0/ros/src/WOKUnix/WOKUnix_FDescr.cxx
+--- OpenCASCADE6.3.0.old/ros/src/WOKUnix/WOKUnix_FDescr.cxx 2009-02-15 14:00:22.000000000 +0100
++++ OpenCASCADE6.3.0/ros/src/WOKUnix/WOKUnix_FDescr.cxx 2009-02-15 14:08:50.000000000 +0100
+@@ -202,7 +202,7 @@
+ if(mknod(apath.ToCString(), 0700 | S_IFIFO, 0))
+ { perror(apath.ToCString());}
+
+- myFileChannel = open(apath.ToCString(), O_RDONLY | O_NDELAY | O_CREAT);
++ myFileChannel = open(apath.ToCString(), O_RDONLY | O_NDELAY );
+ SetUnBuffered();
+
+ // write end of pipe is unbuffered also
diff --git a/sci-libs/opencascade/metadata.xml b/sci-libs/opencascade/metadata.xml
new file mode 100644
index 000000000000..b166de434e3a
--- /dev/null
+++ b/sci-libs/opencascade/metadata.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>sci</herd>
+<maintainer><email>dilfridge@gentoo.org</email></maintainer>
+</pkgmetadata>
diff --git a/sci-libs/opencascade/opencascade-6.3-r3.ebuild b/sci-libs/opencascade/opencascade-6.3-r3.ebuild
new file mode 100644
index 000000000000..c6f52a67e3c8
--- /dev/null
+++ b/sci-libs/opencascade/opencascade-6.3-r3.ebuild
@@ -0,0 +1,165 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/opencascade/opencascade-6.3-r3.ebuild,v 1.1 2011/03/03 01:08:20 dilfridge Exp $
+
+EAPI=4
+
+inherit autotools eutils check-reqs multilib java-pkg-opt-2
+
+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/OCC_${PV}_release/OpenCASCADE_src.tgz -> ${P}.tgz"
+
+LICENSE="Open-CASCADE-Technology-Public-License-6.3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug doc examples java"
+
+DEPEND="
+ virtual/opengl
+ x11-libs/libXmu
+ >=dev-lang/tcl-8.4
+ >=dev-lang/tk-8.4
+ >=dev-tcltk/itcl-3.2
+ >=dev-tcltk/itk-3.2
+ >=dev-tcltk/tix-8.4.2
+"
+RDEPEND=${DEPEND}
+
+S=${WORKDIR}/OpenCASCADE${PV}.0/ros
+
+RESTRICT="bindist mirror"
+# http://bugs.gentoo.org/show_bug.cgi?id=352435
+# http://www.gentoo.org/foundation/en/minutes/2011/20110220_trustees.meeting_log.txt
+
+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. "
+
+ # Check if we have enough RAM and free diskspace to build this beast
+ CHECKREQS_MEMORY="256"
+ CHECKREQS_DISK_BUILD="3584"
+ check_reqs
+}
+
+src_prepare() {
+ java-pkg-opt-2_src_prepare
+
+ # Substitute with our ready-made env.ksh script
+ cp -f "${FILESDIR}"/env.ksh.template env.ksh || 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.ksh \
+ || die "Environment variables feed in env.ksh 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.ksh \
+ || die "itk, itcl, tix, tk and tcl version tweaking failed!"
+
+ epatch "${FILESDIR}"/${P}-fixed-DESTDIR.patch
+ epatch "${FILESDIR}"/${P}-missing-mode.patch
+
+ source env.ksh
+ 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)"
+
+ 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 || die
+
+ # .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.ksh.template env.ksh
+ sed -i "s:VAR_CASROOT:${INSTALL_DIR}/lin:g" env.ksh
+
+ # Build the env.d environment variables
+ cp "${FILESDIR}"/env.ksh.template 50${PN}
+ 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.ksh 50${PN} \
+ || die "Tweaking of the Tcl/Tk libraries location in env.ksh and 50opencascade failed!"
+
+ # Install the env.d variables file
+ doenvd 50${PN} || die
+
+ cd "${S}"/../ || die
+
+ if use examples; then
+ insinto /usr/share/doc/${PF}/examples
+ doins -r data || die
+
+ insinto /usr/share/doc/${PF}/examples/samples
+ doins -r samples/tutorial || die
+
+ if use java ; then
+ insinto /usr/share/doc/${PF}/examples/samples/standard
+ doins -r samples/standard/java || die
+ fi
+ fi
+
+ # Install the documentation
+ if use doc; then
+ cd "${S}"/../doc
+ insinto /usr/share/doc/${PF}
+ doins -r {Overview,ReferenceDocumentation} || die
+ fi
+}