commit: d0c2c9e3235f6cf878a805596c2dcac85c41dab8 parent a1f8ef7958c31b96e54bb610a18878d66969c299 Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me> Date: Wed, 21 Jun 2023 01:59:17 +0200 games-arcade/shiromino: new package, add 0.2.1Diffstat:
A | games-arcade/shiromino/Manifest | 2 | ++ |
A | games-arcade/shiromino/files/shiromino-0.2.1-fix_cmake_targets.patch | 27 | +++++++++++++++++++++++++++ |
A | games-arcade/shiromino/shiromino-0.2.1.ebuild | 65 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
3 files changed, 94 insertions(+), 0 deletions(-)diff --git a/games-arcade/shiromino/Manifest b/games-arcade/shiromino/Manifest
@@ -0,0 +1,2 @@ +DIST PDBMFont-f16abc76419f2df31c8c3f0642bedaad99201cda.tar.gz 49520 BLAKE2B d0c8e5920e2096b672c7e300d6539f3c31433cada52b01b47f6c112256bddc202dcb2b4103a40ffea5b65c82a1a10d57d9585617ca3b8496028f9e08332e46ba SHA512 694d442d957968c6185b4417691cc49dca07541d371730cc51fbdbfc5b009f5c8a1f6a060813322277ea02cbf67f1a46056857e708a8e3d475d07bca8cd93b8c +DIST shiromino-0.2.1.tar.gz 16914335 BLAKE2B 11763d60b00b07493b0cb76f7948db29ef1bb8788dd09e51f891a57cb79d8aae52a8da76df7ed7f48dfe672750f976750122fe0ddfeaf9a111ce98d71512481f SHA512 770295aa77f50edabb3b99f037ca394e2572df2fb657b8c81ed1bed189ee8791fc1b022989aa4a6944148ffcfb6827e6fbda86de51f39d1892fad5654a16b7e5diff --git a/games-arcade/shiromino/files/shiromino-0.2.1-fix_cmake_targets.patch b/games-arcade/shiromino/files/shiromino-0.2.1-fix_cmake_targets.patch
@@ -0,0 +1,27 @@ +Taken from 36d9eb04f5cbb0815e91681b67cc4e44033fb023 + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 6d8b1e6..cce87d3 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,4 +1,4 @@ +-cmake_minimum_required(VERSION 3.15) ++cmake_minimum_required(VERSION 3.16) + project(shiromino + DESCRIPTION "A fast-paced puzzle game with roots in the arcade." + HOMEPAGE_URL "https://github.com/shiromino/shiromino" +@@ -319,7 +319,8 @@ endif() + # + # Installation + # +-install(DIRECTORY data DESTINATION usr/share/${PROJECT_NAME}) +-install(FILES LICENSE.md DESTINATION usr/share/licenses/${PROJECT_NAME}) +-install(FILES shiromino.ini TYPE SYSCONF) +-install(TARGETS ${GAME_EXECUTABLE} RUNTIME DESTINATION usr/bin) +\ No newline at end of file ++include(GNUInstallDirs) ++install(DIRECTORY data DESTINATION "${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}") ++install(FILES LICENSE.md DESTINATION "${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}") ++install(FILES shiromino.ini TYPE SYSCONF) ++install(TARGETS ${GAME_EXECUTABLE} RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}") +\ No newline at end of filediff --git a/games-arcade/shiromino/shiromino-0.2.1.ebuild b/games-arcade/shiromino/shiromino-0.2.1.ebuild
@@ -0,0 +1,65 @@ +# Copyright 2023 Haelwenn (lanodan) Monnier <contact@hacktivis.me> +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake + +DESCRIPTION="fast-paced puzzle game with roots in the arcade" +HOMEPAGE="https://github.com/shiromino/shiromino" +MY_PDBM_COMMIT="f16abc76419f2df31c8c3f0642bedaad99201cda" +SRC_URI=" + https://github.com/shiromino/shiromino/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz + https://github.com/nightmareci/PDBMFont/archive/${MY_PDBM_COMMIT}.tar.gz -> PDBMFont-${MY_PDBM_COMMIT}.tar.gz +" +PDBMFont_S="${WORKDIR}/PDBMFont-${MY_PDBM_COMMIT}/" + +# Main under MIT, music under CC-BY-4.0, font under Unlicense +LICENSE="MIT CC-BY-4.0 Unlicense" +SLOT="0" +KEYWORDS="~amd64" +IUSE="" + +BDEPEND="virtual/pkgconfig" + +RDEPEND=" + media-libs/libvorbis + media-libs/libsdl2 + media-libs/sdl2-image + media-libs/sdl2-mixer + dev-db/sqlite:3 + dev-libs/tinyxml2:= +" +DEPEND="${RDEPEND}" + +PATCHES=( "${FILESDIR}/shiromino-0.2.1-fix_cmake_targets.patch" ) + +src_prepare() { + cmake_src_prepare + + rm "${PDBMFont_S}/tinyxml2.cpp" "${PDBMFont_S}/tinyxml2.h" || die + + sed -i -e 's;#include "tinyxml2.h";#include <tinyxml2.h>;' "${PDBMFont_S}/PDBMFont.hpp" || die + # "${PDBMFont_S}/CMakeLists.txt" isn't used by Shiromino which defines it's own targets instead + #sed -i \ + # -e '/tinyxml2.cpp/d' \ + # -e '/SDL2_image REQUIRED/afind_package(tinyxml2 REQUIRED)' \ + # -e 's/SDL2_image::SDL2_image/SDL2_image::SDL2_image tinyxml2/' \ + # "${PDBMFont_S}/CMakeLists.txt" || die + + sed -i \ + -e '/tinyxml2\./d' \ + -e '/MINIMUM_SDL2_VERSION/iset(MINIMUM_TINYXML2_VERSION 0)' \ + -e '/set(DEPENDENCIES/a tinyxml2' \ + CMakeLists.txt || die +} + +src_configure() { + local mycmakeargs=( + -DCMAKE_INSTALL_SYSCONFDIR="${EPREFIX}/etc" + -DFETCHCONTENT_FULLY_DISCONNECTED=ON + -DFETCHCONTENT_SOURCE_DIR_PDBM_FONT="${PDBMFont_S}" + ) + + cmake_src_configure +}