-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathherwig.sh
More file actions
53 lines (49 loc) · 1.73 KB
/
Copy pathherwig.sh
File metadata and controls
53 lines (49 loc) · 1.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
package: Herwig
version: "%(tag_basename)s"
tag: "v7.3.0"
source: https://github.com/alisw/herwig
requires:
- GMP
- GSL
- ThePEG
- lhapdf
- lhapdf-pdfsets
- Openloops
- madgraph
build_requires:
- "autotools:(slc6|slc7)"
- alibuild-recipe-tools
---
#!/bin/bash -e
case $ARCHITECTURE in
osx*)
# If we preferred system tools, we need to make sure we can pick them up.
[[ ! $GSL_ROOT ]] && GSL_ROOT=`brew --prefix gsl`
;;
esac
rsync -a --delete --exclude '**/.git' --delete-excluded $SOURCEDIR/ ./
export LHAPDF_DATA_PATH="$LHAPDF_ROOT/share/LHAPDF:$LHAPDF_PDFSETS_ROOT/share/LHAPDF"
[[ -e .missing_timestamps ]] && ./missing-timestamps.sh --apply || autoreconf -ivf
[[ $ALIEN_RUNTIME_VERSION ]] && LDZLIB="-L$ALIEN_RUNTIME_ROOT/lib" || { [[ $ZLIB_VERSION ]] && LDZLIB="-L$ZLIB_ROOT/lib" || LDZLIB= ; }
export LDFLAGS="-L$LHAPDF_ROOT/lib -L$CGAL_ROOT/lib -L$GMP_ROOT/lib $LDZLIB -L${GSL_ROOT}/lib"
./configure \
--prefix="$INSTALLROOT" \
--with-thepeg="${THEPEG_ROOT}" \
--with-openloops=${OPENLOOPS_ROOT} \
--with-madgraph=${MADGRAPH_ROOT} \
${GSL_ROOT:+--with-gsl="${GSL_ROOT}"} FCFLAGS="$FCFLAGS -fno-range-check"
make ${JOBS:+-j $JOBS}
make install
#ModuleFile
mkdir -p etc/modulefiles
alibuild-generate-module > etc/modulefiles/$PKGNAME
cat >> etc/modulefiles/$PKGNAME <<EoF
# Our environment
set HERWIG_ROOT \$::env(BASEDIR)/$PKGNAME/\$version
setenv HERWIG_ROOT \$HERWIG_ROOT
setenv HERWIG_INSTALL_PATH \$::env(HERWIG_ROOT)/lib/Herwig
prepend-path PATH \$HERWIG_ROOT/bin
prepend-path LD_LIBRARY_PATH \$HERWIG_ROOT/lib/Herwig
prepend-path ROOT_INCLUDE_PATH \$HERWIG_ROOT/include
EoF
mkdir -p $INSTALLROOT/etc/modulefiles && rsync -a --delete etc/modulefiles/ $INSTALLROOT/etc/modulefiles