summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernd Waibel <waebbl-gentoo@posteo.net>2021-12-13 08:36:51 +0100
committerSam James <sam@gentoo.org>2022-01-10 01:02:30 +0000
commit3adf9db9fe478c3b272c0284a81c10f00ca87df7 (patch)
treec6213c839181f1e2c1fc87f65bd851c84ee6b283
parentsci-libs/opencascade: use single slot/subslot for 7.5.2 (diff)
downloadgentoo-3adf9db9.tar.gz
gentoo-3adf9db9.tar.bz2
gentoo-3adf9db9.zip
sci-libs/opencascade: use single slot/subslot for 7.5.3
Instead of using different slots for different versions, the package now uses a single slot with subslots. This is to simplyfy dependency handling in revdeps. Allow build against sci-libs/vtk-9.1.0 Package-Manager: Portage-3.0.29, Repoman-3.0.3 Signed-off-by: Bernd Waibel <waebbl-gentoo@posteo.net> Signed-off-by: Sam James <sam@gentoo.org>
-rw-r--r--sci-libs/opencascade/files/opencascade-7.5.env.in102
-rw-r--r--sci-libs/opencascade/opencascade-7.5.3-r4.ebuild (renamed from sci-libs/opencascade/opencascade-7.5.3-r3.ebuild)34
2 files changed, 15 insertions, 121 deletions
diff --git a/sci-libs/opencascade/files/opencascade-7.5.env.in b/sci-libs/opencascade/files/opencascade-7.5.env.in
deleted file mode 100644
index d7148c241f11..000000000000
--- a/sci-libs/opencascade/files/opencascade-7.5.env.in
+++ /dev/null
@@ -1,102 +0,0 @@
-#
-# This file sets needed and optional environment variables for
-# Open CASCADE Technology
-#
-# See: https://dev.opencascade.org/doc/overview/html/index.html#OCCT_OVW_SECTION_4_2
-# for further documentation.
-#
-# Some of the values are set at compile time depending on what USE flags
-# 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"
-
-#############################################################################
-# The MMGT_* variables are used to determine how memory management will work
-# in OCCT. All of those are optional. If they are not set here, their default
-# values will be used.
-#
-# Uncomment or change the ones you need to adapt from its default.
-#############################################################################
-# MMGT_OPT = {0,1,2} (default: 0) set at compile time
-# if set to 0 (the default), every memory block is allocated in C
-# memory heap directly (via malloc() and free()). Will be set, if
-# neither the the 'optimize' nor the 'tbb' USE flags are set.
-# if set to 1, the memory manager performs it's own internal optimization.
-# Will be set, if the 'optimize' USE flag is set.
-# if set to 2, Intel(R) TBB optimized memory manager is used. Will be set,
-# if the 'tbb' USE flag is set.
-#MMGT_OPT=0
-
-# MMGT_CLEAR = {0,1} (default: 1)
-# if set to 0, memory block is returned as it is. Will be set, if the
-# 'optimize' USE flag is set
-# if set to 1, every allocated memory block is cleared by zeros
-#MMGT_CLEAR=1
-
-# MMGT_CELLSIZE (default: 200)
-# defines the maximal size of blocks allocated in large pools of memory.
-#MMGT_CELLSIZE=200
-
-# MMGT_NBPAGES (default: 10000)
-# defines the size of memory chunks allocated for small blocks in pages
-# (OS dependant)
-#MMGT_NBPAGES=10000
-
-# MMGT_THRESHOLD (default: 40000)
-# defines the maximal size of blocks that are recycled internally instead
-# of being returned to the heap.
-#MMGT_THRESHOLD=40000
-
-# MMGT_MMAP = {0,1} (default: 1)
-# if set to 0, large memory blocks will be allocated in the C heap by
-# malloc()
-# if set to 1, large memory blocks are allocated using memory mapping
-# functions of the operating system.
-#MMGT_MMAP=1
-
-# CSF_LANGUAGE (default: us) optional
-# defines the default language of messages indicated by a two-letter
-# country code. Currently it's not verified if this work with other
-# than the default languages, so we keep it commented.
-#CSF_LANGUAGE=us
-
-# CSF_DEBUG_BOP (default: undefined) optional
-# if defined then it should specify the directory where diagnostic data
-# on problems occured in Boolean operations will be saved. Not defined by
-# default.
-#
-# 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_EXCEPTION_PROMPT (default: 1) optional
-# not documented upstream (maybe a flag indicating whether the user shall
-# be prompted in the case of exceptions)
-#CSF_EXCEPTION_PROMPT=1
-
-# 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"
-# 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"
-
-# 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"
diff --git a/sci-libs/opencascade/opencascade-7.5.3-r3.ebuild b/sci-libs/opencascade/opencascade-7.5.3-r4.ebuild
index 0296150b6b01..2fd61839b59b 100644
--- a/sci-libs/opencascade/opencascade-7.5.3-r3.ebuild
+++ b/sci-libs/opencascade/opencascade-7.5.3-r4.ebuild
@@ -14,7 +14,7 @@ SRC_URI="https://git.dev.opencascade.org/gitweb/?p=occt.git;a=snapshot;h=refs/ta
S="${WORKDIR}/occt-V${MY_PV}"
LICENSE="|| ( Open-CASCADE-LGPL-2.1-Exception-1.0 LGPL-2.1 )"
-SLOT="${PV_MAJ}"
+SLOT="0/${PV_MAJ}"
KEYWORDS="~amd64 ~arm64 ~x86"
IUSE="debug doc examples ffmpeg freeimage gles2 json optimize tbb vtk"
@@ -25,7 +25,6 @@ REQUIRED_USE="?? ( optimize tbb )"
RESTRICT="test"
RDEPEND="
- app-eselect/eselect-opencascade
dev-lang/tcl:=
dev-lang/tk:=
dev-tcltk/itcl
@@ -49,13 +48,11 @@ RDEPEND="
tbb? ( <dev-cpp/tbb-2021.4.0 )
vtk? ( sci-libs/vtk:=[rendering] )
"
-DEPEND="
- ${RDEPEND}
+DEPEND="${RDEPEND}"
+
+BDEPEND="
dev-cpp/eigen
dev-libs/rapidjson
-"
-BDEPEND="
- app-eselect/eselect-opencascade
doc? ( app-doc/doxygen )
examples? ( dev-qt/linguist-tools:5 )
"
@@ -119,7 +116,13 @@ src_configure() {
fi
if use vtk; then
- if has_version ">=sci-libs/vtk-9.0.0"; then
+ if has_version ">=sci-libs/vtk-9.1.0"; then
+ mycmakeargs+=(
+ -D3RDPARTY_VTK_DIR="${ESYSROOT}"/usr
+ -D3RDPARTY_VTK_INCLUDE_DIR="${ESYSROOT}"/usr/include/vtk-9.1
+ -D3RDPARTY_VTK_LIBRARY_DIR="${ESYSROOT}"/usr/$(get_libdir)
+ )
+ elif 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
@@ -134,11 +137,11 @@ src_configure() {
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
+ < "${FILESDIR}"/${PN}.env.in > "${T}"/99${PN} || 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
+ sed -e 's|^#MMGT_OPT=0$|MMGT_OPT=2|' -i "${T}"/99${PN} || die
fi
# use internal optimized memory manager and don't clear memory with this
@@ -146,16 +149,14 @@ src_configure() {
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
+ -i "${T}"/99${PN} || die
fi
}
src_install() {
cmake_src_install
- # respect slotting
- insinto "/etc/env.d/${PN}"
- doins "${T}/${PV_MAJ}"
+ doenvd "${T}/99${PN}"
# remove examples
if use !examples; then
@@ -164,8 +165,3 @@ src_install() {
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}"
-}