blob: 18fa6b743b54c699f13a7a19328fea4dd97191a6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/x11-apps/mesa-progs/mesa-progs-6.4.1.ebuild,v 1.7 2005/12/16 10:09:08 herbs Exp $
inherit toolchain-funcs
MY_PN="${PN/m/M}"
MY_PN="${MY_PN/-progs}"
MY_P="${MY_PN}-${PV}"
LIB_P="${MY_PN}Lib-${PV}"
PROG_P="${MY_PN}Demos-${PV}"
DESCRIPTION="Mesa's OpenGL utility and demo programs"
HOMEPAGE="http://mesa3d.sourceforge.net/"
SRC_URI="mirror://sourceforge/mesa3d/${LIB_P}.tar.bz2
mirror://sourceforge/mesa3d/${PROG_P}.tar.bz2"
LICENSE="LGPL-2"
SLOT="0"
KEYWORDS="~amd64 ~mips ~ppc ~sparc ~x86"
IUSE=""
RDEPEND="virtual/glut
virtual/opengl
virtual/glu"
DEPEND="${DEPEND}"
S=${WORKDIR}/Mesa-${PV}
pkg_setup() {
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}"
unpack ${A}
cd ${S}
# 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}
# Just executables here, no need to compile with -fPIC
echo "PIC_FLAGS =" >> ${HOSTCONF}
}
src_compile() {
cd ${S}/configs
ln -s ${CONFIG} current
cd ${S}/progs/xdemos
emake glxinfo
emake glxgears
}
src_install() {
dobin ${S}/progs/xdemos/glxgears
dobin ${S}/progs/xdemos/glxinfo
}
|