app-admin/fetchlog: [QA] Minor touchups

Package-Manager: Portage-2.3.19, Repoman-2.3.6
This commit is contained in:
David Seifert 2017-12-29 17:08:21 +01:00
parent d623e504f2
commit 93a25195be
No known key found for this signature in database
GPG Key ID: 59072B72EC5A8F38
2 changed files with 49 additions and 16 deletions

View File

@ -8,16 +8,31 @@ inherit toolchain-funcs
DESCRIPTION="Displays the last new messages of a logfile"
HOMEPAGE="http://fetchlog.sourceforge.net/"
SRC_URI="mirror://sourceforge/fetchlog/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~ppc ~x86 ~ppc64"
IUSE="snmp"
RDEPEND="snmp? (
>=dev-perl/Net-SNMP-4.0.1-r2
>=net-analyzer/net-snmp-5.0.6
RDEPEND="
snmp? (
>=dev-perl/Net-SNMP-4.0.1-r2
>=net-analyzer/net-snmp-5.0.6
)"
DEPEND=""
PATCHES=( "${FILESDIR}"/${PN}-1.4-fix-build-system.patch )
src_configure() {
tc-export CC
}
src_install() {
dobin fetchlog
einstalldocs
dodoc *cfg*
doman fetchlog.1
}
pkg_preinst() {
elog
@ -28,15 +43,3 @@ pkg_preinst() {
elog "have 'snmp' in your USE flags"
elog
}
src_compile() {
# Links the .c file straight to the binary
emake CC="$(tc-getCC)" CFLAGS="${CFLAGS} ${LDFLAGS}"
}
src_install() {
dodoc CHANGES README*
dodoc *cfg*
dobin fetchlog
doman fetchlog.1
}

View File

@ -0,0 +1,30 @@
--- a/Makefile
+++ b/Makefile
@@ -23,8 +23,8 @@
### compiler
### gcc
-CC=gcc
-CFLAGS= -O -Werror -Wall -Wcast-qual -Wstrict-prototypes \
+CC ?= gcc
+CFLAGS += -Wall -Wcast-qual -Wstrict-prototypes \
-Wmissing-prototypes -Wmissing-declarations -Winline -Wcast-align
### cc
#CC=cc
@@ -72,7 +72,7 @@
# compiler stuff
# --------------
-CC_OPT= $(CFLAGS) -DFETCHLOG_VERSION_NO=\"$(FETCHLOG_VERSION)\" \
+CPPFLAGS += -DFETCHLOG_VERSION_NO=\"$(FETCHLOG_VERSION)\" \
$(HAS_MADVISE) $(HAS_REGEX)
# all
@@ -82,7 +82,6 @@
# fetchlog
# -------
fetchlog: fetchlog.c
- $(CC) $(CC_OPT) fetchlog.c -o fetchlog
# install