1
0

Makefile 2.5 KB

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