forked from mirrors/nixpkgs
golden-cheetah: inline patch
This won't get merged into GoldenCheetah any time soon, at least not before their 3.6 release. The PR is periodically rebased, so better ship this in nixpkgs for the time being.
This commit is contained in:
parent
be0f2729fc
commit
b1a8923231
|
@ -0,0 +1,63 @@
|
|||
From 8befa137776786829508f23dd33ab37e2b95a895 Mon Sep 17 00:00:00 2001
|
||||
From: Poncho <poncho@spahan.ch>
|
||||
Date: Mon, 7 Sep 2020 09:39:49 +0200
|
||||
Subject: [PATCH] Fix building with bison 3.7
|
||||
|
||||
Bison 3.7 changes how header files are included [1][2], in that instead of
|
||||
copying and inserting the contents of a file, the file itself is included
|
||||
(by default as '"basename.h"').
|
||||
|
||||
[1] https://lists.gnu.org/archive/html/info-gnu/2020-07/msg00006.html
|
||||
[2] https://www.gnu.org/software/bison/manual/html_node/_0025define-Summary.html
|
||||
|
||||
Close: https://github.com/GoldenCheetah/GoldenCheetah/issues/3586
|
||||
---
|
||||
src/Core/DataFilter.y | 3 +++
|
||||
src/Core/RideDB.y | 2 ++
|
||||
src/FileIO/JsonRideFile.y | 3 +++
|
||||
3 files changed, 8 insertions(+)
|
||||
|
||||
diff --git a/src/Core/DataFilter.y b/src/Core/DataFilter.y
|
||||
index 7c5e481b0..142e80a5c 100644
|
||||
--- a/src/Core/DataFilter.y
|
||||
+++ b/src/Core/DataFilter.y
|
||||
@@ -49,6 +49,9 @@ extern Leaf *DataFilterroot; // root node for parsed statement
|
||||
|
||||
%}
|
||||
|
||||
+// generated by the scanner
|
||||
+%define api.header.include {"DataFilter_yacc.h"}
|
||||
+
|
||||
// Symbol can be meta or metric name
|
||||
%token <leaf> SYMBOL PYTHON
|
||||
|
||||
diff --git a/src/Core/RideDB.y b/src/Core/RideDB.y
|
||||
index d6da086bd..f2001e23c 100644
|
||||
--- a/src/Core/RideDB.y
|
||||
+++ b/src/Core/RideDB.y
|
||||
@@ -40,6 +40,8 @@ void RideDBerror(void*jc, const char *error) // used by parser aka yyerror()
|
||||
#define scanner jc->scanner
|
||||
|
||||
%}
|
||||
+// generated by the scanner
|
||||
+%define api.header.include {"RideDB_yacc.h"}
|
||||
|
||||
%pure-parser
|
||||
%lex-param { void *scanner }
|
||||
diff --git a/src/FileIO/JsonRideFile.y b/src/FileIO/JsonRideFile.y
|
||||
index 2cbbef9fc..d5c77a779 100644
|
||||
--- a/src/FileIO/JsonRideFile.y
|
||||
+++ b/src/FileIO/JsonRideFile.y
|
||||
@@ -106,6 +106,9 @@ static QString protect(const QString string)
|
||||
|
||||
%}
|
||||
|
||||
+// generated by the scanner
|
||||
+%define api.header.include {"JsonRideFile_yacc.h"}
|
||||
+
|
||||
%pure-parser
|
||||
%lex-param { void *scanner }
|
||||
%parse-param { struct JsonContext *jc }
|
||||
--
|
||||
2.34.1
|
||||
|
|
@ -26,18 +26,26 @@ in mkDerivation rec {
|
|||
};
|
||||
|
||||
buildInputs = [
|
||||
qtbase qtsvg qtserialport qtwebengine qtmultimedia qttools zlib
|
||||
qtconnectivity qtcharts libusb-compat-0_1 gsl blas
|
||||
qtbase
|
||||
qtsvg
|
||||
qtserialport
|
||||
qtwebengine
|
||||
qtmultimedia
|
||||
qttools
|
||||
zlib
|
||||
qtconnectivity
|
||||
qtcharts
|
||||
libusb-compat-0_1
|
||||
gsl
|
||||
blas
|
||||
];
|
||||
nativeBuildInputs = [ flex makeWrapper qmake bison ];
|
||||
|
||||
patches = [
|
||||
# allow building with bison 3.7
|
||||
# PR at https://github.com/GoldenCheetah/GoldenCheetah/pull/3590
|
||||
(fetchpatch {
|
||||
url = "https://github.com/GoldenCheetah/GoldenCheetah/commit/e1f42f8b3340eb4695ad73be764332e75b7bce90.patch";
|
||||
sha256 = "1h0y9vfji5jngqcpzxna5nnawxs77i1lrj44w8a72j0ah0sznivb";
|
||||
})
|
||||
# Included in https://github.com/GoldenCheetah/GoldenCheetah/pull/3590,
|
||||
# which is periodically rebased but pre 3.6 release, as it'll break other CI systems
|
||||
./0001-Fix-building-with-bison-3.7.patch
|
||||
];
|
||||
|
||||
NIX_LDFLAGS = "-lz -lgsl -lblas";
|
||||
|
|
Loading…
Reference in a new issue