Skip to content
Open
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
31 changes: 31 additions & 0 deletions cetmodules.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
package: cetmodules
version: "%(tag_basename)s"
tag: 4.01.01
source: https://github.com/FNALssi/cetmodules
build_requires:
- CMake
- "GCC-Toolchain:(?!osx)"
- alibuild-recipe-tools
---
#!/bin/bash -e

cmake -S "$SOURCEDIR" -B . \
-DCMAKE_INSTALL_PREFIX="$INSTALLROOT" \
${CMAKE_GENERATOR:+-G "$CMAKE_GENERATOR"} \
${CMAKE_BUILD_TYPE:+-DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE}

cmake --build . --target install ${JOBS:+-- -j$JOBS}

# Patch config so find_package(cetmodules) also includes the modules
# that cetmodules' own CMakeLists.txt loads when used via FetchContent.
# All use include_guard() so double-inclusion is safe.
cat >> "$INSTALLROOT/share/cetmodules/cmake/cetmodulesConfig.cmake" <<'EOF'
include(CetProvideDependency)
include(CetCMakeEnv)
include(CetCMakeUtils)
include(CetCMakeConfig)
include(CetMake)
EOF

mkdir -p "$INSTALLROOT/etc/modulefiles"
alibuild-generate-module --cmake > "$INSTALLROOT/etc/modulefiles/$PKGNAME"
8 changes: 6 additions & 2 deletions eigen3.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
package: Eigen3
version: 3.4.0
source: https://gitlab.com/libeigen/eigen.git
prefer_system: .*
prefer_system_check: |
printf '#include <Eigen/Dense>\nint main(){}\n' | \

Check notice on line 6 in eigen3.sh

View workflow job for this annotation

GitHub Actions / alidistlint

Missing script shebang. Use exactly "#!/bin/bash -e" to match aliBuild environment. You may see spurious errors until you fix the shebang. [ali:bad-shebang]
c++ -std=c++20 -xc++ - \
${EIGEN3_ROOT:+-I"$EIGEN3_ROOT/include/eigen3"} \
-o /dev/null
Comment on lines +5 to +9

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Add the standard shebang to this shell probe.

alidistlint already flags Lines 5-9 because the block does not start with #!/bin/bash -e. Adding it keeps this probe consistent with the other new shell checks in this PR and avoids spurious lint noise.

Suggested fix
 prefer_system_check: |
+  #!/bin/bash -e
   printf '#include <Eigen/Dense>\nint main(){}\n' | \
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
prefer_system_check: |
printf '#include <Eigen/Dense>\nint main(){}\n' | \
c++ -std=c++20 -xc++ - \
${EIGEN3_ROOT:+-I"$EIGEN3_ROOT/include/eigen3"} \
-o /dev/null
prefer_system_check: |
#!/bin/bash -e
printf '#include <Eigen/Dense>\nint main(){}\n' | \
c++ -std=c++20 -xc++ - \
${EIGEN3_ROOT:+-I"$EIGEN3_ROOT/include/eigen3"} \
-o /dev/null
🧰 Tools
🪛 GitHub Check: alidistlint

[notice] 6-6:
Missing script shebang. Use exactly "#!/bin/bash -e" to match aliBuild environment. You may see spurious errors until you fix the shebang. [ali:bad-shebang]

🪛 Shellcheck (0.11.0)

[warning] 6-6: Piping to 'printf', a command that doesn't read stdin. Wrong command or missing xargs?

