diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..e045998 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,10 @@ +# See https://pre-commit.com for more information +# See https://pre-commit.com/hooks.html for more hooks +repos: +- repo: https://github.com/pre-commit/pre-commit-hooks + rev: v5.0.0 + hooks: + - id: trailing-whitespace + - id: end-of-file-fixer +ci: + autofix_prs: true diff --git a/README.md b/README.md index a317dff..b3e1e78 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # shipdist +[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/ShipSoft/shipdist/main.svg)](https://results.pre-commit.ci/latest/github/ShipSoft/shipdist/main) + Recipes to build `FairShip` and it's dependencies using `aliBuild` ## General information diff --git a/asiofi.sh b/asiofi.sh index b771e38..fdb6015 100644 --- a/asiofi.sh +++ b/asiofi.sh @@ -53,5 +53,3 @@ prepend-path LD_LIBRARY_PATH \$ASIOFI_ROOT/lib EoF MODULEDIR="$INSTALLROOT/etc/modulefiles" mkdir -p $MODULEDIR && rsync -a --delete etc/modulefiles/ $MODULEDIR - - diff --git a/bz2.sh b/bz2.sh index b6cd985..f001a95 100644 --- a/bz2.sh +++ b/bz2.sh @@ -8,4 +8,3 @@ system_requirement: ".*" system_requirement_check: | printf "#include \n" | gcc -xc++ - -c -o /dev/null --- - diff --git a/clhep.sh b/clhep.sh index a273f85..3d1b3ff 100644 --- a/clhep.sh +++ b/clhep.sh @@ -6,6 +6,6 @@ tag: CLHEP_2_2_0_8 #!/bin/sh cmake $SOURCEDIR \ -DCMAKE_INSTALL_PREFIX:PATH="$INSTALLROOT" - + make ${JOBS+-j $JOBS} make install diff --git a/configuration.sh b/configuration.sh index 1be4f9f..51e3707 100644 --- a/configuration.sh +++ b/configuration.sh @@ -40,7 +40,7 @@ proc ModulesHelp { } { set version $PKGVERSION-@@PKGREVISION@$PKGHASH@@ module-whatis "ALICE Modulefile for $PKGNAME $PKGVERSION-@@PKGREVISION@$PKGHASH@@" # Dependencies -module load BASE/1.0 ${BOOST_VERSION:+boost/$BOOST_VERSION-$BOOST_REVISION} ${GCC_TOOLCHAIN_ROOT:+GCC-Toolchain/$GCC_TOOLCHAIN_VERSION-$GCC_TOOLCHAIN_REVISION} protobuf/$PROTOBUF_VERSION-$PROTOBUF_REVISION grpc/$GRPC_VERSION-$GRPC_REVISION +module load BASE/1.0 ${BOOST_VERSION:+boost/$BOOST_VERSION-$BOOST_REVISION} ${GCC_TOOLCHAIN_ROOT:+GCC-Toolchain/$GCC_TOOLCHAIN_VERSION-$GCC_TOOLCHAIN_REVISION} protobuf/$PROTOBUF_VERSION-$PROTOBUF_REVISION grpc/$GRPC_VERSION-$GRPC_REVISION # Our environment setenv Configuration_ROOT \$::env(BASEDIR)/$PKGNAME/\$version prepend-path PATH \$::env(Configuration_ROOT)/bin diff --git a/defaults-release.sh b/defaults-release.sh index ab53bf6..77c8860 100644 --- a/defaults-release.sh +++ b/defaults-release.sh @@ -136,7 +136,7 @@ overrides: true log4cpp: tag: 1b9f8f7c031d6947c7468d54bc1da4b2f414558d - prefer_system_check: | + prefer_system_check: | ls $LOG4CPP_ROOT/include/ > /dev/null && \ ls $LOG4CPP_ROOT/lib/ > /dev/null && \ true @@ -253,7 +253,7 @@ overrides: ls $LHAPDF5_ROOT/lib/libLHAPDF.la > /dev/null && \ ls $LHAPDF5_ROOT/lib/libLHAPDF.a > /dev/null && \ ls $LHAPDF5_ROOT/lib64/python2.7/site-packages/lhapdf.py > /dev/null && \ - ls $LHAPDF5_ROOT/share/lhapdf > /dev/null + ls $LHAPDF5_ROOT/share/lhapdf > /dev/null XercesC: prefer_system_check: | ls $XERCESC_ROOT/ > /dev/null && \ diff --git a/evtgen.sh b/evtgen.sh index 0927e3f..56c51f4 100644 --- a/evtgen.sh +++ b/evtgen.sh @@ -16,9 +16,9 @@ export HEPMCLOCATION="$HEPMC_ROOT" rsync -a $SOURCEDIR/* . -./configure --hepmcdir=$HEPMC_ROOT --pythiadir=$PYTHIA_ROOT --tauoladir=$TAUOLAPP_ROOT --photosdir=$PHOTOSPP_ROOT --prefix=$INSTALLROOT CFLAGS="$CFLAGS" CXXFLAGS="$CXXFLAGS" +./configure --hepmcdir=$HEPMC_ROOT --pythiadir=$PYTHIA_ROOT --tauoladir=$TAUOLAPP_ROOT --photosdir=$PHOTOSPP_ROOT --prefix=$INSTALLROOT CFLAGS="$CFLAGS" CXXFLAGS="$CXXFLAGS" -make +make make install # Modulefile diff --git a/fairlogger.sh b/fairlogger.sh index 4e88261..77f739e 100644 --- a/fairlogger.sh +++ b/fairlogger.sh @@ -58,4 +58,3 @@ prepend-path ROOT_INCLUDE_PATH \$FAIRLOGGER_ROOT/include EoF MODULEDIR="$INSTALLROOT/etc/modulefiles" mkdir -p $MODULEDIR && rsync -a --delete etc/modulefiles/ $MODULEDIR - diff --git a/fmt.sh b/fmt.sh index dd02d86..2b32dfa 100644 --- a/fmt.sh +++ b/fmt.sh @@ -33,4 +33,3 @@ module load BASE/1.0 ${GCC_TOOLCHAIN_REVISION:+GCC-Toolchain/$GCC_TOOLCHAIN_VERS set FMT_ROOT \$::env(BASEDIR)/$PKGNAME/\$version prepend-path ROOT_INCLUDE_PATH \$FMT_ROOT/include EoF - diff --git a/g4py.sh b/g4py.sh index 3ddb86a..9653f48 100644 --- a/g4py.sh +++ b/g4py.sh @@ -25,7 +25,7 @@ cmake $INSTALLROOT \ ${BOOST_VERSION:+-DBoost_NO_SYSTEM_PATH=TRUE}\ -DXERCESC_ROOT_DIR=${XERCESC_ROOT} \ -DCMAKE_VERBOSE_MAKEFILE=TRUE \ - -DBoost_NO_BOOST_CMAKE=TRUE + -DBoost_NO_BOOST_CMAKE=TRUE make ${JOBS:+-j $JOBS} make install diff --git a/genie.sh b/genie.sh index 0f5c935..dd5c6a8 100644 --- a/genie.sh +++ b/genie.sh @@ -42,7 +42,7 @@ $BUILDDIR/configure --prefix=$INSTALLROOT \ --with-log4cpp-inc=$LOG4CPP_ROOT/include/ \ --with-log4cpp-lib=$LOG4CPP_ROOT/lib/ \ --with-apfel-inc=$APFEL_ROOT/include/ \ - --with-apfel-lib=$APFEL_ROOT/lib/ + --with-apfel-lib=$APFEL_ROOT/lib/ make CXXFLAGS="-Wall $CXXFLAGS" CFLAGS="-Wall $CFLAGS" @@ -86,5 +86,5 @@ prepend-path LD_LIBRARY_PATH \$::env(GENIE_ROOT)/genie/lib prepend-path ROOT_INCLUDE_PATH \$::env(GENIE_ROOT)/genie/inc prepend-path ROOT_INCLUDE_PATH \$::env(GENIE_ROOT)/genie/src $([[ ${ARCHITECTURE:0:3} == osx ]] && echo "prepend-path DYLD_LIBRARY_PATH \$::env(GENIE_ROOT)/lib") -append-path PATH \$::env(GENIE_ROOT)/genie/bin +append-path PATH \$::env(GENIE_ROOT)/genie/bin EoF diff --git a/go.sh b/go.sh index 22434e8..1bb2de7 100644 --- a/go.sh +++ b/go.sh @@ -52,4 +52,3 @@ module load BASE/1.0 setenv GOROOT \$::env(BASEDIR)/$PKGNAME/\$version prepend-path PATH \$::env(GOROOT)/bin EoF - diff --git a/gsoap.sh b/gsoap.sh index 36ef43b..7baa191 100644 --- a/gsoap.sh +++ b/gsoap.sh @@ -13,7 +13,7 @@ rsync -a --exclude='**/.git' --delete --delete-excluded \ $SOURCEDIR/ ./ # On mac we use openssl coming from homebrew. -case $ARCHITECTURE in +case $ARCHITECTURE in osx*) [ ! "X$OPENSSL_ROOT" = X ] || OPENSSL_ROOT=`brew --prefix openssl` ;; diff --git a/lcov.sh b/lcov.sh index 7ccde84..8123a7b 100644 --- a/lcov.sh +++ b/lcov.sh @@ -26,4 +26,3 @@ setenv LCOV_ROOT \$::env(BASEDIR)/$PKGNAME/\$version prepend-path LD_LIBRARY_PATH \$::env(LCOV_ROOT)/lib $([[ ${ARCHITECTURE:0:3} == osx ]] && echo "prepend-path DYLD_LIBRARY_PATH \$::env(LCOV_ROOT)/lib") EoF - diff --git a/libperl.sh b/libperl.sh index aa37920..f49f580 100644 --- a/libperl.sh +++ b/libperl.sh @@ -5,4 +5,3 @@ system_requirement: ".*" system_requirement_check: | printf "#include \nint main(){}\n" | cc -xc -lperl -L`perl -MConfig -e 'print $Config{archlib}'`/CORE -I`perl -MConfig -e 'print $Config{archlib}'`/CORE - -o /dev/null && perl -MExtUtils::Embed -e 1 --- - diff --git a/make.sh b/make.sh index 9746bd6..3c6002c 100644 --- a/make.sh +++ b/make.sh @@ -8,4 +8,3 @@ system_requirement: ".*" system_requirement_check: | type make --- - diff --git a/messagepack.sh b/messagepack.sh index 4c87928..8da10ee 100644 --- a/messagepack.sh +++ b/messagepack.sh @@ -12,7 +12,7 @@ cmake $SOURCEDIR -DCMAKE_INSTALL_PREFIX:PATH="${INSTALLROOT}" \ -DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE \ -DMSGPACK_CXX11=ON \ -DGTEST_DIR=$GOOGLETEST_ROOT \ - -DGTEST_ROOT=$GOOGLETEST_ROOT + -DGTEST_ROOT=$GOOGLETEST_ROOT make ${JOBS+-j $JOBS} make test diff --git a/monitoring.sh b/monitoring.sh index 81a2026..8445a5b 100644 --- a/monitoring.sh +++ b/monitoring.sh @@ -41,7 +41,7 @@ proc ModulesHelp { } { set version $PKGVERSION-@@PKGREVISION@$PKGHASH@@ module-whatis "ALICE Modulefile for $PKGNAME $PKGVERSION-@@PKGREVISION@$PKGHASH@@" # Dependencies -module load BASE/1.0 ${BOOST_VERSION:+boost/$BOOST_VERSION-$BOOST_REVISION} ${APMON_CPP_VERSION:+ApMon-CPP/$APMON_CPP_VERSION-$APMON_CPP_REVISION} ${GCC_TOOLCHAIN_ROOT:+GCC-Toolchain/$GCC_TOOLCHAIN_VERSION-$GCC_TOOLCHAIN_REVISION} protobuf/$PROTOBUF_VERSION-$PROTOBUF_REVISION grpc/$GRPC_VERSION-$GRPC_REVISION Configuration/$CONFIGURATION_VERSION-$CONFIGURATION_REVISION +module load BASE/1.0 ${BOOST_VERSION:+boost/$BOOST_VERSION-$BOOST_REVISION} ${APMON_CPP_VERSION:+ApMon-CPP/$APMON_CPP_VERSION-$APMON_CPP_REVISION} ${GCC_TOOLCHAIN_ROOT:+GCC-Toolchain/$GCC_TOOLCHAIN_VERSION-$GCC_TOOLCHAIN_REVISION} protobuf/$PROTOBUF_VERSION-$PROTOBUF_REVISION grpc/$GRPC_VERSION-$GRPC_REVISION Configuration/$CONFIGURATION_VERSION-$CONFIGURATION_REVISION # Our environment setenv Monitoring_ROOT \$::env(BASEDIR)/$PKGNAME/\$version diff --git a/opengl.sh b/opengl.sh index 968b3f2..86bb9b4 100644 --- a/opengl.sh +++ b/opengl.sh @@ -13,4 +13,3 @@ system_requirement_check: | printf "#include \n" | cc -xc - -c -o /dev/null fi --- - diff --git a/openssl.sh b/openssl.sh index b1ed82d..ffc29e9 100644 --- a/openssl.sh +++ b/openssl.sh @@ -26,10 +26,10 @@ build_requires: rsync -av --delete --exclude="**/.git" $SOURCEDIR/ . case ${PKG_VERSION} in - v1.1*) + v1.1*) OPTS="" OPENSSLDIRPREFIX="" ;; - *) + *) OPTS="no-krb5" OPENSSLDIRPREFIX="etc/ssl" ;; diff --git a/perl-modules.sh b/perl-modules.sh index bf08ff1..cd51f5e 100644 --- a/perl-modules.sh +++ b/perl-modules.sh @@ -109,4 +109,3 @@ for x in $PACKAGES; do echo "Getting $x from CPAN" cpan -j MyConfig.pm $x done - diff --git a/pythia6.sh b/pythia6.sh index 345d261..1c8c5a3 100644 --- a/pythia6.sh +++ b/pythia6.sh @@ -40,4 +40,3 @@ prepend-path LD_LIBRARY_PATH \$::env(PYTHIA6_ROOT)/lib prepend-path AGILE_GEN_PATH \$::env(PYTHIA6_ROOT) $([[ ${ARCHITECTURE:0:3} == osx ]] && echo "prepend-path DYLD_LIBRARY_PATH \$::env(PYTHIA6_ROOT)/lib") EoF - diff --git a/rapidjson.sh b/rapidjson.sh index 31f272e..590f3b5 100644 --- a/rapidjson.sh +++ b/rapidjson.sh @@ -8,7 +8,7 @@ tag: v1.1.0 #!/bin/sh cmake $SOURCEDIR \ - -DCMAKE_INSTALL_PREFIX=$INSTALLROOT + -DCMAKE_INSTALL_PREFIX=$INSTALLROOT make ${JOBS:+-j$JOBS} install diff --git a/sas.sh b/sas.sh index 8587acf..275404e 100644 --- a/sas.sh +++ b/sas.sh @@ -9,6 +9,6 @@ requires: cmake $SOURCEDIR \ -DCMAKE_INSTALL_PREFIX:PATH="$INSTALLROOT" \ -DLLVM_DEV_DIR=$CLANG_ROOT - + make ${JOBS+-j $JOBS} make install diff --git a/tauolapp.sh b/tauolapp.sh index 714cd91..5d7d171 100644 --- a/tauolapp.sh +++ b/tauolapp.sh @@ -16,7 +16,7 @@ rsync -a $SOURCEDIR/* . ./configure --with-hepmc=$HEPMC_ROOT --with-lhapdf=$LHAPDF_ROOT --with-pythia8=$PYTHIA_ROOT --prefix=$INSTALLROOT CFLAGS="$CFLAGS" CXXFLAGS="$CFLAGS" -make +make make install # Modulefile diff --git a/termcap.sh b/termcap.sh index fbb19a1..0380a24 100644 --- a/termcap.sh +++ b/termcap.sh @@ -5,4 +5,3 @@ system_requirement: ".*" system_requirement_check: | printf "#include \n" | gcc -xc++ - -c -o /dev/null --- - diff --git a/xdevel.sh b/xdevel.sh index e99d803..b439097 100644 --- a/xdevel.sh +++ b/xdevel.sh @@ -8,4 +8,3 @@ system_requirement: ".*" system_requirement_check: | printf "#include \n#include \n#include \n#include \n" | cc -xc - -I/opt/X11/include $(freetype-config --cflags 2> /dev/null || pkg-config freetype2 --cflags 2> /dev/null) -c -o /dev/null --- - diff --git a/xercesc.sh b/xercesc.sh index 9646abf..c4b98d0 100644 --- a/xercesc.sh +++ b/xercesc.sh @@ -11,7 +11,7 @@ env: #!/bin/sh cd $SOURCEDIR autoreconf -i -cd - +cd - echo "command $SOURCEDIR configure --prefix $INSTALLROOT CFLAGS $CFLAGS CXXFLAGS=$CFLAGS" $SOURCEDIR/configure --prefix=$INSTALLROOT CFLAGS="$CFLAGS" CXXFLAGS="$CFLAGS" make ${JOBS+-j $JOBS} diff --git a/yacc-like.sh b/yacc-like.sh index 54be0d6..965fd81 100644 --- a/yacc-like.sh +++ b/yacc-like.sh @@ -7,5 +7,3 @@ system_requirement: ".*" system_requirement_check: | which bison && which flex --- - - diff --git a/yaml-cpp.sh b/yaml-cpp.sh index ae880d8..ea9fc42 100644 --- a/yaml-cpp.sh +++ b/yaml-cpp.sh @@ -46,4 +46,3 @@ module load BASE/1.0 ${BOOST_REVISION:+boost/$BOOST_VERSION-$BOOST_REVISION} set YAMLCPP \$::env(BASEDIR)/$PKGNAME/\$version prepend-path LD_LIBRARY_PATH \$YAMLCPP/lib EoF -