games-simulation/EmptyEpsilon: initial import

Closes: https://bugs.gentoo.org/717592
Signed-off-by: Florian Schmaus <flow@gentoo.org>
This commit is contained in:
Florian Schmaus
2021-10-09 17:01:34 +02:00
parent bfbbc7e530
commit eb6fc9c700
5 changed files with 140 additions and 0 deletions

View File

@@ -0,0 +1,68 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit cmake toolchain-funcs
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"
# EmptyEpsilon is mostly licensed under GPL, however the art ressources
# use Creative Commons and the bundled SeriousProton is MIT-licensed.
LICENSE="GPL-2 CC-BY-SA-3.0 MIT"
SLOT="0"
KEYWORDS="~amd64"
RDEPEND="
>=dev-cpp/json11-1.0.0
media-libs/libglvnd
media-libs/libsfml
>=media-libs/glm-0.9.9.8
"
DEPEND="${RDEPEND}"
S="${WORKDIR}/EmptyEpsilon-EE-${PV}"
pkg_pretend() {
if [[ ${MERGE_TYPE} == "binary" ]]; then
return
fi
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() {
eapply "${FILESDIR}/${PN}-Make-CMake-call-find_package-glm.patch"
eapply --directory="${WORKDIR}/SeriousProton-EE-${PV}" \
"${FILESDIR}/SeriousProton-Unbundle-json11.patch"
eapply_user
cmake_src_prepare
}
src_configure() {
local version=( $(ver_rs 1- ' ') )
local mycmakeargs=(
-DSERIOUS_PROTON_DIR="${WORKDIR}/SeriousProton-EE-${PV}/"
-DOpenGL_GL_PREFERENCE=GLVND
-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
}

View File

@@ -0,0 +1,2 @@
DIST EmptyEpsilon-2021.06.23.tar.gz 285211647 BLAKE2B 813b7e02ff7f046b7f28139063441eb421861b720c7b55d25930d3a418211fefdce7ac0e6ab705b4afe52df58f85a9298ff3e6be883a841e6eb9f7037eca297b SHA512 209ea68d99ef5ef53f1e3484d6471cafc01d4cb6505609a5b41d468387147127b4b4bbc20af75404d2cdef3d3cfb37bbb7f6fb3ae336d2f7e264e9c470ad7764
DIST SeriousProton-2021.06.23.tar.gz 1181117 BLAKE2B 433280b7f6994bed0b86ffc4135a1e91bd9521c508b875332d17dc041da6b77a4260de784b6b75e79aab072d6bc68108a8b6b4949d674670f1d13ed1abe90d7e SHA512 4519801c30cd87436704023090ce39299573b02637a86b0d5c6ac0f4e99b4bddc6724b2b660edfd29d33a908b67268409a8c47dab7b5d59958a5abd52d5610bf

View File

@@ -0,0 +1,35 @@
From 7efb73d1a964f04646dba692323c1affcb25d16e Mon Sep 17 00:00:00 2001
From: Florian Schmaus <flow@gentoo.org>
Date: Fri, 8 Oct 2021 11:07:20 +0200
Subject: [PATCH] Make CMake call find_package(glm)
---
CMakeLists.txt | 12 +-----------
1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6fb5c88f6614..9d65d1ef2653 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -106,17 +106,7 @@ if(WITH_DISCORD)
endif()
# GLM
-set(GLM_BASE_PATH "${EXTERNALS_DIR}")
-
-if(NOT EXISTS "${GLM_BASE_PATH}/glm/CMakeLists.txt")
- set(GLM_ZIP "${DOWNLOADS_DIR}/glm.zip")
- file(DOWNLOAD "https://github.com/g-truc/glm/releases/download/0.9.9.8/glm-0.9.9.8.zip" "${GLM_ZIP}" TIMEOUT 60 TLS_VERIFY ON)
-
- file(MAKE_DIRECTORY "${GLM_BASE_PATH}/glm")
- execute_process(COMMAND ${CMAKE_COMMAND} -E tar -xf "${GLM_ZIP}" WORKING_DIRECTORY "${GLM_BASE_PATH}")
-endif()
-
-add_subdirectory("${GLM_BASE_PATH}/glm" "${PROJECT_BINARY_DIR}/glm" EXCLUDE_FROM_ALL)
+find_package(glm)
set(SOURCES
src/main.cpp
--
2.32.0

View File

@@ -0,0 +1,27 @@
From ae5ea143e6a9f57c797a96b9024c8acc60f05828 Mon Sep 17 00:00:00 2001
From: Florian Schmaus <flo@gentoo.org>
Date: Fri, 8 Oct 2021 13:26:27 +0200
Subject: [PATCH] Unbundle json11
---
CMakeLists.txt | 4 ----
1 file changed, 4 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4b57a4f6631a..0a06c3186ff5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -86,10 +86,6 @@ add_subdirectory(src/lua)
add_subdirectory(src/GL)
add_subdirectory(src/libopus)
-if(SERIOUSPROTON_WITH_JSON)
- add_subdirectory(src/json11)
-endif()
-
#---------------------------------File lists-----------------------------------
set(source_files #All SeriousProton's objects to compile
src/clipboard.cpp
--
2.32.0

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<name>Florian Schmaus</name>
<email>flow@gentoo.org</email>
</maintainer>
</pkgmetadata>