1
0
mirror of synced 2024-12-22 04:40:17 +01:00

Applying updated old patch by John Lee

This commit is contained in:
Horea Christian 2023-12-14 05:40:08 -05:00
parent bb1f37f0f5
commit d8eb9cd6e1
2 changed files with 49 additions and 5 deletions

View File

@ -6,7 +6,7 @@ EAPI=7
#CMAKE_MAKEFILE_GENERATOR="emake"
PYTHON_COMPAT=( python3_{10..11} )
inherit cmake distutils-r1 git-r3 multilib ninja-utils
inherit cmake git-r3 multilib ninja-utils
GTS_HASH="962155a01f5a1b87bd64e3e3d880b4dbc2347ac7"
NIFTI_HASH="da476fd27f46098f37f5c9c4c1baee01e559572c"
@ -60,12 +60,15 @@ DEPEND="
#Update jpeg-compat to virtual/jpeg:0
# look for xmhtlm
PATCHES=(
"${FILESDIR}/afni-23.3.13_p20231212-libxhtml.patch"
)
src_prepare() {
tar xf "${DISTDIR}/${GTS_HASH}.tar.gz" || die
tar xf "${DISTDIR}/${NIFTI_HASH}.tar.gz" || die
tar xf "${DISTDIR}/${GIFTI_HASH}.tar.gz" || die
cmake_src_prepare
default
}
src_configure() {
@ -95,13 +98,14 @@ src_configure() {
-DCOMP_PYTHON=OFF
-DPython_FIND_VIRTUALENV=STANDARD
-DPython_FIND_STRATEGY=LOCATION
-DNDEBUG=ON
)
tc-export CC
cmake_src_configure
}
src_compile() {
cd ../afni-9999_build
cd ../${P}_build
pwd
ls -la
eninja || die
@ -110,9 +114,9 @@ src_compile() {
#/work/afni-9999/nifti_clib-65f801b9c2f1f15f4de4a19d45e6595c25765632
src_install() {
cd ../afni-9999_build
cd ../${P}_build
#cd ../afni-9999_build
DESTDIR=${D} eninja install
#BUILD_DIR="${WORKDIR}/${P}_build/ANTS-build"
#cmake_src_install
#cd "${S}/Scripts" || die "scripts dir not found"
#dobin *.sh

View File

@ -0,0 +1,40 @@
diff --git a/cmake/afni_project_dependencies.cmake b/cmake/afni_project_dependencies.cmake
index ac85256f0..a196cd56b 100644
--- a/cmake/afni_project_dependencies.cmake
+++ b/cmake/afni_project_dependencies.cmake
@@ -58,9 +58,9 @@ endif()
# software isolation then python is only searched for in this environment.
# For more details see:
# https://cmake.org/cmake/help/git-stage/module/FindPython.html
-set(CMAKE_FIND_FRAMEWORK LAST)
-set(Python_FIND_VIRTUALENV ONLY)
-set(Python_FIND_STRATEGY LOCATION)
+set_if_not_defined(CMAKE_FIND_FRAMEWORK LAST)
+set_if_not_defined(Python_FIND_VIRTUALENV ONLY)
+set_if_not_defined(Python_FIND_STRATEGY LOCATION)
# python >=3.6 supported
find_package(Python 3.6 REQUIRED COMPONENTS Interpreter)
diff --git a/src/XmHTML/CMakeLists.txt b/src/XmHTML/CMakeLists.txt
index d7aa5e27d..50d595ec8 100644
--- a/src/XmHTML/CMakeLists.txt
+++ b/src/XmHTML/CMakeLists.txt
@@ -1,17 +1,14 @@
# TODO: install prefix should be used to distinguish from external library
cmake_minimum_required(VERSION 3.13)
project(XmHTML)
-set(CMAKE_BUILD_TYPE "Release")
set(XMHTML_VERSION "1107")
set(XMHTML_ARCHIVE "1.1.7")
-set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -DNDEBUG")
-
# Construct XmHTML library
add_afni_library(XmHTML "")
target_compile_definitions(
- XmHTML PRIVATE "VERSION=${XMHTML_VERSION}" Motif HAVE_LIBJPEG HAVE_REGEX_H
+ XmHTML PRIVATE "VERSION=${XMHTML_VERSION}" Motif HAVE_LIBJPEG HAVE_REGEX_H NDEBUG
)
# add headers to XmHTML target_sources
add_subdirectory(include)