(SC2216)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@eigen3.sh` around lines 5 - 9, The shell probe block prefer_system_check is
missing the required shebang; edit the block so its first line is the standard
shebang (#!/bin/bash -e) before the printf command, i.e. insert "#!/bin/bash -e"
at the top of the prefer_system_check multi-line string to match other probes
and satisfy alidistlint.

build_requires:
- GCC-Toolchain
- CMake
- alibuild-recipe-tools
prefer_system_check: |
ls $EIGEN3_ROOT/include/eigen3/Eigen/Dense
---
#!/bin/bash -e
MODULEDIR="$INSTALLROOT/etc/modulefiles"
Expand Down
2 changes: 1 addition & 1 deletion fmt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ prefer_system_check: |
verge $REQUESTED_VERSION $FMT_VERSION
---
#!/bin/bash -e
cmake $SOURCEDIR -DCMAKE_INSTALL_PREFIX=$INSTALLROOT -DFMT_TEST=OFF
cmake $SOURCEDIR -DCMAKE_INSTALL_PREFIX=$INSTALLROOT -DFMT_TEST=OFF -DBUILD_SHARED_LIBS=ON

make ${JOBS+-j $JOBS}
make install
Expand Down
47 changes: 47 additions & 0 deletions geomodel.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
package: GeoModel
version: "%(tag_basename)s"
tag: "6.24.0"
source: https://gitlab.cern.ch/GeoModelDev/GeoModel.git
requires:
- sqlite
- XercesC
- nlohmann_json
- Eigen3
- GEANT4
build_requires:
- CMake
- "GCC-Toolchain:(?!osx)"
- alibuild-recipe-tools
env:
GEOMODEL_ROOT: "$GEOMODEL_ROOT"
prepend_path:
ROOT_INCLUDE_PATH: "$GEOMODEL_ROOT/include"
LD_LIBRARY_PATH: "$GEOMODEL_ROOT/lib"
---
#!/bin/bash -e

cmake "$SOURCEDIR" \
-DCMAKE_INSTALL_PREFIX="$INSTALLROOT" \
-DCMAKE_BUILD_TYPE="$CMAKE_BUILD_TYPE" \
-DCMAKE_CXX_STANDARD="${CMAKE_CXX_STANDARD:-20}" \
-DCMAKE_INSTALL_LIBDIR=lib \
-DGEOMODEL_USE_BUILTIN_JSON=OFF \
-DGEOMODEL_USE_BUILTIN_XERCESC=OFF \
-DGEOMODEL_USE_BUILTIN_EIGEN3=OFF \
-DGEOMODEL_BUILD_TOOLS=ON \
-DGEOMODEL_BUILD_GEOMODELG4=ON \
-DGEOMODEL_BUILD_FULLSIMLIGHT=ON \
-DGEOMODEL_BUILD_VISUALIZATION=OFF \
-DGEOMODEL_BUILD_TESTING=OFF

cmake --build . -- ${JOBS:+-j$JOBS} install

MODULEDIR="$INSTALLROOT/etc/modulefiles"
MODULEFILE="$MODULEDIR/$PKGNAME"
mkdir -p "$MODULEDIR"
alibuild-generate-module --bin --lib > "$MODULEFILE"
cat >> "$MODULEFILE" <<EoF
# Our environment
set GEOMODEL_ROOT \$::env(BASEDIR)/$PKGNAME/\$version
prepend-path ROOT_INCLUDE_PATH \$GEOMODEL_ROOT/include
EoF
Comment on lines +43 to +47

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Missing setenv to export GEOMODEL_ROOT to the environment.

Line 45 uses set which only creates a Tcl variable within the modulefile scope. To export GEOMODEL_ROOT as an environment variable for downstream consumers, add a setenv directive. Compare with spdlog.sh which uses both set and setenv.

Proposed fix
 cat >> "$MODULEFILE" <<EoF
 # Our environment
 set GEOMODEL_ROOT \$::env(BASEDIR)/$PKGNAME/\$version
+setenv GEOMODEL_ROOT \$GEOMODEL_ROOT
 prepend-path ROOT_INCLUDE_PATH \$GEOMODEL_ROOT/include
 EoF
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
cat >> "$MODULEFILE" <<EoF
# Our environment
set GEOMODEL_ROOT \$::env(BASEDIR)/$PKGNAME/\$version
prepend-path ROOT_INCLUDE_PATH \$GEOMODEL_ROOT/include
EoF
cat >> "$MODULEFILE" <<EoF
# Our environment
set GEOMODEL_ROOT \$::env(BASEDIR)/$PKGNAME/\$version
setenv GEOMODEL_ROOT \$GEOMODEL_ROOT
prepend-path ROOT_INCLUDE_PATH \$GEOMODEL_ROOT/include
EoF
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@geomodel.sh` around lines 43 - 47, The modulefile writes GEOMODEL_ROOT with a
Tcl set which does not export to the environment; update the block that appends
to "$MODULEFILE" to also call setenv for GEOMODEL_ROOT so downstream processes
see it (i.e. keep the existing set GEOMODEL_ROOT
\$::env(BASEDIR)/$PKGNAME/\$version and add a corresponding setenv GEOMODEL_ROOT
with the same value), following the pattern used in spdlog.sh.

