diff options
author | lwhsu <lwhsu@FreeBSD.org> | 2008-01-01 05:45:21 +0800 |
---|---|---|
committer | lwhsu <lwhsu@FreeBSD.org> | 2008-01-01 05:45:21 +0800 |
commit | 7a1f6f9ef0d7a9b7d44837154a55c55a8a8300b7 (patch) | |
tree | b45f414d883cf825223cb2feb3fcece30ec959bd /textproc/py-libtre | |
parent | 7a0a8eb87ba9a6916627b73f34e77af9ec3252e4 (diff) | |
download | freebsd-ports-gnome-7a1f6f9ef0d7a9b7d44837154a55c55a8a8300b7.tar.gz freebsd-ports-gnome-7a1f6f9ef0d7a9b7d44837154a55c55a8a8300b7.tar.zst freebsd-ports-gnome-7a1f6f9ef0d7a9b7d44837154a55c55a8a8300b7.zip |
Add py-libtre 0.7.5, python interface for the tre regular expressions
library.
PR: ports/113446
Submitted by: bf <bf2006a at yahoo.com>
Diffstat (limited to 'textproc/py-libtre')
-rw-r--r-- | textproc/py-libtre/Makefile | 38 | ||||
-rw-r--r-- | textproc/py-libtre/distinfo | 3 | ||||
-rw-r--r-- | textproc/py-libtre/pkg-descr | 14 |
3 files changed, 55 insertions, 0 deletions
diff --git a/textproc/py-libtre/Makefile b/textproc/py-libtre/Makefile new file mode 100644 index 000000000000..2865b55562d8 --- /dev/null +++ b/textproc/py-libtre/Makefile @@ -0,0 +1,38 @@ +# Ports collection makefile for: py-libtre +# Date created: 6 June 2007 +# Whom: bf <bf2006a@yahoo.com> +# +# $FreeBSD$ +# + +PORTNAME= libtre +PORTVERSION= 0.7.5 +CATEGORIES= textproc python +MASTER_SITES= http://laurikari.net/tre/ +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} +DISTNAME= tre-${PORTVERSION} + +MAINTAINER= bf2006a@yahoo.com +COMMENT= Python interface for the tre regular expressions library + +LIB_DEPENDS= tre.6:${PORTSDIR}/textproc/libtre + +USE_BZIP2= yes +USE_PYTHON= yes +USE_PYDISTUTILS= yes +PYDISTUTILS_PKGNAME= tre + +BUILD_WRKSRC= ${WRKSRC}/python +INSTALL_WRKSRC= ${WRKSRC}/python + +CFLAGS+= -I${LOCALBASE}/include/ -L${LOCALBASE}/lib/ + +.if defined(WITH_OPTIMIZED_CFLAGS) +CFLAGS+= -Wuninitialized -ffast-math -finline-functions \ + -fomit-frame-pointer -fexpensive-optimizations \ + -fforce-mem -fforce-addr -O3 +.endif + +PLIST_FILES= %%PYTHON_SITELIBDIR%%/tre.so + +.include <bsd.port.mk> diff --git a/textproc/py-libtre/distinfo b/textproc/py-libtre/distinfo new file mode 100644 index 000000000000..0a7bf7698ea7 --- /dev/null +++ b/textproc/py-libtre/distinfo @@ -0,0 +1,3 @@ +MD5 (tre-0.7.5.tar.bz2) = e72e5c94008865cf720992a0b25d6e89 +SHA256 (tre-0.7.5.tar.bz2) = 030f25e6e4c1714df013105494bc5e24b3e0acc65887158a52a03efd8e0759aa +SIZE (tre-0.7.5.tar.bz2) = 396346 diff --git a/textproc/py-libtre/pkg-descr b/textproc/py-libtre/pkg-descr new file mode 100644 index 000000000000..19f483060dd0 --- /dev/null +++ b/textproc/py-libtre/pkg-descr @@ -0,0 +1,14 @@ +Libtre is an attempt to create a lightweight, robust, and efficient fully +POSIX compliant regexp matching library. There is still some work left, but +the results so far are promising. + +At the core of Libtre is a new algorithm for regular expression matching with +submatch addressing. The algorithm uses linear worst-case time in the length +of the text being searched, and quadratic worst-case time in the length of the +used regular expression. In other words, the time complexity of the algorithm +is O(M2N), where M is the length of the regular expression and N is the length +of the text. The used space is also quadratic on the length of the regex, but +does not depend on the searched string. This quadratic behaviour occurs only +on pathological cases which are probably very rare in practice. + +WWW: http://laurikari.net/tre/ |