Commit graph

62 commits

Author SHA1 Message Date
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
wiz
7deec283de Unused. 2004-05-10 09:31:03 +00:00
jlam
9ff0e10340 Reorder location and setting of BUILDLINK_PACKAGES to match template
buildlink3.mk file in revision 1.101 of bsd.buildlink3.mk.
2004-03-05 19:25:06 +00:00
jlam
ec993afa1a LIBTOOL_OVERRIDE and SHLIBTOOL_OVERRIDE are now lists of shell globs
relative to ${WRKSRC}.  Remove redundant LIBTOOL_OVERRIDE settings that
are automatically handled by the default setting in bsd.pkg.mk.
2004-02-14 17:21:32 +00:00
snj
3e3a28ec6a s/seperate/separate/ 2004-01-31 23:41:14 +00:00
jlam
a7d877ca6a Append to BUILDLINK_DEPENDS.<pkg> instead of setting a default value. In
the normal case when BUILDLINK_DEPENDS.<pkg> isn't specified, it receives
a value only once due to the multiple inclusion protection in the
bulldlink3.mk files.  In the case where a package includes several
buildlink3.mk files that each want a slightly different version of another
dependency, having BUILDLINK_DEPENDS.<pkg> be a list allows for the
strictest <pkg> dependency to be matched.
2004-01-24 03:26:45 +00:00
jlam
9cd2322a03 bl3ify 2004-01-05 23:20:29 +00:00
jlam
d279e6f535 Use S/+$// instead of C/\+$// to save a backslash. Very highly
recommended by seb :)
2004-01-05 11:05:44 +00:00
jlam
47bb2aae5f Re-arrange to match example buildlink3.mk file in bsd.buildlink3.mk. 2004-01-04 23:34:04 +00:00
jlam
339cd13cb2 Initial sprinkling of work-in-progress buildlink3.mk files for using the
buildlink3 framework.
2004-01-03 23:06:43 +00:00
jmmv
5113a4d55b Update to 4.5:
1. There has been some re-arrangement of the code for the match() function so
    that it can be compiled in a version that does not call itself recursively.
    Instead, it keeps those local variables that need separate instances for
    each "recursion" in a frame on the heap, and gets/frees frames whenever it
    needs to "recurse". Keeping track of where control must go is done by means
    of setjmp/longjmp. The whole thing is implemented by a set of macros that
    hide most of the details from the main code, and operates only if
    NO_RECURSE is defined while compiling pcre.c. If PCRE is built using the
    "configure" mechanism, "--disable-stack-for-recursion" turns on this way of
    operating.

    To make it easier for callers to provide specially tailored get/free
    functions for this usage, two new functions, pcre_stack_malloc, and
    pcre_stack_free, are used. They are always called in strict stacking order,
    and the size of block requested is always the same.

    The PCRE_CONFIG_STACKRECURSE info parameter can be used to find out whether
    PCRE has been compiled to use the stack or the heap for recursion. The
    -C option of pcretest uses this to show which version is compiled.

    A new data escape \S, is added to pcretest; it causes the amounts of store
    obtained and freed by both kinds of malloc/free at match time to be added
    to the output.

 2. Changed the locale test to use "fr_FR" instead of "fr" because that's
    what's available on my current Linux desktop machine.

 3. When matching a UTF-8 string, the test for a valid string at the start has
    been extended. If start_offset is not zero, PCRE now checks that it points
    to a byte that is the start of a UTF-8 character. If not, it returns
    PCRE_ERROR_BADUTF8_OFFSET (-11). Note: the whole string is still checked;
    this is necessary because there may be backward assertions in the pattern.
    When matching the same subject several times, it may save resources to use
    PCRE_NO_UTF8_CHECK on all but the first call if the string is long.

 4. The code for checking the validity of UTF-8 strings has been tightened so
    that it rejects (a) strings containing 0xfe or 0xff bytes and (b) strings
    containing "overlong sequences".

 5. Fixed a bug (appearing twice) that I could not find any way of exploiting!
    I had written "if ((digitab[*p++] && chtab_digit) == 0)" where the "&&"
    should have been "&", but it just so happened that all the cases this let
    through by mistake were picked up later in the function.

 6. I had used a variable called "isblank" - this is a C99 function, causing
    some compilers to warn. To avoid this, I renamed it (as "blankclass").

 7. Cosmetic: (a) only output another newline at the end of pcretest if it is
    prompting; (b) run "./pcretest /dev/null" at the start of the test script
    so the version is shown; (c) stop "make test" echoing "./RunTest".

 8. Added patches from David Burgess to enable PCRE to run on EBCDIC systems.

 9. The prototype for memmove() for systems that don't have it was using
    size_t, but the inclusion of the header that defines size_t was later. I've
    moved the #includes for the C headers earlier to avoid this.

