Commit graph

90 commits

Author SHA1 Message Date
wiz
8ac48d625a Update to 8.10:
Release 8.10 25-Jun-2010
------------------------

There are two major additions: support for (*MARK) and friends, and the option
PCRE_UCP, which changes the behaviour of \b, \d, \s, and \w (and their
opposites) so that they make use of Unicode properties. There are also a number
of lesser new features, and several bugs have been fixed. A new option,
--line-buffered, has been added to pcregrep, for use when it is connected to
pipes.
2010-08-07 06:26:42 +00:00
drochner
b05f40e640 update to 8.02
changes:
-Unicode data tables have been updated to Unicode 5.2.0
-bugfixes
2010-04-13 16:49:42 +00:00
wiz
28bc869ac4 Update to 8.01:
Release 8.01 19-Jan-2010
------------------------

This is a bug-fix release. Several bugs in the code itself and some bugs and
infelicities in the build system have been fixed.
2010-01-20 11:09:30 +00:00
wiz
e6552379ad Update to 8.00:
Release 8.00 19-Oct-09
----------------------

Bugs have been fixed in the library and in pcregrep. There are also some
enhancements. Restrictions on patterns used for partial matching have been
removed, extra information is given for partial matches, the partial matching
process has been improved, and an option to make a partial match override a
full match is available. The "study" process has been enhanced by finding a
lower bound matching length. Groups with duplicate numbers may now have
duplicated names without the use of PCRE_DUPNAMES. However, they may not have
different names. The documentation has been revised to reflect these changes.
The version number has been expanded to 3 digits as it is clear that the rate
of change is not slowing down.
2009-10-31 02:01:56 +00:00
joerg
bacea7cad5 Remove @dirrm entries from PLISTs 2009-06-14 17:48:39 +00:00
wiz
c6868ba198 Update to 7.9. Set LICENSE to modified-bsd.
Version 7.9 11-Apr-09
---------------------

1.  When building with support for bzlib/zlib (pcregrep) and/or readline
    (pcretest), all targets were linked against these libraries. This included
    libpcre, libpcreposix, and libpcrecpp, even though they do not use these
    libraries. This caused unwanted dependencies to be created. This problem
    has been fixed, and now only pcregrep is linked with bzlib/zlib and only
    pcretest is linked with readline.

2.  The "typedef int BOOL" in pcre_internal.h that was included inside the
    "#ifndef FALSE" condition by an earlier change (probably 7.8/18) has been
    moved outside it again, because FALSE and TRUE are already defined in AIX,
    but BOOL is not.

3.  The pcre_config() function was treating the PCRE_MATCH_LIMIT and
    PCRE_MATCH_LIMIT_RECURSION values as ints, when they should be long ints.

4.  The pcregrep documentation said spaces were inserted as well as colons (or
    hyphens) following file names and line numbers when outputting matching
    lines. This is not true; no spaces are inserted. I have also clarified the
    wording for the --colour (or --color) option.

5.  In pcregrep, when --colour was used with -o, the list of matching strings
    was not coloured; this is different to GNU grep, so I have changed it to be
    the same.

6.  When --colo(u)r was used in pcregrep, only the first matching substring in
    each matching line was coloured. Now it goes on to look for further matches
    of any of the test patterns, which is the same behaviour as GNU grep.

7.  A pattern that could match an empty string could cause pcregrep to loop; it
    doesn't make sense to accept an empty string match in pcregrep, so I have
    locked it out (using PCRE's PCRE_NOTEMPTY option). By experiment, this
    seems to be how GNU grep behaves.

8.  The pattern (?(?=.*b)b|^) was incorrectly compiled as "match must be at
    start or after a newline", because the conditional assertion was not being
    correctly handled. The rule now is that both the assertion and what follows
    in the first alternative must satisfy the test.

9.  If auto-callout was enabled in a pattern with a conditional group whose
    condition was an assertion, PCRE could crash during matching, both with
    pcre_exec() and pcre_dfa_exec().

10. The PCRE_DOLLAR_ENDONLY option was not working when pcre_dfa_exec() was
    used for matching.

11. Unicode property support in character classes was not working for
    characters (bytes) greater than 127 when not in UTF-8 mode.

12. Added the -M command line option to pcretest.

14. Added the non-standard REG_NOTEMPTY option to the POSIX interface.

15. Added the PCRE_NO_START_OPTIMIZE match-time option.

16. Added comments and documentation about mis-use of no_arg in the C++
    wrapper.

17. Implemented support for UTF-8 encoding in EBCDIC environments, a patch
    from Martin Jerabek that uses macro names for all relevant character and
    string constants.

18. Added to pcre_internal.h two configuration checks: (a) If both EBCDIC and
    SUPPORT_UTF8 are set, give an error; (b) If SUPPORT_UCP is set without
    SUPPORT_UTF8, define SUPPORT_UTF8. The "configure" script handles both of
    these, but not everybody uses configure.

19. A conditional group that had only one branch was not being correctly
    recognized as an item that could match an empty string. This meant that an
    enclosing group might also not be so recognized, causing infinite looping
    (and probably a segfault) for patterns such as ^"((?(?=[a])[^"])|b)*"$
    with the subject "ab", where knowledge that the repeated group can match
    nothing is needed in order to break the loop.

20. If a pattern that was compiled with callouts was matched using pcre_dfa_
    exec(), but without supplying a callout function, matching went wrong.

21. If PCRE_ERROR_MATCHLIMIT occurred during a recursion, there was a memory
    leak if the size of the offset vector was greater than 30. When the vector
    is smaller, the saved offsets during recursion go onto a local stack
    vector, but for larger vectors malloc() is used. It was failing to free
    when the recursion yielded PCRE_ERROR_MATCH_LIMIT (or any other "abnormal"
    error, in fact).

22. There was a missing #ifdef SUPPORT_UTF8 round one of the variables in the
    heapframe that is used only when UTF-8 support is enabled. This caused no
    problem, but was untidy.

