actions.py 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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("--prefix=/usr \
  21. --libexecdir=/usr/lib/WebKitGTK \
  22. --disable-static \
  23. --disable-webkit2 \
  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-gtk=2.0 \
  32. --enable-x11-target \
  33. --enable-video \
  34. --enable-web-audio \
  35. --enable-introspection")
  36. pisitools.dosed("libtool", " -shared ", " -Wl,-O1,--as-needed -shared ")
  37. def build():
  38. shelltools.export("CFLAGS", cflags)
  39. shelltools.export("CXXFLAGS", cxxflags)
  40. autotools.make("-j1 all stamp-po")
  41. def install():
  42. shelltools.export("CFLAGS", cflags)
  43. shelltools.export("CXXFLAGS", cxxflags)
  44. autotools.rawInstall("-j1 DESTDIR=%s" % get.installDIR())
  45. pisitools.domove("/usr/share/gtk-doc/html", "/usr/share/doc/webkit-gtk2")
  46. pisitools.dodoc("NEWS")
  47. shelltools.cd("Source")
  48. for path in paths:
  49. for doc in docs:
  50. if shelltools.isFile("%s/%s" % (path, doc)):
  51. pisitools.insinto("%s/%s/%s" % (get.docDIR(), get.srcNAME(), path),
  52. "%s/%s" % (path, doc))