old.actions.py 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. # -*- coding: utf-8 -*-
  2. #
  3. # Licensed under the GNU General Public License, version 3.
  4. # See the file http://www.gnu.org/licenses/gpl.txt
  5. from pisi.actionsapi import get
  6. from pisi.actionsapi import autotools
  7. from pisi.actionsapi import pisitools
  8. from pisi.actionsapi import shelltools
  9. Libdir = "/usr/lib32" if get.buildTYPE() == "emul32" else "/usr/lib"
  10. def setup():
  11. autotools.autoreconf("-vif")
  12. # --enable-sysfs option provides better hardware information support with "lspci"
  13. # --enable-32-bit option is not present anymore. Although build fails in emul32. With --disable-asm option, not fail. Needs to be tested.
  14. options ="\
  15. --with-dri-driverdir=/usr/lib/xorg/modules/dri \
  16. --with-gallium-drivers=r300,r600,radeonsi,nouveau,svga,swrast,virgl \
  17. --with-dri-drivers=i915,i965,r200,radeon,nouveau,swrast \
  18. --with-platforms=x11,drm,wayland \
  19. --enable-xa \
  20. --enable-dri \
  21. --enable-egl \
  22. --enable-gbm \
  23. --enable-glx \
  24. --enable-dri3 \
  25. --enable-gles1 \
  26. --enable-gles2 \
  27. --enable-vdpau \
  28. --enable-osmesa \
  29. --enable-xvmc \
  30. --enable-glx-tls \
  31. --enable-llvm \
  32. --enable-nine \
  33. --enable-libunwind \
  34. --enable-llvm-shared-libs \
  35. --enable-shared-glapi \
  36. --enable-texture-float \
  37. "
  38. if get.buildTYPE() == "emul32":
  39. shelltools.export("PKG_CONFIG_PATH","/usr/lib32/pkgconfig")
  40. shelltools.export("LLVM_CONFIG","/usr/bin/llvm-config-32")
  41. options += " --with-dri-driverdir=/usr/lib32/xorg/modules/dri \
  42. --with-clang-libdir=/usr/lib32 \
  43. --disable-asm "
  44. elif get.ARCH() == "x86_64":
  45. options += " --with-clang-libdir=/usr/lib \
  46. --enable-omx-bellagio \
  47. --enable-opencl-icd "
  48. autotools.configure(options)
  49. pisitools.dosed("libtool","( -shared )", " -Wl,--as-needed\\1")
  50. def build():
  51. autotools.make()
  52. def install():
  53. autotools.rawInstall("DESTDIR=%s" % get.installDIR())
  54. pisitools.domove("%s/libGL.so.1.2.0" % Libdir, "%s/mesa" % Libdir)
  55. pisitools.dosym("libGL.so.1.2.0", "%s/libGL.so.1.2" % Libdir)
  56. if get.buildTYPE() == "emul32":
  57. #pisitools.remove("/usr/lib32/pkgconfig/wayland-egl.pc")
  58. #pisitools.remove("/usr/lib32/libwayland-egl.so*")
  59. return
  60. #pisitools.dodoc("docs/COPYING")
  61. pisitools.dohtml("docs/*")
  62. #pisitools.remove("/usr/lib/libwayland-egl.so*")
  63. #pisitools.remove("/usr/lib/pkgconfig/wayland-egl.pc")