public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: media-gfx/freecad/, media-gfx/freecad/files/
@ 2021-02-15  9:04 Joonas Niilola
  0 siblings, 0 replies; 13+ messages in thread
From: Joonas Niilola @ 2021-02-15  9:04 UTC (permalink / raw
  To: gentoo-commits

commit:     04ae9c5e0b5f8ce2c89c5c1266b6340bd9727f0f
Author:     Bernd Waibel <waebbl <AT> gmail <DOT> com>
AuthorDate: Fri Jan 15 20:11:13 2021 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Mon Feb 15 09:03:53 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=04ae9c5e

media-gfx/freecad: re-add package

Pre-release version 0.19_pre with a commit date of 2020-12-31.
The current stable upstream release 0.18.5 needs qtwebkit, that's
why I didn't want to interfere with the removal of that package.

Things to do:
- bump sci-libs/vtk-9 and update dependency
- add python-3.9 support (needs updated vtk)
- update sci-mathematics/netgen and implement it in ebuild (FEM_NETGEN)
- check for external zipios++ (package needed)
- check for external smesh (package needed)
- check for improvements in USE flags?

Closes: https://bugs.gentoo.org/622726
Package-Manager: Portage-3.0.13, Repoman-3.0.2
Signed-off-by: Bernd Waibel <waebbl <AT> gmail.com>
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 media-gfx/freecad/Manifest                         |   1 +
 ...ndCoin3DDoc.cmake-fix-patch-for-coin-docs.patch |  26 ++
 ...0002-CMakeLists.txt-add-option-for-ccache.patch |  33 +++
 ...1231-0003-Gentoo-specific-don-t-check-vcs.patch |  26 ++
 media-gfx/freecad/freecad-0.19_pre20201231.ebuild  | 284 +++++++++++++++++++++
 media-gfx/freecad/metadata.xml                     | 115 +++++++++
 6 files changed, 485 insertions(+)

diff --git a/media-gfx/freecad/Manifest b/media-gfx/freecad/Manifest
new file mode 100644
index 00000000000..99ac7bbf679
--- /dev/null
+++ b/media-gfx/freecad/Manifest
@@ -0,0 +1 @@
+DIST freecad-0.19_pre20201231.tar.gz 236040771 BLAKE2B 648d8c1d8ab03f56403544f8e6a20dc5edc35b2cfc353c875202ce3e85449e450cbda93f410fec15366ce3aab342a93e981fa11cd9f5443a2fc40ef38ac0a1d0 SHA512 457792b0a12196d9e2d8113d9721a3b3a6d4fbc93bae001787db3eac43503a74a89a69564903b4005f8648476a150b6d871b3d78adfbf41c7260a4265132da34

diff --git a/media-gfx/freecad/files/freecad-0.19_pre20201231-0001-FindCoin3DDoc.cmake-fix-patch-for-coin-docs.patch b/media-gfx/freecad/files/freecad-0.19_pre20201231-0001-FindCoin3DDoc.cmake-fix-patch-for-coin-docs.patch
new file mode 100644
index 00000000000..d0097ab0730
--- /dev/null
+++ b/media-gfx/freecad/files/freecad-0.19_pre20201231-0001-FindCoin3DDoc.cmake-fix-patch-for-coin-docs.patch
@@ -0,0 +1,26 @@
+From e08aec1344e753cd338a61c3584230741e00b23f Mon Sep 17 00:00:00 2001
+From: Bernd Waibel <waebbl@gmail.com>
+Date: Thu, 31 Dec 2020 13:26:44 +0100
+Subject: [PATCH 1/2] FindCoin3DDoc.cmake: fix patch for coin docs
+
+Signed-off-by: Bernd Waibel <waebbl@gmail.com>
+---
+ cMake/FindCoin3DDoc.cmake | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/cMake/FindCoin3DDoc.cmake b/cMake/FindCoin3DDoc.cmake
+index c6c92f2..1af53c2 100644
+--- a/cMake/FindCoin3DDoc.cmake
++++ b/cMake/FindCoin3DDoc.cmake
+@@ -22,7 +22,7 @@ IF (COIN3D_FOUND)
+       # Unix systems
+       find_path(COIN3D_DOC_PATH index.html 
+                 /usr/share/doc/libcoin80-doc/html
+-                /usr/share/doc/coin/html
++                /usr/share/doc/coin-4.0.0/html
+                 /usr/share/doc/Coin/html
+       )
+       IF( EXISTS ${COIN3D_DOC_PATH})
+-- 
+2.30.0
+

diff --git a/media-gfx/freecad/files/freecad-0.19_pre20201231-0002-CMakeLists.txt-add-option-for-ccache.patch b/media-gfx/freecad/files/freecad-0.19_pre20201231-0002-CMakeLists.txt-add-option-for-ccache.patch
new file mode 100644
index 00000000000..26bb4421077
--- /dev/null
+++ b/media-gfx/freecad/files/freecad-0.19_pre20201231-0002-CMakeLists.txt-add-option-for-ccache.patch
@@ -0,0 +1,33 @@
+From bce02c4804d14ae2257ad5f5e7fae4e2baa74503 Mon Sep 17 00:00:00 2001
+From: Bernd Waibel <waebbl@gmail.com>
+Date: Thu, 31 Dec 2020 13:31:47 +0100
+Subject: [PATCH 2/2] CMakeLists.txt: add option for ccache
+
+Signed-off-by: Bernd Waibel <waebbl@gmail.com>
+---
+ CMakeLists.txt | 9 ++++++---
+ 1 file changed, 6 insertions(+), 3 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index f4dabf7..17b9fad 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -8,9 +8,12 @@ if (POLICY CMP0072)
+     cmake_policy(SET CMP0072 OLD)
+ endif(POLICY CMP0072)
+ 
+-find_program(CCACHE_PROGRAM ccache)  #This check should occur before project()
+-if(CCACHE_PROGRAM)
+-    set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_PROGRAM}")
++option(FREECAD_USE_CCACHE "Use ccache to build FreeCAD" OFF)
++if(FREECAD_USE_CCACHE)
++    find_program(CCACHE_PROGRAM ccache)  #This check should occur before project()
++    if(CCACHE_PROGRAM)
++        set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_PROGRAM}")
++    endif()
+ endif()
+ 
+ project(FreeCAD)
+-- 
+2.30.0
+

diff --git a/media-gfx/freecad/files/freecad-0.19_pre20201231-0003-Gentoo-specific-don-t-check-vcs.patch b/media-gfx/freecad/files/freecad-0.19_pre20201231-0003-Gentoo-specific-don-t-check-vcs.patch
new file mode 100644
index 00000000000..1a384198ae3
--- /dev/null
+++ b/media-gfx/freecad/files/freecad-0.19_pre20201231-0003-Gentoo-specific-don-t-check-vcs.patch
@@ -0,0 +1,26 @@
+From acc8a26b73a87ae024bce30e9f1531610b6e0e5f Mon Sep 17 00:00:00 2001
+From: Bernd Waibel <waebbl-gentoo@posteo.net>
+Date: Sat, 13 Feb 2021 14:54:28 +0100
+Subject: [PATCH] [Gentoo specific] don't check vcs
+
+Signed-off-by: Bernd Waibel <waebbl-gentoo@posteo.net>
+---
+ src/Tools/SubWCRev.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/Tools/SubWCRev.py b/src/Tools/SubWCRev.py
+index 9795450..59938bd 100644
+--- 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.30.1
+

