HaikuPorts
  • Login
  • Preferences
  • Help/Guide
  • Wiki
  • Timeline
  • Roadmap
  • View Tickets
  • Search
  • Port Log
  • Blog

Context Navigation

  • Back to Ticket #636

Ticket #636: mesa-9.0.diff

File mesa-9.0.diff, 4.7 KB (added by kallisti5, 3 years ago)
  • sys-libs/mesa/mesa-9.0.bep

     
     1############################################################### 
     2# THIS IS NOT FOR GENERAL USE! 
     3# This builds a buildpackage for the Haiku build system to link 
     4# the OpenGL kit!! 
     5############################################################### 
     6 
     7DESCRIPTION="Mesa3D is a multi-platform GL implementation" 
     8HOMEPAGE="http://www.freedesktop.org/"  
     9SRC_URI="ftp://freedesktop.org/pub/mesa/9.0/MesaLib-9.0.tar.bz2" 
     10REVISION="1" 
     11STATUS_HAIKU="stable" 
     12DEPEND="scons" 
     13CHECKSUM_MD5="60e557ce407be3732711da484ab3db6c" 
     14MESSAGE="This port only builds with gcc4. Not for general use." 
     15BUILD { 
     16        cd Mesa-9.0 
     17        scons 
     18        cd .. 
     19        sh $(haikuporter -t)/sys-libs/mesa/mesapkg-9.0.sh ./Mesa-9.0 
     20} 
     21 
     22LICENSE="MIT" 
     23COPYRIGHT="Copyright (C) 1999-2008  Brian Paul   All Rights Reserved." 
  • sys-libs/mesa/mesapkg-9.0.sh

     
     1#!/bin/bash 
     2# Mesa-O-Matic 
     3# Copyright 2011-2012, Alexander von Gluck IV 
     4 
     5# This script creates an optional package containing the 
     6# the headers and binary code needed by the opengl kit 
     7# to link libGL.so 
     8 
     9# This script is run against a *COMPILED* Mesa source tree 
     10 
     11echo " Welcome to Mesa-O-Matic!" 
     12echo "-=-=-=-=-=-=-=-=-=-=-=-=-=" 
     13echo "" 
     14 
     15DEBUG=0 
     16 
     17####################################################################### 
     18# END CONFIG DATA, Dragons below! 
     19####################################################################### 
     20 
     21if [[ $( uname ) != "Haiku" ]]; then 
     22        echo "*************************************" 
     23        echo " I need to be run on a Haiku system!!" 
     24        echo "*************************************" 
     25        exit 1 
     26fi 
     27 
     28if [[ -z $1 ]]; then 
     29        echo "" 
     30        echo "Usage: $0 <compiled mesa location>" 
     31        echo "" 
     32        exit 1 
     33fi 
     34 
     35MESA_TOP="$1" 
     36GCC_VER=`gcc -v 2>&1 | tail -1 | awk '{print $3}' | cut -d. -f1` 
     37DATESTAMP=`date +"%Y-%m-%d"` 
     38 
     39echo "Bundling gcc$GCC_VER build of Mesa 9.0..." 
     40 
     41cd $MESA_TOP 
     42 
     43####################################################################### 
     44# Create Mesa optional pacakge 
     45ZIP_HEADERS="" 
     46echo "Collecting Mesa headers..." 
     47for i in $(find . -name "*.h") 
     48do 
     49        ZIP_HEADERS="$ZIP_HEADERS $i" 
     50done 
     51 
     52echo "Collecting required Mesa libraries..." 
     53rm -rf lib.haiku 
     54mkdir -p lib.haiku 
     55for i in $( find . -name "*.a" )  
     56do 
     57        cp $i lib.haiku/ 
     58done 
     59 
     60if [[ $DEBUG -eq 0 ]]; then 
     61echo "Stripping debug symbols from Mesa libraries..." 
     62find lib.haiku -exec strip --strip-debug {} \; ; 
     63MESADBG="" 
     64else 
     65MESADBG="-dbg" 
     66fi 
     67 
     68echo "Creating Mesa OptionalPackage..." 
     69PLATFORM=$( uname -m ) 
     70ZIP_FILENAME="/boot/home/mesa-9.0${MESADBG}-x86-gcc${GCC_VER}-${DATESTAMP}.zip" 
     71zip -r -9 $ZIP_FILENAME $ZIP_HEADERS ./lib.haiku/* 
     72 
     73echo "Great Success! $ZIP_FILENAME created." 
  • sys-libs/mesa/patches/mesa-9.0.patch

    Property changes on: sys-libs/mesa/mesapkg-9.0.sh
    ___________________________________________________________________
    Added: svn:executable
       + *
    
     
     1diff -Naur Mesa-9.0/src/mesa/sources.mak Mesa-9.0-haiku/src/mesa/sources.mak 
     2--- Mesa-9.0/src/mesa/sources.mak       2012-08-31 23:36:09.036700160 +0000 
     3+++ Mesa-9.0-haiku/src/mesa/sources.mak 2012-10-09 13:17:15.991690752 +0000 
     4@@ -281,7 +281,6 @@ 
     5        $(SRCDIR)x86/x86_xform.c \ 
     6        $(SRCDIR)x86/3dnow.c \ 
     7        $(SRCDIR)x86/sse.c \ 
     8-       $(SRCDIR)x86/rtasm/x86sse.c \ 
     9        $(SRCDIR)sparc/sparc.c \ 
     10        $(SRCDIR)x86-64/x86-64.c 
     11  
     12diff -Naur Mesa-9.0/src/mesa/tnl/t_vertex_sse.c Mesa-9.0-haiku/src/mesa/tnl/t_vertex_sse.c 
     13--- Mesa-9.0/src/mesa/tnl/t_vertex_sse.c        2012-08-31 23:33:41.058458112 +0000 
     14+++ Mesa-9.0-haiku/src/mesa/tnl/t_vertex_sse.c  2012-10-09 13:20:34.234356736 +0000 
     15@@ -36,7 +36,7 @@ 
     16  
     17 #if defined(USE_SSE_ASM) 
     18  
     19-#include "x86/rtasm/x86sse.h" 
     20+#include "rtasm/rtasm_x86sse.h" 
     21 #include "x86/common_x86_asm.h" 
     22  
     23  
     24@@ -356,7 +356,7 @@ 
     25    struct x86_reg vp0 = x86_make_reg(file_XMM, 1); 
     26    struct x86_reg vp1 = x86_make_reg(file_XMM, 2); 
     27    struct x86_reg temp2 = x86_make_reg(file_XMM, 3); 
     28-   GLubyte *fixup, *label; 
     29+   GLuint fixup, label; 
     30  
     31    /* Push a few regs? 
     32     */ 
     33@@ -658,7 +658,8 @@ 
     34    p.identity = x86_make_reg(file_XMM, 6); 
     35    p.chan0 = x86_make_reg(file_XMM, 7); 
     36  
     37-   if (!x86_init_func_size(&p.func, MAX_SSE_CODE_SIZE)) { 
     38+   x86_init_func_size(&p.func, MAX_SSE_CODE_SIZE); 
     39+   if (p.func.caps == 0) { 
     40       vtx->emit = NULL; 
     41       return; 
     42    } 

Download in other formats:

  • Original Format

Trac Powered

Powered by Trac 0.13dev-r10686
By Edgewall Software.

Visit the Trac open source project at
http://trac.edgewall.org/