actions.py 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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 pisitools
  8. from pisi.actionsapi import cmaketools
  9. from pisi.actionsapi import shelltools
  10. #WorkDir="x265_%s" % get.srcVERSION()
  11. def setup():
  12. shelltools.system("mkdir build8 build10 build12")
  13. #shelltools.cd("source")
  14. #cmaketools.configure("-DCMAKE_INSTALL_PREFIX=/usr \
  15. #-DENABLE_STATIC=OFF")
  16. def build():
  17. #shelltools.cd("source")
  18. shelltools.cd("build12")
  19. shelltools.system("cmake ../source -G 'Unix Makefiles' \
  20. -DCMAKE_INSTALL_PREFIX='/usr'\
  21. -DHIGH_BIT_DEPTH='TRUE' \
  22. -DMAIN12='TRUE' \
  23. -DEXPORT_C_API='FALSE' \
  24. -DENABLE_CLI='FALSE'\
  25. -DENABLE_SHARED='FALSE' \
  26. ")
  27. cmaketools.make()
  28. shelltools.cd("../build10")
  29. shelltools.system("cmake ../source -G 'Unix Makefiles' \
  30. -DCMAKE_INSTALL_PREFIX='/usr'\
  31. -DHIGH_BIT_DEPTH='TRUE' \
  32. -DEXPORT_C_API='FALSE' \
  33. -DENABLE_CLI='FALSE'\
  34. -DENABLE_SHARED='FALSE' \
  35. ")
  36. cmaketools.make()
  37. shelltools.cd("../build8")
  38. shelltools.system("ln -s ../build10/libx265.a libx265_main10.a")
  39. shelltools.system("ln -s ../build12/libx265.a libx265_main12.a")
  40. shelltools.system("cmake ../source -G 'Unix Makefiles' \
  41. -DCMAKE_INSTALL_PREFIX='/usr' \
  42. -DENABLE_SHARED='TRUE' \
  43. -DENABLE_HDR10_PLUS='TRUE' \
  44. -DEXTRA_LIB='x265_main10.a;x265_main12.a' \
  45. -DEXTRA_LINK_FLAGS='-L.' \
  46. -DLINKED_10BIT='TRUE' \
  47. -DLINKED_12BIT='TRUE' \
  48. ")
  49. cmaketools.make()
  50. def install():
  51. shelltools.cd("build8")
  52. cmaketools.rawInstall("DESTDIR=%s" % get.installDIR())
  53. pisitools.remove("/usr/lib/libx265.a")