Makefile 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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. PKG_HOST_DEPENDS:= !cygwin
  22. include $(TOPDIR)/mk/package.mk
  23. $(eval $(call PKG_template,MESALIB,mesalib,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  24. $(eval $(call PKG_template,GLXINFO,glxinfo,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR_GLXINFO},${PKG_SECT_GLXINFO}))
  25. $(eval $(call PKG_template,GLXGEARS,glxgears,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR_GLXGEARS},${PKG_SECT_GLXGEARS}))
  26. ifeq (${ADK_LINUX_X86_IBMX40},y)
  27. DRI_DRIVERS:=i810
  28. endif
  29. # Lemote's SMI712 is not directly supported by Mesa,
  30. # and at least some SIS driver fails to build when
  31. # keeping the driver auto-selection intact.
  32. ifeq (${ADK_LINUX_MIPS64_LEMOTE},y)
  33. DRI_DRIVERS:=swrast
  34. endif
  35. CONFIGURE_ARGS+= --disable-static \
  36. --disable-gallium \
  37. --disable-glw \
  38. --with-driver=dri \
  39. --with-dri-drivers=${DRI_DRIVERS} \
  40. --with-demos=xdemos
  41. XAKE_FLAGS+= HOST_CC=${HOSTCC}
  42. pre-configure:
  43. (cd ${WRKBUILD}; rm -rf config.{cache,status}; \
  44. ./configure \
  45. --disable-static \
  46. --disable-glw \
  47. --disable-gallium \
  48. --with-driver=xlib \
  49. );
  50. ${MAKE} -C ${WRKBUILD}/src/glsl
  51. ${MAKE} -C ${WRKBUILD}/src/glsl/apps
  52. ${CP} ${WRKBUILD}/src/glsl/apps/compile \
  53. ${STAGING_TOOLS}/bin
  54. ${MAKE} -C ${WRKBUILD}/src/glsl clean
  55. post-install:
  56. $(INSTALL_DIR) $(IDIR_MESALIB)/usr/lib/dri
  57. $(CP) $(WRKINST)/usr/lib/libGL*.so* \
  58. $(IDIR_MESALIB)/usr/lib
  59. ifeq (${ADK_LINUX_MIPS64_LEMOTE},y)
  60. ${CP} $(WRKINST)/usr/lib/dri/swrast_dri.so \
  61. ${IDIR_MESALIB}/usr/lib/dri/
  62. endif
  63. ${INSTALL_DIR} ${IDIR_GLXINFO}/usr/bin
  64. ${INSTALL_BIN} ${WRKBUILD}/progs/xdemos/glxinfo \
  65. ${IDIR_GLXINFO}/usr/bin/
  66. ${INSTALL_DIR} ${IDIR_GLXGEARS}/usr/bin
  67. ${INSTALL_BIN} ${WRKBUILD}/progs/xdemos/glxgears \
  68. ${IDIR_GLXGEARS}/usr/bin/
  69. include ${TOPDIR}/mk/pkg-bottom.mk