2022-07-11 10:05:25 -04:00
|
|
|
# Copyright 1999-2022 Gentoo Authors
|
2020-09-25 04:09:32 -04:00
|
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
|
2022-07-11 10:05:25 -04:00
|
|
|
EAPI=8
|
2020-09-25 04:09:32 -04:00
|
|
|
|
2022-07-11 10:05:25 -04:00
|
|
|
PYTHON_COMPAT=( python3_{8..10} )
|
2021-05-06 05:28:21 -04:00
|
|
|
LUA_COMPAT=( lua5-{1..3} )
|
2020-09-25 04:09:32 -04:00
|
|
|
|
2021-05-06 05:28:21 -04:00
|
|
|
inherit lua-single toolchain-funcs cmake python-single-r1
|
2020-09-25 04:09:32 -04:00
|
|
|
|
|
|
|
MY_PN="SimpleITK"
|
|
|
|
|
|
|
|
DESCRIPTION="Layer on top of ITK for rapid prototyping, education and interpreted languages."
|
|
|
|
HOMEPAGE="https://simpleitk.org/"
|
2021-05-06 05:28:21 -04:00
|
|
|
SRC_URI="
|
|
|
|
https://github.com/SimpleITK/SimpleITK/releases/download/v${PV}/SimpleITK-${PV}.tar.gz
|
|
|
|
https://github.com/SimpleITK/SimpleITK/releases/download/v${PV}/SimpleITKData-${PV}.tar.gz
|
|
|
|
"
|
2020-09-25 04:09:32 -04:00
|
|
|
RESTRICT="primaryuri"
|
|
|
|
|
|
|
|
LICENSE="Apache-2.0"
|
|
|
|
SLOT="0"
|
2022-02-05 20:58:08 +01:00
|
|
|
# still working on 1.2.4 draft
|
|
|
|
KEYWORDS=""
|
2021-05-06 05:28:21 -04:00
|
|
|
|
|
|
|
IUSE="python tcl"
|
|
|
|
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
|
2020-09-25 04:09:32 -04:00
|
|
|
|
2021-05-06 05:28:21 -04:00
|
|
|
BDEPEND="dev-lang/swig"
|
2020-09-25 04:09:32 -04:00
|
|
|
RDEPEND="
|
2021-05-06 05:28:21 -04:00
|
|
|
${LUA_DEPS}
|
2020-09-25 04:09:32 -04:00
|
|
|
dev-cpp/gtest
|
2021-05-06 05:28:21 -04:00
|
|
|
tcl? ( dev-lang/tk )
|
2020-09-25 04:09:32 -04:00
|
|
|
sci-libs/itk
|
|
|
|
dev-python/virtualenv
|
2021-05-06 05:28:21 -04:00
|
|
|
python? ( ${PYTHON_DEPS} )
|
2020-09-25 04:09:32 -04:00
|
|
|
"
|
2021-05-06 05:28:21 -04:00
|
|
|
DEPEND="${RDEPEND}"
|
2020-09-25 04:09:32 -04:00
|
|
|
|
2020-11-25 05:23:54 -05:00
|
|
|
PATCHES=(
|
2022-02-05 20:58:08 +01:00
|
|
|
#"${FILESDIR}/${PN}-1.2.4-module.patch"
|
|
|
|
#"${FILESDIR}/${PN}-1.2.4-int-cast.patch"
|
2020-11-25 05:23:54 -05:00
|
|
|
)
|
|
|
|
|
2020-09-25 04:09:32 -04:00
|
|
|
S="${WORKDIR}/${MY_PN}-${PV}"
|
|
|
|
|
2021-05-06 05:28:21 -04:00
|
|
|
src_prepare() {
|
|
|
|
cmake_src_prepare
|
|
|
|
cp -rf "../${MY_PN}-${PV}/.ExternalData" "${BUILD_DIR}/" || die
|
|
|
|
}
|
|
|
|
|
2020-09-25 04:09:32 -04:00
|
|
|
src_configure() {
|
|
|
|
local mycmakeargs=(
|
2021-05-06 05:28:21 -04:00
|
|
|
-DWRAP_DEFAULT:BOOL=OFF
|
|
|
|
-DWRAP_TCL:BOOL=$(usex tcl)
|
|
|
|
-DWRAP_PYTHON:BOOL=$(usex python)
|
|
|
|
-DBUILD_TESTING:BOOL=OFF
|
|
|
|
-DSimpleITK_FORBID_DOWNLOADS=ON
|
|
|
|
-DSimpleITK_PYTHON_USE_VIRTUALENV:BOOL=OFF
|
|
|
|
-DSimpleITK_EXPLICIT_INSTANTIATION=OFF
|
|
|
|
-DExternalData_OBJECT_STORES:STRING="${BUILD_DIR}/.ExternalData"
|
|
|
|
-DSimpleITK_INSTALL_LIBRARY_DIR=$(get_libdir)
|
|
|
|
-DSimpleITK_LUA_EXECUTABLE:PATH=/usr/bin/lua5.1
|
|
|
|
-DLUA_EXECUTABLE:PATH=/usr/bin/lua5.1
|
2020-09-25 04:09:32 -04:00
|
|
|
)
|
2021-05-06 05:28:21 -04:00
|
|
|
cmake_src_configure
|
2020-09-25 04:09:32 -04:00
|
|
|
}
|
2021-05-06 05:28:21 -04:00
|
|
|
# -DUSE_SYSTEM_VIRTUALENV=ON
|
|
|
|
# -DModule_SimpleITKFilters:BOOL=ON
|
|
|
|
# -DUSE_SYSTEM_GTEST=ON
|
|
|
|
# -DUSE_SYSTEM_ITK=ON
|
|
|
|
# -DUSE_SYSTEM_LUA=ON
|
|
|
|
# -DUSE_SYSTEM_SWIG=ON
|
2020-09-25 04:09:32 -04:00
|
|
|
|
|
|
|
#src_install() {
|
2021-05-06 05:28:21 -04:00
|
|
|
# die
|
2020-09-25 04:09:32 -04:00
|
|
|
#}
|