use gallium1/2 instead of mesa

This commit is contained in:
Daniel Mierswa 2008-12-27 17:28:44 +01:00
parent 490c5b9ba5
commit a96726db97
15 changed files with 185 additions and 27 deletions

View file

@ -1,11 +1,10 @@
# Copyright (c) 2008 Daniel Mierswa <impulze@impulze.org>
# Distributed under the terms of the GNU General Public License v2
SCM_REPOSITORY="git://anongit.freedesktop.org/git/nouveau/mesa"
SCM_BRANCH="gallium-0.1"
require flag-o-matic multilib versionator scm-git
SCM_REPOSITORY="${SCM_REPOSITORY:=git://anongit.freedesktop.org/mesa/mesa}"
OPENGL_DIR="${OPENGL_DIR:=xorg-x11}"
OPENGL_DIR="xorg-x11"
require flag-o-matic multilib versionator scm-git
SUMMARY="Mesa's OpenGL library"
HOMEPAGE="http://mesa3d.sourceforge.net/"
@ -13,13 +12,14 @@ HOMEPAGE="http://mesa3d.sourceforge.net/"
LICENCES="FIXME"
SLOT="0"
PLATFORMS="~amd64"
video_drivers="intel mach64 mga nouveau r128 radeon s3virge savage sis sunffb tdfx trident via"
MYOPTIONS="examples motif python xcb
platform: x86 amd64
video_drivers: ${video_drivers}"
MYOPTIONS="
examples motif python xcb
platform:
x86 amd64
video_drivers:
${video_drivers}"
DEPENDENCIES="
build:
@ -31,9 +31,8 @@ DEPENDENCIES="
x11-proto/xf86vidmodeproto
x11-utils/makedepend
build+run:
!x11-dri/mesa
x11-dri/eclectic-opengl
!x11-dri/mesa-lib
!x11-dri/mesa-demos
>=x11-dri/libdrm-2.3.1
x11-libs/libICE
x11-libs/libX11[xcb?]
@ -57,10 +56,7 @@ determine_target() {
}
driver_enable() {
if option ${1}; then
shift
DRI_DRIVERS="${DRI_DRIVERS} $@"
fi
option ${1} && shift && DRI_DRIVERS="${DRI_DRIVERS} $@"
}
add_config() {
@ -86,7 +82,7 @@ src_prepare() {
driver_enable video_drivers:tdfx tdfx
driver_enable video_drivers:trident trident
driver_enable video_drivers:via unichrome
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/" ;
@ -122,7 +118,7 @@ src_prepare() {
add_config 'ARCH_FLAGS += -DGLX_USE_TLS'
add_config "CFLAGS += ${CFLAGS}"
add_config "CXXFLAGS += ${CXXFLAGS}"
add_config "DRI_DIRS = ${DRI_DRIVERS}"
add_config "DRI_DIRS = ${DRI_DRIVERS} ${ADDITIONAL_DRIVERS} swrast"
emake "${TARGET}" \
OPT_FLAGS="" \
@ -157,17 +153,24 @@ src_install() {
dodir "/usr/$(get_libdir)"
dodir /usr/include
cd "${IMAGE}" || die "cd failed (3)"
mv ./tmp/lib/libGL.so* "${IMAGE}/${opengl_path}/lib" \
|| die "mv failed (1)"
mv ./tmp/lib/* "${IMAGE}/usr/$(get_libdir)" \
|| die "mv failed (2)"
mv ./tmp/include/GL/gl{,x}{,ext}.h "${IMAGE}/${opengl_path}/include" \
|| die "mv failed (3)"
mv ./tmp/include/* "${IMAGE}/usr/include" \
|| die "mv failed (4)"
cd "${IMAGE}" || die "cd ${IMAGE} failed"
rm -rf "${IMAGE}/tmp" || die "rm -rf failed"
# move opengl libs/includes into our eclectic path
mv ./tmp/lib/libGL.so* "./${opengl_path}/lib" \
|| die "mv ./tmp/lib/libGL.so* failed"
mv ./tmp/include/GL/gl{,x}{,ext}.h "./${opengl_path}/include" \
|| die "mv ./tmp/include/GL/* failed"
# move the rest of the libs and includes into system paths
mv ./tmp/include/* ./usr/include/ || die "mv ./tmp/include/* failed"
mv ./tmp/lib/* "./usr/$(get_libdir)" || die "mv ./tmp/lib/* failed"
# cleanup
rm -rf ./tmp || die "rm -rf failed"
insinto /usr/include/GL
doins -r "${WORK}/include/GL/internal"
rm ./usr/include/GL/internal/glcore.h || die "rm failed"
insinto "/usr/$(get_libdir)/dri"
doins "${WORK}/$(get_libdir)/"*_dri.so
@ -177,4 +180,7 @@ src_install() {
insinto "/usr/$(get_libdir)"
doins "${FILES}/"*.la
mv "./usr/$(get_libdir)/libGL.la" "./${opengl_path}/lib" \
|| die "mv failed (5)"
}

View file

@ -0,0 +1,13 @@
# Copyright (c) 2008 Daniel Mierswa <impulze@impulze.org>
# Distributed under the terms of the GNU General Public License v2
SCM_REPOSITORY="git://anongit.freedesktop.org/git/nouveau/mesa"
SCM_BRANCH="gallium-0.1"
require gallium
PLATFORMS="~amd64"
DEPENDENCIES="
build+run:
!x11-dri/gallium2"

View file

@ -0,0 +1,11 @@
--- ./src/glut/glx/glutint.h.orig 2008-12-27 04:06:48.000000000 +0100
+++ ./src/glut/glx/glutint.h 2008-12-27 04:06:58.000000000 +0100
@@ -15,8 +15,6 @@
#include <sys/time.h>
#endif
-#define SUPPORT_FORTRAN /* With GLUT 3.7, everyone supports Fortran. */
-
#if defined(_WIN32)
#include "glutwin32.h"
#else

View file

@ -0,0 +1,10 @@
--- ./src/glx/x11/dri2.c.orig 2008-12-27 03:52:52.000000000 +0100
+++ ./src/glx/x11/dri2.c 2008-12-27 03:52:55.000000000 +0100
@@ -294,7 +294,6 @@
req->region = region;
req->dest = dest;
req->src = src;
- req->bitmask = 0;
_XReply(dpy, (xReply *)&rep, 0, xFalse);

View file

@ -0,0 +1,10 @@
prefix=/usr
exec_prefix=${prefix}
libdir=/usr/lib64
includedir=/usr/include
dridriverdir=/usr/lib64/dri
Name: dri
Description: Direct Rendering Infrastructure
Version: 7.2.0
Cflags: -I${includedir}

View file

@ -0,0 +1,11 @@
prefix=/usr
exec_prefix=${prefix}
libdir=/usr/lib64
includedir=/usr/include
Name: gl
Description: Mesa OpenGL library
Requires: libdrm >= 2.3.1
Version: 7.2.0
Libs: -L${libdir} -lGL
Cflags: -I${includedir}

View file

@ -0,0 +1,11 @@
prefix=/usr
exec_prefix=${prefix}
libdir=/usr/lib64
includedir=/usr/include
Name: glu
Description: Mesa OpenGL Utility library
Requires: gl
Version: 7.2.0
Libs: -L${libdir} -lGLU
Cflags: -I${includedir}

View file

@ -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/${libdir} -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/${libdir}'

View file

@ -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'

View file

@ -0,0 +1,22 @@
# Copyright (c) 2008 Daniel Mierswa <impulze@impulze.org>
# Distributed under the terms of the GNU General Public License v2
SCM_REPOSITORY="git://anongit.freedesktop.org/git/nouveau/mesa"
SCM_BRANCH="gallium-0.2"
require gallium
PLATFORMS="~amd64"
DEPENDENCIES="
build+run:
!x11-dri/gallium1
build:
gallium2? ( x11-proto/dri2proto )"
DEFAULT_SRC_PREPARE_PATCHES+=(
# http://cgit.freedesktop.org/xorg/proto/dri2proto/commit/?id=65c7097d549ada25d11738b15996b18c9e57a847
"${FILES}/do_not_use_bitmask.patch"
# i don't know how to do that, yet
"${FILES}/do_not_support_fortran.patch"
)