You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
79 lines
1.7 KiB
79 lines
1.7 KiB
4 years ago
|
# Copyright 1999-2021 Gentoo Authors
|
||
6 years ago
|
# Distributed under the terms of the GNU General Public License v2
|
||
|
|
||
4 years ago
|
EAPI=7
|
||
6 years ago
|
|
||
4 years ago
|
inherit cmake check-reqs java-pkg-opt-2
|
||
6 years ago
|
|
||
|
DESCRIPTION="Development platform for CAD/CAE, 3D surface/solid modeling and data exchange"
|
||
|
HOMEPAGE="https://github.com/tpaviot/oce"
|
||
4 years ago
|
SRC_URI="https://github.com/tpaviot/oce/archive/OCE-${PV}.tar.gz"
|
||
6 years ago
|
|
||
|
LICENSE="|| ( Open-CASCADE-LGPL-2.1-Exception-1.0 LGPL-2.1 )"
|
||
|
SLOT="${PV}"
|
||
4 years ago
|
KEYWORDS="~amd64 ~arm64 ~x86"
|
||
6 years ago
|
IUSE="examples freeimage gl2ps +openmp tbb vtk"
|
||
|
REQUIRED_USE="?? ( openmp tbb )"
|
||
|
|
||
|
DEPEND="
|
||
|
dev-lang/tcl:0=
|
||
|
dev-lang/tk:0=
|
||
|
dev-tcltk/itcl
|
||
|
dev-tcltk/itk
|
||
|
dev-tcltk/tix
|
||
|
media-libs/ftgl
|
||
|
media-libs/freetype
|
||
|
virtual/glu
|
||
|
virtual/opengl
|
||
|
x11-libs/libXmu
|
||
|
freeimage? ( media-libs/freeimage )
|
||
|
gl2ps? ( x11-libs/gl2ps )
|
||
3 years ago
|
tbb? ( dev-cpp/tbb:= )
|
||
3 years ago
|
vtk? ( =sci-libs/vtk-8*[boost,imaging,qt5,python,rendering,views] )"
|
||
6 years ago
|
RDEPEND="${DEPEND}"
|
||
|
|
||
|
CHECKREQS_MEMORY="256M"
|
||
|
CHECKREQS_DISK_BUILD="3584M"
|
||
|
|
||
6 years ago
|
PATCHES=( "${FILESDIR}"/"${P}-test-fix.patch" )
|
||
|
|
||
4 years ago
|
S="${WORKDIR}/oce-OCE-${PV}"
|
||
|
|
||
6 years ago
|
pkg_setup() {
|
||
|
check-reqs_pkg_setup
|
||
|
}
|
||
|
|
||
|
src_prepare() {
|
||
4 years ago
|
cmake_src_prepare
|
||
6 years ago
|
}
|
||
|
|
||
|
src_configure() {
|
||
|
# From BUILD.Unix.md
|
||
|
local mycmakeargs=(
|
||
|
-DOCE_INSTALL_PREFIX="/usr"
|
||
|
-DOCE_ENABLE_DEB_FLAG=off
|
||
|
-DOCE_COPY_HEADERS_BUILD=yes
|
||
|
-DOCE_DRAW=yes
|
||
|
-DOCE_WITH_FREEIMAGE=$(usex freeimage)
|
||
|
-DOCE_WITH_GL2PS=$(usex gl2ps)
|
||
|
-DOCE_WITH_VTK=$(usex vtk)
|
||
|
)
|
||
|
# Mutual exclusion of tbb and openmp flags is guaranteed by REQUIRED_USE.
|
||
|
use tbb && mycmakeargs+=(
|
||
|
-DOCE_MULTITHREAD_LIBRARY="TBB"
|
||
|
)
|
||
|
use openmp && mycmakeargs+=(
|
||
|
-DOCE_MULTITHREAD_LIBRARY="OPENMP"
|
||
|
)
|
||
4 years ago
|
cmake_src_configure
|
||
6 years ago
|
}
|
||
|
|
||
|
src_install() {
|
||
4 years ago
|
cmake_src_install
|
||
6 years ago
|
|
||
|
# If user asked for samples let's copy them to the docs folder
|
||
|
if use examples ; then
|
||
|
dodoc -r samples
|
||
|
fi
|
||
|
}
|