Merge pull request #213429 from adamcstephens/cheetah/3.6-rc3

golden-cheetah: 3.6-DEV2111 -> 3.6-RC3
This commit is contained in:
Weijia Wang 2023-01-29 23:17:05 +01:00 committed by GitHub
commit bea4062a62
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 31 additions and 36 deletions

View File

@ -1,24 +1,5 @@
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
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
@ -28,8 +9,8 @@ index 7c5e481b0..142e80a5c 100644
+// generated by the scanner
+%define api.header.include {"DataFilter_yacc.h"}
+
// Symbol can be meta or metric name
%token <leaf> SYMBOL PYTHON
// 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
@ -58,6 +39,21 @@ index 2cbbef9fc..d5c77a779 100644
%pure-parser
%lex-param { void *scanner }
%parse-param { struct JsonContext *jc }
--
2.34.1
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

View File

@ -1,7 +1,7 @@
{ lib, fetchFromGitHub, fetchpatch, mkDerivation
, qtbase, qtsvg, qtserialport, qtwebengine, qtmultimedia, qttools
, qtconnectivity, qtcharts, libusb-compat-0_1, gsl, blas
, bison, flex, zlib, qmake, makeDesktopItem, makeWrapper
, bison, flex, zlib, qmake, makeDesktopItem, wrapQtAppsHook
}:
let
@ -16,13 +16,13 @@ let
};
in mkDerivation rec {
pname = "golden-cheetah";
version = "3.6-DEV2111";
version = "3.6-RC3";
src = fetchFromGitHub {
owner = "GoldenCheetah";
repo = "GoldenCheetah";
rev = "v${version}";
sha256 = "17sk89szvaq31bcv6rgfn1bbw132k7w8zlalfb3ayflavdxbk6sa";
rev = "refs/tags/v${version}";
hash = "sha256-/LGVDeWJZZXy5r5WxElDuxUagpA/RIwHGRbkcdO8IrE=";
};
buildInputs = [
@ -39,7 +39,7 @@ in mkDerivation rec {
gsl
blas
];
nativeBuildInputs = [ flex makeWrapper qmake bison ];
nativeBuildInputs = [ flex wrapQtAppsHook qmake bison ];
patches = [
# allow building with bison 3.7
@ -55,11 +55,10 @@ in mkDerivation rec {
preConfigure = ''
cp src/gcconfig.pri.in src/gcconfig.pri
cp qwt/qwtconfig.pri.in qwt/qwtconfig.pri
echo 'QMAKE_LRELEASE = ${qttools.dev}/bin/lrelease' >> src/gcconfig.pri
echo 'LIBUSB_INSTALL = ${libusb-compat-0_1}' >> src/gcconfig.pri
echo 'LIBUSB_INCLUDE = ${libusb-compat-0_1.dev}/include' >> src/gcconfig.pri
echo 'LIBUSB_LIBS = -L${libusb-compat-0_1}/lib -lusb' >> src/gcconfig.pri
sed -i -e '21,23d' qwt/qwtconfig.pri # Removed forced installation to /usr/local
sed -i 's,^#QMAKE_LRELEASE.*,QMAKE_LRELEASE = ${qttools.dev}/bin/lrelease,' src/gcconfig.pri
sed -i 's,^#LIBUSB_INSTALL.*,LIBUSB_INSTALL = ${libusb-compat-0_1},' src/gcconfig.pri
sed -i 's,^#LIBUSB_INCLUDE.*,LIBUSB_INCLUDE = ${libusb-compat-0_1.dev}/include,' src/gcconfig.pri
sed -i 's,^#LIBUSB_LIBS.*,LIBUSB_LIBS = -L${libusb-compat-0_1}/lib -lusb,' src/gcconfig.pri
'';
installPhase = ''
@ -76,7 +75,7 @@ in mkDerivation rec {
meta = with lib; {
description = "Performance software for cyclists, runners and triathletes";
platforms = platforms.linux;
maintainers = [ ];
maintainers = with maintainers; [ adamcstephens ];
license = licenses.gpl2Plus;
};
}