[PATCH] XWin: Look for GL specs in a known place, rather than downloading them
Daniel Stone
daniel at fooishbar.org
Wed Jan 5 06:09:02 PST 2011
Previously the XWin build required a live internet connection (and
Khronos's servers to not be down for maintenance, etc) in order to
download the (W)GL specs to autogenerate files from. Even if you
weren't building XWin, this broke distcheck.
Also, wglext.h should probably be provided by w32api/GL
Based on a patch by Daniel Stone <daniel at fooishbar.org>
Signed-off-by: Jon TURNEY <jon.turney at dronecode.org.uk>
---
hw/xwin/glx/.gitignore | 5 -----
hw/xwin/glx/Makefile.am | 36 +++++++++++++-----------------------
2 files changed, 13 insertions(+), 28 deletions(-)
diff --git a/hw/xwin/glx/.gitignore b/hw/xwin/glx/.gitignore
index e7c7617..6cdb91f 100644
--- a/hw/xwin/glx/.gitignore
+++ b/hw/xwin/glx/.gitignore
@@ -1,8 +1,3 @@
# ignore downloaded and generated files
generated_gl_wrappers.c
generated_wgl_wrappers.c
-gl.spec
-gl.tm
-wgl.tm
-wglext.spec
-wglext.h
diff --git a/hw/xwin/glx/Makefile.am b/hw/xwin/glx/Makefile.am
index e9fea50..effd7ef 100644
--- a/hw/xwin/glx/Makefile.am
+++ b/hw/xwin/glx/Makefile.am
@@ -26,35 +26,25 @@ AM_CFLAGS = -DHAVE_XWIN_CONFIG_H $(DIX_CFLAGS) \
-I$(top_srcdir)/hw/xwin/
glwrap.c: generated_gl_wrappers.c
-wgl_ext_api.c: generated_wgl_wrappers.c wglext.h
-wgl_ext_api.h: wglext.h
+wgl_ext_api.c: generated_wgl_wrappers.c
indirect.c: wgl_ext_api.h
-SPEC_FILES = gl.spec gl.tm wglext.spec wgl.tm
+# we expect to find OpenGL spec files in a known place
+# if they aren't packaged for your platform, you can populate this directory with the following commands
+# wget http://www.opengl.org/registry/api/gl.spec
+# wget http://www.opengl.org/registry/api/gl.tm
+# wget http://www.opengl.org/registry/api/wglext.spec
+# wget http://www.opengl.org/registry/api/wgl.tm
-gl.spec:
- wget http://www.opengl.org/registry/api/gl.spec
+OPENGL_SPEC_DIR = /usr/share/opengl/spec
-gl.tm:
- wget http://www.opengl.org/registry/api/gl.tm
+generated_gl_wrappers.c: gen_gl_wrappers.py $(OPENGL_SPEC_DIR)/gl.spec $(OPENGL_SPEC_DIR)/gl.tm
+ $(srcdir)/gen_gl_wrappers.py --spec=$(OPENGL_SPEC_DIR)/gl.spec --typemap=$(OPENGL_SPEC_DIR)/gl.tm --dispatch-header=$(top_srcdir)/glx/dispatch.h --staticwrappers >generated_gl_wrappers.c
-wglext.spec:
- wget http://www.opengl.org/registry/api/wglext.spec
-
-wgl.tm:
- wget http://www.opengl.org/registry/api/wgl.tm
-
-generated_gl_wrappers.c: gen_gl_wrappers.py gl.spec gl.tm
- $(srcdir)/gen_gl_wrappers.py --spec=$(srcdir)/gl.spec --typemap=$(srcdir)/gl.tm --dispatch-header=$(top_srcdir)/glx/dispatch.h --staticwrappers >generated_gl_wrappers.c
-
-generated_wgl_wrappers.c: gen_gl_wrappers.py wglext.spec wgl.tm
- $(srcdir)/gen_gl_wrappers.py --spec=$(srcdir)/wglext.spec --typemap=$(srcdir)/wgl.tm --prefix=wgl --preresolve >generated_wgl_wrappers.c
-
-wglext.h:
- wget http://www.opengl.org/registry/api/wglext.h
+generated_wgl_wrappers.c: gen_gl_wrappers.py $(OPENGL_SPEC_DIR)/wglext.spec $(OPENGL_SPEC_DIR)/wgl.tm
+ $(srcdir)/gen_gl_wrappers.py --spec=$(OPENGL_SPEC_DIR)/wglext.spec --typemap=$(OPENGL_SPEC_DIR)/wgl.tm --prefix=wgl --preresolve >generated_wgl_wrappers.c
BUILT_SOURCES = generated_gl_wrappers.c generated_wgl_wrappers.c
CLEANFILES = $(BUILT_SOURCES)
-DISTCLEANFILES = $(SPEC_FILES) wglext.h
-EXTRA_DIST = gen_gl_wrappers.py $(SPEC_FILES) wglext.h
+EXTRA_DIST = gen_gl_wrappers.py
--
1.7.3.3
--------------070107040608070700020209--
More information about the xorg-devel
mailing list