actions.py 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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/copyleft/gpl.txt.
  6. from pisi.actionsapi import autotools
  7. from pisi.actionsapi import pisitools
  8. from pisi.actionsapi import shelltools
  9. from pisi.actionsapi import get
  10. WorkDir = "motif-2.3.8"
  11. mwmlibdir = "/usr/lib/X11"
  12. mwmconfigdir = "/etc/X11/mwm"
  13. def setup():
  14. # add X.Org vendor string to aliases for virtual bindings
  15. shelltools.echo("bindings/xmbind.alias", '"The X.Org Foundation"\t\t\t\t\tpc')
  16. # libXp will be deprecated
  17. pisitools.dosed("lib/Xm/Makefile.am", " -lXp ", " -ldeprecatedXp ")
  18. shelltools.export("LANG", "C") # guess why this is here...
  19. shelltools.export("LC_ALL", "C") # guess why this is here...
  20. shelltools.export("CFLAGS", "%s -fno-strict-aliasing" % get.CFLAGS())
  21. shelltools.export("CXXFLAGS", "%s -fno-strict-aliasing" % get.CXXFLAGS())
  22. shelltools.export("AT_M4DIR", ".")
  23. for f in ["NEWS", "AUTHORS"]:
  24. shelltools.touch(f)
  25. autotools.autoreconf("-vfi")
  26. options = "--with-x \
  27. --disable-static \
  28. --enable-utf8 \
  29. --enable-xft \
  30. --enable-jpeg \
  31. --enable-png"
  32. if get.buildTYPE() == "emul32":
  33. options += " --prefix=/emul32 \
  34. --libdir=/usr/lib32 \
  35. --bindir=/emul32/bin \
  36. --mandir=/emul32/man"
  37. shelltools.export("PKG_CONFIG_PATH", "/usr/lib32/pkgconfig")
  38. shelltools.export("CFLAGS", "%s -I/usr/include/freetype2 -fno-strict-aliasing -m32" % get.CFLAGS())
  39. shelltools.export("CXXFLAGS", "%s -I/usr/include/freetype2 -fno-strict-aliasing -m32" % get.CXXFLAGS())
  40. shelltools.export("LDFLAGS", "%s -m32" % get.LDFLAGS())
  41. autotools.configure(options)
  42. def build():
  43. autotools.make('-j1 MWMRCDIR="/etc/X11/mwm"')
  44. def install():
  45. autotools.rawInstall('DESTDIR=%s -j1 MWMRCDIR="/etc/X11/mwm"' % get.installDIR())
  46. # these are just demos
  47. if not get.buildTYPE() == "emul32":
  48. pisitools.removeDir("/usr/share/Xm")
  49. pisitools.dodoc("ChangeLog", "README*", "BUGREPORT", "RELEASE", "RELNOTES", "TODO")
  50. #if get.buildTYPE() == "emul32":
  51. #pisitools.removeDir("/emul32")