From 8a4a74daaeac70888d5f1b7095cfb2b34744ca11 Mon Sep 17 00:00:00 2001 From: Maxim Karasev Date: Mon, 29 Aug 2022 07:50:28 +0000 Subject: [PATCH] testing/endless-sky: new aport --- testing/endless-sky/APKBUILD | 51 ++++++++++++++++++++++++++ testing/endless-sky/install-path.patch | 13 +++++++ testing/endless-sky/no-werror.patch | 13 +++++++ 3 files changed, 77 insertions(+) create mode 100644 testing/endless-sky/APKBUILD create mode 100644 testing/endless-sky/install-path.patch create mode 100644 testing/endless-sky/no-werror.patch diff --git a/testing/endless-sky/APKBUILD b/testing/endless-sky/APKBUILD new file mode 100644 index 00000000000..36e1fd26ec0 --- /dev/null +++ b/testing/endless-sky/APKBUILD @@ -0,0 +1,51 @@ +# Contributor: Maxim Karasev +# Maintainer: Maxim Karasev +pkgname=endless-sky +pkgver=0.9.14 +pkgrel=0 +pkgdesc="sandbox-style 2D space trading and combat game" +url="https://endless-sky.github.io/" +arch="all !s390x" # videogame +license="GPL-3.0-or-later AND CC-BY-SA-4.0 AND CC-BY-SA-3.0 AND CC-BY-3.0" +makedepends=" + glew-dev + libjpeg-turbo-dev + libmad-dev + libpng-dev + openal-soft-dev + scons + sdl2-dev + " +subpackages="$pkgname-doc" +source="https://github.com/endless-sky/endless-sky/archive/refs/tags/v$pkgver/endless-sky-$pkgver.tar.gz + install-path.patch + no-werror.patch + " + +prepare() { + default_prepare + + # use the fast lto instead of the slow lto + sed -i 's|-flto|-flto=auto|g' SConstruct +} + +build() { + # lto fortify-headers + export CXXFLAGS="$CXXFLAGS -U_FORTIFY_SOURCE" + scons -j "${JOBS:-2}" +} + +check() { + scons test +} + +package() { + scons DESTDIR="$pkgdir" PREFIX=/usr install + install -Dm644 copyright "$pkgdir"/usr/share/licenses/$pkgname/copyright +} + +sha512sums=" +861fddc8e2f167d335247f3ce1efb59bb4a5951cb0aa5e4a10517fded096db7e69ac17cf0e813f2a1ec040bef57c5d6b6e8e90d952debc9b2caa38d1fb91abe5 endless-sky-0.9.14.tar.gz +91a32aa67cf70a2c6462579cff01aba9d85901675e07c9f296ce03bb34f9dca0f18594c921856ff6c369fe6eb282d9da80148019ebbd7faeecc9231ddec2d57c install-path.patch +89628da0940d5afdbca511df6625aee3da12ec2a2bdb1faf3f4e8219bfc274d43bb84e30008425f2d99768cae4cae87b59bb633b4a636b695d68ea3ccace3c2d no-werror.patch +" diff --git a/testing/endless-sky/install-path.patch b/testing/endless-sky/install-path.patch new file mode 100644 index 00000000000..3035c0e9f74 --- /dev/null +++ b/testing/endless-sky/install-path.patch @@ -0,0 +1,13 @@ +diff --git a/SConstruct b/SConstruct +index 3ae455a..6d25bdf 100644 +--- a/SConstruct ++++ b/SConstruct +@@ -157,7 +157,7 @@ env.AlwaysBuild("test") + + + # Install the binary: +-env.Install("$DESTDIR$PREFIX/games", sky) ++env.Install("$DESTDIR$PREFIX/bin", sky) + + # Install the desktop file: + env.Install("$DESTDIR$PREFIX/share/applications", "endless-sky.desktop") diff --git a/testing/endless-sky/no-werror.patch b/testing/endless-sky/no-werror.patch new file mode 100644 index 00000000000..9c817cf8d9d --- /dev/null +++ b/testing/endless-sky/no-werror.patch @@ -0,0 +1,13 @@ +diff --git a/SConstruct b/SConstruct +index 6d25bdf..51e4b0c 100644 +--- a/SConstruct ++++ b/SConstruct +@@ -46,7 +46,7 @@ Help(opts.GenerateHelpText(env)) + # $ CXXFLAGS=-msse3 scons + # $ CXXFLAGS=-march=native scons + # or modify the `flags` variable: +-flags = ["-std=c++11", "-Wall", "-Werror", "-Wold-style-cast"] ++flags = ["-std=c++11", "-Wall", "-Wold-style-cast"] + if env["mode"] != "debug": + flags += ["-O3", "-flto"] + env.Append(LINKFLAGS = ["-O3", "-flto"])