public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Ionen Wolkens" <ionen@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-libs/opencascade/files/, sci-libs/opencascade/
Date: Wed,  7 Jul 2021 20:05:50 +0000 (UTC)	[thread overview]
Message-ID: <1625688284.17c99e0bcaa5ed97c1e737d0c1bae60c1d35a69c.ionen@gentoo> (raw)

commit:     17c99e0bcaa5ed97c1e737d0c1bae60c1d35a69c
Author:     Bernd Waibel <waebbl-gentoo <AT> posteo <DOT> net>
AuthorDate: Sun Jun  6 19:01:10 2021 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Wed Jul  7 20:04:44 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=17c99e0b

sci-libs/opencascade: bump to 7.5.2

Quote paths in template env file

Package-Manager: Portage-3.0.20, Repoman-3.0.3
Signed-off-by: Bernd Waibel <waebbl-gentoo <AT> posteo.net>
Closes: https://github.com/gentoo/gentoo/pull/21149
Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>

 sci-libs/opencascade/Manifest                     |   1 +
 sci-libs/opencascade/files/opencascade-7.5.env.in |  40 ++---
 sci-libs/opencascade/opencascade-7.5.2.ebuild     | 171 ++++++++++++++++++++++
 3 files changed, 192 insertions(+), 20 deletions(-)

diff --git a/sci-libs/opencascade/Manifest b/sci-libs/opencascade/Manifest
index 77c4e42f391..29f10ccec88 100644
--- a/sci-libs/opencascade/Manifest
+++ b/sci-libs/opencascade/Manifest
@@ -1,2 +1,3 @@
 DIST opencascade-7.4.0.tar.gz 49210449 BLAKE2B c92afe7551e9a066ad0940dcf49278b556a726f0534131706b3a11cb0986ba32818e162df3982283f6815eb9d67d7e91f909485d78f2b8d638da1934ffbc2f7f SHA512 eb0d47848d48f42a159ae5d7a4144483ba1f59f634844bd2053e48e04af30a30ba7056112cd38a1730d193a8d736b898f9608dd574cbe6829dbe7257a002772a
 DIST opencascade-7.5.1.tar.gz 47807222 BLAKE2B b5ef30ea7c373250db3e0863f3c7fde84256b37957a482f10a462a4c4ed1a21cffbbeb10e9fc140325022d7582efbd292ed6d1016d14cb67ccf5c84d14060d5a SHA512 ebb937254ac165041ef7e1a80df8f9d2ac1d518f01b3d4b0fd6d203fe0d80bd474b85a462cccc1c74a513bd257c0b0ab7002632573f38bf72170363c7e42ed2f
+DIST opencascade-7.5.2.tar.gz 47812603 BLAKE2B 86995ea60e24329f91a2cbede26112a70794fb091b34d33614bef412b05b8cc9f1e770aecf78272b54a241c2524422c86f8ff722b3f27b54bf10fa5eda626288 SHA512 f951a941043a56f381cfd25e4d78bb9ae08e5cc29a894e6c0c35daf30aeabf1e44ee09af65bb6b7d62d9325be67741ddcf52266b7186b4c336c70ed8bcfa1676

diff --git a/sci-libs/opencascade/files/opencascade-7.5.env.in b/sci-libs/opencascade/files/opencascade-7.5.env.in
index 50766cbb6bb..d7148c241f1 100644
--- a/sci-libs/opencascade/files/opencascade-7.5.env.in
+++ b/sci-libs/opencascade/files/opencascade-7.5.env.in
@@ -9,9 +9,9 @@
 # were enabled. Those values are marked as such.
 
 # define the root directory of Open CASCADE Technology (needed)
-CASROOT=VAR_CASROOT
-PATH=VAR_CASROOT/lib/opencascade-VAR_PV/bin
-LDPATH=VAR_CASROOT/lib/opencascade-VAR_PV
+CASROOT="VAR_CASROOT"
+PATH="VAR_CASROOT/lib/opencascade-VAR_PV/bin"
+LDPATH="VAR_CASROOT/lib/opencascade-VAR_PV"
 
 #############################################################################
 # The MMGT_* variables are used to determine how memory management will work
@@ -70,7 +70,7 @@ LDPATH=VAR_CASROOT/lib/opencascade-VAR_PV
 #
 # NOTE: Only enable for debugging purposes. If set, this variable has a
 # large impact on the performance of boolean operations.
