mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-24 06:31:02 +00:00
pcre: separate variants of the library
- don't include the cxx variant in the default build, as it depends on libstdc++ (and it seems rarely used anyway) - allow building pcre16 and pcre32 variants; pcre16 is the one needed by qt*, I think - share the basic libs with all of the variants
This commit is contained in:
parent
fd1619cf60
commit
30845d07d8
|
@ -1,9 +1,11 @@
|
|||
{ stdenv, fetchurl, unicodeSupport ? true, cplusplusSupport ? true
|
||||
, windows ? null
|
||||
{ stdenv, fetchurl
|
||||
, windows ? null, variant ? null, pcre
|
||||
}:
|
||||
|
||||
with stdenv.lib;
|
||||
|
||||
assert elem variant [ null "cpp" "pcre16" "pcre32" ];
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "pcre-8.37";
|
||||
|
||||
|
@ -19,26 +21,28 @@ stdenv.mkDerivation rec {
|
|||
|
||||
outputs = [ "dev" "out" "bin" "doc" "man" ];
|
||||
|
||||
configureFlags = ''
|
||||
--enable-jit
|
||||
${if unicodeSupport then "--enable-unicode-properties" else ""}
|
||||
${if !cplusplusSupport then "--disable-cpp" else ""}
|
||||
'';
|
||||
configureFlags = [
|
||||
"--enable-jit"
|
||||
"--enable-unicode-properties"
|
||||
"--disable-cpp"
|
||||
]
|
||||
++ optional (variant != null) "--enable-${variant}";
|
||||
|
||||
doCheck = with stdenv; !(isCygwin || isFreeBSD);
|
||||
# XXX: test failure on Cygwin
|
||||
# we are running out of stack on both freeBSDs on Hydra
|
||||
|
||||
postFixup = ''
|
||||
_moveToOutput bin/pcre-config "$dev"
|
||||
''
|
||||
+ optionalString (variant != null) ''
|
||||
ln -sf -t "$out/lib/" '${pcre.out}'/lib/libpcre{,posix}.so.*.*.*
|
||||
'';
|
||||
|
||||
crossAttrs = optionalAttrs (stdenv.cross.libc == "msvcrt") {
|
||||
buildInputs = [ windows.mingw_w64_pthreads.crossDrv ];
|
||||
};
|
||||
|
||||
postInstall =
|
||||
''
|
||||
mkdir $dev/bin
|
||||
mv $bin/bin/pcre-config $dev/bin/
|
||||
'';
|
||||
|
||||
meta = {
|
||||
homepage = "http://www.pcre.org/";
|
||||
description = "A library for Perl Compatible Regular Expressions";
|
||||
|
|
|
@ -7800,9 +7800,7 @@ let
|
|||
vtk = vtkWithQt4;
|
||||
};
|
||||
|
||||
pcre = callPackage ../development/libraries/pcre {
|
||||
unicodeSupport = config.pcre.unicode or true;
|
||||
};
|
||||
pcre = callPackage ../development/libraries/pcre { };
|
||||
|
||||
pdf2xml = callPackage ../development/libraries/pdf2xml {} ;
|
||||
|
||||
|
@ -11545,9 +11543,7 @@ let
|
|||
|
||||
inherit (gnome3) gitg;
|
||||
|
||||
giv = callPackage ../applications/graphics/giv {
|
||||
pcre = pcre.override { unicodeSupport = true; };
|
||||
};
|
||||
giv = callPackage ../applications/graphics/giv { };
|
||||
|
||||
gmrun = callPackage ../applications/misc/gmrun {};
|
||||
|
||||
|
|
Loading…
Reference in a new issue