10. Added some adjustments to the code to make it easier to compiler on certain
    special systems:

      (a) Some "const" qualifiers were missing.
      (b) Added the macro EXPORT before all exported functions; by default this
          is defined to be empty.
      (c) Changed the dftables auxiliary program (that builds chartables.c) so
          that it reads its output file name as an argument instead of writing
          to the standard output and assuming this can be redirected.

11. In UTF-8 mode, if a recursive reference (e.g. (?1)) followed a character
    class containing characters with values greater than 255, PCRE compilation
    went into a loop.

12. A recursive reference to a subpattern that was within another subpattern
    that had a minimum quantifier of zero caused PCRE to crash. For example,
    (x(y(?2))z)? provoked this bug with a subject that got as far as the
    recursion. If the recursively-called subpattern itself had a zero repeat,
    that was OK.

13. In pcretest, the buffer for reading a data line was set at 30K, but the
    buffer into which it was copied (for escape processing) was still set at
    1024, so long lines caused crashes.

14. A pattern such as /[ab]{1,3}+/ failed to compile, giving the error
    "internal error: code overflow...". This applied to any character class
    that was followed by a possessive quantifier.

15. Modified the Makefile to add libpcre.la as a prerequisite for
    libpcreposix.la because I was told this is needed for a parallel build to
    work.

16. If a pattern that contained .* following optional items at the start was
    studied, the wrong optimizing data was generated, leading to matching
    errors. For example, studying /[ab]*.*c/ concluded, erroneously, that any
    matching string must start with a or b or c. The correct conclusion for
    this pattern is that a match can start with any character.
2003-12-12 22:33:36 +00:00
wiz
6261786f43 Update to 4.4:
1. In UTF-8 mode, a character class containing characters with values between
    127 and 255 was not handled correctly if the compiled pattern was studied.
    In fixing this, I have also improved the studying algorithm for such
    classes (slightly).

 2. Three internal functions had redundant arguments passed to them. Removal
    might give a very teeny performance improvement.

 3. Documentation bug: the value of the capture_top field in a callout is *one
    more than* the number of the hightest numbered captured substring.

 4. The Makefile linked pcretest and pcregrep with -lpcre, which could result
    in incorrectly linking with a previously installed version. They now link
    explicitly with libpcre.la.

 5. configure.in no longer needs to recognize Cygwin specially.

 6. A problem in pcre.in for Windows platforms is fixed.

 7. If a pattern was successfully studied, and the -d (or /D) flag was given to
    pcretest, it used to include the size of the study block as part of its
    output. Unfortunately, the structure contains a field that has a different
    size on different hardware architectures. This meant that the tests that
    showed this size failed. As the block is currently always of a fixed size,
    this information isn't actually particularly useful in pcretest output, so
    I have just removed it.

 8. Three pre-processor statements accidentally did not start in column 1.
    Sadly, there are *still* compilers around that complain, even though
    standard C has not required this for well over a decade. Sigh.

 9. In pcretest, the code for checking callouts passed small integers in the
    callout_data field, which is a void * field. However, some picky compilers
    complained about the casts involved for this on 64-bit systems. Now
    pcretest passes the address of the small integer instead, which should get
    rid of the warnings.

