From 2313dad5b768bbbbce1b46f8bddef7293db9deef Mon Sep 17 00:00:00 2001 From: Enno Boland Date: Wed, 30 Jan 2019 18:40:03 +0100 Subject: [PATCH] pdfgep: call setlocale only on glibc systems. Fixes #7988. --- srcpkgs/pdfgrep/patches/fix-musl.patch | 14 ++++++++++++++ srcpkgs/pdfgrep/template | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/pdfgrep/patches/fix-musl.patch diff --git a/srcpkgs/pdfgrep/patches/fix-musl.patch b/srcpkgs/pdfgrep/patches/fix-musl.patch new file mode 100644 index 00000000000..979d4a32641 --- /dev/null +++ b/srcpkgs/pdfgrep/patches/fix-musl.patch @@ -0,0 +1,14 @@ +diff --git a/src/pdfgrep.cc b/src/pdfgrep.cc +index 7f8bdf8..5283e16 100644 +--- ./src/pdfgrep.cc ++++ ./src/pdfgrep.cc +@@ -460,7 +460,9 @@ int main(int argc, char** argv) + // Set locale to user-preference. If this locale is an UTF-8 locale, the + // regex-functions regcomp/regexec become unicode aware, which means + // e.g. that '.' will match a unicode character, not a single byte. ++#ifdef __GLIBC__ + locale::global(locale("")); ++#endif + + enum re_engine_type { + RE_POSIX = 0, diff --git a/srcpkgs/pdfgrep/template b/srcpkgs/pdfgrep/template index f916ae1a04f..20fe67c7203 100644 --- a/srcpkgs/pdfgrep/template +++ b/srcpkgs/pdfgrep/template @@ -1,7 +1,7 @@ # Template file for 'pdfgrep' pkgname=pdfgrep version=2.1.2 -revision=1 +revision=2 build_style=gnu-configure hostmakedepends="pkg-config" makedepends="libgcrypt-devel poppler-cpp-devel"