blob: c1899b392959eda9f449d9ba4347317a44487904 (
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
|
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-games/ode/ode-0.5-r2.ebuild,v 1.3 2005/01/29 05:12:23 vapier Exp $
inherit eutils
DESCRIPTION="Open Dynamics Engine SDK"
HOMEPAGE="http://ode.org/"
SRC_URI="mirror://sourceforge/opende/${P}.tgz"
LICENSE="LGPL-2.1"
SLOT="0"
KEYWORDS="amd64 ppc x86"
IUSE="doc"
DEPEND="virtual/libc
virtual/x11
virtual/glu
virtual/opengl"
src_unpack() {
unpack ${A}
cd "${S}"
echo 'C_FLAGS+=$(E_CFLAGS) -fPIC' >> config/makefile.unix-gcc
epatch "${FILESDIR}"/${PV}-PIC.patch
sed -i -e "s/#OPCODE_DIRECTORY/OPCODE_DIRECTORY/" config/user-settings
sed -i -e 's/..\/..\/drawstuff\/textures/.\//' ode/test/*.c*
sed -i -e 's/fn.path_to_textures = 0/fn.path_to_textures = ".\/"/' drawstuff/dstest/dstest.cpp
}
src_compile() {
emake \
-j1 \
E_CFLAGS="${CFLAGS}" \
PLATFORM=unix-gcc \
|| die "emake failed"
}
src_install() {
insinto /usr/include/ode
doins include/ode/*.h || die "doins failed"
dolib lib/libode.a lib/libdrawstuff.a || die "dolib failed"
if use doc; then
dodoc README CHANGELOG ode/doc/ode.pdf
dohtml ode/doc/ode.html
dodir /usr/share/doc/${P}/html/pix/
insinto /usr/share/doc/${P}/html/pix/
doins ode/doc/pix/*.jpg
# install examples
dodir /usr/share/${P}/examples
exeinto /usr/share/${P}/examples
doexe ode/test/*.exe
doexe drawstuff/dstest/dstest.exe
insinto /usr/share/${P}/examples
doins ode/test/*.c ode/test/*.cpp
doins drawstuff/textures/*.ppm
doins drawstuff/dstest/dstest.cpp
fi
}
|