diff --git a/package/Config.in b/package/Config.in index 377cf9a282..d33331163d 100644 --- a/package/Config.in +++ b/package/Config.in @@ -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" diff --git a/package/mesa3d-headers/Config.in b/package/mesa3d-headers/Config.in new file mode 100644 index 0000000000..c4efab673f --- /dev/null +++ b/package/mesa3d-headers/Config.in @@ -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 diff --git a/package/mesa3d-headers/mesa3d-headers.hash b/package/mesa3d-headers/mesa3d-headers.hash new file mode 120000 index 0000000000..137d0bea9c --- /dev/null +++ b/package/mesa3d-headers/mesa3d-headers.hash @@ -0,0 +1 @@ +../mesa3d/mesa3d.hash \ No newline at end of file diff --git a/package/mesa3d-headers/mesa3d-headers.mk b/package/mesa3d-headers/mesa3d-headers.mk new file mode 100644 index 0000000000..0c4c9f48fa --- /dev/null +++ b/package/mesa3d-headers/mesa3d-headers.mk @@ -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)) diff --git a/package/mesa3d/mesa3d.mk b/package/mesa3d/mesa3d.mk index c2d9d544a4..5e0e20eae3 100644 --- a/package/mesa3d/mesa3d.mk +++ b/package/mesa3d/mesa3d.mk @@ -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)