tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
srcml: fix build with gcc6
Samuel Leathers
8 years ago
d93e2ccd
97935829
+34
-2
2 changed files
expand all
collapse all
unified
split
pkgs
applications
version-management
srcml
default.nix
gcc6.patch
+8
-2
pkgs/applications/version-management/srcml/default.nix
···
1
1
-
{ stdenv, fetchurl, cmake, libxml2, libxslt, boost, libarchive, python, antlr }:
1
1
+
{ stdenv, fetchurl, cmake, libxml2, libxslt, boost, libarchive, python, antlr,
2
2
+
curl
3
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
21
+
patches = [
22
22
+
./gcc6.patch
23
23
+
];
24
24
+
19
25
nativeBuildInputs = [ cmake antlr ];
20
20
-
buildInputs = [ libxml2 libxslt boost libarchive python ];
26
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
1
+
diff --git i/CMake/config.cmake w/CMake/config.cmake
2
2
+
index 28f8047..c596cf8 100644
3
3
+
--- i/CMake/config.cmake
4
4
+
+++ w/CMake/config.cmake
5
5
+
@@ -95,7 +95,7 @@ else()
6
6
+
find_package(LibXml2 REQUIRED)
7
7
+
find_package(CURL REQUIRED)
8
8
+
set(Boost_NO_BOOST_CMAKE ON)
9
9
+
- set(Boost_USE_STATIC_LIBS ON)
10
10
+
+ set(Boost_USE_STATIC_LIBS OFF)
11
11
+
find_package(Boost COMPONENTS program_options filesystem system thread regex date_time REQUIRED)
12
12
+
13
13
+
# add include directories
14
14
+
diff --git i/src/libsrcml/srcml_reader_handler.hpp w/src/libsrcml/srcml_reader_handler.hpp
15
15
+
index 0b23fed..c02dfef 100644
16
16
+
--- i/src/libsrcml/srcml_reader_handler.hpp
17
17
+
+++ w/src/libsrcml/srcml_reader_handler.hpp
18
18
+
@@ -456,7 +456,7 @@ public :
19
19
+
20
20
+
if(uri == SRCML_CPP_NS_URI) {
21
21
+
22
22
+
- if(archive->language != 0) {
23
23
+
+ if(srcml_check_language(archive->language->c_str()) != 0) {
24
24
+
25
25
+
if(*archive->language == "C++" || *archive->language == "C" || *archive->language == "Objective-C")
26
26
+
archive->options |= SRCML_OPTION_CPP | SRCML_OPTION_CPP_NOMACRO;