dev-python/pytest: arm64 stable (bug #723996)
[gentoo.git] / sci-geosciences / routino / routino-3.3.2.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5 PYTHON_COMPAT=( python3_{6,7,8} )
6 inherit toolchain-funcs distutils-r1
7
8 DESCRIPTION="Routing application based on openstreetmap data"
9 HOMEPAGE="http://www.routino.org/"
10 SRC_URI="http://www.routino.org/download/${P}.tgz"
11 LICENSE="AGPL-3+"
12 SLOT="0"
13 KEYWORDS="~amd64 ~x86"
14 IUSE="python test"
15 RESTRICT="!test? ( test )"
16 REQUIRED_USE="${PYTHON_REQUIRED_USE}"
17 DEPEND="python? ( ${PYTHON_DEPS}
18         dev-lang/swig )"
19 RDEPEND="python? ( ${PYTHON_DEPS} )"
20
21 src_prepare() {
22         eapply "${FILESDIR}"/${P}.patch
23
24         sed -i -e "s@libdir=\(.*\)@libdir=\$(prefix)/$(get_libdir)@" \
25                 -e "s@CC=gcc@CC=$(tc-getCC)@" \
26                 -e "s@LD=gcc@LD=$(tc-getCC)@" \
27                 Makefile.conf || die "failed sed"
28
29         eapply_user
30 }
31
32 src_compile() {
33         emake -j1
34         rm README.txt || die "rm README.txt failed"
35         mv doc/README.txt . || die "mv doc/README.txt . failed"
36         if use python; then
37                 pushd python > /dev/null
38                 python_compile() {
39                         rm -f build/.timestamp
40                         emake PYTHON=${EPYTHON}
41                 }
42                 python_foreach_impl python_compile
43                 popd > /dev/null
44         fi
45 }
46
47 src_test() {
48         emake test
49 #       if use python; then
50 #               pushd python > /dev/null
51 #               python_test() {
52 #                       echo "######## ${EPYTHON} ########"
53 #                       emake PYTHON=${EPYTHON} test
54 #               }
55 #               python_foreach_impl python_test
56 #               popd > /dev/null
57 #       fi
58 }
59
60 src_install() {
61         default
62         if use python; then
63                 pushd python > /dev/null
64                 python_install() {
65                         esetup.py install
66                         python_optimize
67                 }
68                 python_foreach_impl python_install
69                 newdoc README.txt README_python.txt
70                 popd > /dev/null
71         fi
72
73 }