10. By default, when in UTF-8 mode, PCRE now checks for valid UTF-8 strings at
    both compile and run time, and gives an error if an invalid UTF-8 sequence
    is found. There is a option for disabling this check in cases where the
    string is known to be correct and/or the maximum performance is wanted.

11. In response to a bug report, I changed one line in Makefile.in from

        -Wl,--out-implib,.libs/lib@WIN_PREFIX@pcreposix.dll.a \
    to
        -Wl,--out-implib,.libs/@WIN_PREFIX@libpcreposix.dll.a \

    to look similar to other lines, but I have no way of telling whether this
    is the right thing to do, as I do not use Windows. No doubt I'll get told
    if it's wrong...
2003-08-31 11:28:48 +00:00
wiz
f157ffefb0 Update to 4.3.
Version 4.3 21-May-03

Refactoring for code improvements. POSIX compat fix (constification).
UTF-8 fixes.

Version 4.2 14-Apr-03

Build fixes. Removed some compiler warnings. UTF-8 fixes.

Version 4.1 12-Mar-03

Compilation fixes. A bug fix, and two optimization fixes.

Highlights of the 4.0 release:
1. Support for Perl's \Q...\E escapes.

2. "Possessive quantifiers" ?+, *+, ++, and {,}+ which come from Sun's Java
package. They provide some syntactic sugar for simple cases of "atomic
grouping".

3. Support for the \G assertion. It is true when the current matching position
is at the start point of the match.

4. A new feature that provides some of the functionality that Perl provides
with (?{...}). The facility is termed a "callout". The way it is done in PCRE
is for the caller to provide an optional function, by setting pcre_callout to
its entry point. To get the function called, the regex must include (?C) at
appropriate points.

5. Support for recursive calls to individual subpatterns. This makes it really
easy to get totally confused.

6. Support for named subpatterns. The Python syntax (?P<name>...) is used to
name a group.

7. Several extensions to UTF-8 support; it is now fairly complete. There is an
option for pcregrep to make it operate in UTF-8 mode.

8. The single man page has been split into a number of separate man pages.
These also give rise to individual HTML pages which are put in a separate
directory. There is an index.html page that lists them all. Some hyperlinking
between the pages has been installed.
2003-08-05 10:18:39 +00:00
heinz
2beb84c96a Add TEST_TARGET 2003-07-30 21:57:17 +00:00
grant
4083b24390 s/netbsd.org/NetBSD.org/ 2003-07-17 21:31:04 +00:00
cjep
f86654d16d Bump version in buildlink2 to current version 2002-12-30 18:35:03 +00:00
cjep
103ce209c0 Add -Wl,-R... flags in pcre-config (same as we do for gtk-config). Bump pkg revision. 2002-12-30 18:08:01 +00:00
wiz
0a12e7b60b Unused. 2002-10-10 13:30:18 +00:00
martti
84534e1efb Updated pcre to 3.9
* Bug fixes
2002-09-27 11:04:23 +00:00
jlam
e2afa97f51 Merge changes in packages from the buildlink2 branch that have
buildlink2.mk files back into the main trunk.  This provides sufficient
buildlink2 infrastructure to start merging other packages from the
buildlink2 branch that have already been converted to use the buildlink2
framework.
2002-08-25 18:38:05 +00:00
martti
816d169300 Updated to version 3.7. Changes since 3.4:
Version 3.7 29-Oct-01
---------------------

1. In updating pcretest to check change 1 of version 3.6, I screwed up.
This caused pcretest, when used on the test data, to segfault. Unfortunately,
this didn't happen under Solaris 8, where I normally test things.

Version 3.6 23-Oct-01
---------------------

1. Crashed with /(sens|respons)e and \1ibility/ and "sense and sensibility" if
offsets passed as NULL with zero offset count.

2. The config.guess and config.sub files had not been updated when I moved to
the latest autoconf.

Version 3.5 15-Aug-01
---------------------

1. Added some missing #if !defined NOPOSIX conditionals in pcretest.c that
had been forgotten.