diff --git a/media-gfx/freecad/freecad-0.19_pre20201231.ebuild b/media-gfx/freecad/freecad-0.19_pre20201231.ebuild
new file mode 100644
index 00000000000..9d1447e685a
--- /dev/null
+++ b/media-gfx/freecad/freecad-0.19_pre20201231.ebuild
@@ -0,0 +1,284 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+# vtk needs updating to use 3.9
+PYTHON_COMPAT=( python3_{7,8} )
+
+inherit check-reqs cmake desktop optfeature python-single-r1 xdg
+
+DESCRIPTION="QT based Computer Aided Design application"
+HOMEPAGE="https://www.freecadweb.org/ https://github.com/FreeCAD/FreeCAD"
+
+if [[ ${PV} = *9999 ]]; then
+	inherit git-r3
+	EGIT_REPO_URI="https://github.com/FreeCAD/FreeCAD.git"
+	S="${WORKDIR}/freecad-${PV}"
+else
+	COMMIT=82ec99dbc1f0f054748059ae8bb138eb44b43073
+	SRC_URI="https://github.com/FreeCAD/FreeCAD/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
+	KEYWORDS="~amd64"
+	S="${WORKDIR}/FreeCAD-${COMMIT}"
+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="ccache debug headless pcl test"
+RESTRICT="!test? ( test )"
+
+FREECAD_EXPERIMENTAL_MODULES="cloud plot ship"
+FREECAD_STABLE_MODULES="addonmgr arch drawing fem idf image
+	inspection material mesh openscad part-design path points
+	raytracing robot show spreadsheet 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-cpp/eigen-3.3.1:3
+	dev-libs/OpenNI2[opengl(+)]
+	dev-libs/libspnav[X]
+	dev-libs/xerces-c
+	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/med-4.0.0-r1[python,${PYTHON_SINGLE_USEDEP}]
+	sci-libs/opencascade:=[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-9[boost,python,qt5,rendering,${PYTHON_SINGLE_USEDEP}] )
+	mesh? ( sci-libs/hdf5:=[fortran,zlib] )
+	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_MULTI_USEDEP}]
+		dev-python/matplotlib[${PYTHON_MULTI_USEDEP}]
+		dev-python/numpy[${PYTHON_MULTI_USEDEP}]
+		>=dev-python/pivy-0.6.5[${PYTHON_MULTI_USEDEP}]
+		dev-python/pyside2[gui,svg,${PYTHON_MULTI_USEDEP}]
+		dev-python/shiboken2[${PYTHON_MULTI_USEDEP}]
+		addonmgr? ( dev-python/GitPython[${PYTHON_MULTI_USEDEP}] )
+		mesh? ( dev-python/pybind11[${PYTHON_MULTI_USEDEP}] )
+	')
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+	dev-lang/swig
+	ccache? ( dev-util/ccache )
+"
+
+# To get required dependencies:
+# 'grep REQUIRES_MODS cMake/FreeCAD_Helpers/CheckInterModuleDependencies.cmake'
+# We set the following requirements by default:
+# draft, import, part, qt5, sketcher, start, web.
+#
+# Additionally if mesh is set, 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.
+REQUIRED_USE="
+	${PYTHON_REQUIRED_USE}
+	arch? ( mesh )
+	debug? ( mesh )
+	drawing? ( spreadsheet )
+	fem? ( mesh )
+	inspection? ( mesh points )
+	openscad? ( mesh )
+	path? ( mesh robot )
+	ship? ( image plot )
+	techdraw? ( spreadsheet drawing )
+"
+
+PATCHES=(
+	"${FILESDIR}"/${P}-0001-FindCoin3DDoc.cmake-fix-patch-for-coin-docs.patch
+	"${FILESDIR}"/${P}-0002-CMakeLists.txt-add-option-for-ccache.patch
+	"${FILESDIR}"/${P}-0003-Gentoo-specific-don-t-check-vcs.patch
+)
+
+DOCS=( README.md ChangeLog.txt CODE_OF_CONDUCT.md )
+
+CHECKREQS_DISK_BUILD="7G"
+
+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 OpenCASCADE lookup
+	sed -e 's|/usr/include/opencascade|${CASROOT}/include/opencascade|' \
+		-e 's|/usr/lib|${CASROOT}/'$(get_libdir)' NO_DEFAULT_PATH|' \
+		-i cMake/FindOpenCasCade.cmake || die
+
+	# Fix desktop file
+	sed -e 's/Exec=FreeCAD/Exec=freecad/' -i src/XDGData/org.freecadweb.FreeCAD.desktop || die
+
+	cmake_src_prepare
+}
+
+src_configure() {
+	local mycmakeargs=(
+		-DBUILD_ADDONMGR=$(usex addonmgr)
+		-DBUILD_ARCH=$(usex arch)
+		-DBUILD_ASSEMBLY=OFF
+		-DBUILD_CLOUD=$(usex cloud)
+		-DBUILD_COMPLETE=OFF					# deprecated
+		-DBUILD_DRAFT=ON						# basic workspace, enable it by default
+		-DBUILD_DRAWING=$(usex drawing)
+		-DBUILD_ENABLE_CXX_STD:STRING="C++14"	# needed for >=boost-1.75.0
+		-DBUILD_FEM=$(usex fem)
+		-DBUILD_FEM_NETGEN=OFF
+		-DBUILD_FLAT_MESH=$(usex mesh)
+		-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=$(usex mesh)
+		-DBUILD_MESH_PART=$(usex mesh)
+		-DBUILD_OPENSCAD=$(usex openscad)
+		-DBUILD_PART=ON							# basic workspace, enable it by default
+		-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=$(usex mesh)
+		-DBUILD_SPREADSHEET=$(usex spreadsheet)
+		-DBUILD_START=ON						# basic workspace, enable it by default
+		-DBUILD_SURFACE=$(usex surface)
+		-DBUILD_TECHDRAW=$(usex techdraw)
+		-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_CCACHE=$(usex ccache)
+		-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=$(usex mesh)
+		-DFREECAD_USE_QT_FILEDIALOG=ON
+		-DFREECAD_USE_QTWEBMODULE:STRING="Qt WebEngine"
+
+		-DOCC_INCLUDE_DIR="${CASROOT}"/include/opencascade
+		-DOCC_LIBRARY_DIR="${CASROOT}"/$(get_libdir)
+		-DOCCT_CMAKE_FALLBACK=ON				# don't use occt-config which isn't included in opencascade for Gentoo
+	)
+
+	if use debug; then
+		mycmakeargs+=(
+			# sandbox needs mesh support
+			-DBUILD_SANDBOX=$(usex mesh)
+			-DBUILD_TEMPLATE=ON
+			-DBUILD_TEST=ON
+		)
+	else
+		mycmakeargs+=(
+			-DBUILD_SANDBOX=OFF
+			-DBUILD_TEMPLATE=OFF
+			-DBUILD_TEST=OFF
+		)
+	fi
+
+	cmake_src_configure
+}
+
+src_install() {
+	cmake_src_install
+
+	if ! use headless; then
+		dosym ../$(get_libdir)/${PN}/bin/FreeCAD /usr/bin/freecad
+		mv "${ED}"/usr/$(get_libdir)/freecad/share/* "${ED}"/usr/share || die "failed to move shared ressources"
+	fi
+	dosym ../$(get_libdir)/${PN}/bin/FreeCADCmd /usr/bin/freecadcmd
+
+	python_optimize "${ED}"/usr/share/${PN}/data/Mod/ "${ED}"/usr/$(get_libdir)/${PN}{/Ext,/Mod}/
+}
+
+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."
+
+	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 "interact with git repositories" dev-python/GitPython
+	optfeature "work with COLLADA documents" dev-python/pycollada
+	optfeature "dependency graphs" media-gfx/graphviz
+	optfeature "PBR Rendering" media-gfx/povray
+	optfeature "FEM mesh generator" sci-libs/gmsh
+}
+
+pkg_postrm() {
+	xdg_pkg_postrm
+}

diff --git a/media-gfx/freecad/metadata.xml b/media-gfx/freecad/metadata.xml
new file mode 100644
index 00000000000..a36a8d876fb
--- /dev/null
+++ b/media-gfx/freecad/metadata.xml
@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+	<maintainer type="person">
+		<email>waebbl@gmail.com</email>
+		<name>Bernd Waibel</name>
+	</maintainer>
+	<maintainer type="project">
+		<email>proxy-maint@gentoo.org</email>
+		<description>Gentoo Proxy Maintainers</description>
+	</maintainer>
+	<use>
+		<flag name="addonmgr">
+			Build the addon manager module for automatic handling of 3rd 
+			party addons
+		</flag>
+		<flag name="arch">
+			Build the architecture workbench for working with architectural 
+			elements
+		</flag>
+		<flag name="ccache">
+			Use <pkg>dev-util/ccache</pkg> to build the package.
+		</flag>
+		<flag name="cloud">
+			Build the Cloud workbench, to access cloud providers (mostly
+			Amazon S3).
+		</flag>
+		<flag name="drawing">
+			Build the drawing module and workbench to display 3D work on a 
+			2D sheet
+		</flag>
+		<flag name="fem">
+			Build the FEM module and workbench which provides Finite Element 
+			Analysis (FEA) workflows
+		</flag>
+		<flag name="headless">
+			Build FreeCAD without a GUI, usable for server-side instances.
+			The Python modules are still available, without their GUI parts though.
+		</flag>
+		<flag name="idf">
+			Build the IDF module to provide file exchange capabilities with
+			IDF files
+		</flag>
+		<flag name="image">
+			Build the image module and workbench for working with bitmap
+			images
+		</flag>
+		<flag name="inspection">
+			Build the inspection workbench which gives you specific tools
+			for examination of shapes (experimental)
+		</flag>
+		<flag name="material">
+			Build the material module and workbench to work with materials
+		</flag>
+		<flag name="mesh">
+			Build the mesh module and workbench to work with triangulated 
+			meshes
+		</flag>
+		<flag name="openscad">
+			Build the OpenSCAD module for interoperability with OpenSCAD 
+			and repairing Constructive Solid Geometry (CSG) history
+		</flag>
+		<flag name="part-design">
+			Build the part design module and workbench for build part shapes
+			from sketches
+		</flag>
+		<flag name="path"><!-- FIXME: auto-enable through robot? -->
+			Build the path module and workbench to procude G-Code instructions 
+			for CNC
+		</flag>
+		<flag name="pcl">
+			Use external <pkg>sci-libs/pcl</pkg> for point clouds support.
+		</flag>
+		<flag name="plot">
+			Build the internal plot workbench. NOTE: This conflicts with the
+			external plot workbench, which you can add via the Addon Manager!
+		</flag>
+		<flag name="points">
+			Build the points module and workbench for working with point clouds
+		</flag>
+		<flag name="raytracing">
+			Build the raytracing module and workbench for raytracing and rendering
+		</flag>
+		<flag name="robot">
+			Build the robot module and workbench for studying robot movements
+		</flag>
+		<flag name="ship">
+			Build the ship module and workbench which works over ship entities, 
+			that must be created on top of provided geometry. NOTE: This conflicts
+			with the external ship workbench, which you can add via the Addon Manager!
+		</flag>
+		<flag name="show">
+			Build the show module, a helper module for visibility automation
+		</flag>
+		<flag name="spreadsheet">
+			Build the spreadsheet module and workbench to create and manipulate 
+			spreadsheet data
+		</flag>
+		<flag name="surface">
+			Build the surface module and workbench
+		</flag>
+		<flag name="techdraw">
+			Build the techdraw module and workbench, a more advanced and 
+			feature-rich successor of the drawing workbench
+		</flag>
+		<flag name="tux">
+			Build the Tux module
+		</flag>
+	</use>
+	<upstream>
+		<bugs-to>https://www.freecadweb.org/tracker/</bugs-to>
+		<remote-id type="github">FreeCAD/FreeCAD</remote-id>
+		<doc lang="en">https://www.freecadweb.org/wiki/MainPage</doc>
+	</upstream>
+</pkgmetadata>


^ permalink raw reply related	[flat|nested] 13+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-gfx/freecad/, media-gfx/freecad/files/
@ 2024-06-03 15:00 Andrew Ammerlaan
  0 siblings, 0 replies; 13+ messages in thread
From: Andrew Ammerlaan @ 2024-06-03 15:00 UTC (permalink / raw
  To: gentoo-commits

commit:     08ebd7d12caf2b39beec97a97a3f7253477b46b1
Author:     Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
AuthorDate: Mon Jun  3 14:50:21 2024 +0000
Commit:     Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
CommitDate: Mon Jun  3 14:50:21 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=08ebd7d1

media-gfx/freecad: backport various qt6 fixes

enable py3.12 for qt6 builds

Bug: https://bugs.gentoo.org/933439
Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org>

 .../freecad/files/freecad-0.21.2-navcube-qt6.patch |  29 ++++
 .../freecad/files/freecad-0.21.2-py312-qt6.patch   | 186 +++++++++++++++++++++
 .../freecad/files/freecad-0.21.2-qtsvg-qt6.patch   | 148 ++++++++++++++++
 ...d-0.21.2-r2.ebuild => freecad-0.21.2-r3.ebuild} |  18 +-
 media-gfx/freecad/freecad-9999.ebuild              |   8 +-
 5 files changed, 380 insertions(+), 9 deletions(-)

diff --git a/media-gfx/freecad/files/freecad-0.21.2-navcube-qt6.patch b/media-gfx/freecad/files/freecad-0.21.2-navcube-qt6.patch
new file mode 100644
index 000000000000..0ab999771068
--- /dev/null
+++ b/media-gfx/freecad/files/freecad-0.21.2-navcube-qt6.patch
@@ -0,0 +1,29 @@
+From ccaee18917432fd02e4371a7847bdfaf0692edd1 Mon Sep 17 00:00:00 2001
+From: Martin Rodriguez Reboredo <yakoyoku@gmail.com>
+Date: Sun, 19 May 2024 23:23:45 -0300
+Subject: [PATCH] Gui: Fix NaviCube for Qt6
+
+---
+ src/Gui/NaviCube.cpp | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/Gui/NaviCube.cpp b/src/Gui/NaviCube.cpp
+index 2d164f196b3c..9e3a62d66c81 100644
+--- a/src/Gui/NaviCube.cpp
++++ b/src/Gui/NaviCube.cpp
+@@ -926,6 +926,7 @@ NaviCubeImplementation::PickId NaviCubeImplementation::pickFace(short x, short y
+     GLubyte pixels[4] = {0};
+     if (m_PickingFramebuffer && std::abs(x) <= m_CubeWidgetSize / 2 &&
+         std::abs(y) <= m_CubeWidgetSize / 2) {
++        static_cast<QtGLWidget*>(m_View3DInventorViewer->viewport())->makeCurrent();
+         m_PickingFramebuffer->bind();
+ 
+         glViewport(0, 0, m_CubeWidgetSize * 2, m_CubeWidgetSize * 2);
+@@ -936,6 +937,7 @@ NaviCubeImplementation::PickId NaviCubeImplementation::pickFace(short x, short y
+         glReadPixels(2 * x + m_CubeWidgetSize, 2 * y + m_CubeWidgetSize, 1, 1,
+                      GL_RGBA, GL_UNSIGNED_BYTE, &pixels);
+         m_PickingFramebuffer->release();
++        static_cast<QtGLWidget*>(m_View3DInventorViewer->viewport())->doneCurrent();
+     }
+     return pixels[3] == 255 ? static_cast<PickId>(pixels[0]) : PickId::None;
+ }

diff --git a/media-gfx/freecad/files/freecad-0.21.2-py312-qt6.patch b/media-gfx/freecad/files/freecad-0.21.2-py312-qt6.patch
new file mode 100644
index 000000000000..c1fe31ab05ad
--- /dev/null
+++ b/media-gfx/freecad/files/freecad-0.21.2-py312-qt6.patch
@@ -0,0 +1,186 @@
+From 6043c90462e85fbf15e30ea4c7da7d9a22d570f2 Mon Sep 17 00:00:00 2001
+From: wmayer <wmayer@users.sourceforge.net>
+Date: Wed, 7 Feb 2024 15:25:13 +0100
+Subject: [PATCH] Py3.12: harmonize with upstream of PyCXX
+
+---
+ src/CXX/IndirectPythonInterface.cxx         | 36 +++++++++++++++------
+ src/CXX/Python3/IndirectPythonInterface.hxx |  6 ++--
+ src/CXX/Python3/cxx_extensions.cxx          |  2 +-
+ src/CXX/Python3/cxxextensions.c             | 10 ++++++
+ src/CXX/Version.hxx                         |  2 +-
+ 5 files changed, 42 insertions(+), 14 deletions(-)
+
+diff --git a/src/CXX/IndirectPythonInterface.cxx b/src/CXX/IndirectPythonInterface.cxx
+index 3d810cea88a5..fc9e45cbd64f 100644
+--- a/src/CXX/IndirectPythonInterface.cxx
++++ b/src/CXX/IndirectPythonInterface.cxx
+@@ -122,17 +122,21 @@ static PyTypeObject *ptr__Bytes_Type = NULL;
+ #  endif
+ 
+ #  if PY_MAJOR_VERSION == 2 || !defined( Py_LIMITED_API )
++#    if PY_MAJOR_VERSION == 2 || (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION <= 11)
+ static int *ptr_Py_DebugFlag = NULL;
+ static int *ptr_Py_InteractiveFlag = NULL;
+ static int *ptr_Py_OptimizeFlag = NULL;
+ static int *ptr_Py_NoSiteFlag = NULL;
+ static int *ptr_Py_VerboseFlag = NULL;
++#    endif
+ 
+-#   if PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION >= 7
++#    if PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION <= 11
++#      if PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION >= 7
+ static const char **ptr__Py_PackageContext = NULL;
+-#   else
++#      else
+ static char **ptr__Py_PackageContext = NULL;
+-#   endif
++#      endif
++#    endif
+ #  endif
+ 
+ #  ifdef Py_REF_DEBUG
+@@ -242,17 +246,21 @@ bool InitialisePythonIndirectInterface()
+     ptr_Py_RefTotal             = GetInt_as_IntPointer( "_Py_RefTotal" );
+ #  endif
+ #  if PY_MAJOR_VERSION == 2 || !defined( Py_LIMITED_API )
++#    if PY_MAJOR_VERSION == 2 || (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION <= 11)
+     ptr_Py_DebugFlag            = GetInt_as_IntPointer( "Py_DebugFlag" );
+     ptr_Py_InteractiveFlag      = GetInt_as_IntPointer( "Py_InteractiveFlag" );
+     ptr_Py_OptimizeFlag         = GetInt_as_IntPointer( "Py_OptimizeFlag" );
+     ptr_Py_NoSiteFlag           = GetInt_as_IntPointer( "Py_NoSiteFlag" );
+     ptr_Py_VerboseFlag          = GetInt_as_IntPointer( "Py_VerboseFlag" );
++#    endif
+ 
+-#    if PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION >= 7
++#    if PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION <= 11
++#       if PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION >= 7
+     ptr__Py_PackageContext      = GetConstCharPointer_as_ConstCharPointerPointer( "_Py_PackageContext" );
+-#    else
++#       else
+     ptr__Py_PackageContext      = GetCharPointer_as_CharPointerPointer( "_Py_PackageContext" );
+-#    endif
++#       endif
++#     endif
+ #  endif
+ 
+ #  define PYCXX_STANDARD_EXCEPTION( eclass, bclass )
+@@ -397,17 +405,21 @@ PYCXX_EXPORT PyTypeObject *_Bytes_Type()             { return ptr__Bytes_Type; }
+ //    wrap the Python Flag variables
+ //
+ #  if PY_MAJOR_VERSION == 2 || !defined( Py_LIMITED_API )
++#    if PY_MAJOR_VERSION == 2 || (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION <= 11)
+ PYCXX_EXPORT int &_Py_DebugFlag()                    { return *ptr_Py_DebugFlag; }
+ PYCXX_EXPORT int &_Py_InteractiveFlag()              { return *ptr_Py_InteractiveFlag; }
+ PYCXX_EXPORT int &_Py_OptimizeFlag()                 { return *ptr_Py_OptimizeFlag; }
+ PYCXX_EXPORT int &_Py_NoSiteFlag()                   { return *ptr_Py_NoSiteFlag; }
+ PYCXX_EXPORT int &_Py_VerboseFlag()                  { return *ptr_Py_VerboseFlag; }
++#    endif
+ #  endif
+ 
+-#  if PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION >= 7
++#  if PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION <= 11
++#    if PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION >= 7
+ PYCXX_EXPORT const char *__Py_PackageContext()       { return *ptr__Py_PackageContext; }
+-#  else
++#    else
+ PYCXX_EXPORT char *__Py_PackageContext()             { return *ptr__Py_PackageContext; }
++#    endif
+ #  endif
+ 
+ #  if 0
+@@ -518,15 +530,19 @@ PYCXX_EXPORT PyTypeObject *_Bytes_Type()             { return &PyBytes_Type; }
+ //    wrap flags
+ //
+ # if PY_MAJOR_VERSION == 2 || !defined( Py_LIMITED_API )
++#    if PY_MAJOR_VERSION == 2 || (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION <= 11)
+ PYCXX_EXPORT int &_Py_DebugFlag()                    { return Py_DebugFlag; }
+ PYCXX_EXPORT int &_Py_InteractiveFlag()              { return Py_InteractiveFlag; }
+ PYCXX_EXPORT int &_Py_OptimizeFlag()                 { return Py_OptimizeFlag; }
+ PYCXX_EXPORT int &_Py_NoSiteFlag()                   { return Py_NoSiteFlag; }
+ PYCXX_EXPORT int &_Py_VerboseFlag()                  { return Py_VerboseFlag; }
+-#  if PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION >= 7
++#    endif
++#  if PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION <= 11
++#   if PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION >= 7
+ PYCXX_EXPORT const char *__Py_PackageContext()       { return _Py_PackageContext; }
+-#  else
++#   else
+ PYCXX_EXPORT char *__Py_PackageContext()             { return _Py_PackageContext; }
++#   endif
+ #  endif
+ # endif
+ 
+diff --git a/src/CXX/Python3/IndirectPythonInterface.hxx b/src/CXX/Python3/IndirectPythonInterface.hxx
+index bf2c15c53f9a..eb4ae4fe63b9 100644
+--- a/src/CXX/Python3/IndirectPythonInterface.hxx
++++ b/src/CXX/Python3/IndirectPythonInterface.hxx
+@@ -149,10 +149,12 @@ PYCXX_EXPORT int &_Py_NoSiteFlag();
+ PYCXX_EXPORT int &_Py_TabcheckFlag();
+ PYCXX_EXPORT int &_Py_VerboseFlag();
+ 
+-#  if PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION >= 7
++# if PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION <= 11
++#   if PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION >= 7
+ PYCXX_EXPORT const char *__Py_PackageContext();
+-#  else
++#   else
+ PYCXX_EXPORT char *__Py_PackageContext();
++#   endif
+ #  endif
+ # endif
+ 
+diff --git a/src/CXX/Python3/cxx_extensions.cxx b/src/CXX/Python3/cxx_extensions.cxx
+index 7371810be4a9..e6eefdafea17 100644
+--- a/src/CXX/Python3/cxx_extensions.cxx
++++ b/src/CXX/Python3/cxx_extensions.cxx
+@@ -152,7 +152,7 @@ PyMethodDef *MethodTable::table()
+ //================================================================================
+ ExtensionModuleBase::ExtensionModuleBase( const char *name )
+ : m_module_name( name )
+-#if defined( Py_LIMITED_API )
++#if defined( Py_LIMITED_API ) || (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION >= 12)
+ , m_full_module_name( m_module_name )
+ #else
+ , m_full_module_name( __Py_PackageContext() != NULL ? std::string( __Py_PackageContext() ) : m_module_name )
+diff --git a/src/CXX/Python3/cxxextensions.c b/src/CXX/Python3/cxxextensions.c
+index 3b0f8ef7c588..afb9313ad0a8 100644
+--- a/src/CXX/Python3/cxxextensions.c
++++ b/src/CXX/Python3/cxxextensions.c
+@@ -42,6 +42,14 @@ extern "C"
+ {
+ #endif
+ 
++#if PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION >= 13
++PyObject py_object_initializer =
++    {
++    { 1 },
++    NULL    // type must be init'ed by user
++    };
++
++#else
+ PyObject py_object_initializer =
+     {
+     _PyObject_EXTRA_INIT
+@@ -49,6 +57,8 @@ PyObject py_object_initializer =
+     NULL    // type must be init'ed by user
+     };
+ 
++#endif
++
+ #ifdef __cplusplus
+ }
+ #endif
+diff --git a/src/CXX/Version.hxx b/src/CXX/Version.hxx
+index e6069aad335e..59fe3c203b86 100644
+--- a/src/CXX/Version.hxx
++++ b/src/CXX/Version.hxx
+@@ -40,7 +40,7 @@
+ 
+ #define PYCXX_VERSION_MAJOR 7
+ #define PYCXX_VERSION_MINOR 1
+-#define PYCXX_VERSION_PATCH 7
++#define PYCXX_VERSION_PATCH 9
+ #define PYCXX_MAKEVERSION( major, minor, patch ) ((major<<16)|(minor<<8)|(patch))
+ #define PYCXX_VERSION PYCXX_MAKEVERSION( PYCXX_VERSION_MAJOR, PYCXX_VERSION_MINOR, PYCXX_VERSION_PATCH )
+ #endif

diff --git a/media-gfx/freecad/files/freecad-0.21.2-qtsvg-qt6.patch b/media-gfx/freecad/files/freecad-0.21.2-qtsvg-qt6.patch
new file mode 100644
index 000000000000..505862aa2bf1
--- /dev/null
+++ b/media-gfx/freecad/files/freecad-0.21.2-qtsvg-qt6.patch
@@ -0,0 +1,148 @@
+From ac9a88c2c59a2d2002a7740a1597a05c819220e0 Mon Sep 17 00:00:00 2001
+From: wmayer <wmayer@users.sourceforge.net>
+Date: Sat, 20 Apr 2024 14:02:38 +0200
+Subject: [PATCH] PySide6: Fixes #13533: QSvgWidget is not a child of QtSvg in
+ PySide6
+
+* Create a compatibility module QtSvgWidgets.py to handle PySide2 & PySide6
+* In the Arch and Material modules use the QtSvgWidgets module
+* Since Qt6 the method QFont.setWeight() doesn't accept an int any more but requires an enum. Since the call of QFont.setBold(True) sets
+  a weight of 75 the extra calls of QFont.setWeight(75) can be safely removed
+---
+ cMake/FreeCAD_Helpers/SetupShibokenAndPyside.cmake | 3 +++
+ src/Mod/Arch/ArchPrecast.py                        | 8 ++++----
+ src/Mod/Arch/ArchWindow.py                         | 4 ++--
+ src/Mod/Arch/importIFClegacy.py                    | 1 -
+ src/Mod/Draft/DraftGui.py                          | 1 -
+ src/Mod/Material/MaterialEditor.py                 | 6 +++---
+ 6 files changed, 12 insertions(+), 11 deletions(-)
+
+diff --git a/cMake/FreeCAD_Helpers/SetupShibokenAndPyside.cmake b/cMake/FreeCAD_Helpers/SetupShibokenAndPyside.cmake
+index 0569c1fde9f2..fa872e287b59 100644
+--- a/cMake/FreeCAD_Helpers/SetupShibokenAndPyside.cmake
++++ b/cMake/FreeCAD_Helpers/SetupShibokenAndPyside.cmake
+@@ -91,9 +91,12 @@ macro(SetupShibokenAndPyside)
+         file(WRITE ${CMAKE_BINARY_DIR}/Ext/PySide/QtWidgets.py  "from PySide${PYSIDE_MAJOR_VERSION}.QtWidgets import *\n")
+         if(PYSIDE_MAJOR_VERSION LESS 6)
+             file(WRITE ${CMAKE_BINARY_DIR}/Ext/PySide/QtWebEngineWidgets.py  "from PySide${PYSIDE_MAJOR_VERSION}.QtWebEngineWidgets import *\n")
++            file(WRITE ${CMAKE_BINARY_DIR}/Ext/PySide/QtSvgWidgets.py  "from PySide${PYSIDE_MAJOR_VERSION}.QtSvg import QGraphicsSvgItem\n"
++                                                                       "from PySide${PYSIDE_MAJOR_VERSION}.QtSvg import QSvgWidget\n")
+         else()
+             file(WRITE ${CMAKE_BINARY_DIR}/Ext/PySide/QtWebEngineWidgets.py  "from PySide${PYSIDE_MAJOR_VERSION}.QtWebEngineWidgets import *\n"
+                                                                              "from PySide${PYSIDE_MAJOR_VERSION}.QtWebEngineCore import QWebEnginePage\n")
++            file(WRITE ${CMAKE_BINARY_DIR}/Ext/PySide/QtSvgWidgets.py  "from PySide${PYSIDE_MAJOR_VERSION}.QtSvgWidgets import *\n")
+         endif()
+     endif()
+ 
+diff --git a/src/Mod/Arch/ArchPrecast.py b/src/Mod/Arch/ArchPrecast.py
+index 7bb929b10e34..2f482902c1ce 100644
+--- a/src/Mod/Arch/ArchPrecast.py
++++ b/src/Mod/Arch/ArchPrecast.py
+@@ -777,14 +777,14 @@ class _PrecastTaskPanel:
+     def __init__(self):
+ 
+         import FreeCADGui
+-        from PySide import QtCore,QtGui,QtSvg
++        from PySide import QtCore,QtGui,QtSvgWidgets
+         self.form = QtGui.QWidget()
+         self.grid = QtGui.QGridLayout(self.form)
+         self.PrecastTypes = ["Beam","I-Beam","Pillar","Panel","Slab","Stairs"]
+         self.SlabTypes = ["Champagne","Hat"]
+ 
+         # image display
+-        self.preview = QtSvg.QSvgWidget(":/ui/ParametersBeam.svg")
++        self.preview = QtSvgWidgets.QSvgWidget(":/ui/ParametersBeam.svg")
+         self.preview.setMaximumWidth(200)
+         self.preview.setMinimumHeight(120)
+         self.grid.addWidget(self.preview,0,0,1,2)
+@@ -1263,7 +1263,7 @@ class _DentsTaskPanel:
+     def __init__(self):
+ 
+         import FreeCADGui
+-        from PySide import QtCore,QtGui,QtSvg
++        from PySide import QtCore,QtGui,QtSvgWidgets
+         self.form = QtGui.QWidget()
+         self.grid = QtGui.QGridLayout(self.form)
+         self.Rotations = ["N","S","E","O"]
+@@ -1282,7 +1282,7 @@ def __init__(self):
+         self.grid.addWidget(self.buttonRemove,2,1,1,1)
+ 
+         # image display
+-        self.preview = QtSvg.QSvgWidget(":/ui/ParametersDent.svg")
++        self.preview = QtSvgWidgets.QSvgWidget(":/ui/ParametersDent.svg")
+         self.preview.setMaximumWidth(200)
+         self.preview.setMinimumHeight(120)
+         self.grid.addWidget(self.preview,3,0,1,2)
+diff --git a/src/Mod/Arch/ArchWindow.py b/src/Mod/Arch/ArchWindow.py
+index f3c11c5e9c7a..dc9c84f9a8bf 100644
+--- a/src/Mod/Arch/ArchWindow.py
++++ b/src/Mod/Arch/ArchWindow.py
+@@ -34,7 +34,7 @@
+ 
+ if FreeCAD.GuiUp:
+     import FreeCADGui
+-    from PySide import QtCore, QtGui, QtSvg
++    from PySide import QtCore, QtGui, QtSvgWidgets
+     from draftutils.translate import translate
+     from PySide.QtCore import QT_TRANSLATE_NOOP
+     import draftguitools.gui_trackers as DraftTrackers
+@@ -426,7 +426,7 @@ def taskbox(self):
+         self.pic.hide()
+ 
+         # SVG display
+-        self.im = QtSvg.QSvgWidget(":/ui/ParametersWindowFixed.svg")
++        self.im = QtSvgWidgets.QSvgWidget(":/ui/ParametersWindowFixed.svg")
+         self.im.setMaximumWidth(200)
+         self.im.setMinimumHeight(120)
+         grid.addWidget(self.im,4,0,1,2)
+diff --git a/src/Mod/Arch/importIFClegacy.py b/src/Mod/Arch/importIFClegacy.py
+index 037e889ce5b9..256b29056b33 100644
+--- a/src/Mod/Arch/importIFClegacy.py
++++ b/src/Mod/Arch/importIFClegacy.py
+@@ -1795,7 +1795,6 @@ def explorer(filename,schema="IFC2X3_TC1.exp"):
+     tree.headerItem().setText(1, "")
+     tree.headerItem().setText(2, "Item and Properties")
+     bold = QtGui.QFont()
+-    bold.setWeight(75)
+     bold.setBold(True)
+ 
+     #print(ifc.Entities)
+diff --git a/src/Mod/Draft/DraftGui.py b/src/Mod/Draft/DraftGui.py
+index c6e8584f4a71..2471bb66c61a 100644
+--- a/src/Mod/Draft/DraftGui.py
++++ b/src/Mod/Draft/DraftGui.py
+@@ -312,7 +312,6 @@ def setupToolBar(self,task=False):
+         self.promptlabel = self._label("promptlabel", self.layout, hide=task)
+         self.cmdlabel = self._label("cmdlabel", self.layout, hide=task)
+         boldtxt = QtGui.QFont()
+-        boldtxt.setWeight(75)
+         boldtxt.setBold(True)
+         self.cmdlabel.setFont(boldtxt)
+ 
+diff --git a/src/Mod/Material/MaterialEditor.py b/src/Mod/Material/MaterialEditor.py
+index cbcbde924609..28dbe83bc026 100644
+--- a/src/Mod/Material/MaterialEditor.py
++++ b/src/Mod/Material/MaterialEditor.py
+@@ -27,7 +27,7 @@
+ import os
+ from pathlib import PurePath
+ import sys
+-from PySide import QtCore, QtGui, QtSvg
++from PySide import QtCore, QtGui, QtSvgWidgets
+ 
+ import FreeCAD
+ import FreeCADGui
+@@ -92,11 +92,11 @@ def __init__(self, obj=None, prop=None, material=None, card_path="", category="S
+         treeView = widget.treeView
+ 
+         # create preview svg slots
+-        self.widget.PreviewRender = QtSvg.QSvgWidget(self.iconPath + "preview-rendered.svg")
++        self.widget.PreviewRender = QtSvgWidgets.QSvgWidget(self.iconPath + "preview-rendered.svg")
+         self.widget.PreviewRender.setMaximumWidth(64)
+         self.widget.PreviewRender.setMinimumHeight(64)
+         self.widget.topLayout.addWidget(self.widget.PreviewRender)
+-        self.widget.PreviewVector = QtSvg.QSvgWidget(self.iconPath + "preview-vector.svg")
++        self.widget.PreviewVector = QtSvgWidgets.QSvgWidget(self.iconPath + "preview-vector.svg")
+         self.widget.PreviewVector.setMaximumWidth(64)
+         self.widget.PreviewVector.setMinimumHeight(64)
+         self.widget.topLayout.addWidget(self.widget.PreviewVector)

diff --git a/media-gfx/freecad/freecad-0.21.2-r2.ebuild b/media-gfx/freecad/freecad-0.21.2-r3.ebuild
similarity index 95%
rename from media-gfx/freecad/freecad-0.21.2-r2.ebuild
rename to media-gfx/freecad/freecad-0.21.2-r3.ebuild
index b65ac07c0858..bf1b98990bc0 100644
--- a/media-gfx/freecad/freecad-0.21.2-r2.ebuild
+++ b/media-gfx/freecad/freecad-0.21.2-r3.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=8
 
-PYTHON_COMPAT=( python3_{10..11} )
+PYTHON_COMPAT=( python3_{10..12} )
 
 inherit check-reqs cmake flag-o-matic optfeature python-single-r1 qmake-utils xdg
 
@@ -93,8 +93,8 @@ RDEPEND="
 			$(python_gen_cond_dep '
 				dev-python/matplotlib[${PYTHON_USEDEP}]
 				>=dev-python/pivy-0.6.5[${PYTHON_USEDEP}]
-				dev-python/pyside2[gui,svg,webchannel,webengine,${PYTHON_USEDEP}]
-				dev-python/shiboken2[${PYTHON_USEDEP}]
+				dev-python/pyside2:=[gui,svg,webchannel,webengine,${PYTHON_USEDEP}]
+				dev-python/shiboken2:=[${PYTHON_USEDEP}]
 			' python3_{10..11} )
 		)
 		qt6? (
@@ -109,8 +109,8 @@ RDEPEND="
 			$(python_gen_cond_dep '
 				dev-python/matplotlib[${PYTHON_USEDEP}]
 				>=dev-python/pivy-0.6.5[${PYTHON_USEDEP}]
-				dev-python/pyside6[gui,svg,webchannel,webengine,${PYTHON_USEDEP}]
-				dev-python/shiboken6[${PYTHON_USEDEP}]
+				dev-python/pyside6:=[gui,svg,webchannel,webengine,${PYTHON_USEDEP}]
+				dev-python/shiboken6:=[${PYTHON_USEDEP}]
 			' )
 		)
 	)
@@ -159,7 +159,9 @@ REQUIRED_USE="
 	designer? ( gui )
 	inspection? ( points )
 	path? ( robot )
+	python_single_target_python3_12? ( gui? ( qt6 ) )
 "
+# There is no py3.12 support planned for pyside2
 
 PATCHES=(
 	"${FILESDIR}"/${PN}-0.21.0-0001-Gentoo-specific-disable-ccache-usage.patch
@@ -191,6 +193,12 @@ src_prepare() {
 		eapply "${FILESDIR}/${PN}-0.21.2-shiboken-6.7.0.patch"
 	fi
 
+	if use qt6; then
+		eapply "${FILESDIR}/${PN}-0.21.2-navcube-qt6.patch"
+		eapply "${FILESDIR}/${PN}-0.21.2-qtsvg-qt6.patch"
+		eapply "${FILESDIR}/${PN}-0.21.2-py312-qt6.patch"
+	fi
+
 	cmake_src_prepare
 }
 

diff --git a/media-gfx/freecad/freecad-9999.ebuild b/media-gfx/freecad/freecad-9999.ebuild
index f5778af821ff..250c1a1dbbf7 100644
--- a/media-gfx/freecad/freecad-9999.ebuild
+++ b/media-gfx/freecad/freecad-9999.ebuild
@@ -94,8 +94,8 @@ RDEPEND="
 			$(python_gen_cond_dep '
 				dev-python/matplotlib[${PYTHON_USEDEP}]
 				>=dev-python/pivy-0.6.5[${PYTHON_USEDEP}]
-				dev-python/pyside2[gui,svg,webchannel,webengine,${PYTHON_USEDEP}]
-				dev-python/shiboken2[${PYTHON_USEDEP}]
+				dev-python/pyside2:=[gui,svg,webchannel,webengine,${PYTHON_USEDEP}]
+				dev-python/shiboken2:=[${PYTHON_USEDEP}]
 			' python3_{10..11} )
 		)
 		qt6? (
@@ -109,8 +109,8 @@ RDEPEND="
 			$(python_gen_cond_dep '
 				dev-python/matplotlib[${PYTHON_USEDEP}]
 				>=dev-python/pivy-0.6.5[${PYTHON_USEDEP}]
-				dev-python/pyside6[gui,svg,webchannel,webengine,${PYTHON_USEDEP}]
-				dev-python/shiboken6[${PYTHON_USEDEP}]
+				dev-python/pyside6:=[gui,svg,webchannel,webengine,${PYTHON_USEDEP}]
+				dev-python/shiboken6:=[${PYTHON_USEDEP}]
 			' )
 		)
 	)


^ permalink raw reply related	[flat|nested] 13+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-gfx/freecad/, media-gfx/freecad/files/
@ 2024-05-29 17:07 Andrew Ammerlaan
  0 siblings, 0 replies; 13+ messages in thread
From: Andrew Ammerlaan @ 2024-05-29 17:07 UTC (permalink / raw
  To: gentoo-commits

commit:     4f8dbb6345ae081b5bb65af4ea20c0c8eb09e92e
Author:     Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
AuthorDate: Wed May 29 17:06:56 2024 +0000
Commit:     Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
CommitDate: Wed May 29 17:07:37 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4f8dbb63

media-gfx/freecad: fix build with boost 1.75

and properly pass through arguments in wrapper

Closes: https://bugs.gentoo.org/932454
Closes: https://bugs.gentoo.org/932818
Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org>

 .../freecad/files/freecad-0.21.2-boost-175-1.patch | 22 +++++++++++++++++++
 .../freecad/files/freecad-0.21.2-boost-175-2.patch | 22 +++++++++++++++++++
 .../freecad/files/freecad-0.21.2-boost-175-3.patch | 25 ++++++++++++++++++++++
 media-gfx/freecad/freecad-0.21.2-r2.ebuild         |  5 ++++-
 media-gfx/freecad/freecad-9999.ebuild              |  2 +-
 5 files changed, 74 insertions(+), 2 deletions(-)

diff --git a/media-gfx/freecad/files/freecad-0.21.2-boost-175-1.patch b/media-gfx/freecad/files/freecad-0.21.2-boost-175-1.patch
new file mode 100644
index 000000000000..cbb78d5bdc94
--- /dev/null
+++ b/media-gfx/freecad/files/freecad-0.21.2-boost-175-1.patch
@@ -0,0 +1,22 @@
+From f555a25f9e67e628e8075fc8599d7c11807eaddd Mon Sep 17 00:00:00 2001
+From: wmayer <wmayer@users.sourceforge.net>
+Date: Sun, 21 Apr 2024 08:36:16 +0200
+Subject: [PATCH] Fixes #13549: smesh doesn't compile with boost 1.85
+
+---
+ src/3rdParty/salomesmesh/src/SMESH/DriverGMF.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/3rdParty/salomesmesh/src/SMESH/DriverGMF.cpp b/src/3rdParty/salomesmesh/src/SMESH/DriverGMF.cpp
+index d72ff2363f39..f108cbbcb2cf 100644
+--- a/src/3rdParty/salomesmesh/src/SMESH/DriverGMF.cpp
++++ b/src/3rdParty/salomesmesh/src/SMESH/DriverGMF.cpp
+@@ -55,7 +55,7 @@ namespace DriverGMF
+ 
+   bool isExtensionCorrect( const std::string& fileName )
+   {
+-    std::string ext  = boost::filesystem::extension(fileName);
++    std::string ext = boost::filesystem::path(fileName).extension().string();
+     switch ( ext.size() ) {
+     case 5: return ( ext == ".mesh" || ext == ".solb" );
+     case 6: return ( ext == ".meshb" );

diff --git a/media-gfx/freecad/files/freecad-0.21.2-boost-175-2.patch b/media-gfx/freecad/files/freecad-0.21.2-boost-175-2.patch
new file mode 100644
index 000000000000..5f0807028859
--- /dev/null
+++ b/media-gfx/freecad/files/freecad-0.21.2-boost-175-2.patch
@@ -0,0 +1,22 @@
+From aa54ba73df4d42878130c99688be35acf10725a0 Mon Sep 17 00:00:00 2001
+From: ppphp <kevinniub@gmail.com>
+Date: Sat, 30 Mar 2024 13:52:32 +0800
+Subject: [PATCH] fix: c++20 deprecate copy_option
+
+---
+ src/Gui/PreferencePackManager.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/Gui/PreferencePackManager.cpp b/src/Gui/PreferencePackManager.cpp
+index e0e6184a3147..e1773a436852 100644
+--- a/src/Gui/PreferencePackManager.cpp
++++ b/src/Gui/PreferencePackManager.cpp
+@@ -224,7 +224,7 @@ void Gui::PreferencePackManager::importConfig(const std::string& packName,
+     auto savedPreferencePacksDirectory =
+         fs::path(App::Application::getUserAppDataDir()) / "SavedPreferencePacks";
+     auto cfgFilename = savedPreferencePacksDirectory / packName / (packName + ".cfg");
+-    fs::copy_file(path, cfgFilename, fs::copy_option::overwrite_if_exists);
++    fs::copy_file(path, cfgFilename, fs::copy_options::overwrite_existing);
+     rescan();
+ }
+ 

diff --git a/media-gfx/freecad/files/freecad-0.21.2-boost-175-3.patch b/media-gfx/freecad/files/freecad-0.21.2-boost-175-3.patch
new file mode 100644
index 000000000000..c4c8039dab49
--- /dev/null
+++ b/media-gfx/freecad/files/freecad-0.21.2-boost-175-3.patch
@@ -0,0 +1,25 @@
+From 91457bbdee2422c7f0372688cf72d021cf222073 Mon Sep 17 00:00:00 2001
+From: ppphp <kevinniub@gmail.com>
+Date: Sat, 30 Mar 2024 19:17:56 +0800
+Subject: [PATCH] add version check macro for compatibility
+
+---
+ src/Gui/PreferencePackManager.cpp | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/Gui/PreferencePackManager.cpp b/src/Gui/PreferencePackManager.cpp
+index e1773a436852..dfc54240c00c 100644
+--- a/src/Gui/PreferencePackManager.cpp
++++ b/src/Gui/PreferencePackManager.cpp
+@@ -224,7 +224,11 @@ void Gui::PreferencePackManager::importConfig(const std::string& packName,
+     auto savedPreferencePacksDirectory =
+         fs::path(App::Application::getUserAppDataDir()) / "SavedPreferencePacks";
+     auto cfgFilename = savedPreferencePacksDirectory / packName / (packName + ".cfg");
++#if BOOST_VERSION >= 107400
+     fs::copy_file(path, cfgFilename, fs::copy_options::overwrite_existing);
++#else
++    fs::copy_file(path, cfgFilename, fs::copy_option::overwrite_if_exists);
++#endif
+     rescan();
+ }
+ 

diff --git a/media-gfx/freecad/freecad-0.21.2-r2.ebuild b/media-gfx/freecad/freecad-0.21.2-r2.ebuild
index b0f1d3fac470..b65ac07c0858 100644
--- a/media-gfx/freecad/freecad-0.21.2-r2.ebuild
+++ b/media-gfx/freecad/freecad-0.21.2-r2.ebuild
@@ -165,6 +165,9 @@ PATCHES=(
 	"${FILESDIR}"/${PN}-0.21.0-0001-Gentoo-specific-disable-ccache-usage.patch
 	"${FILESDIR}"/${PN}-0.21.1-Gentoo-specific-don-t-check-vcs.patch
 	"${FILESDIR}"/${PN}-0.21.2-vtk9.3-fix.patch
+	"${FILESDIR}"/${PN}-0.21.2-boost-175-1.patch
+	"${FILESDIR}"/${PN}-0.21.2-boost-175-2.patch
+	"${FILESDIR}"/${PN}-0.21.2-boost-175-3.patch
 )
 
 DOCS=( CODE_OF_CONDUCT.md README.md )
@@ -336,7 +339,7 @@ src_install() {
 		# https://github.com/coin3d/coin/issues/451
 		: \${QT_QPA_PLATFORM:=xcb}
 		export QT_QPA_PLATFORM
-		exec /usr/$(get_libdir)/${PN}/bin/FreeCAD
+		exec /usr/$(get_libdir)/${PN}/bin/FreeCAD \${@}
 		_EOF_
 		mv "${ED}"/usr/$(get_libdir)/${PN}/share/* "${ED}"/usr/share || die "failed to move shared resources"
 	fi

diff --git a/media-gfx/freecad/freecad-9999.ebuild b/media-gfx/freecad/freecad-9999.ebuild
index ad9a9580164b..f5778af821ff 100644
--- a/media-gfx/freecad/freecad-9999.ebuild
+++ b/media-gfx/freecad/freecad-9999.ebuild
@@ -333,7 +333,7 @@ src_install() {
 		# https://github.com/coin3d/coin/issues/451
 		: \${QT_QPA_PLATFORM:=xcb}
 		export QT_QPA_PLATFORM
-		exec /usr/$(get_libdir)/${PN}/bin/FreeCAD
+		exec /usr/$(get_libdir)/${PN}/bin/FreeCAD \${@}
 		_EOF_
 		mv "${ED}"/usr/$(get_libdir)/${PN}/share/* "${ED}"/usr/share || die "failed to move shared resources"
 	fi


^ permalink raw reply related	[flat|nested] 13+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-gfx/freecad/, media-gfx/freecad/files/
@ 2024-04-14  8:56 Andrew Ammerlaan
  0 siblings, 0 replies; 13+ messages in thread
From: Andrew Ammerlaan @ 2024-04-14  8:56 UTC (permalink / raw
  To: gentoo-commits

commit:     91f702aa09d2fd99e78bb974ae80440daf8dc74b
Author:     Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
AuthorDate: Sun Apr 14 08:53:53 2024 +0000
Commit:     Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
CommitDate: Sun Apr 14 08:53:53 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=91f702aa

media-gfx/freecad: add patch for build with shiboken 6.7.0

patch is added conditional because not sure what this does with older shiboken

and block against opencascade[inspector] which breaks qt6 configure

Bug: https://bugs.gentoo.org/929973
Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org>

 media-gfx/freecad/files/freecad-0.21.2-shiboken-6.7.0.patch | 8 ++++++++
 media-gfx/freecad/freecad-0.21.2-r2.ebuild                  | 6 ++++++
 2 files changed, 14 insertions(+)

diff --git a/media-gfx/freecad/files/freecad-0.21.2-shiboken-6.7.0.patch b/media-gfx/freecad/files/freecad-0.21.2-shiboken-6.7.0.patch
new file mode 100644
index 000000000000..8efd55121ee7
--- /dev/null
+++ b/media-gfx/freecad/files/freecad-0.21.2-shiboken-6.7.0.patch
@@ -0,0 +1,8 @@
+https://bugs.gentoo.org/929973
+--- a/src/Gui/PythonWrapper.cpp
++++ b/src/Gui/PythonWrapper.cpp
+@@ -480,3 +480,3 @@
+             return false;
+-        types = Shiboken::Module::getTypes(requiredModule);
++        types = reinterpret_cast<PyTypeObject **>(Shiboken::Module::getTypes(requiredModule));
+     }

diff --git a/media-gfx/freecad/freecad-0.21.2-r2.ebuild b/media-gfx/freecad/freecad-0.21.2-r2.ebuild
index f0c0f0c47bbb..33eb615da690 100644
--- a/media-gfx/freecad/freecad-0.21.2-r2.ebuild
+++ b/media-gfx/freecad/freecad-0.21.2-r2.ebuild
@@ -98,6 +98,7 @@ RDEPEND="
 			' python3_{10..11} )
 		)
 		qt6? (
+			sci-libs/opencascade[-inspector(-)]
 			designer? ( dev-qt/qttools:6[designer] )
 			dev-qt/qt5compat:6
 			dev-qt/qttools:6[widgets]
@@ -181,6 +182,11 @@ src_prepare() {
 
 	find "${S}" -type f -exec dos2unix -q {} \; || die "failed to convert to unix line endings"
 
+	if has_version ">=dev-python/shiboken6-6.7.0"; then
+		# https://bugs.gentoo.org/929973
+		eapply "${FILESDIR}/${PN}-0.21.2-shiboken-6.7.0.patch"
+	fi
+
 	cmake_src_prepare
 }
 


^ permalink raw reply related	[flat|nested] 13+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-gfx/freecad/, media-gfx/freecad/files/
@ 2023-08-19  9:05 Miroslav Šulc
  0 siblings, 0 replies; 13+ messages in thread
From: Miroslav Šulc @ 2023-08-19  9:05 UTC (permalink / raw
  To: gentoo-commits

commit:     4226f432c5291af081cde0ca9bfb662a5ab4b4f3
Author:     Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
AuthorDate: Sat Aug 19 09:05:02 2023 +0000
Commit:     Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
CommitDate: Sat Aug 19 09:05:16 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4226f432

media-gfx/freecad: updated live ebuild

* updated qt test patch
* updated desktop file name

Signed-off-by: Miroslav Šulc <fordfrog <AT> gentoo.org>

 ...s-src-Qt-only-build-test-for-BUILD_GUI-ON.patch | 36 ++++++++++------------
 media-gfx/freecad/freecad-9999.ebuild              |  2 +-
 2 files changed, 17 insertions(+), 21 deletions(-)

diff --git a/media-gfx/freecad/files/freecad-9999-tests-src-Qt-only-build-test-for-BUILD_GUI-ON.patch b/media-gfx/freecad/files/freecad-9999-tests-src-Qt-only-build-test-for-BUILD_GUI-ON.patch
index 5455c0ee2992..3eb2e79c4c3d 100644
--- a/media-gfx/freecad/files/freecad-9999-tests-src-Qt-only-build-test-for-BUILD_GUI-ON.patch
+++ b/media-gfx/freecad/files/freecad-9999-tests-src-Qt-only-build-test-for-BUILD_GUI-ON.patch
@@ -1,24 +1,20 @@
-From cb77c7d937c259224699273fee1ba5907588fa4c Mon Sep 17 00:00:00 2001
-From: Bernd Waibel <waebbl-gentoo@posteo.net>
-Date: Sun, 12 Feb 2023 19:54:13 +0100
-Subject: [PATCH] tests/src/Qt: only build test for BUILD_GUI=ON
-
-Signed-off-by: Bernd Waibel <waebbl-gentoo@posteo.net>
---- a/tests/src/Qt/CMakeLists.txt
-+++ b/tests/src/Qt/CMakeLists.txt
-@@ -30,6 +30,7 @@ endfunction()
- set(CMAKE_AUTOMOC ON)
+--- a/tests/src/Base/CMakeLists.txt
++++ b/tests/src/Base/CMakeLists.txt
+@@ -11,4 +11,6 @@ target_sources(
+             ${CMAKE_CURRENT_SOURCE_DIR}/tst_Tools.cpp
+ )
  
- # Qt Test
+-setup_qt_test(InventorBuilder)
 +if(BUILD_GUI)
- include_directories(
-     ${QtGui_INCLUDE_DIRS}
-     ${QtTest_INCLUDE_DIRS}
-@@ -46,3 +47,4 @@ set (InventorBuilder_LIBS
- SETUP_TESTS(
-     InventorBuilder
++    setup_qt_test(InventorBuilder)
++endif()
+--- a/tests/src/Gui/CMakeLists.txt
++++ b/tests/src/Gui/CMakeLists.txt
+@@ -6,4 +6,6 @@ target_sources(
  )
+ 
+ # Qt tests
+-setup_qt_test(QuantitySpinBox)
++if(BUILD_GUI)
++    setup_qt_test(QuantitySpinBox)
 +endif()
--- 
-2.39.1
-

diff --git a/media-gfx/freecad/freecad-9999.ebuild b/media-gfx/freecad/freecad-9999.ebuild
index 3c44e3745979..73fd4eaff9a1 100644
--- a/media-gfx/freecad/freecad-9999.ebuild
+++ b/media-gfx/freecad/freecad-9999.ebuild
@@ -152,7 +152,7 @@ pkg_setup() {
 
 src_prepare() {
 	# Fix desktop file
-	sed -e 's/Exec=FreeCAD/Exec=freecad/' -i src/XDGData/org.freecadweb.FreeCAD.desktop || die
+	sed -e 's/Exec=FreeCAD/Exec=freecad/' -i src/XDGData/org.freecad.FreeCAD.desktop || die
 
 	find "${S}" -type f -exec dos2unix -q {} \; || die "failed to convert to unix line endings"
 


^ permalink raw reply related	[flat|nested] 13+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-gfx/freecad/, media-gfx/freecad/files/
@ 2022-04-02 12:58 Andreas Sturmlechner
  0 siblings, 0 replies; 13+ messages in thread
From: Andreas Sturmlechner @ 2022-04-02 12:58 UTC (permalink / raw
  To: gentoo-commits

commit:     728417f0a8ce57a6daaa448100a101d107c25b6d
Author:     Bernd Waibel <waebbl-gentoo <AT> posteo <DOT> net>
AuthorDate: Sat Apr  2 08:22:04 2022 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sat Apr  2 12:57:33 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=728417f0

media-gfx/freecad: fix build of 0.19.4 with Qt 5.15.3

Backport changes from HEAD FindPySide2Tools.cmake to correctly
find the path for uic and rcc binaries.

Closes: https://bugs.gentoo.org/836433
Signed-off-by: Bernd Waibel <waebbl-gentoo <AT> posteo.net>
Closes: https://github.com/gentoo/gentoo/pull/24861
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 ...19.4-backport-correctly-find-PySide2Tools.patch | 106 +++++++++++++++++++++
 media-gfx/freecad/freecad-0.19.4.ebuild            |   1 +
 2 files changed, 107 insertions(+)

diff --git a/media-gfx/freecad/files/freecad-0.19.4-backport-correctly-find-PySide2Tools.patch b/media-gfx/freecad/files/freecad-0.19.4-backport-correctly-find-PySide2Tools.patch
new file mode 100644
index 000000000000..b297727033db
--- /dev/null
+++ b/media-gfx/freecad/files/freecad-0.19.4-backport-correctly-find-PySide2Tools.patch
@@ -0,0 +1,106 @@
+From https://github.com/FreeCAD/FreeCAD/tree/6b062b25e118fc6d260d8caff6cf46fafd6cfa0f
+From: Bernd Waibel <waebbl-gentoo@posteo.net>
+Date: Sat, 2 Apr 2022 09:30:09 +0200
+Subject: [PATCH] backport correctly find PySide2Tools
+
+Backported from current HEAD
+
+Signed-off-by: Bernd Waibel <waebbl-gentoo@posteo.net>
+--- a/cMake/FindPySide2Tools.cmake
++++ b/cMake/FindPySide2Tools.cmake
+@@ -23,7 +23,7 @@ endif(WIN32 OR ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
+ # Since Qt v5.14, pyside2-uic and pyside2-rcc are directly provided by Qt5Core uic and rcc, with '-g python' option
+ # We test Qt5Core version to act accordingly
+ 
+-FIND_PACKAGE(Qt5Core)
++FIND_PACKAGE(Qt5 COMPONENTS Core)
+ 
+ IF(Qt5Core_VERSION VERSION_LESS 5.14)
+   # Legacy (< 5.14)
+@@ -33,13 +33,20 @@ IF(Qt5Core_VERSION VERSION_LESS 5.14)
+   set(RCCOPTIONS "")
+ ELSE(Qt5Core_VERSION VERSION_LESS 5.14)
+   # New (>= 5.14)
+-  FIND_PROGRAM(PYSIDE2UICBINARY NAMES uic-qt5 uic pyside2-uic)
+-  set(UICOPTIONS "--generator=python")
+-  FIND_PROGRAM(PYSIDE2RCCBINARY NAMES rcc-qt5 rcc pyside2-rcc)
+-  set(RCCOPTIONS "--generator=python" "--compress-algo=zlib" "--compress=1")
++  if (TARGET Qt::uic)
++    get_property(PYSIDE2UICBINARY TARGET Qt::uic PROPERTY LOCATION)
++    set(UICOPTIONS "--generator=python")
++  endif()
++  if (TARGET Qt::rcc)
++    get_property(PYSIDE2RCCBINARY TARGET Qt::rcc PROPERTY LOCATION)
++    set(RCCOPTIONS "--generator=python" "--compress-algo=zlib" "--compress=1")
++  endif()
+ ENDIF(Qt5Core_VERSION VERSION_LESS 5.14)
+ 
+ MACRO(PYSIDE_WRAP_UI outfiles)
++  if (NOT PYSIDE2UICBINARY)
++    message(FATAL_ERROR "Qt uic is required for generating ${ARGN}")
++  endif()
+   FOREACH(it ${ARGN})
+     GET_FILENAME_COMPONENT(outfile ${it} NAME_WE)
+     GET_FILENAME_COMPONENT(infile ${it} ABSOLUTE)
+@@ -58,7 +65,7 @@ MACRO(PYSIDE_WRAP_UI outfiles)
+         # we follow the tool command with in-place sed.
+         ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
+           COMMAND "${PYSIDE2UICBINARY}" ${UICOPTIONS} "${infile}" -o "${outfile}"
+-          COMMAND sed -i "/^# /d" "${outfile}"
++          COMMAND sed "/^# /d" "${outfile}" >"${outfile}.tmp" && mv "${outfile}.tmp" "${outfile}"
+           MAIN_DEPENDENCY "${infile}"
+         )
+     endif()
+@@ -67,6 +74,9 @@ MACRO(PYSIDE_WRAP_UI outfiles)
+ ENDMACRO (PYSIDE_WRAP_UI)
+ 
+ MACRO(PYSIDE_WRAP_RC outfiles)
++  if (NOT PYSIDE2RCCBINARY)
++    message(FATAL_ERROR "Qt rcc is required for generating ${ARGN}")
++  endif()
+   FOREACH(it ${ARGN})
+     GET_FILENAME_COMPONENT(outfile ${it} NAME_WE)
+     GET_FILENAME_COMPONENT(infile ${it} ABSOLUTE)
+@@ -85,7 +95,7 @@ MACRO(PYSIDE_WRAP_RC outfiles)
+         # we follow the tool command with in-place sed.
+         ADD_CUSTOM_COMMAND(OUTPUT "${outfile}"
+           COMMAND "${PYSIDE2RCCBINARY}" ${RCCOPTIONS} "${infile}" ${PY_ATTRIBUTE} -o "${outfile}"
+-          COMMAND sed -i "/^# /d" "${outfile}"
++          COMMAND sed "/^# /d" "${outfile}" >"${outfile}.tmp" && mv "${outfile}.tmp" "${outfile}"
+           MAIN_DEPENDENCY "${infile}"
+         )
+     endif()
+@@ -93,20 +103,17 @@ MACRO(PYSIDE_WRAP_RC outfiles)
+   ENDFOREACH(it)
+ ENDMACRO (PYSIDE_WRAP_RC)
+ 
+-IF(EXISTS ${PYSIDE2UICBINARY} AND EXISTS ${PYSIDE2RCCBINARY})
+-   set(PYSIDE2_TOOLS_FOUND TRUE)
+-ENDIF(EXISTS ${PYSIDE2UICBINARY} AND EXISTS ${PYSIDE2RCCBINARY})
+-
+ if(PYSIDE2RCCBINARY AND PYSIDE2UICBINARY)
++  set(PYSIDE2_TOOLS_FOUND TRUE)
++  if (NOT PySide2Tools_FIND_QUIETLY)
++    message(STATUS "Found PySide2 tools: ${PYSIDE2UICBINARY}, ${PYSIDE2RCCBINARY}")
++  endif (NOT PySide2Tools_FIND_QUIETLY)
++else(PYSIDE2RCCBINARY AND PYSIDE2UICBINARY)
++  if(PySide2Tools_FIND_REQUIRED)
++    message(FATAL_ERROR "PySide2 tools could not be found, but are required.")
++  else(PySide2Tools_FIND_REQUIRED)
+     if (NOT PySide2Tools_FIND_QUIETLY)
+-        message(STATUS "Found PySide2 tools: ${PYSIDE2UICBINARY}, ${PYSIDE2RCCBINARY}")
++      message(STATUS "PySide2 tools: not found.")
+     endif (NOT PySide2Tools_FIND_QUIETLY)
+-else(PYSIDE2RCCBINARY AND PYSIDE2UICBINARY)
+-    if(PySide2Tools_FIND_REQUIRED)
+-        message(FATAL_ERROR "PySide2 tools could not be found, but are required.")
+-    else(PySide2Tools_FIND_REQUIRED)
+-        if (NOT PySide2Tools_FIND_QUIETLY)
+-                message(STATUS "PySide2 tools: not found.")
+-        endif (NOT PySide2Tools_FIND_QUIETLY)
+-    endif(PySide2Tools_FIND_REQUIRED)
++  endif(PySide2Tools_FIND_REQUIRED)
+ endif(PYSIDE2RCCBINARY AND PYSIDE2UICBINARY)
+-- 
+2.35.1
+

diff --git a/media-gfx/freecad/freecad-0.19.4.ebuild b/media-gfx/freecad/freecad-0.19.4.ebuild
index cab7693eaacd..270ba00b2832 100644
--- a/media-gfx/freecad/freecad-0.19.4.ebuild
+++ b/media-gfx/freecad/freecad-0.19.4.ebuild
@@ -125,6 +125,7 @@ REQUIRED_USE="
 
 PATCHES=(
 	"${FILESDIR}"/${P}-Gentoo-specific-don-t-check-vcs.patch
+	"${FILESDIR}"/${P}-backport-correctly-find-PySide2Tools.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


^ permalink raw reply related	[flat|nested] 13+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-gfx/freecad/, media-gfx/freecad/files/
@ 2022-02-03  2:19 Sam James
  0 siblings, 0 replies; 13+ messages in thread
From: Sam James @ 2022-02-03  2:19 UTC (permalink / raw
  To: gentoo-commits

commit:     a57d11c8caaa82831507a2074d19ec87cb62dbcb
Author:     Bernd Waibel <waebbl-gentoo <AT> posteo <DOT> net>
AuthorDate: Mon Jan 31 05:32:36 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Feb  3 02:18:14 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a57d11c8

media-gfx/freecad: backport vulnerability patches

Bug: https://bugs.gentoo.org/832209
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Bernd Waibel <waebbl-gentoo <AT> posteo.net>
Closes: https://github.com/gentoo/gentoo/pull/24043
Signed-off-by: Sam James <sam <AT> gentoo.org>

 ...-0004809-Security-vulnerability-in-DWG-im.patch |  59 ++++
 ...-Use-run-instead-of-Popen-to-avoid-need-f.patch |  25 ++
 media-gfx/freecad/freecad-0.19.2-r6.ebuild         | 326 +++++++++++++++++++++
 3 files changed, 410 insertions(+)

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/freecad-0.19.2-r6.ebuild b/media-gfx/freecad/freecad-0.19.2-r6.ebuild
new file mode 100644
index 000000000000..931a6260baa1
--- /dev/null
+++ b/media-gfx/freecad/freecad-0.19.2-r6.ebuild
@@ -0,0 +1,326 @@
+# 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/${P}-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 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="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 )
+"
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-0.19_pre20201231-0003-Gentoo-specific-don-t-check-vcs.patch
+	"${FILESDIR}"/${PN}-0.19.1-0001-Gentoo-specific-Remove-ccache-usage.patch
+	"${FILESDIR}"/${P}-0001-fix-failing-test-workbench-testcase.patch
+	"${FILESDIR}"/${P}-0002-fix-femtest-failure-with-yaml-load.patch
+	"${FILESDIR}"/${P}-0003-fix-test-when-built-without-GUI.patch
+	"${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 )
+
+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
+
+	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=ON
+		-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
+		mv "${ED}"/usr/$(get_libdir)/freecad/share/* "${ED}"/usr/share || die "failed to move shared ressources"
+	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
+
+	doenvd "${FILESDIR}/99${PN}"
+}
+
+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
+}


^ permalink raw reply related	[flat|nested] 13+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-gfx/freecad/, media-gfx/freecad/files/
@ 2021-11-02 10:04 Sam James
  0 siblings, 0 replies; 13+ messages in thread
From: Sam James @ 2021-11-02 10:04 UTC (permalink / raw
  To: gentoo-commits

commit:     6499c130f97644defd3b71d86c4af3b3b5c96c2a
Author:     Bernd Waibel <waebbl-gentoo <AT> posteo <DOT> net>
AuthorDate: Sun Oct 17 19:55:29 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Nov  2 10:04:37 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6499c130

media-gfx/freecad: install freecad-thumbnailer

Can be used by file-managers to show previews for FreeCAD's .fcstd
files.

Additional changes:
- bump to EAPI 8
- cleanup inherit statement
- patch to build with boost-1.77.0
- soften sci-libs/pcl dependency. pcl-1.12 supports vtk-9, so there's
	no longer any need to use live ebuild
- clean optfeature statments from packages which are installed anyway
	or controlled by USE flags
- use C++17

Suggested-by: Michael Perlov <perlovka <AT> gmail.com>
Bug: https://github.com/waebbl/waebbl-gentoo/issues/341
Closes: https://bugs.gentoo.org/821160
Package-Manager: Portage-3.0.28, Repoman-3.0.3
Signed-off-by: Bernd Waibel <waebbl-gentoo <AT> posteo.net>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 ...9999-Add-memory-header-for-std-shared_ptr.patch | 31 ++++++++++++++++++++++
 media-gfx/freecad/freecad-9999.ebuild              | 24 ++++++++---------
 2 files changed, 43 insertions(+), 12 deletions(-)

diff --git a/media-gfx/freecad/files/freecad-9999-Add-memory-header-for-std-shared_ptr.patch b/media-gfx/freecad/files/freecad-9999-Add-memory-header-for-std-shared_ptr.patch
new file mode 100644
index 00000000000..81a8f22d893
--- /dev/null
+++ b/media-gfx/freecad/files/freecad-9999-Add-memory-header-for-std-shared_ptr.patch
@@ -0,0 +1,31 @@
+From: Bernd Waibel <waebbl-gentoo@posteo.net>
+Date: Sat, 16 Oct 2021 17:02:19 +0200
+Subject: [PATCH] Add memory header for std::shared_ptr
+
+Signed-off-by: Bernd Waibel <waebbl-gentoo@posteo.net>
+---
+ src/App/Metadata.h | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/App/Metadata.h b/src/App/Metadata.h
+index de8be3ea8e..2c5fd8f417 100644
+--- a/src/App/Metadata.h
++++ b/src/App/Metadata.h
+@@ -30,6 +30,7 @@
+ #include <string>
+ #include <vector>
+ #include <map>
++#include <memory>
+ 
+ #include <xercesc/dom/DOM.hpp>
+ #include <xercesc/parsers/XercesDOMParser.hpp>
+@@ -296,4 +297,4 @@ namespace App {
+ 
+ }
+ 
+-#endif
+\ No newline at end of file
++#endif
+-- 
+2.33.1
+

diff --git a/media-gfx/freecad/freecad-9999.ebuild b/media-gfx/freecad/freecad-9999.ebuild
index 8c0caca6adc..cef63f28477 100644
--- a/media-gfx/freecad/freecad-9999.ebuild
+++ b/media-gfx/freecad/freecad-9999.ebuild
@@ -1,11 +1,11 @@
 # Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=7
+EAPI=8
 
 PYTHON_COMPAT=( python3_{8,9} )
 
-inherit check-reqs cmake desktop eapi8-dosym optfeature python-single-r1 xdg
+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"
@@ -81,7 +81,7 @@ RDEPEND="
 	)
 	fem? ( sci-libs/vtk:=[boost,python,qt5,rendering,${PYTHON_SINGLE_USEDEP}] )
 	openscad? ( media-gfx/openscad )
-	pcl? ( ~sci-libs/pcl-${PV}:=[opengl,openni2(+),qt5(+),vtk(+)] )
+	pcl? ( sci-libs/pcl:=[opengl,openni2(+),qt5(+),vtk(+)] )
 	$(python_gen_cond_dep '
 		dev-libs/boost:=[python,threads(+),${PYTHON_USEDEP}]
 		dev-python/matplotlib[${PYTHON_USEDEP}]
@@ -120,6 +120,7 @@ REQUIRED_USE="
 PATCHES=(
 	"${FILESDIR}"/${PN}-0.19_pre20201231-0003-Gentoo-specific-don-t-check-vcs.patch
 	"${FILESDIR}"/${PN}-0.19.1-0001-Gentoo-specific-Remove-ccache-usage.patch
+	"${FILESDIR}"/${P}-Add-memory-header-for-std-shared_ptr.patch
 )
 
 DOCS=( CODE_OF_CONDUCT.md ChangeLog.txt README.md )
@@ -168,7 +169,7 @@ src_configure() {
 		-DBUILD_COMPLETE=OFF					# deprecated
 		-DBUILD_DRAFT=ON
 		-DBUILD_DRAWING=ON
-		-DBUILD_ENABLE_CXX_STD:STRING="C++14"	# needed for >=boost-1.75.0
+		-DBUILD_ENABLE_CXX_STD:STRING="C++17"	# needed for current git master
 		-DBUILD_FEM=$(usex fem)
 		-DBUILD_FEM_NETGEN=OFF
 		-DBUILD_FLAT_MESH=ON
@@ -224,14 +225,14 @@ src_configure() {
 		-DFREECAD_USE_QT_FILEDIALOG=ON
 		-DFREECAD_USE_QTWEBMODULE:STRING="Qt WebEngine"
 
-		# Use the version of shiboken2 that matches the selected python version
-		-DPYTHON_CONFIG_SUFFIX="-${EPYTHON}"
-
 		# 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}
+
 		-DOCCT_CMAKE_FALLBACK=ON				# don't use occt-config which isn't included in opencascade for Gentoo
 	)
 
@@ -289,11 +290,13 @@ src_test() {
 src_install() {
 	cmake_src_install
 
+	dobin src/Tools/freecad-thumbnailer
+
 	if ! use headless; then
-		dosym8 -r /usr/$(get_libdir)/${PN}/bin/FreeCAD /usr/bin/freecad
+		dosym -r /usr/$(get_libdir)/${PN}/bin/FreeCAD /usr/bin/freecad
 		mv "${ED}"/usr/$(get_libdir)/freecad/share/* "${ED}"/usr/share || die "failed to move shared ressources"
 	fi
-	dosym8 -r /usr/$(get_libdir)/${PN}/bin/FreeCADCmd /usr/bin/freecadcmd
+	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
@@ -326,14 +329,11 @@ pkg_postinst() {
 	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 "numerical computations with Python" dev-python/numpy
 	optfeature "BLAS library" sci-libs/openblas
 	optfeature "statistical computation with Python" dev-python/pandas
-	optfeature "usage of Point Clouds" sci-libs/pcl
 	optfeature "scientific computation with Python" dev-python/scipy
 	optfeature "symbolic math with Python" dev-python/sympy
 	optfeature_header "Imaging, Plotting and Rendering utilities"
-	optfeature "function plotting with Python" dev-python/matplotlib
 	optfeature "dependency graphs" media-gfx/graphviz
 	optfeature "PBR Rendering" media-gfx/povray
 	optfeature_header "Import / Export"


^ permalink raw reply related	[flat|nested] 13+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-gfx/freecad/, media-gfx/freecad/files/
@ 2021-06-21 22:26 Sam James
  0 siblings, 0 replies; 13+ messages in thread
From: Sam James @ 2021-06-21 22:26 UTC (permalink / raw
  To: gentoo-commits

commit:     7b5a3b73f36cafd3274ad495028bfae3c573d049
Author:     Bernd Waibel <waebbl-gentoo <AT> posteo <DOT> net>
AuthorDate: Sun Jun 20 12:09:03 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Jun 21 22:25:56 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7b5a3b73

media-gfx/freecad: update dependencies

support >=sci-libs/opencascade-7.5.2
support >=sci-libs/vtk-9

Package-Manager: Portage-3.0.20, Repoman-3.0.3
Signed-off-by: Bernd Waibel <waebbl-gentoo <AT> posteo.net>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 media-gfx/freecad/Manifest                         |   1 +
 ...6-add-boost-serialization-to-find_package.patch |  53 ++++
 ...-fix-build-failure-with-opencascade-7.5.2.patch |  30 ++
 media-gfx/freecad/freecad-0.19.2-r2.ebuild         | 339 +++++++++++++++++++++
 4 files changed, 423 insertions(+)

diff --git a/media-gfx/freecad/Manifest b/media-gfx/freecad/Manifest
index 486f8202d98..e67bfab4a78 100644
--- a/media-gfx/freecad/Manifest
+++ b/media-gfx/freecad/Manifest
@@ -1,2 +1,3 @@
 DIST freecad-0.19.1.tar.gz 296983463 BLAKE2B de6592474c34c5643ba7f63d6223bf7b2fcee87ebf226727e242ff3f56f363562dd0bae8cb6b3203d978d998b70985777ca93b938c0fc01822e8927cd79f6118 SHA512 5134fba99448c509f0761d62b07f1bbd3183108761f41178b38f24d5ba26558608d7d7b00009d03ba097a50cc6fe047bbd57872b32a1d55b3526d18c19ae6393
+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

diff --git a/media-gfx/freecad/files/freecad-0.19.2-0006-add-boost-serialization-to-find_package.patch b/media-gfx/freecad/files/freecad-0.19.2-0006-add-boost-serialization-to-find_package.patch
new file mode 100644
index 00000000000..f9120e05191
--- /dev/null
+++ b/media-gfx/freecad/files/freecad-0.19.2-0006-add-boost-serialization-to-find_package.patch
@@ -0,0 +1,53 @@
+From fc4ae2ff217c67eae39947ed6b655b8afaa83859 Mon Sep 17 00:00:00 2001
+From: Bernd Waibel <waebbl-gentoo@posteo.net>
+Date: Sun, 20 Jun 2021 15:38:45 +0200
+Subject: [PATCH] add boost::serialization to find_package
+
+Swaps SetupBoost() after SetupSalomeSMESH() has been called.
+SetupSalomeSMESH() looks for vtk, which searches for boost::serialization
+overriding the default libraries detected by SetupBoost().
+
+Signed-off-by: Bernd Waibel <waebbl-gentoo@posteo.net>
+---
+ CMakeLists.txt                         | 4 +++-
+ cMake/FreeCAD_Helpers/SetupBoost.cmake | 2 +-
+ 2 files changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 5b17736..c241ebe 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -45,7 +45,6 @@ if(NOT FREECAD_LIBPACK_USE OR FREECAD_LIBPACK_CHECKFILE_CLBUNDLER)
+     SetupPython()
+     SetupPCL()
+     SetupPybind11()
+-    SetupBoost()
+     SetupXercesC()
+     find_package(ZLIB REQUIRED)
+     find_package(PyCXX REQUIRED)
+@@ -57,6 +56,9 @@ if(NOT FREECAD_LIBPACK_USE OR FREECAD_LIBPACK_CHECKFILE_CLBUNDLER)
+         SetupOpenGL()
+     endif(BUILD_GUI)
+     SetupSalomeSMESH()
++    # needs to be called after SMESH which pulls in VTK, which only add boost::serialization
++    # overriding the values of SetupBoost()
++    SetupBoost()
+     if (BUILD_FEM_NETGEN)
+         find_package(NETGEN)
+     endif(BUILD_FEM_NETGEN)
+diff --git a/cMake/FreeCAD_Helpers/SetupBoost.cmake b/cMake/FreeCAD_Helpers/SetupBoost.cmake
+index 76c6d64..77c415b 100644
+--- a/cMake/FreeCAD_Helpers/SetupBoost.cmake
++++ b/cMake/FreeCAD_Helpers/SetupBoost.cmake
+@@ -3,7 +3,7 @@ macro(SetupBoost)
+ 
+     set(_boost_TEST_VERSIONS ${Boost_ADDITIONAL_VERSIONS})
+ 
+-    set (BOOST_COMPONENTS filesystem program_options regex system thread)
++    set (BOOST_COMPONENTS filesystem program_options regex serialization system thread)
+     find_package(Boost ${BOOST_MIN_VERSION}
+         COMPONENTS ${BOOST_COMPONENTS} REQUIRED)
+ 
+-- 
+2.32.0
+

diff --git a/media-gfx/freecad/files/freecad-0.19.2-0007-fix-build-failure-with-opencascade-7.5.2.patch b/media-gfx/freecad/files/freecad-0.19.2-0007-fix-build-failure-with-opencascade-7.5.2.patch
new file mode 100644
index 00000000000..46c69326129
--- /dev/null
+++ b/media-gfx/freecad/files/freecad-0.19.2-0007-fix-build-failure-with-opencascade-7.5.2.patch
@@ -0,0 +1,30 @@
+From bbbaf3e27d39767ba0b3de998b9d8d5fd42a681f Mon Sep 17 00:00:00 2001
+From: Bernd Waibel <waebbl-gentoo@posteo.net>
+Date: Sun, 20 Jun 2021 16:24:04 +0200
+Subject: [PATCH] fix build failure with opencascade-7.5.2
+
+For patch, see
+https://forum.freecadweb.org/viewtopic.php?f=4&t=58090&sid=07aca55f0513162234c40bc4bd6e4044#p503286
+
+Upstream issue at https://tracker.dev.opencascade.org/view.php?id=32328
+
+Signed-off-by: Bernd Waibel <waebbl-gentoo@posteo.net>
+---
+ src/Mod/Part/App/ShapeUpgrade/UnifySameDomainPyImp.cpp | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/Mod/Part/App/ShapeUpgrade/UnifySameDomainPyImp.cpp b/src/Mod/Part/App/ShapeUpgrade/UnifySameDomainPyImp.cpp
+index a268fce..3def142 100644
+--- a/src/Mod/Part/App/ShapeUpgrade/UnifySameDomainPyImp.cpp
++++ b/src/Mod/Part/App/ShapeUpgrade/UnifySameDomainPyImp.cpp
+@@ -27,6 +27,7 @@
+ # include <Standard_Failure.hxx>
+ #endif
+ 
++#include <TopoDS_Edge.hxx>
+ #include "ShapeUpgrade/UnifySameDomainPy.h"
+ #include "ShapeUpgrade/UnifySameDomainPy.cpp"
+ #include "TopoShapePy.h"
+-- 
+2.32.0
+

diff --git a/media-gfx/freecad/freecad-0.19.2-r2.ebuild b/media-gfx/freecad/freecad-0.19.2-r2.ebuild
new file mode 100644
index 00000000000..8dd3ab78ae3
--- /dev/null
+++ b/media-gfx/freecad/freecad-0.19.2-r2.ebuild
@@ -0,0 +1,339 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{7,8,9} )
+
+inherit check-reqs cmake desktop eapi8-dosym 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/${P}-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 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-cpp/eigen-3.3.1:3
+	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:=[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_MULTI_USEDEP}]
+		dev-python/matplotlib[${PYTHON_MULTI_USEDEP}]
+		dev-python/numpy[${PYTHON_MULTI_USEDEP}]
+		>=dev-python/pivy-0.6.5[${PYTHON_MULTI_USEDEP}]
+		dev-python/pybind11[${PYTHON_MULTI_USEDEP}]
+		dev-python/pyside2[gui,svg,${PYTHON_MULTI_USEDEP}]
+		dev-python/shiboken2[${PYTHON_MULTI_USEDEP}]
+		addonmgr? ( dev-python/GitPython[${PYTHON_MULTI_USEDEP}] )
+		fem? ( dev-python/ply[${PYTHON_MULTI_USEDEP}] )
+	')
+"
+DEPEND="${RDEPEND}"
+BDEPEND="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 )
+"
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-0.19_pre20201231-0003-Gentoo-specific-don-t-check-vcs.patch
+	"${FILESDIR}"/${PN}-0.19.1-0001-Gentoo-specific-Remove-ccache-usage.patch
+	"${FILESDIR}"/${P}-0001-fix-failing-test-workbench-testcase.patch
+	"${FILESDIR}"/${P}-0002-fix-femtest-failure-with-yaml-load.patch
+	"${FILESDIR}"/${P}-0003-fix-test-when-built-without-GUI.patch
+	"${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
+)
+
+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 OpenCASCADE lookup
+	local OCC_P=$(best_version sci-libs/opencascade[vtk])
+	OCC_P=${OCC_P#sci-libs/}
+	local OCC_PV=${OCC_P#opencascade-}
+	OCC_PV=$(ver_cut 1-2 ${OCC_PV})
+	# check for CASROOT needed to ensure occ-7.5 is eselected and profile resourced
+	if [[ ${OCC_PV} = 7.5 && ${CASROOT} = "/usr" ]]; then
+		sed -e 's|/usr/include/opencascade|'${CASROOT}'/include/'${OCC_P}'|' \
+			-e 's|/usr/lib|'${CASROOT}'/'$(get_libdir)'/'${OCC_P}' NO_DEFAULT_PATH|' \
+			-i cMake/FindOpenCasCade.cmake || die
+	else
+		sed -e 's|/usr/include/opencascade|${CASROOT}/include/opencascade|' \
+			-e 's|/usr/lib|${CASROOT}/'$(get_libdir)' NO_DEFAULT_PATH|' \
+			-i cMake/FindOpenCasCade.cmake || die
+	fi
+
+	# Fix desktop file
+	sed -e 's/Exec=FreeCAD/Exec=freecad/' -i src/XDGData/org.freecadweb.FreeCAD.desktop || die
+
+	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=ON
+		-DBUILD_ENABLE_CXX_STD:STRING="C++14"	# needed for >=boost-1.75.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"
+
+		# Use the version of shiboken2 that matches the selected python version
+		-DPYTHON_CONFIG_SUFFIX="-${EPYTHON}"
+
+		# 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
+
+		-DOCCT_CMAKE_FALLBACK=ON				# don't use occt-config which isn't included in opencascade for Gentoo
+	)
+
+	if has_version ">=sci-libs/opencascade-7.5"; then
+		# bug https://bugs.gentoo.org/788274
+		local OCC_P=$(best_version sci-libs/opencascade[vtk])
+		OCC_P=${OCC_P#sci-libs/}
+		OCC_P=${OCC_P%-r*}
+		mycmakeargs+=(
+			-DOCC_INCLUDE_DIR="${CASROOT}"/include/${OCC_P}
+			-DOCC_LIBRARY_DIR="${CASROOT}"/$(get_libdir)/${OCC_P}
+		)
+	else
+		# <occ-7.5 uses different layout
+		mycmakeargs+=(
+			-DOCC_INCLUDE_DIR="${CASROOT}"/include/opencascade
+			-DOCC_LIBRARY_DIR="${CASROOT}"/$(get_libdir)
+		)
+	fi
+
+	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
+
+	if ! use headless; then
+		dosym8 -r /usr/$(get_libdir)/${PN}/bin/FreeCAD /usr/bin/freecad
+		mv "${ED}"/usr/$(get_libdir)/freecad/share/* "${ED}"/usr/share || die "failed to move shared ressources"
+	fi
+	dosym8 -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
+
+	doenvd "${FILESDIR}/99${PN}"
+}
+
+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."
+
+	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 "interact with git repositories" dev-python/GitPython
+	optfeature "work with COLLADA documents" dev-python/pycollada
+	optfeature "dependency graphs" media-gfx/graphviz
+	optfeature "PBR Rendering" media-gfx/povray
+	optfeature "FEM mesh generator" sci-libs/gmsh
+	optfeature "importing and exporting 2D AutoCAD DWG files" media-gfx/libredwg
+}
+
+pkg_postrm() {
+	xdg_pkg_postrm
+}


^ permalink raw reply related	[flat|nested] 13+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-gfx/freecad/, media-gfx/freecad/files/
@ 2021-05-04 22:02 Sam James
  0 siblings, 0 replies; 13+ messages in thread
From: Sam James @ 2021-05-04 22:02 UTC (permalink / raw
  To: gentoo-commits

commit:     1bd881d96b0ced37ff57668b1d02413a3548cca0
Author:     Bernd Waibel <waebbl-gentoo <AT> posteo <DOT> net>
AuthorDate: Wed Apr 28 17:24:56 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue May  4 22:01:24 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1bd881d9

media-gfx/freecad: bump to 0.19.2

Closes: https://bugs.gentoo.org/785256
Package-Manager: Portage-3.0.18, Repoman-3.0.3
Signed-off-by: Bernd Waibel <waebbl-gentoo <AT> posteo.net>
Closes: https://github.com/gentoo/gentoo/pull/20580
Signed-off-by: Sam James <sam <AT> gentoo.org>

 media-gfx/freecad/Manifest                         |   1 +
 media-gfx/freecad/files/99freecad                  |   1 +
 ...-0001-fix-failing-test-workbench-testcase.patch |  26 ++
 ...2-0002-fix-femtest-failure-with-yaml-load.patch |  26 ++
 ...19.2-0003-fix-test-when-built-without-GUI.patch |  33 +++
 media-gfx/freecad/freecad-0.19.2.ebuild            | 308 +++++++++++++++++++++
 6 files changed, 395 insertions(+)

diff --git a/media-gfx/freecad/Manifest b/media-gfx/freecad/Manifest
index c1b013c5901..486f8202d98 100644
--- a/media-gfx/freecad/Manifest
+++ b/media-gfx/freecad/Manifest
@@ -1 +1,2 @@
 DIST freecad-0.19.1.tar.gz 296983463 BLAKE2B de6592474c34c5643ba7f63d6223bf7b2fcee87ebf226727e242ff3f56f363562dd0bae8cb6b3203d978d998b70985777ca93b938c0fc01822e8927cd79f6118 SHA512 5134fba99448c509f0761d62b07f1bbd3183108761f41178b38f24d5ba26558608d7d7b00009d03ba097a50cc6fe047bbd57872b32a1d55b3526d18c19ae6393
+DIST freecad-0.19.2.tar.gz 296987961 BLAKE2B 3c21359c71f7ac5a49cc4b4be437dfce02f2af73dfc526a3955547718ee41c461fc787d029a9a77374d58516d7c56fec6982fe6d38ab17fbc30c0a94929136bf SHA512 420f00e696725cbd31c936c47b6ac226d866a17c7b7683ad381b8dd5edaffc7dfb1a3c4238c08e8b4fd34ef0c08d7c244cb7797012e596df1ce0a4f6e3be6b72

diff --git a/media-gfx/freecad/files/99freecad b/media-gfx/freecad/files/99freecad
new file mode 100644
index 00000000000..81104107c22
--- /dev/null
+++ b/media-gfx/freecad/files/99freecad
@@ -0,0 +1 @@
+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-fix-failing-test-workbench-testcase.patch b/media-gfx/freecad/files/freecad-0.19.2-0001-fix-failing-test-workbench-testcase.patch
new file mode 100644
index 00000000000..58107fb544d
--- /dev/null
+++ b/media-gfx/freecad/files/freecad-0.19.2-0001-fix-failing-test-workbench-testcase.patch
@@ -0,0 +1,26 @@
+From dc04c745ea1e7dc277ab06fab69a2b91fbf543c5 Mon Sep 17 00:00:00 2001
+From: Bernd Waibel <waebbl-gentoo@posteo.net>
+Date: Sun, 25 Apr 2021 23:02:39 +0200
+Subject: [PATCH] fix failing test workbench testcase
+
+Signed-off-by: Bernd Waibel <waebbl-gentoo@posteo.net>
+---
+ src/Mod/Test/Document.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/Mod/Test/Document.py b/src/Mod/Test/Document.py
+index e41375c..fd5eb15 100644
+--- a/src/Mod/Test/Document.py
++++ b/src/Mod/Test/Document.py
+@@ -1307,7 +1307,7 @@ class DocumentFileIncludeCases(unittest.TestCase):
+     # copy file from L5 which is in the same directory
+     L7 = doc2.addObject("App::DocumentObjectFileIncluded","FileObject3")
+     L7.File = (L5.File,"Copy.txt")
+-    self.failUnless(os.path.exists(L5.File))
++    self.failUnless(os.path.exists(L7.File))
+     FreeCAD.closeDocument("Doc2")
+ 
+ 
+-- 
+2.31.1
+

diff --git a/media-gfx/freecad/files/freecad-0.19.2-0002-fix-femtest-failure-with-yaml-load.patch b/media-gfx/freecad/files/freecad-0.19.2-0002-fix-femtest-failure-with-yaml-load.patch
new file mode 100644
index 00000000000..17da18c2b12
--- /dev/null
+++ b/media-gfx/freecad/files/freecad-0.19.2-0002-fix-femtest-failure-with-yaml-load.patch
@@ -0,0 +1,26 @@
+From a8314fdc56bb39f5af85e1678a03d613bfb9ee03 Mon Sep 17 00:00:00 2001
+From: Bernd Waibel <waebbl-gentoo@posteo.net>
+Date: Mon, 26 Apr 2021 19:32:54 +0200
+Subject: [PATCH] fix femtest failure with yaml load
+
+Signed-off-by: Bernd Waibel <waebbl-gentoo@posteo.net>
+---
+ src/Mod/Fem/feminout/importYamlJsonMesh.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/Mod/Fem/feminout/importYamlJsonMesh.py b/src/Mod/Fem/feminout/importYamlJsonMesh.py
+index 9886248..aff83a5 100644
+--- a/src/Mod/Fem/feminout/importYamlJsonMesh.py
++++ b/src/Mod/Fem/feminout/importYamlJsonMesh.py
+@@ -162,7 +162,7 @@ def read(
+             or fileExtension.lower() == ".yml"
+     ) and has_yaml:
+         fp = pyopen(fileString, "rt")
+-        raw_mesh_data = yaml.load(fp)
++        raw_mesh_data = yaml.load(fp, Loader=yaml.SafeLoader)
+         fp.close()
+     else:
+         Console.PrintError(
+-- 
+2.31.1
+

diff --git a/media-gfx/freecad/files/freecad-0.19.2-0003-fix-test-when-built-without-GUI.patch b/media-gfx/freecad/files/freecad-0.19.2-0003-fix-test-when-built-without-GUI.patch
new file mode 100644
index 00000000000..33892ade6d5
--- /dev/null
+++ b/media-gfx/freecad/files/freecad-0.19.2-0003-fix-test-when-built-without-GUI.patch
@@ -0,0 +1,33 @@
+From d7ea5a0f20888a2ddae3eb48e508e9067662cdc7 Mon Sep 17 00:00:00 2001
+From: Bernd Waibel <waebbl-gentoo@posteo.net>
+Date: Wed, 28 Apr 2021 08:57:53 +0200
+Subject: [PATCH] fix test when built without GUI
+
+Signed-off-by: Bernd Waibel <waebbl-gentoo@posteo.net>
+---
+ src/Mod/Arch/ArchRoof.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/Mod/Arch/ArchRoof.py b/src/Mod/Arch/ArchRoof.py
+index 99130d0..e2c2955 100644
+--- a/src/Mod/Arch/ArchRoof.py
++++ b/src/Mod/Arch/ArchRoof.py
+@@ -22,7 +22,6 @@
+ import math
+ 
+ import ArchComponent
+-import Arch_rc
+ import Draft
+ import DraftGeomUtils
+ import DraftVecUtils
+@@ -32,6 +31,7 @@ import Part
+ from FreeCAD import Vector
+ 
+ if FreeCAD.GuiUp:
++    import Arch_rc
+     import FreeCADGui
+     from PySide import QtCore, QtGui
+     from DraftTools import translate
+-- 
+2.31.1
+

diff --git a/media-gfx/freecad/freecad-0.19.2.ebuild b/media-gfx/freecad/freecad-0.19.2.ebuild
new file mode 100644
index 00000000000..f2d55fb7b13
--- /dev/null
+++ b/media-gfx/freecad/freecad-0.19.2.ebuild
@@ -0,0 +1,308 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+# vtk needs updating to use 3.9
+PYTHON_COMPAT=( python3_{7,8} )
+
+inherit check-reqs cmake desktop eapi8-dosym 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"
+	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 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-cpp/eigen-3.3.1:3
+	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:=[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-9[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_MULTI_USEDEP}]
+		dev-python/matplotlib[${PYTHON_MULTI_USEDEP}]
+		dev-python/numpy[${PYTHON_MULTI_USEDEP}]
+		>=dev-python/pivy-0.6.5[${PYTHON_MULTI_USEDEP}]
+		dev-python/pybind11[${PYTHON_MULTI_USEDEP}]
+		dev-python/pyside2[gui,svg,${PYTHON_MULTI_USEDEP}]
+		dev-python/shiboken2[${PYTHON_MULTI_USEDEP}]
+		addonmgr? ( dev-python/GitPython[${PYTHON_MULTI_USEDEP}] )
+		fem? ( dev-python/ply[${PYTHON_MULTI_USEDEP}] )
+	')
+"
+DEPEND="${RDEPEND}"
+BDEPEND="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 )
+"
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-0.19_pre20201231-0003-Gentoo-specific-don-t-check-vcs.patch
+	"${FILESDIR}"/${PN}-0.19.1-0001-Gentoo-specific-Remove-ccache-usage.patch
+	"${FILESDIR}"/${P}-0001-fix-failing-test-workbench-testcase.patch
+	"${FILESDIR}"/${P}-0002-fix-femtest-failure-with-yaml-load.patch
+	"${FILESDIR}"/${P}-0003-fix-test-when-built-without-GUI.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 OpenCASCADE lookup
+	# TODO: check this for opencascade-7.5.1 locations, which have
+	# changed since 7.4.0 after that package has merged
+	sed -e 's|/usr/include/opencascade|${CASROOT}/include/opencascade|' \
+		-e 's|/usr/lib|${CASROOT}/'$(get_libdir)' NO_DEFAULT_PATH|' \
+		-i cMake/FindOpenCasCade.cmake || die
+
+	# Fix desktop file
+	sed -e 's/Exec=FreeCAD/Exec=freecad/' -i src/XDGData/org.freecadweb.FreeCAD.desktop || die
+
+	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=ON
+		-DBUILD_ENABLE_CXX_STD:STRING="C++14"	# needed for >=boost-1.75.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
+
+		-DOCC_INCLUDE_DIR="${CASROOT}"/include/opencascade
+		-DOCC_LIBRARY_DIR="${CASROOT}"/$(get_libdir)
+		-DOCCT_CMAKE_FALLBACK=ON				# don't use occt-config which isn't included in opencascade for Gentoo
+	)
+
+	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
+
+	if ! use headless; then
+		dosym8 -r /usr/$(get_libdir)/${PN}/bin/FreeCAD /usr/bin/freecad
+		mv "${ED}"/usr/$(get_libdir)/freecad/share/* "${ED}"/usr/share || die "failed to move shared ressources"
+	fi
+	dosym8 -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
+
+	doenvd "${FILESDIR}/99${PN}"
+}
+
+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."
+
+	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 "interact with git repositories" dev-python/GitPython
+	optfeature "work with COLLADA documents" dev-python/pycollada
+	optfeature "dependency graphs" media-gfx/graphviz
+	optfeature "PBR Rendering" media-gfx/povray
+	optfeature "FEM mesh generator" sci-libs/gmsh
+}
+
+pkg_postrm() {
+	xdg_pkg_postrm
+}


^ permalink raw reply related	[flat|nested] 13+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-gfx/freecad/, media-gfx/freecad/files/
@ 2021-03-14 11:41 Joonas Niilola
  0 siblings, 0 replies; 13+ messages in thread
From: Joonas Niilola @ 2021-03-14 11:41 UTC (permalink / raw
  To: gentoo-commits

commit:     b3215036bdfd41e827c58fbfa46688ba3ba0c36e
Author:     Bernd Waibel <waebbl-gentoo <AT> posteo <DOT> net>
AuthorDate: Sat Mar 13 12:39:03 2021 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Sun Mar 14 11:41:20 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b3215036

media-gfx/freecad: drop 0.19_pre20201231

Package-Manager: Portage-3.0.17, Repoman-3.0.2
Signed-off-by: Bernd Waibel <waebbl-gentoo <AT> posteo.net>
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 media-gfx/freecad/Manifest                         |   1 -
 ...0002-CMakeLists.txt-add-option-for-ccache.patch |  33 ---
 media-gfx/freecad/freecad-0.19_pre20201231.ebuild  | 284 ---------------------
 3 files changed, 318 deletions(-)

diff --git a/media-gfx/freecad/Manifest b/media-gfx/freecad/Manifest
index c0966150ea1..c1b013c5901 100644
--- a/media-gfx/freecad/Manifest
+++ b/media-gfx/freecad/Manifest
@@ -1,2 +1 @@
 DIST freecad-0.19.1.tar.gz 296983463 BLAKE2B de6592474c34c5643ba7f63d6223bf7b2fcee87ebf226727e242ff3f56f363562dd0bae8cb6b3203d978d998b70985777ca93b938c0fc01822e8927cd79f6118 SHA512 5134fba99448c509f0761d62b07f1bbd3183108761f41178b38f24d5ba26558608d7d7b00009d03ba097a50cc6fe047bbd57872b32a1d55b3526d18c19ae6393
-DIST freecad-0.19_pre20201231.tar.gz 236040771 BLAKE2B 648d8c1d8ab03f56403544f8e6a20dc5edc35b2cfc353c875202ce3e85449e450cbda93f410fec15366ce3aab342a93e981fa11cd9f5443a2fc40ef38ac0a1d0 SHA512 457792b0a12196d9e2d8113d9721a3b3a6d4fbc93bae001787db3eac43503a74a89a69564903b4005f8648476a150b6d871b3d78adfbf41c7260a4265132da34

diff --git a/media-gfx/freecad/files/freecad-0.19_pre20201231-0002-CMakeLists.txt-add-option-for-ccache.patch b/media-gfx/freecad/files/freecad-0.19_pre20201231-0002-CMakeLists.txt-add-option-for-ccache.patch
deleted file mode 100644
index 26bb4421077..00000000000
--- a/media-gfx/freecad/files/freecad-0.19_pre20201231-0002-CMakeLists.txt-add-option-for-ccache.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From bce02c4804d14ae2257ad5f5e7fae4e2baa74503 Mon Sep 17 00:00:00 2001
-From: Bernd Waibel <waebbl@gmail.com>
-Date: Thu, 31 Dec 2020 13:31:47 +0100
-Subject: [PATCH 2/2] CMakeLists.txt: add option for ccache
-
-Signed-off-by: Bernd Waibel <waebbl@gmail.com>
----
- CMakeLists.txt | 9 ++++++---
- 1 file changed, 6 insertions(+), 3 deletions(-)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index f4dabf7..17b9fad 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -8,9 +8,12 @@ if (POLICY CMP0072)
-     cmake_policy(SET CMP0072 OLD)
- endif(POLICY CMP0072)
- 
--find_program(CCACHE_PROGRAM ccache)  #This check should occur before project()
--if(CCACHE_PROGRAM)
--    set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_PROGRAM}")
-+option(FREECAD_USE_CCACHE "Use ccache to build FreeCAD" OFF)
-+if(FREECAD_USE_CCACHE)
-+    find_program(CCACHE_PROGRAM ccache)  #This check should occur before project()
-+    if(CCACHE_PROGRAM)
-+        set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_PROGRAM}")
-+    endif()
- endif()
- 
- project(FreeCAD)
--- 
-2.30.0
-

diff --git a/media-gfx/freecad/freecad-0.19_pre20201231.ebuild b/media-gfx/freecad/freecad-0.19_pre20201231.ebuild
deleted file mode 100644
index 9d1447e685a..00000000000
--- a/media-gfx/freecad/freecad-0.19_pre20201231.ebuild
+++ /dev/null
@@ -1,284 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-# vtk needs updating to use 3.9
-PYTHON_COMPAT=( python3_{7,8} )
-
-inherit check-reqs cmake desktop optfeature python-single-r1 xdg
-
-DESCRIPTION="QT based Computer Aided Design application"
-HOMEPAGE="https://www.freecadweb.org/ https://github.com/FreeCAD/FreeCAD"
-
-if [[ ${PV} = *9999 ]]; then
-	inherit git-r3
-	EGIT_REPO_URI="https://github.com/FreeCAD/FreeCAD.git"
-	S="${WORKDIR}/freecad-${PV}"
-else
-	COMMIT=82ec99dbc1f0f054748059ae8bb138eb44b43073
-	SRC_URI="https://github.com/FreeCAD/FreeCAD/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
-	KEYWORDS="~amd64"
-	S="${WORKDIR}/FreeCAD-${COMMIT}"
-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="ccache debug headless pcl test"
-RESTRICT="!test? ( test )"
-
-FREECAD_EXPERIMENTAL_MODULES="cloud plot ship"
-FREECAD_STABLE_MODULES="addonmgr arch drawing fem idf image
-	inspection material mesh openscad part-design path points
-	raytracing robot show spreadsheet 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-cpp/eigen-3.3.1:3
-	dev-libs/OpenNI2[opengl(+)]
-	dev-libs/libspnav[X]
-	dev-libs/xerces-c
-	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/med-4.0.0-r1[python,${PYTHON_SINGLE_USEDEP}]
-	sci-libs/opencascade:=[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-9[boost,python,qt5,rendering,${PYTHON_SINGLE_USEDEP}] )
-	mesh? ( sci-libs/hdf5:=[fortran,zlib] )
-	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_MULTI_USEDEP}]
-		dev-python/matplotlib[${PYTHON_MULTI_USEDEP}]
-		dev-python/numpy[${PYTHON_MULTI_USEDEP}]
-		>=dev-python/pivy-0.6.5[${PYTHON_MULTI_USEDEP}]
-		dev-python/pyside2[gui,svg,${PYTHON_MULTI_USEDEP}]
-		dev-python/shiboken2[${PYTHON_MULTI_USEDEP}]
-		addonmgr? ( dev-python/GitPython[${PYTHON_MULTI_USEDEP}] )
-		mesh? ( dev-python/pybind11[${PYTHON_MULTI_USEDEP}] )
-	')
-"
-DEPEND="${RDEPEND}"
-BDEPEND="
-	dev-lang/swig
-	ccache? ( dev-util/ccache )
-"
-
-# To get required dependencies:
-# 'grep REQUIRES_MODS cMake/FreeCAD_Helpers/CheckInterModuleDependencies.cmake'
-# We set the following requirements by default:
-# draft, import, part, qt5, sketcher, start, web.
-#
-# Additionally if mesh is set, 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.
-REQUIRED_USE="
-	${PYTHON_REQUIRED_USE}
-	arch? ( mesh )
-	debug? ( mesh )
-	drawing? ( spreadsheet )
-	fem? ( mesh )
-	inspection? ( mesh points )
-	openscad? ( mesh )
-	path? ( mesh robot )
-	ship? ( image plot )
-	techdraw? ( spreadsheet drawing )
-"
-
-PATCHES=(
-	"${FILESDIR}"/${P}-0001-FindCoin3DDoc.cmake-fix-patch-for-coin-docs.patch
-	"${FILESDIR}"/${P}-0002-CMakeLists.txt-add-option-for-ccache.patch
-	"${FILESDIR}"/${P}-0003-Gentoo-specific-don-t-check-vcs.patch
-)
-
-DOCS=( README.md ChangeLog.txt CODE_OF_CONDUCT.md )
-
-CHECKREQS_DISK_BUILD="7G"
-
-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 OpenCASCADE lookup
-	sed -e 's|/usr/include/opencascade|${CASROOT}/include/opencascade|' \
-		-e 's|/usr/lib|${CASROOT}/'$(get_libdir)' NO_DEFAULT_PATH|' \
-		-i cMake/FindOpenCasCade.cmake || die
-
-	# Fix desktop file
-	sed -e 's/Exec=FreeCAD/Exec=freecad/' -i src/XDGData/org.freecadweb.FreeCAD.desktop || die
-
-	cmake_src_prepare
-}
-
-src_configure() {
-	local mycmakeargs=(
-		-DBUILD_ADDONMGR=$(usex addonmgr)
-		-DBUILD_ARCH=$(usex arch)
-		-DBUILD_ASSEMBLY=OFF
-		-DBUILD_CLOUD=$(usex cloud)
-		-DBUILD_COMPLETE=OFF					# deprecated
-		-DBUILD_DRAFT=ON						# basic workspace, enable it by default
-		-DBUILD_DRAWING=$(usex drawing)
-		-DBUILD_ENABLE_CXX_STD:STRING="C++14"	# needed for >=boost-1.75.0
-		-DBUILD_FEM=$(usex fem)
-		-DBUILD_FEM_NETGEN=OFF
-		-DBUILD_FLAT_MESH=$(usex mesh)
-		-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=$(usex mesh)
-		-DBUILD_MESH_PART=$(usex mesh)
-		-DBUILD_OPENSCAD=$(usex openscad)
-		-DBUILD_PART=ON							# basic workspace, enable it by default
-		-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=$(usex mesh)
-		-DBUILD_SPREADSHEET=$(usex spreadsheet)
-		-DBUILD_START=ON						# basic workspace, enable it by default
-		-DBUILD_SURFACE=$(usex surface)
-		-DBUILD_TECHDRAW=$(usex techdraw)
-		-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_CCACHE=$(usex ccache)
-		-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=$(usex mesh)
-		-DFREECAD_USE_QT_FILEDIALOG=ON
-		-DFREECAD_USE_QTWEBMODULE:STRING="Qt WebEngine"
-
-		-DOCC_INCLUDE_DIR="${CASROOT}"/include/opencascade
-		-DOCC_LIBRARY_DIR="${CASROOT}"/$(get_libdir)
-		-DOCCT_CMAKE_FALLBACK=ON				# don't use occt-config which isn't included in opencascade for Gentoo
-	)
-
-	if use debug; then
-		mycmakeargs+=(
-			# sandbox needs mesh support
-			-DBUILD_SANDBOX=$(usex mesh)
-			-DBUILD_TEMPLATE=ON
-			-DBUILD_TEST=ON
-		)
-	else
-		mycmakeargs+=(
-			-DBUILD_SANDBOX=OFF
-			-DBUILD_TEMPLATE=OFF
-			-DBUILD_TEST=OFF
-		)
-	fi
-
-	cmake_src_configure
-}
-
-src_install() {
-	cmake_src_install
-
-	if ! use headless; then
-		dosym ../$(get_libdir)/${PN}/bin/FreeCAD /usr/bin/freecad
-		mv "${ED}"/usr/$(get_libdir)/freecad/share/* "${ED}"/usr/share || die "failed to move shared ressources"
-	fi
-	dosym ../$(get_libdir)/${PN}/bin/FreeCADCmd /usr/bin/freecadcmd
-
-	python_optimize "${ED}"/usr/share/${PN}/data/Mod/ "${ED}"/usr/$(get_libdir)/${PN}{/Ext,/Mod}/
-}
-
-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."
-
-	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 "interact with git repositories" dev-python/GitPython
-	optfeature "work with COLLADA documents" dev-python/pycollada
-	optfeature "dependency graphs" media-gfx/graphviz
-	optfeature "PBR Rendering" media-gfx/povray
-	optfeature "FEM mesh generator" sci-libs/gmsh
-}
-
-pkg_postrm() {
-	xdg_pkg_postrm
-}


^ permalink raw reply related	[flat|nested] 13+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-gfx/freecad/, media-gfx/freecad/files/
@ 2017-11-06  1:58 Andreas Sturmlechner
  0 siblings, 0 replies; 13+ messages in thread
From: Andreas Sturmlechner @ 2017-11-06  1:58 UTC (permalink / raw
  To: gentoo-commits

commit:     0d35130d08f9029d75ef94aa9947b8675b7c8d34
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sun Nov  5 19:10:17 2017 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Mon Nov  6 01:57:07 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0d35130d

media-gfx/freecad: Drop old

Bug: https://bugs.gentoo.org/620702
Package-Manager: Portage-2.3.13, Repoman-2.3.4

 media-gfx/freecad/Manifest                         |   2 -
 .../files/freecad-0.15.4671-boost-1.60.patch       |  16 ---
 media-gfx/freecad/freecad-0.15.4671.ebuild         | 145 ---------------------
 media-gfx/freecad/freecad-0.16-r1.ebuild           | 132 -------------------
 media-gfx/freecad/freecad-0.16.ebuild              | 135 -------------------
 5 files changed, 430 deletions(-)

diff --git a/media-gfx/freecad/Manifest b/media-gfx/freecad/Manifest
index 54f7f4203d2..3b3cee5f75a 100644
--- a/media-gfx/freecad/Manifest
+++ b/media-gfx/freecad/Manifest
@@ -1,4 +1,2 @@
-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

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
deleted file mode 100644
index 4a7dbabdfc5..00000000000
--- a/media-gfx/freecad/files/freecad-0.15.4671-boost-1.60.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-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/freecad-0.15.4671.ebuild b/media-gfx/freecad/freecad-0.15.4671.ebuild
deleted file mode 100644
index 32e4afa2735..00000000000
--- a/media-gfx/freecad/freecad-0.15.4671.ebuild
+++ /dev/null
@@ -1,145 +0,0 @@
-# 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
deleted file mode 100644
index e1f0300bd89..00000000000
--- a/media-gfx/freecad/freecad-0.16-r1.ebuild
+++ /dev/null
@@ -1,132 +0,0 @@
-# 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
deleted file mode 100644
index cbe390dc0c6..00000000000
--- a/media-gfx/freecad/freecad-0.16.ebuild
+++ /dev/null
@@ -1,135 +0,0 @@
-# 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
-}


^ permalink raw reply related	[flat|nested] 13+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-gfx/freecad/, media-gfx/freecad/files/
@ 2016-04-03 19:08 David Seifert
  0 siblings, 0 replies; 13+ messages in thread
From: David Seifert @ 2016-04-03 19:08 UTC (permalink / raw
  To: gentoo-commits

commit:     a2909cb627d3c5a393eaf25acd92d2180891bd1f
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Sun Apr  3 19:07:12 2016 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Sun Apr  3 19:07:56 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a2909cb6

media-gfx/freecad: Patch out internal boost::re_detail for boost 1.60

Gentoo-Bug: 578910

Package-Manager: portage-2.2.28

 .../freecad/files/freecad-0.15.4671-boost-1.60.patch     | 16 ++++++++++++++++
 media-gfx/freecad/freecad-0.15.4671.ebuild               |  5 +++--
 2 files changed, 19 insertions(+), 2 deletions(-)

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 0000000..4a7dbab
--- /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/freecad-0.15.4671.ebuild b/media-gfx/freecad/freecad-0.15.4671.ebuild
index d0e09c6..4c5cb71 100644
--- a/media-gfx/freecad/freecad-0.15.4671.ebuild
+++ b/media-gfx/freecad/freecad-0.15.4671.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
@@ -61,7 +61,8 @@ src_prepare() {
 	einfo remove bundled libs
 	rm -rf src/3rdParty/{boost,Pivy*}
 
-	epatch "${FILESDIR}"/${PN}-0.14.3702-install-paths.patch
+	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" \


^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2024-06-03 15:00 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-02-15  9:04 [gentoo-commits] repo/gentoo:master commit in: media-gfx/freecad/, media-gfx/freecad/files/ Joonas Niilola
  -- strict thread matches above, loose matches on Subject: below --
2024-06-03 15:00 Andrew Ammerlaan
2024-05-29 17:07 Andrew Ammerlaan
2024-04-14  8:56 Andrew Ammerlaan
2023-08-19  9:05 Miroslav Šulc
2022-04-02 12:58 Andreas Sturmlechner
2022-02-03  2:19 Sam James
2021-11-02 10:04 Sam James
2021-06-21 22:26 Sam James
2021-05-04 22:02 Sam James
2021-03-14 11:41 Joonas Niilola
2017-11-06  1:58 Andreas Sturmlechner
2016-04-03 19:08 David Seifert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox