summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Lee <john_lee@openmoko.org>2008-08-25 09:05:18 +0000
committerJohn Lee <john_lee@openmoko.org>2008-08-25 09:05:18 +0000
commitad284adbc15624a03ffa9d912bcd59d7ac5c4a0a (patch)
tree59a52194854c8fddd3d4ded9acbb08b31185e0cc
parentccb0eb36f2d2d78c68f631812d07af4c0181130d (diff)
mesa-full_7.0.2.bb: modified from mesa_7.0.2 but added libglut and demos.
this recipe will also build glut and demos, xdemos, etc. new packages libglut and mesa-utils added.
-rw-r--r--packages/mesa/mesa-full-7.0.2/.mtn2git_empty0
-rw-r--r--packages/mesa/mesa-full-7.0.2/fix-host-compile.patch30
-rw-r--r--packages/mesa/mesa-full-7.0.2/fix-progs-makefile.patch65
-rw-r--r--packages/mesa/mesa-full-7.0.2/mklib-rpath-link.patch23
-rw-r--r--packages/mesa/mesa-full_7.0.2.bb20
5 files changed, 138 insertions, 0 deletions
diff --git a/packages/mesa/mesa-full-7.0.2/.mtn2git_empty b/packages/mesa/mesa-full-7.0.2/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/mesa/mesa-full-7.0.2/.mtn2git_empty
diff --git a/packages/mesa/mesa-full-7.0.2/fix-host-compile.patch b/packages/mesa/mesa-full-7.0.2/fix-host-compile.patch
new file mode 100644
index 0000000000..d24d03d379
--- /dev/null
+++ b/packages/mesa/mesa-full-7.0.2/fix-host-compile.patch
@@ -0,0 +1,30 @@
+--- /src/mesa/x86/orig-Makefile 2005-07-01 04:54:38.000000000 +0300
++++ /src/mesa/x86/Makefile 2007-06-07 21:52:31.000000000 +0300
+@@ -5,6 +5,7 @@
+
+
+ INCLUDE_DIRS = \
++ -I/usr/include \
+ -I$(TOP)/include/GL \
+ -I$(TOP)/include \
+ -I.. \
+@@ -13,6 +14,10 @@
+ -I../glapi \
+ -I../tnl
+
++OPT_FLAGS_host = -fexpensive-optimizations -fomit-frame-pointer -frename-registers -Os
++
++CFLAGS_host = -Wall -Wmissing-prototypes $(OPT_FLAGS_host) $(PIC_FLAGS) $(ARCH_FLAGS) \
++ $(DEFINES) $(ASM_FLAGS) $(X11_INCLUDES) -std=c99 -ffast-math
+
+ default: gen_matypes matypes.h
+
+@@ -21,7 +26,7 @@
+
+
+ gen_matypes: gen_matypes.c
+- $(CC) $(INCLUDE_DIRS) $(CFLAGS) gen_matypes.c -o gen_matypes
++ $(CC) $(INCLUDE_DIRS) $(CFLAGS_host) gen_matypes.c -o gen_matypes
+
+ # need some special rules here, unfortunately
+ matypes.h: ../main/mtypes.h ../tnl/t_context.h gen_matypes
diff --git a/packages/mesa/mesa-full-7.0.2/fix-progs-makefile.patch b/packages/mesa/mesa-full-7.0.2/fix-progs-makefile.patch
new file mode 100644
index 0000000000..727ede0eb9
--- /dev/null
+++ b/packages/mesa/mesa-full-7.0.2/fix-progs-makefile.patch
@@ -0,0 +1,65 @@
+Index: Mesa-7.0.2/progs/demos/Makefile
+===================================================================
+--- Mesa-7.0.2.orig/progs/demos/Makefile 2008-08-22 15:52:16.000000000 +0800
++++ Mesa-7.0.2/progs/demos/Makefile 2008-08-22 15:52:33.000000000 +0800
+@@ -13,7 +13,7 @@
+
+ LIB_DEP = $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME) $(TOP)/$(LIB_DIR)/$(GLU_LIB_NAME) $(TOP)/$(LIB_DIR)/$(GLUT_LIB_NAME)
+
+-LIBS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) $(APP_LIB_DEPS)
++LIBS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) $(APP_LIB_DEPS) -lstdc++
+
+ PROGS = \
+ arbfplight \
+Index: Mesa-7.0.2/progs/glsl/Makefile
+===================================================================
+--- Mesa-7.0.2.orig/progs/glsl/Makefile 2008-08-22 15:56:37.000000000 +0800
++++ Mesa-7.0.2/progs/glsl/Makefile 2008-08-22 15:56:52.000000000 +0800
+@@ -7,7 +7,7 @@
+
+ LIB_DEP = $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME) $(TOP)/$(LIB_DIR)/$(GLU_LIB_NAME) $(TOP)/$(LIB_DIR)/$(GLUT_LIB_NAME)
+
+-LIBS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) $(APP_LIB_DEPS)
++LIBS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) $(APP_LIB_DEPS) -lstdc++
+
+ PROGS = \
+ brick \
+Index: Mesa-7.0.2/progs/redbook/Makefile
+===================================================================
+--- Mesa-7.0.2.orig/progs/redbook/Makefile 2008-08-22 15:55:10.000000000 +0800
++++ Mesa-7.0.2/progs/redbook/Makefile 2008-08-22 15:55:27.000000000 +0800
+@@ -7,7 +7,7 @@
+
+ LIB_DEP = $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME) $(TOP)/$(LIB_DIR)/$(GLU_LIB_NAME) $(TOP)/$(LIB_DIR)/$(GLUT_LIB_NAME)
+
+-LIBS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) $(APP_LIB_DEPS)
++LIBS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) $(APP_LIB_DEPS) -lstdc++
+
+ PROGS = aaindex aapoly aargb accanti accpersp alpha alpha3D anti \
+ bezcurve bezmesh checker clip colormat cube depthcue dof \
+Index: Mesa-7.0.2/progs/samples/Makefile
+===================================================================
+--- Mesa-7.0.2.orig/progs/samples/Makefile 2008-08-22 15:56:01.000000000 +0800
++++ Mesa-7.0.2/progs/samples/Makefile 2008-08-22 15:56:13.000000000 +0800
+@@ -7,7 +7,7 @@
+
+ LIB_DEP = $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME) $(TOP)/$(LIB_DIR)/$(GLU_LIB_NAME) $(TOP)/$(LIB_DIR)/$(GLUT_LIB_NAME)
+
+-LIBS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) $(APP_LIB_DEPS)
++LIBS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) $(APP_LIB_DEPS) -lstdc++
+
+ PROGS = accum bitmap1 bitmap2 blendeq blendxor copy cursor depth eval fog \
+ font line logo nurb olympic overlay point prim quad select \
+Index: Mesa-7.0.2/progs/xdemos/Makefile
+===================================================================
+--- Mesa-7.0.2.orig/progs/xdemos/Makefile 2008-08-22 15:57:11.000000000 +0800
++++ Mesa-7.0.2/progs/xdemos/Makefile 2008-08-22 15:57:22.000000000 +0800
+@@ -8,7 +8,7 @@
+
+ LIB_DEP = $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME) $(TOP)/$(LIB_DIR)/$(GLU_LIB_NAME)
+
+-LIBS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) $(APP_LIB_DEPS)
++LIBS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) $(APP_LIB_DEPS) -lstdc++
+
+ PROGS = glthreads \
+ glxdemo \
diff --git a/packages/mesa/mesa-full-7.0.2/mklib-rpath-link.patch b/packages/mesa/mesa-full-7.0.2/mklib-rpath-link.patch
new file mode 100644
index 0000000000..618f5b57ed
--- /dev/null
+++ b/packages/mesa/mesa-full-7.0.2/mklib-rpath-link.patch
@@ -0,0 +1,23 @@
+--- /tmp/mklib 2007-12-08 11:03:23.000000000 +0100
++++ Mesa-7.0.2/bin/mklib 2007-12-08 11:04:02.509863000 +0100
+@@ -106,6 +106,9 @@
+ -L*)
+ DEPS="$DEPS $1"
+ ;;
++ -Wl*)
++ DEPS="$DEPS $1"
++ ;;
+ -pthread)
+ # this is a special case (see bugzilla 10876)
+ DEPS="$DEPS $1"
+--- /tmp/default 2007-12-08 11:04:17.000000000 +0100
++++ Mesa-7.0.2/configs/default 2007-12-08 11:05:06.279863000 +0100
+@@ -76,7 +76,7 @@
+ GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) $(EXTRA_LIB_PATH) -lXt -lX11
+
+ # Program dependencies - specific GL/glut libraries added in Makefiles
+-APP_LIB_DEPS = -lm
++APP_LIB_DEPS = $(EXTRA_LIB_PATH) -lm
+
+
+
diff --git a/packages/mesa/mesa-full_7.0.2.bb b/packages/mesa/mesa-full_7.0.2.bb
new file mode 100644
index 0000000000..bac217b71d
--- /dev/null
+++ b/packages/mesa/mesa-full_7.0.2.bb
@@ -0,0 +1,20 @@
+include mesa-mesa.inc
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/mesa3d/MesaLib-${PV}.tar.bz2 \
+ ${SOURCEFORGE_MIRROR}/mesa3d/MesaGLUT-${PV}.tar.bz2 \
+ ${SOURCEFORGE_MIRROR}/mesa3d/MesaDemos-${PV}.tar.bz2 \
+ file://mklib-rpath-link.patch;patch=1 \
+ file://fix-host-compile.patch;patch=1 \
+ file://fix-progs-makefile.patch;patch=1 \
+ "
+
+do_install_append = "install -d ${D}${bindir}; \
+ for f in glxgears glxheads glxdemo glxinfo; do \
+ cp progs/xdemos/${f} ${D}${bindir}; \
+ done"
+
+PACKAGES =+ "libglut libglut-dev mesa-utils"
+
+FILES_libglut = "${libdir}/libglut.so.*"
+FILES_libglut-dev = "${libdir}/libglut.* ${includedir}/GL/glut*"
+FILES_mesa-utils = "${bindir}/*"