summaryrefslogtreecommitdiff
path: root/media-gfx/freecad
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /media-gfx/freecad
reinit the tree, so we can have metadata
Diffstat (limited to 'media-gfx/freecad')
-rw-r--r--media-gfx/freecad/Manifest16
-rw-r--r--media-gfx/freecad/files/freecad-0.14.3702-install-paths.patch21
-rw-r--r--media-gfx/freecad/files/freecad-0.15.4671-boost-1.60.patch16
-rw-r--r--media-gfx/freecad/files/freecad.sharedmimeinfo8
-rw-r--r--media-gfx/freecad/freecad-0.15.4671.ebuild145
-rw-r--r--media-gfx/freecad/freecad-0.16-r1.ebuild132
-rw-r--r--media-gfx/freecad/freecad-0.16.6712.ebuild132
-rw-r--r--media-gfx/freecad/freecad-0.16.ebuild135
-rw-r--r--media-gfx/freecad/freecad-0.17_pre.ebuild132
-rw-r--r--media-gfx/freecad/freecad-9999.ebuild129
-rw-r--r--media-gfx/freecad/metadata.xml12
11 files changed, 878 insertions, 0 deletions
diff --git a/media-gfx/freecad/Manifest b/media-gfx/freecad/Manifest
new file mode 100644
index 000000000000..3b8034bb8db0
--- /dev/null
+++ b/media-gfx/freecad/Manifest
@@ -0,0 +1,16 @@
+AUX freecad-0.14.3702-install-paths.patch 1143 SHA256 3a16c5568f88e5a92a0b4d3c567a4851a9411b402ee6008443db371afd3f9270 SHA512 12181e4b48e4fb6284b574cb9872af713323d8f229a6c1746424968b0d22300bd6ada6437854a730dd4c5310eb36ebb06a35375ab012d36e9d3af4fb4271d884 WHIRLPOOL e4b7a3e3522929102c8658b0fabdeb571b2c9fec720f11923a5b327d6ef7b85a0dc20e958dce1d1caa1b49e228136cc7f7816d026750cdedbdd9ef8d63e500dd
+AUX freecad-0.15.4671-boost-1.60.patch 887 SHA256 2e7005e2590dd08dce0705e45a925c618c39034a181d5e38461d688f3384fbbf SHA512 c8874d2cd7afa968f50c9491fc3682682b208990affe9dd8596a1f512040eadbc66680806a3d361cb716e87267d7e7b066b5b74b2e448eb4e18b41a5b0e6519e WHIRLPOOL 88574fc42baa2660eee420edb5bc574c7ea2c6755a7f350456d56ec6b92449daa51b33c543d973c4d4fc9f8aa2b6ad023cd5346228fffe1e67ab822d504fd640
+AUX freecad.sharedmimeinfo 312 SHA256 269e6b38d4a5f4e593e9e1e911ccd0185a1cb7a0250ae2a308cfc482e56615f1 SHA512 bb55cad8387032af0e06ce7f1b4cab4354a34a915b9f550de25e05bf24d4161d9ea152d5692d65df4b362622f76a11d78894deaf7fee60c7a3fc0bfec38fa10c WHIRLPOOL e4185b2d067d5e9b7a0b065b5cc6a92da055f96b610bdee5aecd28f379abe2a31feddccc5ccc6222978d5fbf73a7734a880cfd1f62a8383fa828d90147856081
+DIST freecad-0.15.4671.tar.gz 93680347 SHA256 8dda8f355cb59866a55c9c6096f39a3ebc5347892284db4c305352cc9be03bbc SHA512 695081117b5511bbc0b7335b63a8760e164987a6dff2c5b0dc86b6b0a93bb7d7b83aa9f4fab1d66d7d2c917a42b0135af78553b463579873a1d1e52e3dd9aecb WHIRLPOOL 0c351ad9ee360dfd9af54af9cc348a6ba3d8c15b6743667f6943e41aa252cec9bd2149baa32fceeceac65660a9b629aefba3c80a5c3a84c45a8d502323547287
+DIST freecad-0.16.6712.tar.gz 111706423 SHA256 97aa130addeb0f3c0bf79e4828fbd242b76cc92603771d6b7aeb9dbd9f111a92 SHA512 ea8214b37f7a10a3e3e558e6c1223d9212d6c2906b79961c8cb9211edff97a41e2da0ce6cf64cdc7a22610f6ff13495163c46573b5dd84d4a7cc0260f15e371e WHIRLPOOL 2c6f9e3afeb83befbaeb8d51ddf8272ab21473f8ef73095eebe5985a4f1979bb67767c3fca30ebdc853dfbdcd207e2a58e41f323d6ca8ff9502ee2aef9b33850
+DIST freecad-0.16.tar.gz 111706127 SHA256 6cc71ab4b0dc60b493d3aaa4b42f1ce1af9d4fcd539309ab0792804579e18e09 SHA512 bc9dc8122cabd9a84f2b955746818e0d77ae90e68747ec96521099472b7803df9ff794ed823d6eb29352bd0538b8f01cf81c306ff427f1af2ee049f8f7096dbb WHIRLPOOL 8d90a4213808dcd7ce7adeaeac8a30351e06b217e31326817cb034ec02dcfe7be0ea71cb5bf297e1bab3a8a6c6ac24848f51a0453f9bf09162e700bc52f9cf4d
+DIST freecad-0.17_pre.tar.gz 111704401 SHA256 25648fbaac8a96d7e63d8881fbc79f1829eff2852927e427cfe6d5f4f60a4f95 SHA512 a826a549d842ba322f7ec5f786d402e81f5b916008be450bacefb7ee976e203427130938c036cc6fca6ea11a8df0ab9b4a39f3bdfedc3cc1a7d31e7a5d11e142 WHIRLPOOL 959c90ad8bc70f063a98bbd03c2bf3c84c8f8bd0ea534120811d59cf9b8f017bdca62538ff226bfc4b326155b435cd948fe5a207a97a237e971a96c99a8756c6
+EBUILD freecad-0.15.4671.ebuild 4167 SHA256 35effdc439c45011ced3f37192447af7ef37288cf5a2f6df783b2b96f9b5523c SHA512 c49ca10b5fc1eac27427646fa80631845737736166dde138075feca8f49745d6d78810427978047ce48cbd24190bd4ca5211a87218a3a8fa1497d9e575d3d9ba WHIRLPOOL 196b774513684529d44b60c33951074936c34a5d1ebb9a60678a88a4e06fedfa9cbdc0424704252e35b307c5e133c44190aecb4425fc2b9353f7a54695676729
+EBUILD freecad-0.16-r1.ebuild 3605 SHA256 81c960e69043c2b91556668671d4aaa0e15a6b11e5bb9032bf387ec4c36b1c5c SHA512 052dbf79436202e14348fed93a98323ce694a63ebc8bb37a1236628998d78b4eacc37a9800388c390efc3e2dbb8e6fbd3a7a8ea2f3a049e39d6ffee8e4f41312 WHIRLPOOL f7186cdf33f747eea7ed33c76baf0d00245cb74f00e6f3697ad4d906f07f9841798f699fcf1af1a202af31765451122228a607cee142cf13f90f699d4fe79d57
+EBUILD freecad-0.16.6712.ebuild 3605 SHA256 81c960e69043c2b91556668671d4aaa0e15a6b11e5bb9032bf387ec4c36b1c5c SHA512 052dbf79436202e14348fed93a98323ce694a63ebc8bb37a1236628998d78b4eacc37a9800388c390efc3e2dbb8e6fbd3a7a8ea2f3a049e39d6ffee8e4f41312 WHIRLPOOL f7186cdf33f747eea7ed33c76baf0d00245cb74f00e6f3697ad4d906f07f9841798f699fcf1af1a202af31765451122228a607cee142cf13f90f699d4fe79d57
+EBUILD freecad-0.16.ebuild 3817 SHA256 826b909b3b5bb157e95e51de091b2d9a6da752939e9f6be9ef4fae7c9db38a5e SHA512 08fd5ffe8f6eb966739a973e8d77abca751027fd42299671f9fe0426b5ae9a0f9ae00510c2329b614d801333938825776bf084a5b9e5d48ae948d92868024f54 WHIRLPOOL 31d348a3c1c36ae010336c56858ce7ba22d25d79c5ff8fcbd148b52f5191f478092ca281239daba32e72696181f75be33bca87093758789219e68882f6892af3
+EBUILD freecad-0.17_pre.ebuild 3605 SHA256 81c960e69043c2b91556668671d4aaa0e15a6b11e5bb9032bf387ec4c36b1c5c SHA512 052dbf79436202e14348fed93a98323ce694a63ebc8bb37a1236628998d78b4eacc37a9800388c390efc3e2dbb8e6fbd3a7a8ea2f3a049e39d6ffee8e4f41312 WHIRLPOOL f7186cdf33f747eea7ed33c76baf0d00245cb74f00e6f3697ad4d906f07f9841798f699fcf1af1a202af31765451122228a607cee142cf13f90f699d4fe79d57
+EBUILD freecad-9999.ebuild 3723 SHA256 f412f8250587b8beee7f72d4720ccc62260dae5bbda4ebccfb2012b38f1500f6 SHA512 1f4612b7853f4b17c4fde893ecc8049a3298bf484f7e59a26df06d9fac25050e483a015d71b4af354594e4d37f1b17af5678564fa5425e1441db3f0254a1b24d WHIRLPOOL 2e1a82b841e5a9c12637f1c043ddae9aa90d49d18632f4622159693b76cd54bc8d641c35bdf585a6628c30c42aff5ec4540ca41a860275f894afb00e0e24a2f8
+MISC ChangeLog 7579 SHA256 81de15a5b8177c7015034b0e14bd7e5f9e2c8580b2d1396a0bcc0777598ec37c SHA512 ec6690a90a3f33371be45ab61a251cebcfd3c41856a112e0dce94267ef6820ef394e8bf2ba1d7a88fdb2900e26103c999a702270018b555f32e91dce72311e26 WHIRLPOOL 54907b8549b1d2cdca17579f73ee70fa5b5d3b86e3fb1d9bdbdd1a8efa7d9faccf0cc900b794610edffb8ce000828a2b9ab320516ed85133e222a24eb6beba64
+MISC ChangeLog-2015 6633 SHA256 4dd83dd00805ac6dceaec8c4d18f572eaf467d50775afad61369420f53d9a971 SHA512 dec9d93aee021e7dc5bebe7b279c3e50506b48b8291d21037d9a609e8ffcacf1b19efd29f7ae2ec2bef0343e9f5442927b3ba2cdf212c61eb02e324026519a27 WHIRLPOOL 6ca7fcadf36ada57b4b23978d3ca9951e901f589b1d111a868ad3e45f6cbfbe8438de26bea9ce2ed8373adc1db40a3037ca4f87f56d3185734082661b04ecda4
+MISC metadata.xml 376 SHA256 c2dc08e9c6a05c6ac5940444ee00f05e4300670d4d47d0e15bccaf277455a4e6 SHA512 2b159882b18f33adc78ede30133528a915130d21fcfd111a099861b2ee719b59338cd81af63a289bb5812ce04dee238a6eb4596a95a5abedbc453f631e827f53 WHIRLPOOL 3a10b2f137ce880d2e73878ea2170ae1884ed18c9184962b419144474c73c207fdeab1af20c908265ac0eb275beeb99d2a60c988619fce39eba629d2d1d5a573
diff --git a/media-gfx/freecad/files/freecad-0.14.3702-install-paths.patch b/media-gfx/freecad/files/freecad-0.14.3702-install-paths.patch
new file mode 100644
index 000000000000..d042695e88c6
--- /dev/null
+++ b/media-gfx/freecad/files/freecad-0.14.3702-install-paths.patch
@@ -0,0 +1,21 @@
+--- freecad-0.14.3702/CMakeLists.txt
++++ freecad-0.14.3702/CMakeLists.txt
+@@ -69,9 +69,15 @@
+ SET(CMAKE_INSTALL_PREFIX "/usr/lib${LIB_SUFFIX}/freecad" CACHE PATH "Installation root directory")
+ endif(WIN32)
+
+-SET(CMAKE_INSTALL_DATADIR data CACHE PATH "Output directory for data and resource files")
+-SET(CMAKE_INSTALL_INCLUDEDIR include CACHE PATH "Output directory for header files")
+-SET(CMAKE_INSTALL_DOCDIR doc CACHE PATH "Output directory for documentation and license files")
++if(NOT CMAKE_INSTALL_DATADIR)
++ SET(CMAKE_INSTALL_DATADIR data CACHE PATH "Output directory for data and resource files")
++endif(NOT CMAKE_INSTALL_DATADIR)
++if(NOT CMAKE_INSTALL_INCLUDEDIR)
++ SET(CMAKE_INSTALL_INCLUDEDIR include CACHE PATH "Output directory for header files")
++endif(NOT CMAKE_INSTALL_INCLUDEDIR)
++if(NOT CMAKE_INSTALL_DOCDIR)
++ SET(CMAKE_INSTALL_DOCDIR doc CACHE PATH "Output directory for documentation and license files")
++endif(NOT CMAKE_INSTALL_DOCDIR)
+ # Don't set it without manual adaption of LibDir variable in src/App/FreeCADInit.py
+ SET(CMAKE_INSTALL_LIBDIR lib CACHE PATH "Output directory for libraries")
+
diff --git a/media-gfx/freecad/files/freecad-0.15.4671-boost-1.60.patch b/media-gfx/freecad/files/freecad-0.15.4671-boost-1.60.patch
new file mode 100644
index 000000000000..4a7dbabdfc55
--- /dev/null
+++ b/media-gfx/freecad/files/freecad-0.15.4671-boost-1.60.patch
@@ -0,0 +1,16 @@
+From e0683f4db0fb56f8139f78ca2e500b21ec2a67f0 Mon Sep 17 00:00:00 2001
+From: wmayer <wmayer@users.sourceforge.net>
+Date: Mon, 28 Dec 2015 13:54:40 +0100
+Subject: [PATCH] + fixes #0002347: freecad fails to build with Boost 1.60.0
+
+--- freecad-0.15.4671/src/Mod/Drawing/App/FeaturePage.cpp
++++ freecad-0.15.4671/src/Mod/Drawing/App/FeaturePage.cpp
+@@ -195,7 +195,7 @@
+ if (count < editText.size()) {
+ // change values of editable texts
+ boost::regex e2 ("(<text.*?freecad:editable=\""+what[1].str()+"\".*?<tspan.*?)>(.*?)(</tspan>)");
+- boost::re_detail::string_out_iterator<std::string > out(newfragment);
++ std::back_insert_iterator<std::string> out(newfragment);
+ boost::regex_replace(out, begin, what[0].second, e2, "$1>"+editText[count]+"$3");
+ }
+ count++;
diff --git a/media-gfx/freecad/files/freecad.sharedmimeinfo b/media-gfx/freecad/files/freecad.sharedmimeinfo
new file mode 100644
index 000000000000..6d5e93e7d13c
--- /dev/null
+++ b/media-gfx/freecad/files/freecad.sharedmimeinfo
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>
+ <mime-type type="application/x-extension-fcstd">
+ <!-- <sub-class-of type="application/zip"/> -->
+ <comment>FreeCAD document files</comment>
+ <glob pattern="*.fcstd"/>
+ </mime-type>
+</mime-info>
diff --git a/media-gfx/freecad/freecad-0.15.4671.ebuild b/media-gfx/freecad/freecad-0.15.4671.ebuild
new file mode 100644
index 000000000000..32e4afa27353
--- /dev/null
+++ b/media-gfx/freecad/freecad-0.15.4671.ebuild
@@ -0,0 +1,145 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit cmake-utils eutils fortran-2 multilib python-single-r1 fdo-mime
+
+DESCRIPTION="QT based Computer Aided Design application"
+HOMEPAGE="http://www.freecadweb.org/"
+SRC_URI="mirror://sourceforge/free-cad/${PN}_${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+COMMON_DEPEND="dev-cpp/eigen:3
+ dev-libs/boost
+ dev-libs/xerces-c[icu]
+ dev-python/matplotlib
+ dev-python/pyside:0[X]
+ dev-python/shiboken:0
+ dev-qt/designer:4
+ dev-qt/qtgui:4
+ dev-qt/qtopengl:4
+ dev-qt/qtsvg:4
+ dev-qt/qtwebkit:4
+ media-libs/coin
+ || ( sci-libs/opencascade:6.9.0[vtk] sci-libs/opencascade:6.8.0 sci-libs/opencascade:6.7.1 )
+ sys-libs/zlib
+ virtual/glu
+ ${PYTHON_DEPS}"
+RDEPEND="${COMMON_DEPEND}
+ dev-qt/assistant:4
+ dev-python/pivy
+ dev-python/numpy"
+DEPEND="${COMMON_DEPEND}
+ dev-python/pyside-tools:0
+ >=dev-lang/swig-2.0.4-r1:0"
+
+# https://bugs.gentoo.org/show_bug.cgi?id=352435
+# https://www.gentoo.org/foundation/en/minutes/2011/20110220_trustees.meeting_log.txt
+RESTRICT="bindist mirror"
+
+# TODO:
+# DEPEND and RDEPEND:
+# salome-smesh - science overlay
+# zipio++ - not in portage yet
+
+pkg_setup() {
+ fortran-2_pkg_setup
+ python-single-r1_pkg_setup
+
+ [ -z "${CASROOT}" ] && die "empty \$CASROOT, run eselect opencascade set or define otherwise"
+}
+
+src_prepare() {
+ einfo remove bundled libs
+ rm -rf src/3rdParty/{boost,Pivy*}
+
+ epatch "${FILESDIR}"/${PN}-0.14.3702-install-paths.patch \
+ "${FILESDIR}"/${P}-boost-1.60.patch
+
+ #bug 518996
+ sed -e "/LibDir = /s:'lib':'"$(get_libdir)"':g" \
+ -i src/App/FreeCADInit.py || die
+
+}
+
+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="${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}
+ -DCMAKE_INSTALL_DATADIR="${EROOT}"usr/share/${P}/
+ -DCMAKE_INSTALL_DOCDIR="${EROOT}"usr/share/doc/${P}/
+ -DCMAKE_INSTALL_INCLUDEDIR="${EROOT}"usr/include/${P}/
+ -DFREECAD_USE_EXTERNAL_PIVY="ON"
+ -DFREECAD_BUILD_FEM="OFF"
+ )
+
+ # TODO to remove embedded dependencies:
+ #
+ # -DFREECAD_USE_EXTERNAL_ZIPIOS="ON" -- this option needs zipios++ but it's not yet in portage so the embedded zipios++
+ # (under src/zipios++) will be used
+ # salomesmesh is in 3rdparty but upstream's find_package function is not complete yet to compile against external version
+ # (external salomesmesh is available in "science" overlay)
+
+ cmake-utils_src_configure
+ ewarn "${P} will be built against opencascade version ${CASROOT}"
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ 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
+
+ make_desktop_entry FreeCAD "FreeCAD" "" "" "MimeType=application/x-extension-fcstd;"
+
+ dodoc README.Linux ChangeLog.txt
+
+ # install mimetype for FreeCAD files
+ insinto /usr/share/mime/packages
+ newins "${FILESDIR}"/${PN}.sharedmimeinfo "${PN}.xml"
+
+ # install icons to correct place rather than /usr/share/freecad
+ pushd "${ED}/usr/share/${P}"
+ for size in 16 32 48 64; do
+ newicon -s ${size} freecad-icon-${size}.png freecad.png
+ done
+ doicon -s scalable freecad.svg
+ newicon -s 64 -c mimetypes freecad-doc.png application-x-extension-fcstd.png
+ popd
+
+ # disable compression of QT assistant help files
+ >> "${ED}"usr/share/doc/${P}/freecad.qhc.ecompress.skip
+ >> "${ED}"usr/share/doc/${P}/freecad.qch.ecompress.skip
+
+ python_optimize "${ED}"usr/{$(get_libdir),share}/${P}/Mod/
+}
+
+pkg_postinst() {
+ fdo-mime_mime_database_update
+}
+
+pkg_postrm() {
+ fdo-mime_mime_database_update
+}
diff --git a/media-gfx/freecad/freecad-0.16-r1.ebuild b/media-gfx/freecad/freecad-0.16-r1.ebuild
new file mode 100644
index 000000000000..e1f0300bd890
--- /dev/null
+++ b/media-gfx/freecad/freecad-0.16-r1.ebuild
@@ -0,0 +1,132 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit cmake-utils eutils xdg-utils fortran-2 python-single-r1
+
+DESCRIPTION="QT based Computer Aided Design application"
+HOMEPAGE="http://www.freecadweb.org/"
+
+if [[ ${PV} == *9999 ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/FreeCAD/FreeCAD.git"
+else
+ SRC_URI="https://github.com/FreeCAD/FreeCAD/archive/${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE=""
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+COMMON_DEPEND="
+ ${PYTHON_DEPS}
+ dev-cpp/eigen:3
+ dev-java/xerces
+ dev-libs/boost:=[python,${PYTHON_USEDEP}]
+ dev-libs/xerces-c[icu]
+ dev-python/matplotlib[${PYTHON_USEDEP}]
+ dev-python/pyside:0[X,svg,${PYTHON_USEDEP}]
+ dev-python/shiboken:0[${PYTHON_USEDEP}]
+ dev-qt/designer:4
+ dev-qt/qtgui:4[-egl]
+ dev-qt/qtopengl:4[-egl]
+ dev-qt/qtsvg:4
+ dev-qt/qtwebkit:4
+ media-libs/coin
+ media-libs/freetype
+ || ( sci-libs/opencascade:6.9.1[vtk] sci-libs/opencascade:6.9.0[vtk] sci-libs/opencascade:6.8.0 sci-libs/opencascade:6.7.1 )
+ sci-libs/orocos_kdl
+ sys-libs/zlib
+ virtual/glu"
+RDEPEND="${COMMON_DEPEND}
+ dev-python/numpy[${PYTHON_USEDEP}]
+ dev-python/pivy[${PYTHON_USEDEP}]
+ dev-qt/assistant:4"
+DEPEND="${COMMON_DEPEND}
+ >=dev-lang/swig-2.0.4-r1:0
+ dev-python/pyside-tools:0[${PYTHON_USEDEP}]"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-0.14.3702-install-paths.patch
+)
+
+# https://bugs.gentoo.org/show_bug.cgi?id=352435
+# https://www.gentoo.org/foundation/en/minutes/2011/20110220_trustees.meeting_log.txt
+RESTRICT="mirror"
+
+# TODO:
+# DEPEND and RDEPEND:
+# salome-smesh - science overlay
+# zipio++ - not in portage yet
+
+S="${WORKDIR}/FreeCAD-${PV}"
+
+DOCS=( README.md ChangeLog.txt )
+
+pkg_setup() {
+ fortran-2_pkg_setup
+ python-single-r1_pkg_setup
+
+ [[ -z ${CASROOT} ]] && die "empty \$CASROOT, run eselect opencascade set or define otherwise"
+}
+
+src_configure() {
+ export QT_SELECT=4
+
+ #-DOCC_* defined with cMake/FindOpenCasCade.cmake
+ #-DCOIN3D_* defined with cMake/FindCoin3D.cmake
+ #-DSOQT_ not used
+ local mycmakeargs=(
+ -DOCC_INCLUDE_DIR="${CASROOT}"/inc
+ -DOCC_LIBRARY_DIR="${CASROOT}"/$(get_libdir)
+ -DCMAKE_INSTALL_DATADIR=share/${P}
+ -DCMAKE_INSTALL_DOCDIR=share/doc/${PF}
+ -DCMAKE_INSTALL_INCLUDEDIR=include/${P}
+ -DFREECAD_USE_EXTERNAL_KDL="ON"
+ )
+
+ # TODO to remove embedded dependencies:
+ #
+ # -DFREECAD_USE_EXTERNAL_ZIPIOS="ON" -- this option needs zipios++ but it's not yet in portage so the embedded zipios++
+ # (under src/zipios++) will be used
+ # salomesmesh is in 3rdparty but upstream's find_package function is not complete yet to compile against external version
+ # (external salomesmesh is available in "science" overlay)
+
+ cmake-utils_src_configure
+ einfo "${P} will be built against opencascade version ${CASROOT}"
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ make_desktop_entry FreeCAD "FreeCAD" "" "" "MimeType=application/x-extension-fcstd;"
+
+ # install mimetype for FreeCAD files
+ insinto /usr/share/mime/packages
+ newins "${FILESDIR}"/${PN}.sharedmimeinfo "${PN}.xml"
+
+ # install icons to correct place rather than /usr/share/freecad
+ pushd "${ED%/}"/usr/share/${P} || die
+ local size
+ for size in 16 32 48 64; do
+ newicon -s ${size} freecad-icon-${size}.png freecad.png
+ done
+ doicon -s scalable freecad.svg
+ newicon -s 64 -c mimetypes freecad-doc.png application-x-extension-fcstd.png
+ popd || die
+
+ python_optimize "${ED%/}"/usr/{,share/${P}/}Mod/
+}
+
+pkg_postinst() {
+ xdg_mimeinfo_database_update
+}
+
+pkg_postrm() {
+ xdg_mimeinfo_database_update
+}
diff --git a/media-gfx/freecad/freecad-0.16.6712.ebuild b/media-gfx/freecad/freecad-0.16.6712.ebuild
new file mode 100644
index 000000000000..e1f0300bd890
--- /dev/null
+++ b/media-gfx/freecad/freecad-0.16.6712.ebuild
@@ -0,0 +1,132 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit cmake-utils eutils xdg-utils fortran-2 python-single-r1
+
+DESCRIPTION="QT based Computer Aided Design application"
+HOMEPAGE="http://www.freecadweb.org/"
+
+if [[ ${PV} == *9999 ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/FreeCAD/FreeCAD.git"
+else
+ SRC_URI="https://github.com/FreeCAD/FreeCAD/archive/${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE=""
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+COMMON_DEPEND="
+ ${PYTHON_DEPS}
+ dev-cpp/eigen:3
+ dev-java/xerces
+ dev-libs/boost:=[python,${PYTHON_USEDEP}]
+ dev-libs/xerces-c[icu]
+ dev-python/matplotlib[${PYTHON_USEDEP}]
+ dev-python/pyside:0[X,svg,${PYTHON_USEDEP}]
+ dev-python/shiboken:0[${PYTHON_USEDEP}]
+ dev-qt/designer:4
+ dev-qt/qtgui:4[-egl]
+ dev-qt/qtopengl:4[-egl]
+ dev-qt/qtsvg:4
+ dev-qt/qtwebkit:4
+ media-libs/coin
+ media-libs/freetype
+ || ( sci-libs/opencascade:6.9.1[vtk] sci-libs/opencascade:6.9.0[vtk] sci-libs/opencascade:6.8.0 sci-libs/opencascade:6.7.1 )
+ sci-libs/orocos_kdl
+ sys-libs/zlib
+ virtual/glu"
+RDEPEND="${COMMON_DEPEND}
+ dev-python/numpy[${PYTHON_USEDEP}]
+ dev-python/pivy[${PYTHON_USEDEP}]
+ dev-qt/assistant:4"
+DEPEND="${COMMON_DEPEND}
+ >=dev-lang/swig-2.0.4-r1:0
+ dev-python/pyside-tools:0[${PYTHON_USEDEP}]"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-0.14.3702-install-paths.patch
+)
+
+# https://bugs.gentoo.org/show_bug.cgi?id=352435
+# https://www.gentoo.org/foundation/en/minutes/2011/20110220_trustees.meeting_log.txt
+RESTRICT="mirror"
+
+# TODO:
+# DEPEND and RDEPEND:
+# salome-smesh - science overlay
+# zipio++ - not in portage yet
+
+S="${WORKDIR}/FreeCAD-${PV}"
+
+DOCS=( README.md ChangeLog.txt )
+
+pkg_setup() {
+ fortran-2_pkg_setup
+ python-single-r1_pkg_setup
+
+ [[ -z ${CASROOT} ]] && die "empty \$CASROOT, run eselect opencascade set or define otherwise"
+}
+
+src_configure() {
+ export QT_SELECT=4
+
+ #-DOCC_* defined with cMake/FindOpenCasCade.cmake
+ #-DCOIN3D_* defined with cMake/FindCoin3D.cmake
+ #-DSOQT_ not used
+ local mycmakeargs=(
+ -DOCC_INCLUDE_DIR="${CASROOT}"/inc
+ -DOCC_LIBRARY_DIR="${CASROOT}"/$(get_libdir)
+ -DCMAKE_INSTALL_DATADIR=share/${P}
+ -DCMAKE_INSTALL_DOCDIR=share/doc/${PF}
+ -DCMAKE_INSTALL_INCLUDEDIR=include/${P}
+ -DFREECAD_USE_EXTERNAL_KDL="ON"
+ )
+
+ # TODO to remove embedded dependencies:
+ #
+ # -DFREECAD_USE_EXTERNAL_ZIPIOS="ON" -- this option needs zipios++ but it's not yet in portage so the embedded zipios++
+ # (under src/zipios++) will be used
+ # salomesmesh is in 3rdparty but upstream's find_package function is not complete yet to compile against external version
+ # (external salomesmesh is available in "science" overlay)
+
+ cmake-utils_src_configure
+ einfo "${P} will be built against opencascade version ${CASROOT}"
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ make_desktop_entry FreeCAD "FreeCAD" "" "" "MimeType=application/x-extension-fcstd;"
+
+ # install mimetype for FreeCAD files
+ insinto /usr/share/mime/packages
+ newins "${FILESDIR}"/${PN}.sharedmimeinfo "${PN}.xml"
+
+ # install icons to correct place rather than /usr/share/freecad
+ pushd "${ED%/}"/usr/share/${P} || die
+ local size
+ for size in 16 32 48 64; do
+ newicon -s ${size} freecad-icon-${size}.png freecad.png
+ done
+ doicon -s scalable freecad.svg
+ newicon -s 64 -c mimetypes freecad-doc.png application-x-extension-fcstd.png
+ popd || die
+
+ python_optimize "${ED%/}"/usr/{,share/${P}/}Mod/
+}
+
+pkg_postinst() {
+ xdg_mimeinfo_database_update
+}
+
+pkg_postrm() {
+ xdg_mimeinfo_database_update
+}
diff --git a/media-gfx/freecad/freecad-0.16.ebuild b/media-gfx/freecad/freecad-0.16.ebuild
new file mode 100644
index 000000000000..cbe390dc0c69
--- /dev/null
+++ b/media-gfx/freecad/freecad-0.16.ebuild
@@ -0,0 +1,135 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit cmake-utils eutils fdo-mime fortran-2 python-single-r1
+
+DESCRIPTION="QT based Computer Aided Design application"
+HOMEPAGE="http://www.freecadweb.org/"
+
+if [[ ${PV} == *9999 ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/FreeCAD/FreeCAD.git"
+else
+ SRC_URI="https://github.com/FreeCAD/FreeCAD/archive/${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE=""
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+#sci-libs/orocos_kdl waiting for Bug 604130 (keyword ~x86)
+#dev-qt/qtgui:4[-egl] and dev-qt/qtopengl:4[-egl] : Bug 564978
+#dev-python/pyside[svg] : Bug 591012
+COMMON_DEPEND="
+ ${PYTHON_DEPS}
+ dev-cpp/eigen:3
+ dev-java/xerces
+ dev-libs/boost:=[python,${PYTHON_USEDEP}]
+ dev-libs/xerces-c[icu]
+ dev-python/matplotlib[${PYTHON_USEDEP}]
+ dev-python/pyside:0[X,svg,${PYTHON_USEDEP}]
+ dev-python/shiboken:0[${PYTHON_USEDEP}]
+ dev-qt/designer:4
+ dev-qt/qtgui:4[-egl]
+ dev-qt/qtopengl:4[-egl]
+ dev-qt/qtsvg:4
+ dev-qt/qtwebkit:4
+ media-libs/coin
+ media-libs/freetype
+ || ( sci-libs/opencascade:6.9.1[vtk] sci-libs/opencascade:6.9.0[vtk] sci-libs/opencascade:6.8.0 sci-libs/opencascade:6.7.1 )
+ sys-libs/zlib
+ virtual/glu"
+RDEPEND="${COMMON_DEPEND}
+ dev-python/numpy[${PYTHON_USEDEP}]
+ dev-python/pivy[${PYTHON_USEDEP}]
+ dev-qt/assistant:4"
+DEPEND="${COMMON_DEPEND}
+ >=dev-lang/swig-2.0.4-r1:0
+ dev-python/pyside-tools:0[${PYTHON_USEDEP}]"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-0.14.3702-install-paths.patch
+)
+
+# https://bugs.gentoo.org/show_bug.cgi?id=352435
+# https://www.gentoo.org/foundation/en/minutes/2011/20110220_trustees.meeting_log.txt
+RESTRICT="mirror"
+
+# TODO:
+# DEPEND and RDEPEND:
+# salome-smesh - science overlay
+# zipio++ - not in portage yet
+
+S="${WORKDIR}/FreeCAD-${PV}"
+
+DOCS=( README.md ChangeLog.txt )
+
+pkg_setup() {
+ fortran-2_pkg_setup
+ python-single-r1_pkg_setup
+
+ [[ -z ${CASROOT} ]] && die "empty \$CASROOT, run eselect opencascade set or define otherwise"
+}
+
+src_configure() {
+ export QT_SELECT=4
+
+ #-DOCC_* defined with cMake/FindOpenCasCade.cmake
+ #-DCOIN3D_* defined with cMake/FindCoin3D.cmake
+ #-DSOQT_ not used
+ #-DFREECAD_USE_EXTERNAL_KDL="ON" waiting for Bug 604130 (keyword ~x86)
+ local mycmakeargs=(
+ -DOCC_INCLUDE_DIR="${CASROOT}"/inc
+ -DOCC_LIBRARY_DIR="${CASROOT}"/$(get_libdir)
+ -DCMAKE_INSTALL_DATADIR=share/${P}
+ -DCMAKE_INSTALL_DOCDIR=share/doc/${PF}
+ -DCMAKE_INSTALL_INCLUDEDIR=include/${P}
+ -DFREECAD_USE_EXTERNAL_KDL="OFF"
+ )
+
+ # TODO to remove embedded dependencies:
+ #
+ # -DFREECAD_USE_EXTERNAL_ZIPIOS="ON" -- this option needs zipios++ but it's not yet in portage so the embedded zipios++
+ # (under src/zipios++) will be used
+ # salomesmesh is in 3rdparty but upstream's find_package function is not complete yet to compile against external version
+ # (external salomesmesh is available in "science" overlay)
+
+ cmake-utils_src_configure
+ einfo "${P} will be built against opencascade version ${CASROOT}"
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ make_desktop_entry FreeCAD "FreeCAD" "" "" "MimeType=application/x-extension-fcstd;"
+
+ # install mimetype for FreeCAD files
+ insinto /usr/share/mime/packages
+ newins "${FILESDIR}"/${PN}.sharedmimeinfo "${PN}.xml"
+
+ # install icons to correct place rather than /usr/share/freecad
+ pushd "${ED%/}"/usr/share/${P} || die
+ local size
+ for size in 16 32 48 64; do
+ newicon -s ${size} freecad-icon-${size}.png freecad.png
+ done
+ doicon -s scalable freecad.svg
+ newicon -s 64 -c mimetypes freecad-doc.png application-x-extension-fcstd.png
+ popd || die
+
+ python_optimize "${ED%/}"/usr/{,share/${P}/}Mod/
+}
+
+pkg_postinst() {
+ fdo-mime_mime_database_update
+}
+
+pkg_postrm() {
+ fdo-mime_mime_database_update
+}
diff --git a/media-gfx/freecad/freecad-0.17_pre.ebuild b/media-gfx/freecad/freecad-0.17_pre.ebuild
new file mode 100644
index 000000000000..e1f0300bd890
--- /dev/null
+++ b/media-gfx/freecad/freecad-0.17_pre.ebuild
@@ -0,0 +1,132 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit cmake-utils eutils xdg-utils fortran-2 python-single-r1
+
+DESCRIPTION="QT based Computer Aided Design application"
+HOMEPAGE="http://www.freecadweb.org/"
+
+if [[ ${PV} == *9999 ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/FreeCAD/FreeCAD.git"
+else
+ SRC_URI="https://github.com/FreeCAD/FreeCAD/archive/${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE=""
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+COMMON_DEPEND="
+ ${PYTHON_DEPS}
+ dev-cpp/eigen:3
+ dev-java/xerces
+ dev-libs/boost:=[python,${PYTHON_USEDEP}]
+ dev-libs/xerces-c[icu]
+ dev-python/matplotlib[${PYTHON_USEDEP}]
+ dev-python/pyside:0[X,svg,${PYTHON_USEDEP}]
+ dev-python/shiboken:0[${PYTHON_USEDEP}]
+ dev-qt/designer:4
+ dev-qt/qtgui:4[-egl]
+ dev-qt/qtopengl:4[-egl]
+ dev-qt/qtsvg:4
+ dev-qt/qtwebkit:4
+ media-libs/coin
+ media-libs/freetype
+ || ( sci-libs/opencascade:6.9.1[vtk] sci-libs/opencascade:6.9.0[vtk] sci-libs/opencascade:6.8.0 sci-libs/opencascade:6.7.1 )
+ sci-libs/orocos_kdl
+ sys-libs/zlib
+ virtual/glu"
+RDEPEND="${COMMON_DEPEND}
+ dev-python/numpy[${PYTHON_USEDEP}]
+ dev-python/pivy[${PYTHON_USEDEP}]
+ dev-qt/assistant:4"
+DEPEND="${COMMON_DEPEND}
+ >=dev-lang/swig-2.0.4-r1:0
+ dev-python/pyside-tools:0[${PYTHON_USEDEP}]"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-0.14.3702-install-paths.patch
+)
+
+# https://bugs.gentoo.org/show_bug.cgi?id=352435
+# https://www.gentoo.org/foundation/en/minutes/2011/20110220_trustees.meeting_log.txt
+RESTRICT="mirror"
+
+# TODO:
+# DEPEND and RDEPEND:
+# salome-smesh - science overlay
+# zipio++ - not in portage yet
+
+S="${WORKDIR}/FreeCAD-${PV}"
+
+DOCS=( README.md ChangeLog.txt )
+
+pkg_setup() {
+ fortran-2_pkg_setup
+ python-single-r1_pkg_setup
+
+ [[ -z ${CASROOT} ]] && die "empty \$CASROOT, run eselect opencascade set or define otherwise"
+}
+
+src_configure() {
+ export QT_SELECT=4
+
+ #-DOCC_* defined with cMake/FindOpenCasCade.cmake
+ #-DCOIN3D_* defined with cMake/FindCoin3D.cmake
+ #-DSOQT_ not used
+ local mycmakeargs=(
+ -DOCC_INCLUDE_DIR="${CASROOT}"/inc
+ -DOCC_LIBRARY_DIR="${CASROOT}"/$(get_libdir)
+ -DCMAKE_INSTALL_DATADIR=share/${P}
+ -DCMAKE_INSTALL_DOCDIR=share/doc/${PF}
+ -DCMAKE_INSTALL_INCLUDEDIR=include/${P}
+ -DFREECAD_USE_EXTERNAL_KDL="ON"
+ )
+
+ # TODO to remove embedded dependencies:
+ #
+ # -DFREECAD_USE_EXTERNAL_ZIPIOS="ON" -- this option needs zipios++ but it's not yet in portage so the embedded zipios++
+ # (under src/zipios++) will be used
+ # salomesmesh is in 3rdparty but upstream's find_package function is not complete yet to compile against external version
+ # (external salomesmesh is available in "science" overlay)
+
+ cmake-utils_src_configure
+ einfo "${P} will be built against opencascade version ${CASROOT}"
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ make_desktop_entry FreeCAD "FreeCAD" "" "" "MimeType=application/x-extension-fcstd;"
+
+ # install mimetype for FreeCAD files
+ insinto /usr/share/mime/packages
+ newins "${FILESDIR}"/${PN}.sharedmimeinfo "${PN}.xml"
+
+ # install icons to correct place rather than /usr/share/freecad
+ pushd "${ED%/}"/usr/share/${P} || die
+ local size
+ for size in 16 32 48 64; do
+ newicon -s ${size} freecad-icon-${size}.png freecad.png
+ done
+ doicon -s scalable freecad.svg
+ newicon -s 64 -c mimetypes freecad-doc.png application-x-extension-fcstd.png
+ popd || die
+
+ python_optimize "${ED%/}"/usr/{,share/${P}/}Mod/
+}
+
+pkg_postinst() {
+ xdg_mimeinfo_database_update
+}
+
+pkg_postrm() {
+ xdg_mimeinfo_database_update
+}
diff --git a/media-gfx/freecad/freecad-9999.ebuild b/media-gfx/freecad/freecad-9999.ebuild
new file mode 100644
index 000000000000..b7e08d6c5823
--- /dev/null
+++ b/media-gfx/freecad/freecad-9999.ebuild
@@ -0,0 +1,129 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit cmake-utils eutils fdo-mime fortran-2 python-single-r1
+
+DESCRIPTION="QT based Computer Aided Design application"
+HOMEPAGE="http://www.freecadweb.org/"
+
+if [[ ${PV} == *9999 ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/FreeCAD/FreeCAD.git"
+else
+ SRC_URI="https://github.com/FreeCAD/FreeCAD/archive/${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE=""
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+#sci-libs/orocos_kdl waiting for Bug 604130 (keyword ~x86)
+#dev-qt/qtgui:4[-egl] and dev-qt/qtopengl:4[-egl] : Bug 564978
+#dev-python/pyside[svg] : Bug 591012
+COMMON_DEPEND="
+ ${PYTHON_DEPS}
+ dev-cpp/eigen:3
+ dev-java/xerces
+ dev-libs/boost:=[python,${PYTHON_USEDEP}]
+ dev-libs/xerces-c[icu]
+ dev-python/matplotlib[${PYTHON_USEDEP}]
+ dev-python/pyside:0[X,svg,${PYTHON_USEDEP}]
+ dev-python/shiboken:0[${PYTHON_USEDEP}]
+ dev-qt/designer:4
+ dev-qt/qtgui:4[-egl]
+ dev-qt/qtopengl:4[-egl]
+ dev-qt/qtsvg:4
+ dev-qt/qtwebkit:4
+ media-libs/coin
+ media-libs/freetype
+ || ( sci-libs/opencascade:6.9.1[vtk] sci-libs/opencascade:6.9.0[vtk] sci-libs/opencascade:6.8.0 sci-libs/opencascade:6.7.1 )
+ sys-libs/zlib
+ virtual/glu"
+RDEPEND="${COMMON_DEPEND}
+ dev-python/numpy[${PYTHON_USEDEP}]
+ dev-python/pivy[${PYTHON_USEDEP}]
+ dev-qt/assistant:4"
+DEPEND="${COMMON_DEPEND}
+ >=dev-lang/swig-2.0.4-r1:0
+ dev-python/pyside-tools:0[${PYTHON_USEDEP}]"
+
+# https://bugs.gentoo.org/show_bug.cgi?id=352435
+# https://www.gentoo.org/foundation/en/minutes/2011/20110220_trustees.meeting_log.txt
+RESTRICT="mirror"
+
+# TODO:
+# DEPEND and RDEPEND:
+# salome-smesh - science overlay
+# zipio++ - not in portage yet
+
+DOCS=( README.md ChangeLog.txt )
+
+pkg_setup() {
+ fortran-2_pkg_setup
+ python-single-r1_pkg_setup
+
+ [[ -z ${CASROOT} ]] && die "empty \$CASROOT, run eselect opencascade set or define otherwise"
+}
+
+src_configure() {
+ export QT_SELECT=4
+
+ #-DOCC_* defined with cMake/FindOpenCasCade.cmake
+ #-DCOIN3D_* defined with cMake/FindCoin3D.cmake
+ #-DSOQT_ not used
+ #-DFREECAD_USE_EXTERNAL_KDL="ON" waiting for Bug 604130 (keyword ~x86)
+ local mycmakeargs=(
+ -DOCC_INCLUDE_DIR="${CASROOT}"/inc
+ -DOCC_LIBRARY_DIR="${CASROOT}"/$(get_libdir)
+ -DCMAKE_INSTALL_DATADIR=share/${P}
+ -DCMAKE_INSTALL_DOCDIR=share/doc/${PF}
+ -DCMAKE_INSTALL_INCLUDEDIR=include/${P}
+ -DFREECAD_USE_EXTERNAL_KDL="OFF"
+ )
+
+ # TODO to remove embedded dependencies:
+ #
+ # -DFREECAD_USE_EXTERNAL_ZIPIOS="ON" -- this option needs zipios++ but it's not yet in portage so the embedded zipios++
+ # (under src/zipios++) will be used
+ # salomesmesh is in 3rdparty but upstream's find_package function is not complete yet to compile against external version
+ # (external salomesmesh is available in "science" overlay)
+
+ cmake-utils_src_configure
+ einfo "${P} will be built against opencascade version ${CASROOT}"
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ make_desktop_entry FreeCAD "FreeCAD" "" "" "MimeType=application/x-extension-fcstd;"
+
+ # install mimetype for FreeCAD files
+ insinto /usr/share/mime/packages
+ newins "${FILESDIR}"/${PN}.sharedmimeinfo "${PN}.xml"
+
+ # install icons to correct place rather than /usr/share/freecad
+ pushd "${ED%/}"/usr/share/${P} || die
+ local size
+ for size in 16 32 48 64; do
+ newicon -s ${size} freecad-icon-${size}.png freecad.png
+ done
+ doicon -s scalable freecad.svg
+ newicon -s 64 -c mimetypes freecad-doc.png application-x-extension-fcstd.png
+ popd || die
+
+ python_optimize "${ED%/}"/usr/{,share/${P}/}Mod/
+}
+
+pkg_postinst() {
+ fdo-mime_mime_database_update
+}
+
+pkg_postrm() {
+ fdo-mime_mime_database_update
+}
diff --git a/media-gfx/freecad/metadata.xml b/media-gfx/freecad/metadata.xml
new file mode 100644
index 000000000000..fd959a35b4fb
--- /dev/null
+++ b/media-gfx/freecad/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>xmw@gentoo.org</email>
+ <name>Michael Weber</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">free-cad</remote-id>
+ <remote-id type="github">FreeCAD/FreeCAD</remote-id>
+ </upstream>
+</pkgmetadata>