From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/3 v2] package/opengl-registry: new package
Date: Sun, 5 Oct 2014 18:47:08 +0200 [thread overview]
Message-ID: <20141005184708.128aa15e@free-electrons.com> (raw)
In-Reply-To: <6c5dbcd315ecd266891ca9932c47c5e5f86eaf9b.1411334346.git.yann.morin.1998@free.fr>
Dear Yann E. MORIN,
On Sun, 21 Sep 2014 23:22:54 +0200, Yann E. MORIN wrote:
> We use the last svn revision at which the api directory was *changed*,
> not the revision the repository is currently at.
Why does this matter?
> package/Config.in | 1 +
> package/opengl-registry/Config.in | 18 +
> package/opengl-registry/gl.h | 2115 ++++++++++++++++++++
Hum, I was wondering if we couldn't instead download this file from the
Mesa git repository instead. But looks like <pkg>_EXTRA_DOWNLOADS
assumes the file is located at the same URL as <pkg>_SOURCE.
Do we know why this gl.h is not part of the upstream opengl-registry?
> diff --git a/package/opengl-registry/Config.in b/package/opengl-registry/Config.in
> new file mode 100644
> index 0000000..1d4566b
> --- /dev/null
> +++ b/package/opengl-registry/Config.in
> @@ -0,0 +1,18 @@
> +config BR2_PACKAGE_OPENGL_REGISTRY
> + bool "opengl-registry"
> + depends on BR2_PACKAGE_HAS_LIBGL || BR2_PACKAGE_HAS_LIBGLES || BR2_PACKAGE_HAS_LIBEGL
> + help
> + The OpenGL Registry contains specifications, header files, and
> + related documentation for OpenGL and related APIs including GLU,
> + GLX, and WGL. In addition to the core API specifications, many
> + extensions to these APIs have been defined by vendors, groups of
> + vendors, and the ARB. The Registry also contains specifications
> + and header files for all registered extensions, written as
> + modifications to the appropriate core API specifications.
> +
> + This package installs the openGL header files. You do not need them
> + if the OpenGL/EGL/GLES implementation provides its own headers.
> + Currently, the only known implementation requiring OpenGL Resgistry
> + is the NVidia proprietary driver.
> +
> + https://www.opengl.org/registry/
Should we foresee any problem if an OpenGL implementation providing its
own header files (e.g rpi-userland, gpu-imx, etc.) gets selected in
addition to this package? They will overwrite each other files, no?
> diff --git a/package/opengl-registry/opengl-registry.mk b/package/opengl-registry/opengl-registry.mk
> new file mode 100644
> index 0000000..0c4da28
> --- /dev/null
> +++ b/package/opengl-registry/opengl-registry.mk
> @@ -0,0 +1,76 @@
> +################################################################################
> +#
> +# opengl-registry
> +#
> +################################################################################
> +
> +# Using last revision at which the 'api' directory was *changed*
> +OPENGL_REGISTRY_VERSION = 28221
> +OPENGL_REGISTRY_SITE = https://cvs.khronos.org/svn/repos/ogl/trunk/doc/registry/public/api
> +OPENGL_REGISTRY_SITE_METHOD = svn
> +# The license is MIT, but with 's/Software/Materials/' so it is not exactly MIT
> +OPENGL_REGISTRY_LICENSE = MIT-like
> +# No license file, license header in all generated headers
> +
> +# The registry only installs header files
> +OPENGL_REGISTRY_INSTALL_STAGING = YES
> +OPENGL_REGISTRY_INSTALL_TARGET = NO
> +
> +# opengl-registry depends on at least one of those virtual packages,
> +# so we can be sure we'll have _DIRS set to non-empty.
> +OPENGL_REGISTRY_DIRS = $(if $(BR2_PACKAGE_HAS_LIBGL),GL)
> +OPENGL_REGISTRY_DIRS += $(if $(BR2_PACKAGE_HAS_LIBEGL),EGL)
> +OPENGL_REGISTRY_DIRS += $(if $(BR2_PACKAGE_HAS_LIBGLES),GLES GLES2 GLES3)
Maybe just:
OPENGL_REGISTRY_DIRS = \
$(if $(BR2_PACKAGE_HAS_LIBGL),GL) \
$(if $(BR2_PACKAGE_HAS_LIBEGL),EGL) \
$(if $(BR2_PACKAGE_HAS_LIBGLES),GLES GLES2 GLES3)
> +# Remove pre-generated files
> +define OPENGL_REGISTRY_RM_H
> + rm -f $(@D)/GL/*.h
> +endef
> +OPENGL_REGISTRY_POST_EXTRACT_HOOKS += OPENGL_REGISTRY_RM_H
> +
> +# We need to tweak glx.h to:
> +# - include the X11 headers it needs
> +# - include glxext.h like mesa3d's one does
> +# - define the glxext prototypes
Why not simply use a patch instead of this awk magic? We generally use
patches when possible. In this case, you're patching only one file, so
clearly a patch seems to make sense here, no?
Thanks,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
next prev parent reply other threads:[~2014-10-05 16:47 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-21 21:22 [Buildroot] [PATCH 0/3 v2] Introduce NVidia's binary driver (branch yem/gfx) Yann E. MORIN
2014-09-21 21:22 ` [Buildroot] [PATCH 1/3 v2] package/opengl-registry: new package Yann E. MORIN
2014-10-05 16:47 ` Thomas Petazzoni [this message]
2014-10-05 16:57 ` Yann E. MORIN
2014-10-05 17:08 ` Thomas Petazzoni
2014-10-05 20:56 ` Yann E. MORIN
2014-09-21 21:22 ` [Buildroot] [PATCH 2/3 v2] package/nvidia-driver: add NVidia's OpenGL binary blob Yann E. MORIN
2014-10-05 16:59 ` Thomas Petazzoni
2014-10-05 21:55 ` Yann E. MORIN
2014-09-21 21:22 ` [Buildroot] [PATCH 3/3 v2] package/nvidia-driver: build the kernel module Yann E. MORIN
2014-10-05 17:01 ` Thomas Petazzoni
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20141005184708.128aa15e@free-electrons.com \
--to=thomas.petazzoni@free-electrons.com \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.