dev-libs/nmeap: bump to EAPI=7.
authorConrad Kostecki <conrad@kostecki.com>
Sun, 28 Oct 2018 18:13:17 +0000 (19:13 +0100)
committerPatrice Clement <monsieurp@gentoo.org>
Mon, 29 Oct 2018 23:14:54 +0000 (00:14 +0100)
Also updated metadata.xml and fixed a compiler warning.

Signed-off-by: Conrad Kostecki <conrad@kostecki.com>
Package-Manager: Portage-2.3.51, Repoman-2.3.11
Closes: https://github.com/gentoo/gentoo/pull/10279
Signed-off-by: Patrice Clement <monsieurp@gentoo.org>
dev-libs/nmeap/files/nmeap-0.3-fix-unitialized-variable.patch [new file with mode: 0644]
dev-libs/nmeap/metadata.xml
dev-libs/nmeap/nmeap-0.3-r1.ebuild [new file with mode: 0644]

diff --git a/dev-libs/nmeap/files/nmeap-0.3-fix-unitialized-variable.patch b/dev-libs/nmeap/files/nmeap-0.3-fix-unitialized-variable.patch
new file mode 100644 (file)
index 0000000..46dcbea
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/src/nmeap01.c    2005-05-06 20:29:41.000000000 +0200\r
++++ b/src/nmeap01.c    2018-10-28 19:10:49.000000000 +0100\r
+@@ -282,7 +282,7 @@\r
+  */\r\r
+ int nmeap_process(nmeap_context_t *context)\r\r
+ {\r\r
+-    int id;\r\r
++    int id = 0;\r\r
+     int i;\r\r
+     nmeap_sentence_t *s;\r\r
+       \r\r
index 10629cc31d6807f5a7a767b0ebe0ed4a460aaf21..8a6d20835c54e8146cfa11239bda1f7a77b95526 100644 (file)
@@ -9,12 +9,13 @@
                <email>proxy-maint@gentoo.org</email>
                <name>Proxy Maintainers</name>
        </maintainer>
-       <upstream>
-               <remote-id type="sourceforge">nmeap</remote-id>
-       </upstream>
        <longdescription>
                Extensible NMEA-0183 (GPS) data parser in standard C.
                A directly linkable library intended for applications
                that want to embed GPS support, like app-misc/lcd4linux.
        </longdescription>
+       <upstream>
+               <bugs-to>https://sourceforge.net/p/nmeap/bugs/</bugs-to>
+               <remote-id type="sourceforge">nmeap</remote-id>
+       </upstream>
 </pkgmetadata>
diff --git a/dev-libs/nmeap/nmeap-0.3-r1.ebuild b/dev-libs/nmeap/nmeap-0.3-r1.ebuild
new file mode 100644 (file)
index 0000000..61aa260
--- /dev/null
@@ -0,0 +1,60 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+inherit toolchain-funcs
+
+DESCRIPTION="Extensible NMEA-0183 (GPS) data parser in standard C"
+HOMEPAGE="http://nmeap.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="doc"
+
+DEPEND="doc? ( app-doc/doxygen )"
+
+PATCHES=( "${FILESDIR}/${P}-fix-unitialized-variable.patch" )
+
+src_prepare() {
+       default
+
+       # Repsect users CFLAGS for the static lib archive
+       sed -i -e 's/CFLAGS =/CFLAGS +=/' -e 's/-g -O0 -Werror//' src/Makefile || die
+
+       # Don't build test programs, as they are not needed
+       sed -i -e '/TST/d' Makefile || die
+
+       # Silent output of Doxygen and update it, since it is quite old
+       if use doc; then
+               sed -i -e 's/QUIET.*/QUIET = YES/' Doxyfile || die
+               doxygen -u Doxyfile 2>/dev/null || die
+       fi
+}
+
+src_compile() {
+       local myemakeopts=(
+               AR="$(tc-getAR)"
+               CC="$(tc-getCC)"
+       )
+
+       emake "${myemakeopts[@]}"
+
+       if use doc; then
+               doxygen Doxyfile || die
+       fi
+}
+
+src_install() {
+       dolib.a lib/libnmeap.a
+
+       doheader inc/nmeap.h inc/nmeap_def.h
+
+       if use doc; then
+               local HTML_DOCS=( "doc/tutorial.html" "doc/html" )
+       fi
+
+       einstalldocs
+}