/[gentoo-x86]/sci-electronics/splat/splat-1.4.1-r1.ebuild
Gentoo

Contents of /sci-electronics/splat/splat-1.4.1-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Sat Nov 29 12:57:05 2014 UTC (4 years, 10 months ago) by tomjbe
Branch: MAIN
CVS Tags: HEAD
Allow building of high resolution tool rfsplat-hd (bug #482476). Thanks for reporting

(Portage version: 2.2.14/cvs/Linux x86_64, signed Manifest commit with key 0x762053D5)

1 # Copyright 1999-2014 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 EAPI=5
6 inherit eutils toolchain-funcs
7
8 DESCRIPTION="RF Signal Propagation, Loss, And Terrain analysis tool for the spectrum between 20 MHz and 20 GHz"
9 HOMEPAGE="http://www.qsl.net/kd2bd/splat.html"
10 SRC_URI="http://www.qsl.net/kd2bd/${P}.tar.bz2"
11
12 LICENSE="GPL-2"
13 SLOT="0"
14 KEYWORDS="~amd64 ~ppc ~x86"
15 IUSE="doc hires linguas_es"
16
17 DEPEND="sys-libs/zlib
18 app-arch/bzip2"
19
20 RDEPEND="${DEPEND}"
21
22 src_prepare() {
23 epatch "${FILESDIR}/${PN}-1.2.2-gcc43.patch"
24 }
25
26 src_configure() {
27 # fake resulting file from interactive configuration script
28 # using default resolution
29 cat <<- EOF > "${S}/splat.h"
30 /* Parameters for 3 arc-second standard resolution mode of operation */
31 #define MAXPAGES 9
32 #define HD_MODE 0
33 EOF
34 if use hires; then
35 # fake resulting file from interactive configuration script
36 # using default resolution
37 cat <<- EOF > "${S}/hires.h"
38 /* Parameters for 3 arc-second hires resolution mode of operation */
39 #define MAXPAGES 9
40 #define HD_MODE 1
41 EOF
42 fi
43 }
44
45 src_compile() {
46
47 local CC=$(tc-getCC) CXX=$(tc-getCXX)
48
49 ${CXX} -Wall ${CXXFLAGS} ${LDFLAGS} itwom3.0.cpp splat.cpp -o rfsplat -lm -lbz2 || die
50 if use hires; then
51 cp "${S}/hires.h" "${S}/splat.h"
52 ${CXX} -Wall ${CXXFLAGS} ${LDFLAGS} itwom3.0.cpp splat.cpp -o rfsplat-hd -lm -lbz2 || die
53 fi
54
55 cd utils
56 ${CC} -Wall ${CFLAGS} ${LDFLAGS} citydecoder.c -o citydecoder
57 ${CC} -Wall ${CFLAGS} ${LDFLAGS} usgs2sdf.c -o usgs2sdf
58 ${CC} -Wall ${CFLAGS} ${LDFLAGS} srtm2sdf.c -o srtm2sdf -lbz2
59 #${CC} -Wall ${CFLAGS} ${LDFLAGS} fontdata.c -o fontdata -lz
60 ${CC} -Wall ${CFLAGS} ${LDFLAGS} bearing.c -o bearing -lm
61 }
62
63 src_install() {
64 local SPLAT_LANG="english"
65 use linguas_es && SPLAT_LANG="spanish"
66 # splat binary
67 dobin rfsplat
68 if use hires; then
69 dobin rfsplat-hd
70 fi
71
72 # utilities
73 dobin utils/{citydecoder,usgs2sdf,srtm2sdf,postdownload,bearing}
74 newman docs/${SPLAT_LANG}/man/splat.man rfsplat.1
75
76 dodoc CHANGES README utils/fips.txt
77 newdoc utils/README README.UTILS
78
79 if use doc; then
80 dodoc docs/${SPLAT_LANG}/{pdf/splat.pdf,postscript/splat.ps}
81 fi
82 #sample data
83 docinto sample_data
84 dodoc sample_data/*
85 }
86
87 pkg_postinst() {
88 elog "The original SPLAT! command got renamed to 'rfsplat' to avoid"
89 elog "filename collission with app-portage/splat."
90 elog ""
91 elog "Be aware that it is still referenced as 'splat' in the documentation."
92 }

  ViewVC Help
Powered by ViewVC 1.1.20