actions.py 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  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 pisitools
  7. from pisi.actionsapi import mesontools
  8. from pisi.actionsapi import shelltools
  9. libdir = "/usr/lib32" if get.buildTYPE() == "emul32" else "/usr/lib"
  10. def setup():
  11. options = "--buildtype=release \
  12. -Ddri-drivers-path=%s/xorg/modules/dri \
  13. -Db_ndebug=true \
  14. -Dplatforms=x11,wayland \
  15. -Ddri3=enabled \
  16. -Dgallium-extra-hud=true \
  17. -Dgallium-vdpau=enabled \
  18. -Dgallium-va=enabled \
  19. -Dgallium-xa=enabled \
  20. -Dgallium-nine=true \
  21. -Dvulkan-layers=device-select,intel-nullhw,overlay \
  22. -Dvideo-codecs=all \
  23. -Dshared-glapi=enabled \
  24. -Dgles1=enabled \
  25. -Dgles2=enabled \
  26. -Dopengl=true \
  27. -Dgbm=enabled \
  28. -Dglx=dri \
  29. -Degl=enabled \
  30. -Dglvnd=enabled \
  31. -Dllvm=enabled \
  32. -Dvalgrind=enabled \
  33. -Dlibunwind=disabled \
  34. -Dbuild-tests=false \
  35. -Dosmesa=true \
  36. " % (libdir)
  37. if get.buildTYPE() == "emul32":
  38. # shelltools.export("LDFLAGS", "%s -L/usr/lib32" % get.LDFLAGS())
  39. # shelltools.export("PKG_CONFIG_PATH", "/usr/lib32/pkgconfig")
  40. options += " -Dlmsensors=disabled --native-file crossfile.ini -Dzstd=disabled \
  41. -Dvulkan-drivers=amd,intel,intel_hasvk,swrast,virtio \
  42. -Dgallium-drivers=r300,r600,nouveau,radeonsi,svga,iris,llvmpipe,softpipe,virgl,crocus,i915,zink \
  43. "
  44. #shelltools.export("CC", "clang -m32")
  45. #shelltools.export("CXX", "clang++ -m32")
  46. pisitools.cflags.add("-m32 ")
  47. pisitools.cxxflags.add("-m32")
  48. shelltools.export("CC", "gcc -m32")
  49. shelltools.export("CXX", "g++ -m32")
  50. shelltools.export("PKG_CONFIG_PATH","/usr/lib32/pkgconfig")
  51. shelltools.export("LLVM_CONFIG","/usr/bin/llvm-config-32")
  52. else:
  53. #shelltools.export("CC", "clang")
  54. #shelltools.export("CXX", "clang++")
  55. pisitools.cflags.add("-m64 ")
  56. pisitools.cxxflags.add("-m64")
  57. options += " -Dgallium-omx=bellagio -Dgallium-opencl=icd -Dlmsensors=enabled -Dzstd=enabled \
  58. -Dgallium-rusticl=true \
  59. -Drust_std=2021 \
  60. -Dvulkan-drivers=amd,intel,intel_hasvk,nouveau,swrast,virtio \
  61. -Dgallium-drivers=r300,r600,nouveau,radeonsi,svga,iris,llvmpipe,softpipe,virgl,crocus,i915,zink,d3d12"
  62. #pisitools.ldflags.add("-fuse-ld=lld")
  63. mesontools.configure(options)
  64. def build():
  65. mesontools.build()
  66. def install():
  67. mesontools.install()
  68. pisitools.insinto("/usr/share/pixmaps", "docs/favicon.svg", "mesa.svg")
  69. pisitools.dohtml("docs/*")