diff options
| author | Richard Purdie <richard@openedhand.com> | 2008-08-11 21:16:27 +0000 |
|---|---|---|
| committer | Richard Purdie <richard@openedhand.com> | 2008-08-11 21:16:27 +0000 |
| commit | 449860be145d7769d52c36c5d243857e69ef4071 (patch) | |
| tree | 1490560add0d00ef4bae6602b630de041441e607 | |
| parent | fc05d6187895a3b8e51ccb84e5232c6a40f44c46 (diff) | |
| download | poky-449860be145d7769d52c36c5d243857e69ef4071.tar.gz | |
mesa: Add from OE.dev
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@5051 311d38ba-8fff-0310-9ca6-ca027cbcb966
| -rw-r--r-- | meta/packages/mesa/mesa-7.0.2/fix-host-compile.patch | 30 | ||||
| -rw-r--r-- | meta/packages/mesa/mesa-7.0.2/mklib-rpath-link.patch | 23 | ||||
| -rw-r--r-- | meta/packages/mesa/mesa-common.inc | 9 | ||||
| -rw-r--r-- | meta/packages/mesa/mesa-mesa.inc | 41 | ||||
| -rw-r--r-- | meta/packages/mesa/mesa_7.0.2.bb | 6 |
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 0000000000..d24d03d379 --- /dev/null +++ b/meta/packages/mesa/mesa-7.0.2/fix-host-compile.patch | |||
| @@ -0,0 +1,30 @@ | |||
| 1 | --- /src/mesa/x86/orig-Makefile 2005-07-01 04:54:38.000000000 +0300 | ||
| 2 | +++ /src/mesa/x86/Makefile 2007-06-07 21:52:31.000000000 +0300 | ||
| 3 | @@ -5,6 +5,7 @@ | ||
| 4 | |||
| 5 | |||
| 6 | INCLUDE_DIRS = \ | ||
| 7 | + -I/usr/include \ | ||
| 8 | -I$(TOP)/include/GL \ | ||
| 9 | -I$(TOP)/include \ | ||
| 10 | -I.. \ | ||
| 11 | @@ -13,6 +14,10 @@ | ||
| 12 | -I../glapi \ | ||
| 13 | -I../tnl | ||
| 14 | |||
| 15 | +OPT_FLAGS_host = -fexpensive-optimizations -fomit-frame-pointer -frename-registers -Os | ||
| 16 | + | ||
| 17 | +CFLAGS_host = -Wall -Wmissing-prototypes $(OPT_FLAGS_host) $(PIC_FLAGS) $(ARCH_FLAGS) \ | ||
| 18 | + $(DEFINES) $(ASM_FLAGS) $(X11_INCLUDES) -std=c99 -ffast-math | ||
| 19 | |||
| 20 | default: gen_matypes matypes.h | ||
| 21 | |||
| 22 | @@ -21,7 +26,7 @@ | ||
| 23 | |||
| 24 | |||
| 25 | gen_matypes: gen_matypes.c | ||
| 26 | - $(CC) $(INCLUDE_DIRS) $(CFLAGS) gen_matypes.c -o gen_matypes | ||
| 27 | + $(CC) $(INCLUDE_DIRS) $(CFLAGS_host) gen_matypes.c -o gen_matypes | ||
| 28 | |||
| 29 | # need some special rules here, unfortunately | ||
| 30 | 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 0000000000..618f5b57ed --- /dev/null +++ b/meta/packages/mesa/mesa-7.0.2/mklib-rpath-link.patch | |||
| @@ -0,0 +1,23 @@ | |||
| 1 | --- /tmp/mklib 2007-12-08 11:03:23.000000000 +0100 | ||
| 2 | +++ Mesa-7.0.2/bin/mklib 2007-12-08 11:04:02.509863000 +0100 | ||
| 3 | @@ -106,6 +106,9 @@ | ||
| 4 | -L*) | ||
| 5 | DEPS="$DEPS $1" | ||
| 6 | ;; | ||
| 7 | + -Wl*) | ||
| 8 | + DEPS="$DEPS $1" | ||
| 9 | + ;; | ||
| 10 | -pthread) | ||
| 11 | # this is a special case (see bugzilla 10876) | ||
| 12 | DEPS="$DEPS $1" | ||
| 13 | --- /tmp/default 2007-12-08 11:04:17.000000000 +0100 | ||
| 14 | +++ Mesa-7.0.2/configs/default 2007-12-08 11:05:06.279863000 +0100 | ||
| 15 | @@ -76,7 +76,7 @@ | ||
| 16 | GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) $(EXTRA_LIB_PATH) -lXt -lX11 | ||
| 17 | |||
| 18 | # Program dependencies - specific GL/glut libraries added in Makefiles | ||
| 19 | -APP_LIB_DEPS = -lm | ||
| 20 | +APP_LIB_DEPS = $(EXTRA_LIB_PATH) -lm | ||
| 21 | |||
| 22 | |||
| 23 | |||
diff --git a/meta/packages/mesa/mesa-common.inc b/meta/packages/mesa/mesa-common.inc new file mode 100644 index 0000000000..18e9b4ebed --- /dev/null +++ b/meta/packages/mesa/mesa-common.inc | |||
| @@ -0,0 +1,9 @@ | |||
| 1 | SECTION = "x11" | ||
| 2 | |||
| 3 | SRC_URI = "${SOURCEFORGE_MIRROR}/mesa3d/MesaLib-${PV}.tar.bz2 \ | ||
| 4 | file://mklib-rpath-link.patch;patch=1" | ||
| 5 | S = "${WORKDIR}/Mesa-${PV}" | ||
| 6 | |||
| 7 | LICENSE = "LGPL" | ||
| 8 | |||
| 9 | 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 0000000000..d794f0c097 --- /dev/null +++ b/meta/packages/mesa/mesa-mesa.inc | |||
| @@ -0,0 +1,41 @@ | |||
| 1 | include mesa-common.inc | ||
| 2 | |||
| 3 | PACKAGES =+ "libglu libglu-dev libosmesa libosmesa-dev libgl libgl-dev" | ||
| 4 | |||
| 5 | FILES_libgl = "${libdir}/libGL.so.*" | ||
| 6 | FILES_libglu = "${libdir}/libGLU.so.*" | ||
| 7 | FILES_libosmesa = "${libdir}/libOSMesa.so.*" | ||
| 8 | |||
| 9 | FILES_libgl-dev = "${libdir}/libGL.* ${includedir}/GL" | ||
| 10 | FILES_libglu-dev = "${libdir}/libGLU.* ${includedir}/GL/glu*.h" | ||
| 11 | FILES_libosmesa-dev = "${libdir}/libOSMesa.* ${includedir}/osmesa.h" | ||
| 12 | |||
| 13 | do_configure() { | ||
| 14 | cd configs | ||
| 15 | |||
| 16 | cp linux current | ||
| 17 | sed -e "s%CC *= *.*%CC = ${CC}%" -i current | ||
| 18 | sed -e "s%CXX *= *.*%CXX = ${CXX}%" -i current | ||
| 19 | sed -e "s%LD *= *.*%LD = ${LD}%" -i current | ||
| 20 | sed -e "s%OPT_FLAGS *= *.*%OPT_FLAGS = ${TARGET_CFLAGS}%" -i current | ||
| 21 | sed -e "s%X11_INCLUDES *= *.*%X11_INCLUDES = -I${STAGING_INCDIR}/X11%" -i current | ||
| 22 | sed -e "s%EXTRA_LIB_PATH *= *.*%EXTRA_LIB_PATH = ${LDFLAGS}%" -i current | ||
| 23 | sed -i s:\$\(CC\):gcc:g ../src/mesa/x86/Makefile | ||
| 24 | echo "SRC_DIRS = mesa glu glut/glx" >> current | ||
| 25 | } | ||
| 26 | |||
| 27 | do_compile() { | ||
| 28 | oe_runmake default | ||
| 29 | } | ||
| 30 | |||
| 31 | do_install() { | ||
| 32 | install -d ${D}${libdir} | ||
| 33 | cp -pP lib/* ${D}${libdir}/ | ||
| 34 | install -d ${D}${includedir} | ||
| 35 | cp -R include/GL ${D}${includedir}/ | ||
| 36 | } | ||
| 37 | |||
| 38 | do_stage() { | ||
| 39 | cp -pP lib/* ${STAGING_LIBDIR}/ | ||
| 40 | cp -R include/GL ${STAGING_INCDIR}/ | ||
| 41 | } | ||
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 0000000000..3eb1fbef8b --- /dev/null +++ b/meta/packages/mesa/mesa_7.0.2.bb | |||
| @@ -0,0 +1,6 @@ | |||
| 1 | include mesa-mesa.inc | ||
| 2 | |||
| 3 | SRC_URI_append = " file://fix-host-compile.patch;patch=1 " | ||
| 4 | |||
| 5 | |||
| 6 | |||
