aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlwhsu <lwhsu@FreeBSD.org>2008-01-01 05:45:21 +0800
committerlwhsu <lwhsu@FreeBSD.org>2008-01-01 05:45:21 +0800
commit7a1f6f9ef0d7a9b7d44837154a55c55a8a8300b7 (patch)
treeb45f414d883cf825223cb2feb3fcece30ec959bd
parent7a0a8eb87ba9a6916627b73f34e77af9ec3252e4 (diff)
downloadfreebsd-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>
-rw-r--r--textproc/Makefile1
-rw-r--r--textproc/py-libtre/Makefile38
-rw-r--r--textproc/py-libtre/distinfo3
-rw-r--r--textproc/py-libtre/pkg-descr14
4 files changed, 56 insertions, 0 deletions
diff --git a/textproc/Makefile b/textproc/Makefile
index 58878f9156b5..a14a3048958a 100644
--- a/textproc/Makefile
+++ b/textproc/Makefile
@@ -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
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/