Skip to content

Commit

Permalink
dev-libs/nmeap: New package
Browse files Browse the repository at this point in the history
Needed-by: https://bugs.gentoo.org/652706
Closes: https://bugs.gentoo.org/653150
Package-Manager: Portage-2.3.30, Repoman-2.3.9
  • Loading branch information
ConiKost committed Apr 23, 2018
1 parent 23636f6 commit a7e65ee
Show file tree
Hide file tree
Showing 3 changed files with 91 additions and 0 deletions.
1 change: 1 addition & 0 deletions dev-libs/nmeap/Manifest
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DIST nmeap-0.3.tar.gz 29380 BLAKE2B d4828a1a3d8a66ae529e40c034bf180da9657c2a3dec1ab09f32a9062430952a568612d2071acb887c6f1afdb19de82cb4b6d1788c6e9c2e1e859d9914209b3a SHA512 064a7fe27a192b4abe1393f8f343c8956bd9dd1d0de1441ca96597ab1f155001905b9b0b35d47b61e1f68891b820c602c024e4c74fb809719108711c5b1df815
24 changes: 24 additions & 0 deletions dev-libs/nmeap/metadata.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>ck+gentoo@bl4ckb0x.de</email>
<name>Conrad Kostecki</name>
</maintainer>
<maintainer type="project">
<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>
<use>
<flag name="doc">Install full html documentation.</flag>
<flag name="test-programs">Install test programs for various NMEA output.</flag>
</use>
</pkgmetadata>
66 changes: 66 additions & 0 deletions dev-libs/nmeap/nmeap-0.3.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI=6

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 ~x86"
IUSE="doc test-programs"

DEPEND="doc? ( app-doc/doxygen )"

src_prepare() {
default

# Repsect users CFLAGS and LDFLAGS for the static lib archive
sed -i -e 's/CFLAGS/FLAGS/g' src/Makefile || die
sed -i -e 's/-g -O0 -Werror -Wall/$(CFLAGS) $(LDFLAGS)/g' src/Makefile || die

# Respect users CFLAGS and LDFLAGS for the test programs
if use test-programs; then
sed -i -e 's/-g -O0//g' tst/Makefile || die
sed -i -e 's/-Wall -Werror/$(CFLAGS) $(LDFLAGS)/g' tst/Makefile || die
fi

# 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 || die
fi

# Only build those test programs, if a user wants it
if ! use test-programs; then
sed -i -e '/TST/d' Makefile || die
fi
}

src_install() {
# Install header files
insinto /usr/include
doins inc/nmeap.h inc/nmeap_def.h

# Install static lib archive
insinto /usr/$(get_libdir)
doins lib/libnmeap.a

# Install test programs
if use test-programs; then
local number
for number in {1..3}; do
exeinto /usr/bin
newexe tst/test$number nmeap-test$number
done
fi

# Install docs
if use doc; then
local HTML_DOCS=( "doc/tutorial.html" "doc/html" )
doxygen Doxyfile || die
einstalldocs
fi
}

0 comments on commit a7e65ee

Please sign in to comment.