1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-26 09:46:09 +00:00

devel/root: Add options to port Makefile

- Added various build options to port Makefile.
   List of build options, newness and defaults:
   MYSQL(new,off), PGSQL(new,off), PYROOT(new,on) ROOT7(on),
   SQLITE(new,off) and X11(new,on)
   Note: In previous versions of this port, the dependencies of MySQL,
   PgSQL, PyROOT, SQLite and X11 were all predicated by default
 - Bump PORTREVISION
This commit is contained in:
Erik Jensen 2023-06-18 20:24:30 +01:00 committed by Nuno Teixeira
parent 690a8f3a68
commit ae002dd581
3 changed files with 764 additions and 713 deletions

View File

@ -1,5 +1,6 @@
PORTNAME= root
DISTVERSION= 6.28.04
PORTREVISION= 1
CATEGORIES= devel science math parallel python
MASTER_SITES= https://root.cern/download/
DISTFILES= ${PORTNAME}_v${DISTVERSION}.source${EXTRACT_SUFX}
@ -11,17 +12,13 @@ WWW= https://root.cern/
LICENSE= LGPL21
LICENSE_FILE= ${WRKSRC}/LGPL2_1.txt
BUILD_DEPENDS= ${PYNUMPY} \
bash:shells/bash \
BUILD_DEPENDS= bash:shells/bash \
nlohmann-json>=3:devel/nlohmann-json
LIB_DEPENDS= libAfterImage.so:graphics/libafterimage \
libcfitsio.so:astro/cfitsio \
LIB_DEPENDS= libcfitsio.so:astro/cfitsio \
libcurl.so:ftp/curl \
libfftw3.so:math/fftw3 \
libfreetype.so:print/freetype2 \
libftgl.so:graphics/ftgl \
libgif.so:graphics/giflib \
libgl2ps.so:print/gl2ps \
libgsl.so:math/gsl \
liblz4.so:archivers/liblz4 \
libpcre.so:devel/pcre \
@ -30,38 +27,67 @@ LIB_DEPENDS= libAfterImage.so:graphics/libafterimage \
libtiff.so:graphics/tiff \
libunwind.so:devel/libunwind \
libvdt.so:math/vdt \
libxkbcommon.so:x11/libxkbcommon \
libXrdCl.so:databases/xrootd \
libxxhash.so:devel/xxhash \
libzstd.so:archivers/zstd
USES= blaslapack:openblas cmake compiler:c++17-lang desktop-file-utils \
gettext-runtime gl gnome iconv jpeg mysql pgsql:13+ python:3.9+ \
shebangfix sqlite ssl xorg
USE_GL= glew glu opengl
USE_GNOME= cairo gdkpixbuf2 glib20 librsvg2 libxml2
USE_XORG= ice sm x11 xau xaw xcb xcomposite xcursor xdamage xdmcp xext \
xfixes xfont xfont2 xft xi xinerama xkbfile xmu xpm xrandr \
xrender xres xscrnsaver xt xv xxf86vm
USES= cmake compiler:c++17-lang desktop-file-utils \
gettext-runtime gnome iconv jpeg shebangfix ssl
USE_GNOME= libxml2
SHEBANG_FILES= config/rootssh etc/dictpch/makepch.py etc/proof/utils/circle.sh \
etc/proof/utils/crypt etc/proof/utils/pps \
etc/proof/utils/proofctl.sh etc/proof/utils/proofinstall.sh
# Flags and environment variables for building
CMAKE_ARGS= -DCMAKE_CXX_STANDARD=17
CMAKE_ON= gnuinstall soversion
CMAKE_OFF= builtin_gtest
CMAKE_OFF= builtin_gtest clad
CONFIGURE_WRKSRC?= ${WRKDIR}/.build
MAKE_ENV+= ROOTSYS=${CONFIGURE_WRKSRC}
OPTIONS_DEFINE= DOCS ROOT7
OPTIONS_DEFAULT= ROOT7
# Port build options; DOCS also on by default
OPTIONS_DEFINE= DOCS MYSQL PGSQL PYROOT ROOT7 SQLITE X11
OPTIONS_DEFAULT= PYROOT ROOT7 X11
OPTIONS_SUB= yes
ROOT7_DESC= Enable supplementary preview features of ROOT version 7
# Option: MYSQL
MYSQL_DESC= Enable MySQL bindings
MYSQL_USES= mysql
MYSQL_CMAKE_BOOL= mysql
# Option: PGSQL
PGSQL_DESC= Enable PostgreSQL bindings
PGSQL_USES= pgsql:13+
PGSQL_CMAKE_BOOL= pgsql
#Option: PYROOT
PYROOT_DESC= Enable bindings between Python and C++ with PyROOT
PYROOT_BUILD_DEPENDS= ${PYNUMPY}
PYROOT_USES= python:3.9+,build,run
PYROOT_USES_OFF= python:3.9+,build
PYROOT_CMAKE_BOOL= pyroot
# Option: ROOT7
ROOT7_DESC= Enable supplementary preview features of ROOT version 7
ROOT7_CMAKE_BOOL= root7
# Option: SQLITE
SQLITE_DESC= Enable SQLite bindings
SQLITE_USES= sqlite
SQLITE_CMAKE_BOOL= sqlite
# Option: X11
X11_DESC= Enable interfacing with X11 graphics system
X11_LIB_DEPENDS= libAfterImage.so:graphics/libafterimage \
libftgl.so:graphics/ftgl \
libgl2ps.so:print/gl2ps \
libxkbcommon.so:x11/libxkbcommon
X11_USES= gl xorg
X11_USE= gl=glew,glu,opengl gnome=cairo,gdkpixbuf2,glib20,librsvg2 \
xorg=ice,sm,x11,xau,xaw,xcb,xcomposite,xcursor,xdamage,xdmcp,xext,xfixes,xfont,xfont2,xft,xi,xinerama,xkbfile,xmu,xpm,xrandr,xrender,xres,xscrnsaver,xt,xv,xxf86vm
X11_CMAKE_BOOL= x11
.include <bsd.port.options.mk>
PLIST_SUB+= SHLIB_SHVER="${DISTVERSION:R}" \
@ -74,9 +100,8 @@ PLIST_SUB+= NOT_INSTALLED_ON_AARCH64="@comment " ONLY_INSTALLED_ON_AARCH64="" AA
PLIST_SUB+= NOT_INSTALLED_ON_AARCH64="" ONLY_INSTALLED_ON_AARCH64="@comment " AARCH64_PCM_PREFIX="" AARCH64_PCM_SUFFIX=""
.endif
# Some files only installed with LLVM/Clang 13 (used on FreeBSD 12.4 and 13.x)
# Some files only installed with LLVM/Clang 13 (used on FreeBSD 12.4, 13.0 and 13.1)
# TODO: Introduce USES+=llvm:min=14 instead when this can be deemed not too obtrusive on supported releases
# -- the post-patch step further down can then be phased out as well
.if 1204000 <= ${OSVERSION} && ${OSVERSION} < 1302000 && ${OSVERSION} != 1301507
PLIST_SUB+= ONLY_INSTALLED_WITH_LLVM_CLANG_13=""
.else

