View | Details | Raw Unified | Return to bug 281299 | Differences between
and this patch

Collapse All | Expand All

(-)b/devel/root/Makefile (-20 / +1 lines)
Lines 1-5 Link Here
1
PORTNAME=	root
1
PORTNAME=	root
2
DISTVERSION=	6.32.04
2
DISTVERSION=	6.32.04
3
PORTREVISION=	1
3
CATEGORIES=	devel science math parallel python
4
CATEGORIES=	devel science math parallel python
4
MASTER_SITES=	https://root.cern/download/
5
MASTER_SITES=	https://root.cern/download/
5
DISTFILES=	${PORTNAME}_v${DISTVERSION}.source${EXTRACT_SUFX}
6
DISTFILES=	${PORTNAME}_v${DISTVERSION}.source${EXTRACT_SUFX}
Lines 59-66 CMAKE_OFF= arrow builtin_afterimage builtin_cfitsio builtin_cppzmq builtin_davix Link Here
59
		minuit2_omp mpi odbc proof pythia8 qt5web qt6web r roofit_multiprocess \
60
		minuit2_omp mpi odbc proof pythia8 qt5web qt6web r roofit_multiprocess \
60
		shadowpw test_distrdf_dask test_distrdf_pyspark tmva-gpu tmva-rmva tmva-sofie \
61
		shadowpw test_distrdf_dask test_distrdf_pyspark tmva-gpu tmva-rmva tmva-sofie \
61
		unfold unuran uring vc veccore vecgeom win_broken_tests winrtdebug
62
		unfold unuran uring vc veccore vecgeom win_broken_tests winrtdebug
62
CONFIGURE_WRKSRC?=	${WRKDIR}/.build
63
MAKE_ENV+=		ROOTSYS=${CONFIGURE_WRKSRC}
64
63
65
# Port build options; DOCS also on by default
64
# Port build options; DOCS also on by default
66
# See https://root.cern/install/build_from_source/#all-build-options
65
# See https://root.cern/install/build_from_source/#all-build-options
Lines 210-220 PLIST_SUB+= NOT_INSTALLED_ON_AARCH64="@comment " ONLY_INSTALLED_ON_AARCH64="" Link Here
210
PLIST_SUB+=	NOT_INSTALLED_ON_AARCH64="" ONLY_INSTALLED_ON_AARCH64="@comment "
209
PLIST_SUB+=	NOT_INSTALLED_ON_AARCH64="" ONLY_INSTALLED_ON_AARCH64="@comment "
211
.endif
210
.endif
212
211
213
# atexit-like commands need 'throw()' specifier on 15aarch64
214
.if ${OPSYS} == FreeBSD && ${ARCH} == "aarch64" && ${OSVERSION} > 1499999
215
EXTRA_PATCHES=	${PATCHDIR}/extra-patch-interpreter_cling_lib_Interpreter_Interpreter.cpp.15aarch64
216
.endif
217
218
# std_config.pcm exclusive to FreeBSD 14.0
212
# std_config.pcm exclusive to FreeBSD 14.0
219
.if ${OPSYS} == FreeBSD && ${OSREL} == 14.0
213
.if ${OPSYS} == FreeBSD && ${OSREL} == 14.0
220
PLIST_SUB+=	ONLY_INSTALLED_ON_FBSD140=""
214
PLIST_SUB+=	ONLY_INSTALLED_ON_FBSD140=""
Lines 222-240 PLIST_SUB+= ONLY_INSTALLED_ON_FBSD140="" Link Here
222
PLIST_SUB+=	ONLY_INSTALLED_ON_FBSD140="@comment "
216
PLIST_SUB+=	ONLY_INSTALLED_ON_FBSD140="@comment "
223
.endif
217
.endif
224
218
225
# Port patch removes implicit use of system's module.modulemap and applies
226
# explicit use of the same module.modulemap, with modifications, provided
227
# by the port
228
eq_OSREL=	${OSREL}
229
.if ${OPSYS} == FreeBSD && ${OSREL} == 14.1
230
# module.modulemap identical on 14.1 and 15.0
231
eq_OSREL=	15.0
232
.endif
233
post-patch:
234
	${CP} \
235
  ${PATCHDIR}/interpreter-cling-include-cling-std__fbsd${eq_OSREL}.modulemap \
