You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

80 lines
2.0 KiB

  1. # Copyright (C) 2007-2016 OpenWrt.org
  2. #
  3. # This is free software, licensed under the GNU General Public License v2.
  4. # See /LICENSE for more information.
  5. include $(TOPDIR)/rules.mk
  6. PKG_NAME:=libdrm
  7. PKG_VERSION:=2.4.104
  8. PKG_RELEASE:=2
  9. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  10. PKG_SOURCE_URL:=https://dri.freedesktop.org/libdrm
  11. PKG_HASH:=d66ad8b5c2441015ac1333e40137bb803c3bde3612ff040286fcc12158ea1bcb
  12. PKG_MAINTAINER:=Lucian Cristian <lucian.cristian@gmail.com>
  13. PKG_LICENSE:=BSD-3-Clause
  14. PKG_CONFIG_DEPENDS:= \
  15. CONFIG_LIBDRM_INTEL \
  16. CONFIG_LIBDRM_NOUVEAU \
  17. CONFIG_LIBDRM_RADEON
  18. PKG_INSTALL:=1
  19. include $(INCLUDE_DIR)/package.mk
  20. include $(INCLUDE_DIR)/meson.mk
  21. define Package/libdrm
  22. SECTION:=libs
  23. CATEGORY:=Libraries
  24. DEPENDS:=+LIBDRM_INTEL:libpciaccess
  25. TITLE:=libdrm
  26. URL:=https://dri.freedesktop.org/
  27. endef
  28. define Package/libdrm/description
  29. LIBDRM is the cross-driver middleware which allows user-space applications
  30. (such as Mesa and 2D drivers) to communicate with the Kernel by the means
  31. of the DRI protocol.
  32. endef
  33. define Package/libdrm/config
  34. source "$(SOURCE)/Config.in"
  35. endef
  36. MESON_ARGS += \
  37. $(if $(CONFIG_LIBDRM_INTEL),-Dintel=true -Dlibkms=true,-Dintel=false -Dlibkms=false) \
  38. -Dradeon=$(if $(CONFIG_LIBDRM_RADEON),true,false) \
  39. -Damdgpu=false \
  40. -Dnouveau=$(if $(CONFIG_LIBDRM_NOUVEAU),true,false) \
  41. -Dvmwgfx=false \
  42. -Domap=false \
  43. -Dexynos=false \
  44. -Dfreedreno=false \
  45. -Dtegra=false \
  46. -Dvc4=false \
  47. -Detnaviv=false \
  48. -Dcairo-tests=false \
  49. -Dman-pages=false \
  50. -Dvalgrind=false \
  51. -Dfreedreno-kgsl=false \
  52. -Dinstall-test-programs=false \
  53. -Dudev=false
  54. define Build/InstallDev
  55. $(INSTALL_DIR) $(1)/usr/include
  56. $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
  57. $(INSTALL_DIR) $(1)/usr/lib
  58. $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib*.so* $(1)/usr/lib/
  59. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  60. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc $(1)/usr/lib/pkgconfig
  61. endef
  62. define Package/libdrm/install
  63. $(INSTALL_DIR) $(1)/usr/lib
  64. $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib*.so.* $(1)/usr/lib/
  65. endef
  66. $(eval $(call BuildPackage,libdrm))