summaryrefslogtreecommitdiff
path: root/meta/packages/mesa
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2008-08-11 21:16:27 +0000
committerRichard Purdie <richard@openedhand.com>2008-08-11 21:16:27 +0000
commit449860be145d7769d52c36c5d243857e69ef4071 (patch)
tree1490560add0d00ef4bae6602b630de041441e607 /meta/packages/mesa
parentfc05d6187895a3b8e51ccb84e5232c6a40f44c46 (diff)
downloadopenembedded-core-449860be145d7769d52c36c5d243857e69ef4071.tar.gz
openembedded-core-449860be145d7769d52c36c5d243857e69ef4071.tar.bz2
openembedded-core-449860be145d7769d52c36c5d243857e69ef4071.tar.xz
openembedded-core-449860be145d7769d52c36c5d243857e69ef4071.zip
mesa: Add from OE.dev
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@5051 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta/packages/mesa')
-rw-r--r--meta/packages/mesa/mesa-7.0.2/fix-host-compile.patch30
-rw-r--r--meta/packages/mesa/mesa-7.0.2/mklib-rpath-link.patch23
-rw-r--r--meta/packages/mesa/mesa-common.inc9
-rw-r--r--meta/packages/mesa/mesa-mesa.inc41
-rw-r--r--meta/packages/mesa/mesa_7.0.2.bb6
5 files changed, 109 insertions, 0 deletions
diff --git a/meta/packages/mesa/mesa-7.0.2/fix-host-compile.patch b/meta/packages/mesa/mesa-7.0.2/fix-host-compile.patch
new file mode 100644
index 000000000..d24d03d37
--- /dev/null
+++ b/meta/packages/mesa/mesa-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/meta/packages/mesa/mesa-7.0.2/mklib-rpath-link.patch b/meta/packages/mesa/mesa-7.0.2/mklib-rpath-link.patch
new file mode 100644
index 000000000..618f5b57e
--- /dev/null
+++ b/meta/packages/mesa/mesa-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/meta/packages/mesa/mesa-common.inc b/meta/packages/mesa/mesa-common.inc
new file mode 100644
index 000000000..18e9b4ebe
--- /dev/null
+++ b/meta/packages/mesa/mesa-common.inc
@@ -0,0 +1,9 @@
+SECTION = "x11"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/mesa3d/MesaLib-${PV}.tar.bz2 \
+ file://mklib-rpath-link.patch;patch=1"
+S = "${WORKDIR}/Mesa-${PV}"
+
+LICENSE = "LGPL"
+
+DEPENDS = "makedepend-native xf86vidmodeproto glproto virtual/libx11 libxext libxxf86vm libxi libxmu libice"
diff --git a/meta/packages/mesa/mesa-mesa.inc b/meta/packages/mesa/mesa-mesa.inc
new file mode 100644
index 000000000..d794f0c09
--- /dev/null
+++ b/meta/packages/mesa/mesa-mesa.inc
@@ -0,0 +1,41 @@
+include mesa-common.inc
+
+PACKAGES =+ "libglu libglu-dev libosmesa libosmesa-dev libgl libgl-dev"
+
+FILES_libgl = "${libdir}/libGL.so.*"
+FILES_libglu = "${libdir}/libGLU.so.*"
+FILES_libosmesa = "${libdir}/libOSMesa.so.*"
+
+FILES_libgl-dev = "${libdir}/libGL.* ${includedir}/GL"
+FILES_libglu-dev = "${libdir}/libGLU.* ${includedir}/GL/glu*.h"
+FILES_libosmesa-dev = "${libdir}/libOSMesa.* ${includedir}/osmesa.h"
+
+do_configure() {
+ cd configs
+
+ cp linux current
+ sed -e "s%CC *= *.*%CC = ${CC}%" -i current
+ sed -e "s%CXX *= *.*%CXX = ${CXX}%" -i current
+ sed -e "s%LD *= *.*%LD = ${LD}%" -i current
+ sed -e "s%OPT_FLAGS *= *.*%OPT_FLAGS = ${TARGET_CFLAGS}%" -i current
+ sed -e "s%X11_INCLUDES *= *.*%X11_INCLUDES = -I${STAGING_INCDIR}/X11%" -i current
+ sed -e "s%EXTRA_LIB_PATH *= *.*%EXTRA_LIB_PATH = ${LDFLAGS}%" -i current
+ sed -i s:\$\(CC\):gcc:g ../src/mesa/x86/Makefile
+ echo "SRC_DIRS = mesa glu glut/glx" >> current
+}
+
+do_compile() {
+ oe_runmake default
+}
+
+do_install() {
+ install -d ${D}${libdir}
+ cp -pP lib/* ${D}${libdir}/
+ install -d ${D}${includedir}
+ cp -R include/GL ${D}${includedir}/
+}
+
+do_stage() {
+ cp -pP lib/* ${STAGING_LIBDIR}/
+ cp -R include/GL ${STAGING_INCDIR}/
+}
diff --git a/meta/packages/mesa/mesa_7.0.2.bb b/meta/packages/mesa/mesa_7.0.2.bb
new file mode 100644
index 000000000..3eb1fbef8
--- /dev/null
+++ b/meta/packages/mesa/mesa_7.0.2.bb
@@ -0,0 +1,6 @@
+include mesa-mesa.inc
+
+SRC_URI_append = " file://fix-host-compile.patch;patch=1 "
+
+
+