dev-games/ode: dropped ppc64 keywords, bug 653160
[gentoo.git] / dev-games / ode / ode-0.14-r1.ebuild
1 # Copyright 1999-2018 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=5
5 inherit autotools eutils
6
7 DESCRIPTION="Open Dynamics Engine SDK"
8 HOMEPAGE="http://ode.org/"
9 SRC_URI="https://bitbucket.org/odedevs/ode/downloads/${P}.tar.gz"
10
11 LICENSE="|| ( LGPL-2.1+ BSD )"
12 SLOT="0/6"
13 KEYWORDS="amd64 x86 ~x86-fbsd ~amd64-linux ~x86-linux"
14 IUSE="debug doc double-precision examples gyroscopic static-libs"
15
16 RDEPEND="examples? (
17         virtual/glu
18         virtual/opengl )"
19 DEPEND="${RDEPEND}
20         doc? ( app-doc/doxygen )"
21
22 MY_EXAMPLES_DIR=/usr/share/doc/${PF}/examples
23
24 src_prepare() {
25         epatch "${FILESDIR}"/${PN}-0.14-gcc7.patch
26
27         sed -i \
28                 -e "s:\$.*/drawstuff/textures:${MY_EXAMPLES_DIR}:" \
29                 drawstuff/src/Makefile.am \
30                 ode/demo/Makefile.am || die
31         eautoreconf
32 }
33
34 src_configure() {
35         # use bash (bug #335760)
36         CONFIG_SHELL=/bin/bash \
37         econf \
38                 --enable-shared \
39                 $(use_enable static-libs static) \
40                 $(use_enable debug asserts) \
41                 $(use_enable double-precision) \
42                 $(use_enable examples demos) \
43                 $(use_enable gyroscopic) \
44                 $(use_with examples drawstuff X11)
45 }
46
47 src_compile() {
48         emake
49         if use doc ; then
50                 cd ode/doc
51                 doxygen Doxyfile || die
52         fi
53 }
54
55 src_install() {
56         DOCS="CHANGELOG.txt README.md" \
57                 default
58         prune_libtool_files
59         if use doc ; then
60                 dohtml docs/*
61         fi
62         if use examples; then
63                 docompress -x "${MY_EXAMPLES_DIR}"
64                 insinto "${MY_EXAMPLES_DIR}"
65                 exeinto "${MY_EXAMPLES_DIR}"
66                 doexe drawstuff/dstest/dstest
67                 doins ode/demo/*.{c,cpp,h} \
68                         drawstuff/textures/*.ppm \
69                         drawstuff/dstest/dstest.cpp \
70                         drawstuff/src/{drawstuff.cpp,internal.h,x11.cpp}
71                 cd ode/demo
72                 local f
73                 for f in *.c* ; do
74                         doexe .libs/${f%.*}
75                 done
76         fi
77 }