logo

overlay

My own overlay for experimentations, use with caution, no support is provided git clone https://hacktivis.me/git/overlay.git

shiromino-0.2.1.ebuild (1853B)


  1. # Copyright 2023 Haelwenn (lanodan) Monnier <contact@hacktivis.me>
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=8
  4. inherit cmake
  5. DESCRIPTION="fast-paced puzzle game with roots in the arcade"
  6. HOMEPAGE="https://github.com/shiromino/shiromino"
  7. MY_PDBM_COMMIT="f16abc76419f2df31c8c3f0642bedaad99201cda"
  8. SRC_URI="
  9. https://github.com/shiromino/shiromino/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz
  10. https://github.com/nightmareci/PDBMFont/archive/${MY_PDBM_COMMIT}.tar.gz -> PDBMFont-${MY_PDBM_COMMIT}.tar.gz
  11. "
  12. PDBMFont_S="${WORKDIR}/PDBMFont-${MY_PDBM_COMMIT}/"
  13. # Main under MIT, music under CC-BY-4.0, font under Unlicense
  14. LICENSE="MIT CC-BY-4.0 Unlicense"
  15. SLOT="0"
  16. KEYWORDS="~amd64"
  17. IUSE=""
  18. BDEPEND="virtual/pkgconfig"
  19. RDEPEND="
  20. media-libs/libvorbis
  21. media-libs/libsdl2
  22. media-libs/sdl2-image
  23. media-libs/sdl2-mixer
  24. dev-db/sqlite:3
  25. dev-libs/tinyxml2:=
  26. "
  27. DEPEND="${RDEPEND}"
  28. PATCHES=( "${FILESDIR}/shiromino-0.2.1-fix_cmake_targets.patch" )
  29. src_prepare() {
  30. cmake_src_prepare
  31. rm "${PDBMFont_S}/tinyxml2.cpp" "${PDBMFont_S}/tinyxml2.h" || die
  32. sed -i -e 's;#include "tinyxml2.h";#include <tinyxml2.h>;' "${PDBMFont_S}/PDBMFont.hpp" || die
  33. # "${PDBMFont_S}/CMakeLists.txt" isn't used by Shiromino which defines it's own targets instead
  34. #sed -i \
  35. # -e '/tinyxml2.cpp/d' \
  36. # -e '/SDL2_image REQUIRED/afind_package(tinyxml2 REQUIRED)' \
  37. # -e 's/SDL2_image::SDL2_image/SDL2_image::SDL2_image tinyxml2/' \
  38. # "${PDBMFont_S}/CMakeLists.txt" || die
  39. sed -i \
  40. -e '/tinyxml2\./d' \
  41. -e '/MINIMUM_SDL2_VERSION/iset(MINIMUM_TINYXML2_VERSION 0)' \
  42. -e '/set(DEPENDENCIES/a tinyxml2' \
  43. CMakeLists.txt || die
  44. }
  45. src_configure() {
  46. local mycmakeargs=(
  47. -DCMAKE_INSTALL_SYSCONFDIR="${EPREFIX}/etc"
  48. -DFETCHCONTENT_FULLY_DISCONNECTED=ON
  49. -DFETCHCONTENT_SOURCE_DIR_PDBM_FONT="${PDBMFont_S}"
  50. )
  51. cmake_src_configure
  52. }