actions.py 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. # -*- coding: utf-8 -*-
  2. #
  3. # Licensed under the GNU General Public License, version 3.
  4. # See the file http://www.gnu.org/licenses/gpl.txt
  5. from pisi.actionsapi import shelltools
  6. from pisi.actionsapi import autotools
  7. from pisi.actionsapi import pisitools
  8. from pisi.actionsapi import get
  9. def setup():
  10. shelltools.cd("%s" % get.workDIR())
  11. shelltools.move("boost_*", "boost-%s" % get.srcVERSION())
  12. shelltools.cd("boost-%s" % get.srcVERSION())
  13. shelltools.system("./bootstrap.sh --with-toolset=gcc \
  14. --with-icu \
  15. --with-python=python3 \
  16. --prefix=%s/usr" % get.installDIR())
  17. shelltools.system('echo "using mpi ;" >> project-config.jam')
  18. shelltools.cd("tools/build")
  19. shelltools.system("./bootstrap.sh --with-toolset --prefix=%s/usr" % get.installDIR())
  20. shelltools.cd("..")
  21. def build():
  22. shelltools.system("./b2 stage \
  23. variant=release \
  24. debug-symbols=off \
  25. threading=multi \
  26. runtime-link=shared \
  27. link=shared,static \
  28. toolset=gcc \
  29. python=3.11 \
  30. cflags='-fno-strict-aliasing -Wno-unused-local-typedefs -Wno-maybe-uninitialized -Wno-deprecated-declarations' \
  31. cxxflags='-fno-strict-aliasing -Wno-unused-local-typedefs -Wno-maybe-uninitialized -Wno-deprecated-declarations' \
  32. --layout=system \
  33. --with-mpi")
  34. def install():
  35. pisitools.dobin("b2")
  36. # pisitools.dobin("tools/build/src/engine/bjam")
  37. pisitools.dosym("/usr/bin/b2", "/usr/bin/bjam")
  38. shelltools.copytree("tools/boostbook/xsl", "%s/usr/share/boostbook/xsl" % get.installDIR())
  39. shelltools.copytree("tools/boostbook/dtd", "%s/usr/share/boostbook" % get.installDIR())
  40. shelltools.system("./b2 install threading=multi link=shared")
  41. shelltools.cd("tools/build")
  42. shelltools.system("./b2 install")
  43. shelltools.cd("..")
  44. # some packages need this library as : libboost_python3.so
  45. pisitools.dosym("/usr/lib/libboost_python311.so.1.83.0", "/usr/lib/libboost_python3.so")
  46. shelltools.touch("__init__.py")
  47. pisitools.insinto("/usr/lib/python3.11/site-packages/openmpi/boost", "__init__.py")
  48. pisitools.domove("/usr/lib/boost-python3.11/mpi.so", "/usr/lib/python3.11/site-packages/boost/")
  49. pisitools.removeDir("/usr/lib/boost-python3.11")