actions.py 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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. autotools.autoreconf("-fiv")
  19. shelltools.export("CFLAGS", cflags)
  20. shelltools.export("CXXFLAGS", cxxflags)
  21. autotools.configure("--prefix=/usr \
  22. --libexecdir=/usr/lib/WebKitGTK \
  23. --disable-static \
  24. --disable-webkit2 \
  25. --disable-gtk-doc \
  26. --disable-silent-rules \
  27. --disable-wayland-target \
  28. --enable-geolocation \
  29. --enable-glx \
  30. --enable-webgl \
  31. --with-gnu-ld \
  32. --with-gtk=2.0 \
  33. --enable-x11-target \
  34. --enable-video \
  35. --enable-web-audio \
  36. --enable-introspection")
  37. pisitools.dosed("libtool", " -shared ", " -Wl,-O1,--as-needed -shared ")
  38. def build():
  39. shelltools.export("CFLAGS", cflags)
  40. shelltools.export("CXXFLAGS", cxxflags)
  41. autotools.make("-j1 all stamp-po")
  42. def install():
  43. shelltools.export("CFLAGS", cflags)
  44. shelltools.export("CXXFLAGS", cxxflags)
  45. autotools.rawInstall("-j1 DESTDIR=%s" % get.installDIR())
  46. pisitools.domove("/usr/share/gtk-doc/html", "/usr/share/doc/webkit-gtk2")
  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))