actions.py 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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 get
  6. from pisi.actionsapi import pisitools
  7. from pisi.actionsapi import autotools
  8. from pisi.actionsapi import shelltools
  9. def setup():
  10. shelltools.system("./bootstrap.sh --with-toolset=gcc --with-icu --with-python=/usr/bin/python2.7 --prefix=%s/usr" % get.installDIR())
  11. #hata vermemesi icin doysa isminin alt tire isaretinden ayıklanması boost-1.63.0 gibi düzeltilmesi gerekli
  12. shelltools.copytree("../boost-%s" % (get.srcVERSION().replace("_", "~")), "../boost-%s-36" % get.srcVERSION())
  13. shelltools.cd("../boost-%s-36" % get.srcVERSION())
  14. shelltools.system("sed -e '/using python/ s@;@: /usr/include/python${PYTHON_VERSION/3*/${PYTHON_VERSION}m} ;@' \
  15. -i bootstrap.sh")
  16. shelltools.system("./bootstrap.sh --with-toolset=gcc --with-icu --with-python=/usr/bin/python3.6 --prefix=%s/usr" % get.installDIR())
  17. shelltools.cd("..")
  18. def build():
  19. shelltools.system("./b2 \
  20. variant=release \
  21. debug-symbols=off \
  22. threading=multi \
  23. runtime-link=shared \
  24. link=shared,static \
  25. toolset=gcc \
  26. python=2.7 \
  27. cflags=-fno-strict-aliasing \
  28. --layout=system")
  29. shelltools.cd("../boost-%s-36" % get.srcVERSION())
  30. shelltools.system("./b2 \
  31. variant=release \
  32. debug-symbols=off \
  33. threading=multi \
  34. runtime-link=shared \
  35. link=shared,static \
  36. toolset=gcc \
  37. python=3.6 \
  38. cflags=-fno-strict-aliasing \
  39. --layout=system")
  40. shelltools.cd("..")
  41. def install():
  42. pisitools.dobin("b2")
  43. pisitools.dobin("bjam")
  44. shelltools.copytree("tools/boostbook/xsl", "%s/usr/share/boostbook/xsl" % get.installDIR())
  45. shelltools.copytree("tools/boostbook/dtd", "%s/usr/share/boostbook" % get.installDIR())
  46. shelltools.system("./b2 install threading=multi link=shared")
  47. shelltools.cd("../boost-%s-36" % get.srcVERSION())
  48. pisitools.dobin("b2")
  49. pisitools.dobin("bjam")
  50. shelltools.copytree("tools/boostbook/xsl", "%s/usr/share/boostbook/xsl" % get.installDIR())
  51. shelltools.copytree("tools/boostbook/dtd", "%s/usr/share/boostbook" % get.installDIR())
  52. shelltools.system("./b2 install threading=multi link=shared")