package/mesa3d-headers: new package
Some OpenGL/EGL/GLES/VG providers do not provide the corresponding headers, and rely on using "the headers provided by the distribution". In our case, we can not rely on such headers, because we are not a distribution, and we have no way to provide those headers (not even speaking about relying on the headers provided by hte host distribution, because they might well not be installed at all). Also, we can not rely on another package to provide those headers, because we can only have one provider enabled in any configuration. The Khronos group provides such headers, and they are the reference headers, but we can not realy use them: - most of them are not packaged: they are not versioned and not provided in a tarball, but as separately downloadable files; - those headers are anyway incomplete: there are headers not provided by Khronos, like GL.h Instead, we rely on mesa3d to provide those headers: mesa3d has all the headers we need. Modifying the existing mesa3d package would not be easy; we'd have to differentiate whther we need only the headers or the full package. The meas3d Config.in and .mk are already quite non-trivial that adding such a feature would render them even more illegible. So, we introduce mea3d-headers as a new package, that is in fact just mesa3d with a much simplified Config.in and .mk, that other OpenXXX providers may select if they do not provide the OpenXXX headers. Note: we're not installing GLES3 headers, because what Buildroot currently calls libgles is in fact libgles2; we have no way to specify that we have libgles3. So, we just install headers for GLES and GLES2. [Thomas: - Wrap Config.in help text to a reasonable length. - Don't rely on mesa3d to provide mesa3d-headers: they should be mutually exclusive. Instead, error out if both packages are selected. - Take into account the update of mesa3d to 10.4.5. - Don't copy each header file individually, use a cp -dpfr call to copy entires header files directories.] Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
This commit is contained in:
parent
2df8cf5af7
commit
8138a36018
@ -211,6 +211,7 @@ endif
|
||||
source "package/linux-fusion/Config.in"
|
||||
source "package/lite/Config.in"
|
||||
source "package/mesa3d/Config.in"
|
||||
source "package/mesa3d-headers/Config.in"
|
||||
source "package/ocrad/Config.in"
|
||||
source "package/psplash/Config.in"
|
||||
source "package/sawman/Config.in"
|
||||
|
9
package/mesa3d-headers/Config.in
Normal file
9
package/mesa3d-headers/Config.in
Normal file
@ -0,0 +1,9 @@
|
||||
config BR2_PACKAGE_MESA3D_HEADERS
|
||||
bool
|
||||
help
|
||||
Mesa 3D, an open-source implementation of the OpenGL
|
||||
specification.
|
||||
|
||||
This package only installs headers needed by other packages.
|
||||
|
||||
http://mesa3d.org
|
1
package/mesa3d-headers/mesa3d-headers.hash
Symbolic link
1
package/mesa3d-headers/mesa3d-headers.hash
Symbolic link
@ -0,0 +1 @@
|
||||
../mesa3d/mesa3d.hash
|
48
package/mesa3d-headers/mesa3d-headers.mk
Normal file
48
package/mesa3d-headers/mesa3d-headers.mk
Normal file
@ -0,0 +1,48 @@
|
||||
################################################################################
|
||||
#
|
||||
# mesa3d-headers
|
||||
#
|
||||
################################################################################
|
||||
|
||||
# mesa3d-headers is inherently incompatible with mesa3d, so error out
|
||||
# if both are enabled.
|
||||
ifeq ($(BR2_PACKAGE_MESA3D)$(BR2_PACKAGE_MESA3D_HEADERS),yy)
|
||||
$(error mesa3d-headers enabled, but mesa3d enabled too)
|
||||
endif
|
||||
|
||||
# Not possible to directly refer to mesa3d variables, because of
|
||||
# first/second expansion trickery...
|
||||
MESA3D_HEADERS_VERSION = 10.4.5
|
||||
MESA3D_HEADERS_SOURCE = MesaLib-$(MESA3D_HEADERS_VERSION).tar.bz2
|
||||
MESA3D_HEADERS_SITE = ftp://ftp.freedesktop.org/pub/mesa/$(MESA3D_HEADERS_VERSION)
|
||||
MESA3D_HEADERS_LICENSE = MIT, SGI, Khronos
|
||||
MESA3D_HEADERS_LICENSE_FILES = docs/license.html
|
||||
|
||||
# Only installs header files
|
||||
MESA3D_HEADERS_INSTALL_STAGING = YES
|
||||
MESA3D_HEADERS_INSTALL_TARGET = NO
|
||||
|
||||
MESA3D_HEADERS_DIRS = KHR
|
||||
|
||||
ifeq ($(BR2_PACKAGE_HAS_LIBGL),y)
|
||||
MESA3D_HEADERS_DIRS += GL
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_HAS_LIBEGL),y)
|
||||
MESA3D_HEADERS_DIRS += EGL
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_HAS_LIBGLES),y)
|
||||
MESA3D_HEADERS_DIRS += GLES GLES2
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_HAS_LIBOPENVG),y)
|
||||
MESA3D_HEADERS_DIRS += VG
|
||||
endif
|
||||
|
||||
define MESA3D_HEADERS_INSTALL_STAGING_CMDS
|
||||
$(foreach d,$(MESA3D_HEADERS_DIRS),\
|
||||
cp -dpfr $(@D)/include/$(d) $(STAGING_DIR)/usr/include/ || exit 1$(sep))
|
||||
endef
|
||||
|
||||
$(eval $(generic-package))
|
@ -4,6 +4,7 @@
|
||||
#
|
||||
################################################################################
|
||||
|
||||
# When updating the version, please also update mesa3d-headers
|
||||
MESA3D_VERSION = 10.4.5
|
||||
MESA3D_SOURCE = MesaLib-$(MESA3D_VERSION).tar.bz2
|
||||
MESA3D_SITE = ftp://ftp.freedesktop.org/pub/mesa/$(MESA3D_VERSION)
|
||||
|
Loading…
Reference in New Issue
Block a user