actions.py 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. #!/usr/bin/python
  2. # -*- coding: utf-8 -*-
  3. #
  4. # Licensed under the GNU General Public License, version 3.
  5. # See the file http://www.gnu.org/licenses/gpl.txt
  6. from pisi.actionsapi import get
  7. from pisi.actionsapi import autotools
  8. from pisi.actionsapi import pisitools
  9. from pisi.actionsapi import shelltools
  10. def setup():
  11. # Disable test causing sandbox violations
  12. #pisitools.dosed("test/util/Makefile.in", "^(check_PROGRAMS.*?)\sopal_path_nfs\$\(EXEEXT\)", "\\1")
  13. # suppress compiler warnings
  14. pisitools.cflags.add("-Wno-unused-result -Wno-cpp -Wno-deprecated-declarations -Wno-stringop-overflow -Wno-discarded-qualifiers -Wno-alloc-size-larger-than")
  15. shelltools.export("LDFLAGS","%s -Wl,-z,noexecstack" % get.LDFLAGS())
  16. shelltools.export("FC", "/usr/bin/gfortran")
  17. autotools.configure("--with-valgrind \
  18. --without-slurm \
  19. --enable-mpi-cxx \
  20. --with-hwloc=/usr \
  21. --enable-memchecker \
  22. --with-libltdl=/usr \
  23. --enable-builtin-atomics \
  24. --enable-mpi-fortran=all \
  25. --sysconfdir=/etc/openmpi \
  26. --libdir=/usr/lib/openmpi \
  27. --enable-pretty-print-stacktrace")
  28. # dont touch rpath, it brokes tests
  29. #pisitools.dosed("libtool", "^(hardcode_libdir_flag_spec=).*", '\\1""')
  30. #pisitools.dosed("libtool", "^(runpath_var=)LD_RUN_PATH", "\\1DIE_RPATH_DIE")
  31. # fix unused direct dependency analysis
  32. pisitools.dosed("libtool"," -shared ", " -Wl,--as-needed -shared ")
  33. def build():
  34. autotools.make()
  35. def check():
  36. autotools.make("check")
  37. def install():
  38. autotools.rawInstall("DESTDIR=%s" % get.installDIR())
  39. pisitools.dodoc("LICENSE","README*")