236
  ${WRKSRC}/interpreter/cling/include/cling/std_fbsd.modulemap
237
238
# Files in lib/root/__pycache__ have links into WRKDIR and should not be staged. This happens even when PYROOT option is OFF.
219
# Files in lib/root/__pycache__ have links into WRKDIR and should not be staged. This happens even when PYROOT option is OFF.
239
post-install:
220
post-install:
240
	${RM} -r ${STAGEDIR}${PREFIX}/lib/root/__pycache__
221
	${RM} -r ${STAGEDIR}${PREFIX}/lib/root/__pycache__
(-)b/devel/root/distinfo (-1 / +1 lines)
Lines 1-3 Link Here
1
TIMESTAMP = 1724165331
1
TIMESTAMP = 1725449870
2
SHA256 (root_v6.32.04.source.tar.gz) = 132f126aae7d30efbccd7dcd991b7ada1890ae57980ef300c16421f9d4d07ea8
2
SHA256 (root_v6.32.04.source.tar.gz) = 132f126aae7d30efbccd7dcd991b7ada1890ae57980ef300c16421f9d4d07ea8
3
SIZE (root_v6.32.04.source.tar.gz) = 192915562
3
SIZE (root_v6.32.04.source.tar.gz) = 192915562
(-)b/devel/root/files/patch-cmake_modules_SetUpFreeBSD.cmake (-1 / +1 lines)
Lines 4-10 Link Here
4
 elseif(CMAKE_SYSTEM_PROCESSOR MATCHES i686)
4
 elseif(CMAKE_SYSTEM_PROCESSOR MATCHES i686)
5
   set(FP_MATH_FLAGS "-msse2 -mfpmath=sse")
5
   set(FP_MATH_FLAGS "-msse2 -mfpmath=sse")
6
   set(ROOT_ARCHITECTURE freebsdi686)
6
   set(ROOT_ARCHITECTURE freebsdi686)
7
+elseif(CMAKE_SYSTEM_PROCESSOR MATCHES i386) # FreeBSD port maintainer note: Treating i386 as i686 might just work...
7
+elseif(CMAKE_SYSTEM_PROCESSOR MATCHES i386) # FreeBSD port maintainer note: Treating i386 as i686 works
8
+  set(FP_MATH_FLAGS "-msse2 -mfpmath=sse")
8
+  set(FP_MATH_FLAGS "-msse2 -mfpmath=sse")
9
+  set(ROOT_ARCHITECTURE freebsdi386)
9
+  set(ROOT_ARCHITECTURE freebsdi386)
10
 elseif(CMAKE_SYSTEM_PROCESSOR MATCHES aarch64)
10
 elseif(CMAKE_SYSTEM_PROCESSOR MATCHES aarch64)
(-)b/devel/root/files/patch-core_clingutils_CMakeLists.txt (-19 / +8 lines)
Lines 1-23 Link Here
1
--- core/clingutils/CMakeLists.txt.orig	2024-04-12 17:58:43 UTC
1
--- core/clingutils/CMakeLists.txt.orig	2024-05-30 18:17:28 UTC
2
+++ core/clingutils/CMakeLists.txt
2
+++ core/clingutils/CMakeLists.txt
3
@@ -123,6 +123,20 @@ if (runtime_cxxmodules)
3
@@ -120,7 +120,8 @@ if (runtime_cxxmodules)
4
   if (CMAKE_SYSTEM_NAME MATCHES Darwin AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 15.0.0.15000309)
4
 
5
   # We need to override the default modulemap because instead of producing a
6
   # single std.pcm, produces hundreds of pcms. This changed with sdk 15.3.
7
-  if (CMAKE_SYSTEM_NAME MATCHES Darwin AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 15.0.0.15000309)
8
+  if ((CMAKE_SYSTEM_NAME MATCHES Darwin OR CMAKE_SYSTEM_NAME MATCHES FreeBSD) 
9
+      AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 15.0.0.15000309)
5
     set(custom_modulemaps ${custom_modulemaps} std_darwin.modulemap)
10
     set(custom_modulemaps ${custom_modulemaps} std_darwin.modulemap)
6
   endif()
11
   endif()
