summaryrefslogtreecommitdiff
path: root/media-gfx
diff options
context:
space:
mode:
authorBlackNoxis <steven.darklight@gmail.com>2014-02-15 23:24:26 +0200
committerBlackNoxis <steven.darklight@gmail.com>2014-02-15 23:24:26 +0200
commit7224c1253228e5c29c78cb3f0f26ce34770f2356 (patch)
tree1684924656132935256e034f35f92abee6623265 /media-gfx
Added ebuilds for kogaion desktop
Diffstat (limited to 'media-gfx')
-rw-r--r--media-gfx/CodeAnalyst/CodeAnalyst-3.4.18_pre0418.ebuild37
-rw-r--r--media-gfx/CodeAnalyst/Manifest2
-rw-r--r--media-gfx/freecad/Manifest18
-rw-r--r--media-gfx/freecad/files/freecad-0.12.5284-boost148.patch25
-rw-r--r--media-gfx/freecad/files/freecad-0.12.5284-gcc46.patch11
-rw-r--r--media-gfx/freecad/files/freecad-0.12.5284-glu.patch12
-rw-r--r--media-gfx/freecad/files/freecad-0.12.5284-no-3rdParty.patch9
-rw-r--r--media-gfx/freecad/files/freecad-0.12.5284-no-permissive.patch40
-rw-r--r--media-gfx/freecad/files/freecad-0.12.5284-nodir.patch21
-rw-r--r--media-gfx/freecad/files/freecad-0.12.5284-nopivy.patch17
-rw-r--r--media-gfx/freecad/files/freecad-0.12.5284-occ-6.5.5.patch224
-rw-r--r--media-gfx/freecad/files/freecad-0.12.5284-qt3support.patch36
-rw-r--r--media-gfx/freecad/files/freecad-0.12.5284-removeoldswig.patch111
-rw-r--r--media-gfx/freecad/files/freecad-0.12.5284-salomesmesh-occ-6.5.5.patch228
-rw-r--r--media-gfx/freecad/files/freecad-0.13.1830-remove-qt3-support.patch33
-rw-r--r--media-gfx/freecad/freecad-0.12.5284-r2.ebuild91
-rw-r--r--media-gfx/freecad/freecad-0.12.5284-r3.ebuild128
-rw-r--r--media-gfx/freecad/freecad-0.13.1830.ebuild88
-rw-r--r--media-gfx/freecad/freecad-9999.ebuild107
19 files changed, 1238 insertions, 0 deletions
diff --git a/media-gfx/CodeAnalyst/CodeAnalyst-3.4.18_pre0418.ebuild b/media-gfx/CodeAnalyst/CodeAnalyst-3.4.18_pre0418.ebuild
new file mode 100644
index 00000000..d03a5330
--- /dev/null
+++ b/media-gfx/CodeAnalyst/CodeAnalyst-3.4.18_pre0418.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header:$
+
+EAPI="5"
+inherit eutils autotools
+
+DESCRIPTION="AMD Code Analyst"
+HOMEPAGE="http://developer.amd.com/"
+SRC_URI="http://developer.amd.com/wordpress/media/files/${PN}-3_4_18_0413-Public.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="X debug optimization"
+
+RDEPEND=""
+DEPEND="${DEPEND}"
+
+S="${WORKDIR}"/CodeAnalyst-3_4_18_0413-Public
+
+
+src_configure() {
+ insinto "${S}"
+ ./autogen.sh || die "autogen failed"
+ econf \
+ $(use_enable debug) \
+ $(use_enable optimization) \
+ $(use_with X)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "make install failed"
+ dodoc NEWS README AUTHORS
+ find "${D}" -name '*.la' -delete
+}
+
diff --git a/media-gfx/CodeAnalyst/Manifest b/media-gfx/CodeAnalyst/Manifest
new file mode 100644
index 00000000..d216e80d
--- /dev/null
+++ b/media-gfx/CodeAnalyst/Manifest
@@ -0,0 +1,2 @@
+DIST CodeAnalyst-3_4_18_0413-Public.tar.gz 12346064 SHA256 81158c09cb24a5ddc5c8c6619380ea5ed24a2a02ad00cc02df2a2bf78ac14ca9 SHA512 83e21bee5370fe70e87c814a4c972a4bf893cd0246587d49d905cf59f2edcc3561147789d4a0ba42fa47bb3489d5d8b422c308041f8911292dc9eb44843cb7cb WHIRLPOOL 68661faa773896548e431b3c12104f1672912e474a9f26a470833dfb1b160b9bd2d8679b7edc0de03102e672c4d4bcda4bde56b925fc53789e88eb8dc97e7485
+EBUILD CodeAnalyst-3.4.18_pre0418.ebuild 768 SHA256 aedeedfc185f72769da369416d5c8f4766b9ec6d1bddd4332c9e9b7843252454 SHA512 50a4b7ef072ce4b016a1d8507342374d1f10860303b14266efe64c9fdde0c4eead1eabbac4f6ea3a6fbb898c780e3eb18433ceeb366aa4810068bd658d65f994 WHIRLPOOL 975eca90d87f86de64cb7e3580dd64bb27e17cc705d873371fb78ad05919902e3e4c2b00f9e1c0fd155847edbc2e88bc66dd1ceb19d1ab44352da009704c9a1c
diff --git a/media-gfx/freecad/Manifest b/media-gfx/freecad/Manifest
new file mode 100644
index 00000000..cf74a467
--- /dev/null
+++ b/media-gfx/freecad/Manifest
@@ -0,0 +1,18 @@
+AUX freecad-0.12.5284-boost148.patch 849 SHA256 e87fd55562a13af12d66ab6587cf036d01b3a0a63bddb55a66ff12973b459e55 SHA512 9c1406d15546d945d59a269d65e21d06620663b46a2cff9422c08198d3b72768142e3cbc5381a22e2a0a45c436275ccf6879e3d1d09222762e06a91277f3a5e1 WHIRLPOOL a298dc1e9cc92e97387ee6e04509c9915d6351b06d18157812052e283053a919b1a5fe8248798b96845741781d98dd43df8198dddfd3ff3cad8651f0142fa17b
+AUX freecad-0.12.5284-gcc46.patch 424 SHA256 ce452c6ab373f41f0a88c3f40966ba3f942aae097134ee18273b6ff22ed6f44b SHA512 a1b5c3cd71338b73077f89fc9faa4cef04d2aa64939e0e6915c9a1c91fece09704d959de48623e88c97e1f349f3cd752face7cbf870a9d74caacfc8f3c78b12d WHIRLPOOL 92ec1fbfad75883af94c86af9ccdf851aa2cbcc999eb8bfda15aacc2a52d763943685d9ff22f92061d57a992337eaacb31f3ff6d83a7f33d12793420a5e2ee07
+AUX freecad-0.12.5284-glu.patch 441 SHA256 7375de7bd4880070afd6c45ea7c9f5c2214b4f76f028ad89c1cd013883c802e0 SHA512 6be87ede4162126db556eb21efd43bedaa7aa8aacafd5499538225b482b09f85599251e15e1af8232e39c27ebc66efd4cfc61e35f34baa6a3bbd4c47f280d0b8 WHIRLPOOL b5950e524616386dfde7ddcf032435ba1e61c70ad460098beab8157dabb1b91d3118ce9844350577e1534b5ba422240f8e5545f171f96c81f984cb6bc211c19a
+AUX freecad-0.12.5284-no-3rdParty.patch 224 SHA256 5dc5c4da1c330cd87737f2eaad7c33cc6a15e1c9f53f7be7bec9fb93350c319e SHA512 c5cbbd6db4128e8a8b95fbf86aca28e16f7aa5ee11f78403f182d1eb65f6a28f5b97d776407d3850505c4cc587744c5eb177faa55bcc654b8309f48fadaa5a17 WHIRLPOOL 8892f04209aa24c2da741a202b551c3e9f42b234f85b4636f0e12d6bf8328b84cc4f9f92db13154b9931142eb60baa4f08c8a04c01e8f76610c67de74fd992cd
+AUX freecad-0.12.5284-no-permissive.patch 1930 SHA256 a136071b66568a6976afb69b478013175d9199054b8e380ff48fb97f726c0a0e SHA512 1a97d1302e6f806b39838a89ea78a86e47e50001409d6477e28e97c3256f8719a3969e55e9025b736c3854cdae3314538919a9f972be09175c16350e41fd68f5 WHIRLPOOL 25b5c3422869b4a54c7782d69ba162cb980fbfd2e086dd9e1a5095c08905ad4592fcd92aeb3b2bd10e98bd237c710304d9a5513a5ebffac2e7a0da79f789f91a
+AUX freecad-0.12.5284-nodir.patch 776 SHA256 9ce3f5897311c4b26678d432a9f725d5469eaff855de59d97cb1fd12e320bb3b SHA512 c1e46d6945c81ab3a6fd8d5b065b9cc12cf5c42678d0a356373d6f02987969c873f86dad56858ed8cf5793a565e3193bc474cb446c5466fad23f5f6c65f58ccc WHIRLPOOL 5565b41c3104bf7c24bddfb4df87dd8c5cff65bfc7760bc77df235be25354f379c79b8a9cb88b5e6e9ba1e0b51a1da7818393f13e4b72637d901d84bbbc05701
+AUX freecad-0.12.5284-nopivy.patch 751 SHA256 3424f2630cd739ecb5ddcd7824469c44d6e89c2fe97a9e123090d7b8d04dfcfd SHA512 6b706c35acf1160de865c9122fc13cb7194134d2c2980d9d7ee1bfd81a3fed352d5b309ab5d5738ac3e4e87854c7b8a32d76ba328f32c63dd18216619eece108 WHIRLPOOL 0410d8c7d0de060b9d4f398c0e33d5390b076a2763953512176691f2afe4a63c3657ab727dfa77b1b6f7149d4fb87dddb435b2dcdddd6cc16fe04d02e129f910
+AUX freecad-0.12.5284-occ-6.5.5.patch 10602 SHA256 a4b3cc36138ee7369251d9429397129f744f71b1f521be1950a6a70bf26342ae SHA512 34bc41083e268fc41607b132d594e50d889b278e574b30d7d726cdb1aea53e57656d7070c85e32345b67874218c62e9b01e47c1ec2ee186efea7930651fb224f WHIRLPOOL 31890be32775b6c0b133106ce1c0f05ce22be79bd3daf5a12bb7f0cb89f69a7c6f2de4fd2cc5aa80d74109092512332499eb203e5795dcb36addebe75235d53c
+AUX freecad-0.12.5284-qt3support.patch 1819 SHA256 a04ffcbeefe04e52a771fbb93467e32392d2bdb41b59bda41d45c3018f6c0eef SHA512 5f0436ee705f924c0beef0fe7dfcd104c7e8f220dbfb59965ec340c01e7e30bb2e459c2fbc787b4f67a60913d86ae771029e8239597766da71f14d51286844a6 WHIRLPOOL c55ed752206aa9605007c54a34250cb17bc3c5818d6cf80eac36ef7f33dcc90a66ef5d501e5d07b4bdb9ce0819357bba73b0053c02c6a4bc7547e073aa27c1f5
+AUX freecad-0.12.5284-removeoldswig.patch 5165 SHA256 a5f44ac26071e1769c0686de30bbd2ca2a5fd03cb44222a1625f23c6f5ad6fc8 SHA512 732f0fc6b15b237df0014d30763e5b6bd46ebb0afe6d83eba5f2d325a5462367ab4d8890ac2426fb5fc3092465fc076f8cc4170a7d46f4eba9e4e0fa5703307b WHIRLPOOL ba101dbb802ed1a5762b2340ccf7c38a496b0f72d1deb38ea0558942f64b84c54131f7e5ce936a4405f5c025b3bc0a08d522f6d3fd2226804f7a43f21382b436
+AUX freecad-0.12.5284-salomesmesh-occ-6.5.5.patch 8617 SHA256 2ebcf2a5a81a2613d598f2eae56c87b0474b0bcac9d1b17038b71ff33c699d27 SHA512 ab1964d9a470f1edf0ce01ac67626b920a1be3f85f404e95c21122f5b69302d7b4faa41f10a648919793245cbd4ccbc804b723c59915ebe0c8011fc7fe4a9406 WHIRLPOOL dc7072b3edca746ae24b0c539753cd6f0c463ad803c222bc83f88cc3d02c9f97caa6074e95d7ff0da287a2f334633a1201cc993720c231e1e31f69d9fd240987
+AUX freecad-0.13.1830-remove-qt3-support.patch 1165 SHA256 dab93f53d16aa2b22a4c97203efb3dbe87562c7afeb6d3a3bef3f26492344f59 SHA512 479d2b5f1e5e8a1d0ffac6eb0ae3ef913530a700cabbee160471c131b1a898063be9feebb38e8870691da9d81e66924784e157a524339103713a2691ce3e6ae5 WHIRLPOOL 28c78c61de550964d6e12033bcf53876eeff2e474af67f6274f6eb0734ede7d00adb4bcd7e0a16556a1a90660c1a15d9ebf1e1b245da5bb377ccb7824d26224b
+DIST freecad-0.12.5284.tar.gz 48399004 SHA256 45486c6cc3ae212fd3eba994c603fd97962c7f505bf2a807d1533f9ee6d6026d SHA512 f1fee73ae7b43e7b3a136847f0dbb0b3f3e8f62ad3a9063f759efd8b9ed5a0dfff54961870465f37c0563161c4c5e2821f1f3379ead72dbdeddae36702e2ec0a WHIRLPOOL 7a46119d86a5d43ae8eaec6b5532e4739d54b0443769381630e644aa16c3f4185b63b513e4350c7562beacd86d56a7edbb3b506d10cb54190cbeaab48a504d5f
+DIST freecad-0.13.1830.tar.gz 70168706 SHA256 550ed16225e4cd67a463ae9b826f3a64edf7d2819cc8d235b15a89e10be72f13 SHA512 3e8d4eed8cace38da9615965f79a2b0da21d31a6df793ceaf3f732e0abd5666e9715ec9eb162e6ff998718e8d609a7dff2d0993b28f493200b734318a2322160 WHIRLPOOL 6d41565423edf8a0c67901a8559600ff1088f645c3ecb4aad8d7597490522f80d6475af3e7f5a623fc30b4d1571187bf6e6a132e6c480825798b957bea90bb83
+EBUILD freecad-0.12.5284-r2.ebuild 2097 SHA256 419b512d16428711c64a8c46f8b3d0ddde058d6cf95de09d5be2af793426df70 SHA512 0d6fee89ff0430d5dac2ed4222cc40f4c1777e1658fea642d04423f096b5c032137428508c308ad3f7fa4155240e9ed8752f07d5947514b7386afe777b37a15d WHIRLPOOL 6a5717f4e476c53586e85b6515bb91927568a379d15a218e3197c7b6e0fae5770ddf2c302cf575337f3d29effdbad8782f543577b578b0a1103490943657d2e4
+EBUILD freecad-0.12.5284-r3.ebuild 3609 SHA256 9cc9c805d6954bd0b0caabf29e8a7656bf048727f676fffd18c1dc44656ab3b7 SHA512 d1bb677c2d6053987ea9803f397ca70664ae997f8a06d82edea8b5f9614d4df5c91a8eea2d524ea2cb96a6186f35fb39d475b6e0395fff63b22b6b67a12c3ff0 WHIRLPOOL 9699600c2ed444bdd4fe3fa70b272011509b54f273cab9df4139f37cd09eb947a505ad502e9a21b7782e272e76c734339743cda76a4fd11eb02796a40e767be2
+EBUILD freecad-0.13.1830.ebuild 2209 SHA256 856b8f575926dbc9f8da985e4e97d622dc5e464a3e86871e48efb7a704a2c796 SHA512 aa8c174b800911b3db2ec5d05c5df3bd4b6edce65fc0253ccc7cd9cc3aee47d96b1e58ad94ed9097b716817d3d0460873b5a66ab072c062d1d5ff505c64921f2 WHIRLPOOL 3cb896e16c8ee161ec1b0f63853d2d69c04bcbfaa734b007bdf069dff01601d0b49971d582b044102a06aaa3a43a2a4ba94ee4c20eaaa8222fb15aba857426ff
+EBUILD freecad-9999.ebuild 2462 SHA256 3d39ef3e65000125c93cd066664bc23eb55241a697a6154f3ba5844bf154f0a6 SHA512 0d4765d59a689b4eecbe9cbe0e2ef5200776e4d14e0fcb311d0b798d4174ef4f6be5e81d8080a033d0b91190f4b101475fa03f655b7e2266e3e751cc160f8167 WHIRLPOOL 1bb6d2405f61556fb535f13b6953f483b8cc74220414c94d8772c5705ab2393595c42f19e35144dc6e9b5da92fe7ebf3696234989825783673fe235cd005c642
diff --git a/media-gfx/freecad/files/freecad-0.12.5284-boost148.patch b/media-gfx/freecad/files/freecad-0.12.5284-boost148.patch
new file mode 100644
index 00000000..4c9c7355
--- /dev/null
+++ b/media-gfx/freecad/files/freecad-0.12.5284-boost148.patch
@@ -0,0 +1,25 @@
+From d6061d30a053617b8127c96e8c6a65e47589a182 Mon Sep 17 00:00:00 2001
+From: Werner Mayer <werner@werner-VirtualBox.(none)>
+Date: Sat, 31 Mar 2012 19:22:11 +0200
+Subject: [PATCH] #0000585: bug with boost 1.48
+
+---
+ CMakeLists.txt | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 920aca7..9e3bbf5 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -284,6 +284,8 @@ MARK_AS_ADVANCED(FORCE FREECAD_LIBPACK_CHECKFILE6X FREECAD_LIBPACK_CHECKFILE7X)
+ # get include dirs
+ QT4_GET_MOC_FLAGS(moc_flags)
+ QT4_EXTRACT_OPTIONS(moc_files moc_options ${ARGN})
++ # fixes bug 0000585: bug with boost 1.48
++ SET(moc_options ${moc_options} -DBOOST_TT_HAS_OPERATOR_HPP_INCLUDED)
+
+ foreach(it ${moc_files})
+ get_filename_component(it ${it} ABSOLUTE)
+--
+1.7.9.2
+
diff --git a/media-gfx/freecad/files/freecad-0.12.5284-gcc46.patch b/media-gfx/freecad/files/freecad-0.12.5284-gcc46.patch
new file mode 100644
index 00000000..df2fb191
--- /dev/null
+++ b/media-gfx/freecad/files/freecad-0.12.5284-gcc46.patch
@@ -0,0 +1,11 @@
+diff -ruN FreeCAD-0.11.4422.orig/src/zipios++/directory.h FreeCAD-0.11.4422/src/zipios++/directory.h
+--- FreeCAD-0.11.4422.orig/src/zipios++/directory.h 2011-02-11 01:48:21.000000000 +0100
++++ FreeCAD-0.11.4422/src/zipios++/directory.h 2011-11-13 22:11:27.000000000 +0100
+@@ -31,6 +31,7 @@
+ #include <string>
+ #include <ctime>
+ #include <stdexcept>
++#include <cstddef>
+
+ // #include <boost.h> Contents of boost.h
+
diff --git a/media-gfx/freecad/files/freecad-0.12.5284-glu.patch b/media-gfx/freecad/files/freecad-0.12.5284-glu.patch
new file mode 100644
index 00000000..95672153
--- /dev/null
+++ b/media-gfx/freecad/files/freecad-0.12.5284-glu.patch
@@ -0,0 +1,12 @@
+diff -ruN FreeCAD-0.12.5284.orig/src/Mod/Image/Gui/GLImageBox.cpp FreeCAD-0.12.5284/src/Mod/Image/Gui/GLImageBox.cpp
+--- FreeCAD-0.12.5284.orig/src/Mod/Image/Gui/GLImageBox.cpp 2012-01-03 13:24:30.000000000 +0100
++++ FreeCAD-0.12.5284/src/Mod/Image/Gui/GLImageBox.cpp 2012-01-06 10:26:38.000000000 +0100
+@@ -27,6 +27,8 @@
+ # include <GL/glext.h>
+ #endif
+
++#include <GL/glu.h>
++
+ #include "GLImageBox.h"
+
+ using namespace ImageGui;
diff --git a/media-gfx/freecad/files/freecad-0.12.5284-no-3rdParty.patch b/media-gfx/freecad/files/freecad-0.12.5284-no-3rdParty.patch
new file mode 100644
index 00000000..d5797567
--- /dev/null
+++ b/media-gfx/freecad/files/freecad-0.12.5284-no-3rdParty.patch
@@ -0,0 +1,9 @@
+--- FreeCAD-0.12.5284/src/CMakeLists.txt
++++ FreeCAD-0.12.5284/src/CMakeLists.txt
+@@ -1,6 +1,5 @@
+
+ add_subdirectory(Build)
+-add_subdirectory(3rdParty)
+ add_subdirectory(Base)
+ add_subdirectory(App)
+ add_subdirectory(Main)
diff --git a/media-gfx/freecad/files/freecad-0.12.5284-no-permissive.patch b/media-gfx/freecad/files/freecad-0.12.5284-no-permissive.patch
new file mode 100644
index 00000000..d19a92f4
--- /dev/null
+++ b/media-gfx/freecad/files/freecad-0.12.5284-no-permissive.patch
@@ -0,0 +1,40 @@
+--- FreeCAD-0.12.5284/src/Mod/Mesh/App/WildMagic4/Wm4Query2Filtered.inl
++++ FreeCAD-0.12.5284/src/Mod/Mesh/App/WildMagic4/Wm4Query2Filtered.inl
+@@ -55,7 +55,7 @@
+ Real fLen1 = Math<Real>::Sqrt(fX1*fX1 + fY1*fY1);
+ Real fScaledUncertainty = m_fUncertainty*fLen0*fLen1;
+
+- Real fDet2 = Det2(fX0,fY0,fX1,fY1);
++ Real fDet2 = this->Det2(fX0,fY0,fX1,fY1);
+ if (Math<Real>::FAbs(fDet2) >= fScaledUncertainty)
+ {
+ return (fDet2 > (Real)0.0 ? +1 : (fDet2 < (Real)0.0 ? -1 : 0));
+@@ -93,7 +93,7 @@
+ Real fLen2 = Math<Real>::Sqrt(fD2x*fD2x + fD2y*fD2y + fZ2*fZ2);
+ Real fScaledUncertainty = m_fUncertainty*fLen0*fLen1*fLen2;
+
+- Real fDet3 = Det3(fD0x,fD0y,fZ0,fD1x,fD1y,fZ1,fD2x,fD2y,fZ2);
++ Real fDet3 = this->Det3(fD0x,fD0y,fZ0,fD1x,fD1y,fZ1,fD2x,fD2y,fZ2);
+ if (Math<Real>::FAbs(fDet3) >= fScaledUncertainty)
+ {
+ return (fDet3 < (Real)0.0 ? 1 : (fDet3 > (Real)0.0 ? -1 : 0));
+--- FreeCAD-0.12.5284/src/Mod/Mesh/App/WildMagic4/Wm4Query3Filtered.in
++++ FreeCAD-0.12.5284/src/Mod/Mesh/App/WildMagic4/Wm4Query3Filtered.inl
+@@ -62,7 +62,7 @@
+ Real fLen2 = Math<Real>::Sqrt(fX2*fX2 + fY2*fY2 + fZ2*fZ2);
+ Real fScaledUncertainty = m_fUncertainty*fLen0*fLen1*fLen2;
+
+- Real fDet3 = Det3(fX0,fY0,fZ0,fX1,fY1,fZ1,fX2,fY2,fZ2);
++ Real fDet3 = this->Det3(fX0,fY0,fZ0,fX1,fY1,fZ1,fX2,fY2,fZ2);
+ if (Math<Real>::FAbs(fDet3) >= fScaledUncertainty)
+ {
+ return (fDet3 > (Real)0.0 ? +1 : (fDet3 < (Real)0.0 ? -1 : 0));
+@@ -115,7 +115,7 @@
+ Real fLen3 = Math<Real>::Sqrt(fD3x*fD3x+fD3y*fD3y+fD3z*fD3z+fW3*fW3);
+ Real fScaledUncertainty = m_fUncertainty*fLen0*fLen1*fLen2*fLen3;
+
+- Real fDet4 = Det4(fD0x,fD0y,fD0z,fW0,fD1x,fD1y,fD1z,fW1,fD2x,
++ Real fDet4 = this->Det4(fD0x,fD0y,fD0z,fW0,fD1x,fD1y,fD1z,fW1,fD2x,
+ fD2y,fD2z,fW2,fD3x,fD3y,fD3z,fW3);
+
+ if (Math<Real>::FAbs(fDet4) >= fScaledUncertainty)
diff --git a/media-gfx/freecad/files/freecad-0.12.5284-nodir.patch b/media-gfx/freecad/files/freecad-0.12.5284-nodir.patch
new file mode 100644
index 00000000..3e9bbedb
--- /dev/null
+++ b/media-gfx/freecad/files/freecad-0.12.5284-nodir.patch
@@ -0,0 +1,21 @@
+diff -ruN FreeCAD-0.12.5284.orig/src/Mod/CMakeLists.txt FreeCAD-0.12.5284/src/Mod/CMakeLists.txt
+--- FreeCAD-0.12.5284.orig/src/Mod/CMakeLists.txt 2012-01-03 13:26:12.000000000 +0100
++++ FreeCAD-0.12.5284/src/Mod/CMakeLists.txt 2012-01-06 12:19:06.000000000 +0100
+@@ -18,7 +18,7 @@
+ MESSAGE("Due to the missing Eigen3 library the Sketcher module won't be built")
+ MESSAGE("Due to the missing Eigen3 library the Robot module won't be built")
+ ENDIF(EIGEN3_FOUND)
+-add_subdirectory(Machining_Distortion)
++# add_subdirectory(Machining_Distortion)
+
+ add_subdirectory(ReverseEngineering)
+ add_subdirectory(MeshPart)
+@@ -32,7 +32,7 @@
+
+ add_subdirectory(Arch)
+
+-add_subdirectory(Assembly)
++# add_subdirectory(Assembly)
+
+ if(FREECAD_BUILD_CAM)
+ add_subdirectory(Cam)
diff --git a/media-gfx/freecad/files/freecad-0.12.5284-nopivy.patch b/media-gfx/freecad/files/freecad-0.12.5284-nopivy.patch
new file mode 100644
index 00000000..337348aa
--- /dev/null
+++ b/media-gfx/freecad/files/freecad-0.12.5284-nopivy.patch
@@ -0,0 +1,17 @@
+diff -ruN FreeCAD-0.12.5284.orig/src/3rdParty/CMakeLists.txt FreeCAD-0.12.5284/src/3rdParty/CMakeLists.txt
+--- FreeCAD-0.12.5284.orig/src/3rdParty/CMakeLists.txt 2012-01-03 13:30:19.000000000 +0100
++++ FreeCAD-0.12.5284/src/3rdParty/CMakeLists.txt 2012-01-07 15:57:52.000000000 +0100
+@@ -19,13 +19,6 @@
+ # add_subdirectory(Pivy)
+ #endif(MINGW)
+ # applies for Unix, MinGW and Windows with custom LibPack
+-elseif(FREECAD_BUILD_GUI)
+- find_path(COIN_VERSION3 Inventor/scxml/ScXML.h ${COIN3D_INCLUDE_DIR})
+- if (COIN_VERSION3)
+- add_subdirectory(Pivy-0.5)
+- else (COIN_VERSION3)
+- add_subdirectory(Pivy)
+- endif(COIN_VERSION3)
+ endif(FREECAD_BUILD_GUI AND FREECAD_LIBPACK_CHECKFILE6X)
+
+ # For Windows we have all stuff in the LibPack
diff --git a/media-gfx/freecad/files/freecad-0.12.5284-occ-6.5.5.patch b/media-gfx/freecad/files/freecad-0.12.5284-occ-6.5.5.patch
new file mode 100644
index 00000000..1886f8ec
--- /dev/null
+++ b/media-gfx/freecad/files/freecad-0.12.5284-occ-6.5.5.patch
@@ -0,0 +1,224 @@
+--- FreeCAD-0.12.5284/src/Mod/Part/App/TopoShape.cpp
++++ FreeCAD-0.12.5284/src/Mod/Part/App/TopoShape.cpp
+@@ -1370,7 +1370,7 @@
+
+ //circular profile
+ Handle(Geom_Circle) aCirc = new Geom_Circle (gp::XOY(), 1.0);
+- aCirc->Rotate (gp::OZ(), Standard_PI/2.);
++ aCirc->Rotate (gp::OZ(), M_PI/2.);
+
+ //perpendicular section
+ Handle(BRepAdaptor_HCurve) myPath = new BRepAdaptor_HCurve(path_adapt);
+@@ -1469,12 +1469,12 @@
+ }
+
+ gp_Pnt2d aPnt(0, 0);
+- gp_Dir2d aDir(2. * PI, pitch);
++ gp_Dir2d aDir(2. * M_PI, pitch);
+ gp_Ax2d aAx2d(aPnt, aDir);
+
+ Handle(Geom2d_Line) line = new Geom2d_Line(aAx2d);
+ gp_Pnt2d beg = line->Value(0);
+- gp_Pnt2d end = line->Value(sqrt(4.0*PI*PI+pitch*pitch)*(height/pitch));
++ gp_Pnt2d end = line->Value(sqrt(4.0*M_PI*M_PI+pitch*pitch)*(height/pitch));
+ Handle(Geom2d_TrimmedCurve) segm = GCE2d_MakeSegment(beg , end);
+
+ TopoDS_Edge edgeOnSurf = BRepBuilderAPI_MakeEdge(segm , surf);
+@@ -1772,7 +1772,7 @@
+ Standard_Real x3, y3, z3;
+
+ Handle_StlMesh_Mesh aMesh = new StlMesh_Mesh();
+- StlTransfer::BuildIncrementalMesh(this->_Shape, accuracy, aMesh);
++ StlTransfer::BuildIncrementalMesh(this->_Shape, accuracy, false, aMesh);
+ StlMesh_MeshExplorer xp(aMesh);
+ for (Standard_Integer nbd=1;nbd<=aMesh->NbDomains();nbd++) {
+ for (xp.InitTriangle (nbd); xp.MoreTriangle (); xp.NextTriangle ()) {
+--- FreeCAD-0.12.5284/src/Mod/Part/App/FeatureRevolution.cpp
++++ FreeCAD-0.12.5284/src/Mod/Part/App/FeatureRevolution.cpp
+@@ -71,7 +71,7 @@
+ try {
+ // Now, let's get the TopoDS_Shape
+ TopoDS_Shape revolve = base->Shape.getShape().revolve(gp_Ax1(pnt, dir),
+- Angle.getValue()/180.0f*Standard_PI);
++ Angle.getValue()/180.0f*M_PI);
+ if (revolve.IsNull())
+ return new App::DocumentObjectExecReturn("Resulting shape is null");
+ this->Shape.setValue(revolve);
+--- FreeCAD-0.12.5284/src/Mod/Part/App/PrimitiveFeature.cpp
++++ FreeCAD-0.12.5284/src/Mod/Part/App/PrimitiveFeature.cpp
+@@ -263,9 +263,9 @@
+ return new App::DocumentObjectExecReturn("Radius of sphere too small");
+ try {
+ BRepPrimAPI_MakeSphere mkSphere(Radius.getValue(),
+- Angle1.getValue()/180.0f*Standard_PI,
+- Angle2.getValue()/180.0f*Standard_PI,
+- Angle3.getValue()/180.0f*Standard_PI);
++ Angle1.getValue()/180.0f*M_PI,
++ Angle2.getValue()/180.0f*M_PI,
++ Angle3.getValue()/180.0f*M_PI);
+ TopoDS_Shape ResultShape = mkSphere.Shape();
+ this->Shape.setValue(ResultShape);
+ }
+@@ -321,9 +321,9 @@
+ gp_Ax2 ax2(pnt,dir);
+ BRepPrimAPI_MakeSphere mkSphere(ax2,
+ Radius2.getValue(),
+- Angle1.getValue()/180.0f*Standard_PI,
+- Angle2.getValue()/180.0f*Standard_PI,
+- Angle3.getValue()/180.0f*Standard_PI);
++ Angle1.getValue()/180.0f*M_PI,
++ Angle2.getValue()/180.0f*M_PI,
++ Angle3.getValue()/180.0f*M_PI);
+ Standard_Real scale = Radius1.getValue()/Radius2.getValue();
+ gp_Dir xDir = ax2.XDirection();
+ gp_Dir yDir = ax2.YDirection();
+@@ -380,7 +380,7 @@
+ try {
+ BRepPrimAPI_MakeCylinder mkCylr(Radius.getValue(),
+ Height.getValue(),
+- Angle.getValue()/180.0f*Standard_PI);
++ Angle.getValue()/180.0f*M_PI);
+ TopoDS_Shape ResultShape = mkCylr.Shape();
+ this->Shape.setValue(ResultShape);
+ }
+@@ -429,7 +429,7 @@
+ BRepPrimAPI_MakeCone mkCone(Radius1.getValue(),
+ Radius2.getValue(),
+ Height.getValue(),
+- Angle.getValue()/180.0f*Standard_PI);
++ Angle.getValue()/180.0f*M_PI);
+ TopoDS_Shape ResultShape = mkCone.Shape();
+ this->Shape.setValue(ResultShape);
+ }
+@@ -498,9 +498,9 @@
+ #else
+ BRepPrimAPI_MakeTorus mkTorus(Radius1.getValue(),
+ Radius2.getValue(),
+- Angle1.getValue()/180.0f*Standard_PI,
+- Angle2.getValue()/180.0f*Standard_PI,
+- Angle3.getValue()/180.0f*Standard_PI);
++ Angle1.getValue()/180.0f*M_PI,
++ Angle2.getValue()/180.0f*M_PI,
++ Angle3.getValue()/180.0f*M_PI);
+ const TopoDS_Solid& ResultShape = mkTorus.Solid();
+ #endif
+ this->Shape.setValue(ResultShape);
+--- FreeCAD-0.12.5284/src/Mod/Part/App/AppPartPy.cpp
++++ FreeCAD-0.12.5284/src/Mod/Part/App/AppPartPy.cpp
+@@ -492,7 +492,7 @@
+ d.SetCoord(vec.x, vec.y, vec.z);
+ }
+ Handle_Geom_Plane aPlane = new Geom_Plane(p, d);
+- BRepBuilderAPI_MakeFace Face(aPlane, 0.0, length, 0.0, width);
++ BRepBuilderAPI_MakeFace Face(aPlane, 0.0, length, 0.0, width, Precision::Confusion());
+ return new TopoShapeFacePy(new TopoShape((Face.Face())));
+ }
+ catch (Standard_DomainError) {
+--- FreeCAD-0.12.5284/src/Mod/Part/App/GeometrySurfacePyImp.cpp
++++ FreeCAD-0.12.5284/src/Mod/Part/App/GeometrySurfacePyImp.cpp
+@@ -79,7 +79,7 @@
+ s->Bounds(u1,u2,v1,v2);
+ if (!PyArg_ParseTuple(args, "|dddd", &u1,&u2,&v1,&v2))
+ return 0;
+- BRepBuilderAPI_MakeFace mkBuilder(s, u1, u2, v1, v2);
++ BRepBuilderAPI_MakeFace mkBuilder(s, u1, u2, v1, v2, Precision::Confusion());
+ TopoDS_Shape sh = mkBuilder.Shape();
+ return new TopoShapeFacePy(new TopoShape(sh));
+ }
+--- FreeCAD-0.12.5284/src/Mod/Part/App/Geometry.cpp
++++ FreeCAD-0.12.5284/src/Mod/Part/App/Geometry.cpp
+@@ -1252,7 +1252,7 @@
+ Handle_Geom_Surface s = Handle_Geom_Surface::DownCast(handle());
+ Standard_Real u1,u2,v1,v2;
+ s->Bounds(u1,u2,v1,v2);
+- BRepBuilderAPI_MakeFace mkBuilder(s, u1, u2, v1, v2);
++ BRepBuilderAPI_MakeFace mkBuilder(s, u1, u2, v1, v2, Precision::Confusion());
+ return mkBuilder.Shape();
+ }
+
+--- FreeCAD-0.12.5284/src/Mod/Part/App/PrimitiveFeature.cpp
++++ FreeCAD-0.12.5284/src/Mod/Part/App/PrimitiveFeature.cpp
+@@ -191,7 +191,7 @@
+ gp_Pnt pnt(0.0,0.0,0.0);
+ gp_Dir dir(0.0,0.0,1.0);
+ Handle_Geom_Plane aPlane = new Geom_Plane(pnt, dir);
+- BRepBuilderAPI_MakeFace mkFace(aPlane, 0.0, L, 0.0, W);
++ BRepBuilderAPI_MakeFace mkFace(aPlane, 0.0, L, 0.0, W, Precision::Confusion());
+
+ const char *error=0;
+ switch (mkFace.Error())
+--- FreeCAD-0.12.5284/src/Mod/Part/App/TopoShape.cpp
++++ FreeCAD-0.12.5284/src/Mod/Part/App/TopoShape.cpp
+@@ -1338,7 +1338,7 @@
+ double u1,u2,v1,v2;
+ surf->Bounds(u1,u2,v1,v2);
+
+- BRepBuilderAPI_MakeFace mkBuilder(surf, umin, umax, v1, v2);
++ BRepBuilderAPI_MakeFace mkBuilder(surf, umin, umax, v1, v2, Precision::Confusion());
+ return mkBuilder.Face();
+ }
+
+@@ -1391,7 +1391,7 @@
+
+ Standard_Real u1,u2,v1,v2;
+ mySurface->Bounds(u1,u2,v1,v2);
+- BRepBuilderAPI_MakeFace mkBuilder(mySurface, u1, u2, v1, v2);
++ BRepBuilderAPI_MakeFace mkBuilder(mySurface, u1, u2, v1, v2, Precision::Confusion());
+ return mkBuilder.Shape();
+ }
+
+@@ -1443,7 +1443,7 @@
+ mkSweep.Perform(tol, Standard_False, GeomAbs_C1, BSplCLib::MaxDegree(), 1000);
+
+ const Handle_Geom_Surface& surf = mkSweep.Surface();
+- BRepBuilderAPI_MakeFace mkBuilder(surf, umin, umax, vmin, vmax);
++ BRepBuilderAPI_MakeFace mkBuilder(surf, umin, umax, vmin, vmax, Precision::Confusion());
+ return mkBuilder.Face();
+ }
+
+--- FreeCAD-0.12.5284/src/Mod/Part/App/TopoShapeFacePyImp.cpp
++++ FreeCAD-0.12.5284/src/Mod/Part/App/TopoShapeFacePyImp.cpp
+@@ -135,7 +135,7 @@
+ return -1;
+ }
+
+- BRepBuilderAPI_MakeFace mkFace(S);
++ BRepBuilderAPI_MakeFace mkFace(S, Precision::Confusion());
+ if (bound) {
+ Py::List list(bound);
+ for (Py::List::iterator it = list.begin(); it != list.end(); ++it) {
+--- FreeCAD-0.12.5284/src/Mod/Fem/App/AppFemPy.cpp
++++ FreeCAD-0.12.5284/src/Mod/Fem/App/AppFemPy.cpp
+@@ -498,12 +498,12 @@
+
+ //Do a Monte Carlo approach and start from the Principal Axis System
+ //and rotate +/- 60° around each axis in a first iteration
+- double angle_range_min_x=-PI/3.0,angle_range_max_x=PI/3.0,
+- angle_range_min_y=-PI/3.0,angle_range_max_y=PI/3.0,
+- angle_range_min_z=-PI/3.0,angle_range_max_z=PI/3.0;
++ double angle_range_min_x=-M_PI/3.0,angle_range_max_x=M_PI/3.0,
++ angle_range_min_y=-M_PI/3.0,angle_range_max_y=M_PI/3.0,
++ angle_range_min_z=-M_PI/3.0,angle_range_max_z=M_PI/3.0;
+
+ //We rotate until we are 0.1° sure to be in the right position
+- for (step_size = (2.0*PI/it_steps);step_size>(2.0*PI/3600.0);step_size=(2.0*PI/it_steps))
++ for (step_size = (2.0*M_PI/it_steps);step_size>(2.0*M_PI/3600.0);step_size=(2.0*M_PI/it_steps))
+ {
+ for(alpha_x=angle_range_min_x;alpha_x<angle_range_max_x;alpha_x=alpha_x+step_size)
+ {
+@@ -744,11 +744,11 @@
+
+ //Do a Monte Carlo approach and start from the Principal Axis System
+ //and rotate +/- 60° around each axis in a first iteration
+- double angle_range_min_x=-PI/3.0,angle_range_max_x=PI/3.0,
+- angle_range_min_y=-PI/3.0,angle_range_max_y=PI/3.0,
+- angle_range_min_z=-PI/3.0,angle_range_max_z=PI/3.0;
++ double angle_range_min_x=-M_PI/3.0,angle_range_max_x=M_PI/3.0,
++ angle_range_min_y=-M_PI/3.0,angle_range_max_y=M_PI/3.0,
++ angle_range_min_z=-M_PI/3.0,angle_range_max_z=M_PI/3.0;
+
+- for (step_size = (2.0*PI/it_steps);step_size>(2.0*PI/360.0);step_size=(2.0*PI/it_steps))
++ for (step_size = (2.0*M_PI/it_steps);step_size>(2.0*M_PI/360.0);step_size=(2.0*M_PI/it_steps))
+ {
+ for(alpha_x=angle_range_min_x;alpha_x<angle_range_max_x;alpha_x=alpha_x+step_size)
+ {
diff --git a/media-gfx/freecad/files/freecad-0.12.5284-qt3support.patch b/media-gfx/freecad/files/freecad-0.12.5284-qt3support.patch
new file mode 100644
index 00000000..1548c2f1
--- /dev/null
+++ b/media-gfx/freecad/files/freecad-0.12.5284-qt3support.patch
@@ -0,0 +1,36 @@
+diff -ruN FreeCAD-0.12.5284.orig/src/Mod/Arch/Resources/ui/archprefs-base.ui FreeCAD-0.12.5284/src/Mod/Arch/Resources/ui/archprefs-base.ui
+--- FreeCAD-0.12.5284.orig/src/Mod/Arch/Resources/ui/archprefs-base.ui 2012-01-03 13:26:11.000000000 +0100
++++ FreeCAD-0.12.5284/src/Mod/Arch/Resources/ui/archprefs-base.ui 2012-01-07 17:15:29.000000000 +0100
+@@ -133,7 +133,7 @@
+ </layout>
+ </widget>
+ <layoutdefault spacing="6" margin="11"/>
+- <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
++ <pixmapfunction></pixmapfunction>
+ <customwidgets>
+ <customwidget>
+ <class>Gui::ColorButton</class>
+diff -ruN FreeCAD-0.12.5284.orig/src/Mod/Draft/Resources/ui/userprefs-base.ui FreeCAD-0.12.5284/src/Mod/Draft/Resources/ui/userprefs-base.ui
+--- FreeCAD-0.12.5284.orig/src/Mod/Draft/Resources/ui/userprefs-base.ui 2012-01-03 13:25:30.000000000 +0100
++++ FreeCAD-0.12.5284/src/Mod/Draft/Resources/ui/userprefs-base.ui 2012-01-07 17:15:11.000000000 +0100
+@@ -957,7 +957,7 @@
+ </layout>
+ </widget>
+ <layoutdefault spacing="6" margin="11"/>
+- <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
++ <pixmapfunction></pixmapfunction>
+ <customwidgets>
+ <customwidget>
+ <class>Gui::FileChooser</class>
+diff -ruN FreeCAD-0.12.5284.orig/src/Mod/Draft/Resources/ui/userprefs-import.ui FreeCAD-0.12.5284/src/Mod/Draft/Resources/ui/userprefs-import.ui
+--- FreeCAD-0.12.5284.orig/src/Mod/Draft/Resources/ui/userprefs-import.ui 2012-01-03 13:25:30.000000000 +0100
++++ FreeCAD-0.12.5284/src/Mod/Draft/Resources/ui/userprefs-import.ui 2012-01-07 17:14:50.000000000 +0100
+@@ -411,7 +411,7 @@
+ </layout>
+ </widget>
+ <layoutdefault spacing="6" margin="11"/>
+- <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
++ <pixmapfunction></pixmapfunction>
+ <customwidgets>
+ <customwidget>
+ <class>Gui::FileChooser</class>
diff --git a/media-gfx/freecad/files/freecad-0.12.5284-removeoldswig.patch b/media-gfx/freecad/files/freecad-0.12.5284-removeoldswig.patch
new file mode 100644
index 00000000..b768178e
--- /dev/null
+++ b/media-gfx/freecad/files/freecad-0.12.5284-removeoldswig.patch
@@ -0,0 +1,111 @@
+--- src/Base/Interpreter.cpp.old 2010-08-27 16:24:16.000000000 +0200
++++ src/Base/Interpreter.cpp 2011-12-24 00:13:52.356641021 +0100
+@@ -503,11 +503,6 @@
+ #if (defined(HAVE_SWIG) && (HAVE_SWIG == 1))
+ namespace Swig_python { extern int createSWIGPointerObj_T(const char* TypeName, void* obj, PyObject** ptr, int own); }
+ #endif
+-namespace Swig_1_3_25 { extern int createSWIGPointerObj_T(const char* TypeName, void* obj, PyObject** ptr, int own); }
+-namespace Swig_1_3_33 { extern int createSWIGPointerObj_T(const char* TypeName, void* obj, PyObject** ptr, int own); }
+-namespace Swig_1_3_36 { extern int createSWIGPointerObj_T(const char* TypeName, void* obj, PyObject** ptr, int own); }
+-namespace Swig_1_3_38 { extern int createSWIGPointerObj_T(const char* TypeName, void* obj, PyObject** ptr, int own); }
+-namespace Swig_1_3_40 { extern int createSWIGPointerObj_T(const char* TypeName, void* obj, PyObject** ptr, int own); }
+
+ PyObject* InterpreterSingleton::createSWIGPointerObj(const char* Module, const char* TypeName, void* Pointer, int own)
+ {
+@@ -517,21 +512,6 @@
+ int version = getSWIGVersionFromModule(Module);
+ switch (version&0xff)
+ {
+- case 25:
+- result = Swig_1_3_25::createSWIGPointerObj_T(TypeName, Pointer, &proxy, own);
+- break;
+- case 33:
+- result = Swig_1_3_33::createSWIGPointerObj_T(TypeName, Pointer, &proxy, own);
+- break;
+- case 36:
+- result = Swig_1_3_36::createSWIGPointerObj_T(TypeName, Pointer, &proxy, own);
+- break;
+- case 38:
+- result = Swig_1_3_38::createSWIGPointerObj_T(TypeName, Pointer, &proxy, own);
+- break;
+- case 40:
+- result = Swig_1_3_40::createSWIGPointerObj_T(TypeName, Pointer, &proxy, own);
+- break;
+ default:
+ #if (defined(HAVE_SWIG) && (HAVE_SWIG == 1))
+ result = Swig_python::createSWIGPointerObj_T(TypeName, Pointer, &proxy, own);
+@@ -550,11 +530,6 @@
+ #if (defined(HAVE_SWIG) && (HAVE_SWIG == 1))
+ namespace Swig_python { extern int convertSWIGPointerObj_T(const char* TypeName, PyObject* obj, void** ptr, int flags); }
+ #endif
+-namespace Swig_1_3_25 { extern int convertSWIGPointerObj_T(const char* TypeName, PyObject* obj, void** ptr, int flags); }
+-namespace Swig_1_3_33 { extern int convertSWIGPointerObj_T(const char* TypeName, PyObject* obj, void** ptr, int flags); }
+-namespace Swig_1_3_36 { extern int convertSWIGPointerObj_T(const char* TypeName, PyObject* obj, void** ptr, int flags); }
+-namespace Swig_1_3_38 { extern int convertSWIGPointerObj_T(const char* TypeName, PyObject* obj, void** ptr, int flags); }
+-namespace Swig_1_3_40 { extern int convertSWIGPointerObj_T(const char* TypeName, PyObject* obj, void** ptr, int flags); }
+
+ bool InterpreterSingleton::convertSWIGPointerObj(const char* Module, const char* TypeName, PyObject* obj, void** ptr, int flags)
+ {
+@@ -563,21 +538,6 @@
+ int version = getSWIGVersionFromModule(Module);
+ switch (version&0xff)
+ {
+- case 25:
+- result = Swig_1_3_25::convertSWIGPointerObj_T(TypeName, obj, ptr, flags);
+- break;
+- case 33:
+- result = Swig_1_3_33::convertSWIGPointerObj_T(TypeName, obj, ptr, flags);
+- break;
+- case 36:
+- result = Swig_1_3_36::convertSWIGPointerObj_T(TypeName, obj, ptr, flags);
+- break;
+- case 38:
+- result = Swig_1_3_38::convertSWIGPointerObj_T(TypeName, obj, ptr, flags);
+- break;
+- case 40:
+- result = Swig_1_3_40::convertSWIGPointerObj_T(TypeName, obj, ptr, flags);
+- break;
+ default:
+ #if (defined(HAVE_SWIG) && (HAVE_SWIG == 1))
+ result = Swig_python::convertSWIGPointerObj_T(TypeName, obj, ptr, flags);
+@@ -596,11 +556,6 @@
+ #if (defined(HAVE_SWIG) && (HAVE_SWIG == 1))
+ namespace Swig_python { extern void cleanupSWIG_T(const char* TypeName); }
+ #endif
+-namespace Swig_1_3_25 { extern void cleanupSWIG_T(const char* TypeName); }
+-namespace Swig_1_3_33 { extern void cleanupSWIG_T(const char* TypeName); }
+-namespace Swig_1_3_36 { extern void cleanupSWIG_T(const char* TypeName); }
+-namespace Swig_1_3_38 { extern void cleanupSWIG_T(const char* TypeName); }
+-namespace Swig_1_3_40 { extern void cleanupSWIG_T(const char* TypeName); }
+
+ void InterpreterSingleton::cleanupSWIG(const char* TypeName)
+ {
+@@ -608,9 +563,4 @@
+ #if (defined(HAVE_SWIG) && (HAVE_SWIG == 1))
+ Swig_python::cleanupSWIG_T(TypeName);
+ #endif
+- Swig_1_3_25::cleanupSWIG_T(TypeName);
+- Swig_1_3_33::cleanupSWIG_T(TypeName);
+- Swig_1_3_36::cleanupSWIG_T(TypeName);
+- Swig_1_3_38::cleanupSWIG_T(TypeName);
+- Swig_1_3_40::cleanupSWIG_T(TypeName);
+ }
+--- src/Base/Makefile.am.old 2011-12-24 00:14:25.625540687 +0100
++++ src/Base/Makefile.am 2010-10-27 12:29:37.000000000 +0200
+@@ -65,16 +65,6 @@
+ Swap.cpp \
+ swigpyrun.inl \
+ swigpyrun.cpp \
+- swigpyrun_1.3.25.cpp \
+- swigpyrun_1.3.25.h \
+- swigpyrun_1.3.33.cpp \
+- swigpyrun_1.3.33.h \
+- swigpyrun_1.3.36.cpp \
+- swigpyrun_1.3.36.h \
+- swigpyrun_1.3.38.cpp \
+- swigpyrun_1.3.38.h \
+- swigpyrun_1.3.40.cpp \
+- swigpyrun_1.3.40.h \
+ TimeInfo.cpp \
+ Type.cpp \
+ Tools.cpp \
diff --git a/media-gfx/freecad/files/freecad-0.12.5284-salomesmesh-occ-6.5.5.patch b/media-gfx/freecad/files/freecad-0.12.5284-salomesmesh-occ-6.5.5.patch
new file mode 100644
index 00000000..50e30e6c
--- /dev/null
+++ b/media-gfx/freecad/files/freecad-0.12.5284-salomesmesh-occ-6.5.5.patch
@@ -0,0 +1,228 @@
+--- FreeCAD-0.12.5284/src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshEditor.cpp
++++ FreeCAD-0.12.5284/src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshEditor.cpp
+@@ -1374,7 +1374,7 @@
+ const SMDS_MeshNode * n1,
+ const SMDS_MeshNode * n2)
+ {
+- double angle = 2*PI; // bad angle
++ double angle = 2*M_PI; // bad angle
+
+ // get normals
+ SMESH::Controls::TSequenceOfXYZ P1, P2;
+--- FreeCAD-0.12.5284/src/3rdParty/salomesmesh/src/SMESH/SMESH_Pattern.cpp
++++ FreeCAD-0.12.5284/src/3rdParty/salomesmesh/src/SMESH/SMESH_Pattern.cpp
+@@ -1234,7 +1234,7 @@
+ maxLen2 = Max( maxLen2, ( n[1]->myUV - n[2]->myUV ).SquareModulus() );
+ }
+ maxLen2 = Max( maxLen2, ( n[2]->myUV - node->myUV ).SquareModulus() );
+- minDiag = sqrt( maxLen2 ) * PI / 60.; // ~ maxLen * Sin( 3 deg )
++ minDiag = sqrt( maxLen2 ) * M_PI / 60.; // ~ maxLen * Sin( 3 deg )
+ }
+
+ // check if newUV is behind 3 dirs: n[0]-n[1], n[1]-n[2] and n[0]-n[2]
+@@ -1721,9 +1721,9 @@
+ if ( iDir == 1 )
+ aNorm[ iDir ].Reverse(); // along iDir isoline
+
+- double angle = tgt1.Angle( tgt2 ); // [-PI, PI]
++ double angle = tgt1.Angle( tgt2 ); // [-M_PI, M_PI]
+ // maybe angle is more than |PI|
+- if ( Abs( angle ) > PI / 2. ) {
++ if ( Abs( angle ) > M_PI / 2. ) {
+ // check direction of the last but one perpendicular isoline
+ TIsoNode* prevNode = bndNode2->GetNext( iDir, 0 );
+ bndNode1 = prevNode->GetBoundaryNode( 1 - iDir, 0 );
+@@ -1734,7 +1734,7 @@
+ double angle2 = tgt1.Angle( isoDir );
+ //cout << " isoDir: "<< isoDir.X() <<" "<<isoDir.Y() << " ANGLE: "<< angle << " "<<angle2<<endl;
+ if (angle2 * angle < 0 && // check the sign of an angle close to PI
+- Abs ( Abs ( angle ) - PI ) <= PI / 180. ) {
++ Abs ( Abs ( angle ) - M_PI ) <= M_PI / 180. ) {
+ //MESSAGE("REVERSE ANGLE");
+ angle = -angle;
+ }
+@@ -1746,7 +1746,7 @@
+ // cout << "bndNode1: " << bndNode1->myUV.X()<<" "<<bndNode1->myUV.Y()<< endl;
+ // cout << "bndNode2: " << bndNode2->myUV.X()<<" "<<bndNode2->myUV.Y()<<endl;
+ // cout <<" tgt: " << tgt1.X()<<" "<<tgt1.Y()<<" "<< tgt2.X()<<" "<<tgt2.Y()<<endl;
+- angle += ( angle < 0 ) ? 2. * PI : -2. * PI;
++ angle += ( angle < 0 ) ? 2. * M_PI : -2. * M_PI;
+ }
+ }
+ aTgt[ iDir ] = tgt1.Rotated( angle * ratio[ iDir ] ).XY();
+@@ -1785,7 +1785,7 @@
+ double initAngle = initTgt1.Angle( initTgt2 );
+ double angle = node->myDir[0].Angle( node->myDir[1] );
+ if ( reversed ) angle = -angle;
+- if ( initAngle > angle && initAngle - angle > PI / 2.1 ) {
++ if ( initAngle > angle && initAngle - angle > M_PI / 2.1 ) {
+ // find a close internal node
+ TIsoNode* nClose = 0;
+ list< TIsoNode* > testNodes;
+--- FreeCAD-0.12.5284/src/3rdParty/salomesmesh/src/Controls/SMESH_Controls.cpp
++++ FreeCAD-0.12.5284/src/3rdParty/salomesmesh/src/Controls/SMESH_Controls.cpp
+@@ -332,12 +332,12 @@
+ aMin = Min(aMin,A0);
+ }
+
+- return aMin * 180.0 / PI;
++ return aMin * 180.0 / M_PI;
+ }
+
+ double MinimumAngle::GetBadRate( double Value, int nbNodes ) const
+ {
+- //const double aBestAngle = PI / nbNodes;
++ //const double aBestAngle = M_PI / nbNodes;
+ const double aBestAngle = 180.0 - ( 360.0 / double(nbNodes) );
+ return ( fabs( aBestAngle - Value ));
+ }
+@@ -831,19 +831,19 @@
+ gp_XYZ N = GI.Crossed( GJ );
+
+ if ( N.Modulus() < gp::Resolution() )
+- return PI / 2;
++ return M_PI / 2;
+
+ N.Normalize();
+
+ double H = ( thePnt2 - theG ).Dot( N );
+- return asin( fabs( H / L ) ) * 180. / PI;
++ return asin( fabs( H / L ) ) * 180. / M_PI;
+ }
+
+ double Warping::GetBadRate( double Value, int /*nbNodes*/ ) const
+ {
+ // the warp is in the range [0.0,PI/2]
+ // 0.0 = good (no warp)
+- // PI/2 = bad (face pliee)
++ // M_PI/2 = bad (face pliee)
+ return Value;
+ }
+
+@@ -915,14 +915,14 @@
+ return 0.;
+
+ // Compute skew
+- static double PI2 = PI / 2.;
++ static double PI2 = M_PI / 2.;
+ if ( P.size() == 3 )
+ {
+ double A0 = fabs( PI2 - skewAngle( P( 3 ), P( 1 ), P( 2 ) ) );
+ double A1 = fabs( PI2 - skewAngle( P( 1 ), P( 2 ), P( 3 ) ) );
+ double A2 = fabs( PI2 - skewAngle( P( 2 ), P( 3 ), P( 1 ) ) );
+
+- return Max( A0, Max( A1, A2 ) ) * 180. / PI;
++ return Max( A0, Max( A1, A2 ) ) * 180. / M_PI;
+ }
+ else
+ {
+@@ -939,7 +939,7 @@
+ if ( A < Precision::Angular() )
+ return 0.;
+
+- return A * 180. / PI;
++ return A * 180. / M_PI;
+ }
+ }
+
+--- FreeCAD-0.12.5284/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_CompositeHexa_3D.cpp
++++ FreeCAD-0.12.5284/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_CompositeHexa_3D.cpp
+@@ -812,7 +812,7 @@
+ int iMyCommon;
+ if ( mySides.Contain( otherSide, &iMyCommon ) ) {
+ // check if normals of two faces are collinear at all vertices of a otherSide
+- const double angleTol = PI / 180 / 2;
++ const double angleTol = M_PI / 180 / 2;
+ int iV, nbV = otherSide.NbVertices(), nbCollinear = 0;
+ for ( iV = 0; iV < nbV; ++iV )
+ {
+--- FreeCAD-0.12.5284/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_RadialQuadrangle_1D2D.cpp
++++ FreeCAD-0.12.5284/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_RadialQuadrangle_1D2D.cpp
+@@ -355,8 +355,8 @@
+ for(; itn != theNodes.end(); itn++ ) {
+ CNodes.push_back( (*itn).second );
+ double ang = (*itn).first - fang;
+- if( ang>PI ) ang = ang - 2*PI;
+- if( ang<-PI ) ang = ang + 2*PI;
++ if( ang>M_PI ) ang = ang - 2*M_PI;
++ if( ang<-M_PI ) ang = ang + 2*M_PI;
+ Angles.Append( ang );
+ }
+ }
+@@ -404,7 +404,7 @@
+ // a segment of line
+ double fp, lp;
+ Handle(Geom_Circle) aCirc = Handle(Geom_Circle)::DownCast( getCurve( CircEdge, &fp, &lp ));
+- if( fabs(fabs(lp-fp)-PI) > Precision::Confusion() ) {
++ if( fabs(fabs(lp-fp)-M_PI) > Precision::Confusion() ) {
+ // not half of circle
+ return error(COMPERR_BAD_SHAPE);
+ }
+@@ -434,8 +434,8 @@
+ for(; itn != theNodes.end(); itn++ ) {
+ CNodes.push_back( (*itn).second );
+ double ang = (*itn).first - fang;
+- if( ang>PI ) ang = ang - 2*PI;
+- if( ang<-PI ) ang = ang + 2*PI;
++ if( ang>M_PI ) ang = ang - 2*M_PI;
++ if( ang<-M_PI ) ang = ang + 2*M_PI;
+ Angles.Append( ang );
+ }
+ const SMDS_MeshNode* NF = theNodes.begin()->second;
+@@ -587,8 +587,8 @@
+ for(; itn != theNodes.end(); itn++ ) {
+ CNodes.push_back( (*itn).second );
+ double ang = (*itn).first - fang;
+- if( ang>PI ) ang = ang - 2*PI;
+- if( ang<-PI ) ang = ang + 2*PI;
++ if( ang>M_PI ) ang = ang - 2*M_PI;
++ if( ang<-M_PI ) ang = ang + 2*M_PI;
+ Angles.Append( ang );
+ }
+ P1 = gp_Pnt( NF->X(), NF->Y(), NF->Z() );
+@@ -1055,7 +1055,7 @@
+ aLine = Handle(Geom_Line)::DownCast(C3);
+ }
+ bool ok = !aCirc.IsNull() && !aLine.IsNull();
+- if( fabs(fabs(lp-fp)-PI) > Precision::Confusion() ) {
++ if( fabs(fabs(lp-fp)-M_PI) > Precision::Confusion() ) {
+ // not half of circle
+ ok = false;
+ }
+--- FreeCAD-0.12.5284/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_QuadToTriaAdaptor.cpp
++++ FreeCAD-0.12.5284/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_QuadToTriaAdaptor.cpp
+@@ -1037,19 +1037,19 @@
+ double ang1 = fabs(VN1.Angle(VI1));
+ double ang2 = fabs(VN2.Angle(VI2));
+ double h1,h2;
+- if(ang1>PI/3.)
++ if(ang1>M_PI/3.)
+ h1 = VI1.Magnitude()/2;
+ else
+ h1 = VI1.Magnitude()*cos(ang1);
+- if(ang2>PI/3.)
++ if(ang2>M_PI/3.)
+ h2 = VI2.Magnitude()/2;
+ else
+ h2 = VI2.Magnitude()*cos(ang2);
+ double coef1 = 0.5;
+- if(ang1<PI/3)
++ if(ang1<M_PI/3)
+ coef1 -= cos(ang1)*0.25;
+ double coef2 = 0.5;
+- if(ang2<PI/3)
++ if(ang2<M_PI/3)
+ coef2 -= cos(ang1)*0.25;
+
+ SMDS_MeshNode* aNode1 = const_cast<SMDS_MeshNode*>(Ns1[4]);
+--- FreeCAD-0.12.5284/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_AutomaticLength.cpp
++++ FreeCAD-0.12.5284/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_AutomaticLength.cpp
+@@ -116,7 +116,7 @@
+ */
+ //================================================================================
+
+- const double a14divPI = 14. / PI;
++ const double a14divPI = 14. / M_PI;
+
+ inline double segLength(double S0, double edgeLen, double minLen )
+ {
diff --git a/media-gfx/freecad/files/freecad-0.13.1830-remove-qt3-support.patch b/media-gfx/freecad/files/freecad-0.13.1830-remove-qt3-support.patch
new file mode 100644
index 00000000..8f761d87
--- /dev/null
+++ b/media-gfx/freecad/files/freecad-0.13.1830-remove-qt3-support.patch
@@ -0,0 +1,33 @@
+--- freecad-0.13.1830/src/Mod/Arch/Resources/ui/archprefs-base.ui
++++ freecad-0.13.1830/src/Mod/Arch/Resources/ui/archprefs-base.ui
+@@ -309,7 +309,7 @@
+ </layout>
+ </widget>
+ <layoutdefault spacing="6" margin="11"/>
+- <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
++ <pixmapfunction></pixmapfunction>
+ <customwidgets>
+ <customwidget>
+ <class>Gui::ColorButton</class>
+--- freecad-0.13.1830/src/Mod/Draft/Resources/ui/userprefs-base.ui
++++ freecad-0.13.1830/src/Mod/Draft/Resources/ui/userprefs-base.ui
+@@ -1185,7 +1185,7 @@
+ </layout>
+ </widget>
+ <layoutdefault spacing="6" margin="11"/>
+- <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
++ <pixmapfunction></pixmapfunction>
+ <customwidgets>
+ <customwidget>
+ <class>Gui::FileChooser</class>
+--- freecad-0.13.1830/src/Mod/Draft/Resources/ui/userprefs-import.ui
++++ freecad-0.13.1830/src/Mod/Draft/Resources/ui/userprefs-import.ui
+@@ -536,7 +536,7 @@
+ </layout>
+ </widget>
+ <layoutdefault spacing="6" margin="11"/>
+- <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
++ <pixmapfunction></pixmapfunction>
+ <customwidgets>
+ <customwidget>
+ <class>Gui::FileChooser</class>
diff --git a/media-gfx/freecad/freecad-0.12.5284-r2.ebuild b/media-gfx/freecad/freecad-0.12.5284-r2.ebuild
new file mode 100644
index 00000000..dc7ea5b0
--- /dev/null
+++ b/media-gfx/freecad/freecad-0.12.5284-r2.ebuild
@@ -0,0 +1,91 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-gfx/freecad/freecad-0.12.5284-r2.ebuild,v 1.7 2013/03/07 15:54:35 axs Exp $
+
+EAPI=4
+PYTHON_DEPEND=2
+
+inherit base multilib fortran-2 flag-o-matic python cmake-utils
+
+MY_P="freecad-${PV}"
+MY_PD="FreeCAD-${PV}"
+
+DESCRIPTION="QT based Computer Aided Design application"
+HOMEPAGE="http://sourceforge.net/apps/mediawiki/free-cad/"
+SRC_URI="mirror://sourceforge/free-cad/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="
+ dev-cpp/eigen:3
+ dev-games/ode
+ dev-libs/boost
+ dev-libs/libf2c
+ dev-libs/xerces-c[icu]
+ dev-python/pivy
+ dev-python/PyQt4[svg]
+ media-libs/coin
+ media-libs/SoQt
+ >=sci-libs/opencascade-6.3-r3
+ sci-libs/gts
+ sys-libs/zlib
+ virtual/glu
+ dev-qt/qtgui:4
+ dev-qt/qtopengl:4
+ dev-qt/qtsvg:4
+ dev-qt/qtwebkit:4
+ dev-qt/qtxmlpatterns:4"
+DEPEND="${RDEPEND}
+ >=dev-lang/swig-2.0.4-r1"
+
+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
+
+S="${WORKDIR}/${MY_PD}"
+
+PATCHES=(
+ "${FILESDIR}/${P}-gcc46.patch"
+ "${FILESDIR}/${P}-removeoldswig.patch"
+ "${FILESDIR}/${P}-glu.patch"
+ "${FILESDIR}/${P}-nodir.patch"
+ "${FILESDIR}/${P}-nopivy.patch"
+ "${FILESDIR}/${P}-qt3support.patch"
+ "${FILESDIR}/${P}-boost148.patch"
+)
+
+pkg_setup() {
+ fortran-2_pkg_setup
+ python_set_active_version 2
+}
+
+src_prepare() {
+ base_src_prepare
+ append-cxxflags -fpermissive
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DOCC_INCLUDE_DIR=${CASROOT}/inc
+ -DOCC_INCLUDE_PATH=${CASROOT}/inc
+ -DOCC_LIBRARY=${CASROOT}/lib/libTKernel.so
+ -DOCC_LIBRARY_DIR=${CASROOT}/lib
+ -DOCC_LIB_PATH=${CASROOT}/lib
+ -DCOIN3D_INCLUDE_DIR=/usr/include/coin
+ -DCOIN3D_LIBRARY=/usr/$(get_libdir)/libCoin.so
+ -DSOQT_LIBRARY=/usr/$(get_libdir)/libSoQt.so
+ -DSOQT_INCLUDE_PATH=/usr/include/coin
+ )
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ find "${D}" -name "*.la" -exec rm {} +
+
+ dodoc README.Linux ChangeLog.txt
+}
diff --git a/media-gfx/freecad/freecad-0.12.5284-r3.ebuild b/media-gfx/freecad/freecad-0.12.5284-r3.ebuild
new file mode 100644
index 00000000..ca4375ba
--- /dev/null
+++ b/media-gfx/freecad/freecad-0.12.5284-r3.ebuild
@@ -0,0 +1,128 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-gfx/freecad/freecad-0.12.5284-r3.ebuild,v 1.1 2013/04/27 22:49:15 xmw Exp $
+
+EAPI=5
+
+PYTHON_DEPEND=2
+
+inherit eutils multilib fortran-2 python cmake-utils
+
+DESCRIPTION="QT based Computer Aided Design application"
+HOMEPAGE="http://sourceforge.net/apps/mediawiki/free-cad/"
+SRC_URI="mirror://sourceforge/free-cad/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="dev-cpp/eigen:3
+ dev-games/ode
+ dev-libs/boost
+ dev-libs/libf2c
+ dev-libs/libspnav[X]
+ dev-libs/xerces-c[icu]
+ dev-python/PyQt4[svg]
+ dev-python/pivy
+ dev-qt/qtgui:4
+ dev-qt/qtopengl:4
+ dev-qt/qtsvg:4
+ dev-qt/qtwebkit:4
+ dev-qt/qtxmlpatterns:4
+ media-libs/SoQt
+ media-libs/coin[doc]
+ sci-libs/gts
+ sci-libs/opencascade
+ sys-libs/zlib
+ virtual/glu"
+DEPEND="${RDEPEND}
+ >=dev-lang/swig-2.0.4-r1:0"
+
+# 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"
+
+S="${WORKDIR}/FreeCAD-${PV}"
+
+pkg_setup() {
+ fortran-2_pkg_setup
+ python_set_active_version 2
+}
+
+src_prepare() {
+ einfo remove bundled libs
+ rm -rf src/3rdParty/{Pivy{,-0.5},boost}
+ einfo cleanup build system
+ find . -name "configure*" -print -delete
+
+ epatch \
+ "${FILESDIR}"/${P}-gcc46.patch \
+ "${FILESDIR}"/${P}-removeoldswig.patch \
+ "${FILESDIR}"/${P}-glu.patch \
+ "${FILESDIR}"/${P}-nodir.patch \
+ "${FILESDIR}"/${P}-qt3support.patch \
+ "${FILESDIR}"/${P}-boost148.patch \
+ "${FILESDIR}"/${P}-nopivy.patch \
+ "${FILESDIR}"/${P}-no-permissive.patch
+
+ local my_cas_version=$(eselect opencascadee show 2>/dev/null || echo 6.5)
+ if [ "${my_cas_version}" > "6.5.0" ] ; then
+ epatch "${FILESDIR}"/${P}-occ-6.5.5.patch
+ epatch "${FILESDIR}"/${P}-salomesmesh-occ-6.5.5.patch
+ fi
+
+ local my_coin_version=$(best_version media-libs/coin)
+ local my_coin_path="${EROOT}"usr/share/doc/${my_coin_version##*/}/html
+ sed -e "s:/usr/share/doc/libcoin60-doc/html:${my_coin_path}:" \
+ -i cMake/FindCoin3DDoc.cmake || die
+
+ sed -e '/FREECAD_BUILD_FEM/s: ON): OFF):' \
+ -i CMakeLists.txt || die
+ #sed -e '/add_subdirectory(Fem)/d' \
+ # -e '/add_subdirectory(MeshPart)/d' \
+ # -i src/Mod/CMakeLists.txt || die
+}
+
+src_configure() {
+ local my_occ_env=${EROOT}etc/env.d/50opencascade
+ if [ -e "${EROOT}etc//env.d/51opencascade" ] ; then
+ my_occ_env=${EROOT}etc/env.d/51opencascade
+ fi
+ export CASROOT=$(sed -ne '/^CASROOT=/{s:.*=:: ; p}' $my_occ_env)
+
+ local mycmakeargs=(
+ -DOCC_INCLUDE_DIR="${CASROOT}"/inc
+ -DOCC_INCLUDE_PATH="${CASROOT}"/inc
+ -DOCC_LIBRARY="${CASROOT}"/lib/libTKernel.so
+ -DOCC_LIBRARY_DIR="${CASROOT}"/lib
+ -DOCC_LIB_PATH="${CASROOT}"/lib
+ -DCOIN3D_INCLUDE_DIR="${EROOT}"usr/include/coin
+ -DCOIN3D_LIBRARY="${EROOT}"usr/$(get_libdir)/libCoin.so
+ -DSOQT_LIBRARY="${EROOT}"usr/$(get_libdir)/libSoQt.so
+ -DSOQT_INCLUDE_PATH="${EROOT}"usr/include/coin
+ -DCMAKE_INSTALL_PREFIX="${EROOT}"usr/$(get_libdir)/${P}
+ )
+ cmake-utils_src_configure
+ ewarn "${P} will be built against opencascade version ${CASROOT}"
+}
+
+src_install() {
+ cmake-utils_src_install
+ insinto /usr/$(get_libdir)/${P}/Mod/Start
+ doins -r src/Mod/Start/StartPage
+
+ prune_libtool_files
+
+ make_wrapper FreeCAD \
+ "${EROOT}"usr/$(get_libdir)/${P}/bin/FreeCAD \
+ "" "${EROOT}"usr/$(get_libdir)/${P}/lib
+ make_wrapper FreeCADCmd \
+ "${EROOT}"usr/$(get_libdir)/${P}/bin/FreeCADCmd \
+ "" "${EROOT}"usr/$(get_libdir)/${P}/lib
+
+ newicon src/Main/icon.ico ${PN}.ico
+ make_desktop_entry FreeCAD
+
+ dodoc README.Linux ChangeLog.txt
+}
diff --git a/media-gfx/freecad/freecad-0.13.1830.ebuild b/media-gfx/freecad/freecad-0.13.1830.ebuild
new file mode 100644
index 00000000..6dfc820a
--- /dev/null
+++ b/media-gfx/freecad/freecad-0.13.1830.ebuild
@@ -0,0 +1,88 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-gfx/freecad/freecad-0.13.1830.ebuild,v 1.2 2013/05/09 08:36:38 xmw Exp $
+
+EAPI=5
+
+PYTHON_DEPEND=2
+
+inherit eutils multilib fortran-2 python cmake-utils
+
+DESCRIPTION="QT based Computer Aided Design application"
+HOMEPAGE="http://www.freecadweb.org/"
+SRC_URI="mirror://sourceforge/free-cad/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS=""
+IUSE=""
+
+RDEPEND="dev-cpp/eigen:3
+ dev-games/ode
+ dev-libs/boost
+ dev-libs/libf2c
+ dev-libs/libspnav[X]
+ dev-libs/xerces-c[icu]
+ dev-python/PyQt4[svg]
+ dev-python/pivy
+ dev-qt/qtgui:4
+ dev-qt/qtopengl:4
+ dev-qt/qtsvg:4
+ dev-qt/qtwebkit:4
+ dev-qt/qtxmlpatterns:4
+ media-libs/SoQt
+ media-libs/coin[doc]
+ sci-libs/gts
+ sci-libs/opencascade
+ sys-libs/zlib
+ virtual/glu"
+DEPEND="${RDEPEND}
+ >=dev-lang/swig-2.0.4-r1:0"
+
+# 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"
+
+pkg_setup() {
+ fortran-2_pkg_setup
+ python_set_active_version 2
+}
+
+src_prepare() {
+ einfo remove bundled libs
+ rm -rf src/3rdParty
+
+ epatch "${FILESDIR}"/${P}-remove-qt3-support.patch
+}
+
+src_configure() {
+ local my_occ_env=${EROOT}etc/env.d/50opencascade
+ if [ -e "${EROOT}etc//env.d/51opencascade" ] ; then
+ my_occ_env=${EROOT}etc/env.d/51opencascade
+ fi
+ export CASROOT=$(sed -ne '/^CASROOT=/{s:.*=:: ; p}' $my_occ_env)
+
+ local mycmakeargs=(
+ -DOCC_INCLUDE_DIR="${CASROOT}"/inc
+ -DOCC_INCLUDE_PATH="${CASROOT}"/inc
+ -DOCC_LIBRARY="${CASROOT}"/lib/libTKernel.so
+ -DOCC_LIBRARY_DIR="${CASROOT}"/lib
+ -DOCC_LIB_PATH="${CASROOT}"/lib
+ -DCOIN3D_INCLUDE_DIR="${EROOT}"usr/include/coin
+ -DCOIN3D_LIBRARY="${EROOT}"usr/$(get_libdir)/libCoin.so
+ -DSOQT_LIBRARY="${EROOT}"usr/$(get_libdir)/libSoQt.so
+ -DSOQT_INCLUDE_PATH="${EROOT}"usr/include/coin
+ -DCMAKE_BINARY_DIR="${EROOT}"usr/bin
+ -DCMAKE_INSTALL_PREFIX="${EROOT}"usr/$(get_libdir)/${P}
+ )
+ cmake-utils_src_configure
+ ewarn "${P} will be built against opencascade version ${CASROOT}"
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ prune_libtool_files
+
+ dodoc README.Linux ChangeLog.txt
+}
diff --git a/media-gfx/freecad/freecad-9999.ebuild b/media-gfx/freecad/freecad-9999.ebuild
new file mode 100644
index 00000000..305d3633
--- /dev/null
+++ b/media-gfx/freecad/freecad-9999.ebuild
@@ -0,0 +1,107 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-gfx/freecad/freecad-0.11.3729.ebuild,v 1.6 2011/11/13 20:13:27 dilfridge Exp $
+
+EAPI=3
+
+PYTHON_DEPEND=2
+
+inherit base eutils fortran-2 multilib autotools flag-o-matic python git-2
+
+MY_P="freecad-${PV}"
+MY_PD="FreeCAD-${PV}"
+
+DESCRIPTION="QT based Computer Aided Design application"
+HOMEPAGE="http://sourceforge.net/apps/mediawiki/free-cad/"
+EGIT_REPO_URI="git://free-cad.git.sourceforge.net/gitroot/free-cad/free-cad"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="soqt assembly sandbox cam loginfo"
+
+RDEPEND="
+ dev-cpp/eigen
+ dev-games/ode
+ dev-libs/boost
+ dev-libs/xerces-c
+ dev-python/pivy
+ dev-python/PyQt4[svg]
+ media-libs/coin
+ soqt? ( media-libs/SoQt )
+ >=sci-libs/opencascade-6.3
+ sci-libs/gts
+ sys-libs/zlib
+ virtual/fortran
+ x11-libs/qt-gui:4
+ x11-libs/qt-opengl:4
+ x11-libs/qt-svg:4
+ x11-libs/qt-webkit:4
+ x11-libs/qt-xmlpatterns:4
+ x11-libs/qt-qt3support:4"
+DEPEND="${RDEPEND}
+ dev-lang/swig"
+
+#PATCHES=( "${FILESDIR}/${P}-asneeded.patch" )
+
+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
+
+S="${WORKDIR}/${MY_PD}"
+
+pkg_setup() {
+ fortran-2_pkg_setup
+ python_set_active_version 2
+}
+
+src_prepare() {
+ base_src_prepare
+ ./autogen.sh
+ eautoreconf
+}
+
+src_configure() {
+ if use assembly ; then
+ --enable-assembly
+ fi
+ if use sandbox ; then
+ --enable-sandbox
+ fi
+ if use cam ; then
+ --enable-cam
+ fi
+ if use loginfo ; then
+ --enable-loginfo
+ fi
+ if ! use soqt ; then
+ --without-soqt
+ fi
+ append-cflags "-DBOOST_FILESYSTEM_VERSION=2"
+ append-cppflags "-DBOOST_FILESYSTEM_VERSION=2"
+ append-cxxflags "-DBOOST_FILESYSTEM_VERSION=2"
+ econf \
+ --with-qt4-include="${EPREFIX}"/usr/include/qt4 \
+ --with-qt4-bin="${EPREFIX}"//usr/bin \
+ --with-qt4-lib="${EPREFIX}"//usr/$(get_libdir)/qt4 \
+ --with-occ-include=${CASROOT}/inc \
+ --with-occ-lib=${CASROOT}/lib
+}
+
+src_compile() {
+ #For compilation safety keep j1
+ MAKEOPTS="-j1" base_src_compile
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "install failed"
+
+ find "${D}" -name "*.la" -exec rm {} +
+
+ dodoc README.Linux ChangeLog.txt || die
+
+ dodir /usr/share/apps/freecad || die
+ mv "${D}/usr/share/freecad.xpm" "${D}/usr/share/apps/freecad/" || die
+
+ make_desktop_entry FreeCAD FreeCAD /usr/share/apps/freecad/freecad.xpm
+}