-#CSF_DEBUG_BOP=/var/tmp
+#CSF_DEBUG_BOP="/var/tmp"
 
 # CSF_EXCEPTION_PROMPT (default: 1) optional
 #   not documented upstream (maybe a flag indicating whether the user shall
@@ -79,24 +79,24 @@ LDPATH=VAR_CASROOT/lib/opencascade-VAR_PV
 
 # The following CSF_* variables define various directories and files where
 # OCCT is looking for resources.
-CSF_GraphicShr=VAR_CASROOT/lib/opencascade-VAR_PV/libTKOpenGl.so
-CSF_MIGRATION_TYPES=VAR_CASROOT/share/opencascade-VAR_PV/resources/StdResource/MigrationSheet.txt
-CSF_MDTVTexturesDirectory=VAR_CASROOT/share/opencascade-VAR_PV/resources/Textures
-CSF_PluginDefaults=VAR_CASROOT/share/opencascade-VAR_PV/resources/StdResource
-CSF_StandardDefaults=VAR_CASROOT/share/opencascade-VAR_PV/resources/StdResource
-CSF_StandardLiteDefaults=VAR_CASROOT/share/opencascade-VAR_PV/resources/StdResource
-CSF_XCAFDefaults=VAR_CASROOT/share/opencascade-VAR_PV/resources/StdResource
-CSF_XmlOcafResource=VAR_CASROOT/share/opencascade-VAR_PV/resources/XmlOcafResource
+CSF_GraphicShr="VAR_CASROOT/lib/opencascade-VAR_PV/libTKOpenGl.so"
+CSF_MIGRATION_TYPES="VAR_CASROOT/share/opencascade-VAR_PV/resources/StdResource/MigrationSheet.txt"
+CSF_MDTVTexturesDirectory="VAR_CASROOT/share/opencascade-VAR_PV/resources/Textures"
+CSF_PluginDefaults="VAR_CASROOT/share/opencascade-VAR_PV/resources/StdResource"
+CSF_StandardDefaults="VAR_CASROOT/share/opencascade-VAR_PV/resources/StdResource"
+CSF_StandardLiteDefaults="VAR_CASROOT/share/opencascade-VAR_PV/resources/StdResource"
+CSF_XCAFDefaults="VAR_CASROOT/share/opencascade-VAR_PV/resources/StdResource"
+CSF_XmlOcafResource="VAR_CASROOT/share/opencascade-VAR_PV/resources/XmlOcafResource"
 # The below values might be optional.
-CSF_IGESDefaults=VAR_CASROOT/share/opencascade-VAR_PV/resources/XSTEPResource
-CSF_ShadersDirectory=VAR_CASROOT/share/opencascade-VAR_PV/resources/Shaders
-CSF_SHMessage=VAR_CASROOT/share/opencascade-VAR_PV/resources/SHMessage
-CSF_STEPDefaults=VAR_CASROOT/share/opencascade-VAR_PV/resources/XSTEPResource
-CSF_UnitsDefinition=VAR_CASROOT/share/opencascade-VAR_PV/resources/UnitsAPI/Units.dat
-CSF_XSMessage=VAR_CASROOT/share/opencascade-VAR_PV/resources/XSMessage
+CSF_IGESDefaults="VAR_CASROOT/share/opencascade-VAR_PV/resources/XSTEPResource"
+CSF_ShadersDirectory="VAR_CASROOT/share/opencascade-VAR_PV/resources/Shaders"
+CSF_SHMessage="VAR_CASROOT/share/opencascade-VAR_PV/resources/SHMessage"
+CSF_STEPDefaults="VAR_CASROOT/share/opencascade-VAR_PV/resources/XSTEPResource"
+CSF_UnitsDefinition="VAR_CASROOT/share/opencascade-VAR_PV/resources/UnitsAPI/Units.dat"
+CSF_XSMessage="VAR_CASROOT/share/opencascade-VAR_PV/resources/XSMessage"
 
 # TODO: check those
 # they were defined in the original ebuild but the directories and files
 # are not present in the current installation.
-#CSF_MDTVFontDirectory=VAR_CASROOT/src/FontMFT
-#CSF_UnitsLexicon=VAR_CASROOT/src/UnitsAPI/Lexi_Expr.dat
+#CSF_MDTVFontDirectory="VAR_CASROOT/src/FontMFT"
+#CSF_UnitsLexicon="VAR_CASROOT/src/UnitsAPI/Lexi_Expr.dat"

