marble-marcher-ce-9999.ebuild 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. # Copyright 1999-2022 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=8
  4. inherit cmake readme.gentoo-r1
  5. if [[ ${PV} == 9999 ]]; then
  6. inherit git-r3
  7. EGIT_REPO_URI="https://github.com/WAUthethird/Marble-Marcher-Community-Edition"
  8. EGIT_BRANCH="master"
  9. KEYWORDS=""
  10. else
  11. SRC_URI="https://github.com/WAUthethird/Marble-Marcher-Community-Edition/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"
  12. S=${WORKDIR}/Marble-Marcher-Community-Edition-${PV}
  13. KEYWORDS="~amd64 ~x86"
  14. fi
  15. MY_PN="MarbleMarcher"
  16. DESCRIPTION="A procedurally rendered fractal physics marble game"
  17. HOMEPAGE="https://michaelmoroz.itch.io/mmce"
  18. SLOT="0"
  19. LICENSE="GPL-2"
  20. IUSE=""
  21. DEPEND="
  22. >=media-libs/libsfml-2.5.1
  23. media-libs/glew:=
  24. media-libs/glm:=
  25. media-libs/openal:*
  26. media-libs/anttweakbar:*
  27. "
  28. RDEPEND="${DEPEND}"
  29. BDEPEND="
  30. >=dev-libs/boost-1.60.0
  31. >=dev-cpp/eigen-3.3.4
  32. "
  33. RESTRICT="mirror"
  34. DOC_CONTENTS="
  35. Marble Marcher: Community Edition comes with a wealth of new features and improvements, including performance improvements and graphical enhancements.
  36. "
  37. src_configure() {
  38. CMAKE_BUILD_TYPE="Release"
  39. sed -i "/ SFML_STATIC/d" CMakeLists.txt || die
  40. cmake_src_configure
  41. }
  42. src_install() {
  43. cmake_src_install
  44. local MMCE_HOME="/usr/$(get_libdir)/${PN}"
  45. exeinto "${MMCE_HOME}"
  46. insinto "${MMCE_HOME}"
  47. doins "${BUILD_DIR}/src/libMarbleMarcherSources.so"
  48. echo "#! /bin/sh" > ${MY_PN}-launcher.sh
  49. echo "pushd \"${MMCE_HOME}\" > /dev/null && LD_LIBRARY_PATH=\"${MMCE_HOME}\" exec \"./\$(basename \$0)\" \"\$\@\" && popd" >> ${MY_PN}-launcher.sh
  50. doexe "${MY_PN}-launcher.sh"
  51. dosym "${MMCE_HOME}/${MY_PN}-launcher.sh" /usr/bin/${MY_PN}
  52. mkdir -p ${D}/usr/share/${PN} || die
  53. mv ${D}/home/MMCE/* ${D}/${MMCE_HOME} || die
  54. rm -r ${D}/home || die
  55. mkdir -p ${D}/usr/share/applications && cat >"${D}/usr/share/applications/${MY_PN}.desktop" <<EOF
  56. [Desktop Entry]
  57. Version=1.0
  58. Type=Application
  59. Name=Marble Marcher: Community Edition
  60. Icon=${MMCE_HOME}/images/MarbleMarcher.png
  61. Exec=/usr/bin/${MY_PN}
  62. Categories=Game;
  63. Terminal=false
  64. EOF
  65. readme.gentoo_create_doc
  66. }
  67. pkg_postinst() {
  68. readme.gentoo_print_elog
  69. }