1 ################################################################################
5 ################################################################################
7 # mesa3d-headers is inherently incompatible with mesa3d, so error out
9 ifeq ($(BR2_PACKAGE_MESA3D
)$(BR2_PACKAGE_MESA3D_HEADERS
),yy
)
10 $(error mesa3d-headers enabled
, but mesa3d enabled too
)
13 # Not possible to directly refer to mesa3d variables, because of
14 # first/second expansion trickery...
15 MESA3D_HEADERS_VERSION
= 12.0.3
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
21 # Only installs header files
22 MESA3D_HEADERS_INSTALL_STAGING
= YES
23 MESA3D_HEADERS_INSTALL_TARGET
= NO
25 MESA3D_HEADERS_DIRS
= KHR
27 ifeq ($(BR2_PACKAGE_HAS_LIBGL
),y
)
29 MESA3D_HEADERS_DIRS
+= GL
31 ifeq ($(BR2_PACKAGE_XORG7
),y
)
33 # Not using $(SED) because we do not want to work in-place, and $(SED)
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
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
57 ifeq ($(BR2_PACKAGE_HAS_LIBEGL
),y
)
58 MESA3D_HEADERS_DIRS
+= EGL
61 ifeq ($(BR2_PACKAGE_HAS_LIBGLES
),y
)
62 MESA3D_HEADERS_DIRS
+= GLES GLES2
65 ifeq ($(BR2_PACKAGE_HAS_LIBOPENVG
),y
)
66 MESA3D_HEADERS_DIRS
+= VG
69 define MESA3D_HEADERS_BUILD_CMDS
70 $(MESA3D_HEADERS_BUILD_DRI_PC
)
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
)
79 $(eval
$(generic-package
))