aboutsummaryrefslogtreecommitdiffstats
path: root/textproc
diff options
context:
space:
mode:
authorlwhsu <lwhsu@FreeBSD.org>2014-07-11 14:30:09 +0800
committerlwhsu <lwhsu@FreeBSD.org>2014-07-11 14:30:09 +0800
commit4090138c82243c267ec37e753e94c2a07852aa73 (patch)
treebf281176450823b4975f7ea23b5442d7b61cb451 /textproc
parent8fceb5e73435b0b1e6315d5f4b71aee2cd91a92a (diff)
downloadfreebsd-ports-gnome-4090138c82243c267ec37e753e94c2a07852aa73.tar.gz
freebsd-ports-gnome-4090138c82243c267ec37e753e94c2a07852aa73.tar.zst
freebsd-ports-gnome-4090138c82243c267ec37e753e94c2a07852aa73.zip
Add cgrep, context-aware grep for source codes
Diffstat (limited to 'textproc')
-rw-r--r--textproc/Makefile1
-rw-r--r--textproc/cgrep/Makefile40
-rw-r--r--textproc/cgrep/distinfo2
-rw-r--r--textproc/cgrep/pkg-descr6
-rw-r--r--textproc/cgrep/pkg-plist3
5 files changed, 52 insertions, 0 deletions
diff --git a/textproc/Makefile b/textproc/Makefile
index a7f3262dcac5..fa2a75fe407c 100644
--- a/textproc/Makefile
+++ b/textproc/Makefile
@@ -63,6 +63,7 @@
SUBDIR += cbedic
SUBDIR += cdif
SUBDIR += cdiff
+ SUBDIR += cgrep
SUBDIR += chm2pdf
SUBDIR += chpp
SUBDIR += cl-meta
diff --git a/textproc/cgrep/Makefile b/textproc/cgrep/Makefile
new file mode 100644
index 000000000000..2fe16b416565
--- /dev/null
+++ b/textproc/cgrep/Makefile
@@ -0,0 +1,40 @@
+# Created by: Li-Wen Hsu <lwhsu@FreeBSD.org>
+# $FreeBSD$
+
+PORTNAME= cgrep
+PORTVERSION= 6.4.3
+CATEGORIES= textproc
+
+MAINTAINER= lwhsu@FreeBSD.org
+COMMENT= Context-aware grep for source codes
+
+LICENSE= GPLv2
+
+BUILD_DEPENDS= ghc:${PORTSDIR}/lang/ghc \
+ hs-ansi-terminal>=0.5:${PORTSDIR}/devel/hs-ansi-terminal \
+ hs-cmdargs>=0.10:${PORTSDIR}/devel/hs-cmdargs \
+ hs-dlist>=0.3:${PORTSDIR}/devel/hs-dlist \
+ hs-regex-posix>=0.90:${PORTSDIR}/textproc/hs-regex-posix \
+ hs-safe>=0.3:${PORTSDIR}/devel/hs-safe \
+ hs-split>=0.2:${PORTSDIR}/devel/hs-split \
+ hs-stm>=2.1:${PORTSDIR}/devel/hs-stm \
+ hs-stringsearch>=0.3:${PORTSDIR}/textproc/hs-stringsearch \
+ hs-unordered-containers>=0.1:${PORTSDIR}/devel/hs-unordered-containers
+
+USE_GITHUB= yes
+GH_ACCOUNT= awgn
+GH_TAGNAME= v${PORTVERSION}
+GH_COMMIT= 0ade66d
+
+USES= gmake
+
+do-build:
+ cd ${WRKSRC}/src && ${GMAKE} cgrep
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/bin/cgrep ${STAGEDIR}${PREFIX}/bin/
+
+ ${MKDIR} ${STAGEDIR}${DATADIR}
+ ${INSTALL_DATA} ${WRKSRC}/cgreprc ${STAGEDIR}${DATADIR}
+
+.include <bsd.port.mk>
diff --git a/textproc/cgrep/distinfo b/textproc/cgrep/distinfo
new file mode 100644
index 000000000000..86f77127079d
--- /dev/null
+++ b/textproc/cgrep/distinfo
@@ -0,0 +1,2 @@
+SHA256 (cgrep-6.4.3.tar.gz) = 160a31f92c4601cb2f14a46403751c1d627792832c78a3cd6727054687ddaae9
+SIZE (cgrep-6.4.3.tar.gz) = 33443
diff --git a/textproc/cgrep/pkg-descr b/textproc/cgrep/pkg-descr
new file mode 100644
index 000000000000..d434c2457829
--- /dev/null
+++ b/textproc/cgrep/pkg-descr
@@ -0,0 +1,6 @@
+Cgrep is a grep tool suitable for searching in large code repositories. It
+supports 30 programming languages and searches that go beyond the simple
+pattern matching. It enables context-aware filtering and semantic searches
+through wildcard and combinators.
+
+WWW: http://awgn.github.io/cgrep/
diff --git a/textproc/cgrep/pkg-plist b/textproc/cgrep/pkg-plist
new file mode 100644
index 000000000000..563cc5f7e418
--- /dev/null
+++ b/textproc/cgrep/pkg-plist
@@ -0,0 +1,3 @@
+bin/cgrep
+%%DATADIR%%/cgreprc
+@dirrm %%DATADIR%%