7
+  #[[
8
+  FreeBSD port maintainer note:
9
+  Related to upstream PR https://github.com/root-project/root/pull/14920.
10
+  Depending on a given system's version of LLVM, the standard library module.modulemap file
11
+  distributed with the OS might cause ROOT to fail to build, because the module.modulemap
12
+  file needs patching.
13
+  The port patch removes the implicit use of the system's module.modulemap file and applies,
14
+  explicitly, the same module.modulemap file - with modifications, if needed.
15
+  The (modified) module.modulemap file is provided by the port in
16
+  ${PATCHDIR}/interpreter-cling-include-cling-std__fbsd${OSREL}.modulemap.
17
+  ]]#
18
+  if (CMAKE_SYSTEM_NAME MATCHES FreeBSD)
19
+    set(custom_modulemaps ${custom_modulemaps} std_fbsd.modulemap)
20
+  endif()
21
 
12
 
22
   if (NOT libcxx)
23
     if (MSVC)
(-)b/devel/root/files/patch-interpreter_cling_lib_Interpreter_CIFactory.cpp (-5 / +19 lines)
Lines 1-14 Link Here
1
--- interpreter/cling/lib/Interpreter/CIFactory.cpp.orig	2024-05-30 18:22:02 UTC
1
--- interpreter/cling/lib/Interpreter/CIFactory.cpp.orig	2024-06-24 15:02:26 UTC
2
+++ interpreter/cling/lib/Interpreter/CIFactory.cpp
2
+++ interpreter/cling/lib/Interpreter/CIFactory.cpp
3
@@ -699,6 +699,11 @@ namespace {
3
@@ -699,6 +699,25 @@ namespace {
4
                               clingIncLoc.str().str(), MOverlay,
4
                               clingIncLoc.str().str(), MOverlay,
5
                               /*RegisterModuleMap=*/ true,
5
                               /*RegisterModuleMap=*/ true,
6
                               /*AllowModulemapOverride=*/ false);
6
                               /*AllowModulemapOverride=*/ false);
7
+#elif __FreeBSD__ // See 'FreeBSD port maintainer note' in core/clingutils/CMakeLists.txt
7
+#elif __FreeBSD__
8
+    maybeAppendOverlayEntry(stdIncLoc.str(), "std_fbsd.modulemap",
8
+    auto fvMajor = Triple.getOSVersion().getMajor();
9
+    auto fvMinor = Triple.getOSVersion().getMinor();
10
+    // Same issue on FreeBSD 13.3+, 14.1+ and 15+ as introduced in MacOS sdk 15.3 ('core/clingutils/CMakeLists.txt')
11
+    if ((fvMajor == 13 && fvMinor >= 3) || (fvMajor == 14 && fvMinor >= 1) || fvMajor >= 15) {
12
+        maybeAppendOverlayEntry(stdIncLoc.str(), "std_darwin.modulemap",
13
+                                clingIncLoc.str().str(), MOverlay,
14
+                                /*RegisterModuleMap=*/ true,
15
+                                /*AllowModulemapOverride=*/ false);
16
+    } else {
17
+        maybeAppendOverlayEntry(stdIncLoc.str(), "std.modulemap",
18
+                                clingIncLoc.str().str(), MOverlay,
19
+                                /*RegisterModuleMap=*/ true,
20
+                                /*AllowModulemapOverride=*/true);
21
+    }
22
+    maybeAppendOverlayEntry(cIncLoc.str(), "libc.modulemap",
9
+                            clingIncLoc.str().str(), MOverlay,
23
+                            clingIncLoc.str().str(), MOverlay,
10
+                            /*RegisterModuleMap=*/ true,
24
+                            /*RegisterModuleMap=*/ true,
11
+                            /*AllowModulemapOverride=*/ false);
25
+                            /*AllowModulemapOverride=*/true);
12
 #else
26
 #else
