public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: games-simulation/EmptyEpsilon/files/, games-simulation/EmptyEpsilon/
@ 2021-10-09 15:02 Florian Schmaus
  0 siblings, 0 replies; 2+ messages in thread
From: Florian Schmaus @ 2021-10-09 15:02 UTC (permalink / raw
  To: gentoo-commits

commit:     eb6fc9c7005c78ddadba92660dec4eb156de3a09
Author:     Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Sat Oct  9 15:01:34 2021 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Sat Oct  9 15:01:50 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=eb6fc9c7

games-simulation/EmptyEpsilon: initial import

Closes: https://bugs.gentoo.org/717592
Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 .../EmptyEpsilon/EmptyEpsilon-2021.06.23.ebuild    | 68 ++++++++++++++++++++++
 games-simulation/EmptyEpsilon/Manifest             |  2 +
 ...yEpsilon-Make-CMake-call-find_package-glm.patch | 35 +++++++++++
 .../files/SeriousProton-Unbundle-json11.patch      | 27 +++++++++
 games-simulation/EmptyEpsilon/metadata.xml         |  8 +++
 5 files changed, 140 insertions(+)

diff --git a/games-simulation/EmptyEpsilon/EmptyEpsilon-2021.06.23.ebuild b/games-simulation/EmptyEpsilon/EmptyEpsilon-2021.06.23.ebuild
new file mode 100644
index 00000000000..5d9e67d4a9f
--- /dev/null
+++ b/games-simulation/EmptyEpsilon/EmptyEpsilon-2021.06.23.ebuild
@@ -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
+}

diff --git a/games-simulation/EmptyEpsilon/Manifest b/games-simulation/EmptyEpsilon/Manifest
new file mode 100644
index 00000000000..a04319c8d93
--- /dev/null
+++ b/games-simulation/EmptyEpsilon/Manifest
@@ -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

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
new file mode 100644
index 00000000000..da52f0267f7
--- /dev/null
+++ b/games-simulation/EmptyEpsilon/files/EmptyEpsilon-Make-CMake-call-find_package-glm.patch
@@ -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
+

diff --git a/games-simulation/EmptyEpsilon/files/SeriousProton-Unbundle-json11.patch b/games-simulation/EmptyEpsilon/files/SeriousProton-Unbundle-json11.patch
new file mode 100644
index 00000000000..deb44e9aee0
--- /dev/null
+++ b/games-simulation/EmptyEpsilon/files/SeriousProton-Unbundle-json11.patch
@@ -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
+

diff --git a/games-simulation/EmptyEpsilon/metadata.xml b/games-simulation/EmptyEpsilon/metadata.xml
new file mode 100644
index 00000000000..87a759d410c
--- /dev/null
+++ b/games-simulation/EmptyEpsilon/metadata.xml
@@ -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>


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: games-simulation/EmptyEpsilon/files/, games-simulation/EmptyEpsilon/
@ 2021-10-21 11:13 Florian Schmaus
  0 siblings, 0 replies; 2+ messages in thread
From: Florian Schmaus @ 2021-10-21 11:13 UTC (permalink / raw
  To: gentoo-commits

commit:     e6ba27a83a9b9e1df6b4e370e15e6a798f08060e
Author:     Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Thu Oct 21 10:52:39 2021 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Thu Oct 21 11:13:11 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e6ba27a8

games-simulation/EmptyEpsilon: install .desktop file

Closes: https://bugs.gentoo.org/818697
Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 ...23.ebuild => EmptyEpsilon-2021.06.23-r1.ebuild} |  1 +
 ...EmptyEpsilon-Install-EmptyEpsilon.desktop.patch | 45 ++++++++++++++++++++++
 2 files changed, 46 insertions(+)

diff --git a/games-simulation/EmptyEpsilon/EmptyEpsilon-2021.06.23.ebuild b/games-simulation/EmptyEpsilon/EmptyEpsilon-2021.06.23-r1.ebuild
similarity index 96%
rename from games-simulation/EmptyEpsilon/EmptyEpsilon-2021.06.23.ebuild
rename to games-simulation/EmptyEpsilon/EmptyEpsilon-2021.06.23-r1.ebuild
index 5d9e67d4a9f..046224a20d1 100644
--- a/games-simulation/EmptyEpsilon/EmptyEpsilon-2021.06.23.ebuild
+++ b/games-simulation/EmptyEpsilon/EmptyEpsilon-2021.06.23-r1.ebuild
@@ -44,6 +44,7 @@ pkg_pretend() {
 }
 
 src_prepare() {
+	eapply "${FILESDIR}/${PN}-Install-EmptyEpsilon.desktop.patch"
 	eapply "${FILESDIR}/${PN}-Make-CMake-call-find_package-glm.patch"
 	eapply --directory="${WORKDIR}/SeriousProton-EE-${PV}" \
 		   "${FILESDIR}/SeriousProton-Unbundle-json11.patch"

diff --git a/games-simulation/EmptyEpsilon/files/EmptyEpsilon-Install-EmptyEpsilon.desktop.patch b/games-simulation/EmptyEpsilon/files/EmptyEpsilon-Install-EmptyEpsilon.desktop.patch
new file mode 100644
index 00000000000..4730bcbabb2
--- /dev/null
+++ b/games-simulation/EmptyEpsilon/files/EmptyEpsilon-Install-EmptyEpsilon.desktop.patch
@@ -0,0 +1,45 @@
+From c34c773ab5a403c288d7eecd971ae5b0d9eecfa0 Mon Sep 17 00:00:00 2001
+From: Florian Schmaus <flo@geekplace.eu>
+Date: Thu, 21 Oct 2021 10:33:28 +0200
+Subject: [PATCH] Install EmptyEpsilon.desktop
+
+Fixes #405.
+
+See also https://bugs.gentoo.org/818697
+---
+ CMakeLists.txt       | 5 +++++
+ EmptyEpsilon.desktop | 9 +++++++++
+ 2 files changed, 14 insertions(+)
+ create mode 100644 EmptyEpsilon.desktop
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index cb3e32c0e6ed..b630668aecd9 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -711,3 +711,8 @@ set(CPACK_INSTALL_CMAKE_PROJECTS
+ )
+ 
+ include(CPack)
++
++if(UNIX AND NOT APPLE)
++  install(FILES EmptyEpsilon.desktop DESTINATION "share/applications")
++  install(FILES logo.png DESTINATION "share/icons" RENAME "EmptyEpsilon.png")
++endif()
+diff --git a/EmptyEpsilon.desktop b/EmptyEpsilon.desktop
+new file mode 100644
+index 000000000000..07cc109b578d
+--- /dev/null
++++ b/EmptyEpsilon.desktop
+@@ -0,0 +1,9 @@
++[Desktop Entry]
++Name=EmptyEpsilon
++GenericName=EmptyEpsilon
++Comment=Spaceship bridge simulator game
++Exec=EmptyEpsilon
++Icon=EmptyEpsilon
++Terminal=false
++Type=Application
++Categories=Game;Simulation;
+-- 
+2.33.1
+


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-10-21 11:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-21 11:13 [gentoo-commits] repo/gentoo:master commit in: games-simulation/EmptyEpsilon/files/, games-simulation/EmptyEpsilon/ Florian Schmaus
  -- strict thread matches above, loose matches on Subject: below --
2021-10-09 15:02 Florian Schmaus

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox