srcml: fix build with gcc6

+34 -2
+8 -2
pkgs/applications/version-management/srcml/default.nix
··· 1 - { stdenv, fetchurl, cmake, libxml2, libxslt, boost, libarchive, python, antlr }: 1 + { stdenv, fetchurl, cmake, libxml2, libxslt, boost, libarchive, python, antlr, 2 + curl 3 + }: 2 4 3 5 with stdenv.lib; 4 6 ··· 16 18 substituteInPlace CMake/install.cmake --replace /usr/local $out 17 19 ''; 18 20 21 + patches = [ 22 + ./gcc6.patch 23 + ]; 24 + 19 25 nativeBuildInputs = [ cmake antlr ]; 20 - buildInputs = [ libxml2 libxslt boost libarchive python ]; 26 + buildInputs = [ libxml2 libxslt boost libarchive python curl ]; 21 27 22 28 meta = { 23 29 description = "Infrastructure for exploration, analysis, and manipulation of source code";
+26
pkgs/applications/version-management/srcml/gcc6.patch
··· 1 + diff --git i/CMake/config.cmake w/CMake/config.cmake 2 + index 28f8047..c596cf8 100644 3 + --- i/CMake/config.cmake 4 + +++ w/CMake/config.cmake 5 + @@ -95,7 +95,7 @@ else() 6 + find_package(LibXml2 REQUIRED) 7 + find_package(CURL REQUIRED) 8 + set(Boost_NO_BOOST_CMAKE ON) 9 + - set(Boost_USE_STATIC_LIBS ON) 10 + + set(Boost_USE_STATIC_LIBS OFF) 11 + find_package(Boost COMPONENTS program_options filesystem system thread regex date_time REQUIRED) 12 + 13 + # add include directories 14 + diff --git i/src/libsrcml/srcml_reader_handler.hpp w/src/libsrcml/srcml_reader_handler.hpp 15 + index 0b23fed..c02dfef 100644 16 + --- i/src/libsrcml/srcml_reader_handler.hpp 17 + +++ w/src/libsrcml/srcml_reader_handler.hpp 18 + @@ -456,7 +456,7 @@ public : 19 + 20 + if(uri == SRCML_CPP_NS_URI) { 21 + 22 + - if(archive->language != 0) { 23 + + if(srcml_check_language(archive->language->c_str()) != 0) { 24 + 25 + if(*archive->language == "C++" || *archive->language == "C" || *archive->language == "Objective-C") 26 + archive->options |= SRCML_OPTION_CPP | SRCML_OPTION_CPP_NOMACRO;