34 changes: 34 additions & 0 deletions jsonnet.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
package: jsonnet
version: "%(tag_basename)s"
tag: v0.20.0
source: https://github.com/google/jsonnet
requires:
- "GCC-Toolchain:(?!osx)"
- nlohmann_json
build_requires:
- CMake
- alibuild-recipe-tools
---
#!/bin/bash -e

# jsonnet's USE_SYSTEM_JSON does find_package(nlohmann_json) but the source
# includes "json.hpp" (bare), while the system package installs
# "nlohmann/json.hpp". Point the include path at the nlohmann/ subdirectory
# so the bare include resolves.
cmake "$SOURCEDIR" \
-DCMAKE_INSTALL_PREFIX="$INSTALLROOT" \
-DCMAKE_BUILD_TYPE="$CMAKE_BUILD_TYPE" \
-DCMAKE_CXX_STANDARD="${CMAKE_CXX_STANDARD:-20}" \
-Dnlohmann_json_DIR="$NLOHMANN_JSON_ROOT/share/cmake/nlohmann_json" \
-DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
-DBUILD_TESTS=OFF \
-DUSE_SYSTEM_JSON=ON \
-DBUILD_SHARED_BINARIES=ON \
-DCMAKE_CXX_FLAGS="${CXXFLAGS:+$CXXFLAGS }-I$NLOHMANN_JSON_ROOT/include/nlohmann"

cmake --build . -- ${JOBS:+-j$JOBS} install

MODULEDIR="$INSTALLROOT/etc/modulefiles"
MODULEFILE="$MODULEDIR/$PKGNAME"
mkdir -p "$MODULEDIR"
alibuild-generate-module --bin --lib > "$MODULEFILE"
33 changes: 33 additions & 0 deletions nlohmann_json.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
package: nlohmann_json
version: "%(tag_basename)s"
tag: v3.11.3
source: https://github.com/nlohmann/json.git
prefer_system: .*
prefer_system_check: |
#!/bin/bash -e
printf '#include <nlohmann/json.hpp>\nint main(){}\n' | \
c++ -std=c++20 -xc++ - \
${NLOHMANN_JSON_ROOT:+-I"$NLOHMANN_JSON_ROOT/include"} \
-o /dev/null
build_requires:
- "GCC-Toolchain:(?!osx)"
- CMake
- alibuild-recipe-tools
---
#!/bin/bash -e

cmake "$SOURCEDIR" \
-DCMAKE_INSTALL_PREFIX="$INSTALLROOT" \
-DCMAKE_BUILD_TYPE="$CMAKE_BUILD_TYPE" \
-DJSON_BuildTests=OFF
cmake --build . -- ${JOBS:+-j$JOBS} install

MODULEDIR="$INSTALLROOT/etc/modulefiles"
MODULEFILE="$MODULEDIR/$PKGNAME"
mkdir -p "$MODULEDIR"
alibuild-generate-module > "$MODULEFILE"
cat >> "$MODULEFILE" <<EoF
# Our environment
set NLOHMANN_JSON_ROOT \$::env(BASEDIR)/$PKGNAME/\$version
prepend-path ROOT_INCLUDE_PATH \$NLOHMANN_JSON_ROOT/include
EoF
50 changes: 50 additions & 0 deletions phlex.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
package: phlex
version: "%(tag_basename)s"
tag: v0.1.0
source: https://github.com/Framework-R-D/phlex
requires:
- "GCC-Toolchain:(?!osx)"
- boost
- fmt
- TBB
- spdlog
- jsonnet
- ROOT
build_requires:
- CMake
- cetmodules
- alibuild-recipe-tools
env:
PHLEX_ROOT: "$PHLEX_ROOT"
PHLEX_PLUGIN_PATH: "$PHLEX_ROOT/lib"
prepend_path:
ROOT_INCLUDE_PATH: "$PHLEX_ROOT/include"
LD_LIBRARY_PATH: "$PHLEX_ROOT/lib"
---
#!/bin/bash -e

