actions.py 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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 cmaketools
  8. from pisi.actionsapi import pisitools
  9. from pisi.actionsapi import shelltools
  10. paths = ["JavaScriptCore", "WebCore", "WebKit", "WebKit2"]
  11. docs = ["AUTHORS", "COPYING.LIB", \
  12. "LICENSE-LGPL-2", "LICENSE-LGPL-2.1", "LICENSE"]
  13. def setup():
  14. shelltools.system("mkdir build")
  15. shelltools.cd("build")
  16. cmaketools.configure("-DPORT=GTK \
  17. -DUSE_GTK4=ON \
  18. -DCMAKE_BUILD_TYPE=Release \
  19. -DCMAKE_SKIP_RPATH=ON \
  20. -DCMAKE_INSTALL_PREFIX=/usr \
  21. -DLIB_INSTALL_DIR=/usr/lib \
  22. -DLIBEXEC_INSTALL_DIR=/usr/lib/webkit2gtk-6.0 \
  23. -DENABLE_CREDENTIAL_STORAGE=ON \
  24. -DENABLE_GEOLOCATION=ON \
  25. -DENABLE_VIDEO=ON \
  26. -DENABLE_WEB_AUDIO=ON \
  27. -DENABLE_WEBGL=ON \
  28. -DUSE_LIBHYPHEN=OFF \
  29. -DUSE_SOUP2=OFF \
  30. -DUSE_WOFF2=OFF \
  31. -DUSE_SYSTEMD=OFF \
  32. -DUSE_LIBBACKTRACE=OFF \
  33. -DPYTHON_EXECUTABLE=/usr/bin/python3 \
  34. -DJPEG_INCLUDE_DIR=/usr/include/openjpeg-2.5 \
  35. -DSHOULD_INSTALL_JS_SHELL=ON \
  36. -DUSE_WPE_RENDERER=OFF \
  37. -DENABLE_MINIBROWSER=ON", sourceDir="..")
  38. def build():
  39. shelltools.cd("build")
  40. cmaketools.make()
  41. def install():
  42. shelltools.cd("build")
  43. cmaketools.rawInstall("DESTDIR=%s" % get.installDIR())
  44. pisitools.remove("/usr/bin/WebKitWebDriver")
  45. pisitools.dodoc("../NEWS")
  46. shelltools.cd("../Source")
  47. for path in paths:
  48. for doc in docs:
  49. if shelltools.isFile("%s/%s" % (path, doc)):
  50. pisitools.insinto("%s/%s/%s" % (get.docDIR(), get.srcNAME(), path),
  51. "%s/%s" % (path, doc))