diff options
author | martymac <martymac@FreeBSD.org> | 2017-01-22 05:23:45 +0800 |
---|---|---|
committer | martymac <martymac@FreeBSD.org> | 2017-01-22 05:23:45 +0800 |
commit | d398fd21edf2f2be422d9d35d069d5902caae483 (patch) | |
tree | bbd6a06423b4d4275bfef3de058e9143dd27757a /games/flightgear | |
parent | 8620b7ac992e113cb718f72a182dd01b70894961 (diff) | |
download | freebsd-ports-gnome-d398fd21edf2f2be422d9d35d069d5902caae483.tar.gz freebsd-ports-gnome-d398fd21edf2f2be422d9d35d069d5902caae483.tar.zst freebsd-ports-gnome-d398fd21edf2f2be422d9d35d069d5902caae483.zip |
Fix build with Clang 4.0.0
PR: 216203
Submitted by: jbeich
Diffstat (limited to 'games/flightgear')
-rw-r--r-- | games/flightgear/Makefile | 1 | ||||
-rw-r--r-- | games/flightgear/files/patch-CLANG_4.txt | 41 |
2 files changed, 42 insertions, 0 deletions
diff --git a/games/flightgear/Makefile b/games/flightgear/Makefile index 02215b750bcf..f924f93d6e61 100644 --- a/games/flightgear/Makefile +++ b/games/flightgear/Makefile @@ -3,6 +3,7 @@ PORTNAME= flightgear PORTVERSION= 2016.4.4 +PORTREVISION= 1 CATEGORIES= games MASTER_SITES= SF/flightgear/release-${PORTVERSION:R} diff --git a/games/flightgear/files/patch-CLANG_4.txt b/games/flightgear/files/patch-CLANG_4.txt new file mode 100644 index 000000000000..b5ae88a2b57d --- /dev/null +++ b/games/flightgear/files/patch-CLANG_4.txt @@ -0,0 +1,41 @@ +Fix build with Clang 4.0 + +--- src/FDM/JSBSim/FGFDMExec.cpp 2017-01-20 21:38:08.784722000 +0000 ++++ src/FDM/JSBSim/FGFDMExec.cpp 2017-01-20 22:55:24.501656000 +0000 +@@ -211,7 +211,7 @@ + + SetGroundCallback(0); + +- if (FDMctr > 0) (*FDMctr)--; ++ if (FDMctr != 0) (*FDMctr)--; + + Debug(1); + } +--- src/FDM/JSBSim/input_output/FGInputSocket.cpp.orig 2017-01-21 20:58:27.676020000 +0100 ++++ src/FDM/JSBSim/input_output/FGInputSocket.cpp 2017-01-21 21:02:08.818597000 +0100 +@@ -192,7 +192,7 @@ + } else { + socket->Reply("Must be in HOLD to search properties\n"); + } +- } else if (node > 0) { ++ } else { + ostringstream buf; + buf << argument << " = " << setw(12) << setprecision(6) << node->getDoubleValue() << endl; + socket->Reply(buf.str()); +--- src/Network/native_ctrls.cxx.orig 2017-01-21 21:06:09.165609000 +0100 ++++ src/Network/native_ctrls.cxx 2017-01-21 21:10:14.120123000 +0100 +@@ -428,10 +428,10 @@ + // node->setDoubleValue( net->brake_right ); + + node = fgGetNode( "/controls/switches", true ); +- node->setBoolValue( "master-bat", net->master_bat > 0 ); +- node->setBoolValue( "master-alt", net->master_alt > 0); +- node->setBoolValue( "master-avionics", net->master_avionics > 0); +- ++ node->setBoolValue( "master-bat", net->master_bat != 0 ); ++ node->setBoolValue( "master-alt", net->master_alt != 0 ); ++ node->setBoolValue( "master-avionics", net->master_avionics > 0 ); ++ + node = fgGetNode( "/environment", true ); + node->setDoubleValue( "wind-speed-kt", net->wind_speed_kt ); + node->setDoubleValue( "wind-from-heading-deg", net->wind_dir_deg ); |