# PHLEX requires C++23 regardless of defaults
export CXXFLAGS="${CXXFLAGS//-std=c++*/-std=c++23}"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

CXXFLAGS='-O2 -fPIC -std=c++20 -Winvalid-pch'
echo "original : $CXXFLAGS"
echo "current  : ${CXXFLAGS//-std=c++*/-std=c++23}"
echo "expected : -O2 -fPIC -std=c++23 -Winvalid-pch"
echo "safer    : ${CXXFLAGS//-std=c++[![:space:]]*/-std=c++23}"

Repository: ShipSoft/shipdist

Length of output: 216


🏁 Script executed:

#!/bin/bash
set -euo pipefail

CXXFLAGS='-O2 -fPIC -std=c++20 -Winvalid-pch'
echo "original                          : $CXXFLAGS"
echo "current (broken)                  : ${CXXFLAGS//-std=c++*/-std=c++23}"
echo "proposed (also broken)            : ${CXXFLAGS//-std=c++[![:space:]]*/-std=c++23}"
echo "corrected [^ ]* pattern           : ${CXXFLAGS//-std=c++[^ ]*/-std=c++23}"
echo "expected                          : -O2 -fPIC -std=c++23 -Winvalid-pch"

Repository: ShipSoft/shipdist

Length of output: 373


🏁 Script executed:

head -40 phlex.sh | cat -n

Repository: ShipSoft/shipdist

Length of output: 1351


Line 27: CXXFLAGS replacement pattern is too greedy and drops trailing flags.

"${CXXFLAGS//-std=c++*/-std=c++23}" removes everything from -std=c++ to the end of the string, not just the standard flag. For example, if CXXFLAGS="-O2 -fPIC -std=c++20 -Winvalid-pch", this produces -O2 -fPIC -std=c++23 (losing -Winvalid-pch). This is confirmed by test.

The proposed character class pattern [![:space:]]* does not resolve this—it produces identical broken output because Bash parameter expansion globs do not reliably support POSIX character classes.

Use sed for a robust replacement:

Corrected approach
- export CXXFLAGS="${CXXFLAGS//-std=c++*/-std=c++23}"
+ export CXXFLAGS="$(sed 's/-std=c++[^ ]*/-std=c++23/g' <<< "$CXXFLAGS")"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
export CXXFLAGS="${CXXFLAGS//-std=c++*/-std=c++23}"
export CXXFLAGS="$(sed 's/-std=c++[^ ]*/-std=c++23/g' <<< "$CXXFLAGS")"
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@phlex.sh` at line 27, The CXXFLAGS substitution is too greedy (export
CXXFLAGS="${CXXFLAGS//-std=c++*/-std=c++23}") and removes trailing flags; update
the export to perform a targeted replacement of only the -std=c++... token by
piping or assigning CXXFLAGS through a sed substitution that matches
-std=c++[^[:space:]]* and replaces it with -std=c++23 so other flags (e.g.
-Winvalid-pch) are preserved; keep the variable name CXXFLAGS and the export,
but compute the new value via a safe sed replacement before exporting.


cmake "$SOURCEDIR" \
-DCMAKE_INSTALL_PREFIX="$INSTALLROOT" \
-DCMAKE_BUILD_TYPE="$CMAKE_BUILD_TYPE" \
-DCMAKE_CXX_STANDARD=23 \
-DCMAKE_INSTALL_LIBDIR=lib \
-DCMAKE_PREFIX_PATH="$CETMODULES_ROOT" \

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

CMAKE_PREFIX_PATH overwrite may drop dependency prefixes.

Setting -DCMAKE_PREFIX_PATH="$CETMODULES_ROOT" replaces (rather than extends) any CMAKE_PREFIX_PATH that the alibuild env has populated from boost, fmt, TBB, spdlog, jsonnet, ROOT. If phlex's CMakeLists relies on find_package for any of those without reading their *_ROOT env vars, configure will pick system copies or fail. Consider appending instead:

Suggested change
-  -DCMAKE_PREFIX_PATH="$CETMODULES_ROOT" \
+  -DCMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH:+$CMAKE_PREFIX_PATH:}$CETMODULES_ROOT" \
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
-DCMAKE_PREFIX_PATH="$CETMODULES_ROOT" \
-DCMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH:+$CMAKE_PREFIX_PATH:}$CETMODULES_ROOT" \
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@phlex.sh` at line 34, The script currently sets
-DCMAKE_PREFIX_PATH="$CETMODULES_ROOT" which overwrites any existing
CMAKE_PREFIX_PATH and can drop alibuild-provided prefixes (boost, fmt, TBB,
spdlog, jsonnet, ROOT); update the CMakelists invocation in phlex.sh where
-DCMAKE_PREFIX_PATH is set to append/prepend CETMODULES_ROOT to the existing
CMAKE_PREFIX_PATH environment variable (e.g., use the existing CMAKE_PREFIX_PATH
if present and join with CETMODULES_ROOT using ':'), so find_package calls still
see the alibuild-provided prefixes.

-DPHLEX_USE_FORM=ON \
-DBUILD_TESTING=OFF \
-DENABLE_CLANG_TIDY=OFF

cmake --build . -- ${JOBS:+-j$JOBS} install

MODULEDIR="$INSTALLROOT/etc/modulefiles"
MODULEFILE="$MODULEDIR/$PKGNAME"
mkdir -p "$MODULEDIR"
alibuild-generate-module --bin --lib > "$MODULEFILE"
cat >> "$MODULEFILE" <<EoF
# Our environment
set PHLEX_ROOT \$::env(BASEDIR)/$PKGNAME/\$version
setenv PHLEX_PLUGIN_PATH \$PHLEX_ROOT/lib
prepend-path ROOT_INCLUDE_PATH \$PHLEX_ROOT/include
EoF
Comment on lines +44 to +50

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Missing setenv to export PHLEX_ROOT to the environment.

Line 47 creates a Tcl variable PHLEX_ROOT, and line 48 correctly uses setenv for PHLEX_PLUGIN_PATH. However, PHLEX_ROOT itself is not exported as an environment variable. Add setenv PHLEX_ROOT for consistency.

Proposed fix
 cat >> "$MODULEFILE" <<EoF
 # Our environment
 set PHLEX_ROOT \$::env(BASEDIR)/$PKGNAME/\$version
