Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes to use LCG #97

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
155 changes: 98 additions & 57 deletions defaults-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,19 @@ overrides:
which cc && test -f $(dirname $(which cc))/c++ && printf "#define GCCVER ((__GNUC__ << 16)+(__GNUC_MINOR__ << 8)+(__GNUC_PATCHLEVEL__))\n#if (GCCVER < 0x060000 || GCCVER > 0x100000)\n#error \"System's GCC cannot be used: we need GCC 6.X. We are going to compile our own version.\"\n#endif\n" | cc -xc++ - -c -o /dev/null
ROOT:
prefer_system_check: |
ls $ROOT_ROOT/bin > /dev/null && \
ls $ROOT_ROOT/cmake > /dev/null && \
ls $ROOT_ROOT/config > /dev/null && \
ls $ROOT_ROOT/etc > /dev/null && \
ls $ROOT_ROOT/fonts > /dev/null && \
ls $ROOT_ROOT/geom > /dev/null && \
ls $ROOT_ROOT/icons > /dev/null && \
ls $ROOT_ROOT/include > /dev/null && \
ls $ROOT_ROOT/lib > /dev/null && \
ls $ROOT_ROOT/macros > /dev/null && \
ls $ROOT_ROOT/man > /dev/null && \
true
VERSION=$(root-config --version)
REQUESTED_VERSION=${REQUESTED_VERSION#v}
REQUESTED_VERSION=${REQUESTED_VERSION//-/.}
if [ $(printf "${VERSION}\n${REQUESTED_VERSION}" | sort -V | head -1) != "${VERSION}" ]; then
echo "ROOT version $VERSION sufficient"
else
echo "ROOT version $VERSION insufficient"
exit 1
fi
FEATURES="builtin_pcre mathmore xml ssl opengl http gdml pythia8 roofit soversion vdt xrootd"
for FEATURE in $FEATURES; do
root-config --has-$FEATURE | grep -q yes || { echo "$FEATURE missing"; exit 1; }
done
GSL:
version: "v1.16%(defaults_upper)s"
source: https://github.com/alisw/gsl
Expand Down Expand Up @@ -85,14 +86,20 @@ overrides:
tag: v10.7.3
source: https://github.com/geant4/geant4.git
prefer_system_check: |
ls $GEANT4_ROOT/bin > /dev/null && \
ls $GEANT4_ROOT/bin/geant4-config > /dev/null && \
ls $GEANT4_ROOT/bin/geant4.csh > /dev/null && \
ls $GEANT4_ROOT/bin/geant4.sh > /dev/null && \
ls $GEANT4_ROOT/include > /dev/null && \
ls $GEANT4_ROOT/include/Geant4 > /dev/null && \
ls $GEANT4_ROOT/lib/ > /dev/null && \
true
VERSION=$(geant4-config --version)
REQUESTED_VERSION=${REQUESTED_VERSION#v}
verlte() {
printf '%s\n' "$1" "$2" | sort -C -V
}
verlt() {
! verlte "$2" "$1"
}
if ! verlt $VERSION $REQUESTED_VERSION; then
echo "GEANT4 version $VERSION sufficient"
else
echo "GEANT4 version $VERSION insufficient"
exit 1
fi
requires:
- "GCC-Toolchain:(?!osx)"
- opengl
Expand Down Expand Up @@ -149,10 +156,19 @@ overrides:
apfel:
tag: 3.0.6
prefer_system_check: |
ls $APFEL_ROOT/bin > /dev/null && \
ls $APFEL_ROOT/lib > /dev/null && \
ls $APFEL_ROOT/include > /dev/null && \
true
VERSION=$(apfel-config --version)
verlte() {
printf '%s\n' "$1" "$2" | sort -C -V
}
verlt() {
! verlte "$2" "$1"
}
if ! verlt $VERSION $REQUESTED_VERSION; then
echo "apfel version $VERSION sufficient"
else
echo "apfel version $VERSION insufficient"
exit 1
fi
pythia:
version: "%(tag_basename)s"
source: https://github.com/ShipSoft/pythia8
Expand All @@ -162,15 +178,22 @@ overrides:
- HepMC
- boost
prefer_system_check: |
ls $PYTHIA_ROOT/bin > /dev/null && \
ls $PYTHIA_ROOT/bin/pythia8-config > /dev/null && \
ls $PYTHIA_ROOT/include/ > /dev/null && \
ls $PYTHIA_ROOT/include/Pythia8 > /dev/null && \
ls $PYTHIA_ROOT/include/Pythia8Plugins > /dev/null && \
ls $PYTHIA_ROOT/lib/libpythia8.a > /dev/null && \
ls $PYTHIA_ROOT/lib/libpythia8lhapdf6.so > /dev/null && \
ls $PYTHIA_ROOT/lib/libpythia8.so > /dev/null && \
true
VERSION=$(pythia8-config --version)
REQUESTED_VERSION=${REQUESTED_VERSION#v}
VERSION=${VERSION//.}
verlte() {
printf '%s\n' "$1" "$2" | sort -C -V
}
verlt() {
! verlte "$2" "$1"
}
if ! verlt $VERSION $REQUESTED_VERSION; then
echo "pythia8 version $VERSION sufficient"
else
echo "pythia8 version $VERSION insufficient"
exit 1
fi
pythia8-config --with-lhapdf6 || { echo "lhapdf6 support missing."; exit 1; }
vgm:
version: "%(tag_basename)s"
tag: "4.4"
Expand Down Expand Up @@ -226,12 +249,20 @@ overrides:
grep "2.06" $HEPMC_ROOT/include/HepMC/HepMCDefs.h > /dev/null
lhapdf:
prefer_system_check: |
ls $LHAPDF_ROOT/ > /dev/null && \
ls $LHAPDF_ROOT/bin > /dev/null && \
ls $LHAPDF_ROOT/include > /dev/null && \
ls $LHAPDF_ROOT/include/LHAPDF > /dev/null && \
ls $LHAPDF_ROOT/lib > /dev/null && \
ls $LHAPDF_ROOT/share/LHAPDF > /dev/null
VERSION=$(lhapdf-config --version)
REQUESTED_VERSION=${REQUESTED_VERSION#lhapdf-}
verlte() {
printf '%s\n' "$1" "$2" | sort -C -V
}
verlt() {
! verlte "$2" "$1"
}
if ! verlt $VERSION $REQUESTED_VERSION; then
echo "lhapdf version $VERSION sufficient"
else
echo "lhapdf version $VERSION insufficient"
exit 1
fi
lhapdf5:
prefer_system_check: |
ls $LHAPDF5_ROOT/ > /dev/null && \
Expand Down Expand Up @@ -263,26 +294,36 @@ overrides:
ls $VGM_ROOT/lib/libXmlVGM.a > /dev/null
XercesC:
prefer_system_check: |
ls $XERCESC_ROOT/ > /dev/null && \
ls $XERCESC_ROOT/bin > /dev/null && \
ls $XERCESC_ROOT/include > /dev/null && \
ls $XERCESC_ROOT/include/xercesc/ > /dev/null && \
ls $XERCESC_ROOT/lib > /dev/null && \
ls $XERCESC_ROOT/lib/libxerces-c-3.1.so > /dev/null && \
ls $XERCESC_ROOT/lib/libxerces-c.a > /dev/null && \
ls $XERCESC_ROOT/lib/libxerces-c.la > /dev/null && \
ls $XERCESC_ROOT/lib/libxerces-c.so > /dev/null
VERSION=$(pkg-config xerces-c --modversion)
REQUESTED_VERSION=${REQUESTED_VERSION#v}
verlte() {
printf '%s\n' "$1" "$2" | sort -C -V
}
verlt() {
! verlte "$2" "$1"
}
if ! verlt $VERSION $REQUESTED_VERSION; then
echo "xerces-c version $VERSION sufficient"
else
echo "xerces-c version $VERSION insufficient"
exit 1
fi
googletest:
prefer_system_check: |
ls $GOOGLETEST_ROOT/ > /dev/null && \
ls $GOOGLETEST_ROOT/include > /dev/null && \
ls $GOOGLETEST_ROOT/include/gmock > /dev/null && \
ls $GOOGLETEST_ROOT/include/gtest > /dev/null && \
ls $GOOGLETEST_ROOT/lib/libgmock.a > /dev/null && \
ls $GOOGLETEST_ROOT/lib/libgmock_main.a > /dev/null && \
ls $GOOGLETEST_ROOT/lib/libgtest.a > /dev/null && \
ls $GOOGLETEST_ROOT/lib/libgtest_main.a > /dev/null && \
true
VERSION=$(pkg-config gtest --modversion)
REQUESTED_VERSION=${REQUESTED_VERSION#v}
verlte() {
printf '%s\n' "$1" "$2" | sort -C -V
}
verlt() {
! verlte "$2" "$1"
}
if ! verlt $VERSION $REQUESTED_VERSION; then
echo "googletest version $VERSION sufficient"
else
echo "googletest version $VERSION insufficient"
exit 1
fi
---
# This file is included in any build recipe and it's only used to set
# environment variables. Which file to actually include can be defined by the
Expand Down
14 changes: 14 additions & 0 deletions fmt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,20 @@ build_requires:
- CMake
prepend_path:
ROOT_INCLUDE_PATH: "$FMT_ROOT/include"
prefer_system_check: |
VERSION=$(pkg-config fmt --modversion)
verlte() {
printf '%s\n' "$1" "$2" | sort -C -V
}
verlt() {
! verlte "$2" "$1"
}
if ! verlt $VERSION $REQUESTED_VERSION; then
echo "fmt version $VERSION sufficient"
else
echo "fmt version $VERSION insufficient"
exit 1
fi
---
#!/bin/bash -e
cmake $SOURCEDIR -DCMAKE_INSTALL_PREFIX=$INSTALLROOT -DFMT_TEST=OFF
Expand Down
15 changes: 15 additions & 0 deletions xrootd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,21 @@ build_requires:
- alibuild-recipe-tools
prepend_path:
PYTHONPATH: "${XROOTD_ROOT}/lib/python/site-packages"
prefer_system_check: |
VERSION=$(xrootd-config --version)
REQUESTED_VERSION=${REQUESTED_VERSION#v}
verlte() {
printf '%s\n' "$1" "$2" | sort -C -V
}
verlt() {
! verlte "$2" "$1"
}
if ! verlt $VERSION $REQUESTED_VERSION; then
echo "XRootD version $VERSION sufficient"
else
echo "XRootD version $VERSION insufficient"
exit 1
fi
---
#!/bin/bash -e

Expand Down