actions.py 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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 autotools
  8. from pisi.actionsapi import pisitools
  9. from pisi.actionsapi import shelltools
  10. shelltools.export("XDG_DATA_HOME", get.workDIR())
  11. #pisitools.flags.replace("-ggdb3", "-g")
  12. cflags = get.CFLAGS().replace("-ggdb3","")
  13. cxxflags = get.CXXFLAGS().replace("-gddb3", "")
  14. paths = ["JavaScriptCore", "WebCore", "WebKit"]
  15. docs = ["AUTHORS", "ChangeLog", "COPYING.LIB", "THANKS", \
  16. "LICENSE-LGPL-2", "LICENSE-LGPL-2.1", "LICENSE"]
  17. def setup():
  18. shelltools.export("CFLAGS", cflags)
  19. shelltools.export("CXXFLAGS", cxxflags)
  20. autotools.configure("\
  21. --enable-webkit2 \
  22. --libexecdir=/usr/lib \
  23. --disable-static \
  24. --disable-gtk-doc \
  25. --disable-silent-rules \
  26. --disable-wayland-target \
  27. --enable-geolocation \
  28. --enable-glx \
  29. --enable-webgl \
  30. --with-gnu-ld \
  31. --with-gstreamer=1.0 \
  32. --with-gtk=3.0 \
  33. --enable-x11-target \
  34. --enable-video \
  35. --enable-web-audio \
  36. --enable-introspection \
  37. ")
  38. pisitools.dosed("libtool", " -shared ", " -Wl,-O1,--as-needed -shared ")
  39. def build():
  40. shelltools.export("CFLAGS", cflags)
  41. shelltools.export("CXXFLAGS", cxxflags)
  42. autotools.make()
  43. def install():
  44. shelltools.export("CFLAGS", cflags)
  45. shelltools.export("CXXFLAGS", cxxflags)
  46. autotools.rawInstall("-j1 DESTDIR=%s" % get.installDIR())
  47. pisitools.domove("/usr/share/gtk-doc/html", "/usr/share/doc/webkit-gtk3")
  48. pisitools.dodoc("NEWS")
  49. shelltools.cd("Source")
  50. for path in paths:
  51. for doc in docs:
  52. if shelltools.isFile("%s/%s" % (path, doc)):
  53. pisitools.insinto("%s/%s/%s" % (get.docDIR(), get.srcNAME(), path),
  54. "%s/%s" % (path, doc))