diff --git a/sci-libs/opencascade/opencascade-7.5.2.ebuild b/sci-libs/opencascade/opencascade-7.5.2.ebuild
new file mode 100644
index 00000000000..59a4a6c42c7
--- /dev/null
+++ b/sci-libs/opencascade/opencascade-7.5.2.ebuild
@@ -0,0 +1,171 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake flag-o-matic
+
+MY_PV="$(ver_rs 1- '_')"
+PV_MAJ="$(ver_cut 1-2)"
+
+DESCRIPTION="Development platform for CAD/CAE, 3D surface/solid modeling and data exchange"
+HOMEPAGE="https://www.opencascade.com"
+SRC_URI="https://git.dev.opencascade.org/gitweb/?p=occt.git;a=snapshot;h=refs/tags/V${MY_PV};sf=tgz -> ${P}.tar.gz"
+S="${WORKDIR}/occt-V${MY_PV}"
+
+LICENSE="|| ( Open-CASCADE-LGPL-2.1-Exception-1.0 LGPL-2.1 )"
+SLOT="${PV_MAJ}"
+KEYWORDS="~amd64 ~arm64 ~x86"
+IUSE="debug doc examples ffmpeg freeimage gles2 json optimize tbb vtk"
+
+REQUIRED_USE="?? ( optimize tbb )"
+
+# There's no easy way to test. Testing needs a rather big environment
+# properly set up.
+RESTRICT="test"
+
+RDEPEND="
+	app-eselect/eselect-opencascade
+	dev-lang/tcl:=
+	dev-lang/tk:=
+	dev-tcltk/itcl
+	dev-tcltk/itk
+	dev-tcltk/tix
+	media-libs/fontconfig
+	media-libs/freetype:2
+	media-libs/ftgl
+	virtual/glu
+	virtual/opengl
+	x11-libs/libXmu
+	examples? (
+		dev-qt/qtcore:5
+		dev-qt/qtgui:5
+		dev-qt/qtquickcontrols2:5
+		dev-qt/qtwidgets:5
+		dev-qt/qtxml:5
+	)
+	ffmpeg? ( media-video/ffmpeg:= )
+	freeimage? ( media-libs/freeimage )
+	tbb? ( dev-cpp/tbb )
+	vtk? ( sci-libs/vtk:=[rendering] )
+"
+DEPEND="
+	${RDEPEND}
+	dev-cpp/eigen
+	dev-libs/rapidjson
+"
+BDEPEND="
+	app-eselect/eselect-opencascade
+	doc? ( app-doc/doxygen )
+	examples? ( dev-qt/linguist-tools:5 )
+"
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-7.5.1-0001-allow-default-search-path-for-Qt5.patch
+	"${FILESDIR}"/${PN}-7.5.1-0002-remove-unnecessary-Qt5-check.patch
+	"${FILESDIR}"/${PN}-7.5.1-0003-add-Gentoo-configuration-type.patch
+	"${FILESDIR}"/${PN}-7.5.1-0004-fix-installation-of-cmake-config-files.patch
+	"${FILESDIR}"/${PN}-7.5.1-0005-fix-write-permissions-on-scripts.patch
+	"${FILESDIR}"/${PN}-7.5.1-0006-fix-creation-of-custom.sh-script.patch
+	"${FILESDIR}"/${PN}-7.5.1-fix-AllValues-name-collision-with-vtk-9.0.patch
+)
+
+src_prepare() {
+	cmake_src_prepare
+
+	use debug && append-cppflags -DDEBUG
+
+	sed -e 's|/lib\$|/'$(get_libdir)'\$|' \
+		-i adm/templates/OpenCASCADEConfig.cmake.in || die
+
+	# There is an OCCT_UPDATE_TARGET_FILE cmake macro that fails due to some
+	# assumptions it makes about installation paths. Rather than fixing it, just
+	# get rid of the mechanism altogether - its purpose is to allow a
+	# side-by-side installation of release and debug libraries.
+	sed -e 's|\\${OCCT_INSTALL_BIN_LETTER}||' \
+		-i adm/cmake/occt_toolkit.cmake || die
+}
+
+src_configure() {
+	local mycmakeargs=(
+		-DBUILD_DOC_Overview=$(usex doc)
+		-DBUILD_Inspector=$(usex examples)
+		-DBUILD_WITH_DEBUG=$(usex debug)
+		-DINSTALL_DIR_BIN="$(get_libdir)/${P}/bin"
+		-DINSTALL_DIR_CMAKE="$(get_libdir)/cmake/${P}"
+		-DINSTALL_DIR_DOC="share/doc/${PF}"
+		-DINSTALL_DIR_LIB="$(get_libdir)/${P}"
+		-DINSTALL_DIR_SCRIPT="$(get_libdir)/${P}/bin"
+		-DINSTALL_DIR_WITH_VERSION=ON
+		-DINSTALL_SAMPLES=$(usex examples)
+		-DINSTALL_TEST_CASES=NO
+		-DUSE_D3D=NO
+		-DUSE_FFMPEG=$(usex ffmpeg)
+		-DUSE_FREEIMAGE=$(usex freeimage)
+		-DUSE_FREETYPE=ON
+		-DUSE_GLES2=$(usex gles2)
+		-DUSE_RAPIDJSON=$(usex json)
+		-DUSE_TBB=$(usex tbb)
+		-DUSE_VTK=$(usex vtk)
+	)
+
+	use doc && mycmakeargs+=( -DINSTALL_DOC_Overview=ON )
+
+	if use examples; then
+		mycmakeargs+=(
+			-D3RDPARTY_QT_DIR="${ESYSROOT}"/usr
+			-DBUILD_SAMPLES_QT=ON
+		)
+	fi
+
+	if use vtk; then
+		if has_version ">=sci-libs/vtk-9.0.0"; then
+			mycmakeargs+=(
+				-D3RDPARTY_VTK_DIR="${ESYSROOT}"/usr
+				-D3RDPARTY_VTK_INCLUDE_DIR="${ESYSROOT}"/usr/include/vtk-9.0
+				-D3RDPARTY_VTK_LIBRARY_DIR="${ESYSROOT}"/usr/$(get_libdir)
+			)
+		fi
+	fi
+
+	cmake_src_configure
+
+	# prepare /etc/env.d file
+	sed -e "s|lib/|$(get_libdir)/|" \
+		-e "s|VAR_PV|${PV}|" \
+		-e "s|VAR_CASROOT|${ESYSROOT}/usr|" \
+		< "${FILESDIR}"/${PN}-${PV_MAJ}.env.in > "${T}"/${PV_MAJ} || die
+
+	# use TBB for memory allocation optimizations
+	if use tbb; then
+		sed -e 's|^#MMGT_OPT=0$|MMGT_OPT=2|' -i "${T}"/${PV_MAJ} || die
+	fi
+
+	# use internal optimized memory manager and don't clear memory with this
+	# memory manager.
+	if use optimize ; then
+		sed -e 's|^#MMGT_OPT=0$|MMGT_OPT=1|' \
+			-e 's|^#MMGT_CLEAR=1$|MMGT_CLEAR=0|' \
+			-i "${T}"/${PV_MAJ} || die
+	fi
+}
+
+src_install() {
+	cmake_src_install
+
+	# respect slotting
+	insinto "/etc/env.d/${PN}"
+	doins "${T}/${PV_MAJ}"
+
+	# remove examples
+	if use !examples; then
+		rm -r "${ED}/usr/share/${P}/samples" || die
+	fi
+
+	docompress -x /usr/share/doc/${PF}/overview/html
+}
+
+pkg_postinst() {
+	eselect ${PN} set ${PV_MAJ} || die "failed to switch to updated implementation"
+	einfo "You can switch between available ${PN} implementations using eselect ${PN}"
+}


             reply	other threads:[~2021-07-07 20:05 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-07 20:05 Ionen Wolkens [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-12-12 11:43 [gentoo-commits] repo/gentoo:master commit in: sci-libs/opencascade/files/, sci-libs/opencascade/ Sam James
2024-03-23  8:34 Sam James
2022-11-25 11:19 Joonas Niilola
2022-01-10  1:04 Sam James
2022-01-10  1:04 Sam James
2021-06-24 10:06 Alexey Shvetsov
2021-02-18  9:36 Joonas Niilola
2021-02-18  9:36 Joonas Niilola
2018-10-27 10:36 Amy Liffey
2017-11-06  1:58 Andreas Sturmlechner
2015-08-11  9:18 Michael Weber

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1625688284.17c99e0bcaa5ed97c1e737d0c1bae60c1d35a69c.ionen@gentoo \
    --to=ionen@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox