diff --git a/dev-games/simgear/Manifest b/dev-games/simgear/Manifest new file mode 100644 index 0000000..8080641 --- /dev/null +++ b/dev-games/simgear/Manifest @@ -0,0 +1,5 @@ +AUX 0001-check-to-be-sure-that-n-is-not-being-set-as-format-t.patch 1133 BLAKE2B c149bd4d1be4038bbbd18627755947542f72d9f80314555bd2749d0c7ba6a859bba8237bc1a295661ca5d1ba4cf698ecf72dce55cb9b3c343d95cb9cb8a08eec SHA512 11e5bc51ad5452c0f09d3953d67262e0a646478f1b4bc29e782b87802f9b48712bc033364e36a250b7272ad363ad911d2fe51cb3dc509171c50fe9b2f3ecf90d +AUX 0002-fix-support-for-aarch64.patch 819 BLAKE2B 54ad2da897398ae39864b04b156ee784f9a9a325ebea702c590d5029671135035ac95b645e7a5d0f0d75d4a91c935039add3124755199899b49d40a4fb1a6d08 SHA512 f21c22adff9bda15142281c349adacda8b223399831d320a2c0b2d38af4741e486bc5a701e470a12ed981599e526a877e974ef105aea668b9410c448f29903af +AUX simgear-2024.1.3-boost.patch 426 BLAKE2B 98d01e06980e4b9506d54f10edb3f71aa3e12b7dfcd1fcd61f2fb46d1b65cd4ad4a5694fde5705f5b1d40a82a3dc7eff341c6275d7ea657273fd31857657685e SHA512 d9ddf1da745132de3fb2c101ebb284028b272989998fed971aa03cd67ea5137bfe3641a1fc6eb80e23ccd5517c09246a7cae45489633356d51ac4f457e0e873d +DIST simgear-2024.1.3.tar.bz2 1783857 BLAKE2B d4a6227ea74afdac8767280eacecc43cd80b8f28dbe54fec0d27a18936008ba71804438e86a81c4a01a66d9b66d9a4a050552281e0943638daa63f1faf0f68ee SHA512 23d97b9837fe67f35a0bdb6f8e6e466fdfc7774762d0c6006d6fec4f472bde1654571532bf9bc5cee8dd35c3a362727b347474ea605d4c87939edd8511e6fea7 +EBUILD simgear-2024.1.3.ebuild 1584 BLAKE2B 4f544bfdcf217349e061bbb5ca713f140d038378fbf3bf3ce45c8a0a538d83c73b0e4bc1ecac462c1fbc2f206ecb4bbf5a007d94adb01a927664493d0ef89edf SHA512 e5f4191225fb367d92cfb1d2767ce3eac1b76af804db915fdf5e13ce9a08143e63101791fac6d63de493db9b6abfdb231ef46cbfc37d9e7d11d49fef3224ba9a diff --git a/dev-games/simgear/files/0001-check-to-be-sure-that-n-is-not-being-set-as-format-t.patch b/dev-games/simgear/files/0001-check-to-be-sure-that-n-is-not-being-set-as-format-t.patch new file mode 100644 index 0000000..fb31de6 --- /dev/null +++ b/dev-games/simgear/files/0001-check-to-be-sure-that-n-is-not-being-set-as-format-t.patch @@ -0,0 +1,34 @@ +From 9465f10110e02686b3f8a860520a7e8f3c6a7936 Mon Sep 17 00:00:00 2001 +From: Fabrice Bellet +Date: Sun, 22 Sep 2013 11:56:12 +0200 +Subject: [PATCH 0/1] check to be sure that %n is not being set as format type + (CVE-2012-2090) + +--- + simgear/scene/model/SGText.cxx | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +diff --git a/simgear/scene/model/SGText.cxx b/simgear/scene/model/SGText.cxx +index 08e84439..bc673511 100644 +--- a/simgear/scene/model/SGText.cxx ++++ b/simgear/scene/model/SGText.cxx +@@ -73,6 +73,16 @@ void SGText::UpdateCallback::operator()(osg::Node * node, osg::NodeVisitor *nv ) + // FIXME: + // hopefully the users never specifies bad formats here + // this should better be something more robust ++ // It is never safe for format.c_str to be %n. ++ string unsafe ("%n"); ++ size_t found; ++ ++ found=format.find(unsafe); ++ if (found!=string::npos) { ++ SG_LOG(SG_GENERAL, SG_ALERT, "format type contained %n, but this is unsafe, reverting to %s"); ++ format = "%s"; ++ } ++ + char buf[256]; + if( numeric ) { + double d = property->getDoubleValue() * scale + offset; +-- +2.48.1 + diff --git a/dev-games/simgear/files/0002-fix-support-for-aarch64.patch b/dev-games/simgear/files/0002-fix-support-for-aarch64.patch new file mode 100644 index 0000000..e83856a --- /dev/null +++ b/dev-games/simgear/files/0002-fix-support-for-aarch64.patch @@ -0,0 +1,25 @@ +From 560be7700e03b20e5f252fed371ac14a0e7a7c17 Mon Sep 17 00:00:00 2001 +From: Fabrice Bellet +Date: Fri, 19 Feb 2016 15:57:19 +0100 +Subject: [PATCH 1/1] fix support for aarch64 + +--- + simgear/nasal/naref.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/simgear/nasal/naref.h b/simgear/nasal/naref.h +index 21f766f5..7e269a1f 100644 +--- a/simgear/nasal/naref.h ++++ b/simgear/nasal/naref.h +@@ -18,7 +18,7 @@ + # endif + #elif defined(_M_IX86) || defined(__i386) || defined(__x86_64) || \ + defined(__ia64__) || defined(_M_IA64) || defined(__ARMEL__) || \ +- defined(_M_X64) || defined(_M_ARM) || \ ++ defined(_M_X64) || defined(_M_ARM) || defined(__aarch64__) || \ + defined(__e2k__) + # define NASAL_LE + #elif defined(__sparc) || defined(__ARMEB__) || \ +-- +2.48.1 + diff --git a/dev-games/simgear/files/simgear-2024.1.3-boost.patch b/dev-games/simgear/files/simgear-2024.1.3-boost.patch new file mode 100644 index 0000000..97485a2 --- /dev/null +++ b/dev-games/simgear/files/simgear-2024.1.3-boost.patch @@ -0,0 +1,13 @@ +diff --git a/simgear/nasal/cppbind/NasalHash.hxx b/simgear/nasal/cppbind/NasalHash.hxx +index 54efc2c5194f9c6fa8c52a528aff56228c576d90..1734adf682e0614671675c5dad2f9dfd5d91838d 100644 +--- a/simgear/nasal/cppbind/NasalHash.hxx ++++ b/simgear/nasal/cppbind/NasalHash.hxx +@@ -5,6 +5,8 @@ + #ifndef SG_NASAL_HASH_HXX_ + #define SG_NASAL_HASH_HXX_ + ++#include ++ + #include "from_nasal.hxx" + #include "to_nasal.hxx" + diff --git a/dev-games/simgear/simgear-2024.1.3.ebuild b/dev-games/simgear/simgear-2024.1.3.ebuild new file mode 100644 index 0000000..0164221 --- /dev/null +++ b/dev-games/simgear/simgear-2024.1.3.ebuild @@ -0,0 +1,66 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake + +DESCRIPTION="Development library for simulation games" +HOMEPAGE="https://www.flightgear.org/" +#SRC_URI="https://gitlab.com/flightgear/fgmeta/-/jobs/9264813015/artifacts/raw/sgbuild/${P}.tar.bz2" +SRC_URI="https://gitlab.com/flightgear/simgear/-/archive/${PV}/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="cpu_flags_x86_sse2 debug ffmpeg gdal subversion test" +RESTRICT="!test? ( test )" + +# TODO AeonWave, CycloneDDS +COMMON_DEPEND=" + app-arch/xz-utils + dev-libs/expat + dev-games/openscenegraph + media-libs/openal + net-libs/udns + net-misc/curl + virtual/zlib:= + virtual/opengl + ffmpeg? ( media-video/ffmpeg:0 ) + gdal? ( sci-libs/gdal:= ) +" +DEPEND="${COMMON_DEPEND} + dev-libs/boost +" +RDEPEND="${COMMON_DEPEND} + subversion? ( dev-vcs/subversion ) +" + +PATCHES=( + "${FILESDIR}/0001-check-to-be-sure-that-n-is-not-being-set-as-format-t.patch" + "${FILESDIR}/0002-fix-support-for-aarch64.patch" + "${FILESDIR}/${P}-boost.patch" +) + +src_configure() { + local mycmakeargs=( + -DENABLE_ASAN=OFF + -DENABLE_CYCLONE=OFF + -DENABLE_GDAL=$(usex gdal) + -DENABLE_PKGUTIL=ON + -DENABLE_RTI=OFF + -DENABLE_SIMD=$(usex cpu_flags_x86_sse2) + -DENABLE_SOUND=ON + -DENABLE_TESTS=$(usex test) + -DENABLE_TSAN=OFF + -DENABLE_VIDEO_RECORD=$(usex ffmpeg) + -DSIMGEAR_HEADLESS=OFF + -DSIMGEAR_SHARED=ON + -DSYSTEM_EXPAT=ON + -DSYSTEM_UDNS=ON + -DUSE_AEONWAVE=OFF + -DUSE_OPENALSOFT=ON + -DOSG_FSTREAM_EXPORT_FIXED=OFF # TODO perhaps track it + ) + cmake_src_configure +} diff --git a/games-simulation/flightgear-data/Manifest b/games-simulation/flightgear-data/Manifest new file mode 100644 index 0000000..8209dde --- /dev/null +++ b/games-simulation/flightgear-data/Manifest @@ -0,0 +1,2 @@ +DIST FlightGear-2024.1.3-data.txz 1883164948 BLAKE2B 8749efac5b2b149844e78bf4acb8896e4d9513c938cfbffce1b50dee78460988ea57426b2c97d5142ea27ff25c0c1d41fc538e6f85169f353188b1b1064ed7f3 SHA512 f7e537d82dd1baa65ae96d69a357ccda5b98056d81c1d88e7588358aaddc84f1f5bb0d53b913d7a50038a823e3f4217d2689961c459f7cd92a00a0086cbe27c0 +EBUILD flightgear-data-2024.1.3.ebuild 442 BLAKE2B 181628ac63884adc4cb60a6cad0a53fbc4563f7a0ec83e0fc5a6f74a117677396f7c5afeda563320d2feb92ecd219bf0de10a724d888df8269da5aaec3e289e8 SHA512 8dff86dee6da9c9a1d408280e46c95be4c2aed9ec3eafe0f82ebd73f137d9ff20ca0b9590febfe9741ecc2c8ae54bc1eab777ab6da8435ce6a99242bdbf93707 diff --git a/games-simulation/flightgear-data/flightgear-data-2024.1.3.ebuild b/games-simulation/flightgear-data/flightgear-data-2024.1.3.ebuild new file mode 100644 index 0000000..470dc91 --- /dev/null +++ b/games-simulation/flightgear-data/flightgear-data-2024.1.3.ebuild @@ -0,0 +1,20 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DESCRIPTION="FlightGear data files" +HOMEPAGE="https://www.flightgear.org/" +SRC_URI="https://download.flightgear.org/release-2024.1/FlightGear-${PV}-data.txz" + +S=${WORKDIR}/fgdata_$(ver_cut 1)_$(ver_cut 2) + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +src_install() { + insinto /usr/share/flightgear + rm -fr .git + doins -r * +} diff --git a/games-simulation/flightgear/Manifest b/games-simulation/flightgear/Manifest new file mode 100644 index 0000000..b1b5bcd --- /dev/null +++ b/games-simulation/flightgear/Manifest @@ -0,0 +1,10 @@ +AUX 0001-check-to-be-sure-that-n-is-not-being-set-as-format-t.patch 1260 BLAKE2B 7131a66b00ab68200d6c32e0531ab7e4a5cf5272ab179a46d523c40681b276cb589083fc19ac41ec3d747fc557351a9c85b107e73c6d00cb2ab0643b2227a831 SHA512 3210bc1732f77452dfbab6d9fcc94a50438c63c49dac835970c06bc0ed6731131e8236f1d9bd2a358ccf1272be1fcffd84d0bba08d49f61d73231e247cc99887 +AUX 0003-make-fglauncher-a-static-library.patch 728 BLAKE2B a5fe82c7427cad26f5c0a468ea16e160ac0552a8ef5367e34b364316afb1ffa4cb37c6ec9190285454861522815533f4626116d117e56f5bf764e3b34506de17 SHA512 6dbcf270fc8e26f23524d0e00d1a5379cc734c096fc573252b46335dc9babe7c374d464680ca62606bff3b59a60ab33d3a72a754978b7ddc45def4a32486864b +AUX 0005-make-fgqmlui-a-static-library.patch 736 BLAKE2B 45707585fac5e62218d6db628f85cb2214ed0a0c64a2f9f151a02534770eb92d01feea08b288ed47a771c0ad794bce3d998695b7b88357836d28a284675fdd17 SHA512 025f72635a2a2829e336dfd6aa077e410586dab0a5776dd1915884aea026ee5708613ece651d1361f7221ce9b300b63de6a5ec25f4cff5ff8e11445fbe02e011 +AUX 0006-fgviewer-fix-crash-on-exit.patch 880 BLAKE2B 5b4e1b8c0a94901e55bda053efb78a032daa8caba1ae65b1b4d73be9ed508ef68098827e7108a376a021f4fed256f062e35a6f8f6c36832af2a90a6a8b2a92dd SHA512 746a78604261f37b62d4140d2142defec8bae85099092684111f2ee946f4ca93df5faf88d9992afa4abcc3499712494473dbf03915d437475e2159568e97104d +AUX ac3d.vim 45 BLAKE2B 04a6e4c70a8be0f7d996f1192289cc05012d4b4cc82a56a14b5d6d2dd7aae8f23f1cd853d29d071a0b9691cf5b8e8b262355b40752f43bccaa318065992d709b SHA512 b691585c6772222525b7f2d67ed41431663400930d9c7deed843a6abe50f67b517bd3180026a0cfe949df29036a49bcaf33ab759dd958ae64d550c271150a7da +AUX flightgear-2024.1.1-cmake.patch 2058 BLAKE2B 8a06322ef30df8e48c6d161c52193d6fd0da41515a24ea6e0850005a7d08b96efbd7d147f5e9b30e1e5421cc25ed4e51fc07318b93e5b8e241ca0d59eb112ca6 SHA512 a1bf34961f2d2740514ed5df78aa8b085e3a83689b8459c016a9bd04e01308b7208366af24885452d95668ae44f4436d84260adb18e42154fde1ce5f9786c884 +AUX flightgear-2024.1.1-fix-fgpanel.patch 28887 BLAKE2B 34f975aee6923a7d5190565411e9884813c3cdf5a67766b4755bee189605803ae48b993ee5245c40b25136fb3e9c92a1c654d070682b92905ae18909448d5e72 SHA512 78bfd041ec0fb4a74509c4f95e44a580d1786388da2a0207678df4ef17ba53de194ddb0add3fac93db80bc879dde99282f7cfcde7bc2d647dad4f6d65ebaa9de +AUX nasal.vim 47 BLAKE2B c3809ad7297d5811ff0b4a004295cd8e7a0984d30acc5790e5c05f5aa400c4c0723e480256e26627f67969a85e9ed91706fae9d9807e19e0566b32339a41031b SHA512 1edfa24fabbaae5037c8c521052d7013f3b29d2933d79a8381593121115229df6764219614d8d06b4058eb93cf84d9cc75773fd0864fd7a6e2aebd811e9d1afb +DIST flightgear-2024.1.3.tar.bz2 9772071 BLAKE2B 46ca22f7fb9d7b7c827ee36fb168ac0e3c637abbbbf37179da9d6dbf1b88a58737a4346a295204b6b78eb2dc618bcc7756dca7aee83ecad77c9faf783885973b SHA512 85c92e413f48e95be75bc96b82414c658ecfad902d606ba1ff31281e7ac6833b6b5630b7c29f3b0a266ef2f266563092c740b6a56470801f0085941e07a2ffa6 +EBUILD flightgear-2024.1.3.ebuild 4686 BLAKE2B ee71438c0eb7b9dffc75705af66f2801db32f92502e5839d34b40d7981b8ac688c0c2e2c2f7f93e282dda6c2b3e8c7392c91cee4825b289aea84d600c1f1760f SHA512 1c255fd4e1d0cc7bdca4b0ddd0cbfd5007213c80917e7f24976349a5190529820349be1a7becc569b9103ab38c0320282d2d4c3f0b98b4471ec7509f14a56061 diff --git a/games-simulation/flightgear/files/0001-check-to-be-sure-that-n-is-not-being-set-as-format-t.patch b/games-simulation/flightgear/files/0001-check-to-be-sure-that-n-is-not-being-set-as-format-t.patch new file mode 100644 index 0000000..1cf5e6b --- /dev/null +++ b/games-simulation/flightgear/files/0001-check-to-be-sure-that-n-is-not-being-set-as-format-t.patch @@ -0,0 +1,33 @@ +From 609b73ec6941321b157afb236f86c943f959a845 Mon Sep 17 00:00:00 2001 +From: Fabrice Bellet +Date: Sun, 22 Sep 2013 12:19:18 +0200 +Subject: [PATCH] check to be sure that %n is not being set as format type + (CVE-2012-2090) + +--- + src/Environment/fgclouds.cxx | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/src/Environment/fgclouds.cxx b/src/Environment/fgclouds.cxx +index 043cbb007..a57c529d8 100644 +--- a/src/Environment/fgclouds.cxx ++++ b/src/Environment/fgclouds.cxx +@@ -218,6 +218,15 @@ void FGClouds::buildLayer(int iLayer, const string& name, double coverage) { + double count = acloud->getDoubleValue("count", 1.0); + tCloudVariety[CloudVarietyCount].count = count; + int variety = 0; ++ // It is never safe for cloud_name.c_str to be %n. ++ string unsafe ("%n"); ++ size_t found; ++ ++ found=cloud_name.find(unsafe); ++ if (found!=string::npos) { ++ SG_LOG(SG_GENERAL, SG_ALERT, "format type contained %n, but this is unsafe , ignore it"); ++ continue; ++ } + char variety_name[50]; + do { + variety++; +-- +2.48.1 + diff --git a/games-simulation/flightgear/files/0003-make-fglauncher-a-static-library.patch b/games-simulation/flightgear/files/0003-make-fglauncher-a-static-library.patch new file mode 100644 index 0000000..a205953 --- /dev/null +++ b/games-simulation/flightgear/files/0003-make-fglauncher-a-static-library.patch @@ -0,0 +1,25 @@ +From 00de7fd687bdc7ab7c679678f3a523d2038b7d8f Mon Sep 17 00:00:00 2001 +From: Fabrice Bellet +Date: Tue, 17 Feb 2015 23:00:29 +0100 +Subject: [PATCH] make fglauncher a static library + +--- + src/GUI/CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/GUI/CMakeLists.txt b/src/GUI/CMakeLists.txt +index f4fc01a6e..0a0bd3398 100644 +--- a/src/GUI/CMakeLists.txt ++++ b/src/GUI/CMakeLists.txt +@@ -104,7 +104,7 @@ if (HAVE_QT) + + + +- add_library(fglauncher QtLauncher.cxx ++ add_library(fglauncher STATIC QtLauncher.cxx + QtLauncher.hxx + SettingsWrapper.hxx + LauncherMainWindow.hxx +-- +2.48.1 + diff --git a/games-simulation/flightgear/files/0005-make-fgqmlui-a-static-library.patch b/games-simulation/flightgear/files/0005-make-fgqmlui-a-static-library.patch new file mode 100644 index 0000000..450a701 --- /dev/null +++ b/games-simulation/flightgear/files/0005-make-fgqmlui-a-static-library.patch @@ -0,0 +1,25 @@ +From 5cd88182e3b8f3e011be53a307cbf981dbb97836 Mon Sep 17 00:00:00 2001 +From: Fabrice Bellet +Date: Sun, 8 Apr 2018 18:03:30 +0200 +Subject: [PATCH] make fgqmlui a static library + +--- + src/GUI/CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/GUI/CMakeLists.txt b/src/GUI/CMakeLists.txt +index 0a0bd3398..34a1e1f2d 100644 +--- a/src/GUI/CMakeLists.txt ++++ b/src/GUI/CMakeLists.txt +@@ -185,7 +185,7 @@ if (HAVE_QT) + Qt${QT_VERSION_MAJOR}::Svg + SimGearCore) + +- add_library(fgqmlui ++ add_library(fgqmlui STATIC + PropertyItemModel.cxx + PropertyItemModel.hxx + FGQmlInstance.cxx +-- +2.48.1 + diff --git a/games-simulation/flightgear/files/0006-fgviewer-fix-crash-on-exit.patch b/games-simulation/flightgear/files/0006-fgviewer-fix-crash-on-exit.patch new file mode 100644 index 0000000..a93c6e0 --- /dev/null +++ b/games-simulation/flightgear/files/0006-fgviewer-fix-crash-on-exit.patch @@ -0,0 +1,29 @@ +From 95101b6fedaa332c70caca15a8fc762355d499b3 Mon Sep 17 00:00:00 2001 +From: Fabrice Bellet +Date: Wed, 7 Jun 2017 09:19:06 +0200 +Subject: [PATCH] fgviewer: fix crash on exit + +--- + utils/fgviewer/fgviewer.cxx | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git a/utils/fgviewer/fgviewer.cxx b/utils/fgviewer/fgviewer.cxx +index 1af450e96..c5628cef8 100644 +--- a/utils/fgviewer/fgviewer.cxx ++++ b/utils/fgviewer/fgviewer.cxx +@@ -271,5 +271,11 @@ main(int argc, char** argv) + // Note that this does not affect the hla camera manipulator + viewer.home(); + +- return viewer.run(); ++ int result = viewer.run(); ++ ++ // clear cache now, since it contains SimGear objects. Otherwise SG_LOG ++ // calls during shutdown will cause crashes. ++ osgDB::Registry::instance()->clearObjectCache(); ++ ++ return result; + } +-- +2.48.1 + diff --git a/games-simulation/flightgear/files/ac3d.vim b/games-simulation/flightgear/files/ac3d.vim new file mode 100644 index 0000000..6477d94 --- /dev/null +++ b/games-simulation/flightgear/files/ac3d.vim @@ -0,0 +1 @@ +au BufRead,BufNewFile *.ac set filetype=ac3d diff --git a/games-simulation/flightgear/files/flightgear-2024.1.1-cmake.patch b/games-simulation/flightgear/files/flightgear-2024.1.1-cmake.patch new file mode 100644 index 0000000..0aa0f66 --- /dev/null +++ b/games-simulation/flightgear/files/flightgear-2024.1.1-cmake.patch @@ -0,0 +1,43 @@ +diff '--color=auto' -ruN flightgear-2024.1.1/CMakeLists.txt my/CMakeLists.txt +--- flightgear-2024.1.1/CMakeLists.txt 2025-02-27 15:49:31.000000000 +0100 ++++ my/CMakeLists.txt 2025-05-22 04:59:08.937714480 +0200 +@@ -368,7 +368,7 @@ + set(minQtVersion 5.12.1) + endif() + +- find_package(Qt${QT_VERSION_MAJOR} ${minQtVersion} REQUIRED COMPONENTS Widgets Gui Network Qml Quick Svg) ++ find_package(Qt${QT_VERSION_MAJOR} ${minQtVersion} REQUIRED COMPONENTS Widgets Gui Network Qml Quick) + if (NOT Qt${QT_VERSION_MAJOR}Widgets_FOUND) + message(FATAL_ERROR "Qt support enabled, Qt was found but some required packages are missing, stopping.") + endif() +diff '--color=auto' -ruN flightgear-2024.1.1/CMakeModules/Installation.cmake my/CMakeModules/Installation.cmake +--- flightgear-2024.1.1/CMakeModules/Installation.cmake 2025-02-27 15:49:31.000000000 +0100 ++++ my/CMakeModules/Installation.cmake 2025-05-22 05:25:32.200462286 +0200 +@@ -149,7 +149,7 @@ + ######################################################################################## + # AppDir creation for Linux AppImage + +-if (LINUX) ++if (LINUX AND APPIMAGE) + + install(DIRECTORY ${OSG_PLUGINS_DIR} + DESTINATION appdir/usr/lib +diff '--color=auto' -ruN flightgear-2024.1.1/src/GUI/CMakeLists.txt my/src/GUI/CMakeLists.txt +--- flightgear-2024.1.1/src/GUI/CMakeLists.txt 2025-02-27 15:49:31.000000000 +0100 ++++ my/src/GUI/CMakeLists.txt 2025-05-22 05:52:05.224936638 +0200 +@@ -182,7 +182,6 @@ + Qt${QT_VERSION_MAJOR}::Network + Qt${QT_VERSION_MAJOR}::Qml + Qt${QT_VERSION_MAJOR}::Quick +- Qt${QT_VERSION_MAJOR}::Svg + SimGearCore) + + add_library(fgqmlui +@@ -250,7 +249,6 @@ + Qt${QT_VERSION_MAJOR}::Network + Qt${QT_VERSION_MAJOR}::Qml + Qt${QT_VERSION_MAJOR}::Quick +- Qt${QT_VERSION_MAJOR}::Svg + SimGearCore) + + target_include_directories(fgqmlui PRIVATE ${PROJECT_BINARY_DIR}/src/GUI ${OPENSCENEGRAPH_INCLUDE_DIRS} ${CMAKE_CURRENT_SOURCE_DIR}) diff --git a/games-simulation/flightgear/files/flightgear-2024.1.1-fix-fgpanel.patch b/games-simulation/flightgear/files/flightgear-2024.1.1-fix-fgpanel.patch new file mode 100644 index 0000000..76123bd --- /dev/null +++ b/games-simulation/flightgear/files/flightgear-2024.1.1-fix-fgpanel.patch @@ -0,0 +1,718 @@ +diff '--color=auto' -ruN flightgear-2024.1.1/utils/fgpanel/ApplicationProperties.cxx my/utils/fgpanel/ApplicationProperties.cxx +--- flightgear-2024.1.1/utils/fgpanel/ApplicationProperties.cxx 2025-02-27 15:49:32.000000000 +0100 ++++ my/utils/fgpanel/ApplicationProperties.cxx 2025-05-22 06:30:47.453461696 +0200 +@@ -71,5 +71,5 @@ + return path; + } + +-string ApplicationProperties::root = "."; ++std::string ApplicationProperties::root = "."; + SGPropertyNode_ptr ApplicationProperties::Properties = new SGPropertyNode; +diff '--color=auto' -ruN flightgear-2024.1.1/utils/fgpanel/FGCroppedTexture.cxx my/utils/fgpanel/FGCroppedTexture.cxx +--- flightgear-2024.1.1/utils/fgpanel/FGCroppedTexture.cxx 2025-02-27 15:49:32.000000000 +0100 ++++ my/utils/fgpanel/FGCroppedTexture.cxx 2025-05-22 06:46:12.372528774 +0200 +@@ -23,11 +23,11 @@ + #include "FGCroppedTexture.hxx" + + GLuint FGCroppedTexture::s_current_bound_texture = 0; +-map FGCroppedTexture::s_cache; +-map FGCroppedTexture::s_TextureLoader; ++std::map FGCroppedTexture::s_cache; ++std::map FGCroppedTexture::s_TextureLoader; + FGDummyTextureLoader FGCroppedTexture::s_DummyTextureLoader; + +-FGCroppedTexture::FGCroppedTexture (const string &path, ++FGCroppedTexture::FGCroppedTexture (const std::string &path, + const float minX, const float minY, + const float maxX, const float maxY) : + m_path (path), +@@ -40,11 +40,11 @@ + } + + void +-FGCroppedTexture::setPath (const string &path) { ++FGCroppedTexture::setPath (const std::string &path) { + m_path = path; + } + +-const string & ++const std::string & + FGCroppedTexture::getPath () const { + return m_path; + } +@@ -55,7 +55,7 @@ + } + + void +-FGCroppedTexture::registerTextureLoader (const string &extension, ++FGCroppedTexture::registerTextureLoader (const std::string &extension, + FGTextureLoaderInterface * const loader) { + if (s_TextureLoader.count (extension) == 0) { + s_TextureLoader[extension] = loader; +@@ -100,7 +100,7 @@ + "Using texture " << m_path << " from cache (#" << m_texture << ")"); + } else { + const SGPath path (ApplicationProperties::GetRootPath (m_path.c_str ())); +- const string extension (path.extension ()); ++ const std::string extension (path.extension ()); + FGTextureLoaderInterface *loader (&s_DummyTextureLoader); + if (s_TextureLoader.count (extension) == 0) { + SG_LOG (SG_COCKPIT, +diff '--color=auto' -ruN flightgear-2024.1.1/utils/fgpanel/FGCroppedTexture.hxx my/utils/fgpanel/FGCroppedTexture.hxx +--- flightgear-2024.1.1/utils/fgpanel/FGCroppedTexture.hxx 2025-02-27 15:49:32.000000000 +0100 ++++ my/utils/fgpanel/FGCroppedTexture.hxx 2025-05-22 06:55:00.337444768 +0200 +@@ -30,19 +30,19 @@ + */ + class FGCroppedTexture : public SGReferenced { + public: +- FGCroppedTexture (const string &path, ++ FGCroppedTexture (const std::string &path, + const float minX = 0.0, const float minY = 0.0, + const float maxX = 1.0, const float maxY = 1.0); + + virtual ~FGCroppedTexture (); + +- virtual void setPath (const string &path); ++ virtual void setPath (const std::string &path); + +- virtual const string &getPath () const; ++ virtual const std::string &getPath () const; + + virtual void setCrop (const float minX, const float minY, const float maxX, const float maxY); + +- static void registerTextureLoader (const string &extension, ++ static void registerTextureLoader (const std::string &extension, + FGTextureLoaderInterface * const loader); + + virtual float getMinX () const; +@@ -54,13 +54,13 @@ + virtual void bind (const GLint Textured_Layer_Sampler_Loc); + + private: +- string m_path; ++ std::string m_path; + float m_minX, m_minY, m_maxX, m_maxY; + + GLuint m_texture; + static GLuint s_current_bound_texture; +- static map s_cache; +- static map s_TextureLoader; ++ static std::map s_cache; ++ static std::map s_TextureLoader; + static FGDummyTextureLoader s_DummyTextureLoader; + }; + +diff '--color=auto' -ruN flightgear-2024.1.1/utils/fgpanel/FGDummyTextureLoader.cxx my/utils/fgpanel/FGDummyTextureLoader.cxx +--- flightgear-2024.1.1/utils/fgpanel/FGDummyTextureLoader.cxx 2025-02-27 15:49:32.000000000 +0100 ++++ my/utils/fgpanel/FGDummyTextureLoader.cxx 2025-05-22 06:31:21.970651761 +0200 +@@ -19,7 +19,7 @@ + #include "FGDummyTextureLoader.hxx" + + GLuint +-FGDummyTextureLoader::loadTexture (const string& filename) { ++FGDummyTextureLoader::loadTexture (const std::string& filename) { + GLuint texture; + glGenTextures (1, &texture); + glBindTexture (GL_TEXTURE_2D, texture); +diff '--color=auto' -ruN flightgear-2024.1.1/utils/fgpanel/FGDummyTextureLoader.hxx my/utils/fgpanel/FGDummyTextureLoader.hxx +--- flightgear-2024.1.1/utils/fgpanel/FGDummyTextureLoader.hxx 2025-02-27 15:49:32.000000000 +0100 ++++ my/utils/fgpanel/FGDummyTextureLoader.hxx 2025-05-22 06:32:30.237016268 +0200 +@@ -18,8 +18,6 @@ + + #pragma once + +-#include +- + #include "FGTextureLoaderInterface.hxx" + + +diff '--color=auto' -ruN flightgear-2024.1.1/utils/fgpanel/FGFontCache.cxx my/utils/fgpanel/FGFontCache.cxx +--- flightgear-2024.1.1/utils/fgpanel/FGFontCache.cxx 2025-02-27 15:49:32.000000000 +0100 ++++ my/utils/fgpanel/FGFontCache.cxx 2025-05-22 06:59:46.822658662 +0200 +@@ -57,7 +57,7 @@ + } + + bool +-FGFontCache::Set_Font (const string& Font_Name, ++FGFontCache::Set_Font (const std::string& Font_Name, + const float Size, + GLuint &Glyph_Texture) { + if (m_Face_Map.find (Font_Name) != m_Face_Map.end ()) { +@@ -68,7 +68,7 @@ + SG_LOG (SG_COCKPIT, SG_ALERT, "Could not open font : " + Font_Name); + return false; + } +- m_Face_Map.insert (pair (Font_Name, Face_Ptr)); ++ m_Face_Map.insert (std::pair (Font_Name, Face_Ptr)); + m_Current_Face_Ptr = Face_Ptr; + } + if (m_Current_Face_Ptr != NULL) { +@@ -76,7 +76,7 @@ + } else { + return false; + } +- const string Key_Str (Font_Name + "_" + Get_Size (Size)); ++ const std::string Key_Str (Font_Name + "_" + Get_Size (Size)); + if (m_Pos_Map.find (Key_Str) != m_Pos_Map.end ()) { + m_Current_Pos = m_Pos_Map[Key_Str]; + } else { +@@ -117,7 +117,7 @@ + GL_ALPHA, + GL_UNSIGNED_BYTE, + m_Texture); +- m_Pos_Map.insert (pair (Key_Str, m_Current_Pos)); ++ m_Pos_Map.insert (std::pair (Key_Str, m_Current_Pos)); + } + Glyph_Texture = m_Glyph_Texture; + return true; +@@ -175,12 +175,12 @@ + Y = double (Line) / double (Texture_Size); + } + +-string ++std::string + FGFontCache::Get_Size (const float Size) { + const int Half_Size (int (round (2.0 * Size))); + const int Int_Part (Half_Size / 2); + const int Dec_Part ((Half_Size % 2) ? 5 : 0); +- stringstream Result_SS; ++ std::stringstream Result_SS; + Result_SS << Int_Part << "." << Dec_Part; + return Result_SS.str (); + } +diff '--color=auto' -ruN flightgear-2024.1.1/utils/fgpanel/FGGroupLayer.hxx my/utils/fgpanel/FGGroupLayer.hxx +--- flightgear-2024.1.1/utils/fgpanel/FGGroupLayer.hxx 2025-02-27 15:49:32.000000000 +0100 ++++ my/utils/fgpanel/FGGroupLayer.hxx 2025-05-22 06:58:50.708076810 +0200 +@@ -37,7 +37,7 @@ + // transfer pointer ownership + virtual void addLayer (FGInstrumentLayer * const layer); + protected: +- vector m_layers; ++ std::vector m_layers; + }; + + #endif +diff '--color=auto' -ruN flightgear-2024.1.1/utils/fgpanel/FGPanel.cxx my/utils/fgpanel/FGPanel.cxx +--- flightgear-2024.1.1/utils/fgpanel/FGPanel.cxx 2025-02-27 15:49:32.000000000 +0100 ++++ my/utils/fgpanel/FGPanel.cxx 2025-05-22 07:14:43.910871435 +0200 +@@ -127,7 +127,7 @@ + Textured_Layer_Program_Object = GL_utils::instance ().load_program (V_Textured_Layer_Shader_Str, + F_Textured_Layer_Shader_Str); + if (Textured_Layer_Program_Object == 0) { +- terminate (); ++ std::terminate (); + } + + // Get the attribute locations +@@ -148,7 +148,7 @@ + + // Text Layer Shaders + if (!FGTextLayer::Init ()) { +- terminate (); ++ std::terminate (); + } + + glClearColor (0.0f, 0.0f, 0.0f, 1.0f); +diff '--color=auto' -ruN flightgear-2024.1.1/utils/fgpanel/FGPanelProtocol.cxx my/utils/fgpanel/FGPanelProtocol.cxx +--- flightgear-2024.1.1/utils/fgpanel/FGPanelProtocol.cxx 2025-02-27 15:49:32.000000000 +0100 ++++ my/utils/fgpanel/FGPanelProtocol.cxx 2025-05-22 07:14:15.894624768 +0200 +@@ -88,8 +88,8 @@ + io (NULL) { + const SGPropertyNode_ptr outputNode (root->getNode ("protocol/generic/output")); + if (outputNode) { +- const vector chunks (outputNode->getChildren ("chunk")); +- for (vector::size_type i = 0; i < chunks.size (); i++) { ++ const std::vector chunks (outputNode->getChildren ("chunk")); ++ for (size_t i = 0; i < chunks.size (); i++) { + const SGPropertyNode_ptr chunk (chunks[i]); + + const SGPropertyNode_ptr nodeNode (chunk->getNode ("node", false)); +@@ -98,7 +98,7 @@ + } + const SGPropertyNode_ptr node (ApplicationProperties::Properties->getNode (nodeNode->getStringValue (), true)); + +- string type; ++ std::string type; + const SGPropertyNode_ptr typeNode (chunk->getNode ("type", false)); + if (typeNode != NULL) { + type = typeNode->getStringValue (); +@@ -144,8 +144,8 @@ + // process most recent line of data + Page ^= 1; + buf[Page][sizeof (buf[Page]) - 1] = 0; +- const vector tokens (simgear::strutils::split (buf[Page], ",")); +- for (vector::size_type i = 0; i < tokens.size (); i++) { ++ const std::vector tokens (simgear::strutils::split (buf[Page], ",")); ++ for (size_t i = 0; i < tokens.size (); i++) { + if (i < propertySetterVector.size ()) { + propertySetterVector[i]->setValue (tokens[i].c_str ()); + } +@@ -159,9 +159,9 @@ + if (listenNode == NULL) { + return; + } +- const string hostname (listenNode->getNode ("host", true)->getStringValue ()); +- const string port (listenNode->getNode ("port", true)->getStringValue ()); +- const string style (listenNode->getNode ("style", true)->getStringValue ()); ++ const std::string hostname (listenNode->getNode ("host", true)->getStringValue ()); ++ const std::string port (listenNode->getNode ("port", true)->getStringValue ()); ++ const std::string style (listenNode->getNode ("style", true)->getStringValue ()); + + if (io != NULL) { + delete io; +@@ -169,7 +169,7 @@ + io = new SGSocket (hostname, port, style); + + if (!io->open (SG_IO_IN)) { +- cerr << "can't open socket " << style << ":" << hostname << ":" << port << endl; ++ std::cerr << "can't open socket " << style << ":" << hostname << ":" << port << std::endl; + } + } + +diff '--color=auto' -ruN flightgear-2024.1.1/utils/fgpanel/FGPNGTextureLoader.cxx my/utils/fgpanel/FGPNGTextureLoader.cxx +--- flightgear-2024.1.1/utils/fgpanel/FGPNGTextureLoader.cxx 2025-02-27 15:49:32.000000000 +0100 ++++ my/utils/fgpanel/FGPNGTextureLoader.cxx 2025-05-22 07:10:38.485216103 +0200 +@@ -42,7 +42,7 @@ + using namespace std; + + GLuint +-FGPNGTextureLoader::loadTexture (const string &filename) { ++FGPNGTextureLoader::loadTexture (const std::string &filename) { + //header for testing if it is a png + png_byte header[8]; + +diff '--color=auto' -ruN flightgear-2024.1.1/utils/fgpanel/FGPNGTextureLoader.hxx my/utils/fgpanel/FGPNGTextureLoader.hxx +--- flightgear-2024.1.1/utils/fgpanel/FGPNGTextureLoader.hxx 2025-02-27 15:49:32.000000000 +0100 ++++ my/utils/fgpanel/FGPNGTextureLoader.hxx 2025-05-22 07:10:11.651891427 +0200 +@@ -20,7 +20,7 @@ + + class FGPNGTextureLoader : public FGTextureLoaderInterface { + public: +- virtual GLuint loadTexture (const string &filename); ++ virtual GLuint loadTexture (const std::string &filename); + + const static GLuint NOTEXTURE = 0; + }; +diff '--color=auto' -ruN flightgear-2024.1.1/utils/fgpanel/FGRGBTextureLoader.cxx my/utils/fgpanel/FGRGBTextureLoader.cxx +--- flightgear-2024.1.1/utils/fgpanel/FGRGBTextureLoader.cxx 2025-02-27 15:49:32.000000000 +0100 ++++ my/utils/fgpanel/FGRGBTextureLoader.cxx 2025-05-22 07:13:33.966248033 +0200 +@@ -52,7 +52,7 @@ + unsigned long wasteBytes; + char name[80]; + unsigned long colorMap; +- istream *file; ++ std::istream *file; + unsigned char *tmp, *tmpR, *tmpG, *tmpB, *tmpA; + unsigned long rleEnd; + GLuint *rowStart; +@@ -156,7 +156,7 @@ + } + + static rawImageRec * +-RawImageOpen (istream& fin) { ++RawImageOpen (std::istream& fin) { + union { + int testWord; + char testByte[4]; +@@ -242,7 +242,7 @@ + } + int x (ybyz * sizeof (GLuint)); + raw->rleEnd = 512 + (2 * x); +- fin.seekg (512, ios::beg); ++ fin.seekg (512, std::ios::beg); + fin.read ((char*) raw->rowStart, x); + fin.read ((char*) raw->rowSize, x); + if (raw->swapFlag) { +@@ -260,7 +260,7 @@ + unsigned short *tempShort; + + if ((raw->type & 0xFF00) == 0x0100) { +- raw->file->seekg (long (raw->rowStart[y + z * raw->sizeY]), ios::beg); ++ raw->file->seekg (long (raw->rowStart[y + z * raw->sizeY]), std::ios::beg); + raw->file->read ((char*) raw->tmp, (unsigned int) (raw->rowSize[y + z * raw->sizeY])); + + unsigned char *iPtr = raw->tmp; +@@ -333,7 +333,7 @@ + } + } + } else { +- raw->file->seekg (512 + (y * raw->sizeX * raw->bpc) + (z * raw->sizeX * raw->sizeY * raw->bpc), ios::beg); ++ raw->file->seekg (512 + (y * raw->sizeX * raw->bpc) + (z * raw->sizeX * raw->sizeY * raw->bpc), std::ios::beg); + raw->file->read ((char*) buf, raw->sizeX * raw->bpc); + if (raw->swapFlag && raw->bpc != 1) { + ConvertShort (reinterpret_cast (buf), raw->sizeX); +@@ -427,7 +427,7 @@ + // supportsExtension("bw","bw image format"); + + GLuint +-readRGBStream (istream &fin) { ++readRGBStream (std::istream &fin) { + rawImageRec * const raw (RawImageOpen (fin)); + + if (raw == NULL) { +@@ -468,9 +468,9 @@ + } + + GLuint +-FGRGBTextureLoader::loadTexture (const string &filename) { ++FGRGBTextureLoader::loadTexture (const std::string &filename) { + GLuint texture = NOTEXTURE; +- ifstream istream (filename.c_str (), ios::in | ios::binary); ++ std::ifstream istream (filename.c_str (), std::ios::in | std::ios::binary); + texture = readRGBStream (istream); + istream.close (); + return texture; +diff '--color=auto' -ruN flightgear-2024.1.1/utils/fgpanel/FGRGBTextureLoader.hxx my/utils/fgpanel/FGRGBTextureLoader.hxx +--- flightgear-2024.1.1/utils/fgpanel/FGRGBTextureLoader.hxx 2025-02-27 15:49:32.000000000 +0100 ++++ my/utils/fgpanel/FGRGBTextureLoader.hxx 2025-05-22 07:05:22.209920047 +0200 +@@ -20,7 +20,7 @@ + + class FGRGBTextureLoader : public FGTextureLoaderInterface { + public: +- virtual GLuint loadTexture (const string &filename); ++ virtual GLuint loadTexture (const std::string &filename); + + const static GLuint NOTEXTURE = 0; + }; +diff '--color=auto' -ruN flightgear-2024.1.1/utils/fgpanel/FGTextLayer.cxx my/utils/fgpanel/FGTextLayer.cxx +--- flightgear-2024.1.1/utils/fgpanel/FGTextLayer.cxx 2025-02-27 15:49:32.000000000 +0100 ++++ my/utils/fgpanel/FGTextLayer.cxx 2025-06-01 02:32:56.203092040 +0200 +@@ -156,7 +156,7 @@ + int Left, Bottom, W, H; + double X1, Y1, X2, Y2; + +- for (string::iterator It = m_value.begin (); It != m_value.end (); ++It) { ++ for (std::string::iterator It = m_value.begin (); It != m_value.end (); ++It) { + if (The_Font_Cache.Get_Char (*It, + X, Y, + Left, Bottom, +@@ -221,7 +221,7 @@ + } + + void +-FGTextLayer::setFontName (const string &name) { ++FGTextLayer::setFontName (const std::string &name) { + if (The_Font_Path.isNull ()) { + char *Env_Path = ::getenv ("FG_FONTS"); + if (Env_Path != NULL) { +@@ -247,8 +247,8 @@ + // Implementation of FGTextLayer::Chunk. + //////////////////////////////////////////////////////////////////////// + +-FGTextLayer::Chunk::Chunk (const string &text, +- const string &fmt) : ++FGTextLayer::Chunk::Chunk (const std::string &text, ++ const std::string &fmt) : + m_type (FGTextLayer::TEXT), + m_text (text), + m_fmt (fmt), +@@ -262,7 +262,7 @@ + + FGTextLayer::Chunk::Chunk (const ChunkType type, + const SGPropertyNode *node, +- const string &fmt, ++ const std::string &fmt, + const float mult, + const float offs, + const bool truncation) : +@@ -290,7 +290,7 @@ + sprintf (m_buf, m_fmt.c_str (), m_text.c_str ()); + break; + case TEXT_VALUE: +- sprintf (m_buf, m_fmt.c_str (), m_node->getStringValue ()); ++ sprintf (m_buf, m_fmt.c_str (), m_node->getStringValue ().c_str()); + break; + case DOUBLE_VALUE: + double d (m_offs + m_node->getFloatValue() * m_mult); +diff '--color=auto' -ruN flightgear-2024.1.1/utils/fgpanel/GL_utils.cxx my/utils/fgpanel/GL_utils.cxx +--- flightgear-2024.1.1/utils/fgpanel/GL_utils.cxx 2025-02-27 15:49:32.000000000 +0100 ++++ my/utils/fgpanel/GL_utils.cxx 2025-05-22 07:18:54.467677071 +0200 +@@ -57,7 +57,7 @@ + GLuint shader (glCreateShader (type)); + + if (shader == 0) { +- cerr << "Error creating shader" << endl; ++ std::cerr << "Error creating shader" << std::endl; + return 0; + } + +@@ -79,7 +79,7 @@ + char* info_log ((char *) malloc (sizeof (char) * info_len)); + + glGetShaderInfoLog (shader, info_len, NULL, info_log); +- cerr << "Error compiling shader:" << endl << info_log << endl; ++ std::cerr << "Error compiling shader:" << std::endl << info_log << std::endl; + + free (info_log); + } +@@ -106,13 +106,13 @@ + // Load the vertex/fragment shaders + GLuint vertex_shader (load_shader (GL_VERTEX_SHADER, vert_shader_src)); + if (vertex_shader == 0) { +- cerr << "Error loading vertex shader" << endl; ++ std::cerr << "Error loading vertex shader" << std::endl; + return 0; + } + + GLuint fragment_shader (load_shader (GL_FRAGMENT_SHADER, frag_shader_src)); + if (fragment_shader == 0) { +- cerr << "Error loading fragment shader" << endl; ++ std::cerr << "Error loading fragment shader" << std::endl; + glDeleteShader (vertex_shader); + return 0; + } +@@ -121,7 +121,7 @@ + GLuint program_object (glCreateProgram ()); + + if (program_object == 0) { +- cerr << "Error creating program" << endl; ++ std::cerr << "Error creating program" << std::endl; + return 0; + } + +@@ -143,7 +143,7 @@ + char* info_log ((char *) malloc (sizeof (char) * info_len)); + + glGetProgramInfoLog (program_object, info_len, NULL, info_log); +- cerr << "Error linking program:" << endl << info_log << endl; ++ std::cerr << "Error linking program:" << std::endl << info_log << std::endl; + + free (info_log); + } +@@ -364,11 +364,11 @@ + GL_utils::Debug (const GL_utils::GLenum_Mode mode) const { + if (mode < GL_UTILS_LAST) { + for (int l = 0; l < 4; ++l) { +- cout << " "; ++ std::cout << " "; + for (int c = 0; c < 4; ++c) { +- cout << m_Matrix[mode].top ().m[c][l] << " "; ++ std::cout << m_Matrix[mode].top ().m[c][l] << " "; + } +- cout << endl; ++ std::cout << std::endl; + } + } + } +diff '--color=auto' -ruN flightgear-2024.1.1/utils/fgpanel/main.cxx my/utils/fgpanel/main.cxx +--- flightgear-2024.1.1/utils/fgpanel/main.cxx 2025-02-27 15:49:32.000000000 +0100 ++++ my/utils/fgpanel/main.cxx 2025-05-22 06:55:23.033614787 +0200 +@@ -25,6 +25,6 @@ + return 0; + } + catch (...) { +- cerr << "Sorry, your program terminated." << endl; ++ std::cerr << "Sorry, your program terminated." << std::endl; + } + } +diff '--color=auto' -ruN flightgear-2024.1.1/utils/fgpanel/panel_io.cxx my/utils/fgpanel/panel_io.cxx +--- flightgear-2024.1.1/utils/fgpanel/panel_io.cxx 2025-02-27 15:49:32.000000000 +0100 ++++ my/utils/fgpanel/panel_io.cxx 2025-05-22 07:43:05.623983755 +0200 +@@ -26,8 +26,6 @@ + #include + #endif + +-#include // for strcmp() +- + #include + #include + #include +@@ -101,7 +99,7 @@ + */ + static FGCroppedTexture_ptr + readTexture (const SGPropertyNode *node) { +- SG_LOG(SG_COCKPIT, SG_DEBUG, "Read texture " << node->getName ()); ++ SG_LOG(SG_COCKPIT, SG_DEBUG, "Read texture " << node->getNameString ()); + + return new FGCroppedTexture (node->getStringValue ("path"), + node->getFloatValue ("x1"), +@@ -158,9 +156,9 @@ + readTransformation (const SGPropertyNode *node, const float w_scale, const float h_scale) { + FGPanelTransformation *t (new FGPanelTransformation); + +- const string name (node->getName ()); +- string type (node->getStringValue ("type")); +- const string propName (node->getStringValue ("property", "")); ++ const std::string name (node->getNameString ()); ++ std::string type (node->getStringValue ("type")); ++ const std::string propName (node->getStringValue ("property", "")); + const SGPropertyNode *target (0); + + if (type.empty ()) { +@@ -191,14 +189,14 @@ + t->table = new SGInterpTable(); + for (int i = 0; i < trans_table->nChildren(); i++) { + const SGPropertyNode * node = trans_table->getChild(i); +- if (!strcmp(node->getName(), "entry")) { ++ if (node->getNameString () == "entry") { + double ind = node->getDoubleValue("ind", 0.0); + double dep = node->getDoubleValue("dep", 0.0); + SG_LOG(SG_COCKPIT, SG_INFO, "Adding interpolation entry " + << ind << "==>" << dep); + t->table->addEntry(ind, dep); + } else { +- SG_LOG(SG_COCKPIT, SG_INFO, "Skipping " << node->getName() ++ SG_LOG(SG_COCKPIT, SG_INFO, "Skipping " << node->getNameString () + << " in interpolation"); + } + } +@@ -262,9 +260,9 @@ + FGTextLayer::Chunk * + readTextChunk (const SGPropertyNode *node) { + FGTextLayer::Chunk *chunk; +- const string name (node->getStringValue ("name")); +- string type (node->getStringValue ("type")); +- const string format (node->getStringValue ("format")); ++ const std::string name (node->getStringValue ("name")); ++ std::string type (node->getStringValue ("type")); ++ const std::string format (node->getStringValue ("format")); + + // Default to literal text. + if (type.empty ()) { +@@ -275,7 +273,7 @@ + + // A literal text string. + if (type == "literal") { +- const string text (node->getStringValue ("text")); ++ const std::string text (node->getStringValue ("text")); + chunk = new FGTextLayer::Chunk (text, format); + } else if (type == "text-value") { + // The value of a string property. +@@ -284,7 +282,7 @@ + chunk = new FGTextLayer::Chunk (FGTextLayer::TEXT_VALUE, target, format); + } else if (type == "number-value") { + // The value of a float property. +- const string propName (node->getStringValue ("property")); ++ const std::string propName (node->getStringValue ("property")); + const float scale (node->getFloatValue ("scale", 1.0)); + const float offset (node->getFloatValue ("offset", 0.0)); + const bool truncation (node->getBoolValue ("truncate", false)); +@@ -326,8 +324,8 @@ + static FGInstrumentLayer * + readLayer (const SGPropertyNode *node, const float w_scale, const float h_scale) { + FGInstrumentLayer *layer (NULL); +- const string name (node->getStringValue ("name")); +- string type (node->getStringValue ("type")); ++ const std::string name (node->getStringValue ("name")); ++ std::string type (node->getStringValue ("type")); + int w (node->getIntValue ("w", -1)); + int h (node->getIntValue ("h", -1)); + const bool emissive (node->getBoolValue ("emissive", false)); +@@ -357,7 +355,7 @@ + layer = new FGGroupLayer (); + for (int i = 0; i < node->nChildren(); i++) { + const SGPropertyNode *child = node->getChild (i); +- if (!strcmp (child->getName (), "layer")) { ++ if (child->getNameString () == "layer") { + ((FGGroupLayer *) layer)->addLayer (readLayer (child, w_scale, h_scale)); + } + } +@@ -376,7 +374,7 @@ + tlayer->setPointSize (pointSize); + + // Set the font. +- const string fontName (node->getStringValue ("font", "7-Segment")); ++ const std::string fontName (node->getStringValue ("font", "7-Segment")); + tlayer->setFontName (fontName); + + const SGPropertyNode *chunk_group (node->getNode ("chunks")); +@@ -384,13 +382,13 @@ + const int nChunks (chunk_group->nChildren ()); + for (int i = 0; i < nChunks; i++) { + const SGPropertyNode *node (chunk_group->getChild (i)); +- if (!strcmp(node->getName (), "chunk")) { ++ if (node->getNameString () == "chunk") { + FGTextLayer::Chunk * const chunk (readTextChunk (node)); + if (chunk != 0) { + tlayer->addChunk (chunk); + } + } else { +- SG_LOG(SG_COCKPIT, SG_INFO, "Skipping " << node->getName() ++ SG_LOG(SG_COCKPIT, SG_INFO, "Skipping " << node->getNameString () + << " in chunks"); + } + } +@@ -401,7 +399,7 @@ + layer = new FGSwitchLayer (); + for (int i = 0; i < node->nChildren (); i++) { + const SGPropertyNode *child (node->getChild (i)); +- if (!strcmp (child->getName (), "layer")) { ++ if (child->getNameString () == "layer") { + ((FGGroupLayer *) layer)->addLayer (readLayer (child, w_scale, h_scale)); + } + } +@@ -420,13 +418,13 @@ + const int nTransformations (trans_group->nChildren ()); + for (int i = 0; i < nTransformations; i++) { + const SGPropertyNode *node (trans_group->getChild (i)); +- if (!strcmp(node->getName (), "transformation")) { ++ if (node->getNameString () == "transformation") { + FGPanelTransformation * const t (readTransformation (node, w_scale, h_scale)); + if (t != 0) { + layer->addTransformation (t); + } + } else { +- SG_LOG(SG_COCKPIT, SG_INFO, "Skipping " << node->getName() ++ SG_LOG(SG_COCKPIT, SG_INFO, "Skipping " << node->getNameString () + << " in transformations"); + } + } +@@ -450,7 +448,7 @@ + */ + static FGPanelInstrument * + readInstrument (const SGPropertyNode *node) { +- const string name (node->getStringValue ("name")); ++ const std::string name (node->getStringValue ("name")); + const int x (node->getIntValue ("x", -1)); + const int y (node->getIntValue ("y", -1)); + const int real_w (node->getIntValue ("w", -1)); +@@ -488,13 +486,13 @@ + const int nLayers (layer_group->nChildren ()); + for (int i = 0; i < nLayers; i++) { + const SGPropertyNode *node (layer_group->getChild (i)); +- if (!strcmp (node->getName (), "layer")) { ++ if (node->getNameString () == "layer") { + FGInstrumentLayer * const layer (readLayer (node, w_scale, h_scale)); + if (layer != 0) { + instrument->addLayer (layer); + } + } else { +- SG_LOG(SG_COCKPIT, SG_INFO, "Skipping " << node->getName () ++ SG_LOG(SG_COCKPIT, SG_INFO, "Skipping " << node->getNameString () + << " in layers"); + } + } +@@ -521,7 +519,7 @@ + + // Assign the background texture, if any, or a bogus chequerboard. + // +- const string bgTexture (root->getStringValue ("background")); ++ const std::string bgTexture (root->getStringValue ("background")); + if (!bgTexture.empty ()) { + panel->setBackground (new FGCroppedTexture (bgTexture)); + } +@@ -534,7 +532,7 @@ + // + for (int i = 0; i < 8; i++) { + SGPropertyNode * const mbgNode (root->getChild ("multibackground", i)); +- string mbgTexture; ++ std::string mbgTexture; + if (mbgNode != NULL) { + mbgTexture = mbgNode->getStringValue (); + } +@@ -557,13 +555,13 @@ + const int nInstruments (instrument_group->nChildren ()); + for (int i = 0; i < nInstruments; i++) { + const SGPropertyNode *node = instrument_group->getChild (i); +- if (!strcmp (node->getName (), "instrument")) { ++ if (node->getNameString () == "instrument") { + FGPanelInstrument * const instrument (readInstrument (node)); + if (instrument != 0) { + panel->addInstrument (instrument); + } + } else { +- SG_LOG(SG_COCKPIT, SG_INFO, "Skipping " << node->getName() ++ SG_LOG(SG_COCKPIT, SG_INFO, "Skipping " << node->getNameString () + << " in instruments section"); + } + } diff --git a/games-simulation/flightgear/files/nasal.vim b/games-simulation/flightgear/files/nasal.vim new file mode 100644 index 0000000..65a2ed1 --- /dev/null +++ b/games-simulation/flightgear/files/nasal.vim @@ -0,0 +1 @@ +au BufRead,BufNewFile *.nas set filetype=nasal diff --git a/games-simulation/flightgear/flightgear-2024.1.3.ebuild b/games-simulation/flightgear/flightgear-2024.1.3.ebuild new file mode 100644 index 0000000..a1beccb --- /dev/null +++ b/games-simulation/flightgear/flightgear-2024.1.3.ebuild @@ -0,0 +1,175 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake flag-o-matic + +DESCRIPTION="Open Source Flight Simulator" +HOMEPAGE="https://www.flightgear.org/" +#SRC_URI="https://gitlab.com/flightgear/fgmeta/-/jobs/9264813015/artifacts/raw/fgbuild/${P}.tar.bz2" +SRC_URI="https://gitlab.com/flightgear/flightgear/-/archive/${PV}/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="cpu_flags_x86_sse2 dbus debug examples gdal qt6 +udev +utils" + +# Needs --fg-root with path to flightgear-data passed to test runner passed, +# not really worth patching +RESTRICT="test" + +# zlib is some strange auto-dep from simgear +# TODO add osgXR +COMMON_DEPEND=" + dev-db/sqlite:3 + >=dev-games/openscenegraph-3.6.0[jpeg,png] + ~dev-games/simgear-${PV}[gdal=] + media-libs/openal + >=media-libs/plib-1.8.5 + >=media-libs/speex-1.2.0:0 + media-libs/speexdsp:0 + media-sound/gsm + virtual/zlib:= + virtual/glu + x11-libs/libX11 + dbus? ( >=sys-apps/dbus-1.6.18-r1 ) + gdal? ( >=sci-libs/gdal-2.0.0:= ) + qt6? ( + dev-qt/qtbase:6[gui,network,widgets] + dev-qt/qtdeclarative:6 + ) + udev? ( virtual/udev ) + utils? ( + media-libs/freeglut + media-libs/freetype:2 + media-libs/glew:0 + media-libs/libpng:0 + virtual/opengl + qt6? ( dev-qt/qtwebsockets:6 ) + ) +" +# libXi and libXmu are build-only-deps according to FindGLUT.cmake +DEPEND="${COMMON_DEPEND} + dev-libs/boost + x11-base/xorg-proto + utils? ( + x11-libs/libXi + x11-libs/libXmu + ) +" +RDEPEND="${COMMON_DEPEND} + ~games-simulation/${PN}-data-${PV} +" +BDEPEND="qt6? ( dev-qt/qttools:6 )" + +PATCHES=( + "${FILESDIR}/${PN}-2024.1.1-cmake.patch" + "${FILESDIR}/${PN}-2024.1.1-fix-fgpanel.patch" + "${FILESDIR}/0001-check-to-be-sure-that-n-is-not-being-set-as-format-t.patch" + "${FILESDIR}/0003-make-fglauncher-a-static-library.patch" + "${FILESDIR}/0005-make-fgqmlui-a-static-library.patch" + "${FILESDIR}/0006-fgviewer-fix-crash-on-exit.patch" +) + +DOCS=(AUTHORS ChangeLog NEWS README Thanks) + +src_configure() { + # -Werror=lto-type-mismatch, -Werror=odr + # https://bugs.gentoo.org/859217 + # https://sourceforge.net/p/flightgear/codetickets/2908/ + filter-lto + + local mycmakeargs=( + -DBUILD_SHARED_LIBS=OFF + -DCHECK_FOR_QT5=OFF + -DCHECK_FOR_QT6=ON + -DENABLE_AUTOTESTING=OFF + -DENABLE_FGCOM=$(usex utils) + -DENABLE_FGELEV=$(usex utils) + -DENABLE_FGJS=$(usex utils) + -DENABLE_FGVIEWER=$(usex utils) + -DENABLE_GDAL=$(usex gdal) + -DENABLE_GPSSMOOTH=$(usex utils) + -DENABLE_HID_INPUT=$(usex udev) + -DENABLE_IAX=$(usex utils) + -DENABLE_JS_DEMO=$(usex utils) + -DENABLE_JSBSIM=ON + -DENABLE_LARCSIM=ON + -DENABLE_METAR=$(usex utils) + -DENABLE_PLIB_JOYSTICK=ON # NOTE look for defaults changes in CMake + -DENABLE_QT=$(usex qt6) + -DENABLE_RTI=OFF + -DENABLE_SENTRY=OFF # sentry-native masked + -DENABLE_HUD=ON + -DENABLE_PUI=ON + -DENABLE_SIMD=$(usex cpu_flags_x86_sse2) + -DENABLE_STGMERGE=ON + -DENABLE_SWIFT=OFF # swift pilot client not packaged yet + -DENABLE_TRAFFIC=$(usex utils) + -DENABLE_UIUC_MODEL=ON + -DENABLE_VR=OFF + -DENABLE_YASIM=ON + -DEVENT_INPUT=$(usex udev) + -DFG_BUILD_TYPE=Release + -DFG_DATA_DIR=/usr/share/${PN} + -DJSBSIM_TERRAIN=ON + -DOSG_FSTREAM_EXPORT_FIXED=OFF # TODO also see simgear + -DSP_FDMS=ON + -DSYSTEM_CPPUNIT=OFF # NOTE we do not build tests anyway + -DSYSTEM_FLITE=OFF + -DSYSTEM_HTS_ENGINE=OFF + -DSYSTEM_SPEEX=ON + -DSYSTEM_GSM=ON + -DSYSTEM_SQLITE=ON + -DSYSTEM_OSGXR=ON + -DUSE_AEONWAVE=OFF + -DUSE_DBUS=$(usex dbus) + -DWITH_FGPANEL=$(usex utils) + ) + if use gdal && use utils; then + mycmakeargs+=(-DENABLE_DEMCONVERT=ON) + else + mycmakeargs+=(-DENABLE_DEMCONVERT=OFF) + fi + if use qt6 && use utils; then + mycmakeargs+=(-DENABLE_FGQCANVAS=ON) + else + mycmakeargs+=(-DENABLE_FGQCANVAS=OFF) + fi + + cmake_src_configure +} + +src_install() { + cmake_src_install + + # Install bash completion (TODO zsh) + # Uncomment below when scripts stops writing files... +# sed -e "s|/usr/local/share/FlightGear|${GAMES_DATADIR}/${PN}|" \ +# -i scripts/completion/fg-completion.bash || die 'unable to replace FG_ROOT' +# newbashcomp scripts/completion/fg-completion.bash ${PN} + + # Install examples and other misc files + if use examples; then + docompress -x /usr/share/doc/"${PF}"/{examples,tools} + docinto examples + dodoc -r scripts/java scripts/perl scripts/python + docinto examples/c++ + dodoc -r scripts/example/* + docinto tools + dodoc -r scripts/atis scripts/tools/* + fi + + # Install nasal script syntax + insinto /usr/share/vim/vimfiles/syntax + doins scripts/syntax/{ac3d,nasal}.vim + insinto /usr/share/vim/vimfiles/ftdetect/ + doins "${FILESDIR}"/{ac3d,nasal}.vim +} + +pkg_postinst() { + if use qt6; then + einfo "To use launcher, run fgfs with '--launcher' parameter" + fi +} diff --git a/metadata/md5-cache/dev-games/simgear-2024.1.3 b/metadata/md5-cache/dev-games/simgear-2024.1.3 new file mode 100644 index 0000000..69ed773 --- /dev/null +++ b/metadata/md5-cache/dev-games/simgear-2024.1.3 @@ -0,0 +1,16 @@ +BDEPEND=app-alternatives/ninja >=dev-build/cmake-3.28.5 +DEFINED_PHASES=compile configure install prepare test +DEPEND=app-arch/xz-utils dev-libs/expat dev-games/openscenegraph media-libs/openal net-libs/udns net-misc/curl virtual/zlib:= virtual/opengl ffmpeg? ( media-video/ffmpeg:0 ) gdal? ( sci-libs/gdal:= ) dev-libs/boost +DESCRIPTION=Development library for simulation games +EAPI=8 +HOMEPAGE=https://www.flightgear.org/ +INHERIT=cmake +IUSE=cpu_flags_x86_sse2 debug ffmpeg gdal subversion test +KEYWORDS=~amd64 ~x86 +LICENSE=GPL-2 +RDEPEND=app-arch/xz-utils dev-libs/expat dev-games/openscenegraph media-libs/openal net-libs/udns net-misc/curl virtual/zlib:= virtual/opengl ffmpeg? ( media-video/ffmpeg:0 ) gdal? ( sci-libs/gdal:= ) subversion? ( dev-vcs/subversion ) +RESTRICT=!test? ( test ) +SLOT=0 +SRC_URI=https://gitlab.com/flightgear/simgear/-/archive/2024.1.3/simgear-2024.1.3.tar.bz2 +_eclasses_=toolchain-funcs 30214924c0c3b92ec7dbf24fc70d60d3 flag-o-matic a7afe42e95fb46ce9691605acfb24672 multiprocessing 1e32df7deee68372153dca65f4a7c21f ninja-utils 3a59a39e97af0f7c03f49cf3c22f262b xdg-utils 42869b3c8d86a70ef3cf75165a395e09 cmake 22e4e58d68692975dc74424dc9b12fb7 +_md5_=fbfe0087e51b919311da55f6163fbc04 diff --git a/metadata/md5-cache/games-simulation/flightgear-2024.1.3 b/metadata/md5-cache/games-simulation/flightgear-2024.1.3 new file mode 100644 index 0000000..056f5cb --- /dev/null +++ b/metadata/md5-cache/games-simulation/flightgear-2024.1.3 @@ -0,0 +1,16 @@ +BDEPEND=qt6? ( dev-qt/qttools:6 ) app-alternatives/ninja >=dev-build/cmake-3.28.5 +DEFINED_PHASES=compile configure install postinst prepare test +DEPEND=dev-db/sqlite:3 >=dev-games/openscenegraph-3.6.0[jpeg,png] ~dev-games/simgear-2024.1.3[gdal=] media-libs/openal >=media-libs/plib-1.8.5 >=media-libs/speex-1.2.0:0 media-libs/speexdsp:0 media-sound/gsm virtual/zlib:= virtual/glu x11-libs/libX11 dbus? ( >=sys-apps/dbus-1.6.18-r1 ) gdal? ( >=sci-libs/gdal-2.0.0:= ) qt6? ( dev-qt/qtbase:6[gui,network,widgets] dev-qt/qtdeclarative:6 ) udev? ( virtual/udev ) utils? ( media-libs/freeglut media-libs/freetype:2 media-libs/glew:0 media-libs/libpng:0 virtual/opengl qt6? ( dev-qt/qtwebsockets:6 ) ) dev-libs/boost x11-base/xorg-proto utils? ( x11-libs/libXi x11-libs/libXmu ) +DESCRIPTION=Open Source Flight Simulator +EAPI=8 +HOMEPAGE=https://www.flightgear.org/ +INHERIT=cmake flag-o-matic +IUSE=cpu_flags_x86_sse2 dbus debug examples gdal qt6 +udev +utils +KEYWORDS=~amd64 ~x86 +LICENSE=GPL-2 +RDEPEND=dev-db/sqlite:3 >=dev-games/openscenegraph-3.6.0[jpeg,png] ~dev-games/simgear-2024.1.3[gdal=] media-libs/openal >=media-libs/plib-1.8.5 >=media-libs/speex-1.2.0:0 media-libs/speexdsp:0 media-sound/gsm virtual/zlib:= virtual/glu x11-libs/libX11 dbus? ( >=sys-apps/dbus-1.6.18-r1 ) gdal? ( >=sci-libs/gdal-2.0.0:= ) qt6? ( dev-qt/qtbase:6[gui,network,widgets] dev-qt/qtdeclarative:6 ) udev? ( virtual/udev ) utils? ( media-libs/freeglut media-libs/freetype:2 media-libs/glew:0 media-libs/libpng:0 virtual/opengl qt6? ( dev-qt/qtwebsockets:6 ) ) ~games-simulation/flightgear-data-2024.1.3 +RESTRICT=test +SLOT=0 +SRC_URI=https://gitlab.com/flightgear/flightgear/-/archive/2024.1.3/flightgear-2024.1.3.tar.bz2 +_eclasses_=toolchain-funcs 30214924c0c3b92ec7dbf24fc70d60d3 flag-o-matic a7afe42e95fb46ce9691605acfb24672 multiprocessing 1e32df7deee68372153dca65f4a7c21f ninja-utils 3a59a39e97af0f7c03f49cf3c22f262b xdg-utils 42869b3c8d86a70ef3cf75165a395e09 cmake 22e4e58d68692975dc74424dc9b12fb7 +_md5_=435e60447c078d0467b76dd6f8ff1341 diff --git a/metadata/md5-cache/games-simulation/flightgear-data-2024.1.3 b/metadata/md5-cache/games-simulation/flightgear-data-2024.1.3 new file mode 100644 index 0000000..d0a5538 --- /dev/null +++ b/metadata/md5-cache/games-simulation/flightgear-data-2024.1.3 @@ -0,0 +1,9 @@ +DEFINED_PHASES=install +DESCRIPTION=FlightGear data files +EAPI=8 +HOMEPAGE=https://www.flightgear.org/ +KEYWORDS=~amd64 ~x86 +LICENSE=GPL-2 +SLOT=0 +SRC_URI=https://download.flightgear.org/release-2024.1/FlightGear-2024.1.3-data.txz +_md5_=6d7a452672ebd8ad84cfeef75d58159e