2. By using declared but undefined structures, we can avoid using "void"
definitions in pcre.h while keeping the internal definitions of the structures
private.

3. The distribution is now built using autoconf 2.50 and libtool 1.4. From a
user point of view, this means that both static and shared libraries are built
by default, but this can be individually controlled. More of the work of
handling this static/shared cases is now inside libtool instead of PCRE's make
file.

4. The pcretest utility is now installed along with pcregrep because it is
useful for users (to test regexs) and by doing this, it automatically gets
relinked by libtool. The documentation has been turned into a man page, so
there are now .1, .txt, and .html versions in /doc.

5. Upgrades to pcregrep:
   (i)   Added long-form option names like gnu grep.
   (ii)  Added --help to list all options with an explanatory phrase.
   (iii) Added -r, --recursive to recurse into sub-directories.
   (iv)  Added -f, --file to read patterns from a file.

6. pcre_exec() was referring to its "code" argument before testing that
argument for NULL (and giving an error if it was NULL).

7. Upgraded Makefile.in to allow for compiling in a different directory from
the source directory.

8. Tiny buglet in pcretest: when pcre_fullinfo() was called to retrieve the
options bits, the pointer it was passed was to an int instead of to an unsigned
long int. This mattered only on 64-bit systems.

9. Fixed typo (3.4/1) in pcre.h again. Sigh. I had changed pcre.h (which is
generated) instead of pcre.in, which it its source. Also made the same change
in several of the .c files.

10. A new release of gcc defines printf() as a macro, which broke pcretest
because it had an ifdef in the middle of a string argument for printf(). Fixed
by using separate calls to printf().

11. Added --enable-newline-is-cr and --enable-newline-is-lf to the configure
script, to force use of CR or LF instead of \n in the source. On non-Unix
systems, the value can be set in config.h.

12. The limit of 200 on non-capturing parentheses is a _nesting_ limit, not an
absolute limit. Changed the text of the error message to make this clear, and
likewise updated the man page.

13. The limit of 99 on the number of capturing subpatterns has been removed.
The new limit is 65535, which I hope will not be a "real" limit.
2001-11-30 10:20:01 +00:00
zuntum
c72c1cf5f9 Move pkg/ files into package's toplevel directory 2001-11-01 00:57:41 +00:00
jlam
f0a4fcd3e4 Substitute the real config script for the config wrapper script in
installed files.  We don't want buildlink references to escape into the
install directory.
2001-10-03 20:56:40 +00:00
jlam
7bba3453dc If USE_CONFIG_WRAPPER is defined (implied by USE_BUILDLINK_ONLY), then
set FOO_CONFIG=${BUILDLINK_CONFIG_WRAPPER.foo} in both CONFIGURE_ENV and
MAKE_ENV.  We remove the check for GNU_CONFIGURE because if a package
Makefile includes the buildlink.mk file, then it most likely wants to use
the config script wrappers as well.  Change suggested by Hubert Feyrer
(hubertf) and Tomasz Luchowski (zuntum).
2001-08-17 21:14:00 +00:00
jlam
d2eb68d2a6 Add dir_DEFAULT setting used by EVAL_PREFIX logic to set the default
installation directory in case the package isn't installed.
2001-07-27 13:33:18 +00:00
jlam
7b1d3cb465 Mechanical changes to buildlink.mk files to use EVAL_PREFIX to set
BUILDLINK_PREFIX.<pkgname>.  This allows buildlink to find X11BASE packages
regardless of whether they were installed before or after xpkgwedge was
installed.  Idea by Alistair Crooks <agc@pkgsrc.org>.
2001-07-20 01:54:31 +00:00
jlam
9943bc93db Allow overriding of *_CONFIG variables in a package Makefile when using
USE_BUILDLINK_ONLY.
2001-07-02 05:33:56 +00:00
jlam
cb76bd5efc Move inclusion of bsd.buildlink.mk to start of file. 2001-07-01 22:59:08 +00:00
jlam
14f536f516 Add buildlink.mk file for use by other package Makefiles. 2001-06-27 03:46:06 +00:00