piglit_git.bb 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. SUMMARY = "OpenGL driver testing framework"
  2. LICENSE = "MIT & LGPLv2+ & GPLv3 & GPLv2+ & BSD-3-Clause"
  3. LIC_FILES_CHKSUM = "file://COPYING;md5=b2beded7103a3d8a442a2a0391d607b0"
  4. SRC_URI = "git://anongit.freedesktop.org/piglit"
  5. # From 2012/12/30.
  6. SRCREV = "bbeff5d21b06d37338ad28e42d88f499bef13268"
  7. # (when PV goes above 1.0 remove the trailing r)
  8. PV = "1.0+gitr${SRCPV}"
  9. S = "${WORKDIR}/git"
  10. DEPENDS = "virtual/libx11 libxrender waffle virtual/libgl libglu python-mako-native python-numpy-native"
  11. inherit cmake pythonnative distro_features_check
  12. # depends on virtual/libx11
  13. REQUIRED_DISTRO_FEATURES = "x11"
  14. # As piglit doesn't install, enforce in-tree builds so that we can easily copy
  15. # contents out of $S and $B.
  16. B="${S}"
  17. PACKAGECONFIG ??= ""
  18. PACKAGECONFIG[freeglut] = "-DPIGLIT_USE_GLUT=1,-DPIGLIT_USE_GLUT=0,freeglut,"
  19. # CMake sets the rpath at build time with the source tree, and will reset it at
  20. # install time. As we don't install this doesn't happen, so force the rpath to
  21. # what we need.
  22. EXTRA_OECMAKE = "-DCMAKE_BUILD_WITH_INSTALL_RPATH=1 -DCMAKE_INSTALL_RPATH=${libdir}/piglit/lib"
  23. do_install() {
  24. install -d ${D}${bindir}
  25. install -m 0755 piglit-*.py ${D}${bindir}
  26. install -d ${D}${libdir}/piglit/
  27. install -d ${D}${libdir}/piglit/bin
  28. install -m 755 ${S}/bin/* ${D}${libdir}/piglit/bin
  29. cp -Pr lib/ ${D}${libdir}/piglit/
  30. cp -Pr framework/ ${D}${libdir}/piglit/
  31. cp -Pr generated_tests/ ${D}${libdir}/piglit/
  32. cp -Pr tests/ ${D}${libdir}/piglit/
  33. cp -Pr templates/ ${D}${libdir}/piglit/
  34. sed -i -e 's|sys.path.append(.*)|sys.path.append("${libdir}/piglit")|' ${D}${bindir}/piglit-*.py
  35. sed -i -e 's|^templatedir = .*$|templatedir = "${libdir}/piglit/templates"|' ${D}${bindir}/piglit-summary-html.py
  36. }
  37. FILES_${PN}-dbg += "${libdir}/piglit/*/.debug/"
  38. RDEPENDS_${PN} = "python waffle python-json python-subprocess \
  39. python-multiprocessing python-textutils python-netserver python-shell \
  40. mesa-demos bash \
  41. "