+setenv PHLEX_ROOT \$PHLEX_ROOT
 setenv PHLEX_PLUGIN_PATH \$PHLEX_ROOT/lib
 prepend-path ROOT_INCLUDE_PATH \$PHLEX_ROOT/include
 EoF
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
alibuild-generate-module --bin --lib > "$MODULEFILE"
cat >> "$MODULEFILE" <<EoF
# Our environment
set PHLEX_ROOT \$::env(BASEDIR)/$PKGNAME/\$version
setenv PHLEX_PLUGIN_PATH \$PHLEX_ROOT/lib
prepend-path ROOT_INCLUDE_PATH \$PHLEX_ROOT/include
EoF
alibuild-generate-module --bin --lib > "$MODULEFILE"
cat >> "$MODULEFILE" <<EoF
# Our environment
set PHLEX_ROOT \$::env(BASEDIR)/$PKGNAME/\$version
setenv PHLEX_ROOT \$PHLEX_ROOT
setenv PHLEX_PLUGIN_PATH \$PHLEX_ROOT/lib
prepend-path ROOT_INCLUDE_PATH \$PHLEX_ROOT/include
EoF
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@phlex.sh` around lines 44 - 50, The Tcl module file sets a local variable
PHLEX_ROOT via "set PHLEX_ROOT ...", but never exports it to the environment;
add an export using "setenv PHLEX_ROOT ..." immediately after the "set
PHLEX_ROOT" declaration so PHLEX_ROOT is available to child processes and
consistent with the existing "setenv PHLEX_PLUGIN_PATH" usage; update the block
that writes the modulefile (the here-doc that defines PHLEX_ROOT and
PHLEX_PLUGIN_PATH) to include the setenv for PHLEX_ROOT.

7 changes: 2 additions & 5 deletions root.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ requires:
- libxml2
- OpenSSL
- XRootD
- pythia
- TBB
build_requires:
- CMake
Expand Down Expand Up @@ -46,7 +45,7 @@ prefer_system_check: |
echo "ROOT version $VERSION insufficient ($REQUESTED_VERSION requested)"
exit 1
fi
FEATURES="builtin_pcre mathmore xml ssl opengl http gdml pythia8 roofit soversion vdt xrootd"
FEATURES="builtin_pcre mathmore xml ssl opengl http gdml roofit soversion vdt xrootd"
for FEATURE in $FEATURES; do
root-config --has-$FEATURE | grep -q yes || { echo "$FEATURE missing"; exit 1; }
done
Expand Down Expand Up @@ -81,8 +80,6 @@ ${XROOTD_ROOT:+-DXROOTD_ROOT_DIR=$XROOTD_ROOT} \
-DCMAKE_LINKER=$COMPILER_LD \
${GCC_TOOLCHAIN_VERSION:+-DCMAKE_EXE_LINKER_FLAGS="-L$GCC_TOOLCHAIN_ROOT/lib64"} \
${GSL_ROOT:+-DGSL_DIR=$GSL_ROOT} \
${PYTHIA_ROOT:+-DPYTHIA8_DIR=$PYTHIA_ROOT} \
${PYTHIA_ROOT:+-Dpythia8=ON} \
-Dmathmore=ON \
-Dsoversion=ON \
-Dshadowpw=OFF \
Expand All @@ -92,7 +89,7 @@ ${PYTHIA_ROOT:+-Dpythia8=ON} \
${PYTHON_ROOT:+-DPYTHON_EXECUTABLE=$PYTHONHOME/bin/python3} \
${PYTHON_ROOT:+-DPython3_ROOT_DIR=$PYTHON_ROOT} \
-DCMAKE_PREFIX_PATH="$FREETYPE_ROOT;$GSL_ROOT;$PYTHON_ROOT"
FEATURES="builtin_pcre xml ssl opengl http gdml mathmore ${PYTHIA_ROOT:+pythia8}
FEATURES="builtin_pcre xml ssl opengl http gdml mathmore
roofit soversion vdt ${XROOTD_ROOT:+xrootd}"
NO_FEATURES="${FREETYPE_ROOT:+builtin_freetype}"

Expand Down
37 changes: 37 additions & 0 deletions spdlog.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
package: spdlog
version: "%(tag_basename)s"
tag: v1.15.2
source: https://github.com/gabime/spdlog
requires:
- "GCC-Toolchain:(?!osx)"
- fmt
build_requires:
- CMake
- alibuild-recipe-tools
prepend_path:
ROOT_INCLUDE_PATH: "$SPDLOG_ROOT/include"
---
#!/bin/bash -e

cmake "$SOURCEDIR" \
-DCMAKE_INSTALL_PREFIX="$INSTALLROOT" \
-DCMAKE_BUILD_TYPE="$CMAKE_BUILD_TYPE" \
-DCMAKE_PREFIX_PATH="$FMT_ROOT" \
-DSPDLOG_FMT_EXTERNAL=ON \
-DSPDLOG_BUILD_SHARED=ON \
-DSPDLOG_BUILD_EXAMPLE=OFF \
-DSPDLOG_BUILD_TESTS=OFF

cmake --build . -- ${JOBS:+-j$JOBS} install

MODULEDIR="$INSTALLROOT/etc/modulefiles"
MODULEFILE="$MODULEDIR/$PKGNAME"
mkdir -p "$MODULEDIR"
alibuild-generate-module --lib > "$MODULEFILE"
cat >> "$MODULEFILE" <<EoF
# Our environment
set SPDLOG_ROOT \$::env(BASEDIR)/$PKGNAME/\$version
setenv SPDLOG_ROOT \$SPDLOG_ROOT
prepend-path LD_LIBRARY_PATH \$SPDLOG_ROOT/lib
prepend-path ROOT_INCLUDE_PATH \$SPDLOG_ROOT/include
EoF
27 changes: 8 additions & 19 deletions sqlite.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package: sqlite
source: https://github.com/alisw/sqlite
version: "%(tag_basename)s%(defaults_upper)s"
tag: "v3.15.0"
tag: "version-3.49.1"
source: https://github.com/sqlite/sqlite
prefer_system: (?!slc5)
prefer_system_check: |
printf '#include <sqlite3.h>\nint main(){}\n' | cc -xc - -lsqlite3 -o /dev/null;
if [ $? -ne 0 ]; then printf "SQLite not found.\n * On RHEL-compatible systems you probably need: sqlite sqlite-devel\n * On Ubuntu-compatible systems you probably need: libsqlite3-0 libsqlite3-dev\n"; exit 1; fi
printf '#include <sqlite3.h>\nint main(){}\n' | cc -xc - -lsqlite3 -o /dev/null
build_requires:
- curl
- "GCC-Toolchain:(?!osx)"
- autotools
- alibuild-recipe-tools
---
#!/bin/bash -ex
rsync -av $SOURCEDIR/ ./
Expand All @@ -23,18 +23,7 @@ rm -rf $INSTALLROOT/share
MODULEDIR="$INSTALLROOT/etc/modulefiles"
MODULEFILE="$MODULEDIR/$PKGNAME"
mkdir -p "$MODULEDIR"
cat > "$MODULEFILE" <<EoF
#%Module1.0
proc ModulesHelp { } {
global version
puts stderr "ALICE Modulefile for $PKGNAME $PKGVERSION-@@PKGREVISION@$PKGHASH@@"
}
set version $PKGVERSION-@@PKGREVISION@$PKGHASH@@
module-whatis "ALICE Modulefile for $PKGNAME $PKGVERSION-@@PKGREVISION@$PKGHASH@@"
# Dependencies
module load BASE/1.0
# Our environment
setenv SQLITE_ROOT \$::env(BASEDIR)/$PKGNAME/\$version
prepend-path PATH $::env(SQLITE_ROOT)/bin
prepend-path LD_LIBRARY_PATH $::env(SQLITE_ROOT)/lib
alibuild-generate-module --bin --lib > "$MODULEFILE"
cat >> "$MODULEFILE" <<EoF
setenv SQLITE_ROOT \$PKG_ROOT
EoF
5 changes: 1 addition & 4 deletions xercesc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,10 @@ env:
XERCESC_INST_DIR: "$XERCESC_ROOT"
XERCESCINST: "$XERCESC_ROOT"
XERCESCROOT: "$XERCESC_ROOT"
prefer_system: .*
prefer_system_check: |
#!/bin/bash -e
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.so > /dev/null
Comment on lines +11 to 15

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Handle the macOS library name in the system probe.

With prefer_system: .* on Line 10, Lines 13-14 only accept libxerces-c.so. On osx*, that library is libxerces-c.dylib, so this probe will always fail and force a source build even when a usable system XercesC is present.

Possible fix
 prefer_system_check: |
   #!/bin/bash -e
-  ls $XERCESC_ROOT/include/xercesc/ > /dev/null && \
-  ls $XERCESC_ROOT/lib/libxerces-c.so > /dev/null
+  test -d "$XERCESC_ROOT/include/xercesc" && \
+  case $ARCHITECTURE in
+    osx*) test -f "$XERCESC_ROOT/lib/libxerces-c.dylib" ;;
+    *)    test -f "$XERCESC_ROOT/lib/libxerces-c.so" ;;
+  esac
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@xercesc.sh` around lines 10 - 14, The system probe in prefer_system_check
only checks for libxerces-c.so and thus fails on macOS; update the check in the
prefer_system_check script (the block using XERCESC_ROOT) to test for the
include dir and then check for either libxerces-c.so or libxerces-c.dylib (or
both) so the probe succeeds on Linux and macOS; use file-existence checks
against $XERCESC_ROOT/lib/libxerces-c.so and $XERCESC_ROOT/lib/libxerces-c.dylib
(or branch on OSTYPE) while keeping the include check for
$XERCESC_ROOT/include/xercesc/.

---
#!/bin/sh
Expand Down
Loading