[58520] trunk/dports/sysutils
blb at macports.org
blb at macports.org
Tue Sep 29 23:28:40 PDT 2009
Revision: 58520
http://trac.macports.org/changeset/58520
Author: blb at macports.org
Date: 2009-09-29 23:28:37 -0700 (Tue, 29 Sep 2009)
Log Message:
-----------
New port - sysutils/grok, Easily parse logs and other files; ticket #21691
Added Paths:
-----------
trunk/dports/sysutils/grok/
trunk/dports/sysutils/grok/Portfile
trunk/dports/sysutils/grok/files/
trunk/dports/sysutils/grok/files/patch-Makefile.diff
Added: trunk/dports/sysutils/grok/Portfile
===================================================================
--- trunk/dports/sysutils/grok/Portfile (rev 0)
+++ trunk/dports/sysutils/grok/Portfile 2009-09-30 06:28:37 UTC (rev 58520)
@@ -0,0 +1,61 @@
+# $Id$
+
+PortSystem 1.0
+
+name grok
+version 20090928
+categories sysutils
+maintainers org.geekdaily:jim openmaintainer
+platforms darwin
+
+description Easily parse logs and other files.
+
+long_description Grok is simple software that allows you to easily parse logs \
+ and other files. You teach grok how to parse data through the \
+ config file. Grok is a system for reacting to events - those events \
+ being log entries.
+
+homepage http://www.semicomplete.com/projects/grok/
+
+master_sites http://semicomplete.googlecode.com/files/
+checksums md5 629465d284de11c37a644cab970be432 \
+ sha1 bfc8db7be17f1bb52f2b930dfe284a0db8595b35 \
+ rmd160 8b9f6f27e85700f7f227bd3a6f5b9925de82e8e9
+
+patchfiles patch-Makefile.diff
+post-patch {
+ reinplace "s|@@PREFIX@@|${prefix}|g" ${worksrcpath}/Makefile
+}
+
+depends_build port:bison \
+ port:flex \
+ port:gperf \
+ port:gmake
+
+depends_run port:libevent \
+ port:pcre \
+ port:db46
+
+use_configure no
+
+build.type gnu
+build.args CFLAGS="`pcre-config --cflags` -I${prefix}/include/db46" LDFLAGS="`pcre-config --libs` -L${prefix}/lib/db46 -levent -ldb -rdynamic"
+
+test.run yes
+
+destroot.args PREFIX=${destroot}${prefix} INSTALL_USER=${install.user} INSTALL_GROUP=${install.group}
+
+### TODO: pre-build testing for these dependencies
+# Build dependencies:
+# bison >= 2.3
+# flex >= 2.5.35
+# gperf >= 3.0
+# GNU make >= 3.81
+#
+# Run dependencies:
+# libevent >= 1.3 (older versions may work)
+# libpcre >= 7.6
+# Berkeley DB >= 4.5
+#
+# Test suite dependencies:
+# CUnit >= 2.1
Property changes on: trunk/dports/sysutils/grok/Portfile
___________________________________________________________________
Added: svn:keywords
+ Id
Added: svn:eol-style
+ native
Added: trunk/dports/sysutils/grok/files/patch-Makefile.diff
===================================================================
--- trunk/dports/sysutils/grok/files/patch-Makefile.diff (rev 0)
+++ trunk/dports/sysutils/grok/files/patch-Makefile.diff 2009-09-30 06:28:37 UTC (rev 58520)
@@ -0,0 +1,50 @@
+--- Makefile.orig 2009-09-28 20:02:18.000000000 -0600
++++ Makefile 2009-09-30 00:19:40.000000000 -0600
+@@ -1,5 +1,7 @@
+ PACKAGE=grok
+ PREFIX=/usr/local
++INSTALL_USER=root
++INSTALL_GROUP=root
+
+ CFLAGS+=-pipe -fPIC
+ #CFLAGS+=-pg -g
+@@ -45,7 +47,7 @@
+ GROKPROGOBJ=grok_input.o grok_program.o grok_matchconf.o $(GROKOBJ)
+
+ .PHONY: all
+-all: grok libgrok.so
++all: grok libgrok.dylib
+
+ .PHONY: package build-package test-package
+ package: build-package test-package
+@@ -82,9 +84,9 @@
+ grok: $(GROKOBJ) conf.tab.o conf.yy.o main.o grok_config.o
+ gcc $(LDFLAGS) -g $^ -o $@
+
+-libgrok.so: LDFLAGS+=-levent
+-libgrok.so: $(GROKOBJ) conf.tab.o conf.yy.o main.o grok_config.o
+- gcc $(LDFLAGS) -fPIC -shared -g $^ -o $@
++libgrok.dylib: LDFLAGS+=-levent
++libgrok.dylib: $(GROKOBJ) conf.tab.o conf.yy.o main.o grok_config.o
++ gcc $(LDFLAGS) -dynamiclib -install_name @@PREFIX@@/lib/libgrok.dylib -compatibility_version 1.0.0 -current_version 1.0.0 -g $^ -o libgrok.dylib
+
+ # File dependencies
+ grok.h: grok_capture.h
+@@ -115,10 +117,13 @@
+ .c.o:
+ $(CC) -c $(CFLAGS) $< -o $@
+
+-install: libgrok.so grok
+- install -m 755 -o root -g root grok $(PREFIX)/bin
+- install -m 644 -o root -g root libgrok.so $(PREFIX)/lib
++install: libgrok.dylib grok
++ for dirname in bin lib include; do \
++ mkdir -p $(PREFIX)/$$dirname; \
++ done
++ install -m 755 -o $(INSTALL_USER) -g $(INSTALL_GROUP) grok $(PREFIX)/bin/.
++ install -m 644 -o $(INSTALL_USER) -g $(INSTALL_GROUP) libgrok.dylib $(PREFIX)/lib/.
+ for header in grok.h grokre.h grok_pattern.h grok_capture.h grok_capture_xdr.h grok_match.h grok_logging.h; do \
+- install -m 644 -o root -g root $$header $(PREFIX)/include; \
++ install -m 644 -o $(INSTALL_USER) -g $(INSTALL_GROUP) $$header $(PREFIX)/include/.; \
+ done
+
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090929/6914fce6/attachment.html>
More information about the macports-changes
mailing list