13
     maybeAppendOverlayEntry(cIncLoc.str(), "libc.modulemap",
27
     maybeAppendOverlayEntry(cIncLoc.str(), "libc.modulemap",
14
                             clingIncLoc.str().str(), MOverlay,
28
                             clingIncLoc.str().str(), MOverlay,
(-)b/devel/root/files/patch-interpreter_cling_lib_Interpreter_Interpreter.cpp (-10 / +17 lines)
Lines 1-13 Link Here
1
--- interpreter/cling/lib/Interpreter/Interpreter.cpp.orig	2024-05-30 18:23:48 UTC
1
--- interpreter/cling/lib/Interpreter/Interpreter.cpp.orig	2024-05-30 18:23:48 UTC
2
+++ interpreter/cling/lib/Interpreter/Interpreter.cpp
2
+++ interpreter/cling/lib/Interpreter/Interpreter.cpp
3
@@ -889,8 +889,10 @@ namespace cling {
3
@@ -465,8 +465,17 @@ namespace cling {
4
                                     /*AllowExtraSearch*/ true))
4
     const char* Attr = LangOpts.CPlusPlus ? " throw () " : "";
5
       return loadModule(M, complain);
5
 #else
6
     const char* LinkageCxx = Linkage;
7
+#ifdef __FreeBSD__
8
+// atexit-like commands need 'throw()' specifier on FreeBSD 15 aarch64
9
+#if defined(__aarch64__) && __FreeBSD_cc_version >= 1500000
10
+    const char* Attr = " throw () ";
11
+#else
12
     const char* Attr = "";
13
 #endif
14
+#else
15
+    const char* Attr = "";
16
+#endif // __FreeBSD__
17
+#endif // __GLIBC__
6
 
18
 
7
+#ifndef __FreeBSD__ // See 'FreeBSD port maintainer note' in core/clingutils/CMakeLists.txt
19
 #if defined(__GLIBCXX__)
8
    if (complain)
20
     const char* cxa_atexit_is_noexcept = LangOpts.CPlusPlus ? " noexcept" : "";
9
      llvm::errs() << "Module " << moduleName << " not found.\n";
10
+#endif
11
 
12
 
13
    return false;
(-)b/devel/root/pkg-plist (-1 / +2 lines)
Lines 246-252 bin/thisroot.sh Link Here
246
%%NOT_INSTALLED_ON_AARCH64%%%%ETCDIR%%/cling/libc.modulemap
246
%%NOT_INSTALLED_ON_AARCH64%%%%ETCDIR%%/cling/libc.modulemap
247
%%NOT_INSTALLED_ON_AARCH64%%%%ETCDIR%%/cling/module.modulemap
247
%%NOT_INSTALLED_ON_AARCH64%%%%ETCDIR%%/cling/module.modulemap
248
%%NOT_INSTALLED_ON_AARCH64%%%%ETCDIR%%/cling/std.modulemap
248
%%NOT_INSTALLED_ON_AARCH64%%%%ETCDIR%%/cling/std.modulemap
249
%%NOT_INSTALLED_ON_AARCH64%%%%ETCDIR%%/cling/std_fbsd.modulemap
249
%%NOT_INSTALLED_ON_AARCH64%%%%ETCDIR%%/cling/std_darwin.modulemap
250
%%NOT_INSTALLED_ON_AARCH64%%%%ETCDIR%%/cling/tinyxml2.modulemap
250
%%NOT_INSTALLED_ON_AARCH64%%%%ETCDIR%%/cling/tinyxml2.modulemap
251
%%NOT_INSTALLED_ON_AARCH64%%%%ETCDIR%%/cling/vc.modulemap
251
%%NOT_INSTALLED_ON_AARCH64%%%%ETCDIR%%/cling/vc.modulemap
252
%%ETCDIR%%/dictpch/makepch.py
252
%%ETCDIR%%/dictpch/makepch.py
Lines 3843-3848 lib/root/libXMLIO.so.%%SHLIB_VER%% Link Here
3843
%%XML%%lib/root/libXMLParser.so
3843
%%XML%%lib/root/libXMLParser.so
3844
%%XML%%lib/root/libXMLParser.so.%%SHLIB_SHVER%%
3844
%%XML%%lib/root/libXMLParser.so.%%SHLIB_SHVER%%
3845
%%XML%%lib/root/libXMLParser.so.%%SHLIB_VER%%
3845
%%XML%%lib/root/libXMLParser.so.%%SHLIB_VER%%
3846
%%NOT_INSTALLED_ON_AARCH64%%lib/root/libc.pcm
3846
lib/root/libcomplexDict.rootmap
3847
lib/root/libcomplexDict.rootmap
3847
lib/root/libcomplexDict.so
3848
lib/root/libcomplexDict.so
3848
lib/root/libcomplexDict.so.%%SHLIB_SHVER%%
3849
lib/root/libcomplexDict.so.%%SHLIB_SHVER%%

Return to bug 281299