7356ba0dd88c0d2d3f8f9bea7a8791a0fd49e912
[feed/packages.git] / libs / libdrm / Makefile
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
6 include $(TOPDIR)/rules.mk
7
8 PKG_NAME:=libdrm
9 PKG_VERSION:=2.4.107
10 PKG_RELEASE:=$(AUTORELEASE)
11
12 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
13 PKG_SOURCE_URL:=https://dri.freedesktop.org/libdrm
14 PKG_HASH:=c554cef03b033636a975543eab363cc19081cb464595d3da1ec129f87370f888
15
16 PKG_MAINTAINER:=Lucian Cristian <lucian.cristian@gmail.com>
17 PKG_LICENSE:=BSD-3-Clause
18
19 PKG_CONFIG_DEPENDS:= \
20 CONFIG_LIBDRM_INTEL \
21 CONFIG_LIBDRM_NOUVEAU \
22 CONFIG_LIBDRM_RADEON
23
24 include $(INCLUDE_DIR)/package.mk
25 include $(INCLUDE_DIR)/meson.mk
26
27 define Package/libdrm
28 SECTION:=libs
29 CATEGORY:=Libraries
30 DEPENDS:=+LIBDRM_INTEL:libpciaccess
31 TITLE:=libdrm
32 URL:=https://dri.freedesktop.org/
33 endef
34
35 define Package/libdrm/description
36 LIBDRM is the cross-driver middleware which allows user-space applications
37 (such as Mesa and 2D drivers) to communicate with the Kernel by the means
38 of the DRI protocol.
39 endef
40
41 define Package/libdrm/config
42 source "$(SOURCE)/Config.in"
43 endef
44
45 MESON_ARGS += \
46 $(if $(CONFIG_LIBDRM_INTEL),-Dintel=true -Dlibkms=true,-Dintel=false -Dlibkms=false) \
47 -Dradeon=$(if $(CONFIG_LIBDRM_RADEON),true,false) \
48 -Damdgpu=false \
49 -Dnouveau=$(if $(CONFIG_LIBDRM_NOUVEAU),true,false) \
50 -Dvmwgfx=false \
51 -Domap=false \
52 -Dexynos=false \
53 -Dfreedreno=false \
54 -Dtegra=false \
55 -Dvc4=false \
56 -Detnaviv=false \
57 -Dcairo-tests=false \
58 -Dman-pages=false \
59 -Dvalgrind=false \
60 -Dfreedreno-kgsl=false \
61 -Dinstall-test-programs=false \
62 -Dudev=false
63
64 define Build/InstallDev
65 $(INSTALL_DIR) $(1)/usr/include
66 $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
67 $(INSTALL_DIR) $(1)/usr/lib
68 $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib*.so* $(1)/usr/lib/
69 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
70 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc $(1)/usr/lib/pkgconfig
71 endef
72
73 define Package/libdrm/install
74 $(INSTALL_DIR) $(1)/usr/lib
75 $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib*.so.* $(1)/usr/lib/
76 endef
77
78 $(eval $(call BuildPackage,libdrm))