mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-23 04:00:05 +02:00
Add Mesa3D optional package. Used to compile Haiku
This commit is contained in:
24
sys-libs/mesa/mesa-9.0.bep
Normal file
24
sys-libs/mesa/mesa-9.0.bep
Normal file
@@ -0,0 +1,24 @@
|
||||
###############################################################
|
||||
# THIS IS NOT FOR GENERAL USE!
|
||||
# This builds a buildpackage for the Haiku build system to link
|
||||
# the OpenGL kit!!
|
||||
###############################################################
|
||||
|
||||
DESCRIPTION="Mesa3D is a multi-platform GL implementation"
|
||||
HOMEPAGE="http://www.freedesktop.org/"
|
||||
SRC_URI="ftp://freedesktop.org/pub/mesa/9.0/MesaLib-9.0.tar.bz2"
|
||||
REVISION="1"
|
||||
STATUS_HAIKU="stable"
|
||||
DEPEND="scons"
|
||||
CHECKSUM_MD5="60e557ce407be3732711da484ab3db6c"
|
||||
MESSAGE="This port only builds with gcc4. Not for general use."
|
||||
BUILD {
|
||||
cd Mesa-9.0
|
||||
scons
|
||||
cd ..
|
||||
sh $(haikuporter -t)/sys-libs/mesa/mesapkg-9.0.sh ./Mesa-9.0
|
||||
echo "There should be a Mesa OptionalBuild package in your home if everything went well!"
|
||||
}
|
||||
|
||||
LICENSE="MIT"
|
||||
COPYRIGHT="Copyright (C) 1999-2012 Brian Paul All Rights Reserved."
|
||||
74
sys-libs/mesa/mesapkg-9.0.sh
Normal file
74
sys-libs/mesa/mesapkg-9.0.sh
Normal file
@@ -0,0 +1,74 @@
|
||||
#!/bin/bash
|
||||
# Mesa-O-Matic
|
||||
# Copyright 2011-2012, Alexander von Gluck IV
|
||||
# Released under the terms of the MIT license
|
||||
|
||||
# This script creates an optional package containing the
|
||||
# the headers and binary code needed by the opengl kit
|
||||
# to link libGL.so
|
||||
|
||||
# This script is run against a *COMPILED* Mesa source tree
|
||||
|
||||
echo " Welcome to Mesa-O-Matic!"
|
||||
echo "-=-=-=-=-=-=-=-=-=-=-=-=-="
|
||||
echo ""
|
||||
|
||||
DEBUG=0
|
||||
|
||||
#######################################################################
|
||||
# END CONFIG DATA, Dragons below!
|
||||
#######################################################################
|
||||
|
||||
if [[ $( uname ) != "Haiku" ]]; then
|
||||
echo "*************************************"
|
||||
echo " I need to be run on a Haiku system!!"
|
||||
echo "*************************************"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ -z $1 ]]; then
|
||||
echo ""
|
||||
echo "Usage: $0 <compiled mesa location>"
|
||||
echo ""
|
||||
exit 1
|
||||
fi
|
||||
|
||||
MESA_TOP="$1"
|
||||
GCC_VER=`gcc -v 2>&1 | tail -1 | awk '{print $3}' | cut -d. -f1`
|
||||
DATESTAMP=`date +"%Y-%m-%d"`
|
||||
|
||||
echo "Bundling gcc$GCC_VER build of Mesa 9.0..."
|
||||
|
||||
cd $MESA_TOP
|
||||
|
||||
#######################################################################
|
||||
# Create Mesa optional pacakge
|
||||
ZIP_HEADERS=""
|
||||
echo "Collecting Mesa headers..."
|
||||
for i in $(find . -name "*.h")
|
||||
do
|
||||
ZIP_HEADERS="$ZIP_HEADERS $i"
|
||||
done
|
||||
|
||||
echo "Collecting required Mesa libraries..."
|
||||
rm -rf lib.haiku
|
||||
mkdir -p lib.haiku
|
||||
for i in $( find . -name "*.a" )
|
||||
do
|
||||
cp $i lib.haiku/
|
||||
done
|
||||
|
||||
if [[ $DEBUG -eq 0 ]]; then
|
||||
echo "Stripping debug symbols from Mesa libraries..."
|
||||
find lib.haiku -exec strip --strip-debug {} \; ;
|
||||
MESADBG=""
|
||||
else
|
||||
MESADBG="-dbg"
|
||||
fi
|
||||
|
||||
echo "Creating Mesa OptionalPackage..."
|
||||
PLATFORM=$( uname -m )
|
||||
ZIP_FILENAME="/boot/home/mesa-9.0${MESADBG}-x86-gcc${GCC_VER}-${DATESTAMP}.zip"
|
||||
zip -r -9 $ZIP_FILENAME $ZIP_HEADERS ./lib.haiku/*
|
||||
|
||||
echo "Great Success! $ZIP_FILENAME created."
|
||||
42
sys-libs/mesa/patches/mesa-9.0.patch
Normal file
42
sys-libs/mesa/patches/mesa-9.0.patch
Normal file
@@ -0,0 +1,42 @@
|
||||
diff -Naur Mesa-9.0/src/mesa/sources.mak Mesa-9.0-haiku/src/mesa/sources.mak
|
||||
--- Mesa-9.0/src/mesa/sources.mak 2012-08-31 23:36:09.036700160 +0000
|
||||
+++ Mesa-9.0-haiku/src/mesa/sources.mak 2012-10-09 13:17:15.991690752 +0000
|
||||
@@ -281,7 +281,6 @@
|
||||
$(SRCDIR)x86/x86_xform.c \
|
||||
$(SRCDIR)x86/3dnow.c \
|
||||
$(SRCDIR)x86/sse.c \
|
||||
- $(SRCDIR)x86/rtasm/x86sse.c \
|
||||
$(SRCDIR)sparc/sparc.c \
|
||||
$(SRCDIR)x86-64/x86-64.c
|
||||
|
||||
diff -Naur Mesa-9.0/src/mesa/tnl/t_vertex_sse.c Mesa-9.0-haiku/src/mesa/tnl/t_vertex_sse.c
|
||||
--- Mesa-9.0/src/mesa/tnl/t_vertex_sse.c 2012-08-31 23:33:41.058458112 +0000
|
||||
+++ Mesa-9.0-haiku/src/mesa/tnl/t_vertex_sse.c 2012-10-09 13:20:34.234356736 +0000
|
||||
@@ -36,7 +36,7 @@
|
||||
|
||||
#if defined(USE_SSE_ASM)
|
||||
|
||||
-#include "x86/rtasm/x86sse.h"
|
||||
+#include "rtasm/rtasm_x86sse.h"
|
||||
#include "x86/common_x86_asm.h"
|
||||
|
||||
|
||||
@@ -356,7 +356,7 @@
|
||||
struct x86_reg vp0 = x86_make_reg(file_XMM, 1);
|
||||
struct x86_reg vp1 = x86_make_reg(file_XMM, 2);
|
||||
struct x86_reg temp2 = x86_make_reg(file_XMM, 3);
|
||||
- GLubyte *fixup, *label;
|
||||
+ GLuint fixup, label;
|
||||
|
||||
/* Push a few regs?
|
||||
*/
|
||||
@@ -658,7 +658,8 @@
|
||||
p.identity = x86_make_reg(file_XMM, 6);
|
||||
p.chan0 = x86_make_reg(file_XMM, 7);
|
||||
|
||||
- if (!x86_init_func_size(&p.func, MAX_SSE_CODE_SIZE)) {
|
||||
+ x86_init_func_size(&p.func, MAX_SSE_CODE_SIZE);
|
||||
+ if (p.func.caps == 0) {
|
||||
vtx->emit = NULL;
|
||||
return;
|
||||
}
|
||||
Reference in New Issue
Block a user