actions.py 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. #!/usr/bin/env 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. def setup():
  11. options = ''.join([
  12. '-Wno-unused-result ',
  13. '-Wno-format-overflow ',
  14. '-Wno-deprecated-declarations'
  15. ])
  16. # gamin's optional-ness is overstated
  17. shelltools.system("sed -i 's|^.*<fam.h>|//&|' gschem/src/gschem_change_notification.c")
  18. shelltools.system("sed -i 's| enum FAMCodes | int |' gschem/src/gschem_change_notification.c")
  19. #autotools.autoreconf("-vfi")
  20. # xorn uses python2 instead of python, shebang problems
  21. shelltools.export("PYTHON_CFLAGS", "-I/usr/include/python2.7/")
  22. shelltools.export("PYTHON_LIBS", "-lpython2.7")
  23. # to fix cannot find libguile.h error
  24. shelltools.export("GUILE_CFLAGS", "-I/usr/include/guile/2.2/")
  25. shelltools.export("GUILE_LIBS", "-lguile-2.2")
  26. pisitools.cflags.add("%s" % options)
  27. autotools.configure("--prefix=/usr \
  28. --disable-rpath \
  29. --without-libfam \
  30. --docdir=/usr/share/doc \
  31. --localedir=/usr/share/locale \
  32. --disable-update-xdg-database")
  33. # fix unused direct dependency analysis
  34. pisitools.dosed("libtool", " -shared ", " -Wl,-O1,--as-needed -shared ")
  35. pisitools.dosed("xorn/libtool", " -shared ", " -Wl,-O1,--as-needed -shared ")
  36. def build():
  37. autotools.make()
  38. def install():
  39. autotools.rawInstall("DESTDIR=%s" % get.installDIR())
  40. pisitools.dodoc("COPYING*", "README")