diff options
author | Leonardo Arena <rnalrd@alpinelinux.org> | 2017-01-06 15:39:30 +0000 |
---|---|---|
committer | Leonardo Arena <rnalrd@alpinelinux.org> | 2017-01-06 15:39:30 +0000 |
commit | c7866d849100d7422b6fdfafcd1063133757fde6 (patch) | |
tree | e9fadb234f3b3417f4bf19dd63425b1804a3ee9d | |
parent | 3d476a3d2018dd786cc108212b67136c3e8b1237 (diff) | |
download | aports-c7866d849100d7422b6fdfafcd1063133757fde6.tar.bz2 aports-c7866d849100d7422b6fdfafcd1063133757fde6.tar.xz |
testing/flightgear: new aport
Sophisticated flight simulator
-rw-r--r-- | testing/flightgear/APKBUILD | 59 | ||||
-rw-r--r-- | testing/flightgear/fix-link_with_x11.patch | 22 | ||||
-rw-r--r-- | testing/flightgear/musl-fixes.patch | 42 |
3 files changed, 123 insertions, 0 deletions
diff --git a/testing/flightgear/APKBUILD b/testing/flightgear/APKBUILD new file mode 100644 index 0000000000..aea51d59ce --- /dev/null +++ b/testing/flightgear/APKBUILD @@ -0,0 +1,59 @@ +# Contributor: Leonardo Arena <rnarld@alpinelinux.org> +# Maintainer: +pkgname=flightgear +_ver=2016.4 +_revision=4 +pkgver=${_ver}.$_revision +pkgrel=0 +pkgdesc="Sophisticated flight simulator" +url="http://flightgear.org" +arch="all" +license="GPL" +depends= +depends_dev= +makedepends="$depends_dev boost-dev cmake curl-dev dbus-dev eudev-dev + freeglut-dev libx11-dev libxi-dev libxmu-dev mesa-dev openal-soft-dev + openscenegraph-dev plib qt5-qtbase-dev simgear zlib-dev" +install= +subpackages="$pkgname-doc" +source="http://downloads.sourceforge.net/project/$pkgname/release-$_ver/$pkgname-$pkgver.tar.bz2 + musl-fixes.patch + fix-link_with_x11.patch + " +builddir="$srcdir"/$pkgname-$pkgver + +prepare() { + cd "$builddir" + default_prepare || return 1 +} + +build() { + cd "$builddir" + mkdir _build.tmp && cd _build.tmp + cmake \ + -D CMAKE_BUILD_TYPE="Release" \ + -D CMAKE_INSTALL_PREFIX=/usr \ + -D CMAKE_INSTALL_SYSCONFDIR=/etc/$pkgname \ + -D FG_DATA_DIR=/var/lib/$pkgname \ + -D SimGear_DIR=/usr/lib/cmake/SimGear \ + .. || return 1 +} + +package() { + cd "$builddir/_build.tmp" + make DESTDIR="$pkgdir" install || return 1 + + # remove the 2 lines below (and this) if there is no init.d script + # install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname + # install -m644 -D "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname +} + +md5sums="b1a1f12786debaaf8970595cad98d59f flightgear-2016.4.4.tar.bz2 +810ba3c0b87ed3c75d51007525f271a6 musl-fixes.patch +38187621345f823ebaab50fdbc34a33b fix-link_with_x11.patch" +sha256sums="d51992cbe40f1812f9821ab27b838d52e04c10551772d57fc2e815f4444dfafc flightgear-2016.4.4.tar.bz2 +26e773861007bd4c14bdcebcfc84d428fa99faec5cc2dac7128492800b7bce65 musl-fixes.patch +e54f73160a2904428ec26a679cb70089dbae16753096e9470f42d22b6c718d4c fix-link_with_x11.patch" +sha512sums="3f3d5a72adea9cb9a22b7b355a18492c1c58634e6203d6ae364d7a89f1af0fcc3df446c72c3c83ac9a1f51e05a6cd83c7d7af5f7bc3a5e8e75e3b80f709394a0 flightgear-2016.4.4.tar.bz2 +7b66d939578c96e493a974da97cbc3ffc322eea67691d1e87b65514c5b0aaabaddd7426d86560f3ccd43e6c5eb903fd5085c8e58ec07ea15d6d191031d8f3e49 musl-fixes.patch +49d359d213870ad71a3403e93951574b334d8281fbe9553fe259d65e1b0a8659c127cde11ffdf2ba3351c2af2dabe60657dab6dab3ff0c9fecad4a398fd6f2eb fix-link_with_x11.patch" diff --git a/testing/flightgear/fix-link_with_x11.patch b/testing/flightgear/fix-link_with_x11.patch new file mode 100644 index 0000000000..f45bc3e565 --- /dev/null +++ b/testing/flightgear/fix-link_with_x11.patch @@ -0,0 +1,22 @@ +From 04ca64edc46cfb54ecff5bddf12370b2c7a0f192 Mon Sep 17 00:00:00 2001 +From: Fabrice Bellet <fabrice@bellet.info> +Date: Tue, 17 Feb 2015 22:49:50 +0100 +Subject: [PATCH] explicitely link with libX11 + +--- + src/Main/CMakeLists.txt | 1 + + utils/fgviewer/CMakeLists.txt | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/src/Main/CMakeLists.txt b/src/Main/CMakeLists.txt +index 12c0961..78c4163 100644 +--- a/src/Main/CMakeLists.txt ++++ b/src/Main/CMakeLists.txt +@@ -142,6 +142,7 @@ target_link_libraries(fgfs + ${SIMGEAR_CORE_LIBRARY_DEPENDENCIES} + ${SIMGEAR_SCENE_LIBRARY_DEPENDENCIES} + ${PLATFORM_LIBS} ++ ${X11_X11_LIB} + ) + + if(ENABLE_FLITE) diff --git a/testing/flightgear/musl-fixes.patch b/testing/flightgear/musl-fixes.patch new file mode 100644 index 0000000000..36dce405db --- /dev/null +++ b/testing/flightgear/musl-fixes.patch @@ -0,0 +1,42 @@ +--- 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 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 + +--- 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"); |