[Armadeus-commitlog] SF.net SVN: armadeus: [608] trunk/buildroot/package
Brought to you by:
sszy
|
From: <ar...@us...> - 2007-06-29 17:16:50
|
Revision: 608
http://armadeus.svn.sourceforge.net/armadeus/?rev=608&view=rev
Author: artemys
Date: 2007-06-29 10:16:53 -0700 (Fri, 29 Jun 2007)
Log Message:
-----------
[PACKAGE] Add Mesa support. At that time its only compiling and not tested !
Added Paths:
-----------
trunk/buildroot/package/mesa/
trunk/buildroot/package/mesa/Config.in
trunk/buildroot/package/mesa/mesa.mk
trunk/buildroot/package/mesa/mesa.patch
Added: trunk/buildroot/package/mesa/Config.in
===================================================================
--- trunk/buildroot/package/mesa/Config.in (rev 0)
+++ trunk/buildroot/package/mesa/Config.in 2007-06-29 17:16:53 UTC (rev 608)
@@ -0,0 +1,7 @@
+config BR2_PACKAGE_MESALIB
+ bool "Mesa library"
+ default n
+ select BR2_PACKAGE_GPM
+ help
+ Build MesaGL. It allows you to use OpenGL on your Armadeus board.
+
Added: trunk/buildroot/package/mesa/mesa.mk
===================================================================
--- trunk/buildroot/package/mesa/mesa.mk (rev 0)
+++ trunk/buildroot/package/mesa/mesa.mk 2007-06-29 17:16:53 UTC (rev 608)
@@ -0,0 +1,66 @@
+#############################################################
+#
+# Mesa
+#
+#############################################################
+
+MESALIB_VER:=7.0
+MESALIB_SOURCE:=MesaLib-$(MESALIB_VER).tar.bz2
+MESALIB_DEMOS:=MesaDemos-$(MESALIB_VER).tar.bz2
+MESAGLUT_SOURCE:=MesaGLUT-$(MESALIB_VER).tar.bz2
+MESALIB_SITE:=http://downloads.sourceforge.net/mesa3d
+MESALIB_DIR:=$(BUILD_DIR)/Mesa-$(MESALIB_VER)
+MESALIB_CAT:=bzcat
+MESALIB_PATCH:=mesa.patch
+
+
+$(DL_DIR)/$(MESALIB_SOURCE):
+ $(WGET) -P $(DL_DIR) $(MESALIB_SITE)/$(MESALIB_SOURCE)
+
+$(DL_DIR)/$(MESALIB_DEMOS):
+ $(WGET) -P $(DL_DIR) $(MESALIB_SITE)/$(MESALIB_DEMOS)
+
+$(DL_DIR)/$(MESAGLUT_SOURCE):
+ $(WGET) -P $(DL_DIR) $(MESALIB_SITE)/$(MESAGLUT_SOURCE)
+
+mesa-source: $(DL_DIR)/$(MESALIB_SOURCE) $(DL_DIR)/$(MESALIB_DEMOS)
+
+$(MESALIB_DIR)/.unpacked: $(DL_DIR)/$(MESALIB_SOURCE) $(DL_DIR)/$(MESALIB_DEMOS) $(DL_DIR)/$(MESAGLUT_SOURCE)
+ $(MESALIB_CAT) $(DL_DIR)/$(MESALIB_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
+ $(MESALIB_CAT) $(DL_DIR)/$(MESALIB_DEMOS) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
+ $(MESALIB_CAT) $(DL_DIR)/$(MESAGLUT_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
+ touch $@
+
+$(MESALIB_DIR)/.patched: $(MESALIB_DIR)/.unpacked
+ toolchain/patch-kernel.sh $(MESALIB_DIR) package/mesa $(MESALIB_PATCH)
+ touch $@
+
+$(MESALIB_DIR)/.configured: $(MESALIB_DIR)/.patched
+ touch $@
+
+$(MESALIB_DIR)/.compiled: $(MESALIB_DIR)/.configured
+ (cd $(MESALIB_DIR); \
+ $(MAKE) realclean; \
+ $(MAKE) CC=$(TARGET_CC) CXX=$(TARGET_CXX) linux-fbdev \
+ );
+#arm-linux-osmesa
+ touch $@
+
+MESA mesa: uclibc gpm $(MESALIB_DIR)/.compiled
+
+mesa-clean:
+ (cd $(MESALIB_DIR); \
+ $(MAKE) CC=$(TARGET_CC) clean \
+ );
+
+mesa-dirclean:
+ rm -rf $(MESALIB_DIR)
+
+#############################################################
+#
+# Toplevel Makefile options
+#
+#############################################################
+ifeq ($(strip $(BR2_PACKAGE_MESALIB)),y)
+TARGETS+=mesa
+endif
Added: trunk/buildroot/package/mesa/mesa.patch
===================================================================
--- trunk/buildroot/package/mesa/mesa.patch (rev 0)
+++ trunk/buildroot/package/mesa/mesa.patch 2007-06-29 17:16:53 UTC (rev 608)
@@ -0,0 +1,167 @@
+diff -bruN Mesa-7.0.orig/configs/arm-linux-osmesa Mesa-7.0/configs/arm-linux-osmesa
+--- Mesa-7.0.orig/configs/arm-linux-osmesa 1970-01-01 01:00:00.000000000 +0100
++++ Mesa-7.0/configs/arm-linux-osmesa 2007-06-26 23:00:52.000000000 +0200
+@@ -0,0 +1,25 @@
++# Configuration for building only libOSMesa on Linux, no Xlib driver
++# This doesn't really have any Linux dependencies, so it should be usable
++# on other (gcc-based) systems.
++
++include $(TOP)/configs/default
++
++CONFIG_NAME = arm-linux-osmesa
++
++# Compiler and flags
++CC = gcc
++CXX = g++
++CFLAGS = -O3 -ansi -pedantic -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DPTHREADS
++CXXFLAGS = -O3 -ansi -pedantic -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE
++
++
++# Directories
++SRC_DIRS = mesa
++DRIVER_DIRS = osmesa
++PROGRAM_DIRS = osdemos
++
++
++# Dependencies
++OSMESA_LIB_DEPS = -lm -lpthread
++GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(OSMESA_LIB)
++APP_LIB_DEPS = -lOSMesa
+diff -bruN Mesa-7.0.orig/Makefile Mesa-7.0/Makefile
+--- Mesa-7.0.orig/Makefile 2007-06-22 00:14:38.000000000 +0200
++++ Mesa-7.0/Makefile 2007-06-26 22:31:34.000000000 +0200
+@@ -111,6 +111,7 @@
+ linux-ia64-icc-static \
+ linux-icc \
+ linux-icc-static \
++arm-linux-osmesa \
+ linux-osmesa \
+ linux-osmesa16 \
+ linux-osmesa16-static \
+diff -bruN Mesa-7.0.orig/progs/osdemos/osdemo.c Mesa-7.0/progs/osdemos/osdemo.c
+--- Mesa-7.0.orig/progs/osdemos/osdemo.c 2007-06-26 23:05:40.000000000 +0200
++++ Mesa-7.0/progs/osdemos/osdemo.c 2007-06-26 22:44:58.000000000 +0200
+@@ -22,7 +22,7 @@
+ #include <stdlib.h>
+ #include <string.h>
+ #include "GL/osmesa.h"
+-#include "GL/glu.h"
++/*#include "GL/glu.h"*/
+
+
+ #define SAVE_TARGA
+@@ -30,7 +30,7 @@
+ static int Width = 400;
+ static int Height = 400;
+
+-
++/*
+ static void
+ Sphere(float radius, int slices, int stacks)
+ {
+@@ -50,7 +50,7 @@
+ gluCylinder(q, base, 0.0, height, slices, stacks);
+ gluDeleteQuadric(q);
+ }
+-
++*/
+
+ static void
+ Torus(float innerRadius, float outerRadius, int sides, int rings)
+@@ -131,7 +131,7 @@
+ Torus(0.275, 0.85, 20, 20);
+ glPopMatrix();
+
+- glPushMatrix();
++/* glPushMatrix();
+ glTranslatef(-0.75, -0.5, 0.0);
+ glRotatef(270.0, 1.0, 0.0, 0.0);
+ glMaterialfv( GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, green_mat );
+@@ -143,7 +143,7 @@
+ glMaterialfv( GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, blue_mat );
+ Sphere(1.0, 20, 20);
+ glPopMatrix();
+-
++*/
+ glPopMatrix();
+
+ /* This is very important!!!
+diff -bruN Mesa-7.0.orig/progs/osdemos/ostest1.c Mesa-7.0/progs/osdemos/ostest1.c
+--- Mesa-7.0.orig/progs/osdemos/ostest1.c 2007-06-26 23:05:40.000000000 +0200
++++ Mesa-7.0/progs/osdemos/ostest1.c 2007-06-26 22:47:58.000000000 +0200
+@@ -14,7 +14,7 @@
+ #include <stdlib.h>
+ #include <string.h>
+ #include "GL/osmesa.h"
+-#include "GL/glu.h"
++/*#include "GL/glu.h"*/
+
+
+ #define WIDTH 600
+@@ -23,7 +23,7 @@
+ static GLboolean WriteFiles = GL_FALSE;
+ static GLboolean Gradient = GL_FALSE;
+
+-
++/*
+ static void
+ Sphere(float radius, int slices, int stacks)
+ {
+@@ -43,7 +43,7 @@
+ gluCylinder(q, base, 0.0, height, slices, stacks);
+ gluDeleteQuadric(q);
+ }
+-
++*/
+
+ static void
+ Torus(float innerRadius, float outerRadius, int sides, int rings)
+@@ -225,7 +225,7 @@
+ glMaterialfv( GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, red_mat );
+ Torus(0.275, 0.85, 20, 20);
+ glPopMatrix();
+-
++/*
+ glPushMatrix();
+ glTranslatef(-1.5, -0.5, 0.0);
+ glRotatef(270.0, 1.0, 0.0, 0.0);
+@@ -241,7 +241,7 @@
+ Sphere(1.2, 20, 20);
+ glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
+ glPopMatrix();
+-
++*/
+ #if 0
+ glPushMatrix();
+ glTranslatef(0.75, 0.0, 1.3);
+diff -bruN Mesa-7.0.orig/src/mesa/Makefile Mesa-7.0/src/mesa/Makefile
+--- Mesa-7.0.orig/src/mesa/Makefile 2007-06-22 00:10:54.000000000 +0200
++++ Mesa-7.0/src/mesa/Makefile 2007-06-26 22:31:34.000000000 +0200
+@@ -107,7 +107,7 @@
+
+ stand-alone: depend subdirs $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME) $(TOP)/$(LIB_DIR)/$(OSMESA_LIB_NAME)
+
+-osmesa-only: depend subdirs $(TOP)/$(LIB_DIR)/$(OSMESA_LIB_NAME)
++osmesa-only: depend $(TOP)/$(LIB_DIR)/$(OSMESA_LIB_NAME)
+
+ # Make the GL library
+ $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME): $(STAND_ALONE_OBJECTS)
+@@ -139,13 +139,13 @@
+ depend: $(ALL_SOURCES)
+ @ echo "running $(MKDEP)"
+ @ touch depend
+- @$(MKDEP) $(MKDEP_OPTIONS) $(DEFINES) $(INCLUDE_DIRS) $(ALL_SOURCES) \
+- > /dev/null 2>/dev/null
++ @$(MKDEP) $(MKDEP_OPTIONS) $(DEFINES) $(INCLUDE_DIRS) $(ALL_SOURCES) #\
++ #> /dev/null 2>/dev/null
+
+
+-subdirs:
+- @ (cd x86 ; $(MAKE))
+- @ (cd x86-64 ; $(MAKE))
++#subdirs:
++# @ (cd x86 ; $(MAKE))
++# @ (cd x86-64 ; $(MAKE))
+
+
+ install: default
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|