actions.py 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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("rm -r Source/ThirdParty/gtest/")
  15. #pisitools.dosed("Source/cmake/OptionsGTK.cmake", "2.99.5", "2.72.0")
  16. shelltools.system("mkdir build")
  17. shelltools.cd("build")
  18. cmaketools.configure("-DPORT=GTK \
  19. -DCMAKE_BUILD_TYPE=Release \
  20. -DCMAKE_SKIP_RPATH=ON \
  21. -DCMAKE_INSTALL_PREFIX=/usr \
  22. -DLIB_INSTALL_DIR=/usr/lib \
  23. -DLIBEXEC_INSTALL_DIR=/usr/lib/webkit2gtk-4.1 \
  24. -DENABLE_CREDENTIAL_STORAGE=ON \
  25. -DENABLE_GEOLOCATION=ON \
  26. -DENABLE_VIDEO=ON \
  27. -DENABLE_WEB_AUDIO=ON \
  28. -DENABLE_WEBGL=ON \
  29. -DUSE_LIBHYPHEN=OFF \
  30. -DUSE_SOUP2=OFF \
  31. -DUSE_WOFF2=OFF \
  32. -DUSE_SYSTEMD=OFF \
  33. -DUSE_GTK4=OFF \
  34. -DUSE_LIBBACKTRACE=OFF \
  35. -DPYTHON_EXECUTABLE=/usr/bin/python3 \
  36. -DJPEG_INCLUDE_DIR=/usr/include/openjpeg-2.5 \
  37. -DSHOULD_INSTALL_JS_SHELL=ON \
  38. -DUSE_WPE_RENDERER=OFF \
  39. -DENABLE_MINIBROWSER=ON", sourceDir="..")
  40. def build():
  41. shelltools.cd("build")
  42. cmaketools.make()
  43. def install():
  44. shelltools.cd("build")
  45. cmaketools.rawInstall("DESTDIR=%s" % get.installDIR())
  46. pisitools.remove("/usr/bin/WebKitWebDriver")
  47. pisitools.dodoc("../NEWS")
  48. shelltools.cd("../Source")
  49. for path in paths:
  50. for doc in docs:
  51. if shelltools.isFile("%s/%s" % (path, doc)):
  52. pisitools.insinto("%s/%s/%s" % (get.docDIR(), get.srcNAME(), path),
  53. "%s/%s" % (path, doc))