Bug 112501 - Update devel/re2c to current 0.12 version
Summary: Update devel/re2c to current 0.12 version
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Frank J. Laszlo
Depends on:
Reported: 2007-05-07 21:00 UTC by John Levine
Modified: 2007-06-18 18:10 UTC (History)
0 users

See Also:

file.diff (1.04 KB, patch)
2007-05-07 21:00 UTC, John Levine
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description John Levine 2007-05-07 21:00:11 UTC
	Current version of re2c has bugs that keep the latest version of spamassassin from working

Fix: patches to update port
	just update Makefile and distinfo, get rid of patches that are no longer needed

How-To-Repeat: 	build spamassassin 3.2, run sa-compile, observe patterns barf
Comment 1 Edwin Groothuis freebsd_committer 2007-05-07 22:39:09 UTC
Responsible Changed
From-To: freebsd-ports-bugs->laszlof

Over to maintainer
Comment 2 bf 2007-06-05 16:13:39 UTC
You may want to try this (patch for re2c 0.12.1)


Note that Michael Scheidell, in ports/112502: "Update
mail/p5-Mail-SpamAssassin to 3.2.0", claims that an
update to this port is necessary for SpamAssassin's
sa-compile, which has significant new performance
enhancements (see, for example,
http://taint.org/tag/sa-compile ), so it would be nice
if some variation on this patch were to be committed

diff -ruN re2c.orig/Makefile re2c/Makefile
--- re2c.orig/Makefile	Wed Feb 21 20:15:47 2007
+++ re2c/Makefile	Sun Jun  3 09:29:22 2007
@@ -6,7 +6,7 @@
@@ -14,17 +14,21 @@
 MAINTAINER=	laszlof@FreeBSD.org
 COMMENT=	Compile regular expression to C (much faster
final code than flex)
+BUILD_DEPENDS=	bison:${PORTSDIR}/devel/bison2
 USE_GCC=	3.3+
 MAN1=		re2c.1
+	${RM} -f ${WRKSRC}/scanner.cc
 .if !defined(NOPORTDOCS)
-	${CP} -R ${WRKSRC}/doc/* ${DOCSDIR}
-	${CP} -R ${WRKSRC}/examples/* ${EXAMPLESDIR}
+	(cd ${WRKSRC}/doc/ && ${COPYTREE_SHARE} \*
+	(cd ${WRKSRC}/examples/ && ${COPYTREE_SHARE} \*
 .include <bsd.port.mk>
diff -ruN re2c.orig/distinfo re2c/distinfo
--- re2c.orig/distinfo	Wed Feb 21 20:15:47 2007
+++ re2c/distinfo	Sun Jun  3 09:29:57 2007
@@ -1,3 +1,3 @@
-MD5 (re2c-0.11.1.tar.gz) =
-SHA256 (re2c-0.11.1.tar.gz) =
-SIZE (re2c-0.11.1.tar.gz) = 579908
+MD5 (re2c-0.12.1.tar.gz) =
+SHA256 (re2c-0.12.1.tar.gz) =
+SIZE (re2c-0.12.1.tar.gz) = 610405
diff -ruN re2c.orig/files/patch-action.cc
--- re2c.orig/files/patch-action.cc	Tue Jun  1
05:41:36 2004
+++ re2c/files/patch-action.cc	Wed Dec 31 19:00:00
@@ -1,10 +0,0 @@
---- actions.cc.orig	Tue Jun  1 17:31:44 2004
-+++ actions.cc	Tue Jun  1 17:32:05 2004
-@@ -1,6 +1,7 @@
- /* $Id: actions.cc,v 1.5 2004/05/13 02:58:17 nuffer
Exp $ */
- #include <time.h>
- #include <string.h>
-+#include <ctype.h>
- #include <iostream>
- #include <iomanip>
diff -ruN re2c.orig/files/patch-substr.h
--- re2c.orig/files/patch-substr.h	Tue Jun  1 05:41:36
+++ re2c/files/patch-substr.h	Wed Dec 31 19:00:00 1969
@@ -1,10 +0,0 @@
---- substr.h.orig	Thu May 13 10:58:18 2004
-+++ substr.h	Tue Jun  1 17:31:18 2004
-@@ -2,6 +2,7 @@
- #ifndef _substr_h
- #define _substr_h
-+#include <sys/types.h>
- #include <iostream>
- #include "basics.h"

Yahoo! oneSearch: Finally, mobile search 
that gives answers, not web links. 
Comment 3 Michael Scheidell 2007-06-06 00:21:00 UTC
Any problem with this patch?

We have been using it for the sa-compile functions in SpamAssassin for almost a month.

If there are any problems with this patch, please let me know.

I am the official maintainer of the p5-Mail-SpamAssassin port, it it requires re2c 0.12 as a minimum (0.11 segfaults)

This is a know problem, and the only fix is 0.12.
Comment 4 John Levine 2007-06-06 00:59:13 UTC
> This is a know problem, and the only fix is 0.12.

FYI, to update to 0.12 all I had to do was to change the version numbers 
and delete the existing patches which are no longer needed.

John Levine, johnl@taugh.com, Taughannock Networks, Trumansburg NY
"I dropped the toothpaste", said Tom, crestfallenly.
Comment 5 Michael Scheidell 2007-06-11 13:06:50 UTC
as John levine said:  all you need it the first patch (the one I submitted)

all you need is new version numbers and remove old patch files.

no need for bison or other complications.

surley, maintainer timeout has happened, this was first submitted may 7th.
Comment 6 Michael Scheidell 2007-06-13 01:57:09 UTC
anything on this yet? maintainer timeout yet?

It is absutly required for sa-compile to work in p5-Mail-SpamAssassin.
Comment 7 bf 2007-06-15 22:36:36 UTC
The ports system and the software in it are changing
over time, and so the Makefiles need to be tweaked
occasionally.  It's easier to do this when making an
update, rather than revisiting the Makefile just to
make minor changes.  Also, the ports are a compromise
between   the flexibility of custom builds and
attempting to meet the needs of the largest number of
users.  Those are the points I considered when I
submitted my patch to the port, which in addition to
removing the now unnecessary patches and updating the
distinfo and portversion, made a few other small

1)remove the CONFIGURE_TARGET -- because the default
CONFIUGRE_TARGET that's issued by bsd.port.mk seems to
work fine

