The cirros image was rebuilt against the 3.13.0-83 kernel, drivers e1000e, igbvf...
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / package / mesa3d-headers / mesa3d-headers.mk
1 ################################################################################
2 #
3 # mesa3d-headers
4 #
5 ################################################################################
6
7 # mesa3d-headers is inherently incompatible with mesa3d, so error out
8 # if both are enabled.
9 ifeq ($(BR2_PACKAGE_MESA3D)$(BR2_PACKAGE_MESA3D_HEADERS),yy)
10 $(error mesa3d-headers enabled, but mesa3d enabled too)
11 endif
12
13 # Not possible to directly refer to mesa3d variables, because of
14 # first/second expansion trickery...
15 MESA3D_HEADERS_VERSION = 10.5.4
16 MESA3D_HEADERS_SOURCE = mesa-$(MESA3D_HEADERS_VERSION).tar.xz
17 MESA3D_HEADERS_SITE = ftp://ftp.freedesktop.org/pub/mesa/$(MESA3D_HEADERS_VERSION)
18 MESA3D_HEADERS_LICENSE = MIT, SGI, Khronos
19 MESA3D_HEADERS_LICENSE_FILES = docs/license.html
20
21 # Only installs header files
22 MESA3D_HEADERS_INSTALL_STAGING = YES
23 MESA3D_HEADERS_INSTALL_TARGET = NO
24
25 MESA3D_HEADERS_DIRS = KHR
26
27 ifeq ($(BR2_PACKAGE_HAS_LIBGL),y)
28
29 MESA3D_HEADERS_DIRS += GL
30
31 ifeq ($(BR2_PACKAGE_XORG7),y)
32
33 # Not using $(SED) because we do not want to work in-place, and $(SED)
34 # contains -i.
35 define MESA3D_HEADERS_BUILD_DRI_PC
36         sed -e 's:@\(exec_\)\?prefix@:/usr:' \
37             -e 's:@libdir@:${exec_prefix}/lib:' \
38             -e 's:@includedir@:${prefix}/include:' \
39             -e 's:@DRI_DRIVER_INSTALL_DIR@:${libdir}/dri:' \
40             -e 's:@VERSION@:$(MESA3D_HEADERS_VERSION):' \
41             -e 's:@DRI_PC_REQ_PRIV@::' \
42             $(@D)/src/mesa/drivers/dri/dri.pc.in \
43             >$(@D)/src/mesa/drivers/dri/dri.pc
44 endef
45
46 define MESA3D_HEADERS_INSTALL_DRI_PC
47         $(INSTALL) -D -m 0644 $(@D)/include/GL/internal/dri_interface.h \
48                 $(STAGING_DIR)/usr/include/GL/internal/dri_interface.h
49         $(INSTALL) -D -m 0644 $(@D)/src/mesa/drivers/dri/dri.pc \
50                 $(STAGING_DIR)/usr/lib/pkg-config/dri.pc
51 endef
52
53 endif # Xorg
54
55 endif # OpenGL
56
57 ifeq ($(BR2_PACKAGE_HAS_LIBEGL),y)
58 MESA3D_HEADERS_DIRS += EGL
59 endif
60
61 ifeq ($(BR2_PACKAGE_HAS_LIBGLES),y)
62 MESA3D_HEADERS_DIRS += GLES GLES2
63 endif
64
65 ifeq ($(BR2_PACKAGE_HAS_LIBOPENVG),y)
66 MESA3D_HEADERS_DIRS += VG
67 endif
68
69 define MESA3D_HEADERS_BUILD_CMDS
70         $(MESA3D_HEADERS_BUILD_DRI_PC)
71 endef
72
73 define MESA3D_HEADERS_INSTALL_STAGING_CMDS
74         $(foreach d,$(MESA3D_HEADERS_DIRS),\
75                 cp -dpfr $(@D)/include/$(d) $(STAGING_DIR)/usr/include/ || exit 1$(sep))
76         $(MESA3D_HEADERS_INSTALL_DRI_PC)
77 endef
78
79 $(eval $(generic-package))