summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-admin/fetchlog')
-rw-r--r--app-admin/fetchlog/fetchlog-1.4-r1.ebuild35
-rw-r--r--app-admin/fetchlog/files/fetchlog-1.4-fix-build-system.patch30
2 files changed, 49 insertions, 16 deletions
diff --git a/app-admin/fetchlog/fetchlog-1.4-r1.ebuild b/app-admin/fetchlog/fetchlog-1.4-r1.ebuild
index 0893accd6e63..13e7e73d9aff 100644
--- a/app-admin/fetchlog/fetchlog-1.4-r1.ebuild
+++ b/app-admin/fetchlog/fetchlog-1.4-r1.ebuild
@@ -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
-}
diff --git a/app-admin/fetchlog/files/fetchlog-1.4-fix-build-system.patch b/app-admin/fetchlog/files/fetchlog-1.4-fix-build-system.patch
new file mode 100644
index 000000000000..53c05d85f74c
--- /dev/null
+++ b/app-admin/fetchlog/files/fetchlog-1.4-fix-build-system.patch
@@ -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