logo

overlay

My own overlay for experimentations, use with caution, no support is provided

oshu-2.0.0.ebuild (1317B)


  1. # Copyright 1999-2018 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. inherit cmake-utils
  5. DESCRIPTION="Lightweight osu! port"
  6. HOMEPAGE="https://github.com/fmang/oshu"
  7. SRC_URI="https://www.mg0.fr/oshu/releases/${P}.tar.gz
  8. osu-skin? ( https://www.mg0.fr/oshu/skins/osu-v1.tar.gz -> ${PN}-skin-v1.tar.gz )"
  9. KEYWORDS="~amd64 ~x86"
  10. LICENSE="GPL-3 CC-BY-NC-4.0"
  11. SLOT="0"
  12. IUSE="libav osu-skin"
  13. CMAKE_MIN_VERSION="3.9.0"
  14. RDEPEND="
  15. >=media-libs/libsdl2-2.0.5:=
  16. media-libs/sdl2-image:=[jpeg,png]
  17. x11-libs/cairo:=
  18. x11-libs/pango:=
  19. !libav? ( media-video/ffmpeg:= )
  20. libav? ( media-video/libav:= )
  21. "
  22. DEPEND="
  23. ${RDEPEND}
  24. virtual/pkgconfig
  25. "
  26. src_configure() {
  27. if use osu-skin; then
  28. local mycmakeargs=(
  29. "-DOSHU_DEFAULT_SKIN=osu"
  30. "-DOSHU_SKINS=osu;minimal"
  31. )
  32. else
  33. # default values; I prefer to be sure
  34. local mycmakeargs=(
  35. "-DOSHU_DEFAULT_SKIN=minimal"
  36. "-DOSHU_SKINS=minimal"
  37. )
  38. fi
  39. cmake-utils_src_configure
  40. }
  41. src_compile() {
  42. if use osu-skin; then
  43. mkdir -p "${BUILD_DIR}/share/skins" || die
  44. cp "${DISTDIR}/${PN}-skin-v1.tar.gz" "${BUILD_DIR}/share/skins/osu.tar.gz" || die
  45. fi
  46. default
  47. }
  48. pkg_postinst() {
  49. xdg_desktop_database_update
  50. xdg_mimeinfo_database_update
  51. }
  52. pkg_postrm() {
  53. xdg_desktop_database_update
  54. xdg_mimeinfo_database_update
  55. }