23. Steven Van Ingelgem's patch to CMakeLists.txt to change the name
    CMAKE_BINARY_DIR to PROJECT_BINARY_DIR so that it works when PCRE is
    included within another project.

24. Steven Van Ingelgem's patches to add more options to the CMake support,
    slightly modified by me:

      (a) PCRE_BUILD_TESTS can be set OFF not to build the tests, including
          not building pcregrep.

      (b) PCRE_BUILD_PCREGREP can be see OFF not to build pcregrep, but only
          if PCRE_BUILD_TESTS is also set OFF, because the tests use pcregrep.

25. Forward references, both numeric and by name, in patterns that made use of
    duplicate group numbers, could behave incorrectly or give incorrect errors,
    because when scanning forward to find the reference group, PCRE was not
    taking into account the duplicate group numbers. A pattern such as
    ^X(?3)(a)(?|(b)|(q))(Y) is an example.

26. Changed a few more instances of "const unsigned char *" to USPTR, making
    the feature of a custom pointer more persuasive (as requested by a user).

27. Wrapped the definitions of fileno and isatty for Windows, which appear in
    pcretest.c, inside #ifndefs, because it seems they are sometimes already
    pre-defined.

28. Added support for (*UTF8) at the start of a pattern.

29. Arrange for flags added by the "release type" setting in CMake to be shown
    in the configuration summary.
2009-05-13 10:08:27 +00:00
joerg
2d1ba244e9 Simply and speed up buildlink3.mk files and processing.
This changes the buildlink3.mk files to use an include guard for the
recursive include. The use of BUILDLINK_DEPTH, BUILDLINK_DEPENDS,
BUILDLINK_PACKAGES and BUILDLINK_ORDER is handled by a single new
variable BUILDLINK_TREE. Each buildlink3.mk file adds a pair of
enter/exit marker, which can be used to reconstruct the tree and
to determine first level includes. Avoiding := for large variables
(BUILDLINK_ORDER) speeds up parse time as += has linear complexity.
The include guard reduces system time by avoiding reading files over and
over again. For complex packages this reduces both %user and %sys time to
half of the former time.
2009-03-20 19:23:50 +00:00
wiz
17962092fa Update to 7.8:
Version 7.8 05-Sep-08
---------------------

