dev-libs/libmaxminddb: arm64 stable
[gentoo.git] / dev-libs / nmeap / nmeap-0.3.ebuild
1 # Copyright 1999-2018 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 inherit toolchain-funcs
7
8 DESCRIPTION="Extensible NMEA-0183 (GPS) data parser in standard C"
9 HOMEPAGE="http://nmeap.sourceforge.net/"
10 SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
11
12 LICENSE="BSD"
13 SLOT="0"
14 KEYWORDS="amd64 ppc x86"
15 IUSE="doc"
16
17 DEPEND="doc? ( app-doc/doxygen )"
18
19 src_prepare() {
20         default
21
22         # Repsect users CFLAGS for the static lib archive
23         sed -i -e 's/CFLAGS =/CFLAGS +=/' -e 's/-g -O0 -Werror//' src/Makefile || die
24
25         # Don't build test programs, they are not needed
26         sed -i -e '/TST/d' Makefile || die
27
28         # Silent output of Doxygen and update it, since it is quite old
29         if use doc; then
30                 sed -i -e 's/QUIET.*/QUIET = YES/' Doxyfile || die
31                 doxygen -u Doxyfile 2>/dev/null || die
32         fi
33 }
34
35 src_compile() {
36         local myemakeopts=(
37                 AR="$(tc-getAR)"
38                 CC="$(tc-getCC)"
39         )
40
41         emake "${myemakeopts[@]}"
42
43         if use doc; then
44                 doxygen Doxyfile || die
45         fi
46 }
47
48 src_install() {
49         dolib.a lib/libnmeap.a
50
51         doheader inc/nmeap.h inc/nmeap_def.h
52
53         if use doc; then
54                 local HTML_DOCS=( "doc/tutorial.html" "doc/html" )
55         fi
56
57         einstalldocs
58 }