summary refs log tree commit diff
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2017-07-31 11:06:30 +0200
committerEelco Dolstra <edolstra@gmail.com>2017-07-31 11:09:33 +0200
commit9bcee1051a94d6ba2be64a19665f017542122b83 (patch)
tree48f8e4473ccda520581070265c6439dabbc8bd4a
parent70d4d22806a2dee5d5c50048742b57ec9dfab433 (diff)
downloadnixpkgs-9bcee1051a94d6ba2be64a19665f017542122b83.tar
nixpkgs-9bcee1051a94d6ba2be64a19665f017542122b83.tar.gz
nixpkgs-9bcee1051a94d6ba2be64a19665f017542122b83.tar.bz2
nixpkgs-9bcee1051a94d6ba2be64a19665f017542122b83.tar.lz
nixpkgs-9bcee1051a94d6ba2be64a19665f017542122b83.tar.xz
nixpkgs-9bcee1051a94d6ba2be64a19665f017542122b83.tar.zst
nixpkgs-9bcee1051a94d6ba2be64a19665f017542122b83.zip
strigi: Build on gcc 6
https://hydra.nixos.org/build/56882669
-rw-r--r--pkgs/development/libraries/strigi/default.nix4
-rw-r--r--pkgs/development/libraries/strigi/gcc6.patch45
2 files changed, 47 insertions, 2 deletions
diff --git a/pkgs/development/libraries/strigi/default.nix b/pkgs/development/libraries/strigi/default.nix
index 1961160cbc9..362881a2f42 100644
--- a/pkgs/development/libraries/strigi/default.nix
+++ b/pkgs/development/libraries/strigi/default.nix
@@ -16,11 +16,11 @@ stdenv.mkDerivation rec {
   CLUCENE_HOME = clucene_core;
 
   buildInputs =
-    [ zlib bzip2 stdenv.cc.libc libxml2 qt4 exiv2 clucene_core fam dbus_tools ];
+    [ zlib bzip2 libxml2 qt4 exiv2 clucene_core fam dbus_tools ];
 
   nativeBuildInputs = [ cmake pkgconfig perl ];
 
-  patches = [ ./export_bufferedstream.patch ];
+  patches = [ ./export_bufferedstream.patch ./gcc6.patch ];
 
   enableParallelBuilding = true;
 
diff --git a/pkgs/development/libraries/strigi/gcc6.patch b/pkgs/development/libraries/strigi/gcc6.patch
new file mode 100644
index 00000000000..b46f6c52b82
--- /dev/null
+++ b/pkgs/development/libraries/strigi/gcc6.patch
@@ -0,0 +1,45 @@
+https://sourceforge.net/p/strigi/patches/4/
+
+and a fix for
+
+/tmp/nix-build-strigi-0.7.8.drv-0/strigi-0.7.8/libstreamanalyzer/plugins/indexers/clucenengindexer/cluceneindexreader.cpp:325:37: error: no matching function for call to 'make_pair(std::__cxx11::string, std::__cxx11::string&)'
+             wchartoutf8(name), value));
+
+diff -Naur strigi-0.7.8.old/libstreamanalyzer/cmake/MacroCheckGccVisibility.cmake strigi-0.7.8/libstreamanalyzer/cmake/MacroCheckGccVisibility.cmake
+--- strigi-0.7.8.old/libstreamanalyzer/cmake/MacroCheckGccVisibility.cmake	2013-02-05 16:34:52.000000000 -0500
++++ strigi-0.7.8/libstreamanalyzer/cmake/MacroCheckGccVisibility.cmake	2016-05-14 11:39:54.586260564 -0400
+@@ -15,7 +15,7 @@
+    # get the gcc version
+    exec_program(${CMAKE_C_COMPILER} ARGS ${CMAKE_C_COMPILER_ARG1} --version OUTPUT_VARIABLE _gcc_version_info)
+ 
+-   string (REGEX MATCH "[345]\\.[0-9]\\.[0-9]" _gcc_version "${_gcc_version_info}")
++   string (REGEX MATCH "[3456789]\\.[0-9]\\.[0-9]" _gcc_version "${_gcc_version_info}")
+    # gcc on mac just reports: "gcc (GCC) 3.3 20030304 ..." without the patch level, handle this here:
+    if (NOT _gcc_version)
+       string (REGEX REPLACE ".*\\(GCC\\).* ([34]\\.[0-9]) .*" "\\1.0" _gcc_version "${_gcc_version_info}")
+diff -Naur strigi-0.7.8.old/libstreams/cmake/MacroCheckGccVisibility.cmake strigi-0.7.8/libstreams/cmake/MacroCheckGccVisibility.cmake
+--- strigi-0.7.8.old/libstreams/cmake/MacroCheckGccVisibility.cmake	2013-02-05 16:34:57.000000000 -0500
++++ strigi-0.7.8/libstreams/cmake/MacroCheckGccVisibility.cmake	2016-05-14 11:40:11.340134414 -0400
+@@ -15,7 +15,7 @@
+    # get the gcc version
+    exec_program(${CMAKE_C_COMPILER} ARGS ${CMAKE_C_COMPILER_ARG1} --version OUTPUT_VARIABLE _gcc_version_info)
+ 
+-   string (REGEX MATCH "[345]\\.[0-9]\\.[0-9]" _gcc_version "${_gcc_version_info}")
++   string (REGEX MATCH "[3456789]\\.[0-9]\\.[0-9]" _gcc_version "${_gcc_version_info}")
+    # gcc on mac just reports: "gcc (GCC) 3.3 20030304 ..." without the patch level, handle this here:
+    if (NOT _gcc_version)
+       string (REGEX REPLACE ".*\\(GCC\\).* ([34]\\.[0-9]) .*" "\\1.0" _gcc_version "${_gcc_version_info}")
+
+diff -ru strigi-0.7.8-orig/libstreamanalyzer/plugins/indexers/clucenengindexer/cluceneindexreader.cpp strigi-0.7.8/libstreamanalyzer/plugins/indexers/clucenengindexer/cluceneindexreader.cpp
+--- strigi-0.7.8-orig/libstreamanalyzer/plugins/indexers/clucenengindexer/cluceneindexreader.cpp	2013-02-05 22:34:52.000000000 +0100
++++ strigi-0.7.8/libstreamanalyzer/plugins/indexers/clucenengindexer/cluceneindexreader.cpp	2017-07-31 10:56:27.067902643 +0200
+@@ -321,8 +321,7 @@
+         string size = value;
+         doc.size = atoi(size.c_str());
+     } else {
+-        doc.properties.insert(make_pair<const string, string>(
+-            wchartoutf8(name), value));
++        doc.properties.emplace(wchartoutf8(name), value);
+     }
+ }
+ Variant