blob: 48ea39319a84502aa8c1d7e1a5fb2cc81ed2ac5f (
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
|
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="2"
inherit autotools distutils flag-o-matic multilib python fortran
MY_P=${P}.r1714
DESCRIPTION="Weak Signal Propagation Reporter"
HOMEPAGE="http://www.physics.princeton.edu/pulsar/K1JT/wspr.html"
SRC_URI="http://www.physics.princeton.edu/pulsar/K1JT/${MY_P}.tgz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""
RDEPEND="
dev-lang/python[tk]
dev-python/numpy
dev-python/imaging[tk]
dev-python/pmw
sci-libs/fftw:3.0
media-libs/hamlib
media-libs/portaudio
media-libs/libsamplerate"
DEPEND="${RDEPEND}"
S="${WORKDIR}/${MY_P}"
src_prepare() {
python_version
# upstream confused LIBDIRS with LDFLAGS in Makefile. f2py wants only
# LIBDIRS as parameter and takes LDFLAGS only from environment.
sed -i \
-e "s/LDFLAGS/LIBDIRS/g" \
Makefile.in || die "sed failed"
# drop hardcoded libdir path,
# switch LDFLAGS naming to LIBDIRS (see above comment).
sed -i -e "s/, f2py/, f2py${PYVER}/" \
-e "s:-L/usr/local/lib:-L/usr/$(get_libdir):" \
-e "s/LDFLAGS/LIBDIRS/g" \
configure.ac || die "sed failed"
eautoreconf
}
src_compile() {
# -shared is neded by f2py but cannot be set earlier as configure does
# not like it
append-ldflags -shared
emake || die "emake failed."
}
src_install() {
rm -rf build || die "removing build directory failed"
distutils_src_install
dobin wspr || die "dobin failed"
dodoc BUGS WSPR_*.TXT || die "dodoc failed"
insinto /usr/share/${PN}
doins hamlib_rig_numbers || die "doins failed"
}
|