nixpkgs/pkgs/applications/misc/golden-cheetah/0001-Fix-building-with-bison-3.7.patch
2023-01-29 14:18:48 -05:00

59 lines
1.7 KiB
Diff

diff --git a/src/Core/DataFilter.y b/src/Core/DataFilter.y
index 30070f131..15f746a10 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, metric, variable or function name
%token <string> 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 }
diff --git a/src/gcconfig.pri.in b/src/gcconfig.pri.in
index a280bbb6b..07e543372 100644
--- a/src/gcconfig.pri.in
+++ b/src/gcconfig.pri.in
@@ -75,10 +75,10 @@
# Let us know where flex and bison are installed.
# You may need to specify the full path if things don't work.
-#QMAKE_LEX = flex
-#QMAKE_YACC = bison
+QMAKE_LEX = flex
+QMAKE_YACC = bison
# If you are using bison 3.7 or higher, uncomment the line below
-#QMAKE_MOVE = cp
+QMAKE_MOVE = cp
# If you're compiling with nmake and VC then you
# will likely also use win_flex and win_bison
# so uncomment below