2)make a pre-install target to remove scanner.cc --
because, from the README (you are reading the README,
aren't you?):

"The above version will be based on the pregenerated
scanner.cc file. 
If you want to build that file yourself (recommended
when installing
re2c) you need the following steps:
    rm -f scanner.cc
    make install"

3)add bison as a build dependency -- because, again
from the README: 

"Building re2c on unix like platforms requires
autoconf 2.57 and bison (tested 
with 1.875 and later). Under windows you don't need
autoconf or bison 
and can use the pregenerated files."

4)use some COPYTREE macros instead of CP to install
the documentation -- because that's what the macros
are there for, and whether you use COPYTREE_SHARE or
INSTALL_MAN or whatever, the file permissions should
be set to the right values.

So while the port may build with the pregenerated
files, these may not work for everyone, including some
people that rely upon NLS, and including bison as 
build-dependency, as the upstream maintainers
intended, doesn't seem too much of a price to pay to
prevent this from happening. And the other minor
changes seem to simplify the Makefile or correct some
minor problems.

I also think that, in the absence of evidence showing
some problem with the new version, someone ought to
step in and update this port if the maintainer doesn't
respond soon, as some people seem to need it.


Park yourself in front of a world of choices in alternative vehicles. Visit the Yahoo! Auto Green Center.
Comment 8 Michael Scheidell 2007-06-16 16:54:59 UTC
BF is right.  it does look like it should use (require ) bison.  I don't know quality of code without it, but he did look further into the readme than I did.

can you ping maintainer again? if not, commit these?

I need them for the p5-Mail-SpamAssassin port.

Comment 9 dfilter service freebsd_committer 2007-06-16 20:43:19 UTC
sat         2007-06-16 19:43:13 UTC

  FreeBSD ports repository

  Modified files:
    devel/re2c           Makefile distinfo 
  - Update to 0.12.1
  PR:             ports/112501
  Submitted by:   John Levine <johnl@taugh.com>, bf <bf2006a@yahoo.com>
  Approved by:    laszlof (maintainer timeout, 39 days)
  Revision  Changes    Path
  1.21      +1 -1      ports/devel/re2c/Makefile
  1.13      +3 -3      ports/devel/re2c/distinfo
cvs-all@freebsd.org mailing list
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 10 sat freebsd_committer 2007-06-16 20:43:33 UTC
State Changed
From-To: open->closed

I had little time to inspect all the intricacies, so I took 
the conservative way and just bumped the version. 

- found no evidence bison is really needed (don't trust 
- configure_target is maintainer's style 
- the proposed pre-install forces something to be built 
during the install stage, which is undesirable 
- copytree might be adopted by maintainer later 
- left patches there since they can't hurt, and I have 
no time to check if they are really not needed on all 
supported versions of FreeBSD 

Thanks a lot!
Comment 11 dfilter service freebsd_committer 2007-06-18 18:08:26 UTC
sat         2007-06-18 17:08:20 UTC

  FreeBSD ports repository

  Removed files:
    devel/re2c/files     patch-action.cc patch-substr.h 
  - Remove obsolete patches
  PR:             ports/112501 (part of)
  Submitted by:   bf <bf2006a@yahoo.com>
  Tested by:      miwi (on 5.x)
  Approved by:    laszlof (maintainer timeout, 39 days)
  Revision  Changes    Path
  1.2       +0 -10     ports/devel/re2c/files/patch-action.cc (dead)
  1.2       +0 -10     ports/devel/re2c/files/patch-substr.h (dead)
cvs-all@freebsd.org mailing list
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"