Skip to content

Commit

Permalink
* AUTHORS, pcre: Import PCRE 7.6.
Browse files Browse the repository at this point in the history
 * NEWS: Document this.
 * m4/pcre.m4: Error out, rather than falling back to the bundled
   version, if --with-system-pcre is given and we can't find the system
   pcre or it's unsuitable.  Treat any version of PCRE other than the
   bundled one as unsuitable.  Document all of this.
 * tests/syntax_errors_in_.mtn-ignore/stderr-ref: One diagnostic changed.

 * debian/control: Build-depend on libpcre3 (>= 7.6, << 7.7).
 * debian/shlibs.local: New file; constrain runtime libpcre3 use to
   (>= 7.6, << 7.7) as well.
 * debian/rules: Add --with-system-pcre to configure invocation, and
   document the constraints on pcre usage.  Remove unsuccessful
   attempt to avoid Alpha compiler bugs by using -O1.
 * debian/changelog: New entry for 0.39-1.
  • Loading branch information
mtn-dev committed Feb 12, 2008
1 parent e1d495a commit 91b48f2
Show file tree
Hide file tree
Showing 31 changed files with 291 additions and 122 deletions.
2 changes: 1 addition & 1 deletion AUTHORS
Expand Up @@ -462,7 +462,7 @@ The files in pcre/ comprise the Perl-Compatible Regular Expression
distribution may be retrieved from http://www.pcre.org/. It is licensed
under a BSD-like license:

# Copyright (c) 1997-2007 University of Cambridge.
# Copyright (c) 1997-2008 University of Cambridge.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
Expand Down
5 changes: 5 additions & 0 deletions NEWS
Expand Up @@ -19,6 +19,11 @@
messages, however it may report content conflicts that will be
resolved automatically by the line merger.

- The internal copy of PCRE has been updated to version 7.6.
If you use the '--with-system-pcre' configure switch, it
will insist on this version and no other. See m4/pcre.m4
for further discussion.

Bugs fixed

- for changes near the beginning of a file, mtn's unified diff
Expand Down
11 changes: 10 additions & 1 deletion debian/changelog
@@ -1,3 +1,12 @@
monotone (0.39-1) UNRELEASED; urgency=low

* New upstream release.
* Enable use of system libpcre, set appropriate Build-Depends. Note
use of tight B-Ds and shared library dependencies, consistent
with behavior of upstream configure script.

-- J Maintainer <address@here> ???, ?? ??? ???? ??:??:?? +????

monotone (0.38-1) unstable; urgency=low

[ Richard Levitte ]
Expand Down Expand Up @@ -92,7 +101,7 @@ monotone (0.36-1) unstable; urgency=low
- if not asked to manage the database, do not delete it.
- if deleting the database and there is a hot journal, delete that too.
- delete editor backups of ucf-managed conffiles.
- expunge the auto-generated key's passphrase from
- expunge the auto-generated key's passphrase from
/etc/monotone/passphrases and if that leaves the file empty,
delete it.
- do not delete the monotone user or group if leaving /var/lib/monotone
Expand Down
3 changes: 2 additions & 1 deletion debian/control
Expand Up @@ -6,7 +6,8 @@ Uploaders: Richard Levitte <richard@levitte.org>, Zack Weinberg <zackw@panix.com
Homepage: http://monotone.ca/
Vcs-Browser: http://viewmtn.angrygoats.net/branch/changes/net.venge.monotone
Build-Depends: debhelper (>= 4.2.0), autotools-dev, libz-dev, po-debconf,
libboost-dev (>= 1.34.1-2), patch
libboost-dev (>= 1.34.1-2), libpcre3-dev (>= 7.6), libpcre3-dev (<< 7.7),
patch
Build-Depends-Indep: ps2eps, texlive-base, texlive-generic-recommended,
texlive-latex-base, texinfo, xpdf-utils
Standards-Version: 3.7.3
Expand Down
20 changes: 12 additions & 8 deletions debian/rules
Expand Up @@ -39,15 +39,8 @@ ifneq (,$(findstring hppa,$(DEB_HOST_GNU_TYPE)))
DEFAULT_CFLAGS += -mlong-calls
endif
else # optimization enabled
# Back Alpha down to -O1 to avoid apparent compiler bugs
# (0.37-1 did not build on alpha with random crashes, 0.37-2 did,
# only plausible difference was the accidental -O0 in all 0.37-2 builds).
ifneq (,$(findstring alpha,$(DEB_HOST_GNU_TYPE)))
DEFAULT_CFLAGS += -O1
else
DEFAULT_CFLAGS += -O2
endif
endif

CFLAGS ?= $(DEFAULT_CFLAGS)

Expand All @@ -71,6 +64,16 @@ CFLAGS ?= $(DEFAULT_CFLAGS)
# tried it with actual root privileges and don't propose to).
build: build-arch

# Note regarding PCRE: monotone upstream wants tight control over
# which version of the library is used with any given release of the
# program. In --with-system-pcre mode, configure will error out if it
# finds any version other than the one bundled with the program. This
# is why the package has both >= and << build-dependencies on
# libpcre3-dev. There is a documented way to override this, should it
# be necessary for e.g. security NMUs: see m4/pcre.m4. You will also
# need to change the build dependencies in debian/control *and* the
# shared library dependencies override in debian/shlibs.local.

