diff options
author | Donnie Berkholz <donnie@supernova.(none)> | 2006-04-17 22:30:24 -0700 |
---|---|---|
committer | Donnie Berkholz <donnie@supernova.(none)> | 2006-04-17 22:30:24 -0700 |
commit | b084e8250f714a5d67587f1d43f40d5774d25643 (patch) | |
tree | bc819fff34c32bd0c8c4c68df3a846f0b47316ca /media-libs | |
download | dberkholz-b084e8250f714a5d67587f1d43f40d5774d25643.tar.gz dberkholz-b084e8250f714a5d67587f1d43f40d5774d25643.tar.bz2 dberkholz-b084e8250f714a5d67587f1d43f40d5774d25643.zip |
Initial commit of portage overlay.
Diffstat (limited to 'media-libs')
25 files changed, 1277 insertions, 0 deletions
diff --git a/media-libs/glitz/Manifest b/media-libs/glitz/Manifest new file mode 100644 index 0000000..cda30a9 --- /dev/null +++ b/media-libs/glitz/Manifest @@ -0,0 +1,6 @@ +MD5 d41d8cd98f00b204e9800998ecf8427e files/digest-glitz-9999 0 +RMD160 9c1185a5c5e9fc54612808977ee8f548b2258d31 files/digest-glitz-9999 0 +SHA256 e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 files/digest-glitz-9999 0 +MD5 8a7fd2624c6b53a5840940c991cf8fb8 glitz-9999.ebuild 768 +RMD160 60ceeae7d8a242c38dc004dfa1a47c1d770f608d glitz-9999.ebuild 768 +SHA256 04279b50494b86a913fd453ce9d5f501acf81cbf4e90b8bc76573f4654dd6eb6 glitz-9999.ebuild 768 diff --git a/media-libs/glitz/files/digest-glitz-9999 b/media-libs/glitz/files/digest-glitz-9999 new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/media-libs/glitz/files/digest-glitz-9999 diff --git a/media-libs/glitz/glitz-9999.ebuild b/media-libs/glitz/glitz-9999.ebuild new file mode 100644 index 0000000..cf97c08 --- /dev/null +++ b/media-libs/glitz/glitz-9999.ebuild @@ -0,0 +1,32 @@ +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +inherit eutils autotools cvs + +ECVS_SERVER="anoncvs.freedesktop.org:/cvs/cairo" +ECVS_MODULE="glitz" +#ECVS_CO_DATE=${PV##*p} +#ECVS_UP_OPTS="-D ${ECVS_CO_DATE} -dP" +#ECVS_CO_OPTS="-D ${ECVS_CO_DATE}" + +S=${WORKDIR}/${ECVS_MODULE} + +DESCRIPTION="An OpenGL image compositing library" +HOMEPAGE="http://www.freedesktop.org/Software/glitz" +LICENSE="BSD" +SLOT="0" +KEYWORDS="~x86 ~amd64 ~ppc" +IUSE="" +DEPEND="virtual/opengl" + +src_compile() { + eautoreconf || die "autoreconf failed" + econf || die "configure failed" + emake || die "make failed" +} + +src_install() { + make DESTDIR="${D}" install || die "make install failed" + dodoc AUTHORS ChangeLog README TODO +} diff --git a/media-libs/mesa/Manifest b/media-libs/mesa/Manifest new file mode 100644 index 0000000..2d6191c --- /dev/null +++ b/media-libs/mesa/Manifest @@ -0,0 +1,63 @@ +MD5 ae36bba4e878c77dc2e823ce00e98869 files/6.4-dont-install-gles-headers.patch 421 +RMD160 70713f143d080b444089a95712efd227227c523f files/6.4-dont-install-gles-headers.patch 421 +SHA256 8f636c2e09ac7fdab0d06ebe62af5a311b52a03bf7b7bdecf4789a6e30e0777e files/6.4-dont-install-gles-headers.patch 421 +MD5 d6254b7a775480084efcd30d9fb4cbad files/6.4-multilib-fix.patch 535 +RMD160 5ab0237e5096728b38675c9c265cfb2c88009c00 files/6.4-multilib-fix.patch 535 +SHA256 8fe39ec2ca86b206cb0d870d6644f68eb52af209f5bfb6eaad612deee80d754f files/6.4-multilib-fix.patch 535 +MD5 0009bfb15983cd6258cde8ca9ec7134c files/64bit-fix-have-dix-config.patch 645 +RMD160 4a05bcdab2828f9b5ad80df80d63d4767617b756 files/64bit-fix-have-dix-config.patch 645 +SHA256 757a94fe2e76f6ea4d831a3aaf3fac7e344527239a10b014d6900af341e7abab files/64bit-fix-have-dix-config.patch 645 +MD5 c955d3e7a9971b7a32359a45383569f8 files/64bit-fix-indirect-vertex-array.patch 748 +RMD160 b413df73cc43b83931cd25d5e207d3c49078dd55 files/64bit-fix-indirect-vertex-array.patch 748 +SHA256 2e070e5e4aa4b1a1f12ccce290496c5eca92d76819805fe8d529a4f7fd71c82c files/64bit-fix-indirect-vertex-array.patch 748 +MD5 81ac0734b6194da3d9ca40d564303670 files/change-default-dri-driver-dir-X7.1.patch 399 +RMD160 169dd99888a66bf63bc528f183bd4c2b6d16b0f9 files/change-default-dri-driver-dir-X7.1.patch 399 +SHA256 8dbdbad95f47bfc18a366e091ffc1d67ff16da970181626d939a19eed46a212d files/change-default-dri-driver-dir-X7.1.patch 399 +MD5 445388fef1aaba316654749716f66086 files/configurable-dri-dir.patch 361 +RMD160 f837b97daeb02dddca43031ed67eadfca5eba638 files/configurable-dri-dir.patch 361 +SHA256 a11e6d0bad33f9e7aa04de5baab9ab0aeb607165a6ff5bbaa1ed2f6050390feb files/configurable-dri-dir.patch 361 +MD5 573c1cb18905c1d9339a9a84bd9779d8 files/digest-mesa-6.4.2 247 +RMD160 2d14f708463f76c30291f3950a6448c1227fbaf4 files/digest-mesa-6.4.2 247 +SHA256 097fd81c0c397325418ce66f42aa19a137843d8953e4ac9265bc4f90cf2f2ab7 files/digest-mesa-6.4.2 247 +MD5 d41d8cd98f00b204e9800998ecf8427e files/digest-mesa-6.4.2_alpha20060121 0 +RMD160 9c1185a5c5e9fc54612808977ee8f548b2258d31 files/digest-mesa-6.4.2_alpha20060121 0 +SHA256 e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 files/digest-mesa-6.4.2_alpha20060121 0 +MD5 d41d8cd98f00b204e9800998ecf8427e files/digest-mesa-9999 0 +RMD160 9c1185a5c5e9fc54612808977ee8f548b2258d31 files/digest-mesa-9999 0 +SHA256 e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 files/digest-mesa-9999 0 +MD5 f0ebdc72043e76ad7eddc4ad91349927 files/lib/libGL.la 763 +RMD160 a6882fb5d6d8ad195845bdda3bcbbef2aef79099 files/lib/libGL.la 763 +SHA256 0fb9c02b01c9b2306fac89034144bb3e87aedba0dee0a49203aa18fbf0b706bf files/lib/libGL.la 763 +MD5 9abdd26694e6f1d7bd93193f900acc6c files/lib/libGLU.la 752 +RMD160 04de8835526a3472480d7c285dd33d497bcc0bd7 files/lib/libGLU.la 752 +SHA256 e28519d7ae719bc106f7d4239799580474d1b69a2254ede3b2179a5e50655fe5 files/lib/libGLU.la 752 +MD5 ceae0782c8844ebdc68ede6b4d8969d9 files/makedepend-location.patch 375 +RMD160 30e1c4a45cdd2077edd80043911bf05275493195 files/makedepend-location.patch 375 +SHA256 c0ec505e5fb263d4cde901ce9afe3197346acf67372460a2177231be8425e0ab files/makedepend-location.patch 375 +MD5 d7a1589b573e858f7feafdd6a8214975 files/mesa-glx-x11-get-drawable-attribs-fix-1.diff 1866 +RMD160 0103dc43508d950a446df15666d7129e971ba69b files/mesa-glx-x11-get-drawable-attribs-fix-1.diff 1866 +SHA256 91c042914fdbef2f136ae1670d02ad4c7cc1c90c3a942997d34fd5a7101c23c5 files/mesa-glx-x11-get-drawable-attribs-fix-1.diff 1866 +MD5 66e2f35bb026673c9848dc43a22b0120 files/mesa-glx-x11-glxproto-defines.diff 392 +RMD160 840de4171c2a1f82de232f456144fb6edcd47b53 files/mesa-glx-x11-glxproto-defines.diff 392 +SHA256 d735665585ca667305378752a7814c3415d5a08d142dfc2ad1eaa9e8b829e06b files/mesa-glx-x11-glxproto-defines.diff 392 +MD5 7a491058ce29d6ecc9eb5c549dba1c1e files/mesa-radeon-0depthbits.patch 3052 +RMD160 370e8f70e899c0b097d43649886fa0061a1da181 files/mesa-radeon-0depthbits.patch 3052 +SHA256 f77c8ead3bf78dcc241d69542fa1f2c99ca0900c1287a3501d23cce27348a35b files/mesa-radeon-0depthbits.patch 3052 +MD5 9a6eaed5ab1fd6748d543679a335f72c files/r200-copy-pixels-1.patch 2741 +RMD160 ea4933724b3c02e87b790b88382fbda8b0acaad4 files/r200-copy-pixels-1.patch 2741 +SHA256 306c14ac818aba218aa518ada076a46c686e07f08c495a66bd84f63109616200 files/r200-copy-pixels-1.patch 2741 +MD5 20cb86acf1d60d0503005ce55ff02396 files/r300-aet.patch 2876 +RMD160 440f3ea16c5a62a7db539eacba80031e06d2389c files/r300-aet.patch 2876 +SHA256 f304d5a2e4fdb2cb17ee68473d8f6c955311a8fcfede67bb1bd6a4e4b277ae57 files/r300-aet.patch 2876 +MD5 2ee40b299ff00bc83882c4afab34e1e3 files/r300-smooth-lines-1.diff 3515 +RMD160 def782d13c7f7630b29a9da3a871a28ddac56270 files/r300-smooth-lines-1.diff 3515 +SHA256 68cdb9f1490f8b84dcf121f4931ae83b09e4cf8adfadc0fb1d3559b4cc98b6d7 files/r300-smooth-lines-1.diff 3515 +MD5 98634596bb3b55d66e6e60fdbc7590f9 files/r300Fallback-always-return-false.patch 756 +RMD160 c8994d5c46badb26fcce945739bda65405825238 files/r300Fallback-always-return-false.patch 756 +SHA256 fe43a9eb36c3afe095b09be5f066f2b89aca186251fa6350604fb7d53b644c11 files/r300Fallback-always-return-false.patch 756 +MD5 4b3946e65a33435fc06db7b2040e4d5b files/xgl-mesa-stable-180106.diff 6310 +RMD160 d5daadc2b5def792fae54ab4b7508c0ce70f6b7f files/xgl-mesa-stable-180106.diff 6310 +SHA256 27afecd49c2cf80ef9545462e6a86cdd885867f0cbff61ec4b25ed1550a2b06e files/xgl-mesa-stable-180106.diff 6310 +MD5 544d2d4aa9c1c447b14f92007357eda9 mesa-9999.ebuild 9161 +RMD160 949daa8cc0b11239d436ca2a382325c2fdc5fbe7 mesa-9999.ebuild 9161 +SHA256 52388e685edaabd245f9a22062dc80b6151a47b84c2ec455a21e80d1f22e1e6b mesa-9999.ebuild 9161 diff --git a/media-libs/mesa/files/6.4-dont-install-gles-headers.patch b/media-libs/mesa/files/6.4-dont-install-gles-headers.patch new file mode 100644 index 0000000..5bdc0a1 --- /dev/null +++ b/media-libs/mesa/files/6.4-dont-install-gles-headers.patch @@ -0,0 +1,11 @@ +diff -urN Mesa-6.4.orig/bin/installmesa Mesa-6.4/bin/installmesa +--- Mesa-6.4.orig/bin/installmesa 2005-09-13 06:36:17.000000000 -0700 ++++ Mesa-6.4/bin/installmesa 2005-10-13 14:10:39.000000000 -0700 +@@ -60,7 +60,6 @@ + + mkdir ${INCLUDE_DIR} + mkdir ${INCLUDE_DIR}/GL +-mkdir ${INCLUDE_DIR}/GLES + mkdir ${LIB_DIR} + cp -f ${TOP}/include/GL/*.h ${INCLUDE_DIR}/GL + # NOT YET: cp -f ${TOP}/include/GLES/*.h ${INCLUDE_DIR}/GLES diff --git a/media-libs/mesa/files/6.4-multilib-fix.patch b/media-libs/mesa/files/6.4-multilib-fix.patch new file mode 100644 index 0000000..8e16a95 --- /dev/null +++ b/media-libs/mesa/files/6.4-multilib-fix.patch @@ -0,0 +1,27 @@ +--- bin/installmesa.multilib-fix 2005-12-16 01:46:30.000000000 +0000 ++++ bin/installmesa 2005-12-16 01:47:22.000000000 +0000 +@@ -9,8 +9,9 @@ + + TOP=. + +-INCLUDE_DIR="/usr/local/include" +-LIB_DIR="/usr/local/lib" ++# Default to /usr/local if these aren't already set. ++INCLUDE_DIR="${INCLUDE_DIR:-/usr/local/include}" ++LIB_DIR="${LIB_DIR:-/usr/local/lib}" + + if [ "x$#" = "x0" ] ; then + echo +@@ -40,9 +41,9 @@ + + read INPUT + +-else +-INCLUDE_DIR=$1/include +-LIB_DIR=$1/lib ++#else ++#INCLUDE_DIR=$1/include ++#LIB_DIR=$1/lib + fi + + # flags: diff --git a/media-libs/mesa/files/64bit-fix-have-dix-config.patch b/media-libs/mesa/files/64bit-fix-have-dix-config.patch new file mode 100644 index 0000000..29e6f40 --- /dev/null +++ b/media-libs/mesa/files/64bit-fix-have-dix-config.patch @@ -0,0 +1,18 @@ +=================================================================== +RCS file: /cvs/mesa/Mesa/src/mesa/main/glheader.h,v +rcsdiff: /cvs/mesa/Mesa/src/mesa/main/glheader.h,v: warning: Unknown phrases like `commitid ...;' are present. +retrieving revision 1.70 +retrieving revision 1.71 +diff -u -r1.70 -r1.71 +--- Mesa/src/mesa/main/glheader.h 2006/02/11 02:59:38 1.70 ++++ Mesa/src/mesa/main/glheader.h 2006/02/15 21:03:34 1.71 +@@ -46,6 +46,9 @@ + #ifndef GLHEADER_H + #define GLHEADER_H + ++#ifdef HAVE_DIX_CONFIG_H ++#include "dix-config.h" ++#endif + + #if defined(XFree86LOADER) && defined(IN_MODULE) && !defined(NO_LIBCWRAPPER) + #include "xf86_ansic.h" diff --git a/media-libs/mesa/files/64bit-fix-indirect-vertex-array.patch b/media-libs/mesa/files/64bit-fix-indirect-vertex-array.patch new file mode 100644 index 0000000..4e744e9 --- /dev/null +++ b/media-libs/mesa/files/64bit-fix-indirect-vertex-array.patch @@ -0,0 +1,17 @@ +=================================================================== +RCS file: /cvs/mesa/Mesa/src/glx/x11/indirect_vertex_array.c,v +rcsdiff: /cvs/mesa/Mesa/src/glx/x11/indirect_vertex_array.c,v: warning: Unknown phrases like `commitid ...;' are present. +retrieving revision 1.6 +retrieving revision 1.7 +diff -u -r1.6 -r1.7 +--- Mesa/src/glx/x11/indirect_vertex_array.c 2005/08/19 18:53:26 1.6 ++++ Mesa/src/glx/x11/indirect_vertex_array.c 2006/02/14 15:04:45 1.7 +@@ -530,7 +530,7 @@ + emit_DrawArrays_header_old( __GLXcontext * gc, + struct array_state_vector * arrays, + size_t * elements_per_request, +- size_t * total_requests, ++ unsigned int * total_requests, + GLenum mode, GLsizei count ) + { + size_t command_size; diff --git a/media-libs/mesa/files/change-default-dri-driver-dir-X7.1.patch b/media-libs/mesa/files/change-default-dri-driver-dir-X7.1.patch new file mode 100644 index 0000000..5ea6924 --- /dev/null +++ b/media-libs/mesa/files/change-default-dri-driver-dir-X7.1.patch @@ -0,0 +1,11 @@ +--- Mesa-6.3.1.1.orig/src/glx/x11/dri_glx.c 2005-07-27 17:29:51.000000000 -0700 ++++ Mesa-6.3.1.1/src/glx/x11/dri_glx.c 2005-08-14 11:09:54.000000000 -0700 +@@ -58,7 +58,7 @@ + + #ifndef DEFAULT_DRIVER_DIR + /* this is normally defined in the Imakefile */ +-#define DEFAULT_DRIVER_DIR "/usr/X11R6/lib/modules/dri" ++#define DEFAULT_DRIVER_DIR "/usr/lib/dri" + #endif + + static __DRIdriver *Drivers = NULL; diff --git a/media-libs/mesa/files/configurable-dri-dir.patch b/media-libs/mesa/files/configurable-dri-dir.patch new file mode 100644 index 0000000..3b0f65a --- /dev/null +++ b/media-libs/mesa/files/configurable-dri-dir.patch @@ -0,0 +1,10 @@ +--- Mesa-6.4/src/glx/x11/Makefile.modular 2005-08-19 16:20:03.000000000 -0400 ++++ Mesa-6.4/src/glx/x11/Makefile 2005-11-20 15:32:47.000000000 -0500 +@@ -2,6 +2,7 @@ + include $(TOP)/configs/current + + DEFINES += -DXF86VIDMODE -D_REENTRANT -UIN_DRI_DRIVER ++DEFINES += -DDEFAULT_DRIVER_DIR='"$(DRI_DRIVER_DIR)"' + + C_SOURCES = \ + $(TOP)/src/mesa/glapi/glapi.c \ diff --git a/media-libs/mesa/files/digest-mesa-6.4.2 b/media-libs/mesa/files/digest-mesa-6.4.2 new file mode 100644 index 0000000..13d7ad4 --- /dev/null +++ b/media-libs/mesa/files/digest-mesa-6.4.2 @@ -0,0 +1,3 @@ +MD5 7674d2c603b5834259e4e5a820cefd5b MesaLib-6.4.2.tar.bz2 2913009 +RMD160 6bf1afc0d3bd3f5e3b5c1a019838f40603446509 MesaLib-6.4.2.tar.bz2 2913009 +SHA256 bc84da436f9d92485dfa1c6670689c6807950a8372637c9952f689a1e1f9aa86 MesaLib-6.4.2.tar.bz2 2913009 diff --git a/media-libs/mesa/files/digest-mesa-6.4.2_alpha20060121 b/media-libs/mesa/files/digest-mesa-6.4.2_alpha20060121 new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/media-libs/mesa/files/digest-mesa-6.4.2_alpha20060121 diff --git a/media-libs/mesa/files/digest-mesa-9999 b/media-libs/mesa/files/digest-mesa-9999 new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/media-libs/mesa/files/digest-mesa-9999 diff --git a/media-libs/mesa/files/lib/libGL.la b/media-libs/mesa/files/lib/libGL.la new file mode 100644 index 0000000..1a773c2 --- /dev/null +++ b/media-libs/mesa/files/lib/libGL.la @@ -0,0 +1,32 @@ +# libGL.la - a libtool library file +# Generated by ltmain.sh - GNU libtool 1.4 (1.920 2001/04/24 23:26:18) +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# The name that we can dlopen(3). +dlname='libGL.so.1' + +# Names of this library. +library_names='libGL.so.1.2 libGL.so.1 libGL.so' + +# The name of the static archive. +old_library='' + +# Libraries that this one depends upon. +dependency_libs=' -L/usr/lib -lSM -lICE -lXmu -lXt -lXext -lXi -lX11 -ldl -lpthread ' + +# Version information for libGL. +current=3 +age=2 +revision=0 + +# Is this an already installed library? +installed=yes + +# Files to dlopen/dlpreopen +dlopen='' +dlpreopen='' + +# Directory that this library needs to be installed in: +libdir='/usr/lib/opengl/xorg-x11/lib' diff --git a/media-libs/mesa/files/lib/libGLU.la b/media-libs/mesa/files/lib/libGLU.la new file mode 100644 index 0000000..cc76b4b --- /dev/null +++ b/media-libs/mesa/files/lib/libGLU.la @@ -0,0 +1,32 @@ +# libGLU.la - a libtool library file +# Generated by ltmain.sh - GNU libtool 1.4 (1.920 2001/04/24 23:26:18) +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# The name that we can dlopen(3). +dlname='libGLU.so.1' + +# Names of this library. +library_names='libGLU.so.1.3 libGLU.so.1 libGLU.so' + +# The name of the static archive. +old_library='' + +# Libraries that this one depends upon. +dependency_libs=' -L/usr/lib -lGL -lSM -lICE -lXmu -lXt -lXext -lXi -lX11 -ldl -lpthread ' + +# Version information for libGLU. +current=4 +age=3 +revision=0 + +# Is this an already installed library? +installed=yes + +# Files to dlopen/dlpreopen +dlopen='' +dlpreopen='' + +# Directory that this library needs to be installed in: +libdir='/usr/lib' diff --git a/media-libs/mesa/files/makedepend-location.patch b/media-libs/mesa/files/makedepend-location.patch new file mode 100644 index 0000000..7e49dee --- /dev/null +++ b/media-libs/mesa/files/makedepend-location.patch @@ -0,0 +1,12 @@ +diff -urN Mesa-6.3.1.1.orig/configs/linux-dri Mesa-6.3.1.1/configs/linux-dri +--- Mesa-6.3.1.1.orig/configs/linux-dri 2005-07-23 23:29:14.000000000 -0700 ++++ Mesa-6.3.1.1/configs/linux-dri 2005-08-10 14:56:16.000000000 -0700 +@@ -9,7 +9,7 @@ + CC = gcc + CXX = g++ + +-MKDEP = /usr/X11R6/bin/makedepend ++MKDEP = /usr/bin/makedepend + #MKDEP = gcc -M + #MKDEP_OPTIONS = -MF depend + diff --git a/media-libs/mesa/files/mesa-glx-x11-get-drawable-attribs-fix-1.diff b/media-libs/mesa/files/mesa-glx-x11-get-drawable-attribs-fix-1.diff new file mode 100644 index 0000000..a13b56d --- /dev/null +++ b/media-libs/mesa/files/mesa-glx-x11-get-drawable-attribs-fix-1.diff @@ -0,0 +1,73 @@ +diff -u -r1.5 glx_pbuffer.c +--- src/glx/x11/glx_pbuffer.c 11 Aug 2005 14:18:53 -0000 1.5 ++++ src/glx/x11/glx_pbuffer.c 30 Aug 2005 01:48:16 -0000 +@@ -200,6 +200,7 @@ + GLboolean use_glx_1_3 = ((priv->majorVersion > 1) + || (priv->minorVersion >= 3)); + ++ *value = 0; + + if ( (dpy == NULL) || (drawable == 0) ) { + return 0; +@@ -230,32 +231,40 @@ + + _XReply(dpy, (xReply*) &reply, 0, False); + +- length = reply.length; +- num_attributes = (use_glx_1_3) ? reply.numAttribs : length / 2; +- data = (CARD32 *) Xmalloc( length * sizeof(CARD32) ); +- if ( data == NULL ) { +- /* Throw data on the floor */ +- _XEatData(dpy, length); +- } else { +- _XRead(dpy, (char *)data, length * sizeof(CARD32) ); ++ if (reply.type == X_Error) ++ { ++ UnlockDisplay(dpy); ++ SyncHandle(); ++ return 0; + } + +- UnlockDisplay(dpy); +- SyncHandle(); +- +- +- /* Search the set of returned attributes for the attribute requested by +- * the caller. +- */ ++ length = reply.length; ++ if (length) ++ { ++ num_attributes = (use_glx_1_3) ? reply.numAttribs : length / 2; ++ data = (CARD32 *) Xmalloc( length * sizeof(CARD32) ); ++ if ( data == NULL ) { ++ /* Throw data on the floor */ ++ _XEatData(dpy, length); ++ } else { ++ _XRead(dpy, (char *)data, length * sizeof(CARD32) ); ++ ++ /* Search the set of returned attributes for the attribute requested by ++ * the caller. ++ */ ++ for ( i = 0 ; i < num_attributes ; i++ ) { ++ if ( data[i*2] == attribute ) { ++ *value = data[ (i*2) + 1 ]; ++ break; ++ } ++ } + +- for ( i = 0 ; i < num_attributes ; i++ ) { +- if ( data[i*2] == attribute ) { +- *value = data[ (i*2) + 1 ]; +- break; +- } ++ Xfree( data ); ++ } + } + +- Xfree( data ); ++ UnlockDisplay(dpy); ++ SyncHandle(); + + return 0; + } diff --git a/media-libs/mesa/files/mesa-glx-x11-glxproto-defines.diff b/media-libs/mesa/files/mesa-glx-x11-glxproto-defines.diff new file mode 100644 index 0000000..c083584 --- /dev/null +++ b/media-libs/mesa/files/mesa-glx-x11-glxproto-defines.diff @@ -0,0 +1,12 @@ +--- Mesa/src/glx/x11/glxcmds.c.1 2006-01-11 22:43:47.395961500 +0100 ++++ Mesa/src/glx/x11/glxcmds.c 2006-01-11 22:44:12.717544000 +0100 +@@ -56,6 +56,9 @@ + #include "glheader.h" + #include <sys/time.h> + ++#define X_GLXvop_BindTexImageMESA 15 ++#define X_GLXvop_ReleaseTexImageMESA 16 ++ + static const char __glXGLXClientVendorName[] = "SGI"; + static const char __glXGLXClientVersion[] = "1.4"; + diff --git a/media-libs/mesa/files/mesa-radeon-0depthbits.patch b/media-libs/mesa/files/mesa-radeon-0depthbits.patch new file mode 100644 index 0000000..ce876a6 --- /dev/null +++ b/media-libs/mesa/files/mesa-radeon-0depthbits.patch @@ -0,0 +1,76 @@ +Index: src/mesa/drivers/dri/r128/r128_state.c +=================================================================== +RCS file: /cvs/mesa/Mesa/src/mesa/drivers/dri/r128/r128_state.c,v +retrieving revision 1.17 +diff -p -u -r1.17 r128_state.c +--- src/mesa/drivers/dri/r128/r128_state.c 27 Oct 2005 21:21:05 -0000 1.17 ++++ src/mesa/drivers/dri/r128/r128_state.c 20 Mar 2006 07:14:32 -0000 +@@ -1248,6 +1248,7 @@ void r128DDInitState( r128ContextPtr rme + rmesa->ClearColor = 0x00000000; + + switch ( rmesa->glCtx->Visual.depthBits ) { ++ case 0: + case 16: + rmesa->ClearDepth = 0x0000ffff; + depth_bpp = R128_Z_PIX_WIDTH_16; +Index: src/mesa/drivers/dri/r200/r200_state_init.c +=================================================================== +RCS file: /cvs/mesa/Mesa/src/mesa/drivers/dri/r200/r200_state_init.c,v +retrieving revision 1.27 +diff -p -u -r1.27 r200_state_init.c +--- src/mesa/drivers/dri/r200/r200_state_init.c 7 Jan 2006 20:42:16 -0000 1.27 ++++ src/mesa/drivers/dri/r200/r200_state_init.c 20 Mar 2006 07:14:33 -0000 +@@ -176,6 +176,7 @@ void r200InitState( r200ContextPtr rmesa + rmesa->state.color.clear = 0x00000000; + + switch ( ctx->Visual.depthBits ) { ++ case 0: + case 16: + rmesa->state.depth.clear = 0x0000ffff; + rmesa->state.depth.scale = 1.0 / (GLfloat)0xffff; +Index: src/mesa/drivers/dri/r300/r300_state.c +=================================================================== +RCS file: /cvs/mesa/Mesa/src/mesa/drivers/dri/r300/r300_state.c,v +retrieving revision 1.146 +diff -p -u -r1.146 r300_state.c +--- src/mesa/drivers/dri/r300/r300_state.c 28 Feb 2006 23:08:28 -0000 1.146 ++++ src/mesa/drivers/dri/r300/r300_state.c 20 Mar 2006 07:14:34 -0000 +@@ -954,6 +954,7 @@ static void r300PolygonOffset(GLcontext + GLfloat constant = units; + + switch (ctx->Visual.depthBits) { ++ case 0: + case 16: + constant *= 4.0; + break; +@@ -2036,6 +2037,7 @@ void r300ResetHwState(r300ContextPtr r30 + r300->hw.unk4EA0.cmd[2] = 0xffffffff; + + switch (ctx->Visual.depthBits) { ++ case 0: + case 16: + r300->hw.unk4F10.cmd[1] = R300_DEPTH_FORMAT_16BIT_INT_Z; + break; +@@ -2112,6 +2114,7 @@ void r300InitState(r300ContextPtr r300) + radeonInitState(&r300->radeon); + + switch (ctx->Visual.depthBits) { ++ case 0: + case 16: + r300->state.depth.scale = 1.0 / (GLfloat) 0xffff; + depth_fmt = R200_DEPTH_FORMAT_16BIT_INT_Z; +Index: src/mesa/drivers/dri/radeon/radeon_state_init.c +=================================================================== +RCS file: /cvs/mesa/Mesa/src/mesa/drivers/dri/radeon/radeon_state_init.c,v +retrieving revision 1.20 +diff -p -u -r1.20 radeon_state_init.c +--- src/mesa/drivers/dri/radeon/radeon_state_init.c 7 Jan 2006 20:42:17 -0000 1.20 ++++ src/mesa/drivers/dri/radeon/radeon_state_init.c 20 Mar 2006 07:14:34 -0000 +@@ -173,6 +173,7 @@ void radeonInitState( radeonContextPtr r + rmesa->state.color.clear = 0x00000000; + + switch ( ctx->Visual.depthBits ) { ++ case 0: + case 16: + rmesa->state.depth.clear = 0x0000ffff; + rmesa->state.depth.scale = 1.0 / (GLfloat)0xffff; diff --git a/media-libs/mesa/files/r200-copy-pixels-1.patch b/media-libs/mesa/files/r200-copy-pixels-1.patch new file mode 100644 index 0000000..26463cd --- /dev/null +++ b/media-libs/mesa/files/r200-copy-pixels-1.patch @@ -0,0 +1,112 @@ +diff -u ../Mesa-6.4.1.old/src/mesa/drivers/dri/r200/r200_pixel.c ./src/mesa/drivers/dri/r200/r200_pixel.c +--- ../Mesa-6.4.1.old/src/mesa/drivers/dri/r200/r200_pixel.c 2004-07-31 10:14:50.000000000 +0200 ++++ ./src/mesa/drivers/dri/r200/r200_pixel.c 2005-12-21 15:19:24.000000000 +0100 +@@ -472,6 +472,98 @@ + } + + ++void ++r200CopyPixels( GLcontext *ctx, ++ GLint srcx, GLint srcy, GLsizei width, GLsizei height, ++ GLint destx, GLint desty, ++ GLenum type ) ++{ ++ if (type == GL_COLOR && ++ ctx->Pixel.ReadBuffer == GL_BACK && ++ ctx->Color.DrawBuffer[0] == GL_FRONT && ++ srcx == destx && srcy == desty && ++ ctx->_ImageTransferState == 0 && /* no color tables, scale/bias, etc */ ++ ctx->Pixel.ZoomX == 1.0 && /* no zooming */ ++ ctx->Pixel.ZoomY == 1.0) ++ { ++ r200ContextPtr rmesa = R200_CONTEXT (ctx); ++ __DRIdrawablePrivate *dPriv = rmesa->dri.drawable; ++ GLint x, y, size; ++ GLint nbox, i, ret; ++ ++ x = destx; ++ y = desty; ++ ++ if (!clip_pixelrect (ctx, ctx->DrawBuffer, &x, &y, &width, &height, ++ &size)) ++ { ++ if (R200_DEBUG & DEBUG_PIXEL) ++ fprintf (stderr, "%s totally clipped -- nothing to do\n", ++ __FUNCTION__); ++ ++ return; ++ } ++ ++ y = dPriv->h - y - height; /* convert from gl to hardware coords */ ++ x += dPriv->x; ++ y += dPriv->y; ++ ++ R200_FIREVERTICES( rmesa ); ++ ++ LOCK_HARDWARE( rmesa ); ++ ++ nbox = dPriv->numClipRects; /* must be in locked region */ ++ ++ for (i = 0; i < nbox; ) ++ { ++ drm_clip_rect_t *box = dPriv->pClipRects; ++ drm_clip_rect_t *b = rmesa->sarea->boxes; ++ drm_clip_rect_t r; ++ GLint n = 0; ++ ++ while (n < RADEON_NR_SAREA_CLIPRECTS && i < nbox) ++ { ++ r = box[i++]; ++ ++ if (r.x1 < x) ++ r.x1 = x; ++ if (r.y1 < y) ++ r.y1 = y; ++ if (r.x2 > x + width) ++ r.x2 = x + width; ++ if (r.y2 > y + height) ++ r.y2 = y + height; ++ ++ if (r.x1 < r.x2 && r.y1 < r.y2) ++ { ++ *b++ = r; ++ n++; ++ } ++ } ++ ++ if (n) ++ { ++ rmesa->sarea->nbox = n; ++ ++ ret = drmCommandNone ( rmesa->dri.fd, DRM_RADEON_SWAP ); ++ ++ if ( ret ) { ++ fprintf( stderr, "DRM_R200_SWAP_BUFFERS: return = %d\n", ++ ret ); ++ UNLOCK_HARDWARE( rmesa ); ++ exit( 1 ); ++ } ++ } ++ } ++ ++ UNLOCK_HARDWARE( rmesa ); ++ } ++ else ++ { ++ _swrast_CopyPixels (ctx, srcx, srcy, width, height, destx, desty, type); ++ } ++} ++ + + void r200InitPixelFuncs( GLcontext *ctx ) + { +@@ -485,7 +577,8 @@ + + if (!getenv("R200_NO_BLITS") && R200_CONTEXT(ctx)->dri.drmMinor >= 6) { + ctx->Driver.ReadPixels = r200ReadPixels; +- ctx->Driver.DrawPixels = r200DrawPixels; ++ ctx->Driver.DrawPixels = r200DrawPixels; ++ ctx->Driver.CopyPixels = r200CopyPixels; + if (getenv("R200_HW_BITMAP")) + ctx->Driver.Bitmap = r200Bitmap; + } diff --git a/media-libs/mesa/files/r300-aet.patch b/media-libs/mesa/files/r300-aet.patch new file mode 100644 index 0000000..4074a80 --- /dev/null +++ b/media-libs/mesa/files/r300-aet.patch @@ -0,0 +1,67 @@ +Index: r300_reg.h +=================================================================== +RCS file: /cvs/mesa/Mesa/src/mesa/drivers/dri/r300/r300_reg.h,v +retrieving revision 1.54 +diff -u -b -B -u -r1.54 r300_reg.h +--- src/mesa/drivers/dri/r300/r300_reg.h 27 Jan 2006 13:21:47 -0000 1.54 ++++ src/mesa/drivers/dri/r300/r300_reg.h 7 Feb 2006 12:49:26 -0000 +@@ -350,7 +350,7 @@ + # define R300_GB_LINE_STUFF_ENABLE (1<<1) + # define R300_GB_TRIANGLE_STUFF_ENABLE (1<<2) + # define R300_GB_STENCIL_AUTO_ENABLE (1<<4) +-# define R300_GB_UNK30 (1<<30) ++# define R300_GB_UNK30 (1<<31) + /* each of the following is 2 bits wide */ + #define R300_GB_TEX_REPLICATE 0 + #define R300_GB_TEX_ST 1 +Index: r300_render.c +=================================================================== +RCS file: /cvs/mesa/Mesa/src/mesa/drivers/dri/r300/r300_render.c,v +retrieving revision 1.100 +diff -u -b -B -u -r1.100 r300_render.c +--- src/mesa/drivers/dri/r300/r300_render.c 27 Jan 2006 14:09:05 -0000 1.100 ++++ src/mesa/drivers/dri/r300/r300_render.c 7 Feb 2006 12:49:26 -0000 +@@ -730,6 +730,9 @@ + + // LOCK_HARDWARE(&(rmesa->radeon)); + ++ reg_start(R300_GB_SELECT,0); ++ e32(0x00000010); ++ + reg_start(R300_RB3D_DSTCACHE_CTLSTAT,0); + e32(0x0000000a); + +@@ -802,7 +805,7 @@ + FALLBACK_IF(ctx->Line.StippleFlag); + + /* HW doesnt appear to directly support these */ +- FALLBACK_IF(ctx->Line.SmoothFlag); // GL_LINE_SMOOTH ++ //FALLBACK_IF(ctx->Line.SmoothFlag); // GL_LINE_SMOOTH + FALLBACK_IF(ctx->Point.SmoothFlag); // GL_POINT_SMOOTH + /* Rest could be done with vertex fragments */ + if (ctx->Extensions.NV_point_sprite || ctx->Extensions.ARB_point_sprite) +Index: r300_state.c +=================================================================== +RCS file: /cvs/mesa/Mesa/src/mesa/drivers/dri/r300/r300_state.c,v +retrieving revision 1.144 +diff -u -b -B -u -r1.144 r300_state.c +--- src/mesa/drivers/dri/r300/r300_state.c 27 Jan 2006 14:35:24 -0000 1.144 ++++ src/mesa/drivers/dri/r300/r300_state.c 7 Feb 2006 12:49:26 -0000 +@@ -1147,7 +1147,7 @@ + /* Currently disabled! */ + r300->hw.tex.unknown1.cmd[R300_TEX_VALUE_0 + hw_tmu] = 0x0; + r300->hw.tex.size.cmd[R300_TEX_VALUE_0 + hw_tmu] = t->size; +- r300->hw.tex.format.cmd[R300_TEX_VALUE_0 + hw_tmu] = t->format; ++ r300->hw.tex.format.cmd[R300_TEX_VALUE_0 + hw_tmu] = 0x02000a00; // t->format | 0x2000000; + r300->hw.tex.pitch.cmd[R300_TEX_VALUE_0 + hw_tmu] = t->pitch_reg; + r300->hw.tex.offset.cmd[R300_TEX_VALUE_0 + hw_tmu] = t->offset; + r300->hw.tex.unknown4.cmd[R300_TEX_VALUE_0 + hw_tmu] = 0x0; +@@ -1882,7 +1882,7 @@ + + r300->hw.gb_enable.cmd[1] = R300_GB_POINT_STUFF_ENABLE + | R300_GB_LINE_STUFF_ENABLE +- | R300_GB_TRIANGLE_STUFF_ENABLE /*| R300_GB_UNK30*/; ++ | R300_GB_TRIANGLE_STUFF_ENABLE | R300_GB_UNK30; + + r300->hw.gb_misc.cmd[R300_GB_MISC_MSPOS_0] = 0x66666666; + r300->hw.gb_misc.cmd[R300_GB_MISC_MSPOS_1] = 0x06666666; diff --git a/media-libs/mesa/files/r300-smooth-lines-1.diff b/media-libs/mesa/files/r300-smooth-lines-1.diff new file mode 100644 index 0000000..3f708fc --- /dev/null +++ b/media-libs/mesa/files/r300-smooth-lines-1.diff @@ -0,0 +1,85 @@ +? r300-smooth-lines-1.diff +Index: r300_cmdbuf.c +=================================================================== +RCS file: /cvs/mesa/Mesa/src/mesa/drivers/dri/r300/r300_cmdbuf.c,v +retrieving revision 1.53 +diff -u -b -B -r1.53 r300_cmdbuf.c +--- src/mesa/drivers/dri/r300/r300_cmdbuf.c 20 Jan 2006 21:56:52 -0000 1.53 ++++ src/mesa/drivers/dri/r300/r300_cmdbuf.c 7 Feb 2006 10:45:33 -0000 +@@ -366,6 +366,8 @@ + r300->hw.fpt.cmd[R300_FPT_CMD_0] = cmdpacket0(R300_PFS_TEXI_0, 0); + ALLOC_STATE( unk46A4, always, 6, "unk46A4", 0 ); + r300->hw.unk46A4.cmd[0] = cmdpacket0(0x46A4, 5); ++ ALLOC_STATE( aa, always, R300_AA_CMDSIZE, "aa", 0 ); ++ r300->hw.aa.cmd[R300_AA_CMD_0] = cmdpacket0(R300_ANTI_ALIAS, 0); + ALLOC_STATE( fpi[0], variable, R300_FPI_CMDSIZE, "fpi/0", 0 ); + r300->hw.fpi[0].cmd[R300_FPI_CMD_0] = cmdpacket0(R300_PFS_INSTR0_0, 1); + ALLOC_STATE( fpi[1], variable, R300_FPI_CMDSIZE, "fpi/1", 1 ); +Index: r300_context.h +=================================================================== +RCS file: /cvs/mesa/Mesa/src/mesa/drivers/dri/r300/r300_context.h,v +retrieving revision 1.84 +diff -u -b -B -r1.84 r300_context.h +--- src/mesa/drivers/dri/r300/r300_context.h 27 Jan 2006 13:21:47 -0000 1.84 ++++ src/mesa/drivers/dri/r300/r300_context.h 7 Feb 2006 10:45:33 -0000 +@@ -339,6 +339,9 @@ + #define R300_FPT_INSTR_0 1 + #define R300_FPT_CMDSIZE 65 + ++#define R300_AA_CMD_0 0 ++#define R300_AA_CMDSIZE 1 ++ + #define R300_FPI_CMD_0 0 + #define R300_FPI_INSTR_0 1 + #define R300_FPI_CMDSIZE 65 +@@ -446,6 +449,7 @@ + struct r300_state_atom fp; /* fragment program cntl + nodes (4600) */ + struct r300_state_atom fpt; /* texi - (4620) */ + struct r300_state_atom unk46A4; /* (46A4) */ ++ struct r300_state_atom aa; /* anti-aliasing - (46B4) */ + struct r300_state_atom fpi[4]; /* fp instructions (46C0/47C0/48C0/49C0) */ + struct r300_state_atom unk4BC0; /* (4BC0) */ + struct r300_state_atom unk4BC8; /* (4BC8) */ +Index: r300_reg.h +=================================================================== +RCS file: /cvs/mesa/Mesa/src/mesa/drivers/dri/r300/r300_reg.h,v +retrieving revision 1.54 +diff -u -b -B -r1.54 r300_reg.h +--- src/mesa/drivers/dri/r300/r300_reg.h 27 Jan 2006 13:21:47 -0000 1.54 ++++ src/mesa/drivers/dri/r300/r300_reg.h 7 Feb 2006 10:45:35 -0000 +@@ -916,6 +916,12 @@ + # define R300_FPITX_OP_TXP 3 + # define R300_FPITX_OP_TXB 4 + ++/* Probably some other stuff in this register too, involved with tex/blend ++ * enabling, specular enable, fog enable, alpha test enable on r200 */ ++/* Other possibility: 0x453c? */ ++#define R300_ANTI_ALIAS 0x46B4 ++# define R300_ANTI_ALIAS_LINE (1 << 0) ++ + /* ALU + // The ALU instructions register blocks are enumerated according to the order + // in which fglrx. I assume there is space for 64 instructions, since +Index: r300_state.c +=================================================================== +RCS file: /cvs/mesa/Mesa/src/mesa/drivers/dri/r300/r300_state.c,v +retrieving revision 1.144 +diff -u -b -B -r1.144 r300_state.c +--- src/mesa/drivers/dri/r300/r300_state.c 27 Jan 2006 14:35:24 -0000 1.144 ++++ src/mesa/drivers/dri/r300/r300_state.c 7 Feb 2006 10:45:37 -0000 +@@ -450,6 +450,15 @@ + update_early_z(ctx); + break; + ++ case GL_LINE_SMOOTH: ++ R300_STATECHANGE( r300, aa ); ++ if (state) { ++ r300->hw.aa.cmd[R300_AA_CMD_0] |= R300_ANTI_ALIAS_LINE; ++ } else { ++ r300->hw.aa.cmd[R300_AA_CMD_0] &= ~R300_ANTI_ALIAS_LINE; ++ } ++ break; ++ + case GL_STENCIL_TEST: + if (r300->state.stencil.hw_stencil) { + R300_STATECHANGE(r300, zs); diff --git a/media-libs/mesa/files/r300Fallback-always-return-false.patch b/media-libs/mesa/files/r300Fallback-always-return-false.patch new file mode 100644 index 0000000..a9e5550 --- /dev/null +++ b/media-libs/mesa/files/r300Fallback-always-return-false.patch @@ -0,0 +1,13 @@ +diff -urN Mesa-HEAD.orig/src/mesa/drivers/dri/r300/r300_render.c Mesa-HEAD/src/mesa/drivers/dri/r300/r300_render.c +--- Mesa-HEAD.orig/src/mesa/drivers/dri/r300/r300_render.c 2006-02-06 10:01:47.000000000 -0800 ++++ Mesa-HEAD/src/mesa/drivers/dri/r300/r300_render.c 2006-02-06 10:42:08.000000000 -0800 +@@ -790,7 +789,8 @@ + FALLBACK_IF(ctx->Polygon.OffsetFill); // GL_POLYGON_OFFSET_FILL + #endif + FALLBACK_IF(ctx->Polygon.OffsetPoint); // GL_POLYGON_OFFSET_POINT +- FALLBACK_IF(ctx->Polygon.OffsetLine); // GL_POLYGON_OFFSET_LINE ++// coot ++// FALLBACK_IF(ctx->Polygon.OffsetLine); // GL_POLYGON_OFFSET_LINE + //FALLBACK_IF(ctx->Stencil.Enabled); // GL_STENCIL_TEST + + //FALLBACK_IF(ctx->Fog.Enabled); // GL_FOG disable as swtcl doesnt seem to support this diff --git a/media-libs/mesa/files/xgl-mesa-stable-180106.diff b/media-libs/mesa/files/xgl-mesa-stable-180106.diff new file mode 100644 index 0000000..b370b55 --- /dev/null +++ b/media-libs/mesa/files/xgl-mesa-stable-180106.diff @@ -0,0 +1,217 @@ +Index: src/glx/x11/glxcmds.c +=================================================================== +RCS file: /cvs/mesa/Mesa/src/glx/x11/glxcmds.c,v +retrieving revision 1.11 +diff -u -u -r1.11 glxcmds.c +--- src/glx/x11/glxcmds.c 11 Aug 2005 14:18:53 -0000 1.11 ++++ src/glx/x11/glxcmds.c 18 Jan 2006 07:22:19 -0000 +@@ -2589,7 +2589,88 @@ + } + /*@}*/ + ++PUBLIC Bool glXBindTexImageMESA(Display *dpy, ++ GLXDrawable drawable, ++ int buffer) ++{ ++ xGLXVendorPrivateReq *req; ++ GLXContext gc = __glXGetCurrentContext(); ++ GLXDrawable *drawable_ptr; ++ int *buffer_ptr; ++ CARD8 opcode; ++ ++ if (gc == NULL) ++ return False; ++ ++#ifdef GLX_DIRECT_RENDERING ++ if (gc->isDirect) ++ return False; ++#endif ++ ++ opcode = __glXSetupForCommand(dpy); ++ if (!opcode) ++ return False; ++ ++ LockDisplay(dpy); ++ GetReqExtra(GLXVendorPrivate, sizeof(GLXDrawable)+sizeof(int),req); ++ req->reqType = opcode; ++ req->glxCode = X_GLXVendorPrivate; ++ req->vendorCode = X_GLXvop_BindTexImageMESA; ++ req->contextTag = gc->currentContextTag; ++ ++ drawable_ptr = (GLXDrawable *) (req + 1); ++ buffer_ptr = (int *) (drawable_ptr + 1); + ++ *drawable_ptr = drawable; ++ *buffer_ptr = buffer; ++ ++ UnlockDisplay(dpy); ++ SyncHandle(); ++ ++ return True; ++} ++ ++PUBLIC Bool glXReleaseTexImageMESA(Display *dpy, ++ GLXDrawable drawable, ++ int buffer) ++{ ++ xGLXVendorPrivateReq *req; ++ GLXContext gc = __glXGetCurrentContext(); ++ GLXDrawable *drawable_ptr; ++ int *buffer_ptr; ++ xGLXVendorPrivReply reply; ++ CARD8 opcode; ++ ++ if (gc == NULL) ++ return False; ++ ++#ifdef GLX_DIRECT_RENDERING ++ if (gc->isDirect) ++ return False; ++#endif ++ ++ opcode = __glXSetupForCommand(dpy); ++ if (!opcode) ++ return False; ++ ++ LockDisplay(dpy); ++ GetReqExtra(GLXVendorPrivate, sizeof(GLXDrawable)+sizeof(int),req); ++ req->reqType = opcode; ++ req->glxCode = X_GLXVendorPrivate; ++ req->vendorCode = X_GLXvop_ReleaseTexImageMESA; ++ req->contextTag = gc->currentContextTag; ++ ++ drawable_ptr = (GLXDrawable *) (req + 1); ++ buffer_ptr = (int *) (drawable_ptr + 1); ++ ++ *drawable_ptr = drawable; ++ *buffer_ptr = buffer; ++ ++ UnlockDisplay(dpy); ++ SyncHandle(); ++ ++ return True; ++} + + /** + * \c strdup is actually not a standard ANSI C or POSIX routine. +@@ -2771,6 +2852,10 @@ + GLX_FUNCTION( glXGetMscRateOML ), + GLX_FUNCTION( glXGetSyncValuesOML ), + ++ /*** GLX_MESA_render_texture ***/ ++ GLX_FUNCTION( glXBindTexImageMESA ), ++ GLX_FUNCTION( glXReleaseTexImageMESA ), ++ + #ifdef GLX_DIRECT_RENDERING + /*** DRI configuration ***/ + GLX_FUNCTION( glXGetScreenDriver ), +Index: src/glx/x11/glxextensions.c +=================================================================== +RCS file: /cvs/mesa/Mesa/src/glx/x11/glxextensions.c,v +retrieving revision 1.11 +diff -u -u -r1.11 glxextensions.c +--- src/glx/x11/glxextensions.c 11 Aug 2005 14:18:53 -0000 1.11 ++++ src/glx/x11/glxextensions.c 18 Jan 2006 07:22:19 -0000 +@@ -107,6 +107,7 @@ + { GLX(SGIX_video_source), VER(0,0), N, N, N, N }, + { GLX(SGIX_visual_select_group), VER(0,0), Y, Y, N, N }, + { GLX(SUN_get_transparent_index), VER(0,0), N, N, N, N }, ++ { GLX(MESA_render_texture), VER(0,0), Y, N, N, N }, + { NULL } + }; + +Index: src/glx/x11/glxextensions.h +=================================================================== +RCS file: /cvs/mesa/Mesa/src/glx/x11/glxextensions.h,v +retrieving revision 1.8 +diff -u -u -r1.8 glxextensions.h +--- src/glx/x11/glxextensions.h 26 Jul 2005 22:53:38 -0000 1.8 ++++ src/glx/x11/glxextensions.h 18 Jan 2006 07:22:20 -0000 +@@ -69,7 +69,8 @@ + SGIX_video_resize_bit, + SGIX_video_source_bit, + SGIX_visual_select_group_bit, +- SUN_get_transparent_index_bit ++ SUN_get_transparent_index_bit, ++ MESA_render_texture_bit + }; + + enum { +Index: src/mesa/glapi/glapi.c +=================================================================== +RCS file: /cvs/mesa/Mesa/src/mesa/glapi/glapi.c,v +retrieving revision 1.95.2.1 +diff -u -u -r1.95.2.1 glapi.c +--- src/mesa/glapi/glapi.c 11 Oct 2005 16:56:27 -0000 1.95.2.1 ++++ src/mesa/glapi/glapi.c 18 Jan 2006 07:22:21 -0000 +@@ -343,7 +343,7 @@ + } + + +-#if !defined( USE_X86_ASM ) && !defined( XFree86Server ) ++#if !defined( USE_X86_ASM ) && !defined( XFree86Server ) && !defined( XGLServer ) + #define NEED_FUNCTION_POINTER + #endif + +@@ -388,7 +388,7 @@ + } + + +-#if !defined( XFree86Server ) ++#if !defined( XFree86Server ) && !defined (XGLServer) + #ifdef USE_X86_ASM + + #if defined( GLX_USE_TLS ) +@@ -763,13 +763,13 @@ + /* Do some trivial validation on the name of the function. + */ + +-#ifdef MANGLE +- if (!function_names[i] || function_names[i][0] != 'm' || function_names[i][1] != 'g' || function_names[i][2] != 'l') +- return GL_FALSE; +-#else +- if (!function_names[i] || function_names[i][0] != 'g' || function_names[i][1] != 'l') +- return GL_FALSE; +-#endif ++//#if 0//def USE_MGL_NAMESPACE ++// if (!function_names[i] || function_names[i][0] != 'm' || function_names[i][1] != 'g' || function_names[i][2] != 'l') ++// return GL_FALSE; ++//#else ++// if (!function_names[i] || function_names[i][0] != 'g' || function_names[i][1] != 'l') ++// return GL_FALSE; ++//#endif + + + /* Determine if the named function already exists. If the function does +@@ -892,7 +892,7 @@ + } + } + +-#if !defined( XFree86Server ) ++#if !defined( XFree86Server ) && !defined( XGLServer ) + /* search static functions */ + { + const _glapi_proc func = get_static_proc_address(funcName); +Index: src/mesa/glapi/glapi.h +=================================================================== +RCS file: /cvs/mesa/Mesa/src/mesa/glapi/glapi.h,v +retrieving revision 1.29 +diff -u -u -r1.29 glapi.h +--- src/mesa/glapi/glapi.h 10 Aug 2005 23:54:15 -0000 1.29 ++++ src/mesa/glapi/glapi.h 18 Jan 2006 07:22:21 -0000 +@@ -50,6 +50,15 @@ + + typedef void (*_glapi_warning_func)(void *ctx, const char *str, ...); + ++#if defined(USE_MGL_NAMESPACE) ++#define _glapi_set_dispatch _mglapi_set_dispatch ++#define _glapi_get_dispatch _mglapi_get_dispatch ++#define _glapi_set_context _mglapi_set_context ++#define _glapi_get_context _mglapi_get_context ++#define _glapi_Context _mglapi_Context ++#define _glapi_Dispatch _mglapi_Dispatch ++#endif ++ + + #if defined (GLX_USE_TLS) + diff --git a/media-libs/mesa/mesa-9999.ebuild b/media-libs/mesa/mesa-9999.ebuild new file mode 100644 index 0000000..1731e67 --- /dev/null +++ b/media-libs/mesa/mesa-9999.ebuild @@ -0,0 +1,348 @@ +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/media-libs/mesa/mesa-6.4.1-r1.ebuild,v 1.3 2005/12/26 13:49:10 stefaan Exp $ + +inherit eutils toolchain-funcs multilib cvs flag-o-matic portability + +ECVS_SERVER="pdx.freedesktop.org:/cvs/mesa" +ECVS_MODULE="Mesa" +S=${WORKDIR}/${ECVS_MODULE} + +OPENGL_DIR="xorg-x11" + +MY_PN="${PN/m/M}" +MY_P="${MY_PN}-${PV}" +MY_SRC_P="${MY_PN}Lib-${PV}" +DESCRIPTION="OpenGL-like graphic library for Linux" +HOMEPAGE="http://mesa3d.sourceforge.net/" +#SRC_URI="mirror://sourceforge/mesa3d/${MY_SRC_P}.tar.bz2" +LICENSE="LGPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" +IUSE_VIDEO_CARDS=" + video_cards_i810 + video_cards_mach64 + video_cards_mga + video_cards_none + video_cards_r128 + video_cards_radeon + video_cards_s3virge + video_cards_savage + video_cards_sis + video_cards_sunffb + video_cards_tdfx + video_cards_trident + video_cards_via" +IUSE="${IUSE_VIDEO_CARDS} + debug + motif + nptl" + +RDEPEND="dev-libs/expat + x11-libs/libX11 + x11-libs/libXext + x11-libs/libXxf86vm + x11-libs/libXi + x11-libs/libXmu + >=x11-libs/libdrm-2.0.1 + x11-libs/libICE + app-admin/eselect-opengl + motif? ( virtual/motif ) + !<=x11-base/xorg-x11-6.9" +DEPEND="${RDEPEND} + x11-misc/makedepend + x11-proto/inputproto + x11-proto/xextproto + !hppa? ( x11-proto/xf86driproto ) + x11-proto/xf86vidmodeproto + >=x11-proto/glproto-1.4-r1 + motif? ( x11-proto/printproto )" + +PROVIDE="virtual/opengl virtual/glu" + +# Think about: ggi, svga, fbcon, no-X configs + +if use debug; then + if ! has splitdebug ${FEATURES}; then + RESTRICT="${RESTRICT} nostrip" + fi +fi + +pkg_setup() { + if use debug; then + strip-flags + append-flags -g + fi + + append-flags -fno-strict-aliasing + + if [[ ${KERNEL} == "FreeBSD" ]]; then + CONFIG="freebsd" + elif use x86; then + CONFIG="linux-dri-x86" + elif use amd64; then + CONFIG="linux-dri-x86-64" + elif use ppc; then + CONFIG="linux-dri-ppc" + else + CONFIG="linux-dri" + fi +} + +src_unpack() { + HOSTCONF="${S}/configs/${CONFIG}" + + cvs_src_unpack + cd ${S} + + epatch ${FILESDIR}/6.4-dont-install-gles-headers.patch + epatch ${FILESDIR}/change-default-dri-driver-dir-X7.1.patch + epatch ${FILESDIR}/6.4-multilib-fix.patch + + epatch ${FILESDIR}/r200-copy-pixels-1.patch + + epatch ${FILESDIR}/r300Fallback-always-return-false.patch + + # From xgl-coffee overlay + epatch ${FILESDIR}/mesa-radeon-0depthbits.patch + +# hacky implem work on GL_LINE_SMOOTH +# epatch ${FILESDIR}/r300-smooth-lines-1.diff +# epatch ${FILESDIR}/r300-aet.patch + + # Don't compile debug code with USE=-debug - bug #125004 + if ! use debug; then + einfo "Removing DO_DEBUG defs in dri drivers..." + find src/mesa/drivers/dri -name *.[hc] -exec egrep -l "\#define\W+DO_DEBUG\W+1" {} \; | xargs sed -i -re "s/\#define\W+DO_DEBUG\W+1/\#define DO_DEBUG 0/" ; + fi + + # Set default dri drivers directory + echo "DEFINES += -DDEFAULT_DRIVER_DIR='\"/usr/$(get_libdir)/dri\"'" >> ${HOSTCONF} + + # Do we want thread-local storage (TLS)? + if use nptl; then + echo "ARCH_FLAGS += -DGLX_USE_TLS" >> ${HOSTCONF} + fi + + # Configurable DRI drivers + if use video_cards_i810; then + add_drivers i810 i915 + fi + if use video_cards_mach64; then + add_drivers mach64 + fi + if use video_cards_mga; then + add_drivers mga + fi + if use video_cards_r128; then + add_drivers r128 + fi + if use video_cards_radeon; then + add_drivers radeon r200 r300 + fi + if use video_cards_s3virge; then + add_drivers s3v + fi + if use video_cards_savage; then + add_drivers savage + fi + if use video_cards_sis; then + add_drivers sis + fi + if use video_cards_sunffb; then + add_drivers ffb + fi + if use video_cards_tdfx; then + add_drivers tdfx + fi + if use video_cards_trident; then + add_drivers trident + fi + if use video_cards_via; then + add_drivers unichrome + fi + + # Defaults based on X.Org 6.9, with some changes + if [[ ! -n "${VIDEO_CARDS}" ]]; then + if use alpha; then + add_drivers mga tdfx r128 r200 r300 radeon + elif use amd64; then + add_drivers i915 mga r128 r200 r300 radeon tdfx + elif use arm; then + add_drivers mga r128 r200 r300 radeon + elif use hppa; then + # no accelerated 3D on hppa + true + elif use ia64; then + add_drivers mach64 mga r128 r200 r300 radeon tdfx unichrome + elif use mips; then + # no accelerated 3D on mips + true + elif use ppc; then + add_drivers mach64 mga r128 r200 r300 radeon tdfx + elif use ppc64; then + add_drivers mga r128 r200 r300 radeon + elif use sparc; then + add_drivers ffb mach64 + elif use x86; then + add_drivers i810 i915 mach64 mga r128 r200 r300 radeon s3v savage \ + sis tdfx trident unichrome + fi + fi + + # Set drivers to everything on which we ran add_drivers() + echo "DRI_DIRS = ${DRI_DRIVERS}" >> ${HOSTCONF} + + if use sparc; then + einfo "Sparc assembly code is not working; deactivating" + echo "ASM_FLAGS =" >> ${HOSTCONF} + echo "ASM_SOURCES =" >> ${HOSTCONF} + fi + + # Kill this; we don't want /usr/X11R6/lib ever to be searched in this + # build. + echo "EXTRA_LIB_PATH =" >> ${HOSTCONF} + + echo "OPT_FLAGS = ${CFLAGS}" >> ${HOSTCONF} + echo "CC = $(tc-getCC)" >> ${HOSTCONF} + echo "CXX = $(tc-getCXX)" >> ${HOSTCONF} + # bug #110840 - Build with PIC, since it hasn't been shown to slow it down + echo "PIC_FLAGS = -fPIC" >> ${HOSTCONF} + + # Removed glut, since we have separate freeglut/glut ebuilds + # Remove EGL, since Brian Paul says it's not ready for a release + echo "SRC_DIRS = glx/x11 mesa glu glw" >> ${HOSTCONF} + + # Get rid of glut includes + rm -f ${S}/include/GL/glut*h + + # r200 breaks without this, since it's the only EGL-enabled driver so far + echo "USING_EGL = 0" >> ${HOSTCONF} + + # Don't build EGL demos. EGL isn't ready for release, plus they produce a + # circular dependency with glut. + echo "PROGRAM_DIRS =" >> ${HOSTCONF} + + # Documented in configs/default + if use motif; then + # Add -lXm + echo "GLW_LIB_DEPS += -lXm" >> ${HOSTCONF} + # Add GLwMDrawA.c + echo "GLW_SOURCES += GLwMDrawA.c" >> ${HOSTCONF} + fi +} + +src_compile() { + emake -j1 ${CONFIG} || die "Build failed" +} + +src_install() { + dodir /usr + make \ + DESTDIR=${D}/usr \ + INCLUDE_DIR=${D}/usr/include \ + LIB_DIR=${D}/usr/$(get_libdir) \ + install || die "Installation failed" + + ## + # Install the actual drivers --- 'make install' doesn't install them + # anywhere. + dodir /usr/$(get_libdir)/dri + exeinto /usr/$(get_libdir)/dri + ebegin "Installing drivers to ${EXEDESTTREE}" + find ${S}/lib* -name '*_dri.so' | xargs doexe + eend + + if ! use motif; then + rm ${D}/usr/include/GL/GLwMDrawA.h + fi + + # Don't install private headers + rm ${D}/usr/include/GL/GLw*P.h + + fix_opengl_symlinks + dynamic_libgl_install + + # Install libtool archives + insinto /usr/$(get_libdir) + # (#67729) Needs to be lib, not $(get_libdir) + doins ${FILESDIR}/lib/libGLU.la + insinto /usr/$(get_libdir)/opengl/xorg-x11/lib + doins ${FILESDIR}/lib/libGL.la + + # On *BSD libcs dlopen() and similar functions are present directly in + # libc.so and does not require linking to libdl. portability eclass takes + # care of finding the needed library (if needed) witht the dlopen_lib + # function. + sed -i -e 's:-ldl:'$(dlopen_lib)':g' \ + ${D}/usr/$(get_libdir)/libGLU.la \ + ${D}/usr/$(get_libdir)/opengl/xorg-x11/lib/libGL.la + + # Create the two-number versioned libs (.so.#.#), since only .so.# and + # .so.#.#.# were made + dosym libGLU.so.1.3.060401 /usr/$(get_libdir)/libGLU.so.1.3 + dosym libGLw.so.1.0.0 /usr/$(get_libdir)/libGLw.so.1.0 + + # libGLU doesn't get the plain .so symlink either + dosym libGLU.so.1 /usr/$(get_libdir)/libGLU.so + + # Figure out why libGL.so.1.5 is built (directfb), and why it's linked to + # as the default libGL.so.1 +} + +pkg_postinst() { + switch_opengl_implem +} + +fix_opengl_symlinks() { + # Remove invalid symlinks + local LINK + for LINK in $(find ${D}/usr/$(get_libdir) \ + -name libGL\.* -type l); do + rm -f ${LINK} + done + # Create required symlinks + if [[ ${CHOST} == *-freebsd* ]]; then + # FreeBSD doesn't use major.minor versioning, so the library is only + # libGL.so.1 and no libGL.so.1.2 is ever used there, thus only create + # libGL.so symlink and leave libGL.so.1 being the real thing + dosym libGL.so.1 /usr/$(get_libdir)/libGL.so + else + dosym libGL.so.1.2 /usr/$(get_libdir)/libGL.so + dosym libGL.so.1.2 /usr/$(get_libdir)/libGL.so.1 + fi +} + +dynamic_libgl_install() { + # next section is to setup the dynamic libGL stuff + ebegin "Moving libGL and friends for dynamic switching" + dodir /usr/$(get_libdir)/opengl/${OPENGL_DIR}/{lib,extensions,include} + local x="" + for x in ${D}/usr/$(get_libdir)/libGL.so* \ + ${D}/usr/$(get_libdir)/libGL.la \ + ${D}/usr/$(get_libdir)/libGL.a; do + if [ -f ${x} -o -L ${x} ]; then + # libGL.a cause problems with tuxracer, etc + mv -f ${x} ${D}/usr/$(get_libdir)/opengl/${OPENGL_DIR}/lib + fi + done + # glext.h added for #54984 + for x in ${D}/usr/include/GL/{gl.h,glx.h,glext.h,glxext.h}; do + if [ -f ${x} -o -L ${x} ]; then + mv -f ${x} ${D}/usr/$(get_libdir)/opengl/${OPENGL_DIR}/include + fi + done + eend 0 +} + +switch_opengl_implem() { + # Switch to the xorg implementation. + # Use new opengl-update that will not reset user selected + # OpenGL interface ... + echo + eselect opengl set --use-old ${OPENGL_DIR} +} + +add_drivers() { + DRI_DRIVERS="${DRI_DRIVERS} $@" +} |