debian: build against PCRE v2 when available
commit89a26f94004eb5bf76b012f64394cec0bc508d68
authorJonathan Nieder <jrnieder@gmail.com>
Mon, 7 Aug 2017 18:25:12 +0000 (7 11:25 -0700)
committerJonathan Nieder <jrnieder@gmail.com>
Mon, 7 Aug 2017 18:25:12 +0000 (7 11:25 -0700)
tree8d746363437ef8152b8eaab75958ff14fc6da62b
parent9fa9e81c7392ac15975b14c172d02037ccb2777a
debian: build against PCRE v2 when available

Decide which PCRE version to use at build time based on which -dev
package is installed.  This is the usual way in a Debian package to
gracefully handle a build-time dependency that has changed API.

It would be nice to offer a build profile to allow explicitly using
libpcre3-dev when libpcre2-dev is also installed, but build profiles
in Build-Depends are a relatively recent feature, so that would hurt
backports.  Anyway, libpcre2-dev is what upstream wants to migrate
to so it's best that end-users start using it and reporting bugs.

This change has already been well tested in Debian experimental since
2017-06-26.

Requested-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
debian/changelog
debian/control
debian/rules