Skip to content

Commit 1738ea0

Browse files
committed
testing yaml patch, and not using geant4.pc
1 parent 50dc4a0 commit 1738ea0

5 files changed

Lines changed: 80 additions & 8 deletions

File tree

ci/build.sh

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
# Purpose: compiles gemc with optional sanitizers or debugging options.
44

55
# Container run:
6-
# docker run -it --rm --platform linux/amd64 jeffersonlab/geant4:g4v11.3.2-almalinux94 sh
6+
# docker run -it --rm --platform linux/amd64 ghcr.io/gemc/g4install:11.3.2-archlinux-latest bash -il
77
# git clone http://github.com/gemc/src /root/src && cd /root/src
88
# ./ci/build.sh
99

1010
source ci/env.sh
1111

1212
# module gemc gives $GEMC (used in meson prefix) and PKG_CONFIG_PATH
1313
# not strickly necessary, one could set those manually
14-
module load gemc/dev3
14+
module load gemc/dev
1515
echo GEMC for prefix set to: $GEMC
1616
echo
1717

@@ -48,8 +48,11 @@ else
4848
echo ; echo
4949
fi
5050

51-
cd build || exit 1
51+
echo " > Applying patch to version 0.8.0" >> $setup_log
52+
meson subprojects update yaml-cpp --reset
53+
meson setup --reconfigure build
5254

55+
cd build || exit 1
5356
echo " > Running meson compile -v -j $max_threads" > $compile_log
5457
meson compile -v -j $max_threads >> $compile_log
5558
if [ $? -ne 0 ]; then

meson/install_geant4_root_pkgconfig.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,8 @@ def check_root_config() -> bool:
9898
install_dir.mkdir(parents=True, exist_ok=True)
9999

100100
# --- 2. generate .pc files -----------------------------------------------
101-
generate_pkgconfig(install_dir, "geant4-config",
102-
"geant4.pc", "Geant4", "Geant4 Simulation Toolkit")
101+
#generate_pkgconfig(install_dir, "geant4-config",
102+
# "geant4.pc", "Geant4", "Geant4 Simulation Toolkit")
103103

104104
if check_root_config():
105105
generate_pkgconfig(install_dir, "root-config",

meson/meson.build

Lines changed: 53 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,62 @@ endif
4848
#root_deps = dependency('root', method: 'cmake')
4949

5050
# geant4: pkg-config created manually by ./meson/install_geant4_root_pkgconfig.py
51-
geant4_deps = dependency('geant4',
52-
version : '>=11.3.0',
53-
)
51+
#geant4_deps = dependency('geant4',
52+
# version : '>=11.3.0',
53+
#)
5454
# this also works,but ONLY if the dynamic libraries are present
5555
# geant4_deps = dependency('Geant4', method : 'cmake', static : true)
5656

57+
g4_all_modules = [
58+
# Shared-only in your install:
59+
'Geant4::G4tools',
60+
61+
# Static variants available (from your valid target list):
62+
'Geant4::G4ptl-static',
63+
'Geant4::G4analysis-static',
64+
'Geant4::G4digits_hits-static',
65+
'Geant4::G4error_propagation-static',
66+
'Geant4::G4event-static',
67+
'Geant4::G4geometry-static',
68+
'Geant4::G4global-static',
69+
'Geant4::G4graphics_reps-static',
70+
'Geant4::G4intercoms-static',
71+
'Geant4::G4interfaces-static',
72+
'Geant4::G4materials-static',
73+
'Geant4::G4parmodels-static',
74+
'Geant4::G4particles-static',
75+
'Geant4::G4geomtext-static',
76+
'Geant4::G4mctruth-static',
77+
'Geant4::G4gdml-static',
78+
'Geant4::G4physicslists-static',
79+
'Geant4::G4processes-static',
80+
'Geant4::G4readout-static',
81+
'Geant4::G4run-static',
82+
'Geant4::G4track-static',
83+
'Geant4::G4tracking-static',
84+
'Geant4::G4FR-static',
85+
'Geant4::G4visHepRep-static',
86+
'Geant4::G4RayTracer-static',
87+
'Geant4::G4Tree-static',
88+
'Geant4::G4VRML-static',
89+
'Geant4::G4GMocren-static',
90+
'Geant4::G4vis_management-static',
91+
'Geant4::G4modeling-static',
92+
'Geant4::G4ToolsSG-static',
93+
'Geant4::G4OpenGL-static',
94+
'Geant4::G4visQt3D-static',
95+
]
96+
97+
geant4_deps = dependency(
98+
'Geant4',
99+
method: 'cmake',
100+
version: '>=11.3.0',
101+
# modules: g4_all_modules,
102+
static: true, # prefer static libraries when available
103+
required: true,
104+
)
105+
106+
57107

58108
cmake = import('cmake')
59109

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
From abcdef1234567890 Mon Sep 17 00:00:00 2001
2+
Subject: [PATCH] emitterutils: include <cstdint> (and <utility>) for uint16_t/uint32_t
3+
4+
diff --git a/src/emitterutils.cpp b/src/emitterutils.cpp
5+
index 0000000..1111111 100644
6+
--- a/src/emitterutils.cpp
7+
+++ b/src/emitterutils.cpp
8+
@@ -9,6 +9,8 @@
9+
#include "yaml-cpp/mark.h"
10+
#include "yaml-cpp/null.h"
11+
#include "yaml-cpp/ostream_wrapper.h"
12+
+#include <cstdint>
13+
+#include <utility>
14+
15+
namespace YAML {
16+
namespace Utils {
17+

subprojects/yaml-cpp.wrap

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ url = https://github.com/jbeder/yaml-cpp
33
revision = 0.8.0
44
depth = 1
55
method = cmake
6+
diff_files = yaml-cpp/0001-include-cstdint-emitterutils.patch
67

78
[provide]
89
yaml_cpp=yaml_cpp_dep
10+

0 commit comments

Comments
 (0)