Skip to content
Merged
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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Until May 2022 (inclusive) no changelog was kept. We might try to reconstruct it

- ROOTEGPythia6 recipe (main branch) for TPythia6 support with upstream ROOT
- FairShip now depends on ROOTEGPythia6 for TPythia6 functionality
- Add ninja recipe

### Fixed

Expand All @@ -26,6 +27,7 @@ Until May 2022 (inclusive) no changelog was kept. We might try to reconstruct it
* VGM: Update to 5-3-1
* VMC: Update to 2-1
* GSL: Update to 2.8 for ROOT compatibility
* libpng: update to 1.6.47

### Removed

Expand Down
40 changes: 14 additions & 26 deletions libpng.sh
Original file line number Diff line number Diff line change
@@ -1,43 +1,31 @@
package: libpng
version: v1.6.18
version: v1.6.47
requires:
- zlib
- zlib
build_requires:
- CMake
source: https://git.code.sf.net/p/libpng/code
- CMake
- ninja
- alibuild-recipe-tools
source: https://github.com/pnggroup/libpng
prefer_system: (?!slc5)
prefer_system_check: |
printf "#include <png.h>\n" | gcc -xc++ - `libpng-config --cflags` -c -M 2>&1
printf "#include <png.h>\n" | c++ -xc++ - `libpng-config --cflags` -c -M 2>&1

Check notice on line 12 in libpng.sh

View workflow job for this annotation

GitHub Actions / alidistlint

Use $(...) notation instead of legacy backticks `...`. [SC2006]

Check warning on line 12 in libpng.sh

View workflow job for this annotation

GitHub Actions / alidistlint

Quote this to prevent word splitting. [SC2046]
if [ $? -ne 0 ]; then printf "libpng was not found.\n * On RHEL-compatible systems you probably need: libpng libpng-devel\n * On Ubuntu-compatible systems you probably need: libpng12-0 libpng12-dev"; exit 1; fi
---
#!/bin/bash -ex
rsync -a $SOURCEDIR/ .
cmake . \
cmake ${SOURCEDIR} \
-G Ninja \
-DCMAKE_INSTALL_PREFIX:PATH=$INSTALLROOT \
-DCMAKE_CXX_STANDARD=${CXXSTD} \
-DBUILD_SHARED_LIBS=YES \
${ZLIB_ROOT:+-DZLIB_ROOT:PATH=$ZLIB_ROOT} \
-DCMAKE_SKIP_RPATH=YES \
-DSKIP_INSTALL_FILES=1
make ${JOBS:+-j $JOBS}
make install
-DSKIP_INSTALL_FILES=1 \
-DCMAKE_INSTALL_LIBDIR=lib
cmake --build . -- ${JOBS:+-j$JOBS} install

# Modulefile
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 ${ZLIB_VERSION:+zlib/$ZLIB_VERSION-$ZLIB_REVISION}
# Our environment
setenv LIBPNG_ROOT \$::env(BASEDIR)/$PKGNAME/\$version
prepend-path PATH $::env(LIBPNG_ROOT)/bin
prepend-path LD_LIBRARY_PATH $::env(LIBPNG_ROOT)/lib
$([[ ${ARCHITECTURE:0:3} == osx ]] && echo "prepend-path DYLD_LIBRARY_PATH $::env(LIBPNG_ROOT)/lib")
EoF
alibuild-generate-module --bin --lib > $MODULEFILE
21 changes: 21 additions & 0 deletions ninja.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package: ninja
version: "fortran-%(short_hash)s"
tag: "v1.11.1.g95dee.kitware.jobserver-1"
source: https://github.com/Kitware/ninja
build_requires:
- "GCC-Toolchain:(?!osx)"
- "CMake"
- alibuild-recipe-tools
prefer_system: .*
prefer_system_check: |
type ninja
---
#!/bin/bash

Check notice on line 13 in ninja.sh

View workflow job for this annotation

GitHub Actions / alidistlint

Invalid script shebang. Use exactly "#!/bin/bash -e" to match aliBuild environment. You may see spurious errors until you fix the shebang. [ali:bad-shebang]
cmake -Bbuild-cmake "$SOURCEDIR"
cmake --build build-cmake ${JOBS:+-j$JOBS}

mkdir -p "$INSTALLROOT"/bin
cp build-cmake/ninja "$INSTALLROOT/bin"

mkdir -p "$INSTALLROOT/etc/modulefiles"
alibuild-generate-module --bin >"$INSTALLROOT/etc/modulefiles/$PKGNAME"