actions.py 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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. from pisi.actionsapi import mesontools
  11. def setup():
  12. # shelltools.unlink('testsuite/gtk/gtkresources.c')
  13. options = "-Dbroadway_backend=true \
  14. -Dxinerama=yes \
  15. -Dgtk_doc=true \
  16. -Dcloudproviders=true \
  17. "
  18. shelltools.export("CFLAGS", get.CFLAGS().replace("-fomit-frame-pointer",""))
  19. if get.buildTYPE() == "emul32":
  20. options += " --libdir=/usr/lib32 \
  21. --bindir=/usr/bin32 \
  22. --sbindir=/usr/sbin32 \
  23. -Dcolord=no \
  24. "
  25. shelltools.export("CC", "%s -m32" % get.CC())
  26. shelltools.export("CXX", "%s -m32" % get.CC())
  27. shelltools.export("CFLAGS", "%s -m32" % get.CFLAGS().replace("-fomit-frame-pointer",""))
  28. shelltools.export("CXXFLAGS", "%s -m32" % get.CFLAGS())
  29. shelltools.export("LDFLAGS", "%s -m32" % get.LDFLAGS())
  30. shelltools.export("PKG_CONFIG_PATH", "/usr/lib32/pkgconfig")
  31. # pisitools.dosed("configure.ac", "cups-config", "cups-config-32bit")
  32. # autotools.autoreconf("-fiv")
  33. mesontools.configure(options)
  34. # pisitools.dosed("libtool", "( -shared )", r" -Wl,-O1,--as-needed\1")
  35. def build():
  36. mesontools.build()
  37. def install():
  38. mesontools.install()
  39. # remove empty dir
  40. # pisitools.removeDir("/usr/share/man")
  41. pisitools.dodoc("README*", "COPYING*", "NEWS*")
  42. if get.buildTYPE() == "emul32":
  43. for binaries in ["gtk-query-immodules-3.0"]:
  44. pisitools.domove("/usr/bin/%s" % binaries, "/usr/bin/", "%s-32bit" % binaries)
  45. pisitools.removeDir("/usr/bin32")
  46. pisitools.rename("/usr/bin/gtk-update-icon-cache", "gtk3-update-icon-cache")