diff options
author | Yann E. MORIN <yann.morin.1998@free.fr> | 2015-02-10 21:01:11 +0100 |
---|---|---|
committer | Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | 2015-02-21 17:45:26 +0100 |
commit | 7468b60e7c7fe7ff2e813de6a43f9f26fa453819 (patch) | |
tree | a067e779b8a403ed360ef58ea39150179a148815 | |
parent | 8138a360181b60573ce070eb86b80f546dfc9cba (diff) | |
download | buildroot-7468b60e7c7fe7ff2e813de6a43f9f26fa453819.tar.gz buildroot-7468b60e7c7fe7ff2e813de6a43f9f26fa453819.zip |
package/mesa3d-headers: also install dri header and .pc file
Building GL with Xorg requires the DRI interface.
Provide that header and pkg-config file for those binary blobs
that do not provide them.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Jérôme Pouiller <jezz@sysmic.org>
Cc: Bernd Kuhls <berndkuhls@hotmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-rw-r--r-- | package/mesa3d-headers/mesa3d-headers.mk | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/package/mesa3d-headers/mesa3d-headers.mk b/package/mesa3d-headers/mesa3d-headers.mk index 0c4c9f48fa..e20859ebb9 100644 --- a/package/mesa3d-headers/mesa3d-headers.mk +++ b/package/mesa3d-headers/mesa3d-headers.mk @@ -25,8 +25,34 @@ MESA3D_HEADERS_INSTALL_TARGET = NO MESA3D_HEADERS_DIRS = KHR ifeq ($(BR2_PACKAGE_HAS_LIBGL),y) + MESA3D_HEADERS_DIRS += GL -endif + +ifeq ($(BR2_PACKAGE_XORG7),y) + +# Not using $(SED) because we do not want to work in-place, and $(SED) +# contains -i. +define MESA3D_HEADERS_BUILD_DRI_PC + sed -e 's:@\(exec_\)\?prefix@:/usr:' \ + -e 's:@libdir@:${exec_prefix}/lib:' \ + -e 's:@includedir@:${prefix}/include:' \ + -e 's:@DRI_DRIVER_INSTALL_DIR@:${libdir}/dri:' \ + -e 's:@VERSION@:$(MESA3D_HEADERS_VERSION):' \ + -e 's:@DRI_PC_REQ_PRIV@::' \ + $(@D)/src/mesa/drivers/dri/dri.pc.in \ + >$(@D)/src/mesa/drivers/dri/dri.pc +endef + +define MESA3D_HEADERS_INSTALL_DRI_PC + $(INSTALL) -D -m 0644 $(@D)/include/GL/internal/dri_interface.h \ + $(STAGING_DIR)/usr/include/GL/internal/dri_interface.h + $(INSTALL) -D -m 0644 $(@D)/src/mesa/drivers/dri/dri.pc \ + $(STAGING_DIR)/usr/lib/pkg-config/dri.pc +endef + +endif # Xorg + +endif # OpenGL ifeq ($(BR2_PACKAGE_HAS_LIBEGL),y) MESA3D_HEADERS_DIRS += EGL @@ -40,9 +66,14 @@ ifeq ($(BR2_PACKAGE_HAS_LIBOPENVG),y) MESA3D_HEADERS_DIRS += VG endif +define MESA3D_HEADERS_BUILD_CMDS + $(MESA3D_HEADERS_BUILD_DRI_PC) +endef + define MESA3D_HEADERS_INSTALL_STAGING_CMDS $(foreach d,$(MESA3D_HEADERS_DIRS),\ cp -dpfr $(@D)/include/$(d) $(STAGING_DIR)/usr/include/ || exit 1$(sep)) + $(MESA3D_HEADERS_INSTALL_DRI_PC) endef $(eval $(generic-package)) |