aboutsummaryrefslogtreecommitdiffstats
path: root/testing/flightgear
diff options
context:
space:
mode:
authorThomas Kienlen <kommander@laposte.net>2021-11-12 22:07:16 +0100
committerLeonardo Arena <rnalrd@alpinelinux.org>2021-11-15 07:16:39 +0000
commit0ab53fe0620f9b8ee0e7ee321be3f9b77ff4c913 (patch)
tree596432a6407e68794c829893ee8229121c218d1f /testing/flightgear
parent1e3e8503307b7d73c50c853dfc45be8e94ff6b50 (diff)
downloadaports-0ab53fe0620f9b8ee0e7ee321be3f9b77ff4c913.tar.gz
aports-0ab53fe0620f9b8ee0e7ee321be3f9b77ff4c913.tar.bz2
aports-0ab53fe0620f9b8ee0e7ee321be3f9b77ff4c913.tar.xz
testing/flightgear: upgrade to 2021.3.11
Diffstat (limited to 'testing/flightgear')
-rw-r--r--testing/flightgear/APKBUILD59
-rw-r--r--testing/flightgear/fix-boost.patch13
-rwxr-xr-xtesting/flightgear/flightgear-data-downloader.sh8
-rwxr-xr-xtesting/flightgear/flightgear.post-install2
-rw-r--r--testing/flightgear/musl-fenv.patch19
-rw-r--r--testing/flightgear/musl-fix_backtrace.patch11
-rw-r--r--testing/flightgear/musl-fix_error_h.patch14
-rw-r--r--testing/flightgear/musl-fix_feenableexcept.patch11
-rw-r--r--testing/flightgear/musl-fix_fpos_t.patch17
-rw-r--r--testing/flightgear/musl-fixes.patch83
-rw-r--r--testing/flightgear/musl-include-fcntl.patch10
-rw-r--r--testing/flightgear/time64.patch13
12 files changed, 146 insertions, 114 deletions
diff --git a/testing/flightgear/APKBUILD b/testing/flightgear/APKBUILD
index 59eee7ff09..c50f787f7e 100644
--- a/testing/flightgear/APKBUILD
+++ b/testing/flightgear/APKBUILD
@@ -1,29 +1,43 @@
# Contributor: Leonardo Arena <rnalrd@alpinelinux.org>
-# Maintainer:
+# Maintainer: Thomas Kienlen <kommander@laposte.net>
pkgname=flightgear
-pkgver=2019.1.1
-pkgrel=4
-pkgdesc="Sophisticated flight simulator"
+pkgver=2020.3.11
+_pkgver=${pkgver%.*}
+pkgrel=0
+pkgdesc="Flight Gear Flight Simulator"
url="http://flightgear.org"
-arch="x86_64" # openscenegraph availability
-arch="" # FTBFS, !16887
-license="GPL"
-makedepends="$depends_dev boost-dev cmake curl-dev dbus-dev eudev-dev
- freeglut-dev glew-dev libx11-dev libxi-dev libxmu-dev mesa-dev
- openal-soft-dev openscenegraph-dev plib qt5-qtbase-dev
- qt5-qtdeclarative-dev qt5-qtsvg-dev simgear-dev zlib-dev"
+arch="all !riscv64 !x86 !armhf !armv7" # limited by openscenegraph and build compatibility
+license="GPL-2.0-or-later"
+makedepends="
+ boost-dev cmake curl-dev dbus-dev eudev-dev freeglut-dev glew-dev
+ libexecinfo-dev libx11-dev libxi-dev libxmu-dev mesa-dev openal-soft-dev
+ openscenegraph-dev plib qt5-qtbase-dev qt5-qtdeclarative-dev qt5-qtsvg-dev
+ simgear-dev zlib-dev
+ "
install="$pkgname.post-install"
-subpackages="$pkgname-doc $pkgname-dbg"
+subpackages="
+ $pkgname-dbg
+ $pkgname-doc
+ $pkgname-bash-completion
+ $pkgname-zsh-completion
+ "
options="!check" # FIXME test suite does not get built
-source="https://downloads.sourceforge.net/project/flightgear/release-${pkgver%.[1-9]*}/flightgear-$pkgver.tar.bz2
- musl-fixes.patch
- fix-boost.patch
+source="
+ https://downloads.sourceforge.net/project/flightgear/release-$_pkgver/flightgear-$pkgver.tar.bz2
+ musl-fenv.patch
+ musl-fix_error_h.patch
+ musl-fix_feenableexcept.patch
+ musl-fix_fpos_t.patch
+ musl-include-fcntl.patch
+ musl-fix_backtrace.patch
+ flightgear-data-downloader.sh
"
build() {
cmake \
-D BUILD_TESTING=ON \
-D CMAKE_BUILD_TYPE="Release" \
+ -D CMAKE_EXE_LINKER_FLAGS=-lexecinfo \
-D CMAKE_INSTALL_PREFIX=/usr \
-D CMAKE_INSTALL_SYSCONFDIR=/etc/$pkgname \
-D FG_DATA_DIR=/var/lib/$pkgname \
@@ -38,8 +52,17 @@ check() {
package() {
make DESTDIR="$pkgdir" install
+
+ install -Dm755 "$srcdir"/flightgear-data-downloader.sh "$pkgdir"/usr/bin/flightgear-data-downloader
}
-sha512sums="edcc464af0bde4766e61137211276d77a6bb297567b0168dfaf3b97fdb9a595e5e8a0b84232680fcc975cf195261b9751edb79ae73123333feb31ab3d7215d8c flightgear-2019.1.1.tar.bz2
-3350de9e465dc4f865d2a94d96b2f79b4c98c994fc4713cfa296c20ed12129f310779171b89639f69d1e4f5f0103fca6cc01df5a9e25d77f93a0b4e76f6b973a musl-fixes.patch
-089d02f47595c2ebb97c1ad23691d5393365d738b497c8d4113328215e78505d844cb321e1fd4838c9bc3792a5cad1f83821419f5ad7fbec90769022c3b79854 fix-boost.patch"
+sha512sums="
+9a7c6f262da8daf3d954df7a2a8a96e555f3212c1d949211d0dbddd08a8f7380fa8f4986d60f48e17db563154d250184ee772b79b10277a2c5819fabec3930ee flightgear-2020.3.11.tar.bz2
+81ffb1ecfceae8d4ebb14717fb785118b3c290171245762cb4ab85be769582576147fe1b1b60fe854f4dd8079ebaf913da1585809ba9048d55f8710159c05614 musl-fenv.patch
+b477510a102b0d01859ab39ddf7b5c4bcd3b80aa522320b2128095228b643d5e067dd61f8edbef7df7ed1a35aea647444126ba58eb39a82d294ae8a0f6e808e5 musl-fix_error_h.patch
+29d12098c2581122234188cadd929238c41258bf347de2fcd30dabb46e398d19566e064b2a4267370bf7669c5dcde2c87ef1232b7b1a9ed27ad7885a26378b05 musl-fix_feenableexcept.patch
+3a5d280bcd806fbdeb7b2f92435ffa7b44c420494ae658060624dfa34709a2b36448c1ca8c81bff1e4bb2878fa55200eb69535699062aff5286c7f640fbc3081 musl-fix_fpos_t.patch
+89f871216cac9bf772c6f7a4d12d79ff73a38179547464ffa93ed24394309cb085719c0de5e2a82e2086e994cbf886a8763e4c577fdda476ddbab0e3e3dea4cd musl-include-fcntl.patch
+c9d680759fc163366d352bf7b96850a71303b427b0664a50e6ebc7bb11a2d4910cc18988cbc9c305f8a18307c8c2d739559a9358f7f682b34a5b41a126f35567 musl-fix_backtrace.patch
+8efecffaa9b4445d4915255d18a2b09bf63330c226815d88b070476f7d71c941fa444088f8f641b5c235b509dfd0b4edf8e287aa85830c3306dd5a4a23d64901 flightgear-data-downloader.sh
+"
diff --git a/testing/flightgear/fix-boost.patch b/testing/flightgear/fix-boost.patch
deleted file mode 100644
index c93b226a0c..0000000000
--- a/testing/flightgear/fix-boost.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-Taken from Gentoo
-
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -515,7 +515,7 @@
- set(NOMINMAX 1)
- endif(WIN32)
-
--set (BOOST_CXX_FLAGS "-DBOOST_BIMAP_DISABLE_SERIALIZATION")
-+set (BOOST_CXX_FLAGS "-DBOOST_BIMAP_DISABLE_SERIALIZATION -DBOOST_NO_STDLIB_CONFIG")
-
- # append the SIMD flags if requested
- if (ENABLE_SIMD)
diff --git a/testing/flightgear/flightgear-data-downloader.sh b/testing/flightgear/flightgear-data-downloader.sh
new file mode 100755
index 0000000000..14023b0094
--- /dev/null
+++ b/testing/flightgear/flightgear-data-downloader.sh
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+FGDATA_VERSION=2020.3.11
+RELEASE_BRANCH=${FGDATA_VERSION%.*}
+
+echo "Downloading Flightgear data (version $FGDATA_VERSION) ..."
+curl -L https://sourceforge.net/projects/flightgear/files/release-$RELEASE_BRANCH/FlightGear-$FGDATA_VERSION-data.txz/download | tar -xJ --strip-components=1 -C /var/lib/flightgear -f -
+echo 'Done.'
diff --git a/testing/flightgear/flightgear.post-install b/testing/flightgear/flightgear.post-install
index 595cb797be..7b3fdf69fa 100755
--- a/testing/flightgear/flightgear.post-install
+++ b/testing/flightgear/flightgear.post-install
@@ -8,3 +8,5 @@ echo " and extract it in /var/lib/flightgear"
echo " before running the program or change its location"
echo " by setting the variable FG_ROOT"
echo
+echo " (You may use the script /usr/bin/flightgear-data-downloader)"
+echo
diff --git a/testing/flightgear/musl-fenv.patch b/testing/flightgear/musl-fenv.patch
new file mode 100644
index 0000000000..8a0922f57d
--- /dev/null
+++ b/testing/flightgear/musl-fenv.patch
@@ -0,0 +1,19 @@
+Simply disabling the code which enables floating point exceptions
+is probably wrong, but I don't have a replacement for the
+non-posix functions fegetexcept(3) and feenableexcept(3).
+
+--- a/src/Main/bootstrap.cxx 2015-02-18 21:10:05.000000000 +0100
++++ b/src/Main/bootstrap.cxx 2015-11-01 01:25:56.665212195 +0100
+@@ -96,8 +96,12 @@
+ initFPE (bool fpeAbort)
+ {
++#if defined(__GLIBC__)
+ if (fpeAbort) {
+ int except = fegetexcept();
+ feenableexcept(except | FE_DIVBYZERO | FE_INVALID);
+ } else {
+ signal(SIGFPE, handleFPE);
+ }
++#else
++ signal(SIGFPE, handleFPE);
++#endif
diff --git a/testing/flightgear/musl-fix_backtrace.patch b/testing/flightgear/musl-fix_backtrace.patch
new file mode 100644
index 0000000000..ddf8af58ac
--- /dev/null
+++ b/testing/flightgear/musl-fix_backtrace.patch
@@ -0,0 +1,11 @@
+--- a/src/Main/bootstrap.cxx
++++ b/src/Main/bootstrap.cxx
+@@ -159,7 +159,7 @@ void segfault_handler(int signo) {
+
+ fprintf(stderr, "Error: caught signal %d:\n", signo);
+
+- #ifndef __OpenBSD__
++ #if defined(__GLIBC__)
+ size = backtrace(array, 128);
+ if (size) {
+ char** list = backtrace_symbols(array, size);
diff --git a/testing/flightgear/musl-fix_error_h.patch b/testing/flightgear/musl-fix_error_h.patch
new file mode 100644
index 0000000000..587ee1f530
--- /dev/null
+++ b/testing/flightgear/musl-fix_error_h.patch
@@ -0,0 +1,14 @@
+There is no <error.h> in musl libc, thus enable the
+include only if __GLIB__ is defined.
+
+--- a/3rdparty/iaxclient/lib/libiax2/src/iax.c 2015-02-18 21:10:05.000000000 +0100
++++ b/3rdparty/iaxclient/lib/libiax2/src/iax.c 2015-10-31 17:14:55.477461723 +0100
+@@ -75,7 +75,7 @@
+ // FlightGear: Modified to include FreeBSD
+ #if !defined(MACOSX) && !defined(__OpenBSD__) && !defined(__FreeBSD__)
+ #include <malloc.h>
+-#if !defined(SOLARIS)
++#if !defined(SOLARIS) && defined(__GLIBC__)
+ #include <error.h>
+ #endif
+ #endif
diff --git a/testing/flightgear/musl-fix_feenableexcept.patch b/testing/flightgear/musl-fix_feenableexcept.patch
new file mode 100644
index 0000000000..9d456a2d28
--- /dev/null
+++ b/testing/flightgear/musl-fix_feenableexcept.patch
@@ -0,0 +1,11 @@
+--- a/src/FDM/JSBSim/JSBSim.cpp 2017-03-01 21:06:31.000000000 +0100
++++ b/src/FDM/JSBSim/JSBSim.cpp 2017-03-17 09:49:13.115544107 +0100
+@@ -287,7 +287,7 @@
+ _clearfp();
+ _controlfp(_controlfp(0, 0) & ~(_EM_INVALID | _EM_ZERODIVIDE | _EM_OVERFLOW),
+ _MCW_EM);
+-#elif defined(__GNUC__) && !defined(sgi) && !defined(__APPLE__)
++#elif defined(__GNUC__) && !defined(sgi) && !defined(__APPLE__) && defined(__GLIBC__)
+ feenableexcept(FE_DIVBYZERO | FE_INVALID);
+ #endif
+
diff --git a/testing/flightgear/musl-fix_fpos_t.patch b/testing/flightgear/musl-fix_fpos_t.patch
new file mode 100644
index 0000000000..c3f709b064
--- /dev/null
+++ b/testing/flightgear/musl-fix_fpos_t.patch
@@ -0,0 +1,17 @@
+For musl libc return the file position using
+ftell(3) because fpos_t is opaque.
+
+--- a/3rdparty/hts_engine_API/lib/HTS_misc.c 2015-02-18 21:10:05.000000000 +0100
++++ b/3rdparty/hts_engine_API/lib/HTS_misc.c 2015-10-31 17:33:53.946349145 +0100
+@@ -247,8 +247,10 @@
+ fgetpos((FILE *) fp->pointer, &pos);
+ #if defined(_WIN32) || defined(__CYGWIN__) || defined(__APPLE__) || defined(__ANDROID__) || defined(__FreeBSD__)
+ return (size_t) pos;
+-#else
++#elif defined(__GLIBC__)
+ return (size_t) pos.__pos;
++#else
++ return (size_t) ftell(fp->pointer);
+ #endif /* _WIN32 || __CYGWIN__ || __APPLE__ || __ANDROID__ */
+ }
+ HTS_error(0, "HTS_ftell: Unknown file type.\n");
diff --git a/testing/flightgear/musl-fixes.patch b/testing/flightgear/musl-fixes.patch
deleted file mode 100644
index c72ea90c78..0000000000
--- a/testing/flightgear/musl-fixes.patch
+++ /dev/null
@@ -1,83 +0,0 @@
-Simply disabling the code which enables floating point exceptions
-is probably wrong, but I don't have a replacement for the
-non-posix functions fegetexcept(3) and feenableexcept(3).
-
---- a/src/Main/bootstrap.cxx 2015-02-18 21:10:05.000000000 +0100
-+++ b/src/Main/bootstrap.cxx 2015-11-01 01:25:56.665212195 +0100
-@@ -96,8 +96,12 @@
- initFPE (bool fpeAbort)
- {
-+#if defined(__GLIBC__)
- if (fpeAbort) {
- int except = fegetexcept();
- feenableexcept(except | FE_DIVBYZERO | FE_INVALID);
- } else {
- signal(SIGFPE, handleFPE);
- }
-+#else
-+ signal(SIGFPE, handleFPE);
-+#endif
-There is no <error.h> in musl libc, thus enable the
-include only if __GLIB__ is defined.
-
---- a/3rdparty/iaxclient/lib/libiax2/src/iax.c 2015-02-18 21:10:05.000000000 +0100
-+++ b/3rdparty/iaxclient/lib/libiax2/src/iax.c 2015-10-31 17:14:55.477461723 +0100
-@@ -75,7 +75,7 @@
- // FlightGear: Modified to include FreeBSD
- #if !defined(MACOSX) && !defined(__OpenBSD__) && !defined(__FreeBSD__)
- #include <malloc.h>
--#if !defined(SOLARIS)
-+#if !defined(SOLARIS) && defined(__GLIBC__)
- #include <error.h>
- #endif
- #endif
---- a/src/Main/bootstrap.cxx 2017-03-17 09:52:07.474706542 +0100
-+++ b/src/Main/bootstrap.cxx 2017-03-17 09:53:40.361793507 +0100
-@@ -141,7 +141,7 @@
- }
- #endif
-
--#if defined(__GNUC__)
-+#if defined(__GNUC__) && defined(__GLIBC__)
- #include <execinfo.h>
- #include <cxxabi.h>
- void segfault_handler(int signo) {
-@@ -244,8 +244,10 @@
-
- signal(SIGPIPE, SIG_IGN);
- # ifndef NDEBUG
-+# ifdef __GLIBC__
- signal(SIGSEGV, segfault_handler);
- # endif
-+# endif
- #endif
-
- _bootstrap_OSInit = 0;
---- a/src/FDM/JSBSim/JSBSim.cpp 2017-03-01 21:06:31.000000000 +0100
-+++ b/src/FDM/JSBSim/JSBSim.cpp 2017-03-17 09:49:13.115544107 +0100
-@@ -287,7 +287,7 @@
- _clearfp();
- _controlfp(_controlfp(0, 0) & ~(_EM_INVALID | _EM_ZERODIVIDE | _EM_OVERFLOW),
- _MCW_EM);
--#elif defined(__GNUC__) && !defined(sgi) && !defined(__APPLE__)
-+#elif defined(__GNUC__) && !defined(sgi) && !defined(__APPLE__) && defined(__GLIBC__)
- feenableexcept(FE_DIVBYZERO | FE_INVALID);
- #endif
-
-For musl libc return the file position using
-ftell(3) because fpos_t is opaque.
-
---- a/3rdparty/hts_engine_API/lib/HTS_misc.c 2015-02-18 21:10:05.000000000 +0100
-+++ b/3rdparty/hts_engine_API/lib/HTS_misc.c 2015-10-31 17:33:53.946349145 +0100
-@@ -247,8 +247,10 @@
- fgetpos((FILE *) fp->pointer, &pos);
- #if defined(_WIN32) || defined(__CYGWIN__) || defined(__APPLE__) || defined(__ANDROID__) || defined(__FreeBSD__)
- return (size_t) pos;
--#else
-+#elif defined(__GLIBC__)
- return (size_t) pos.__pos;
-+#else
-+ return (size_t) ftell(fp->pointer);
- #endif /* _WIN32 || __CYGWIN__ || __APPLE__ || __ANDROID__ */
- }
- HTS_error(0, "HTS_ftell: Unknown file type.\n");
diff --git a/testing/flightgear/musl-include-fcntl.patch b/testing/flightgear/musl-include-fcntl.patch
new file mode 100644
index 0000000000..1f3e0f8234
--- /dev/null
+++ b/testing/flightgear/musl-include-fcntl.patch
@@ -0,0 +1,10 @@
+--- a/src/Navaids/NavDataCache.cxx
++++ b/src/Navaids/NavDataCache.cxx
+@@ -31,6 +31,7 @@
+ #include <stdint.h> // for int64_t
+ #include <sstream> // for std::ostringstream
+ #include <mutex>
++#include <fcntl.h>
+
+ #ifdef SYSTEM_SQLITE
+ // the standard sqlite3.h doesn't give a way to set SQLITE_UINT64_TYPE,
diff --git a/testing/flightgear/time64.patch b/testing/flightgear/time64.patch
new file mode 100644
index 0000000000..367f884452
--- /dev/null
+++ b/testing/flightgear/time64.patch
@@ -0,0 +1,13 @@
+--- a/src/Input/FGLinuxEventInput.cxx 2020-06-26 00:08:15.000000000 +0200
++++ b/src/Input/FGLinuxEventInput.cxx 2020-12-07 07:51:45.332825252 +0100
+@@ -415,8 +415,8 @@
+ evt.type=typeCode.type;
+ evt.code = typeCode.code;
+ evt.value = (long)value;
+- evt.time.tv_sec = 0;
+- evt.time.tv_usec = 0;
++ evt.input_event_sec = 0;
++ evt.input_event_usec = 0;
+ size_t bytes_written = write(fd, &evt, sizeof(evt));
+
+ if( bytes_written == sizeof(evt) )