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.

81 lines
2.1 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. PKG_BUILD_DEPENDS:=meson/host
  20. include $(INCLUDE_DIR)/package.mk
  21. include ../../devel/meson/meson.mk
  22. define Package/libdrm
  23. SECTION:=libs
  24. CATEGORY:=Libraries
  25. DEPENDS:=+LIBDRM_INTEL:libpciaccess
  26. TITLE:=libdrm
  27. URL:=https://dri.freedesktop.org/
  28. endef
  29. define Package/libdrm/description
  30. LIBDRM is the cross-driver middleware which allows user-space applications
  31. (such as Mesa and 2D drivers) to communicate with the Kernel by the means
  32. of the DRI protocol.
  33. endef
  34. define Package/libdrm/config
  35. source "$(SOURCE)/Config.in"
  36. endef
  37. MESON_ARGS += \
  38. $(if $(CONFIG_LIBDRM_INTEL),-Dintel=true -Dlibkms=true,-Dintel=false -Dlibkms=false) \
  39. -Dradeon=$(if $(CONFIG_LIBDRM_RADEON),true,false) \
  40. -Damdgpu=false \
  41. -Dnouveau=$(if $(CONFIG_LIBDRM_NOUVEAU),true,false) \
  42. -Dvmwgfx=false \
  43. -Domap=false \
  44. -Dexynos=false \
  45. -Dfreedreno=false \
  46. -Dtegra=false \
  47. -Dvc4=false \
  48. -Detnaviv=false \
  49. -Dcairo-tests=false \
  50. -Dman-pages=false \
  51. -Dvalgrind=false \
  52. -Dfreedreno-kgsl=false \
  53. -Dinstall-test-programs=false \
  54. -Dudev=false
  55. define Build/InstallDev
  56. $(INSTALL_DIR) $(1)/usr/include
  57. $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
  58. $(INSTALL_DIR) $(1)/usr/lib
  59. $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib*.so* $(1)/usr/lib/
  60. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  61. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc $(1)/usr/lib/pkgconfig
  62. endef
  63. define Package/libdrm/install
  64. $(INSTALL_DIR) $(1)/usr/lib
  65. $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib*.so.* $(1)/usr/lib/
  66. endef
  67. $(eval $(call BuildPackage,libdrm))