1.  Replaced UCP searching code with optimized version as implemented for Ad
    Muncher (http://www.admuncher.com/) by Peter Kankowski. This uses a two-
    stage table and inline lookup instead of a function, giving speed ups of 2
    to 5 times on some simple patterns that I tested. Permission was given to
    distribute the MultiStage2.py script that generates the tables (it's not in
    the tarball, but is in the Subversion repository).

2.  Updated the Unicode datatables to Unicode 5.1.0. This adds yet more
    scripts.

3.  Change 12 for 7.7 introduced a bug in pcre_study() when a pattern contained
    a group with a zero qualifier. The result of the study could be incorrect,
    or the function might crash, depending on the pattern.

4.  Caseless matching was not working for non-ASCII characters in back
    references. For example, /(\x{de})\1/8i was not matching \x{de}\x{fe}.
    It now works when Unicode Property Support is available.

5.  In pcretest, an escape such as \x{de} in the data was always generating
    a UTF-8 string, even in non-UTF-8 mode. Now it generates a single byte in
    non-UTF-8 mode. If the value is greater than 255, it gives a warning about
    truncation.

6.  Minor bugfix in pcrecpp.cc (change "" == ... to NULL == ...).

7.  Added two (int) casts to pcregrep when printing the difference of two
    pointers, in case they are 64-bit values.

8.  Added comments about Mac OS X stack usage to the pcrestack man page and to
    test 2 if it fails.

9.  Added PCRE_CALL_CONVENTION just before the names of all exported functions,
    and a #define of that name to empty if it is not externally set. This is to
    allow users of MSVC to set it if necessary.

10. The PCRE_EXP_DEFN macro which precedes exported functions was missing from
    the convenience functions in the pcre_get.c source file.

11. An option change at the start of a pattern that had top-level alternatives
    could cause overwriting and/or a crash. This command provoked a crash in
    some environments:

      printf "/(?i)[\xc3\xa9\xc3\xbd]|[\xc3\xa9\xc3\xbdA]/8\n" | pcretest

    This potential security problem was recorded as CVE-2008-2371.

12. For a pattern where the match had to start at the beginning or immediately
    after a newline (e.g /.*anything/ without the DOTALL flag), pcre_exec() and
    pcre_dfa_exec() could read past the end of the passed subject if there was
    no match. To help with detecting such bugs (e.g. with valgrind), I modified
    pcretest so that it places the subject at the end of its malloc-ed buffer.

13. The change to pcretest in 12 above threw up a couple more cases when pcre_
    exec() might read past the end of the data buffer in UTF-8 mode.

14. A similar bug to 7.3/2 existed when the PCRE_FIRSTLINE option was set and
    the data contained the byte 0x85 as part of a UTF-8 character within its
    first line. This applied both to normal and DFA matching.

15. Lazy qualifiers were not working in some cases in UTF-8 mode. For example,
    /^[^d]*?$/8 failed to match "abc".

16. Added a missing copyright notice to pcrecpp_internal.h.

17. Make it more clear in the documentation that values returned from
    pcre_exec() in ovector are byte offsets, not character counts.

18. Tidied a few places to stop certain compilers from issuing warnings.

19. Updated the Virtual Pascal + BCC files to compile the latest v7.7, as
    supplied by Stefan Weber. I made a further small update for 7.8 because
    there is a change of source arrangements: the pcre_searchfuncs.c module is
    replaced by pcre_ucd.c.
2008-09-06 14:25:28 +00:00
tonnerre
f4eba22758 Fix a potential buffer overflow in libpcre's compiler (CVE-2008-2371). 2008-07-04 21:30:24 +00:00
tnn
d38c374aec Remove a feeble attempt at providing ABI compatibility for the C++ portion
of the PCRE library. Relying on the C++ compiler to crunch symbols in a
particular way is platform dependent at best, and the comments indicate
that this was done for OSX.
Also, the test misfired on SunOS leading to breakage (PR pkg/38768).
I'm not bumping the ABI depends because I'm not aware of
any packages using the C++ library. Bump PKGREVISION, however.
2008-05-27 16:20:52 +00:00
tnn
dd38987dac Drop hpux fix which is now handled by compat_headers. 2008-05-25 17:39:32 +00:00
wiz
92b664ab18 Update to 7.7:
Release 7.7 07-May-08
---------------------

This is once again mainly a bug-fix release, but there are a couple of new
features.
2008-05-24 10:45:17 +00:00
drochner
b31ab6cbc2 update to 7.6
changes:
The main reason for having this release so soon after 7.5 is because it
fixes a potential buffer overflow problem in pcre_compile() when run in
UTF-8 mode. In addition, the CMake configuration files have been brought
up to date.
2008-02-13 19:20:39 +00:00
wiz
14d5b4f476 Update to 7.5:
Release 7.5 10-Jan-08
---------------------

This is mainly a bug-fix release. However the ability to link pcregrep with
libz or libbz2 and the ability to link pcretest with libreadline have been
added. Also the --line-offsets and --file-offsets options were added to
pcregrep.
2008-01-15 22:42:36 +00:00
martti
9afb20a137 Added commented-out LICENSE=something. 2007-11-11 11:35:48 +00:00
drochner
c1fab1f2fb Enable unicode properties and bump PKGREVISION.
With that in place this pkg can be used as an external dependency by
glib2 instead of building a bundled copy. This should save us headaches
in case of future security problems.
2007-11-07 21:27:48 +00:00
dsainty
171b941d15 Add SourceForge as an option to the MASTER_SITES 2007-10-21 04:48:15 +00:00
wiz
a65e842f0d Update to 7.4:
Release 7.4 21-Sep-07
---------------------

The only change of specification is the addition of options to control whether
\R matches any Unicode line ending (the default) or just CR, LF, and CRLF.
Otherwise, the changes are bug fixes and a refactoring to reduce the number of
relocations needed in a shared library. There have also been some documentation
updates, in particular, some more information about using CMake to build PCRE
has been added to the NON-UNIX-USE file.
2007-10-17 20:49:42 +00:00
wiz
daccaf9917 Drop maintainership. 2007-09-09 16:57:16 +00:00
tnn
4f1677be2a Make pcre build on HPUX. 2007-09-07 14:49:35 +00:00
wiz
3874ef82af Update to 7.3:
Release 7.3 28-Aug-07
---------------------

Most changes are bug fixes. Some that are not:

1. There is some support for Perl 5.10's experimental "backtracking control
   verbs" such as (*PRUNE).

2. UTF-8 checking is now as per RFC 3629 instead of RFC 2279; this is more
   restrictive in the strings it accepts.

3. Checking for potential integer overflow has been made more dynamic, and as a
   consequence there is no longer a hard limit on the size of a subpattern that
   has a limited repeat count.

4. When CRLF is a valid line-ending sequence, pcre_exec() and pcre_dfa_exec()
   no longer advance by two characters instead of one when an unanchored match
   fails at CRLF if there are explicit CR or LF matches within the pattern.
   This gets rid of some anomalous effects that previously occurred.

5. Some PCRE-specific settings for varying the newline options at the start of
   a pattern have been added.
2007-08-29 21:02:45 +00:00
wiz
1379cb1883 Update to 7.2:
Release 7.2 19-Jun-07
---------------------

WARNING: saved patterns that were compiled by earlier versions of PCRE must be
recompiled for use with 7.2 (necessitated by the addition of \K, \h, \H, \v,
and \V).

Correction to the notes for 7.1: the note about shared libraries for Windows is
wrong. Previously, three libraries were built, but each could function
independently. For example, the pcreposix library also included all the
functions from the basic pcre library. The change is that the three libraries
are no longer independent. They are like the Unix libraries. To use the
pcreposix functions, for example, you need to link with both the pcreposix and
the basic pcre library.

Some more features from Perl 5.10 have been added:

  (?-n) and (?+n) relative references for recursion and subroutines.

  (?(-n) and (?(+n) relative references as conditions.

  \k{name} and \g{name} are synonyms for \k<name>.

  \K to reset the start of the matched string; for example, (foo)\Kbar
  matches bar preceded by foo, but only sets bar as the matched string.

  (?| introduces a group where the capturing parentheses in each alternative
  start from the same number; for example, (?|(abc)|(xyz)) sets capturing
  parentheses number 1 in both cases.

  \h, \H, \v, \V match horizontal and vertical whitespace, respectively.
2007-07-03 17:20:01 +00:00
joerg
39ef0d8232 Fix pcre-config to always output the rpath for ${prefix}/lib based
on COMPILER_RPATH_FLAG. Before it hard-wired Solaris and *BSD, now
it works everywhere. Bump revision.
2007-06-17 17:05:08 +00:00
wiz
20169f7fc2 Remove dead MASTERS_SITES. From Zafer Aydogan. 2007-06-08 18:39:22 +00:00
wiz
a2879f1bb2 Update to 7.1:
Release 7.1 24-Apr-07
---------------------

There is only one new feature in this release: a linebreak setting of
PCRE_NEWLINE_ANYCRLF. It is a cut-down version of PCRE_NEWLINE_ANY, which
recognizes only CRLF, CR, and LF as linebreaks.

A few bugs are fixed (see ChangeLog for details), but the major change is a
complete re-implementation of the build system. This now has full Autotools
support and so is now "standard" in some sense. It should help with compiling
PCRE in a wide variety of environments.

NOTE: when building shared libraries for Windows, three dlls are now built,
called libpcre, libpcreposix, and libpcrecpp. Previously, everything was
included in a single dll.

Another important change is that the dftables auxiliary program is no longer
compiled and run at "make" time by default. Instead, a default set of character
tables (assuming ASCII coding) is used. If you want to use dftables to generate
the character tables as previously, add --enable-rebuild-chartables to the
"configure" command. You must do this if you are compiling PCRE to run on a
system that uses EBCDIC code.

There is a discussion about character tables in the README file. The default is
not to use dftables so that that there is no problem when cross-compiling.
2007-05-03 12:27:54 +00:00
wiz
af5d82867d Update to 7.0:
Release 7.0 23-Nov-06
---------------------

This release has a new major number because there have been some internal
upheavals to facilitate the addition of new optimizations and other facilities,
and to make subsequent maintenance and extension easier. Compilation is likely
to be a bit slower, but there should be no major effect on runtime performance.
Previously compiled patterns are NOT upwards compatible with this release. If
you have saved compiled patterns from a previous release, you will have to
re-compile them. Important changes that are visible to users are:

1. The Unicode property tables have been updated to Unicode 5.0.0, which adds
   some more scripts.

2. The option PCRE_NEWLINE_ANY causes PCRE to recognize any Unicode newline
   sequence as a newline.

3. The \R escape matches a single Unicode newline sequence as a single unit.

4. New features that will appear in Perl 5.10 are now in PCRE. These include
   alternative Perl syntax for named parentheses, and Perl syntax for
   recursion.

5. The C++ wrapper interface has been extended by the addition of a
   QuoteMeta function and the ability to allow copy construction and
   assignment.
2007-01-06 23:45:42 +00:00
joerg
5430595a63 DESTDIR support. 2006-11-03 19:14:25 +00:00
rillig
5f7aafea6e Fixed "test ==" in the configure script and a spelling mistake. It's
PKGCONFIG_OVERRIDE, not PKG_CONFIG_OVERRIDE.
2006-10-04 20:23:46 +00:00
joerg
a6b62bc94f Before including sys/resource.h on DragonFly, sys/time.h is needed. 2006-07-10 22:14:18 +00:00
wiz
4457bdde9a Update to 6.7:
Release 6.7 04-Jul-06
---------------------

The main additions to this release are the ability to use the same name for
multiple sets of parentheses, and support for CRLF line endings in both the
library and pcregrep (and in pcretest for testing).

Thanks to Ian Taylor, the stack usage for many kinds of pattern has been
significantly reduced for certain subject strings.
2006-07-10 16:10:44 +00:00
jlam
c16221a4db Change the format of BUILDLINK_ORDER to contain depth information as well,
and add a new helper target and script, "show-buildlink3", that outputs
a listing of the buildlink3.mk files included as well as the depth at
which they are included.

For example, "make show-buildlink3" in fonts/Xft2 displays:

	zlib
	fontconfig
	    iconv
	    zlib
	    freetype2
	    expat
	freetype2
	Xrender
	    renderproto
2006-07-08 23:10:35 +00:00
jlam
9430e49307 Track information in a new variable BUILDLINK_ORDER that informs us
of the order in which buildlink3.mk files are (recursively) included
by a package Makefile.
2006-07-08 22:38:58 +00:00
reed
5abef9be14 Over 1200 files touched but no revisions bumped :)
RECOMMENDED is removed. It becomes ABI_DEPENDS.

BUILDLINK_RECOMMENDED.foo becomes BUILDLINK_ABI_DEPENDS.foo.

BUILDLINK_DEPENDS.foo becomes BUILDLINK_API_DEPENDS.foo.

BUILDLINK_DEPENDS does not change.

IGNORE_RECOMMENDED (which defaulted to "no") becomes USE_ABI_DEPENDS
which defaults to "yes".

Added to obsolete.mk checking for IGNORE_RECOMMENDED.

I did not manually go through and fix any aesthetic tab/spacing issues.

I have tested the above patch on DragonFly building and packaging
subversion and pkglint and their many dependencies.

I have also tested USE_ABI_DEPENDS=no on my NetBSD workstation (where I
have used IGNORE_RECOMMENDED for a long time). I have been an active user
of IGNORE_RECOMMENDED since it was available.

As suggested, I removed the documentation sentences suggesting bumping for
"security" issues.

As discussed on tech-pkg.

I will commit to revbump, pkglint, pkg_install, createbuildlink separately.

Note that if you use wip, it will fail!  I will commit to pkgsrc-wip
later (within day).
2006-04-06 06:21:32 +00:00
gavan
c2d9059be6 Update to 6.6:
Version 6.6 06-Feb-06
---------------------

 1. Change 16(a) for 6.5 broke things, because PCRE_DATA_SCOPE was not defined
    in pcreposix.h. I have copied the definition from pcre.h.

 2. Change 25 for 6.5 broke compilation in a build directory out-of-tree
    because pcre.h is no longer a built file.

 3. Added Jeff Friedl's additional debugging patches to pcregrep. These are
    not normally included in the compiled code.
2006-02-07 02:39:50 +00:00
wiz
217d49045c Update to 6.5:
Version 6.5 01-Feb-06
---------------------

 1. When using the partial match feature with pcre_dfa_exec(), it was not
    anchoring the second and subsequent partial matches at the new starting
    point. This could lead to incorrect results. For example, with the pattern
    /1234/, partially matching against "123" and then "a4" gave a match.

 2. Changes to pcregrep:

    (a) All non-match returns from pcre_exec() were being treated as failures
        to match the line. Now, unless the error is PCRE_ERROR_NOMATCH, an
        error message is output. Some extra information is given for the
        PCRE_ERROR_MATCHLIMIT and PCRE_ERROR_RECURSIONLIMIT errors, which are
        probably the only errors that are likely to be caused by users (by
        specifying a regex that has nested indefinite repeats, for instance).
        If there are more than 20 of these errors, pcregrep is abandoned.

    (b) A binary zero was treated as data while matching, but terminated the
        output line if it was written out. This has been fixed: binary zeroes
        are now no different to any other data bytes.

    (c) Whichever of the LC_ALL or LC_CTYPE environment variables is set is
        used to set a locale for matching. The --locale=xxxx long option has
        been added (no short equivalent) to specify a locale explicitly on the
        pcregrep command, overriding the environment variables.

    (d) When -B was used with -n, some line numbers in the output were one less
        than they should have been.

    (e) Added the -o (--only-matching) option.

    (f) If -A or -C was used with -c (count only), some lines of context were
        accidentally printed for the final match.

    (g) Added the -H (--with-filename) option.

    (h) The combination of options -rh failed to suppress file names for files
        that were found from directory arguments.

    (i) Added the -D (--devices) and -d (--directories) options.

    (j) Added the -F (--fixed-strings) option.

    (k) Allow "-" to be used as a file name for -f as well as for a data file.

    (l) Added the --colo(u)r option.

    (m) Added Jeffrey Friedl's -S testing option, but within #ifdefs so that it
        is not present by default.

 3. A nasty bug was discovered in the handling of recursive patterns, that is,
    items such as (?R) or (?1), when the recursion could match a number of
    alternatives. If it matched one of the alternatives, but subsequently,
    outside the recursion, there was a failure, the code tried to back up into
    the recursion. However, because of the way PCRE is implemented, this is not
    possible, and the result was an incorrect result from the match.

    In order to prevent this happening, the specification of recursion has
    been changed so that all such subpatterns are automatically treated as
    atomic groups. Thus, for example, (?R) is treated as if it were (?>(?R)).

 4. I had overlooked the fact that, in some locales, there are characters for
    which isalpha() is true but neither isupper() nor islower() are true. In
    the fr_FR locale, for instance, the \xAA and \xBA characters (ordmasculine
    and ordfeminine) are like this. This affected the treatment of \w and \W
    when they appeared in character classes, but not when they appeared outside
    a character class. The bit map for "word" characters is now created
    separately from the results of isalnum() instead of just taking it from the
    upper, lower, and digit maps. (Plus the underscore character, of course.)

 5. The above bug also affected the handling of POSIX character classes such as
    [[:alpha:]] and [[:alnum:]]. These do not have their own bit maps in PCRE's
    permanent tables. Instead, the bit maps for such a class were previously
    created as the appropriate unions of the upper, lower, and digit bitmaps.
    Now they are created by subtraction from the [[:word:]] class, which has
    its own bitmap.

 6. The [[:blank:]] character class matches horizontal, but not vertical space.
    It is created by subtracting the vertical space characters (\x09, \x0a,
    \x0b, \x0c) from the [[:space:]] bitmap. Previously, however, the
    subtraction was done in the overall bitmap for a character class, meaning
    that a class such as [\x0c[:blank:]] was incorrect because \x0c would not
    be recognized. This bug has been fixed.

 7. Patches from the folks at Google:

      (a) pcrecpp.cc: "to handle a corner case that may or may not happen in
      real life, but is still worth protecting against".

      (b) pcrecpp.cc: "corrects a bug when negative radixes are used with
      regular expressions".

      (c) pcre_scanner.cc: avoid use of std::count() because not all systems
      have it.

      (d) Split off pcrecpparg.h from pcrecpp.h and had the former built by
      "configure" and the latter not, in order to fix a problem somebody had
      with compiling the Arg class on HP-UX.

      (e) Improve the error-handling of the C++ wrapper a little bit.

      (f) New tests for checking recursion limiting.

 8. The pcre_memmove() function, which is used only if the environment does not
    have a standard memmove() function (and is therefore rarely compiled),
    contained two bugs: (a) use of int instead of size_t, and (b) it was not
    returning a result (though PCRE never actually uses the result).

 9. In the POSIX regexec() interface, if nmatch is specified as a ridiculously
    large number - greater than INT_MAX/(3*sizeof(int)) - REG_ESPACE is
    returned instead of calling malloc() with an overflowing number that would
    most likely cause subsequent chaos.

10. The debugging option of pcretest was not showing the NO_AUTO_CAPTURE flag.

11. The POSIX flag REG_NOSUB is now supported. When a pattern that was compiled
    with this option is matched, the nmatch and pmatch options of regexec() are
    ignored.

12. Added REG_UTF8 to the POSIX interface. This is not defined by POSIX, but is
    provided in case anyone wants to the the POSIX interface with UTF-8
    strings.

13. Added CXXLDFLAGS to the Makefile parameters to provide settings only on the
    C++ linking (needed for some HP-UX environments).

14. Avoid compiler warnings in get_ucpname() when compiled without UCP support
    (unused parameter) and in the pcre_printint() function (omitted "default"
    switch label when the default is to do nothing).

15. Added some code to make it possible, when PCRE is compiled as a C++
    library, to replace subject pointers for pcre_exec() with a smart pointer
    class, thus making it possible to process discontinuous strings.

16. The two macros PCRE_EXPORT and PCRE_DATA_SCOPE are confusing, and perform
    much the same function. They were added by different people who were trying
    to make PCRE easy to compile on non-Unix systems. It has been suggested
    that PCRE_EXPORT be abolished now that there is more automatic apparatus
    for compiling on Windows systems. I have therefore replaced it with
    PCRE_DATA_SCOPE. This is set automatically for Windows; if not set it
    defaults to "extern" for C or "extern C" for C++, which works fine on
    Unix-like systems. It is now possible to override the value of PCRE_DATA_
    SCOPE with something explicit in config.h. In addition:

    (a) pcreposix.h still had just "extern" instead of either of these macros;
        I have replaced it with PCRE_DATA_SCOPE.

    (b) Functions such as _pcre_xclass(), which are internal to the library,
        but external in the C sense, all had PCRE_EXPORT in their definitions.
        This is apparently wrong for the Windows case, so I have removed it.
        (It makes no difference on Unix-like systems.)

17. Added a new limit, MATCH_LIMIT_RECURSION, which limits the depth of nesting
    of recursive calls to match(). This is different to MATCH_LIMIT because
    that limits the total number of calls to match(), not all of which increase
    the depth of recursion. Limiting the recursion depth limits the amount of
    stack (or heap if NO_RECURSE is set) that is used. The default can be set
    when PCRE is compiled, and changed at run time. A patch from Google adds
    this functionality to the C++ interface.

18. Changes to the handling of Unicode character properties:

    (a) Updated the table to Unicode 4.1.0.

    (b) Recognize characters that are not in the table as "Cn" (undefined).

    (c) I revised the way the table is implemented to a much improved format
        which includes recognition of ranges. It now supports the ranges that
        are defined in UnicodeData.txt, and it also amalgamates other
        characters into ranges. This has reduced the number of entries in the
        table from around 16,000 to around 3,000, thus reducing its size
        considerably. I realized I did not need to use a tree structure after
        all - a binary chop search is just as efficient. Having reduced the
        number of entries, I extended their size from 6 bytes to 8 bytes to
        allow for more data.

    (d) Added support for Unicode script names via properties such as \p{Han}.

19. In UTF-8 mode, a backslash followed by a non-Ascii character was not
    matching that character.

20. When matching a repeated Unicode property with a minimum greater than zero,
    (for example \pL{2,}), PCRE could look past the end of the subject if it
    reached it while seeking the minimum number of characters. This could
    happen only if some of the characters were more than one byte long, because
    there is a check for at least the minimum number of bytes.

21. Refactored the implementation of \p and \P so as to be more general, to
    allow for more different types of property in future. This has changed the
    compiled form incompatibly. Anybody with saved compiled patterns that use
    \p or \P will have to recompile them.

22. Added "Any" and "L&" to the supported property types.

23. Recognize \x{...} as a code point specifier, even when not in UTF-8 mode,
    but give a compile time error if the value is greater than 0xff.

24. The man pages for pcrepartial, pcreprecompile, and pcre_compile2 were
    accidentally not being installed or uninstalled.

25. The pcre.h file was built from pcre.h.in, but the only changes that were
    made were to insert the current release number. This seemed silly, because
    it made things harder for people building PCRE on systems that don't run
    "configure". I have turned pcre.h into a distributed file, no longer built
    by "configure", with the version identification directly included. There is
    no longer a pcre.h.in file.

    However, this change necessitated a change to the pcre-config script as
    well. It is built from pcre-config.in, and one of the substitutions was the
    release number. I have updated configure.ac so that ./configure now finds
    the release number by grepping pcre.h.

26. Added the ability to run the tests under valgrind.
2006-02-04 17:13:49 +00:00
rillig
b71a1d488b Fixed pkglint warnings. The warnings are mostly quoting issues, for
example MAKE_ENV+=FOO=${BAR} is changed to MAKE_ENV+=FOO=${BAR:Q}. Some
other changes are outlined in

    http://mail-index.netbsd.org/tech-pkg/2005/12/02/0034.html
2005-12-05 20:49:47 +00:00
wiz
81e3bd9b4b patch-ac, ad: fix compilation with Sun Studio 11 compilers, patch
from author via segv in PR 32155.
patch-ae: from martin@, fixes recursion self-test (not installed).
2005-11-24 19:34:01 +00:00
tv
7aab8ee894 Explicitly provide "--tag=CC" to libtool. I'm not yet sure why this is a
problem on Interix, but it appears that -export-symbols-regex needs it in
order for the relink-at-install phase to work properly.
2005-10-31 20:33:24 +00:00
adam
0c37a3ccc5 Enable-utf8 for www/bluefish 2005-10-14 09:37:46 +00:00
wiz
83bf57af32 Update to 6.4:
Version 6.4 05-Sep-05
---------------------

 1. Change 6.0/10/(l) to pcregrep introduced a bug that caused separator lines
    "--" to be printed when multiple files were scanned, even when none of the
    -A, -B, or -C options were used. This is not compatible with Gnu grep, so I
    consider it to be a bug, and have restored the previous behaviour.

 2. A couple of code tidies to get rid of compiler warnings.

 3. The pcretest program used to cheat by referring to symbols in the library
    whose names begin with _pcre_. These are internal symbols that are not
    really supposed to be visible externally, and in some environments it is
    possible to suppress them. The cheating is now confined to including
    certain files from the library's source, which is a bit cleaner.

 4. Renamed pcre.in as pcre.h.in to go with pcrecpp.h.in; it also makes the
    file's purpose clearer.

 5. Reorganized pcre_ucp_findchar().
2005-09-27 20:21:50 +00:00
wiz
2b6ed71706 Update to 6.3. Take maintainership.
Version 6.3 15-Aug-05
---------------------

 1. The file libpcre.pc.in did not have general read permission in the tarball.

 2. There were some problems when building without C++ support:

    (a) If C++ support was not built, "make install" and "make test" still
        tried to test it.

    (b) There were problems when the value of CXX was explicitly set. Some
        changes have been made to try to fix these, and ...

    (c) --disable-cpp can now be used to explicitly disable C++ support.

    (d) The use of @CPP_OBJ@ directly caused a blank line preceded by a
        backslash in a target when C++ was disabled. This confuses some
        versions of "make", apparently. Using an intermediate variable solves
        this. (Same for CPP_LOBJ.)

 3. $(LINK_FOR_BUILD) now includes $(CFLAGS_FOR_BUILD) and $(LINK)
    (non-Windows) now includes $(CFLAGS) because these flags are sometimes
    necessary on certain architectures.

 4. Added a setting of -export-symbols-regex to the link command to remove
    those symbols that are exported in the C sense, but actually are local
    within the library, and not documented. Their names all begin with
    "_pcre_". This is not a perfect job, because (a) we have to except some
    symbols that pcretest ("illegally") uses, and (b) the facility isn't always
    available (and never for static libraries). I have made a note to try to
    find a way round (a) in the future.
2005-09-05 15:56:53 +00:00
spz
73e691bf7d added a workaround for core-dumping f77 on sparc64 (makes the package work on
NetBSD/sparc64 1.6.x)
2005-08-31 16:55:05 +00:00
salo
bf87663da0 Bump BUILDLINK_RECOMMENDED for latest update with security fixes. 2005-08-30 12:34:07 +00:00
wiz
e63beca425 Automatic build of the cpp library is currently broken,
build it manually.
2005-08-04 09:52:54 +00:00
wiz
2f188b5dbb Update to 6.2:
Version 6.2 01-Aug-05
---------------------

 1. There was no test for integer overflow of quantifier values. A construction
    such as {1111111111111111} would give undefined results. What is worse, if
    a minimum quantifier for a parenthesized subpattern overflowed and became
    negative, the calculation of the memory size went wrong. This could have
    led to memory overwriting.

 2. Building PCRE using VPATH was broken. Hopefully it is now fixed.

 3. Added "b" to the 2nd argument of fopen() in dftables.c, for non-Unix-like
    operating environments where this matters.

 4. Applied Giuseppe Maxia's patch to add additional features for controlling
    PCRE options from within the C++ wrapper.

 5. Named capturing subpatterns were not being correctly counted when a pattern
    was compiled. This caused two problems: (a) If there were more than 100
    such subpatterns, the calculation of the memory needed for the whole
    compiled pattern went wrong, leading to an overflow error. (b) Numerical
    back references of the form \12, where the number was greater than 9, were
    not recognized as back references, even though there were sufficient
    previous subpatterns.

 6. Two minor patches to pcrecpp.cc in order to allow it to compile on older
    versions of gcc, e.g. 2.95.4.


Version 6.1 21-Jun-05
---------------------

 1. There was one reference to the variable "posix" in pcretest.c that was not
    surrounded by "#if !defined NOPOSIX".

 2. Make it possible to compile pcretest without DFA support, UTF8 support, or
    the cross-check on the old pcre_info() function, for the benefit of the
    cut-down version of PCRE that is currently imported into Exim.

 3. A (silly) pattern starting with (?i)(?-i) caused an internal space
    allocation error. I've done the easy fix, which wastes 2 bytes for sensible
    patterns that start (?i) but I don't think that matters. The use of (?i) is
    just an example; this all applies to the other options as well.

 4. Since libtool seems to echo the compile commands it is issuing, the output
    from "make" can be reduced a bit by putting "@" in front of each libtool
    compile command.

 5. Patch from the folks at Google for configure.in to be a bit more thorough
    in checking for a suitable C++ installation before trying to compile the
    C++ stuff. This should fix a reported problem when a compiler was present,
    but no suitable headers.

 6. The man pages all had just "PCRE" as their title. I have changed them to
    be the relevant file name. I have also arranged that these names are
    retained in the file doc/pcre.txt, which is a concatenation in text format
    of all the man pages except the little individual ones for each function.

 7. The NON-UNIX-USE file had not been updated for the different set of source
    files that come with release 6. I also added a few comments about the C++
    wrapper.


Version 6.0 07-Jun-05
---------------------

 1. Some minor internal re-organization to help with my DFA experiments.

 2. Some missing #ifdef SUPPORT_UCP conditionals in pcretest and printint that
    didn't matter for the library itself when fully configured, but did matter
    when compiling without UCP support, or within Exim, where the ucp files are
    not imported.

 3. Refactoring of the library code to split up the various functions into
    different source modules. The addition of the new DFA matching code (see
    below) to a single monolithic source would have made it really too
    unwieldy, quite apart from causing all the code to be include in a
    statically linked application, when only some functions are used. This is
    relevant even without the DFA addition now that patterns can be compiled in
    one application and matched in another.

    The downside of splitting up is that there have to be some external
    functions and data tables that are used internally in different modules of
    the library but which are not part of the API. These have all had their
    names changed to start with "_pcre_" so that they are unlikely to clash
    with other external names.

 4. Added an alternate matching function, pcre_dfa_exec(), which matches using
    a different (DFA) algorithm. Although it is slower than the original
    function, it does have some advantages for certain types of matching
    problem.

 5. Upgrades to pcretest in order to test the features of pcre_dfa_exec(),
    including restarting after a partial match.

 6. A patch for pcregrep that defines INVALID_FILE_ATTRIBUTES if it is not
    defined when compiling for Windows was sent to me. I have put it into the
    code, though I have no means of testing or verifying it.

 7. Added the pcre_refcount() auxiliary function.

 8. Added the PCRE_FIRSTLINE option. This constrains an unanchored pattern to
    match before or at the first newline in the subject string. In pcretest,
    the /f option on a pattern can be used to set this.

 9. A repeated \w when used in UTF-8 mode with characters greater than 256
    would behave wrongly. This has been present in PCRE since release 4.0.

10. A number of changes to the pcregrep command:

    (a) Refactored how -x works; insert ^(...)$ instead of setting
        PCRE_ANCHORED and checking the length, in preparation for adding
        something similar for -w.

    (b) Added the -w (match as a word) option.

    (c) Refactored the way lines are read and buffered so as to have more
        than one at a time available.

    (d) Implemented a pcregrep test script.

    (e) Added the -M (multiline match) option. This allows patterns to match
        over several lines of the subject. The buffering ensures that at least
        8K, or the rest of the document (whichever is the shorter) is available
        for matching (and similarly the previous 8K for lookbehind assertions).

    (f) Changed the --help output so that it now says

          -w, --word-regex(p)

        instead of two lines, one with "regex" and the other with "regexp"
        because that confused at least one person since the short forms are the
        same. (This required a bit of code, as the output is generated
        automatically from a table. It wasn't just a text change.)

    (g) -- can be used to terminate pcregrep options if the next thing isn't an
        option but starts with a hyphen. Could be a pattern or a path name
        starting with a hyphen, for instance.

    (h) "-" can be given as a file name to represent stdin.

    (i) When file names are being printed, "(standard input)" is used for
        the standard input, for compatibility with GNU grep. Previously
        "<stdin>" was used.

    (j) The option --label=xxx can be used to supply a name to be used for
        stdin when file names are being printed. There is no short form.

    (k) Re-factored the options decoding logic because we are going to add
        two more options that take data. Such options can now be given in four
        different ways, e.g. "-fname", "-f name", "--file=name", "--file name".

    (l) Added the -A, -B, and -C options for requesting that lines of context
        around matches be printed.

    (m) Added the -L option to print the names of files that do not contain
        any matching lines, that is, the complement of -l.

    (n) The return code is 2 if any file cannot be opened, but pcregrep does
        continue to scan other files.

    (o) The -s option was incorrectly implemented. For compatibility with other
        greps, it now suppresses the error message for a non-existent or non-
        accessible file (but not the return code). There is a new option called
        -q that suppresses the output of matching lines, which was what -s was
        previously doing.

    (p) Added --include and --exclude options to specify files for inclusion
        and exclusion when recursing.

11. The Makefile was not using the Autoconf-supported LDFLAGS macro properly.
    Hopefully, it now does.

12. Missing cast in pcre_study().

13. Added an "uninstall" target to the makefile.

14. Replaced "extern" in the function prototypes in Makefile.in with
    "PCRE_DATA_SCOPE", which defaults to 'extern' or 'extern "C"' in the Unix
    world, but is set differently for Windows.

15. Added a second compiling function called pcre_compile2(). The only
    difference is that it has an extra argument, which is a pointer to an
    integer error code. When there is a compile-time failure, this is set
    non-zero, in addition to the error test pointer being set to point to an
    error message. The new argument may be NULL if no error number is required
    (but then you may as well call pcre_compile(), which is now just a
    wrapper). This facility is provided because some applications need a
    numeric error indication, but it has also enabled me to tidy up the way
    compile-time errors are handled in the POSIX wrapper.

16. Added VPATH=.libs to the makefile; this should help when building with one
    prefix path and installing with another. (Or so I'm told by someone who
    knows more about this stuff than I do.)

17. Added a new option, REG_DOTALL, to the POSIX function regcomp(). This
    passes PCRE_DOTALL to the pcre_compile() function, making the "." character
    match everything, including newlines. This is not POSIX-compatible, but
    somebody wanted the feature. From pcretest it can be activated by using
    both the P and the s flags.

18. AC_PROG_LIBTOOL appeared twice in Makefile.in. Removed one.

19. libpcre.pc was being incorrectly installed as executable.

20. A couple of places in pcretest check for end-of-line by looking for '\n';
    it now also looks for '\r' so that it will work unmodified on Windows.

21. Added Google's contributed C++ wrapper to the distribution.

22. Added some untidy missing memory free() calls in pcretest, to keep
    Electric Fence happy when testing.
2005-08-03 17:43:13 +00:00
tv
f816d81489 Remove USE_BUILDLINK3 and NO_BUILDLINK; these are no longer used. 2005-04-11 21:44:48 +00:00
agc
4a3d2f7ce2 Add RMD160 digests. 2005-02-23 22:24:08 +00:00
tv
c487cb967a Libtool fix for PR pkg/26633, and other issues. Update libtool to 1.5.10
in the process.  (More information on tech-pkg.)

Bump PKGREVISION and BUILDLINK_DEPENDS of all packages using libtool and
installing .la files.

Bump PKGREVISION (only) of all packages depending directly on the above
via a buildlink3 include.
2004-10-03 00:12:51 +00:00
wiz
1b6d0c5a65 Update to 5.0:
Release 5.0 13-Sep-04
---------------------

The licence under which PCRE is released has been changed to the more
conventional "BSD" licence.

In the code, some bugs have been fixed, and there are also some major changes
in this release (which is why I've increased the number to 5.0). Some changes
are internal rearrangements, and some provide a number of new facilities. The
new features are:

1. There's an "automatic callout" feature that inserts callouts before every
   item in the regex, and there's a new callout field that gives the position
   in the pattern - useful for debugging and tracing.

2. The extra_data structure can now be used to pass in a set of character
   tables at exec time. This is useful if compiled regex are saved and re-used
   at a later time when the tables may not be at the same address. If the
   default internal tables are used, the pointer saved with the compiled
   pattern is now set to NULL, which means that you don't need to do anything
   special unless you are using custom tables.

3. It is possible, with some restrictions on the content of the regex, to
   request "partial" matching. A special return code is given if all of the
   subject string matched part of the regex. This could be useful for testing
   an input field as it is being typed.

4. There is now some optional support for Unicode character properties, which
   means that the patterns items such as \p{Lu} and \X can now be used. Only
   the general category properties are supported. If PCRE is compiled with this
   support, an additional 90K data structure is include, which increases the
   size of the library dramatically.

5. There is support for saving compiled patterns and re-using them later.

6. There is support for running regular expressions that were compiled on a
   different host with the opposite endianness.

7. The pcretest program has been extended to accommodate the new features.

The main internal rearrangement is that sequences of literal characters are no
longer handled as strings. Instead, each character is handled on its own. This
makes some UTF-8 handling easier, and makes the support of partial matching
possible. Compiled patterns containing long literal strings will be larger as a
result of this change; I hope that performance will not be much affected.
2004-09-28 15:59:49 +00:00
jlam
1a280185e1 Mechanical changes to package PLISTs to make use of LIBTOOLIZE_PLIST.
All library names listed by *.la files no longer need to be listed
in the PLIST, e.g., instead of:

	lib/libfoo.a
	lib/libfoo.la
	lib/libfoo.so
	lib/libfoo.so.0
	lib/libfoo.so.0.1

one simply needs:

	lib/libfoo.la

and bsd.pkg.mk will automatically ensure that the additional library
names are listed in the installed package +CONTENTS file.

Also make LIBTOOLIZE_PLIST default to "yes".
2004-09-22 08:09:14 +00:00