diff --git a/textproc/tre/Makefile b/textproc/tre/Makefile new file mode 100644 index 00000000000..318756d0636 --- /dev/null +++ b/textproc/tre/Makefile @@ -0,0 +1,33 @@ +# $OpenBSD: Makefile,v 1.1.1.1 2007/01/29 20:14:29 kili Exp $ + +COMMENT= "lightweight regexp matching library with additional features" + +DISTNAME= tre-0.7.5 +EXTRACT_SUFX= .tar.bz2 +CATEGORIES= textproc + +HOMEPAGE= http://laurikari.net/tre/ + +MASTER_SITES= ${HOMEPAGE} + +MAINTAINER= Matthias Kilian + +# LGPL +PERMIT_PACKAGE_CDROM= Yes +PERMIT_PACKAGE_FTP= Yes +PERMIT_DISTFILES_CDROM= Yes +PERMIT_DISTFILES_FTP= Yes + +SHARED_LIBS+= tre 6.4 # .6.4 + +WANTLIB= c + +MODULES= devel/gettext converters/libiconv + +LIB_DEPENDS= utf8.>=1::misc/libutf8 + +USE_LIBTOOL= Yes +CONFIGURE_STYLE= gnu +CONFIGURE_ARGS+= --enable-static --with-libutf8=${LOCALBASE} + +.include diff --git a/textproc/tre/distinfo b/textproc/tre/distinfo new file mode 100644 index 00000000000..9300d07c00d --- /dev/null +++ b/textproc/tre/distinfo @@ -0,0 +1,4 @@ +MD5 (tre-0.7.5.tar.bz2) = e72e5c94008865cf720992a0b25d6e89 +RMD160 (tre-0.7.5.tar.bz2) = 240c106caef50097a9bfbad94f5cc002a9b4b497 +SHA1 (tre-0.7.5.tar.bz2) = 16b860479341f3179ef987765aacda9e2803f7bb +SIZE (tre-0.7.5.tar.bz2) = 396346 diff --git a/textproc/tre/patches/patch-tests_agrep_exitstatus_ok b/textproc/tre/patches/patch-tests_agrep_exitstatus_ok new file mode 100644 index 00000000000..f8ebccfde73 --- /dev/null +++ b/textproc/tre/patches/patch-tests_agrep_exitstatus_ok @@ -0,0 +1,93 @@ +$OpenBSD: patch-tests_agrep_exitstatus_ok,v 1.1.1.1 2007/01/29 20:14:29 kili Exp $ + +# Those tests are supposed to bail out with exit code 2 (confirmed by +# upstream). + +--- tests/agrep/exitstatus.ok.orig Fri Dec 8 20:07:03 2006 ++++ tests/agrep/exitstatus.ok Thu Jan 4 15:12:26 2007 +@@ -524,65 +524,64 @@ Exit status 1. + Exit status 1. + #### TEST: agrep -d .* dummy exitstatus.in + +-Exit status 1. ++Exit status 2. + #### TEST: agrep -d .* dummy < exitstatus.in + +-Exit status 1. ++Exit status 2. + #### TEST: agrep -c -d .* dummy exitstatus.in +-exitstatus.in:0 + +-Exit status 1. ++Exit status 2. + #### TEST: agrep -c -d .* dummy < exitstatus.in + +-Exit status 1. ++Exit status 2. + #### TEST: agrep -H -d .* dummy exitstatus.in + +-Exit status 1. ++Exit status 2. + #### TEST: agrep -H -d .* dummy < exitstatus.in + +-Exit status 1. ++Exit status 2. + #### TEST: agrep -l -d .* dummy exitstatus.in + +-Exit status 1. ++Exit status 2. + #### TEST: agrep -l -d .* dummy < exitstatus.in + +-Exit status 1. ++Exit status 2. + #### TEST: agrep -n -d .* dummy exitstatus.in + +-Exit status 1. ++Exit status 2. + #### TEST: agrep -n -d .* dummy < exitstatus.in + +-Exit status 1. ++Exit status 2. + #### TEST: agrep -s -d .* dummy exitstatus.in + +-Exit status 1. ++Exit status 2. + #### TEST: agrep -s -d .* dummy < exitstatus.in + +-Exit status 1. ++Exit status 2. + #### TEST: agrep -M -d .* dummy exitstatus.in + +-Exit status 1. ++Exit status 2. + #### TEST: agrep -M -d .* dummy < exitstatus.in + +-Exit status 1. ++Exit status 2. + #### TEST: agrep --show-position -d .* dummy exitstatus.in + +-Exit status 1. ++Exit status 2. + #### TEST: agrep --show-position -d .* dummy < exitstatus.in + +-Exit status 1. ++Exit status 2. + #### TEST: agrep --color -d .* dummy exitstatus.in + +-Exit status 1. ++Exit status 2. + #### TEST: agrep --color -d .* dummy < exitstatus.in + +-Exit status 1. ++Exit status 2. + #### TEST: agrep -H -n -s --color --show-position -d .* dummy exitstatus.in + +-Exit status 1. ++Exit status 2. + #### TEST: agrep -H -n -s --color --show-position -d .* dummy < exitstatus.in + +-Exit status 1. ++Exit status 2. + #### TEST: agrep -d {1 dummy exitstatus.in + + Exit status 2. diff --git a/textproc/tre/patches/patch-tests_retest_c b/textproc/tre/patches/patch-tests_retest_c new file mode 100644 index 00000000000..2ad69eece8d --- /dev/null +++ b/textproc/tre/patches/patch-tests_retest_c @@ -0,0 +1,33 @@ +$OpenBSD: patch-tests_retest_c,v 1.1.1.1 2007/01/29 20:14:29 kili Exp $ + +# Skip one more i18n test that fails at least on alpha and sparc64. + +--- tests/retest.c.orig Sat Dec 9 21:42:56 2006 ++++ tests/retest.c Fri Jan 5 20:57:34 2007 +@@ -1460,6 +1460,7 @@ main(int argc, char **argv) + + + ++#ifndef __OpenBSD__ + /* + * Internationalization tests. + */ +@@ -1468,7 +1469,7 @@ main(int argc, char **argv) + test_comp("機+", REG_EXTENDED, 0); + test_exec("この賞は、機・利便性・セキ", 0, REG_OK, 10, 13, END); + +-#if !defined(WIN32) && !defined(__OpenBSD__) ++#ifndef WIN32 + if (setlocale(LC_CTYPE, "fi_FI.ISO-8859-1") != NULL) + { + printf("\nTesting LC_CTYPE fi_FI.ISO-8859-1\n"); +@@ -1492,7 +1493,8 @@ main(int argc, char **argv) + test_exec("abc", 0, REG_OK, 2, 3, END); + } + #endif /* TRE_MULTIBYTE */ +-#endif ++#endif /* WIN32 */ ++#endif /* __OpenBSD__ */ + + regfree(&reobj); + diff --git a/textproc/tre/pkg/DESCR b/textproc/tre/pkg/DESCR new file mode 100644 index 00000000000..5706af31397 --- /dev/null +++ b/textproc/tre/pkg/DESCR @@ -0,0 +1,5 @@ +TRE is a lightweight, robust, and efficient POSIX compliant regexp +matching library with some exciting features such as approximate +(fuzzy) matching. It includes a version of the agrep (approximate +grep) command line tool for approximate regexp matching in the style +of grep. diff --git a/textproc/tre/pkg/PFRAG.shared b/textproc/tre/pkg/PFRAG.shared new file mode 100644 index 00000000000..1ddcbe83bde --- /dev/null +++ b/textproc/tre/pkg/PFRAG.shared @@ -0,0 +1,2 @@ +@comment $OpenBSD: PFRAG.shared,v 1.1.1.1 2007/01/29 20:14:29 kili Exp $ +@lib lib/libtre.so.${LIBtre_VERSION} diff --git a/textproc/tre/pkg/PLIST b/textproc/tre/pkg/PLIST new file mode 100644 index 00000000000..02e07f3f09e --- /dev/null +++ b/textproc/tre/pkg/PLIST @@ -0,0 +1,15 @@ +@comment $OpenBSD: PLIST,v 1.1.1.1 2007/01/29 20:14:29 kili Exp $ +@conflict agrep-* +@conflict glimpse-* +bin/agrep +include/tre/ +include/tre/regex.h +include/tre/tre-config.h +lib/libtre.a +lib/libtre.la +lib/pkgconfig/ +lib/pkgconfig/tre.pc +@man man/man1/agrep.1 +share/locale/fi/LC_MESSAGES/tre.mo +share/locale/sv/LC_MESSAGES/tre.mo +%%SHARED%%