sci-biology/ants: updated ebuild style
Package-Manager: Portage-2.3.76, Repoman-2.3.17 Signed-off-by: Horea Christian <chr@chymera.eu>
This commit is contained in:
parent
633a5877b4
commit
8ba7a5a1a5
@ -1,3 +1,8 @@
|
||||
13 Oct 2019; <chymera@gentoo.org> +files/ants-2.3.1_p20191013-logic.patch,
|
||||
+files/ants-2.3.1_p20191013-paths.patch, ants-2.3.1_p20191013.ebuild,
|
||||
ants-9999.ebuild:
|
||||
sci-biology/ants: updated ebuild style
|
||||
|
||||
23 Sep 2019; <chymera@gentoo.org> ants-2.3.1_p20190704.ebuild:
|
||||
sci-biology/ants: improved testing support
|
||||
|
||||
|
@ -22,25 +22,26 @@ LICENSE="BSD"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE="test vtk"
|
||||
|
||||
RDEPEND=""
|
||||
DEPEND="
|
||||
>=dev-util/cmake-3.10.3
|
||||
vtk? (
|
||||
~sci-libs/itk-5.0.1[vtkglue]
|
||||
sci-libs/vtk
|
||||
)
|
||||
!vtk? ( ~sci-libs/itk-5.0.1 )
|
||||
"
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/${P}-logic.patch"
|
||||
"${FILESDIR}/${P}-paths.patch"
|
||||
)
|
||||
|
||||
src_prepare () {
|
||||
use test && mkdir -p "${S}/.ExternalData/MD5"
|
||||
use test && tar xvf "${DISTDIR}/ants_testdata-${PV}.tar.xz" -C "${S}/.ExternalData/MD5/"
|
||||
cmake-utils_src_prepare
|
||||
src_unpack() {
|
||||
git-r3_src_unpack
|
||||
if use test; then
|
||||
mkdir -p "${S}/.ExternalData/MD5" || die "Could not create test data directory."
|
||||
tar xvf "${DISTDIR}/ants_testdata-${PV}.tar.xz" -C "${S}/.ExternalData/MD5/" > /dev/null || die "Could not unpack test data."
|
||||
fi
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
|
@ -21,25 +21,26 @@ LICENSE="BSD"
|
||||
KEYWORDS=""
|
||||
IUSE="test vtk"
|
||||
|
||||
RDEPEND=""
|
||||
DEPEND="
|
||||
>=dev-util/cmake-3.10.3
|
||||
vtk? (
|
||||
~sci-libs/itk-5.0.1[vtkglue]
|
||||
sci-libs/vtk
|
||||
)
|
||||
!vtk? ( ~sci-libs/itk-5.0.1 )
|
||||
"
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/${P}-logic.patch"
|
||||
"${FILESDIR}/${P}-paths.patch"
|
||||
"${FILESDIR}/${PN}-2.3.1_p20191013-logic.patch"
|
||||
"${FILESDIR}/${PN}-2.3.1_p20191013-paths.patch"
|
||||
)
|
||||
|
||||
src_prepare () {
|
||||
use test && mkdir -p "${S}/.ExternalData/MD5"
|
||||
use test && tar xvf "${DISTDIR}/ants_testdata-2.3.1_p20191013.tar.xz" -C "${S}/.ExternalData/MD5/"
|
||||
cmake-utils_src_prepare
|
||||
src_unpack() {
|
||||
git-r3_src_unpack
|
||||
if use test; then
|
||||
mkdir -p "${S}/.ExternalData/MD5" || die "Could not create test data directory."
|
||||
tar xvf "${DISTDIR}/ants_testdata-2.3.1_p20191013.tar.xz" -C "${S}/.ExternalData/MD5/" > /dev/null || die "Could not unpack test data."
|
||||
fi
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
|
37
sci-biology/ants/files/ants-2.3.1_p20191013-logic.patch
Normal file
37
sci-biology/ants/files/ants-2.3.1_p20191013-logic.patch
Normal file
@ -0,0 +1,37 @@
|
||||
From b2c828ff8e5ce537d7096af04b086e965fede9e8 Mon Sep 17 00:00:00 2001
|
||||
From: "Gabriel A. Devenyi" <gdevenyi@gmail.com>
|
||||
Date: Mon, 7 Oct 2019 22:01:51 -0400
|
||||
Subject: [PATCH] Fix install logic
|
||||
|
||||
---
|
||||
ANTS.cmake | 3 ++-
|
||||
SuperBuild.cmake | 2 ++
|
||||
2 files changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/ANTS.cmake b/ANTS.cmake
|
||||
index a1baf845..95ffdc74 100644
|
||||
--- a/ANTS.cmake
|
||||
+++ b/ANTS.cmake
|
||||
@@ -172,7 +172,8 @@ install(PROGRAMS Scripts/ANTSpexec.sh
|
||||
COMPONENT SCRIPTS
|
||||
)
|
||||
|
||||
-if(BUILD_SHARED_LIBS AND NOT (USE_SYSTEM_ITK AND USE_SYSTEM_VTK))
|
||||
+#Only install ITK/VTK libraries if shared build and superbuild is used
|
||||
+if(BUILD_SHARED_LIBS AND ((NOT USE_SYSTEM_ITK) OR ((NOT USE_SYSTEM_VTK) AND USE_VTK)))
|
||||
install(DIRECTORY ${CMAKE_BINARY_DIR}/../staging/lib/
|
||||
DESTINATION lib)
|
||||
endif()
|
||||
diff --git a/SuperBuild.cmake b/SuperBuild.cmake
|
||||
index f4630e64..32b930c2 100644
|
||||
--- a/SuperBuild.cmake
|
||||
+++ b/SuperBuild.cmake
|
||||
@@ -207,6 +207,8 @@ list(APPEND ${CMAKE_PROJECT_NAME}_SUPERBUILD_EP_VARS
|
||||
CMAKE_C_COMPILER_LAUNCHER:STRING
|
||||
CMAKE_CXX_COMPILER_LAUNCHER:STRING
|
||||
CMAKE_CUDA_COMPILER_LAUNCHER:STRING
|
||||
+ USE_SYSTEM_ITK:BOOL
|
||||
+ USE_SYSTEM_VTK:BOOL
|
||||
)
|
||||
|
||||
_expand_external_project_vars()
|
40
sci-biology/ants/files/ants-2.3.1_p20191013-paths.patch
Normal file
40
sci-biology/ants/files/ants-2.3.1_p20191013-paths.patch
Normal file
@ -0,0 +1,40 @@
|
||||
diff --git a/Examples/CMakeLists.txt b/Examples/CMakeLists.txt
|
||||
--- a/Examples/CMakeLists.txt
|
||||
+++ b/Examples/CMakeLists.txt
|
||||
@@ -16,8 +16,9 @@
|
||||
+include(GNUInstallDirs)
|
||||
install(TARGETS antsUtilities
|
||||
- RUNTIME DESTINATION bin
|
||||
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
COMPONENT RUNTIME_antsUtilities
|
||||
- LIBRARY DESTINATION lib
|
||||
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
COMPONENT RUNTIME_antsUtilities
|
||||
- ARCHIVE DESTINATION lib
|
||||
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
COMPONENT DEVELOPMENT_antsUtilities
|
||||
)
|
||||
@@ -38,8 +38,8 @@
|
||||
install(TARGETS l_${ANTS_FUNCTION_NAME} ${ANTS_FUNCTION_NAME}
|
||||
- RUNTIME DESTINATION bin
|
||||
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
COMPONENT RUNTIME_${ANTS_FUNCTION_NAME}
|
||||
- LIBRARY DESTINATION lib
|
||||
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
COMPONENT RUNTIME_${ANTS_FUNCTION_NAME}
|
||||
- ARCHIVE DESTINATION lib
|
||||
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
COMPONENT DEVELOPMENT_${ANTS_FUNCTION_NAME}
|
||||
)
|
||||
@@ -61,8 +61,8 @@
|
||||
install(TARGETS l_${ANTS_FUNCTION_NAME} ${ANTS_FUNCTION_NAME}
|
||||
- RUNTIME DESTINATION bin
|
||||
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
COMPONENT RUNTIME_${ANTS_FUNCTION_NAME}
|
||||
- LIBRARY DESTINATION lib
|
||||
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
COMPONENT RUNTIME_${ANTS_FUNCTION_NAME}
|
||||
- ARCHIVE DESTINATION lib
|
||||
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
COMPONENT DEVELOPMENT_${ANTS_FUNCTION_NAME}
|
||||
)
|
Loading…
x
Reference in New Issue
Block a user