Commit 3425ac16 authored by gnastyle's avatar gnastyle

flightgear: udpate to 2017.4.4

parent 567f3d3e
pkgbase=flightgear
pkgname=('flightgear' 'flightgear-data')
pkgver=2016.4.3
_pkgver=2016.4
pkgver=2016.4.4
pkgrel=1
_pkgver=${pkgver%.*}
pkgdesc="An open-source, multi-platform flight simulator."
url="http://www.flightgear.org/"
arch=('x86_64')
depends=('fltk' 'libxmu' 'libxi' 'openal' 'openscenegraph' 'zlib' "simgear=$pkgver" 'subversion' 'libxrandr' 'glu')
makedepends=('boost' 'cmake' 'mesa' 'sharutils' "simgear=$pkgver" 'qt5-base')
depends=('fltk' 'libxmu' 'libxi' 'openal' 'openscenegraph' 'zlib' 'subversion' 'libxrandr' 'glu')
makedepends=('boost' 'cmake' 'mesa' 'sharutils' 'qt5-base' 'plib' 'freeglut' 'freealut')
license=('GPL')
url="http://www.flightgear.org/"
screenshot="http://www.flightgear.org/wp-content/gallery/gallery-v2-6/737-300_egkk_hom.jpg"
categories=('games')
options=('!makeflags' '!strip')
source=(# flightgear
source=( #flightgear
"http://downloads.sourceforge.net/project/flightgear/release-$_pkgver/flightgear-$pkgver.tar.bz2"
"sec-fix.patch"
# flightgear-data
"http://downloads.sourceforge.net/project/flightgear/release-$_pkgver/FlightGear-$pkgver-data.tar.bz2"
# addons - global object and sharedmodels (from latest version)
"http://downloads.sourceforge.net/project/flightgear/scenery/GlobalObjects.tgz"
"http://downloads.sourceforge.net/project/flightgear/scenery/SharedModels.tgz")
sha1sums=('4928e3a614bdaaa3539eb70c9b83067939ff62a2'
'a5ad2cb30f58da853a62a6a7474af57df1593f75'
'6eb39b4290ac7d483042157bc4039650671037c7'
'5e7b0ecd30ffffbe47bedc98b090a32f3edc712b'
'f503cbe93b7d6bbd9b7172075bc3d06b39ee569c')
"http://downloads.sourceforge.net/project/flightgear/scenery/SharedModels.tgz"
#simgear
"http://downloads.sourceforge.net/project/flightgear/release-$_pkgver/simgear-$pkgver.tar.bz2")
sha1sums=('187f4b2549030766abf64130c01f08f2993fc803'
'8daec4ca2b46cc9a4b3179c25bc79a0a86745faa'
'786aa46da9eae2fe1d6937716a3982d711e07aad'
'f298354a23e54b0b49d69218828b866ad961f6ca'
'45cf751bbe27b4905a461d309c3ae1fdb651c1a1')
prepare() {
cd $srcdir/flightgear-$pkgver
patch -p1 -i $srcdir/sec-fix.patch
mkdir -p $srcdir/fake_install
}
build() {
#build simgear
cd $srcdir/simgear-$pkgver
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=lib .
make
make DESTDIR=$srcdir/fake_install install
# build flightgear
cd $pkgbase-$pkgver
cd $srcdir/$pkgbase-$pkgver
INCLUDEPATH+=$srcdir/fake_install/usr/include/simgear
LD_PRELOAD=$srcdir/fake_install/usr/lib/{libSimGearCore.a,libSimGearScene.a}
cmake \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib \
-DFG_DATA_DIR:STRING="/usr/share/flightgear/data" .
-DFG_DATA_DIR:STRING="/usr/share/flightgear/data" \
-DSimGear_DIR=$srcdir/fake_install/usr/lib/cmake/SimGear
uudecode -o package/flightgear.png package/flightgear.png.uue
make
sed -i 's|Exec=.*|Exec=fgfs --fg-root=/usr/share/flightgear/data|' package/flightgear.desktop
}
package_flightgear() {
depends=('flightgear-data')
optdepends=('qt5-base: fgfs --launcher')
depends+=('flightgear-data' 'qt5-base')
cd $pkgbase-$pkgver
......
--- a/src/Autopilot/route_mgr.cxx
+++ b/src/Autopilot/route_mgr.cxx
@@ -44,6 +44,7 @@
#include <simgear/timing/sg_time.hxx>
#include <simgear/sg_inlines.h>
+#include <Main/globals.hxx>
#include "Main/fg_props.hxx"
#include "Navaids/positioned.hxx"
#include <Navaids/waypoint.hxx>
@@ -54,6 +55,8 @@
#include "Airports/runways.hxx"
#include <GUI/new_gui.hxx>
#include <GUI/dialog.hxx>
+#include <Main/util.hxx> // fgValidatePath()
+#include <GUI/MessageBox.hxx>
#define RM "/autopilot/route-manager/"
@@ -709,7 +712,21 @@
mgr->loadRoute(path);
} else if (!strcmp(s, "@SAVE")) {
SGPath path(mgr->_pathNode->getStringValue());
- mgr->saveRoute(path);
+ SGPath authorizedPath = fgValidatePath(path, true /* write */);
+
+ if (!authorizedPath.isNull()) {
+ mgr->saveRoute(authorizedPath);
+ } else {
+ std::string msg =
+ "The route manager was asked to write the flightplan to '" +
+ path.utf8Str() + "', but this path is not authorized for writing. " +
+ "Please choose another location, for instance in the $FG_HOME/Export "
+ "folder (" + (globals->get_fg_home() / "Export").utf8Str() + ").";
+
+ SG_LOG(SG_AUTOPILOT, SG_ALERT, msg);
+ modalMessageBox("FlightGear", "Unable to write to the specified file",
+ msg);
+ }
} else if (!strcmp(s, "@NEXT")) {
mgr->jumpToIndex(mgr->currentIndex() + 1);
} else if (!strcmp(s, "@PREVIOUS")) {
pkgname=simgear
pkgver=2016.4.3
_pkgver=2016.4
pkgrel=1
pkgdesc="FOSS libraries for quickly assembling 3d simulations, games, and visualization applications."
arch=('x86_64')
depends=('glu' 'freeglut' 'freealut' 'plib' 'openscenegraph' 'libxrandr')
makedepends=('boost' 'cmake' 'mesa')
license=("GPL")
url="http://flightgear.sourceforge.net/"
options=('!makeflags' 'staticlibs')
source=("http://downloads.sourceforge.net/project/flightgear/release-$_pkgver/simgear-$pkgver.tar.bz2")
sha1sums=('40bbf5674893334ee84cc696c31ad034c6779a76')
build() {
cd $pkgname-$pkgver
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=lib .
make
}
package() {
cd $pkgname-$pkgver
make DESTDIR=$pkgdir install
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment