Add py-libtre 0.7.5, python interface for the tre regular expressions

library.

PR:		ports/113446
Submitted by:	bf <bf2006a at yahoo.com>
This commit is contained in:
Li-Wen Hsu 2007-12-31 21:45:21 +00:00
parent 952adc552a
commit 7c579589e3
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=204780
4 changed files with 56 additions and 0 deletions

View file

@ -802,6 +802,7 @@
SUBDIR += py-hyperestraier
SUBDIR += py-hyperestraier-python
SUBDIR += py-jaxml
SUBDIR += py-libtre
SUBDIR += py-libxml2
SUBDIR += py-libxslt
SUBDIR += py-ltxml

View file

@ -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>

View file

@ -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

View file

@ -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/