Makefile 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. # This file is part of the OpenADK project. OpenADK is copyrighted
  2. # material, please see the LICENCE file in the top-level directory.
  3. include $(TOPDIR)/rules.mk
  4. PKG_NAME:= MesaLib
  5. PKG_VERSION:= 7.8.1
  6. PKG_RELEASE:= 1
  7. PKG_MD5SUM:= 62e8e47cbd63741b4bbe634dcdc8a56a
  8. PKG_DESCR:= MESA library
  9. PKG_SECTION:= libs
  10. PKG_DEPENDS:= libxdamage libxfixes libdrm
  11. PKG_BUILDDEP+= libXdamage libXfixes libXxf86vm libdrm
  12. PKG_BUILDDEP+= dri2proto glproto expat
  13. PKG_URL:= http://www.mesa3d.org/
  14. PKG_SITES:= ftp://ftp.freedesktop.org/pub/mesa/7.8.1/
  15. PKG_DESCR_GLXINFO:= Display various GLX information
  16. PKG_SECT_GLXINFO:= x11/apps
  17. PKG_DESCR_GLXGEARS:= Nice little OpenGL demo application
  18. PKG_SECT_GLXGEARS:= x11/apps
  19. WRKDIST= ${WRKDIR}/Mesa-${PKG_VERSION}
  20. PKG_TARGET_DEPENDS:= ibmx40 lemote
  21. include $(TOPDIR)/mk/package.mk
  22. $(eval $(call PKG_template,MESALIB,mesalib,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  23. $(eval $(call PKG_template,GLXINFO,glxinfo,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR_GLXINFO},${PKG_SECT_GLXINFO}))
  24. $(eval $(call PKG_template,GLXGEARS,glxgears,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR_GLXGEARS},${PKG_SECT_GLXGEARS}))
  25. ifeq (${ADK_LINUX_X86_IBMX40},y)
  26. DRI_DRIVERS:=i810
  27. endif
  28. # Lemote's SMI712 is not directly supported by Mesa,
  29. # and at least some SIS driver fails to build when
  30. # keeping the driver auto-selection intact.
  31. ifeq (${ADK_LINUX_MIPS64_LEMOTE},y)
  32. DRI_DRIVERS:=swrast
  33. endif
  34. CONFIGURE_ARGS+= --disable-static \
  35. --disable-gallium \
  36. --disable-glw \
  37. --with-driver=dri \
  38. --with-dri-drivers=${DRI_DRIVERS} \
  39. --with-demos=xdemos
  40. XAKE_FLAGS+= HOST_CC=${HOSTCC}
  41. pre-configure:
  42. (cd ${WRKBUILD}; rm -rf config.{cache,status}; \
  43. ./configure \
  44. --disable-static \
  45. --disable-glw \
  46. --disable-gallium \
  47. --with-driver=xlib \
  48. );
  49. ${MAKE} -C ${WRKBUILD}/src/glsl
  50. ${MAKE} -C ${WRKBUILD}/src/glsl/apps
  51. ${CP} ${WRKBUILD}/src/glsl/apps/compile \
  52. ${STAGING_TOOLS}/bin
  53. ${MAKE} -C ${WRKBUILD}/src/glsl clean
  54. post-install:
  55. $(INSTALL_DIR) $(IDIR_MESALIB)/usr/lib/dri
  56. $(CP) $(WRKINST)/usr/lib/libGL*.so* \
  57. $(IDIR_MESALIB)/usr/lib
  58. ifeq (${ADK_LINUX_MIPS64_LEMOTE},y)
  59. ${CP} $(WRKINST)/usr/lib/dri/swrast_dri.so \
  60. ${IDIR_MESALIB}/usr/lib/dri/
  61. endif
  62. ${INSTALL_DIR} ${IDIR_GLXINFO}/usr/bin
  63. ${INSTALL_BIN} ${WRKBUILD}/progs/xdemos/glxinfo \
  64. ${IDIR_GLXINFO}/usr/bin/
  65. ${INSTALL_DIR} ${IDIR_GLXGEARS}/usr/bin
  66. ${INSTALL_BIN} ${WRKBUILD}/progs/xdemos/glxgears \
  67. ${IDIR_GLXGEARS}/usr/bin/
  68. include ${TOPDIR}/mk/pkg-bottom.mk