View File

@ -0,0 +1,26 @@
--- tmva/tmva/CMakeLists.txt.orig 2023-02-13 15:54:54 UTC
+++ tmva/tmva/CMakeLists.txt
@@ -444,15 +444,20 @@ if(tmva-cpu)
target_link_libraries(TMVA PRIVATE ${TBB_LIBRARIES})
set_target_properties(TMVA PROPERTIES COMPILE_FLAGS "${TBB_CXXFLAGS}")
- if(BLAS_FOUND)
- target_link_libraries(TMVA PRIVATE ${BLAS_LINKER_FLAGS} ${BLAS_LIBRARIES})
- elseif(GSL_FOUND)
+ # Port maintainer note: Prefer GSL's BLAS over OpenBLAS since GSL is a basic port dependency,
+ # but OpenBLAS can only be assumed available when PyROOT (which requires NumPy) is enabled.
+ # GSL does not depend on GCC, but NumPy depends on OpenBLAS which depends on GCC.
+ # By preferring GSL, we can entirely avoid depending on GCC in some build cases.
+ if(GSL_FOUND)
target_compile_definitions(TMVA PRIVATE -DDNN_USE_CBLAS)
target_include_directories(TMVA SYSTEM PRIVATE ${GSL_INCLUDE_DIR})
target_link_libraries(TMVA PRIVATE ${GSL_CBLAS_LIBRARY})
if(builtin_gsl)
add_dependencies(TMVA GSL)
endif()
+ elseif(BLAS_FOUND)
+ target_link_libraries(TMVA PRIVATE ${BLAS_LINKER_FLAGS} ${BLAS_LIBRARIES})
+
else()
message(FATAL_ERROR "tmva-cpu enabled but neither BLAS nor GSL BLAS were found")
endif()

File diff suppressed because it is too large Load Diff