ports/126278: [PATCH]textproc/libtre: restore agrep, add testing target, adopt port

bf bf2006a at yahoo.com
Tue Aug 5 16:50:03 UTC 2008


>Number:         126278
>Category:       ports
>Synopsis:       [PATCH]textproc/libtre: restore agrep, add testing target, adopt port
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Aug 05 16:50:01 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     bf
>Release:        7-STABLE i386
>Organization:
-
>Environment:
>Description:
Resolve the textproc/agrep conflict in a way that doesn't remove functionality from libtre; add regression-test target; take up maintainership.
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

diff -ruN libtre.orig/Makefile libtre/Makefile
--- libtre.orig/Makefile	2008-08-05 09:14:57.205641150 -0400
+++ libtre/Makefile	2008-08-05 10:50:07.103394635 -0400
@@ -8,20 +8,20 @@
 
 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
 DISTNAME=	tre-${PORTVERSION}
 
-MAINTAINER=	ports at FreeBSD.org
+MAINTAINER=	bf2006a at 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
 
@@ -31,6 +31,8 @@
 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 @@
 		-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 @@
 .endfor
 .endif
 
+regression-test: build
+	@(cd ${BUILD_WRKSRC} ; ${SETENV} ${MAKE_ENV} ${MAKE} check )
+
 .include <bsd.port.post.mk>
diff -ruN libtre.orig/files/patch-doc+agrep.1.in libtre/files/patch-doc+agrep.1.in
--- libtre.orig/files/patch-doc+agrep.1.in	1969-12-31 19:00:00.000000000 -0500
+++ libtre/files/patch-doc+agrep.1.in	2008-08-05 10:50:07.103394635 -0400
@@ -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 -ruN libtre.orig/files/patch-src+Makefile.in libtre/files/patch-src+Makefile.in
--- libtre.orig/files/patch-src+Makefile.in	1969-12-31 19:00:00.000000000 -0500
+++ libtre/files/patch-src+Makefile.in	2008-08-05 10:50:07.103394635 -0400
@@ -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@
+- at TRE_AGREP_TRUE@bin_PROGRAMS = agrep$(EXEEXT)
++ at 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 -ruN libtre.orig/files/patch-tests+agrep+run-tests.sh libtre/files/patch-tests+agrep+run-tests.sh
--- libtre.orig/files/patch-tests+agrep+run-tests.sh	1969-12-31 19:00:00.000000000 -0500
+++ libtre/files/patch-tests+agrep+run-tests.sh	2008-08-05 10:50:07.103394635 -0400
@@ -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 -ruN libtre.orig/pkg-plist libtre/pkg-plist
--- libtre.orig/pkg-plist	2008-08-05 09:14:57.225640898 -0400
+++ libtre/pkg-plist	2008-08-05 10:50:07.103394635 -0400
@@ -1,3 +1,4 @@
+bin/tre_agrep
 include/tre/regex.h
 include/tre/tre-config.h
 lib/libtre.a


>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list