Gentoo Archives: gentoo-commits

From: Florian Schmaus <flow@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: games-simulation/EmptyEpsilon/files/, games-simulation/EmptyEpsilon/
Date: Sat, 09 Oct 2021 15:02:26
Message-Id: 1633791710.eb6fc9c7005c78ddadba92660dec4eb156de3a09.flow@gentoo
1 commit: eb6fc9c7005c78ddadba92660dec4eb156de3a09
2 Author: Florian Schmaus <flow <AT> gentoo <DOT> org>
3 AuthorDate: Sat Oct 9 15:01:34 2021 +0000
4 Commit: Florian Schmaus <flow <AT> gentoo <DOT> org>
5 CommitDate: Sat Oct 9 15:01:50 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=eb6fc9c7
7
8 games-simulation/EmptyEpsilon: initial import
9
10 Closes: https://bugs.gentoo.org/717592
11 Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>
12
13 .../EmptyEpsilon/EmptyEpsilon-2021.06.23.ebuild | 68 ++++++++++++++++++++++
14 games-simulation/EmptyEpsilon/Manifest | 2 +
15 ...yEpsilon-Make-CMake-call-find_package-glm.patch | 35 +++++++++++
16 .../files/SeriousProton-Unbundle-json11.patch | 27 +++++++++
17 games-simulation/EmptyEpsilon/metadata.xml | 8 +++
18 5 files changed, 140 insertions(+)
19
20 diff --git a/games-simulation/EmptyEpsilon/EmptyEpsilon-2021.06.23.ebuild b/games-simulation/EmptyEpsilon/EmptyEpsilon-2021.06.23.ebuild
21 new file mode 100644
22 index 00000000000..5d9e67d4a9f
23 --- /dev/null
24 +++ b/games-simulation/EmptyEpsilon/EmptyEpsilon-2021.06.23.ebuild
25 @@ -0,0 +1,68 @@
26 +# Copyright 1999-2021 Gentoo Authors
27 +# Distributed under the terms of the GNU General Public License v2
28 +
29 +EAPI=8
30 +
31 +inherit cmake toolchain-funcs
32 +
33 +DESCRIPTION="A spaceship bridge simulator game."
34 +HOMEPAGE="https://daid.github.io/EmptyEpsilon/"
35 +# This bundles SeriousProton as the build system does not support using
36 +# a separate SeriousProton instance (and currently EmptyEpsilon seems to
37 +# be the only consumer).
38 +SRC_URI="https://github.com/daid/EmptyEpsilon/archive/EE-${PV}.tar.gz -> EmptyEpsilon-${PV}.tar.gz
39 + https://github.com/daid/SeriousProton/archive/EE-${PV}.tar.gz -> SeriousProton-${PV}.tar.gz"
40 +
41 +# EmptyEpsilon is mostly licensed under GPL, however the art ressources
42 +# use Creative Commons and the bundled SeriousProton is MIT-licensed.
43 +LICENSE="GPL-2 CC-BY-SA-3.0 MIT"
44 +SLOT="0"
45 +KEYWORDS="~amd64"
46 +
47 +RDEPEND="
48 + >=dev-cpp/json11-1.0.0
49 + media-libs/libglvnd
50 + media-libs/libsfml
51 + >=media-libs/glm-0.9.9.8
52 +"
53 +DEPEND="${RDEPEND}"
54 +
55 +S="${WORKDIR}/EmptyEpsilon-EE-${PV}"
56 +
57 +pkg_pretend() {
58 + if [[ ${MERGE_TYPE} == "binary" ]]; then
59 + return
60 + fi
61 +
62 + if tc-is-gcc; then
63 + if [[ $(gcc-major-version) -lt 11 ]]; then
64 + # ld: /usr/lib64/libsfml-audio.so: undefined reference to `std::__throw_bad_array_new_length()@GLIBCXX_3.a4.29'
65 + eerror "${PN} requires GCC >= 11. Run gcc-config to switch your default compiler."
66 + die "Need at least GCC >= 11"
67 + fi
68 + fi
69 +}
70 +
71 +src_prepare() {
72 + eapply "${FILESDIR}/${PN}-Make-CMake-call-find_package-glm.patch"
73 + eapply --directory="${WORKDIR}/SeriousProton-EE-${PV}" \
74 + "${FILESDIR}/SeriousProton-Unbundle-json11.patch"
75 +
76 + eapply_user
77 +
78 + cmake_src_prepare
79 +}
80 +
81 +src_configure() {
82 + local version=( $(ver_rs 1- ' ') )
83 + local mycmakeargs=(
84 + -DSERIOUS_PROTON_DIR="${WORKDIR}/SeriousProton-EE-${PV}/"
85 + -DOpenGL_GL_PREFERENCE=GLVND
86 + -DCPACK_PACKAGE_VERSION="${PV}"
87 + -DCPACK_PACKAGE_VERSION_MAJOR="${version[0]}"
88 + -DCPACK_PACKAGE_VERSION_MINOR="${version[1]}"
89 + -DCPACK_PACKAGE_VERSION_PATCH="${version[2]}"
90 + )
91 +
92 + cmake_src_configure
93 +}
94
95 diff --git a/games-simulation/EmptyEpsilon/Manifest b/games-simulation/EmptyEpsilon/Manifest
96 new file mode 100644
97 index 00000000000..a04319c8d93
98 --- /dev/null
99 +++ b/games-simulation/EmptyEpsilon/Manifest
100 @@ -0,0 +1,2 @@
101 +DIST EmptyEpsilon-2021.06.23.tar.gz 285211647 BLAKE2B 813b7e02ff7f046b7f28139063441eb421861b720c7b55d25930d3a418211fefdce7ac0e6ab705b4afe52df58f85a9298ff3e6be883a841e6eb9f7037eca297b SHA512 209ea68d99ef5ef53f1e3484d6471cafc01d4cb6505609a5b41d468387147127b4b4bbc20af75404d2cdef3d3cfb37bbb7f6fb3ae336d2f7e264e9c470ad7764
102 +DIST SeriousProton-2021.06.23.tar.gz 1181117 BLAKE2B 433280b7f6994bed0b86ffc4135a1e91bd9521c508b875332d17dc041da6b77a4260de784b6b75e79aab072d6bc68108a8b6b4949d674670f1d13ed1abe90d7e SHA512 4519801c30cd87436704023090ce39299573b02637a86b0d5c6ac0f4e99b4bddc6724b2b660edfd29d33a908b67268409a8c47dab7b5d59958a5abd52d5610bf
103
104 diff --git a/games-simulation/EmptyEpsilon/files/EmptyEpsilon-Make-CMake-call-find_package-glm.patch b/games-simulation/EmptyEpsilon/files/EmptyEpsilon-Make-CMake-call-find_package-glm.patch
105 new file mode 100644
106 index 00000000000..da52f0267f7
107 --- /dev/null
108 +++ b/games-simulation/EmptyEpsilon/files/EmptyEpsilon-Make-CMake-call-find_package-glm.patch
109 @@ -0,0 +1,35 @@
110 +From 7efb73d1a964f04646dba692323c1affcb25d16e Mon Sep 17 00:00:00 2001
111 +From: Florian Schmaus <flow@g.o>
112 +Date: Fri, 8 Oct 2021 11:07:20 +0200
113 +Subject: [PATCH] Make CMake call find_package(glm)
114 +
115 +---
116 + CMakeLists.txt | 12 +-----------
117 + 1 file changed, 1 insertion(+), 11 deletions(-)
118 +
119 +diff --git a/CMakeLists.txt b/CMakeLists.txt
120 +index 6fb5c88f6614..9d65d1ef2653 100644
121 +--- a/CMakeLists.txt
122 ++++ b/CMakeLists.txt
123 +@@ -106,17 +106,7 @@ if(WITH_DISCORD)
124 + endif()
125 +
126 + # GLM
127 +-set(GLM_BASE_PATH "${EXTERNALS_DIR}")
128 +-
129 +-if(NOT EXISTS "${GLM_BASE_PATH}/glm/CMakeLists.txt")
130 +- set(GLM_ZIP "${DOWNLOADS_DIR}/glm.zip")
131 +- 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)
132 +-
133 +- file(MAKE_DIRECTORY "${GLM_BASE_PATH}/glm")
134 +- execute_process(COMMAND ${CMAKE_COMMAND} -E tar -xf "${GLM_ZIP}" WORKING_DIRECTORY "${GLM_BASE_PATH}")
135 +-endif()
136 +-
137 +-add_subdirectory("${GLM_BASE_PATH}/glm" "${PROJECT_BINARY_DIR}/glm" EXCLUDE_FROM_ALL)
138 ++find_package(glm)
139 +
140 + set(SOURCES
141 + src/main.cpp
142 +--
143 +2.32.0
144 +
145
146 diff --git a/games-simulation/EmptyEpsilon/files/SeriousProton-Unbundle-json11.patch b/games-simulation/EmptyEpsilon/files/SeriousProton-Unbundle-json11.patch
147 new file mode 100644
148 index 00000000000..deb44e9aee0
149 --- /dev/null
150 +++ b/games-simulation/EmptyEpsilon/files/SeriousProton-Unbundle-json11.patch
151 @@ -0,0 +1,27 @@
152 +From ae5ea143e6a9f57c797a96b9024c8acc60f05828 Mon Sep 17 00:00:00 2001
153 +From: Florian Schmaus <flo@g.o>
154 +Date: Fri, 8 Oct 2021 13:26:27 +0200
155 +Subject: [PATCH] Unbundle json11
156 +
157 +---
158 + CMakeLists.txt | 4 ----
159 + 1 file changed, 4 deletions(-)
160 +
161 +diff --git a/CMakeLists.txt b/CMakeLists.txt
162 +index 4b57a4f6631a..0a06c3186ff5 100644
163 +--- a/CMakeLists.txt
164 ++++ b/CMakeLists.txt
165 +@@ -86,10 +86,6 @@ add_subdirectory(src/lua)
166 + add_subdirectory(src/GL)
167 + add_subdirectory(src/libopus)
168 +
169 +-if(SERIOUSPROTON_WITH_JSON)
170 +- add_subdirectory(src/json11)
171 +-endif()
172 +-
173 + #---------------------------------File lists-----------------------------------
174 + set(source_files #All SeriousProton's objects to compile
175 + src/clipboard.cpp
176 +--
177 +2.32.0
178 +
179
180 diff --git a/games-simulation/EmptyEpsilon/metadata.xml b/games-simulation/EmptyEpsilon/metadata.xml
181 new file mode 100644
182 index 00000000000..87a759d410c
183 --- /dev/null
184 +++ b/games-simulation/EmptyEpsilon/metadata.xml
185 @@ -0,0 +1,8 @@
186 +<?xml version="1.0" encoding="UTF-8"?>
187 +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
188 +<pkgmetadata>
189 + <maintainer type="person">
190 + <name>Florian Schmaus</name>
191 + <email>flow@g.o</email>
192 + </maintainer>
193 +</pkgmetadata>