[gentoo-commits] repo/gentoo:master commit in: games-simulation/EmptyEpsilon/, games-simulation/EmptyEpsilon/files/

2022-05-22 Thread Florian Schmaus
commit: df31905a60fab5a2db71994d7b2a2eeabeb31268
Author: Florian Schmaus  gentoo  org>
AuthorDate: Sun May 22 17:53:56 2022 +
Commit: Florian Schmaus  gentoo  org>
CommitDate: Sun May 22 17:53:56 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=df31905a

games-simulation/EmptyEpsilon: fix compilation with gcc 12

Closes: https://bugs.gentoo.org/846935
Signed-off-by: Florian Schmaus  gentoo.org>

 .../EmptyEpsilon/EmptyEpsilon-2022.03.16.ebuild|  6 +-
 ...Add-missing-include-memory-to-websocket.h.patch | 23 ++
 2 files changed, 28 insertions(+), 1 deletion(-)

diff --git a/games-simulation/EmptyEpsilon/EmptyEpsilon-2022.03.16.ebuild 
b/games-simulation/EmptyEpsilon/EmptyEpsilon-2022.03.16.ebuild
index 9842d07150b2..3ab9976cc817 100644
--- a/games-simulation/EmptyEpsilon/EmptyEpsilon-2022.03.16.ebuild
+++ b/games-simulation/EmptyEpsilon/EmptyEpsilon-2022.03.16.ebuild
@@ -70,8 +70,12 @@ src_prepare() {
ln -rs "${target}" "${link}" || die
done
 
+   local serious_proton_patches=(
+   "${FILESDIR}/SeriousProton-cmake.patch"
+   
"${FILESDIR}/SeriousProton-Add-missing-include-memory-to-websocket.h.patch"
+   )
eapply --directory="${WORKDIR}/SeriousProton-EE-${PV}" \
-  "${FILESDIR}/SeriousProton-cmake.patch"
+  "${serious_proton_patches[@]}"
 }
 
 src_configure() {

diff --git 
a/games-simulation/EmptyEpsilon/files/SeriousProton-Add-missing-include-memory-to-websocket.h.patch
 
b/games-simulation/EmptyEpsilon/files/SeriousProton-Add-missing-include-memory-to-websocket.h.patch
new file mode 100644
index ..861eaa781e8f
--- /dev/null
+++ 
b/games-simulation/EmptyEpsilon/files/SeriousProton-Add-missing-include-memory-to-websocket.h.patch
@@ -0,0 +1,23 @@
+From 9fe127233eae44f14e37900c3f54e8a305d2f161 Mon Sep 17 00:00:00 2001
+From: Florian Schmaus 
+Date: Sun, 22 May 2022 12:36:08 +0200
+Subject: [PATCH] Add missing #include  to websocket.h
+
+std::unique_ptr, which is used for the 'socket' field, is defined in
+ but currently not included. Starting with GCC 12, the missing
+include will cause a compilation error.
+
+The missing include was found by Gentoo's CI and reported as
+https://bugs.gentoo.org/846935
+--- a/src/io/http/websocket.h
 b/src/io/http/websocket.h
+@@ -5,6 +5,9 @@
+ #include 
+ #include 
+ 
++#ifndef EMSCRIPTEN
++#include 
++#endif
+ 
+ namespace sp {
+ namespace io {



[gentoo-commits] repo/gentoo:master commit in: games-simulation/EmptyEpsilon/, games-simulation/EmptyEpsilon/files/

2022-05-16 Thread Florian Schmaus
commit: eb81f1f23a16118debe1daebbccc58d02a3f5631
Author: Florian Schmaus  gentoo  org>
AuthorDate: Mon May 16 09:59:11 2022 +
Commit: Florian Schmaus  gentoo  org>
CommitDate: Mon May 16 10:12:05 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=eb81f1f2

games-simulation/EmptyEpsilon: add 2022.03.16

Signed-off-by: Florian Schmaus  gentoo.org>

 .../EmptyEpsilon/EmptyEpsilon-2022.03.16.ebuild| 88 ++
 games-simulation/EmptyEpsilon/Manifest |  4 +
 .../files/EmptyEpsilon-cmake-meshoptimizer.patch   | 15 
 .../EmptyEpsilon/files/SeriousProton-cmake.patch   | 15 
 4 files changed, 122 insertions(+)

diff --git a/games-simulation/EmptyEpsilon/EmptyEpsilon-2022.03.16.ebuild 
b/games-simulation/EmptyEpsilon/EmptyEpsilon-2022.03.16.ebuild
new file mode 100644
index ..9842d07150b2
--- /dev/null
+++ b/games-simulation/EmptyEpsilon/EmptyEpsilon-2022.03.16.ebuild
@@ -0,0 +1,88 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake toolchain-funcs
+
+# basics_universal version
+MY_BU_VER="1_15_update2"
+# meshoptimizer version
+MY_MO_VER="0.16"
+
+DESCRIPTION="A spaceship bridge simulator game"
+HOMEPAGE="https://daid.github.io/EmptyEpsilon/;
+# This bundles SeriousProton as the build system does not support using
+# a separate SeriousProton instance (and currently EmptyEpsilon seems to
+# be the only consumer).
+SRC_URI="
+   https://github.com/daid/EmptyEpsilon/archive/EE-${PV}.tar.gz -> 
EmptyEpsilon-${PV}.tar.gz
+   https://github.com/daid/SeriousProton/archive/EE-${PV}.tar.gz -> 
SeriousProton-${PV}.tar.gz
+   
https://github.com/BinomialLLC/basis_universal/archive/refs/tags/v${MY_BU_VER}.tar.gz
 -> basis_universal_${MY_BU_VER}.tar.gz
+   
https://github.com/zeux/meshoptimizer/archive/refs/tags/v${MY_MO_VER}.tar.gz -> 
meshoptimizer-${MY_MO_VER}.tar.gz
+"
+
+# EmptyEpsilon is mostly licensed under GPL, however the art ressources
+# use Creative Commons and the bundled SeriousProton is MIT-licensed.
+LICENSE="Apache-2.0 GPL-2 CC-BY-SA-3.0 MIT"
+SLOT="0"
+KEYWORDS="~amd64"
+
+RDEPEND="
+   dev-cpp/nlohmann_json
+   media-libs/freetype
+   media-libs/libsdl2
+   >=media-libs/glm-0.9.9.8
+"
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}/EmptyEpsilon-EE-${PV}"
+
+PATCHES=(
+   "${FILESDIR}/${PN}-cmake-meshoptimizer.patch"
+)
+
+pkg_pretend() {
+   [[ ${MERGE_TYPE} == "binary" ]] && return
+
+   if tc-is-gcc; then
+   if [[ $(gcc-major-version) -lt 11 ]]; then
+   # ld: /usr/lib64/libsfml-audio.so: undefined reference 
to `std::__throw_bad_array_new_length()@GLIBCXX_3.a4.29'
+   eerror "${PN} requires GCC >= 11. Run gcc-config to 
switch your default compiler."
+   die "Need at least GCC >= 11"
+   fi
+   fi
+}
+
+src_prepare() {
+   cmake_src_prepare
+
+   local -A externals=()
+   
externals["${BUILD_DIR}/SeriousProton/externals/basis"]="${WORKDIR}/basis_universal-${MY_BU_VER}"
+   
externals["${BUILD_DIR}/externals/meshoptimizer"]="${WORKDIR}/meshoptimizer-${MY_MO_VER}"
+   local link
+   for link in "${!externals[@]}"; do
+   local external_dir=$(dirname "${link}")
+   if [[ ! -d "${external_dir}" ]]; then
+   mkdir -p "${external_dir}" || die
+   fi
+   local target="${externals[${link}]}"
+   ln -rs "${target}" "${link}" || die
+   done
+
+   eapply --directory="${WORKDIR}/SeriousProton-EE-${PV}" \
+  "${FILESDIR}/SeriousProton-cmake.patch"
+}
+
+src_configure() {
+   local version=( $(ver_rs 1- ' ') )
+   local mycmakeargs=(
+   -DSERIOUS_PROTON_DIR="${WORKDIR}/SeriousProton-EE-${PV}/"
+   -DCPACK_PACKAGE_VERSION="${PV}"
+   -DCPACK_PACKAGE_VERSION_MAJOR="${version[0]}"
+   -DCPACK_PACKAGE_VERSION_MINOR="${version[1]}"
+   -DCPACK_PACKAGE_VERSION_PATCH="${version[2]}"
+   )
+
+   cmake_src_configure
+}

diff --git a/games-simulation/EmptyEpsilon/Manifest 
b/games-simulation/EmptyEpsilon/Manifest
index a04319c8d93f..aaf0d0e732ff 100644
--- a/games-simulation/EmptyEpsilon/Manifest
+++ b/games-simulation/EmptyEpsilon/Manifest
@@ -1,2 +1,6 @@
 DIST EmptyEpsilon-2021.06.23.tar.gz 285211647 BLAKE2B 
813b7e02ff7f046b7f28139063441eb421861b720c7b55d25930d3a418211fefdce7ac0e6ab705b4afe52df58f85a9298ff3e6be883a841e6eb9f7037eca297b
 SHA512 
209ea68d99ef5ef53f1e3484d6471cafc01d4cb6505609a5b41d468387147127b4b4bbc20af75404d2cdef3d3cfb37bbb7f6fb3ae336d2f7e264e9c470ad7764
+DIST EmptyEpsilon-2022.03.16.tar.gz 258014053 BLAKE2B 
d447518c6887b5969bce48abc042a259733a6845a49ba767b274d17c1b0e28a025443d073563e269365837191439f7963f3a3775c58b143e97cef7b7c0cef336
 SHA512