all in x11.git :)
This commit is contained in:
parent
3994561077
commit
7147a17151
14 changed files with 0 additions and 589 deletions
|
@ -1,3 +1 @@
|
||||||
app-cdr
|
app-cdr
|
||||||
x11-dri
|
|
||||||
x11-drivers
|
|
||||||
|
|
|
@ -1,196 +0,0 @@
|
||||||
# Copyright (c) 2008 Daniel Mierswa <impulze@impulze.org>
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
|
|
||||||
SCM_REPOSITORY="${SCM_REPOSITORY:=git://anongit.freedesktop.org/mesa/mesa}"
|
|
||||||
OPENGL_DIR="${OPENGL_DIR:=xorg-x11}"
|
|
||||||
|
|
||||||
require flag-o-matic multilib scm-git
|
|
||||||
|
|
||||||
SUMMARY="Mesa's OpenGL library"
|
|
||||||
HOMEPAGE="http://mesa3d.sourceforge.net/"
|
|
||||||
|
|
||||||
LICENCES="FIXME"
|
|
||||||
SLOT="0"
|
|
||||||
|
|
||||||
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}"
|
|
||||||
|
|
||||||
DEPENDENCIES="
|
|
||||||
build:
|
|
||||||
dev-util/pkg-config
|
|
||||||
x11-proto/glproto
|
|
||||||
x11-proto/inputproto
|
|
||||||
x11-proto/xextproto
|
|
||||||
x11-proto/xf86driproto
|
|
||||||
x11-proto/xf86vidmodeproto
|
|
||||||
x11-utils/makedepend
|
|
||||||
build+run:
|
|
||||||
!x11-dri/mesa
|
|
||||||
x11-dri/eclectic-opengl
|
|
||||||
>=x11-dri/libdrm-2.3.1
|
|
||||||
x11-libs/libICE
|
|
||||||
x11-libs/libX11[xcb?]
|
|
||||||
>=x11-libs/libXdamage-1.1.1
|
|
||||||
x11-libs/libXext
|
|
||||||
x11-libs/libXi
|
|
||||||
x11-libs/libXmu
|
|
||||||
x11-libs/libXxf86vm
|
|
||||||
xcb? ( x11-libs/libxcb )
|
|
||||||
run:
|
|
||||||
python? ( dev-lang/python )
|
|
||||||
"
|
|
||||||
|
|
||||||
determine_target() {
|
|
||||||
TARGET=
|
|
||||||
option platform:amd64 && TARGET="linux-dri-x86-64"
|
|
||||||
option platform:x86 && TARGET="linux-dri-x86"
|
|
||||||
|
|
||||||
[[ -z "${TARGET}" ]] \
|
|
||||||
&& die "I don't know how to build mesa for your platform."
|
|
||||||
}
|
|
||||||
|
|
||||||
driver_enable() {
|
|
||||||
option ${1} && shift && DRI_DRIVERS="${DRI_DRIVERS} $@"
|
|
||||||
}
|
|
||||||
|
|
||||||
add_config() {
|
|
||||||
echo ${@} >> "configs/${TARGET}" || die "echo >> configs/${TARGET} failed"
|
|
||||||
}
|
|
||||||
|
|
||||||
src_prepare() {
|
|
||||||
default
|
|
||||||
|
|
||||||
determine_target
|
|
||||||
rm -f "${WORK}"/include/GL/glut*h
|
|
||||||
|
|
||||||
driver_enable video_drivers:intel i810,i915,i965
|
|
||||||
driver_enable video_drivers:mach64 mach64
|
|
||||||
driver_enable video_drivers:mga mga
|
|
||||||
driver_enable video_drivers:nouveau nouveau
|
|
||||||
driver_enable video_drivers:r128 r128
|
|
||||||
driver_enable video_drivers:radeon radeon,r200,r300
|
|
||||||
driver_enable video_drivers:s3virge s3v
|
|
||||||
driver_enable video_drivers:savage savage
|
|
||||||
driver_enable video_drivers:sis sis
|
|
||||||
driver_enable video_drivers:sunffb ffb
|
|
||||||
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/" ;
|
|
||||||
|
|
||||||
sed \
|
|
||||||
-e "/^LIB_DIR = /s:lib:$(get_libdir):" \
|
|
||||||
-e '/^SRC_DIRS = /s:glut/glx::' \
|
|
||||||
-e '/^INSTALL_DIR = /s:/usr/local:/usr:' \
|
|
||||||
-e '/^DRI_DRIVER_INSTALL_DIR = /s:lib:$(LIB_DIR):' \
|
|
||||||
-i configs/default \
|
|
||||||
|| die "sed configs/default failed"
|
|
||||||
|
|
||||||
if ! option examples ; then
|
|
||||||
sed \
|
|
||||||
-e '/^PROGRAM_DIRS = /s:demos redbook samples glsl::' \
|
|
||||||
-i configs/default \
|
|
||||||
|| die "sed configs/default failed (examples)"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if option motif ; then
|
|
||||||
add_config 'GLW_LIB_DEPS += -lXm'
|
|
||||||
add_config 'GLW_SOURCES += GLwMDrawA.c'
|
|
||||||
fi
|
|
||||||
|
|
||||||
if option xcb ; then
|
|
||||||
add_config 'DEFINES += -DUSE_XCB'
|
|
||||||
for pkg in xcb x11-xcb xcb-glx ; do
|
|
||||||
add_config "X11_INCLUDES += $(pkg-config --cflags-only-I ${pkg})"
|
|
||||||
add_config "GL_LIB_DEPS += $(pkg-config --libs ${pkg})"
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
|
|
||||||
add_config "EXTRA_LIB_PATH = $(pkg-config --libs-only-L x11)"
|
|
||||||
add_config 'ARCH_FLAGS += -DGLX_USE_TLS'
|
|
||||||
add_config "CFLAGS += ${CFLAGS}"
|
|
||||||
add_config "CXXFLAGS += ${CXXFLAGS}"
|
|
||||||
add_config "DRI_DIRS = ${DRI_DRIVERS} ${ADDITIONAL_DRIVERS} swrast"
|
|
||||||
|
|
||||||
emake "${TARGET}" \
|
|
||||||
OPT_FLAGS="" \
|
|
||||||
CC=$(tc-getCC) \
|
|
||||||
CXX=$(tc-getCXX)
|
|
||||||
}
|
|
||||||
|
|
||||||
src_install() {
|
|
||||||
for bin in $(find "${WORK}/progs" -type f -perm -u=x) ; do
|
|
||||||
dobin "${bin}"
|
|
||||||
done
|
|
||||||
|
|
||||||
cd "${IMAGE}" || die "cd failed (1)"
|
|
||||||
rm ./usr/bin/glslnoise.c || die "rm failed (1)"
|
|
||||||
|
|
||||||
if ! option python ; then
|
|
||||||
rm ./usr/bin/api_speed.py || die "rm failed (2)"
|
|
||||||
else
|
|
||||||
sed \
|
|
||||||
-e 's:env python2:env python:' \
|
|
||||||
-i ./usr/bin/api_speed.py \
|
|
||||||
|| die "sed ./usr/bin/api_speed.py failed"
|
|
||||||
fi
|
|
||||||
|
|
||||||
mkdir -p "${IMAGE}/tmp" || die "mkdir failed (1)"
|
|
||||||
cd "${WORK}" || die "cd failed (2)"
|
|
||||||
bin/installmesa "${IMAGE}/tmp" || die "bin/installmesa failed"
|
|
||||||
|
|
||||||
local opengl_path="/usr/$(get_libdir)/opengl/${OPENGL_DIR}"
|
|
||||||
|
|
||||||
dodir "${opengl_path}/"{lib,include}
|
|
||||||
dodir "/usr/$(get_libdir)"
|
|
||||||
dodir /usr/include
|
|
||||||
|
|
||||||
cd "${IMAGE}" || die "cd ${IMAGE} 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
|
|
||||||
|
|
||||||
sed \
|
|
||||||
-e "s#__libdir__#$(get_libdir)#" \
|
|
||||||
-i "${FILES}/"*.pc \
|
|
||||||
|| die "sed *.pc failed"
|
|
||||||
|
|
||||||
insinto "/usr/$(get_libdir)/pkgconfig"
|
|
||||||
doins "${FILES}/"*.pc
|
|
||||||
|
|
||||||
sed \
|
|
||||||
-e "s#__libdir__#$(get_libdir)#" \
|
|
||||||
-i "${FILES}/"*.la \
|
|
||||||
|| die "sed *.la failed"
|
|
||||||
|
|
||||||
insinto "/usr/$(get_libdir)"
|
|
||||||
doins "${FILES}/"*.la
|
|
||||||
|
|
||||||
mv "./usr/$(get_libdir)/libGL.la" "./${opengl_path}/lib" \
|
|
||||||
|| die "mv failed (5)"
|
|
||||||
}
|
|
|
@ -1,11 +0,0 @@
|
||||||
--- ./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
|
|
|
@ -1,10 +0,0 @@
|
||||||
--- ./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);
|
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
prefix=/usr
|
|
||||||
exec_prefix=${prefix}
|
|
||||||
libdir=/usr/__libdir__
|
|
||||||
includedir=/usr/include
|
|
||||||
dridriverdir=/usr/__libdir__/dri
|
|
||||||
|
|
||||||
Name: dri
|
|
||||||
Description: Direct Rendering Infrastructure
|
|
||||||
Version: 7.2.0
|
|
||||||
Cflags: -I${includedir}
|
|
|
@ -1,11 +0,0 @@
|
||||||
prefix=/usr
|
|
||||||
exec_prefix=${prefix}
|
|
||||||
libdir=/usr/__libdir__
|
|
||||||
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}
|
|
|
@ -1,11 +0,0 @@
|
||||||
prefix=/usr
|
|
||||||
exec_prefix=${prefix}
|
|
||||||
libdir=/usr/__libdir__
|
|
||||||
includedir=/usr/include
|
|
||||||
|
|
||||||
Name: glu
|
|
||||||
Description: Mesa OpenGL Utility library
|
|
||||||
Requires: gl
|
|
||||||
Version: 7.2.0
|
|
||||||
Libs: -L${libdir} -lGLU
|
|
||||||
Cflags: -I${includedir}
|
|
|
@ -1,32 +0,0 @@
|
||||||
# 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__'
|
|
|
@ -1,32 +0,0 @@
|
||||||
# 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/__libdir__ -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/__libdir__'
|
|
|
@ -1,10 +0,0 @@
|
||||||
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}
|
|
|
@ -1,31 +0,0 @@
|
||||||
# Copyright (c) 2008 Daniel Mierswa <impulze@impulze.org>
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
|
|
||||||
require mesa
|
|
||||||
|
|
||||||
PLATFORMS="~amd64"
|
|
||||||
MYOPTIONS="gallium1 gallium2"
|
|
||||||
DEPENDENCIES="
|
|
||||||
build+run:
|
|
||||||
!x11-dri/gallium1
|
|
||||||
build:
|
|
||||||
gallium2? ( x11-proto/dri2proto )"
|
|
||||||
|
|
||||||
|
|
||||||
src_unpack() {
|
|
||||||
SCM_CHECKOUT_TO="${FETCHEDDIR}/scm/${PN}_gallium"
|
|
||||||
SCM_REPOSITORY="git://anongit.freedesktop.org/git/nouveau/mesa"
|
|
||||||
option gallium1 && SCM_BRANCH="gallium-0.1"
|
|
||||||
option gallium2 && SCM_BRANCH="gallium-0.2"
|
|
||||||
|
|
||||||
if option gallium2 ; then
|
|
||||||
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"
|
|
||||||
)
|
|
||||||
fi
|
|
||||||
|
|
||||||
scm_src_unpack
|
|
||||||
}
|
|
|
@ -1,197 +0,0 @@
|
||||||
# Copyright (c) 2008 Daniel Mierswa <impulze@impulze.org>
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
|
|
||||||
SCM_REPOSITORY="${SCM_REPOSITORY:=git://anongit.freedesktop.org/mesa/mesa}"
|
|
||||||
OPENGL_DIR="${OPENGL_DIR:=xorg-x11}"
|
|
||||||
|
|
||||||
export_exlib_phases src_prepare src_install
|
|
||||||
|
|
||||||
require flag-o-matic multilib scm-git
|
|
||||||
|
|
||||||
SUMMARY="Mesa's OpenGL library"
|
|
||||||
HOMEPAGE="http://mesa3d.sourceforge.net/"
|
|
||||||
|
|
||||||
LICENCES="FIXME"
|
|
||||||
SLOT="0"
|
|
||||||
|
|
||||||
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}"
|
|
||||||
|
|
||||||
DEPENDENCIES="
|
|
||||||
build:
|
|
||||||
dev-util/pkg-config
|
|
||||||
x11-proto/glproto
|
|
||||||
x11-proto/inputproto
|
|
||||||
x11-proto/xextproto
|
|
||||||
x11-proto/xf86driproto
|
|
||||||
x11-proto/xf86vidmodeproto
|
|
||||||
x11-utils/makedepend
|
|
||||||
build+run:
|
|
||||||
x11-dri/eclectic-opengl
|
|
||||||
>=x11-dri/libdrm-2.3.1
|
|
||||||
x11-libs/libICE
|
|
||||||
x11-libs/libX11[xcb?]
|
|
||||||
>=x11-libs/libXdamage-1.1.1
|
|
||||||
x11-libs/libXext
|
|
||||||
x11-libs/libXi
|
|
||||||
x11-libs/libXmu
|
|
||||||
x11-libs/libXxf86vm
|
|
||||||
xcb? ( x11-libs/libxcb )
|
|
||||||
run:
|
|
||||||
python? ( dev-lang/python )
|
|
||||||
"
|
|
||||||
|
|
||||||
determine_target() {
|
|
||||||
TARGET=
|
|
||||||
option platform:amd64 && TARGET="linux-dri-x86-64"
|
|
||||||
option platform:x86 && TARGET="linux-dri-x86"
|
|
||||||
|
|
||||||
[[ -z "${TARGET}" ]] \
|
|
||||||
&& die "I don't know how to build mesa for your platform."
|
|
||||||
}
|
|
||||||
|
|
||||||
driver_enable() {
|
|
||||||
option ${1} && shift && DRI_DRIVERS="${DRI_DRIVERS} $@"
|
|
||||||
}
|
|
||||||
|
|
||||||
add_config() {
|
|
||||||
echo ${@} >> "configs/${TARGET}" || die "echo >> configs/${TARGET} failed"
|
|
||||||
}
|
|
||||||
|
|
||||||
mesa_src_prepare() {
|
|
||||||
default
|
|
||||||
|
|
||||||
determine_target
|
|
||||||
rm -f "${WORK}"/include/GL/glut*h
|
|
||||||
|
|
||||||
driver_enable video_drivers:intel i810,i915,i965
|
|
||||||
driver_enable video_drivers:mach64 mach64
|
|
||||||
driver_enable video_drivers:mga mga
|
|
||||||
driver_enable video_drivers:nouveau nouveau
|
|
||||||
driver_enable video_drivers:r128 r128
|
|
||||||
driver_enable video_drivers:radeon radeon,r200,r300
|
|
||||||
driver_enable video_drivers:s3virge s3v
|
|
||||||
driver_enable video_drivers:savage savage
|
|
||||||
driver_enable video_drivers:sis sis
|
|
||||||
driver_enable video_drivers:sunffb ffb
|
|
||||||
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/" ;
|
|
||||||
|
|
||||||
sed \
|
|
||||||
-e "/^LIB_DIR = /s:lib:$(get_libdir):" \
|
|
||||||
-e '/^SRC_DIRS = /s:glut/glx::' \
|
|
||||||
-e '/^INSTALL_DIR = /s:/usr/local:/usr:' \
|
|
||||||
-e '/^DRI_DRIVER_INSTALL_DIR = /s:lib:$(LIB_DIR):' \
|
|
||||||
-i configs/default \
|
|
||||||
|| die "sed configs/default failed"
|
|
||||||
|
|
||||||
if ! option examples ; then
|
|
||||||
sed \
|
|
||||||
-e '/^PROGRAM_DIRS = /s:demos redbook samples glsl::' \
|
|
||||||
-i configs/default \
|
|
||||||
|| die "sed configs/default failed (examples)"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if option motif ; then
|
|
||||||
add_config 'GLW_LIB_DEPS += -lXm'
|
|
||||||
add_config 'GLW_SOURCES += GLwMDrawA.c'
|
|
||||||
fi
|
|
||||||
|
|
||||||
if option xcb ; then
|
|
||||||
add_config 'DEFINES += -DUSE_XCB'
|
|
||||||
for pkg in xcb x11-xcb xcb-glx ; do
|
|
||||||
add_config "X11_INCLUDES += $(pkg-config --cflags-only-I ${pkg})"
|
|
||||||
add_config "GL_LIB_DEPS += $(pkg-config --libs ${pkg})"
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
|
|
||||||
add_config "EXTRA_LIB_PATH = $(pkg-config --libs-only-L x11)"
|
|
||||||
add_config 'ARCH_FLAGS += -DGLX_USE_TLS'
|
|
||||||
add_config "CFLAGS += ${CFLAGS}"
|
|
||||||
add_config "CXXFLAGS += ${CXXFLAGS}"
|
|
||||||
add_config "DRI_DIRS = ${DRI_DRIVERS} ${ADDITIONAL_DRIVERS} swrast"
|
|
||||||
|
|
||||||
emake "${TARGET}" \
|
|
||||||
OPT_FLAGS="" \
|
|
||||||
CC=$(tc-getCC) \
|
|
||||||
CXX=$(tc-getCXX)
|
|
||||||
}
|
|
||||||
|
|
||||||
image_mv() {
|
|
||||||
mv ${@} || die "mv ${1} failed"
|
|
||||||
}
|
|
||||||
|
|
||||||
image_rm() {
|
|
||||||
rm ${@} || die "rm ${1} failed"
|
|
||||||
}
|
|
||||||
|
|
||||||
mesa_src_install() {
|
|
||||||
local lib_path="/usr/$(get_libdir)"
|
|
||||||
local opengl_path="${lib_path}/opengl/${OPENGL_DIR}"
|
|
||||||
|
|
||||||
bin/installmesa "${IMAGE}/tmp" || die "bin/installmesa failed"
|
|
||||||
cd "${IMAGE}" || die "cd ${IMAGE} failed"
|
|
||||||
|
|
||||||
for bin in $(find "${WORK}/progs" -type f -perm -u=x) ; do
|
|
||||||
dobin "${bin}"
|
|
||||||
done
|
|
||||||
|
|
||||||
image_rm usr/bin/glslnoise.c
|
|
||||||
|
|
||||||
if ! option python ; then
|
|
||||||
image_rm usr/bin/api_speed.py
|
|
||||||
else
|
|
||||||
sed \
|
|
||||||
-e 's:env python2:env python:' \
|
|
||||||
-i usr/bin/api_speed.py \
|
|
||||||
|| die "sed usr/bin/api_speed.py failed"
|
|
||||||
fi
|
|
||||||
|
|
||||||
dodir "${lib_path}"
|
|
||||||
dodir "${opengl_path}/"{lib,include}
|
|
||||||
dodir /usr/include
|
|
||||||
|
|
||||||
# move opengl libs/includes into our eclectic path
|
|
||||||
image_mv tmp/lib/libGL.so* "./${opengl_path}/lib"
|
|
||||||
image_mv tmp/include/GL/gl{,x}{,ext}.h "./${opengl_path}/include"
|
|
||||||
|
|
||||||
# move the rest of the libs and includes into system paths
|
|
||||||
image_mv tmp/include/* ./usr/include
|
|
||||||
image_mv tmp/lib/* "./${lib_path}"
|
|
||||||
|
|
||||||
# cleanup
|
|
||||||
image_rm tmp -rf
|
|
||||||
|
|
||||||
insinto /usr/include/GL
|
|
||||||
doins -r "${WORK}/include/GL/internal"
|
|
||||||
image_rm ./usr/include/GL/internal/glcore.h
|
|
||||||
|
|
||||||
insinto "${lib_path}/dri"
|
|
||||||
doins "${WORK}/$(get_libdir)/"*_dri.so
|
|
||||||
|
|
||||||
insinto "${lib_path}/pkgconfig"
|
|
||||||
doins "${FILES}/"*.pc
|
|
||||||
sed \
|
|
||||||
-e "s#__libdir__#$(get_libdir)#" \
|
|
||||||
-i "./${lib_path}/pkgconfig/"*.pc \
|
|
||||||
|| die "sed *.pc failed"
|
|
||||||
|
|
||||||
insinto "${lib_path}"
|
|
||||||
doins "${FILES}/"*.la
|
|
||||||
sed \
|
|
||||||
-e "s#__libdir__#$(get_libdir)#" \
|
|
||||||
-i "./${lib_path}/"*.la \
|
|
||||||
|| die "sed *.la failed"
|
|
||||||
|
|
||||||
image_mv "./${lib_path}/libGL.la" "./${opengl_path}/lib"
|
|
||||||
}
|
|
|
@ -1,8 +0,0 @@
|
||||||
# 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/mesa/drm"
|
|
||||||
require scm-git drm
|
|
||||||
|
|
||||||
SLOT="0"
|
|
||||||
PLATFORMS="~amd64"
|
|
|
@ -1,28 +0,0 @@
|
||||||
# Copyright (c) 2008 Daniel Mierswa <impulze@impulze.org>
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
|
|
||||||
require toolchain-funcs
|
|
||||||
|
|
||||||
SUMMARY="DRM and nouveau kernel modules"
|
|
||||||
HOMEPAGE="http://dri.freedesktop.org/wiki/"
|
|
||||||
|
|
||||||
LICENCES="FIXME"
|
|
||||||
MYOPTIONS=""
|
|
||||||
|
|
||||||
DEPENDENCIES="
|
|
||||||
build:
|
|
||||||
=x11-dri/libdrm-${PV}
|
|
||||||
"
|
|
||||||
|
|
||||||
WORK="${WORK}/linux-core"
|
|
||||||
|
|
||||||
DEFAULT_SRC_COMPILE_PARAMS=(
|
|
||||||
DRM_MODULES="nouveau.o drm.o"
|
|
||||||
ARCH="$(tc-arch-kernel)"
|
|
||||||
)
|
|
||||||
|
|
||||||
DEFAULT_SRC_INSTALL_PARAMS=(
|
|
||||||
DRM_MODULES="nouveau.o drm.o"
|
|
||||||
ARCH="$(tc-arch-kernel)"
|
|
||||||
INSTALL_MOD_PATH="${IMAGE}"
|
|
||||||
)
|
|
Loading…
Reference in a new issue