aboutsummaryrefslogtreecommitdiff
path: root/textproc/libtre
diff options
context:
space:
mode:
authorBeech Rintoul <beech@FreeBSD.org>2008-08-07 03:59:37 +0000
committerBeech Rintoul <beech@FreeBSD.org>2008-08-07 03:59:37 +0000
commit45fe5d8fce9d82ed5551c6ae712f59133d468f97 (patch)
tree3fcc6b520e627dd145e56c6c62b1227f5392222c /textproc/libtre
parentd324e74eef3c10d31a02b3fd0ef253e9ff13e955 (diff)
downloadports-45fe5d8fce9d82ed5551c6ae712f59133d468f97.tar.gz
ports-45fe5d8fce9d82ed5551c6ae712f59133d468f97.zip
Notes
Diffstat (limited to 'textproc/libtre')
-rw-r--r--textproc/libtre/Makefile21
-rw-r--r--textproc/libtre/files/patch-doc+agrep.1.in21
-rw-r--r--textproc/libtre/files/patch-src+Makefile.in20
-rw-r--r--textproc/libtre/files/patch-tests+agrep+run-tests.sh37
-rw-r--r--textproc/libtre/pkg-plist1
5 files changed, 95 insertions, 5 deletions
diff --git a/textproc/libtre/Makefile b/textproc/libtre/Makefile
index 26c095ea2d9b..170f7b7d2384 100644
--- a/textproc/libtre/Makefile
+++ b/textproc/libtre/Makefile
@@ -8,22 +8,22 @@
PORTNAME= libtre
PORTVERSION= 0.7.5
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= textproc
MASTER_SITES= http://laurikari.net/tre/ \
- ${MASTER_SITE_LOCAL}
-MASTER_SITE_SUBDIR= jkoshy
+ LOCAL/jkoshy
DISTNAME= tre-${PORTVERSION}
-MAINTAINER= ports@FreeBSD.org
+MAINTAINER= bf2006a@yahoo.com
COMMENT= A lightweight fully POSIX compliant regexp matching library
USE_BZIP2= yes
USE_GNOME= gnomehack gnometarget pkgconfig
USE_AUTOTOOLS= libtool:15
-CONFIGURE_ARGS+= --enable-static --disable-agrep
+CONFIGURE_ARGS+= --enable-static
CONFIGURE_ENV+= CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}"
USE_LDCONFIG= yes
+USE_GETTEXT= yes
CPPFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
@@ -31,6 +31,8 @@ LDFLAGS+= -L${LOCALBASE}/lib
OPTIONS= NLS "native language support" off \
OPTIMIZED_CFLAGS "append optimization flags to CFLAGS" off
+MAN1= tre_agrep.1
+
.include <bsd.port.pre.mk>
.if defined(WITH_NLS)
@@ -47,6 +49,12 @@ CFLAGS+= -Wuninitialized -ffast-math -finline-functions \
-fforce-mem -fforce-addr -O3
.endif
+post-patch:
+ ${MV} ${WRKSRC}/doc/agrep.1.in ${WRKSRC}/doc/tre_agrep.1.in
+ ${REINPLACE_CMD} -e 's;agrep\.1;tre_agrep\.1;g' ${WRKSRC}/configure \
+ ${WRKSRC}/tre.spec.in ${WRKSRC}/doc/Makefile.in
+ ${REINPLACE_CMD} -e 's;agrep;tre_agrep;g' ${WRKSRC}/tests/agrep/*.ok
+
post-install:
.if !defined(NOPORTDOCS)
${MKDIR} ${DOCSDIR}
@@ -55,4 +63,7 @@ post-install:
.endfor
.endif
+regression-test: build
+ @(cd ${BUILD_WRKSRC} ; ${SETENV} ${MAKE_ENV} ${MAKE} check )
+
.include <bsd.port.post.mk>
diff --git a/textproc/libtre/files/patch-doc+agrep.1.in b/textproc/libtre/files/patch-doc+agrep.1.in
new file mode 100644
index 000000000000..74302a048d20
--- /dev/null
+++ b/textproc/libtre/files/patch-doc+agrep.1.in
@@ -0,0 +1,21 @@
+--- doc/agrep.1.in.orig 2008-08-05 10:13:28.469606821 -0400
++++ doc/agrep.1.in 2008-08-05 10:14:43.470753615 -0400
+@@ -1,14 +1,14 @@
+-.TH agrep 1 "November 21, 2004" "TRE agrep @PACKAGE_VERSION@"
++.TH tre_agrep 1 "November 21, 2004" "TRE tre_agrep @PACKAGE_VERSION@"
+ .SH NAME
+-agrep \- print lines approximately matching a pattern
++tre_agrep \- print lines approximately matching a pattern
+ .SH SYNOPSIS
+-.B agrep
++.B tre_agrep
+ .RI [ OPTION ]...
+ .I PATTERN
+ .RI [ FILE ]...
+ .SH DESCRIPTION
+ Searches for approximate matches of PATTERN in each FILE or standard
+-input. Example: `agrep \-2 optimize foo.txt' outputs all lines in
++input. Example: `tre_agrep \-2 optimize foo.txt' outputs all lines in
+ file `foo.txt' that match "optimize" within two errors. E.g. lines
+ which contain "optimise", "optmise", and "opitmize" all match.
+ .SH OPTIONS
diff --git a/textproc/libtre/files/patch-src+Makefile.in b/textproc/libtre/files/patch-src+Makefile.in
new file mode 100644
index 000000000000..49e4e7a7e5ce
--- /dev/null
+++ b/textproc/libtre/files/patch-src+Makefile.in
@@ -0,0 +1,20 @@
+--- src/Makefile.in.orig 2008-08-05 09:49:07.117143030 -0400
++++ src/Makefile.in 2008-08-05 09:50:16.548210107 -0400
+@@ -37,7 +37,7 @@
+ build_triplet = @build@
+ host_triplet = @host@
+ target_triplet = @target@
+-@TRE_AGREP_TRUE@bin_PROGRAMS = agrep$(EXEEXT)
++@TRE_AGREP_TRUE@bin_PROGRAMS = tre_agrep$(EXEEXT)
+ subdir = src
+ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+@@ -281,7 +281,7 @@
+ echo " rm -f $$p $$f"; \
+ rm -f $$p $$f ; \
+ done
+-agrep$(EXEEXT): $(agrep_OBJECTS) $(agrep_DEPENDENCIES)
++tre_agrep$(EXEEXT): $(agrep_OBJECTS) $(agrep_DEPENDENCIES)
+ @rm -f agrep$(EXEEXT)
+ $(LINK) $(agrep_LDFLAGS) $(agrep_OBJECTS) $(agrep_LDADD) $(LIBS)
+
diff --git a/textproc/libtre/files/patch-tests+agrep+run-tests.sh b/textproc/libtre/files/patch-tests+agrep+run-tests.sh
new file mode 100644
index 000000000000..bcd3c36615e5
--- /dev/null
+++ b/textproc/libtre/files/patch-tests+agrep+run-tests.sh
@@ -0,0 +1,37 @@
+--- tests/agrep/run-tests.sh.orig 2006-12-08 14:07:03.000000000 -0500
++++ tests/agrep/run-tests.sh 2008-08-05 09:56:07.263599354 -0400
+@@ -2,7 +2,7 @@
+
+ set -e
+
+-agrep="$top_builddir/src/agrep"
++agrep="$top_builddir/src/tre_agrep"
+
+ echo "$builddir $top_builddir $srcdir"
+
+@@ -41,10 +41,10 @@
+ # different platforms with regards to expanding \n (IRIX expands
+ # it, others typically do not). `cat' doesn't process its output.
+ cat >> $out <<EOF
+-#### TEST: agrep $extra $arg $input
++#### TEST: tre_agrep $extra $arg $input
+ EOF
+ cat <<EOF
+-agrep $extra $arg $input
++tre_agrep $extra $arg $input
+ EOF
+ set +e
+ $agrep $extra $arg $input >> $out
+@@ -57,10 +57,10 @@
+
+ num_expanded=`expr $num_expanded + 1`
+ cat >> $out <<EOF
+-#### TEST: agrep $extra $arg < $input
++#### TEST: tre_agrep $extra $arg < $input
+ EOF
+ cat <<EOF
+-agrep $extra $arg < $input
++tre_agrep $extra $arg < $input
+ EOF
+ set +e
+ $agrep $extra $arg < $input >> $out
diff --git a/textproc/libtre/pkg-plist b/textproc/libtre/pkg-plist
index 0ba46edff633..6311289f7f84 100644
--- a/textproc/libtre/pkg-plist
+++ b/textproc/libtre/pkg-plist
@@ -1,3 +1,4 @@
+bin/tre_agrep
include/tre/regex.h
include/tre/tre-config.h
lib/libtre.a