diff options
Diffstat (limited to 'recipes/mesa')
27 files changed, 686 insertions, 0 deletions
diff --git a/recipes/mesa/files/mklib-cross.patch b/recipes/mesa/files/mklib-cross.patch new file mode 100644 index 0000000000..fbe86e3c4d --- /dev/null +++ b/recipes/mesa/files/mklib-cross.patch @@ -0,0 +1,14 @@ +--- s/bin/mklib~ 2008-02-19 15:30:18.000000000 +0000 ++++ s/bin/mklib 2008-07-27 11:15:25.000000000 +0100 +@@ -204,9 +204,9 @@ + if [ "x$LINK" = "x" ] ; then + # -linker was not specified so set default link command now + if [ $CPLUSPLUS = 1 ] ; then +- LINK=g++ ++ LINK=$CXX + else +- LINK=gcc ++ LINK=$CC + fi + fi + diff --git a/recipes/mesa/files/mklib-rpath-link.patch b/recipes/mesa/files/mklib-rpath-link.patch new file mode 100644 index 0000000000..07361f531a --- /dev/null +++ b/recipes/mesa/files/mklib-rpath-link.patch @@ -0,0 +1,20 @@ +--- Mesa/bin/mklib.orig 2006-06-04 20:56:22.000000000 -0600 ++++ Mesa/bin/mklib 2006-06-04 20:57:04.000000000 -0600 +@@ -98,6 +98,9 @@ + -L*) + DEPS="$DEPS $1" + ;; ++ -Wl*) ++ DEPS="$DEPS $1" ++ ;; + '-cplusplus') + CPLUSPLUS=1 + ;; +--- Mesa/configs/default.orig 2006-06-04 21:01:47.000000000 -0600 ++++ Mesa/configs/default 2006-06-04 21:01:16.000000000 -0600 +@@ -71,4 +71,4 @@ + GLU_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -lm + GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) $(EXTRA_LIB_PATH) -lX11 -lXmu -lXt -lXi -lm + GLW_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) $(EXTRA_LIB_PATH) -lXt -lX11 +-APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm ++APP_LIB_DEPS = -L$(LIB_DIR) $(EXTRA_LIB_PATH) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm diff --git a/recipes/mesa/freeglut_2.4.0.bb b/recipes/mesa/freeglut_2.4.0.bb new file mode 100644 index 0000000000..a244fb23e1 --- /dev/null +++ b/recipes/mesa/freeglut_2.4.0.bb @@ -0,0 +1,26 @@ +DESCRIPTION = "freeglut is a completely OpenSourced alternative to the OpenGL Utility Toolkit (GLUT) library. " +LICENSE = "MIT/X11" + +DEPENDS = "mesa" + +SRC_URI = "http://dfn.dl.sourceforge.net/sourceforge/freeglut/freeglut-${PV}.tar.gz" + +inherit autotools lib_package + +export CCLD="${CXX}" + +do_configure_prepend() { + sed -i -e s:-Werror::g -e s:AC_PROG_CC:AC_PROG_CXX:g configure.ac +} + +do_configure_append() { + for i in $(find . -name "Makefile") ; do + sed -i -e /^CCLD/d $i + done +} + + +do_stage() { + autotools_stage_all +} + diff --git a/recipes/mesa/mesa-6.0.1/Make-config.patch b/recipes/mesa/mesa-6.0.1/Make-config.patch new file mode 100644 index 0000000000..cfe8890e3b --- /dev/null +++ b/recipes/mesa/mesa-6.0.1/Make-config.patch @@ -0,0 +1,26 @@ +--- mesa/Make-config.orig 2004-06-25 13:09:44.000000000 +0100 ++++ mesa/Make-config 2004-06-25 14:18:27.000000000 +0100 +@@ -643,16 +643,16 @@ + "GLUT_LIB = libglut.so" \ + "GLW_LIB = libGLw.so" \ + "OSMESA_LIB = libOSMesa.so" \ +- "CC = gcc" \ +- "CXX = g++" \ +- "CFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DPTHREADS -I/usr/X11R6/include" \ +- "CXXFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE" \ ++ "CC = $(CC)" \ ++ "CXX = $(CXX)" \ ++ "CFLAGS = -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DPTHREADS $(CFLAGS)" \ ++ "CXXFLAGS = -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE $(CXXFLAGS)" \ + "GLUT_CFLAGS = -fexceptions" \ +- "GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread" \ ++ "GL_LIB_DEPS = $(LDFLAGS) -lX11 -lXext -lm -lpthread" \ + "OSMESA_LIB_DEPS = -L$(TOP)/lib -lGL" \ + "GLU_LIB_DEPS = -L$(TOP)/lib -lGL -lm" \ +- "GLUT_LIB_DEPS = -L$(TOP)/lib -lGLU -lGL -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm" \ +- "GLW_LIB_DEPS = -L$(TOP)/lib -lGL -L/usr/X11R6/lib -lXt -lX11" \ ++ "GLUT_LIB_DEPS = $(LDFLAGS) -L$(TOP)/lib -lGLU -lGL -lX11 -lXmu -lXt -lXi -lm" \ ++ "GLW_LIB_DEPS = $(LDFLAGS) -L$(TOP)/lib -lGL -lXt -lX11" \ + "APP_LIB_DEPS = -lglut -lGLU -lGL -lm" + + linux-static: diff --git a/recipes/mesa/mesa-6.0.1/mklib.patch b/recipes/mesa/mesa-6.0.1/mklib.patch new file mode 100644 index 0000000000..7dc1ec76a7 --- /dev/null +++ b/recipes/mesa/mesa-6.0.1/mklib.patch @@ -0,0 +1,22 @@ +--- mesa/bin/mklib.old 2004-06-25 14:08:41.000000000 +0100 ++++ mesa/bin/mklib 2004-06-25 14:23:09.000000000 +0100 +@@ -64,6 +64,7 @@ + '-install') shift 1; INSTALLDIR=$1;; + '-arch') shift 1; ARCH=$1;; + '-archopt') shift 1; ARCHOPT=$1;; ++ -Wl*) DEPS="$DEPS $1";; + -*) echo "mklib: Unknown option: " $1 ; exit 1;; + *) break + esac +@@ -137,9 +138,9 @@ + echo "mklib: Making" $ARCH "shared library: " ${LIBNAME}.so.${VERSION} + + if [ $CPLUSPLUS = 1 ] ; then +- LINK="g++" ++ LINK="$CXX" + else +- LINK="gcc" ++ LINK="$CC" + fi + + # rm any old libs diff --git a/recipes/mesa/mesa-6.5.2/fix-host-compile.patch b/recipes/mesa/mesa-6.5.2/fix-host-compile.patch new file mode 100644 index 0000000000..d24d03d379 --- /dev/null +++ b/recipes/mesa/mesa-6.5.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/recipes/mesa/mesa-6.5.2/mklib-rpath-link.patch b/recipes/mesa/mesa-6.5.2/mklib-rpath-link.patch new file mode 100644 index 0000000000..e59513abfe --- /dev/null +++ b/recipes/mesa/mesa-6.5.2/mklib-rpath-link.patch @@ -0,0 +1,23 @@ +--- Mesa/bin/mklib.orig 2006-06-04 20:56:22.000000000 -0600 ++++ Mesa/bin/mklib 2006-06-04 20:57:04.000000000 -0600 +@@ -98,6 +98,9 @@ + -L*) + DEPS="$DEPS $1" + ;; ++ -Wl*) ++ DEPS="$DEPS $1" ++ ;; + '-cplusplus') + CPLUSPLUS=1 + ;; +--- Mesa-6.5.2/configs/default.old 2007-01-26 11:49:32.000000000 +0000 ++++ Mesa-6.5.2/configs/default 2007-01-26 11:49:49.000000000 +0000 +@@ -73,7 +73,7 @@ + GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -lm + GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) $(EXTRA_LIB_PATH) -lX11 -lXmu -lXt -lXi -lm + GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) $(EXTRA_LIB_PATH) -lXt -lX11 +-APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm ++APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) $(EXTRA_LIB_PATH) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm + + + diff --git a/recipes/mesa/mesa-7.0.2/fix-host-compile.patch b/recipes/mesa/mesa-7.0.2/fix-host-compile.patch new file mode 100644 index 0000000000..d24d03d379 --- /dev/null +++ b/recipes/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/recipes/mesa/mesa-7.0.2/mklib-rpath-link.patch b/recipes/mesa/mesa-7.0.2/mklib-rpath-link.patch new file mode 100644 index 0000000000..618f5b57ed --- /dev/null +++ b/recipes/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/recipes/mesa/mesa-common-old.inc b/recipes/mesa/mesa-common-old.inc new file mode 100644 index 0000000000..18e9b4ebed --- /dev/null +++ b/recipes/mesa/mesa-common-old.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/recipes/mesa/mesa-common.inc b/recipes/mesa/mesa-common.inc new file mode 100644 index 0000000000..9cd10eb3e3 --- /dev/null +++ b/recipes/mesa/mesa-common.inc @@ -0,0 +1,39 @@ +SECTION = "x11" + +DESCRIPTION = "An open source implementation of the OpenGL spec" +HOMEPAGE = "http://mesa3d.org" +LICENSE = "MIT" + +SRC_URI = "${SOURCEFORGE_MIRROR}/mesa3d/MesaLib-${PV}.tar.bz2 \ + ${SOURCEFORGE_MIRROR}/mesa3d/MesaDemos-${PV}.tar.bz2 " +S = "${WORKDIR}/Mesa-${PV}" + +PROVIDES = "virtual/libgl" + +inherit autotools pkgconfig + +EXTRA_OECONF = "--enable-glu \ + --disable-glw \ + --disable-glut \ + " + +require mesa-tls.inc +EXTRA_OECONF += "${@get_tls_setting(bb, d)} " + +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_stage() { + autotools_stage_all + install -d ${STAGING_INCDIR}/GL/ + cp -pPr ${S}/include/GL/internal* ${STAGING_INCDIR}/GL/ +} + + diff --git a/recipes/mesa/mesa-dri_6.5.2.bb b/recipes/mesa/mesa-dri_6.5.2.bb new file mode 100644 index 0000000000..f94ea8b3d2 --- /dev/null +++ b/recipes/mesa/mesa-dri_6.5.2.bb @@ -0,0 +1,41 @@ +include mesa-common-old.inc + +SRC_URI += " file://mklib-cross.patch;patch=1" + +FILESPATH = "${FILE_DIRNAME}/mesa-${PV}:${FILE_DIRNAME}/files:${FILE_DIRNAME}" + +PACKAGES_DYNAMIC = "mesa-dri-driver-*" + +PR = "r2" + +DEPENDS += "libdrm" +# DRI is useless without the kernel drivers +RRECOMMENDS += " kernel-module-drm kernel-module-radeon " + +do_configure() { + cd configs + + ln -sf linux-dri 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" >> current + echo "DRI_DRIVER_INSTALL_DIR = ${D}${libdir}/dri" >> current +} + +do_install() { + oe_runmake -C src/mesa/drivers/dri install +} + +FILES_${PN}-dbg += "${libdir}/dri/.debug" + +python populate_packages_prepend () { + import re, os.path + + do_split_packages(d, root=bb.data.expand('${libdir}/dri', d), file_regex='(.*)_dri\.so', output_pattern='mesa-dri-driver-%s', description='%s DRI driver', extra_depends='') +} + diff --git a/recipes/mesa/mesa-dri_7.0.3.bb b/recipes/mesa/mesa-dri_7.0.3.bb new file mode 100644 index 0000000000..330efb23af --- /dev/null +++ b/recipes/mesa/mesa-dri_7.0.3.bb @@ -0,0 +1,42 @@ +include mesa-common-old.inc + +# suppress mklib-rpath-link patch from mesa-common +SRC_URI = "${SOURCEFORGE_MIRROR}/mesa3d/MesaLib-${PV}.tar.bz2 file://mklib-cross.patch;patch=1" + +FILESPATH = "${FILE_DIRNAME}/mesa-${PV}:${FILE_DIRNAME}/files:${FILE_DIRNAME}" + +PACKAGES_DYNAMIC = "mesa-dri-driver-*" + +PR = "r1" + +DEPENDS += "libdrm" +# DRI is useless without the kernel drivers +RRECOMMENDS += " kernel-module-drm kernel-module-radeon " + +do_configure() { + cd configs + + ln -sf linux-dri 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" >> current + echo "DRI_DRIVER_INSTALL_DIR = ${D}${libdir}/dri" >> current +} + +do_install() { + oe_runmake -C src/mesa/drivers/dri install +} + +FILES_${PN}-dbg += "${libdir}/dri/.debug" + +python populate_packages_prepend () { + import re, os.path + + do_split_packages(d, root=bb.data.expand('${libdir}/dri', d), file_regex='(.*)_dri\.so', output_pattern='mesa-dri-driver-%s', description='%s DRI driver', extra_depends='') +} + diff --git a/recipes/mesa/mesa-dri_7.2.bb b/recipes/mesa/mesa-dri_7.2.bb new file mode 100644 index 0000000000..296a254841 --- /dev/null +++ b/recipes/mesa/mesa-dri_7.2.bb @@ -0,0 +1,28 @@ +include mesa-common.inc + +PROTO_DEPS = "xf86driproto glproto dri2proto expat" +LIB_DEPS = "libdrm virtual/libx11 libxext libxxf86vm libxdamage libxfixes" + +DEPENDS = "${PROTO_DEPS} ${LIB_DEPS}" + +PE = "1" +PR = "r6" + +# most of our targets do not have DRI so will use mesa-xlib +DEFAULT_PREFERENCE = "-1" + +# ASUS EeePC 901 has DRI support so use mesa-dri by default +DEFAULT_PREFERENCE_eee901 = "1" + +PACKAGES =+ "${PN}-xprogs" + +FILES_${PN} += "${libdir}/dri/*.so" +FILES_${PN}-dbg += "${libdir}/dri/.debug/*" +FILES_${PN}-xprogs = "${bindir}/glxdemo ${bindir}/glxgears ${bindir}/glxheads ${bindir}/glxinfo" + +EXTRA_OECONF += "--with-driver=dri --with-dri-drivers=swrast,${MACHINE_DRI_MODULES}" + +do_install_append () { + install -d ${D}/usr/bin + install -m 0755 ${S}/progs/xdemos/{glxdemo,glxgears,glxheads,glxinfo} ${D}/usr/bin/ +} diff --git a/recipes/mesa/mesa-dri_git.bb b/recipes/mesa/mesa-dri_git.bb new file mode 100644 index 0000000000..bca681c76d --- /dev/null +++ b/recipes/mesa/mesa-dri_git.bb @@ -0,0 +1,21 @@ +include mesa-common.inc + +PROTO_DEPS = "xf86driproto glproto dri2proto" +LIB_DEPS = "libdrm virtual/libx11 libxext libxxf86vm libxdamage libxfixes" + +DEPENDS = "${PROTO_DEPS} ${LIB_DEPS}" + +PV = "7.2+gitr${SRCREV}" +PR = "r1" +PE = "1" + +DEFAULT_PREFERENCE = "-1" + +SRC_URI = "git://anongit.freedesktop.org/git/mesa/mesa;protocol=git" +S = "${WORKDIR}/git" + +FILES_${PN} += "${libdir}/dri/*.so" +FILES_${PN}-dbg += "${libdir}/dri/.debug/*" + +EXTRA_OECONF += "--with-driver=dri --with-dri-drivers=swrast,${MACHINE_DRI_MODULES}" + diff --git a/recipes/mesa/mesa-full-7.0.2/fix-host-compile.patch b/recipes/mesa/mesa-full-7.0.2/fix-host-compile.patch new file mode 100644 index 0000000000..d24d03d379 --- /dev/null +++ b/recipes/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/recipes/mesa/mesa-full-7.0.2/fix-progs-makefile.patch b/recipes/mesa/mesa-full-7.0.2/fix-progs-makefile.patch new file mode 100644 index 0000000000..727ede0eb9 --- /dev/null +++ b/recipes/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/recipes/mesa/mesa-full-7.0.2/mklib-rpath-link.patch b/recipes/mesa/mesa-full-7.0.2/mklib-rpath-link.patch new file mode 100644 index 0000000000..618f5b57ed --- /dev/null +++ b/recipes/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/recipes/mesa/mesa-full_7.0.2.bb b/recipes/mesa/mesa-full_7.0.2.bb new file mode 100644 index 0000000000..bac217b71d --- /dev/null +++ b/recipes/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}/*" diff --git a/recipes/mesa/mesa-mesa.inc b/recipes/mesa/mesa-mesa.inc new file mode 100644 index 0000000000..48d171d50d --- /dev/null +++ b/recipes/mesa/mesa-mesa.inc @@ -0,0 +1,41 @@ +include mesa-common-old.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/recipes/mesa/mesa-tls.inc b/recipes/mesa/mesa-tls.inc new file mode 100644 index 0000000000..1472aa7e74 --- /dev/null +++ b/recipes/mesa/mesa-tls.inc @@ -0,0 +1,6 @@ + +def get_tls_setting(bb, d): + # until we have no prober TLS support in uclibc disable it + if bb.data.getVar('TARGET_OS', d, 1).find('uclibc') >= 0 : + return "" + return "--enable-glx-tls" diff --git a/recipes/mesa/mesa-xlib_7.2.bb b/recipes/mesa/mesa-xlib_7.2.bb new file mode 100644 index 0000000000..0035540838 --- /dev/null +++ b/recipes/mesa/mesa-xlib_7.2.bb @@ -0,0 +1,20 @@ +include mesa-common.inc + +PROTO_DEPS = "xf86driproto glproto" +LIB_DEPS = "virtual/libx11 libxext libxxf86vm libxdamage libxfixes" + +DEPENDS = "${PROTO_DEPS} ${LIB_DEPS}" + +PE = "1" +PR = "r4" + +EXTRA_OECONF += "--with-driver=xlib" + +PACKAGES =+ "${PN}-xprogs" + +FILES_${PN}-xprogs = "${bindir}/glxdemo ${bindir}/glxgears ${bindir}/glxheads ${bindir}/glxinfo" + +do_install_append () { + install -d ${D}/${bindir} + install -m 0755 ${S}/progs/xdemos/{glxdemo,glxgears,glxheads,glxinfo} ${D}/${bindir} +} diff --git a/recipes/mesa/mesa_6.0.1.bb b/recipes/mesa/mesa_6.0.1.bb new file mode 100644 index 0000000000..d8c857fef7 --- /dev/null +++ b/recipes/mesa/mesa_6.0.1.bb @@ -0,0 +1,25 @@ +SECTION = "unknown" +SRC_URI = "${SOURCEFORGE_MIRROR}/mesa3d/MesaLib-${PV}.tar.bz2 \ + file://Make-config.patch;patch=1 \ + file://mklib.patch;patch=1" +S = "${WORKDIR}/Mesa-${PV}" +LICENSE = "LGPL" +# gcc-3.4 blows up in gtktext with -frename-registers on arm-linux +CXXFLAGS := "${@'${CXXFLAGS}'.replace('-frename-registers', '')}" +DEPENDS = "makedepend-native" + +do_compile() { + oe_runmake linux CC="${CC}" CXX="${CXX}" CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" LD="${LD}" LDFLAGS="${LDFLAGS}" +} + +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/recipes/mesa/mesa_6.4.1+cvs20060101.bb b/recipes/mesa/mesa_6.4.1+cvs20060101.bb new file mode 100644 index 0000000000..0e9f99684f --- /dev/null +++ b/recipes/mesa/mesa_6.4.1+cvs20060101.bb @@ -0,0 +1,46 @@ +SECTION = "unknown" + +SRCDATE = "20060101" +PV = "6.4.1+cvs${SRCDATE}" + +SRC_URI = "${FREEDESKTOP_CVS}/mesa;module=Mesa;method=pserver;date=${SRCDATE} \ + file://mklib-rpath-link.patch;patch=1" +S = "${WORKDIR}/Mesa" + +LICENSE = "LGPL" + +RDEPENDS = "expat" +DEPENDS = "makedepend-native xf86vidmodeproto glproto virtual/libx11 libxext libxxf86vm libxi libxmu libice" + +# gcc-3.4 blows up in gtktext with -frename-registers on arm-linux +CXXFLAGS := "${@'${CXXFLAGS}'.replace('-frename-registers', '')}" + +do_configure() { + cd configs + + ln -sf 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/recipes/mesa/mesa_6.5.2.bb b/recipes/mesa/mesa_6.5.2.bb new file mode 100644 index 0000000000..79993cc1f1 --- /dev/null +++ b/recipes/mesa/mesa_6.5.2.bb @@ -0,0 +1,8 @@ +PR = "r1" + +include mesa-mesa.inc + +SRC_URI_append = " file://fix-host-compile.patch;patch=1 " + + + diff --git a/recipes/mesa/mesa_7.0.2.bb b/recipes/mesa/mesa_7.0.2.bb new file mode 100644 index 0000000000..3eb1fbef8b --- /dev/null +++ b/recipes/mesa/mesa_7.0.2.bb @@ -0,0 +1,6 @@ +include mesa-mesa.inc + +SRC_URI_append = " file://fix-host-compile.patch;patch=1 " + + + diff --git a/recipes/mesa/mesa_7.2.bb b/recipes/mesa/mesa_7.2.bb new file mode 100644 index 0000000000..43cde679a1 --- /dev/null +++ b/recipes/mesa/mesa_7.2.bb @@ -0,0 +1,2 @@ +# This is a dummy package so OE can use the poky mesa files +require mesa-dri_${PV}.bb |