# $FreeBSD$
PORTNAME= flightgear
PORTVERSION= 2018.2.2
PORTVERSION= 2018.3.1
PORTREVISION= 2
CATEGORIES= games
MASTER_SITES= SF/flightgear/release-${PORTVERSION:R}
QT5_CMAKE_ON= -DENABLE_QT:BOOL=ON
QT5_CMAKE_OFF= -DENABLE_QT:BOOL=OFF
QT5_USES= qt:5
QT5_USE= QT=core,buildtools,gui,declarative,network,qmake,widgets
QT5_USE= QT=core,buildtools,gui,declarative,network,qmake,widgets,svg
.include <bsd.port.pre.mk>
TIMESTAMP = 1535914762
TIMESTAMP = 1544037940
SHA256 (flightgear-2018.2.2.tar.bz2) = 61f809ef0a3f6908d156f0c483ed5313d31b5a6ac74761955d0b266751718147
SHA256 (flightgear-2018.3.1.tar.bz2) = 3d4a1f37e4d5cb376c16f02c111aac9d3e6b05529015c7d068ce2c00ecb5a640
SIZE (flightgear-2018.2.2.tar.bz2) = 8346698
SIZE (flightgear-2018.3.1.tar.bz2) = 8404294
Add missing defines and includes from removed ul.h
--- 3rdparty/joystick/js.h.orig 2018-05-30 23:24:08.180090000 +0200
+++ 3rdparty/joystick/js.h 2018-05-30 23:32:04.841896000 +0200
@@ -25,10 +25,20 @@
#define __INCLUDED_JS_H__ 1
#define JS_NEW
+#ifndef TRUE
+#define TRUE 1
+#define FALSE 0
+#endif
+
+#include <fcntl.h>
+#include <sys/param.h>
#include <string>
#include <cstring>
#include <cstdlib>
+#include <simgear/props/props.hxx> /* for jsSetError and SG_WARN */
#define _JS_MAX_AXES 16
#define _JS_MAX_BUTTONS 32
#define _JS_MAX_HATS 4
jsSetError() takes only two arguments (unlike ulSetError())
--- 3rdparty/joystick/jsBSD.cxx.orig 2018-05-28 23:22:56.449679000 +0200
+++ 3rdparty/joystick/jsBSD.cxx 2018-05-28 23:50:32.852422000 +0200
@@ -326,8 +289,8 @@
error = ( joyfile == NULL ) ;
if ( error )
{
- jsSetError ( SG_WARN, "unable to open calibration file %s (%s), joystick %i disabled (you can generate the calibration file with the plib-jscal utility)",
- joyfname, strerror ( errno ), id + 1 );
+ jsSetError ( SG_WARN, "unable to open calibration file, you can generate "
+ "the calibration file with the plib-jscal utility" );
return ;
}
Use all linker flags from pkgconf, including library path
--- CMakeModules/SetupFGFSLibraries.cmake.orig 2018-05-29 23:46:55.859412000 +0200
+++ CMakeModules/SetupFGFSLibraries.cmake 2018-05-29 23:47:59.869522000 +0200
@@ -27,7 +27,7 @@
endif()
if(USE_DBUS)
- target_link_libraries(${target} ${DBUS_LIBRARIES})
+ target_link_libraries(${target} ${DBUS_LDFLAGS})
if(FG_HAVE_GPERFTOOLS)
Fix build with clang 7:
src/AIModel/AIFlightPlanCreatePushBack.cxx:96:48: error: ordered comparison between pointer and zero ('FGTaxiNode *' and 'int')
--- src/AIModel/AIFlightPlanCreatePushBack.cxx.orig 2018-08-17 19:14:25.768512000 +0200
+++ src/AIModel/AIFlightPlanCreatePushBack.cxx 2018-08-17 19:14:44.343865000 +0200
@@ -93,7 +93,7 @@
FGGroundNetwork* groundNet = dep->groundNetwork();
FGParking *parking = gate.parking();
- if (parking && parking->getPushBackPoint() > 0) {
+ if (parking && parking->getPushBackPoint() != nullptr) {
FGTaxiRoute route = groundNet->findShortestRoute(parking, parking->getPushBackPoint(), false);
int size = route.size();
Fix scope of 'stack' when building with clang 7:
error: reference to 'stack' is ambiguous
--- src/FDM/UIUCModel/uiuc_aircraft.h.orig 2018-08-31 19:26:14.641298000 +0200
+++ src/FDM/UIUCModel/uiuc_aircraft.h 2018-08-31 19:50:35.444961000 +0200
@@ -150,7 +150,7 @@
#include "uiuc_parsefile.h"
#include "uiuc_flapdata.h"
-typedef stack :: iterator LIST;
+typedef ::stack :: iterator LIST;
/* Add more keywords here if required*/
enum {init_flag = 1000, geometry_flag, controlSurface_flag, controlsMixer_flag,
--- src/FDM/UIUCModel/uiuc_parsefile.h.orig 2018-08-31 19:34:45.641135000 +0200
+++ src/FDM/UIUCModel/uiuc_parsefile.h 2018-08-31 19:35:35.903930000 +0200
@@ -23,7 +23,7 @@
private:
- stack commands;
+ ::stack commands;
ifstream file;
void readFile();
@@ -37,7 +37,7 @@
void removeComments(string& inputLine);
string getToken(string inputLine, int tokenNo);
void storeCommands(string inputLine);
- stack getCommands();
+ ::stack getCommands();
};
#endif // _PARSE_FILE_H_
--- src/FDM/UIUCModel/uiuc_recorder.cpp.orig 2018-08-31 19:16:32.680030000 +0200
+++ src/FDM/UIUCModel/uiuc_recorder.cpp 2018-08-31 19:16:57.872109000 +0200
@@ -102,7 +102,7 @@
void uiuc_recorder( double dt )
- stack command_list;
+ ::stack command_list;
string linetoken;
// static int init = 0;
static int recordStep = 0;