summaryrefslogtreecommitdiff
path: root/media-gfx/freecad
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-03-20 00:40:44 +0000
committerV3n3RiX <venerix@koprulu.sector>2022-03-20 00:40:44 +0000
commit4cbcc855382a06088e2f016f62cafdbcb7e40665 (patch)
tree356496503d52354aa6d9f2d36126302fed5f3a73 /media-gfx/freecad
parentfcc5224904648a8e6eb528d7603154160a20022f (diff)
gentoo resync : 20.03.2022
Diffstat (limited to 'media-gfx/freecad')
-rw-r--r--media-gfx/freecad/Manifest12
-rw-r--r--media-gfx/freecad/files/99freecad1
-rw-r--r--media-gfx/freecad/files/freecad-0.19.2-0001-Backport-of-0004809-Security-vulnerability-in-DWG-im.patch59
-rw-r--r--media-gfx/freecad/files/freecad-0.19.2-0002-Backport-of-Use-run-instead-of-Popen-to-avoid-need-f.patch25
-rw-r--r--media-gfx/freecad/files/freecad-0.19.4-Gentoo-specific-don-t-check-vcs.patch20
-rw-r--r--media-gfx/freecad/freecad-0.19.2-r7.ebuild (renamed from media-gfx/freecad/freecad-0.19.2-r5.ebuild)6
-rw-r--r--media-gfx/freecad/freecad-0.19.4.ebuild323
-rw-r--r--media-gfx/freecad/freecad-9999.ebuild4
-rw-r--r--media-gfx/freecad/metadata.xml8
9 files changed, 447 insertions, 11 deletions
diff --git a/media-gfx/freecad/Manifest b/media-gfx/freecad/Manifest
index 6500fcd4c52d..8297418982dd 100644
--- a/media-gfx/freecad/Manifest
+++ b/media-gfx/freecad/Manifest
@@ -1,13 +1,17 @@
-AUX 99freecad 82 BLAKE2B b0b4f8f9013952f686cd1e626efe221f3efa127c1417f8ce77fc640da439ac2bcd07a1b73f97ae52ee1fa1b77a21812f534b710d1ace63ca7e8093e76b6f5049 SHA512 c78d71004f103785ffe1133fea71c0baf5f1bad1037051e1c3a279b9fc8a346c7ec578b1508c1608470de8c199f7fd46378f2e851b01834e7749738c8eb70598
AUX freecad-0.19.1-0001-Gentoo-specific-Remove-ccache-usage.patch 797 BLAKE2B 1bd09caaa265e370b70efe9dd23171a61a98920d659c2f19bb3ec07bf77b1d59712c135f421bbc3164bec6c2b19ac0886185bb6200c45cefaaaea94d5cf54222 SHA512 b449fc466a22300c8a4b0a5b223d68b0ef4437512abcdf875580efc364570b157a55e283faa0ddaad5fd4ce98585bf6dd043b4e7a2a7aa86e98bdb9e8a846a30
+AUX freecad-0.19.2-0001-Backport-of-0004809-Security-vulnerability-in-DWG-im.patch 2739 BLAKE2B ba07c87c1d70671d57b0830bf5d38a9856a20e2405fbecbd9a8520628aa0cc7e6d7889d8650552ec35b41bad873a5af75300f232447fe90bfd7922e52aaa49e5 SHA512 36d881cc5d93354fae442b096a5ce4f5a500a05a40a062be9a0d36b209318ee5ed66506136c7c0ce7d2849b97e41079d7d2916849bfc2499d4e5eadbbb5718a6
AUX freecad-0.19.2-0001-fix-failing-test-workbench-testcase.patch 896 BLAKE2B f733e1bc8a95c87f0a831aba37616a36937909931005e5759f9ea63c84daaa5c742d43c9fe50023387a390bee69071f004faec2f4b081629e22a31ebc84c366c SHA512 0f30a2cc6a9fad0fdc94b90170ff6c0ef3817cb1f3b9d2c2bd3a9d7fdbd4ccfc22093b68ba9831682a5592d3bf2d064de94a81429be2ab71e041aa1561cab46d
+AUX freecad-0.19.2-0002-Backport-of-Use-run-instead-of-Popen-to-avoid-need-f.patch 1040 BLAKE2B 0b290afff96093958fb34dd6d71302bb9a28e02b1d2620f9424f3a70a444ca27292887e4786516f10452e6d345c0645d306f696ae06d43d874b874b3cdf3131c SHA512 3e7f91fca5af0430dcac3512d5b8e84f9ad956b760073216f49601703076fcc7b23c0fe1c32a311be746b44343ff05cc2c33a8c422c71a3245d98cceb5837340
AUX freecad-0.19.2-0002-fix-femtest-failure-with-yaml-load.patch 907 BLAKE2B 154e46d923aa54f88d528eb460fc5b2caa16e536b66a126c7a2baf8c2227519bec2c831f5b0cc9bf9f7966e0c4be8edd807bbe0fb5a9019ac1d2da22f32d29a0 SHA512 a5e361bff8477e84f80837416635a3951d8b71f3cfcdb138d19bc7dd4c18961af6092a13c7a1925c7fc1e2ae1944fc7861ae2797050a7f5385987d2be8191ee2
AUX freecad-0.19.2-0003-fix-test-when-built-without-GUI.patch 842 BLAKE2B d1eef077e3290bb469786a62c36d66f46f5016b2ed34065c0c3aa20a82cb451bb8a7242c3504113d924de2564b03fb1c581684d4b9da1325228ad2d82704a116 SHA512 2df1ad94c735c5f38eec0bcc24bf11a1d1814e991539082259983601352603273ae502856e41c0c737d65f9a488a676894d2f4d4d93cf8e2cbb1c3752f99aa7b
AUX freecad-0.19.2-0006-add-boost-serialization-to-find_package.patch 1959 BLAKE2B 3863f4f311a4fba648d4503c6b3daecb87d233caea4ce7f22dff47f69435995ff422cd2ee97e8a491ddf85527b325d63543e041ccc91e5c844fede750c6764ef SHA512 b9af575349498393ee78e1c75247e736412d331fb872475c180c4828a6007f9a34ccd379eed8fe2551e53b88eee0b400202c63a1365df8b6069ce3b0727b2056
AUX freecad-0.19.2-0007-fix-build-failure-with-opencascade-7.5.2.patch 1054 BLAKE2B d6a67b22390b64ed566c49af6117de2f34e0f57094a069ccae6cd15da5fa3a53a4cd71d94bd65a201c60042893da713a2d397890c7b072b197e101697cd388fd SHA512 beecd51a4b59890cd162eb76b726bd1e82a32da387ed67d886293930175deaf014445afd4db93e262daa06ced5b6c267218e4d777bd32c940fbc8b057b077fa1
+AUX freecad-0.19.4-Gentoo-specific-don-t-check-vcs.patch 701 BLAKE2B 963afb463acc00fc20f2ed2aa356c0bb9df8b359fb350e948fa7b23df6cd65db521ebd76d74fda53ca76ce0ba89e7ea3737e1903f850c5a04271eaeba45e5eaf SHA512 457f58461744d42db81db6868498b583ba9a4f599cc0cc1d8e98dae50f2d9d91216cd9787548ae83db57b4a8d056e0267e70055d3fba6405f51de80355eef18f
AUX freecad-0.19_pre20201231-0003-Gentoo-specific-don-t-check-vcs.patch 881 BLAKE2B 8d8327a283fc46b9f195b4dfe68ac6594ed020154f5f65eab5fe86bde2d32bb3d1081fdf9c5d50e30c24ffdc0504a61c047088e24ab4c377aca6e8f5a14e9760 SHA512 17bdf85c6c25d38a46d643666cbf594f5d16952504344af34b1f4960b53a2a534ccac1594d6ae9b5f827fe3403e08a26edb0c40346a9837316307bd484f35088
DIST freecad-0.19.2-0005-Make-smesh-compile-with-vtk9.patch.xz 5368 BLAKE2B 69bafefd049effe3c31719bb2c23d32e8ba7ad58235c58ac8279ba6c036feaf1b97d5751cf2d68896e7489803103b2d0f92f76e61b3ccc97ef05a95b337ca5c2 SHA512 66585cc13fb3b0b026cf9dbd761c8ba1c1fe4d4f7db2e144ddd97706e02ccd78f4a43ac7cd93ddcae6e73933bf41d4cbd4d94bcdff8804b81378a6d946c7b070
DIST freecad-0.19.2.tar.gz 296987961 BLAKE2B 3c21359c71f7ac5a49cc4b4be437dfce02f2af73dfc526a3955547718ee41c461fc787d029a9a77374d58516d7c56fec6982fe6d38ab17fbc30c0a94929136bf SHA512 420f00e696725cbd31c936c47b6ac226d866a17c7b7683ad381b8dd5edaffc7dfb1a3c4238c08e8b4fd34ef0c08d7c244cb7797012e596df1ce0a4f6e3be6b72
-EBUILD freecad-0.19.2-r5.ebuild 10917 BLAKE2B 35866de96fe9b930182522f3728adad45342c15eacebfc798ff294b884b1fcbaebe9158765fd0d1bb2ae99b5894413cec1c6fecfb88e6ce7e64dee809f971840 SHA512 6fd55da6d9b1b4f0b6a68ae6dc1c2c1b40dedf298988dd873500a6da6ba02bc4eb8aeb6eff69f0bbc9e85e4b4ed63fc54e7cc87173c05ba745a28f3c094a523f
-EBUILD freecad-9999.ebuild 10642 BLAKE2B 2504f33a116f9d10dafcf611eba5673131141077898769011066540a59c9abf5f617f0ab6dad2a35ae2aa2c89295f1babbd4d8b651fb921042e90ddd85f50e85 SHA512 b9216438a9c59c2947945c97c5ff9eb2eb10971208f42e731767f11193e23862487ad8035b558f04a5913b22c1737cfc670ead890c0e1fbdd85974e09f4cca53
-MISC metadata.xml 3268 BLAKE2B 4e99f8237c96f96500ec15a0e175684f445c9a68e1080f6f61538ae4e99cb2afccc14d50c626c44764ea4362ed82cc2ccf74f8ae53d713d70b21860eeb39650d SHA512 fbc87f4a401c33de8033b54213026631a9f956918cc256eb9a10cec88b316f71fd98959c79f58acc3d4a75d28117097ea0cc4ee33f333923d4387e9d3af43bb5
+DIST freecad-0.19.4.tar.gz 296990652 BLAKE2B 6b252198616f7731144d000307a7f186eb2b24e07b85e008d0aae0f60a732fef5598c06c5c66b70fa44114f05afbc7d81b15c71bbb147bc2e458ea90cc81ee45 SHA512 58e5e6bb4ed40ce7f3a0b653cdb0371208189b9ca266f1c29a8f9077c4e56861b3925f695718fba34781254220f8a8919a2e2a501d43573b2c733f8b21c12c1f
+EBUILD freecad-0.19.2-r7.ebuild 11054 BLAKE2B 958c386dd6f8e86ac1d5eec415a79aa0001b09d0c5fcfe6dcf48e8e1b48d5d8d6b961585ed927953ce9021558faf8eef1670383d064825f9a610884f8400eaad SHA512 4a08af063a47342ba6542a8413ce8d2130c041b890e77082ce1607878c26ad5384bec2842fb3eead15b32760bf08b0e60be8ce4e6f977af337cadb2756c20d07
+EBUILD freecad-0.19.4.ebuild 10672 BLAKE2B 53f9583f83e44b4e28cbc0e4b1a804c974bc521caa9f0f35a0969e5fb110c718dd6c3c18da6ee2df8639dab84e7d342b6893eef13709a1576ee6685aa1274911 SHA512 0f5f1343adcb6f3904f154ff587b057ce4fb9b3047700ba7d513b48b141365640c62f18568490e2e4938a38f656520317526c9fcf27bcd41146821f37033ccda
+EBUILD freecad-9999.ebuild 10632 BLAKE2B a37db2eb95f92e06a8b8716a65f451a4c791438988835400ae6b3506244baa991accf75f608fe0510cd8d3a25b999012b905a426f4d74f8054f7bef89a947cb7 SHA512 5dbc6938dd3a1d0b7a8bae296b98265b4e3328162989f1eb30c996b5d45cd261f1efcd98b0b158531f7277ad137573ce8046779f92076af323a5f760c8507392
+MISC metadata.xml 3572 BLAKE2B 308315ae5d33f9d041aad9f5bc8dd8b9aa337a57849ca02408c3907c55775a039b229d6f67fc3921623d2efd366f38672fbcaa4c73785493a7c13c88379b680d SHA512 ecb435d74013ad1b14d3a7134c89b0f0a9364c98b61aad5559d4812abadb4330520122b82a2f843977a985dc342963f5712c6e537e0740a80a08a725d2d26614
diff --git a/media-gfx/freecad/files/99freecad b/media-gfx/freecad/files/99freecad
deleted file mode 100644
index 81104107c22e..000000000000
--- a/media-gfx/freecad/files/99freecad
+++ /dev/null
@@ -1 +0,0 @@
-PYTHONPATH=/usr/lib64/freecad/Ext:/usr/lib64/freecad/Mod:/usr/lib64/freecad/lib64
diff --git a/media-gfx/freecad/files/freecad-0.19.2-0001-Backport-of-0004809-Security-vulnerability-in-DWG-im.patch b/media-gfx/freecad/files/freecad-0.19.2-0001-Backport-of-0004809-Security-vulnerability-in-DWG-im.patch
new file mode 100644
index 000000000000..2df44ff66ac8
--- /dev/null
+++ b/media-gfx/freecad/files/freecad-0.19.2-0001-Backport-of-0004809-Security-vulnerability-in-DWG-im.patch
@@ -0,0 +1,59 @@
+From 4006e62860c73f0943e71c7da478256a7337941d Mon Sep 17 00:00:00 2001
+From: Bernd Waibel <waebbl-gentoo@posteo.net>
+Date: Mon, 31 Jan 2022 08:12:35 +0100
+Subject: [PATCH 1/2] Backport of 0004809: Security vulnerability in DWG import
+ when using ODA file converter
+
+Original patch commit id 1742d7ff82af1653253c4a4183c262c9af3b26d6 by
+wmayer <wmayer@users.sourceforge.net>.
+
+Signed-off-by: Bernd Waibel <waebbl-gentoo@posteo.net>
+--- a/src/Mod/Draft/importDWG.py
++++ b/src/Mod/Draft/importDWG.py
+@@ -44,8 +44,6 @@ https://knowledge.autodesk.com/support/autocad/downloads/
+ # * *
+ # ***************************************************************************
+
+-# TODO: use subprocess.popen() instead of subprocess.call()
+-
+ import six
+ import FreeCAD
+ from FreeCAD import Console as FCC
+@@ -217,15 +215,10 @@ def convertToDxf(dwgfilename):
+ indir = os.path.dirname(dwgfilename)
+ outdir = tempfile.mkdtemp()
+ basename = os.path.basename(dwgfilename)
+- cmdline = ('"%s" "%s" "%s" "ACAD2000" "DXF" "0" "1" "%s"'
+- % (teigha, indir, outdir, basename))
+- FCC.PrintMessage(translate("ImportDWG", "Converting: ")
+- + cmdline + "\n")
+- if six.PY2:
+- if isinstance(cmdline, six.text_type):
+- encoding = sys.getfilesystemencoding()
+- cmdline = cmdline.encode(encoding)
+- subprocess.call(cmdline, shell=True) # os.system(cmdline)
++ cmdline = [teigha, indir, outdir, "ACAD2000", "DXF", "0", "1", basename]
++ FCC.PrintMessage(translate("draft", "Converting:") + " " + str(cmdline) + "\n")
++ proc = subprocess.Popen(cmdline)
++ proc.communicate()
+ result = outdir + os.sep + os.path.splitext(basename)[0] + ".dxf"
+ if os.path.exists(result):
+ FCC.PrintMessage(translate("ImportDWG",
+@@ -270,10 +263,9 @@ def convertToDwg(dxffilename, dwgfilename):
+ indir = os.path.dirname(dxffilename)
+ outdir = os.path.dirname(dwgfilename)
+ basename = os.path.basename(dxffilename)
+- cmdline = ('"%s" "%s" "%s" "ACAD2000" "DWG" "0" "1" "%s"'
+- % (teigha, indir, outdir, basename))
+- FCC.PrintMessage(translate("ImportDWG", "Converting: ")
+- + cmdline + "\n")
+- subprocess.call(cmdline, shell=True) # os.system(cmdline)
++ cmdline = [teigha, indir, outdir, "ACAD2000", "DWG", "0", "1", basename]
++ FCC.PrintMessage(translate("draft", "Converting:") + " " + str(cmdline) + "\n")
++ proc = subprocess.Popen(cmdline)
++ proc.communicate()
+ return dwgfilename
+ return None
+--
+2.35.0
+
diff --git a/media-gfx/freecad/files/freecad-0.19.2-0002-Backport-of-Use-run-instead-of-Popen-to-avoid-need-f.patch b/media-gfx/freecad/files/freecad-0.19.2-0002-Backport-of-Use-run-instead-of-Popen-to-avoid-need-f.patch
new file mode 100644
index 000000000000..9b043bd34563
--- /dev/null
+++ b/media-gfx/freecad/files/freecad-0.19.2-0002-Backport-of-Use-run-instead-of-Popen-to-avoid-need-f.patch
@@ -0,0 +1,25 @@
+From 937d8ca9bf4c50f8a7dc0fbcf9e6ac23b0fbe033 Mon Sep 17 00:00:00 2001
+From: Bernd Waibel <waebbl-gentoo@posteo.net>
+Date: Mon, 31 Jan 2022 08:17:24 +0100
+Subject: [PATCH 2/2] Backport of Use run() instead of Popen() to avoid need
+ for communicate
+
+Original patch commit id a65dbc6f8296562a12407a36f4931a80bbb628b7 by
+sliptonic <shopinthewoods@gmail.com>
+
+Signed-off-by: Bernd Waibel <waebbl-gentoo@posteo.net>
+--- a/src/Mod/Path/PathScripts/PathSanity.py
++++ b/src/Mod/Path/PathScripts/PathSanity.py
+@@ -412,8 +412,7 @@ class CommandPathSanity:
+ FreeCAD.Console.PrintMessage('asciidoc file written to {}\n'.format(reportraw))
+
+ try:
+- result = os.system('asciidoctor {} -o {}'.format(reportraw,
+- reporthtml))
++ result = subprocess.run(["asciidoctor", reportraw, "-o", reporthtml])
+ if str(result) == "32512":
+ msg = "asciidoctor not found. html cannot be generated."
+ QtGui.QMessageBox.information(None, "Path Sanity", msg)
+--
+2.35.0
+
diff --git a/media-gfx/freecad/files/freecad-0.19.4-Gentoo-specific-don-t-check-vcs.patch b/media-gfx/freecad/files/freecad-0.19.4-Gentoo-specific-don-t-check-vcs.patch
new file mode 100644
index 000000000000..62ae92392adf
--- /dev/null
+++ b/media-gfx/freecad/files/freecad-0.19.4-Gentoo-specific-don-t-check-vcs.patch
@@ -0,0 +1,20 @@
+From 60ba533d21302b8a4c11ac06adb53b4041754b02 Mon Sep 17 00:00:00 2001
+From: Bernd Waibel <waebbl-gentoo@posteo.net>
+Date: Tue, 1 Mar 2022 18:22:00 +0100
+Subject: [PATCH] [Gentoo specific] don't check vcs
+
+Signed-off-by: Bernd Waibel <waebbl-gentoo@posteo.net>
+--- a/src/Tools/SubWCRev.py
++++ b/src/Tools/SubWCRev.py
+@@ -455,7 +455,7 @@ def main():
+ if o in ("-b", "--bindir"):
+ bindir = a
+
+- vcs=[GitControl(), DebianGitHub(), BazaarControl(), Subversion(), MercurialControl(), DebianChangelog(), UnknownControl()]
++ vcs=[UnknownControl()]
+ for i in vcs:
+ if i.extractInfo(srcdir, bindir):
+ # Open the template file and the version file
+--
+2.35.1
+
diff --git a/media-gfx/freecad/freecad-0.19.2-r5.ebuild b/media-gfx/freecad/freecad-0.19.2-r7.ebuild
index 7ebeed8e3168..aa2041fd5f01 100644
--- a/media-gfx/freecad/freecad-0.19.2-r5.ebuild
+++ b/media-gfx/freecad/freecad-0.19.2-r7.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -128,6 +128,8 @@ PATCHES=(
"${WORKDIR}"/${P}-0005-Make-smesh-compile-with-vtk9.patch
"${FILESDIR}"/${P}-0006-add-boost-serialization-to-find_package.patch
"${FILESDIR}"/${P}-0007-fix-build-failure-with-opencascade-7.5.2.patch
+ "${FILESDIR}"/${P}-0001-Backport-of-0004809-Security-vulnerability-in-DWG-im.patch
+ "${FILESDIR}"/${P}-0002-Backport-of-Use-run-instead-of-Popen-to-avoid-need-f.patch
)
DOCS=( CODE_OF_CONDUCT.md ChangeLog.txt README.md )
@@ -271,8 +273,6 @@ src_install() {
python_optimize "${ED}"/usr/share/${PN}/data/Mod/Start/StartPage "${ED}"/usr/$(get_libdir)/${PN}{/Ext,/Mod}/
# compile main package in python site-packages as well
python_optimize
-
- doenvd "${FILESDIR}/99${PN}"
}
pkg_postinst() {
diff --git a/media-gfx/freecad/freecad-0.19.4.ebuild b/media-gfx/freecad/freecad-0.19.4.ebuild
new file mode 100644
index 000000000000..cab7693eaacd
--- /dev/null
+++ b/media-gfx/freecad/freecad-0.19.4.ebuild
@@ -0,0 +1,323 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8,9} )
+
+inherit check-reqs cmake optfeature python-single-r1 xdg
+
+DESCRIPTION="QT based Computer Aided Design application"
+HOMEPAGE="https://www.freecadweb.org/ https://github.com/FreeCAD/FreeCAD"
+
+MY_PN=FreeCAD
+
+if [[ ${PV} = *9999 ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/${MY_PN}/${MY_PN}.git"
+ S="${WORKDIR}/freecad-${PV}"
+else
+ MY_PV=$(ver_cut 1-2)
+ MY_PV=$(ver_rs 1 '_' ${MY_PV})
+ SRC_URI="https://github.com/${MY_PN}/${MY_PN}/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz
+ https://raw.githubusercontent.com/waebbl/waebbl-gentoo/master/patches/${PN}-0.19.2-0005-Make-smesh-compile-with-vtk9.patch.xz"
+ KEYWORDS="~amd64"
+ S="${WORKDIR}/FreeCAD-${PV}"
+fi
+
+# code is licensed LGPL-2
+# examples are licensed CC-BY-SA (without note of specific version)
+LICENSE="LGPL-2 CC-BY-SA-4.0"
+SLOT="0"
+IUSE="debug headless pcl test"
+RESTRICT="!test? ( test )"
+
+FREECAD_EXPERIMENTAL_MODULES="cloud plot ship"
+FREECAD_STABLE_MODULES="addonmgr drawing fem idf image inspection
+ material openscad part-design path points raytracing robot show
+ surface techdraw tux"
+
+for module in ${FREECAD_STABLE_MODULES}; do
+ IUSE="${IUSE} +${module}"
+done
+for module in ${FREECAD_EXPERIMENTAL_MODULES}; do
+ IUSE="${IUSE} ${module}"
+done
+unset module
+
+RDEPEND="
+ ${PYTHON_DEPS}
+ dev-libs/OpenNI2[opengl(+)]
+ dev-libs/libspnav[X]
+ dev-libs/xerces-c[icu]
+ dev-qt/designer:5
+ dev-qt/qtconcurrent:5
+ dev-qt/qtcore:5
+ dev-qt/qtgui:5
+ dev-qt/qtnetwork:5
+ dev-qt/qtopengl:5
+ dev-qt/qtprintsupport:5
+ dev-qt/qtsvg:5
+ dev-qt/qtwebengine:5[widgets]
+ dev-qt/qtwidgets:5
+ dev-qt/qtx11extras:5
+ dev-qt/qtxml:5
+ >=media-libs/coin-4.0.0
+ media-libs/freetype
+ media-libs/qhull:=
+ sci-libs/flann[openmp]
+ sci-libs/hdf5:=[fortran,zlib]
+ >=sci-libs/med-4.0.0-r1[python,${PYTHON_SINGLE_USEDEP}]
+ <sci-libs/opencascade-7.6.0:=[vtk(+)]
+ sci-libs/orocos_kdl:=
+ sys-libs/zlib
+ virtual/glu
+ virtual/libusb:1
+ virtual/opengl
+ cloud? (
+ dev-libs/openssl:=
+ net-misc/curl
+ )
+ fem? ( sci-libs/vtk:=[boost(+),python,qt5,rendering,${PYTHON_SINGLE_USEDEP}] )
+ openscad? ( media-gfx/openscad )
+ pcl? ( >=sci-libs/pcl-1.8.1:=[opengl,openni2(+),qt5(+),vtk(+)] )
+ $(python_gen_cond_dep '
+ dev-libs/boost:=[python,threads(+),${PYTHON_USEDEP}]
+ dev-python/matplotlib[${PYTHON_USEDEP}]
+ dev-python/numpy[${PYTHON_USEDEP}]
+ >=dev-python/pivy-0.6.5[${PYTHON_USEDEP}]
+ dev-python/pybind11[${PYTHON_USEDEP}]
+ dev-python/pyside2[gui,svg,${PYTHON_USEDEP}]
+ dev-python/shiboken2[${PYTHON_USEDEP}]
+ addonmgr? ( dev-python/GitPython[${PYTHON_USEDEP}] )
+ fem? ( dev-python/ply[${PYTHON_USEDEP}] )
+ ')
+"
+DEPEND="
+ ${RDEPEND}
+ >=dev-cpp/eigen-3.3.1:3
+"
+BDEPEND="
+ app-text/dos2unix
+ dev-lang/swig
+"
+
+# To get required dependencies:
+# 'grep REQUIRES_MODS cMake/FreeCAD_Helpers/CheckInterModuleDependencies.cmake'
+# We set the following requirements by default:
+# arch, draft, drawing, import, mesh, part, qt5, sketcher, spreadsheet, start, web.
+#
+# Additionally, we auto-enable mesh_part, flat_mesh and smesh
+# Fem actually needs smesh, but as long as we don't have a smesh package, we enable
+# smesh through the mesh USE flag. Note however, the fem<-smesh dependency isn't
+# reflected by the REQUIRES_MODS macro, but at
+# cMake/FreeCAD_Helpers/InitializeFreeCADBuildOptions.cmake:187.
+#
+# The increase in auto-enabled workbenches is due to their need in parts of the
+# test suite when compiled with a minimal set of USE flags.
+REQUIRED_USE="
+ ${PYTHON_REQUIRED_USE}
+ inspection? ( points )
+ path? ( robot )
+ ship? ( image plot )
+ techdraw? ( drawing )
+"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-Gentoo-specific-don-t-check-vcs.patch
+ "${FILESDIR}"/${PN}-0.19.1-0001-Gentoo-specific-Remove-ccache-usage.patch
+ "${WORKDIR}"/${PN}-0.19.2-0005-Make-smesh-compile-with-vtk9.patch
+ "${FILESDIR}"/${PN}-0.19.2-0006-add-boost-serialization-to-find_package.patch
+)
+
+DOCS=( CODE_OF_CONDUCT.md ChangeLog.txt README.md )
+
+CHECKREQS_DISK_BUILD="2G"
+
+pkg_setup() {
+ check-reqs_pkg_setup
+ python-single-r1_pkg_setup
+ [[ -z ${CASROOT} ]] && die "\${CASROOT} not set, plesae run eselect opencascade"
+}
+
+src_prepare() {
+ # the upstream provided file doesn't find the coin doc tag file,
+ # but cmake ships a working one, so we use this.
+ rm "${S}/cMake/FindCoin3D.cmake" || die
+
+ # Fix desktop file
+ sed -e 's/Exec=FreeCAD/Exec=freecad/' -i src/XDGData/org.freecadweb.FreeCAD.desktop || die
+
+ find "${S}" -type f -exec dos2unix -q {} \; || die "failed to convert to unix line endings"
+
+ cmake_src_prepare
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DBUILD_ADDONMGR=$(usex addonmgr)
+ -DBUILD_ARCH=ON
+ -DBUILD_ASSEMBLY=OFF # deprecated
+ -DBUILD_CLOUD=$(usex cloud)
+ -DBUILD_COMPLETE=OFF # deprecated
+ -DBUILD_DRAFT=ON
+ -DBUILD_DRAWING=$(usex drawing)
+ -DBUILD_ENABLE_CXX_STD:STRING="C++17" # needed for >=boost-1.77.0
+ -DBUILD_FEM=$(usex fem)
+ -DBUILD_FEM_NETGEN=OFF
+ -DBUILD_FLAT_MESH=ON
+ -DBUILD_FORCE_DIRECTORY=ON # force building in a dedicated directory
+ -DBUILD_FREETYPE=ON # automagic dep
+ -DBUILD_GUI=$(usex !headless)
+ -DBUILD_IDF=$(usex idf)
+ -DBUILD_IMAGE=$(usex image)
+ -DBUILD_IMPORT=ON # import module for various file formats
+ -DBUILD_INSPECTION=$(usex inspection)
+ -DBUILD_JTREADER=OFF # code has been removed upstream, but option is still there
+ -DBUILD_MATERIAL=$(usex material)
+ -DBUILD_MESH=ON
+ -DBUILD_MESH_PART=ON
+ -DBUILD_OPENSCAD=$(usex openscad)
+ -DBUILD_PART=ON
+ -DBUILD_PART_DESIGN=$(usex part-design)
+ -DBUILD_PATH=$(usex path)
+ -DBUILD_PLOT=$(usex plot) # conflicts with possible external workbench
+ -DBUILD_POINTS=$(usex points)
+ -DBUILD_QT5=ON # OFF means to use Qt4
+ -DBUILD_RAYTRACING=$(usex raytracing)
+ -DBUILD_REVERSEENGINEERING=OFF # currently only an empty sandbox
+ -DBUILD_ROBOT=$(usex robot)
+ -DBUILD_SHIP=$(usex ship) # conflicts with possible external workbench
+ -DBUILD_SHOW=$(usex show)
+ -DBUILD_SKETCHER=ON # needed by draft workspace
+ -DBUILD_SMESH=ON
+ -DBUILD_SPREADSHEET=ON
+ -DBUILD_START=ON
+ -DBUILD_SURFACE=$(usex surface)
+ -DBUILD_TECHDRAW=$(usex techdraw)
+ -DBUILD_TEST=ON # always build test workbench for run-time testing
+ -DBUILD_TUX=$(usex tux)
+ -DBUILD_VR=OFF
+ -DBUILD_WEB=ON # needed by start workspace
+ -DBUILD_WITH_CONDA=OFF
+
+ -DCMAKE_INSTALL_DATADIR=/usr/share/${PN}/data
+ -DCMAKE_INSTALL_DOCDIR=/usr/share/doc/${PF}
+ -DCMAKE_INSTALL_INCLUDEDIR=/usr/include/${PN}
+ -DCMAKE_INSTALL_PREFIX=/usr/$(get_libdir)/${PN}
+
+ -DFREECAD_BUILD_DEBIAN=OFF
+
+ -DFREECAD_USE_EXTERNAL_KDL=ON
+ -DFREECAD_USE_EXTERNAL_SMESH=OFF # no package in Gentoo
+ -DFREECAD_USE_EXTERNAL_ZIPIOS=OFF # doesn't work yet, also no package in Gentoo tree
+ -DFREECAD_USE_FREETYPE=ON
+ -DFREECAD_USE_OCC_VARIANT:STRING="Official Version"
+ -DFREECAD_USE_PCL=$(usex pcl)
+ -DFREECAD_USE_PYBIND11=ON
+ -DFREECAD_USE_QT_FILEDIALOG=ON
+ -DFREECAD_USE_QTWEBMODULE:STRING="Qt WebEngine"
+
+ # install python modules to site-packages' dir. True only for the main package,
+ # sub-packages will still be installed inside /usr/lib64/freecad
+ -DINSTALL_TO_SITEPACKAGES=ON
+
+ # Use the version of shiboken2 that matches the selected python version
+ -DPYTHON_CONFIG_SUFFIX="-${EPYTHON}"
+ -DPython3_EXECUTABLE=${PYTHON}
+ )
+
+ if use debug; then
+ mycmakeargs+=(
+ -DBUILD_SANDBOX=ON
+ -DBUILD_TEMPLATE=ON
+ )
+ else
+ mycmakeargs+=(
+ -DBUILD_SANDBOX=OFF
+ -DBUILD_TEMPLATE=OFF
+ )
+ fi
+
+ cmake_src_configure
+}
+
+# We use the FreeCADCmd binary instead of the FreeCAD binary here
+# for two reasons:
+# 1. It works out of the box with USE=headless as well, not needing a guard
+# 2. We don't need virtualx.eclass and it's dependencies
+# The exported environment variables are needed, so freecad does know
+# where to save it's temporary files, and where to look and write it's
+# configuration. Without those, there are sandbox violation, when it
+# tries to create /var/lib/portage/home/.FreeCAD directory.
+src_test() {
+ pushd "${BUILD_DIR}" > /dev/null || die
+ export FREECAD_USER_HOME="${HOME}"
+ export FREECAD_USER_DATA="${T}"
+ export FREECAD_USER_TEMP="${T}"
+ nonfatal ./bin/FreeCADCmd --run-test 0
+ popd > /dev/null || die
+}
+
+src_install() {
+ cmake_src_install
+
+ dobin src/Tools/freecad-thumbnailer
+
+ if ! use headless; then
+ dosym -r /usr/$(get_libdir)/${PN}/bin/FreeCAD /usr/bin/freecad
+ fi
+ dosym -r /usr/$(get_libdir)/${PN}/bin/FreeCADCmd /usr/bin/freecadcmd
+
+ python_optimize "${ED}"/usr/share/${PN}/data/Mod/Start/StartPage "${ED}"/usr/$(get_libdir)/${PN}{/Ext,/Mod}/
+ # compile main package in python site-packages as well
+ python_optimize
+}
+
+pkg_postinst() {
+ xdg_pkg_postinst
+
+ if use plot; then
+ einfo "Note: You are enabling the 'plot' USE flag."
+ einfo "This conflicts with the plot workbench that can be loaded"
+ einfo "via the addon manager! You can only install one of those."
+ fi
+
+ if use ship; then
+ einfo "Note: You are enabling the 'ship' USE flag."
+ einfo "This conflicts with the ship workbench that can be loaded"
+ einfo "via the addon manager! You can only install one of those."
+ fi
+
+ einfo "You can load a lot of additional workbenches using the integrated"
+ einfo "AddonManager."
+
+ # ToDo: check opencv, pysolar (::science), elmerfem (::science)
+ # ifc++, ifcopenshell, netgen, z88 (no pkgs), calculix-ccx (::waebbl)
+ einfo "There are a lot of additional tools, for which FreeCAD has builtin"
+ einfo "support. Some of them are available in Gentoo. Take a look at"
+ einfo "https://wiki.freecadweb.org/Installing#External_software_supported_by_FreeCAD"
+ optfeature_header "Computational utilities"
+ optfeature "BLAS library" sci-libs/openblas
+ optfeature "Statistical computation with Python" dev-python/pandas
+ optfeature "Use scientific computation with Python" dev-python/scipy
+ optfeature "Use symbolic math with Python" dev-python/sympy
+ optfeature_header "Imaging, Plotting and Rendering utilities"
+ optfeature "Dependency graphs" media-gfx/graphviz
+ optfeature "PBR Rendering" media-gfx/povray
+ optfeature_header "Import / Export"
+ optfeature "Interact with git repositories" dev-python/GitPython
+ optfeature "Work with COLLADA documents" dev-python/pycollada
+ optfeature "YAML importer and emitter" dev-python/pyyaml
+ optfeature "Importing and exporting 2D AutoCAD DWG files" media-gfx/libredwg
+ optfeature "Importing and exporting geospatial data formats" sci-libs/gdal
+ optfeature "Working with projection data" sci-libs/proj
+ optfeature_header "Meshing and FEM"
+ optfeature "FEM mesh generator" sci-libs/gmsh
+ optfeature "Triangulating meshes" sci-libs/gts
+ optfeature "Visualization" sci-visualization/paraview
+}
+
+pkg_postrm() {
+ xdg_pkg_postrm
+}
diff --git a/media-gfx/freecad/freecad-9999.ebuild b/media-gfx/freecad/freecad-9999.ebuild
index 97ada209ae61..377cf7cb37ba 100644
--- a/media-gfx/freecad/freecad-9999.ebuild
+++ b/media-gfx/freecad/freecad-9999.ebuild
@@ -87,7 +87,7 @@ RDEPEND="
dev-python/numpy[${PYTHON_USEDEP}]
>=dev-python/pivy-0.6.5[${PYTHON_USEDEP}]
dev-python/pybind11[${PYTHON_USEDEP}]
- dev-python/pyside2[gui,svg,${PYTHON_USEDEP}]
+ dev-python/pyside2[gui,svg,webchannel,webengine,${PYTHON_USEDEP}]
dev-python/shiboken2[${PYTHON_USEDEP}]
addonmgr? ( dev-python/GitPython[${PYTHON_USEDEP}] )
fem? ( dev-python/ply[${PYTHON_USEDEP}] )
@@ -270,8 +270,6 @@ src_install() {
python_optimize "${ED}"/usr/share/${PN}/data/Mod/Start/StartPage "${ED}"/usr/$(get_libdir)/${PN}{/Ext,/Mod}/
# compile main package in python site-packages as well
python_optimize
-
- doenvd "${FILESDIR}/99${PN}"
}
pkg_postinst() {
diff --git a/media-gfx/freecad/metadata.xml b/media-gfx/freecad/metadata.xml
index 57cb8fcbe607..44899f008bc0 100644
--- a/media-gfx/freecad/metadata.xml
+++ b/media-gfx/freecad/metadata.xml
@@ -18,6 +18,14 @@
Build the Cloud workbench, to access cloud providers (mostly
Amazon S3).
</flag>
+ <flag name="drawing">
+ Build the Drawing workbench, a predecessor to the TechDraw workbench.
+ Users are encouraged to learn how to use the TechDraw workbench and
+ switch to it instead.
+
+ This is a compatibility option and will be removed in a later (0.20+)
+ version of the package.
+ </flag>
<flag name="fem">
Build the FEM module and workbench which provides Finite Element
Analysis (FEA) workflows