config.status: configure
dh_testdir
ifneq "$(wildcard /usr/share/misc/config.sub)" ""
Expand All @@ -80,6 +83,7 @@ ifneq "$(wildcard /usr/share/misc/config.guess)" ""
cp -f /usr/share/misc/config.guess config.guess
endif
./configure $(BUILD_AND_HOST) \
--with-system-pcre \
--prefix=/usr --mandir='$${prefix}/share/man' \
--infodir='$${prefix}/share/info' CFLAGS="$(CFLAGS)" \
CXXFLAGS="$(CFLAGS)" LDFLAGS="-Wl,-z,defs"
Expand Down Expand Up @@ -123,7 +127,7 @@ binary-indep: build-indep
# monotone.html installed.) Annoyingly, at present we cannot simply
# dh_installdocs the entire html directory, because it contains a
# bunch of unwanted junk; instead we dh_installdirs the directory
# hierarchy that is required and use cp -a to put all the files in place.
# hierarchy that is required and use cp -p to put all the files in place.
cp -p html/*.html html/*.css debian/monotone-doc/usr/share/doc/html
cp -p html/figures/*.png debian/monotone-doc/usr/share/doc/html/figures

Expand Down
1 change: 1 addition & 0 deletions debian/shlibs.local
@@ -0,0 +1 @@
libpcre 3 libpcre3 (>= 7.6), libpcre3 (<< 7.7)
54 changes: 48 additions & 6 deletions m4/pcre.m4
@@ -1,4 +1,26 @@
# Detect libpcre or fall back to our bundled version.
# Set up to use either a bundled or a system-provided version of libpcre.
#
# If --with-system-pcre is specified and the library cannot be found or is
# unsuitable, the configure script will error out rather than falling back
# to the bundled version. This is to avoid surprising a user who expected
# their system libpcre to be used.
#
# "Unsuitable" is defined as "any version other than the bundled one". In
# other words, if you want to use a system PCRE you must provide the exact
# same version that was shipped with this release of Monotone. We do this
# because regexes are part of the visible user interface, but their syntax
# may change from release to release of PCRE. We want each version of our
# program to exhibit the regex syntax that was documented in its manual.
#
# If you want to rebuild monotone with a newer system PCRE to get some bug
# fixes, and you've verified that the newer version of PCRE doesn't change
# the regex syntax, you can override the check by changing the #defines in
# pcre/pcre.h that state the bundled library's version number. You do not
# have to regenerate 'configure'.
#
# We are discussing this with the upstream maintainers of PCRE and hope to
# find a better solution soon.

AC_DEFUN([MTN_LIB_PCRE],
[AC_ARG_WITH([system-pcre],
AC_HELP_STRING([--with-system-pcre],
Expand All @@ -13,8 +35,7 @@ AC_DEFUN([MTN_LIB_PCRE],
[with_system_pcre=no])
if test "$with_system_pcre" = yes; then
MTN_FIND_PCRE
fi
if test $with_system_pcre = no; then
else
AC_DEFINE([PCRE_STATIC],[1],[Define if using bundled pcre])
AC_MSG_NOTICE([using the bundled copy of PCRE])
fi
Expand All @@ -34,7 +55,7 @@ AC_DEFUN([MTN_FIND_PCRE],
if test -n "${PCRE_CFLAGS+set}" || test -n "${PCRE_LIBS+set}"; then
found_libpcre=yes
else
PKG_CHECK_MODULES([PCRE], [libpcre >= 6.7],
PKG_CHECK_MODULES([PCRE], [libpcre],
[found_libpcre=yes], [found_libpcre=no])
fi
if test $found_libpcre = no; then
Expand Down Expand Up @@ -85,5 +106,26 @@ AC_DEFUN([MTN_FIND_PCRE],
LIBS="$save_LIBS"
CFLAGS="$save_CFLAGS"])
if test $ac_cv_lib_pcre_works = no; then
with_system_pcre=no
fi])
AC_MSG_ERROR([system-provided libpcre is not usable. Correct your settings or use --with-system-pcre=no.])
fi
# This is deliberately not cached.
AC_MSG_CHECKING([whether the system libpcre matches the bundled version])
sed -n -e 's/#define PCRE_MAJOR[ ]*/#define BUNDLED_PCRE_MAJOR /p' \
-e 's/#define PCRE_MINOR[ ]*/#define BUNDLED_PCRE_MINOR /p' \
$srcdir/pcre/pcre.h > conftest.h
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $PCRE_CFLAGS"
AC_PREPROC_IFELSE([
#include "conftest.h"
#include "pcre.h"
#if PCRE_MAJOR != BUNDLED_PCRE_MAJOR || PCRE_MINOR != BUNDLED_PCRE_MINOR
#error PCRE version mismatch
#endif],
[pcre_version_match=yes],
[pcre_version_match=no])
AC_MSG_RESULT($pcre_version_match)
if test $pcre_version_match = no; then
AC_MSG_ERROR([system-provided libpcre does not match bundled pcre. Correct your settings, use --with-system-pcre=no, or read m4/pcre.m4 for advice.])
fi
])
6 changes: 3 additions & 3 deletions pcre/pcre.h
Expand Up @@ -5,7 +5,7 @@
/* This is the public header file for the PCRE library, to be #included by
applications that call the PCRE functions.
Copyright (c) 1997-2007 University of Cambridge
Copyright (c) 1997-2008 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -42,9 +42,9 @@ POSSIBILITY OF SUCH DAMAGE.
/* The current PCRE version information. */

#define PCRE_MAJOR 7
#define PCRE_MINOR 4
#define PCRE_MINOR 6
#define PCRE_PRERELEASE
#define PCRE_DATE 2007-09-21
#define PCRE_DATE 2008-01-28

/* When an application links to a PCRE DLL in Windows, the symbols that are
imported have to be identified as such. When building PCRE, the appropriate
Expand Down

0 comments on commit 91b48f2

Please sign in to comment.