logo

overlay

My own overlay for experimentations, use with caution, no support is provided git clone https://hacktivis.me/git/overlay.git
commit: 389c1b835e53ef7c7ed1e94a19fecdb977e80bee
parent d2fe0b4eafa6b318c85ebccba8d52d1331062d53
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Mon, 18 Oct 2021 21:45:58 +0200

games-engines/love: Import from gentoo, add 0.10.2

Diffstat:

Agames-engines/love/Manifest1+
Agames-engines/love/love-0.10.2.ebuild76++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 77 insertions(+), 0 deletions(-)

diff --git a/games-engines/love/Manifest b/games-engines/love/Manifest @@ -0,0 +1 @@ +DIST love-0.10.2-linux-src.tar.gz 1698376 BLAKE2B aac7baaa51b4def09d73bcf6cbc3c98835c4b12f2608d229a8aeb3eb39a82285964f7cef0063c461bdae6e4431adf4f48e83be499a76ce463f941c7778d4a229 SHA512 81c0bb5a454ed9abc692784f155933288a2bd5ba5ffb919c7709584e7e8d68fca10b5ea1e3a386def46b18f071b217ffbc2914a8ea08424226f0580020fce076 diff --git a/games-engines/love/love-0.10.2.ebuild b/games-engines/love/love-0.10.2.ebuild @@ -0,0 +1,76 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +LUA_COMPAT=( lua5-{1..3} luajit ) + +inherit lua-single xdg-utils + +if [[ ${PV} == 9999* ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/love2d/${PN}.git" +else + SRC_URI="https://github.com/love2d/${PN}/releases/download/${PV}/${P}-linux-src.tar.gz" + KEYWORDS="~amd64 ~arm ~x86" +fi + +DESCRIPTION="A framework for 2D games in Lua" +HOMEPAGE="https://love2d.org/" + +LICENSE="ZLIB" +SLOT="0.10" + +REQUIRED_USE="${LUA_REQUIRED_USE}" + +RDEPEND="sys-libs/zlib + ${LUA_DEPS} + media-libs/freetype + media-libs/libmodplug + media-libs/libsdl2[joystick,opengl] + media-libs/libogg + media-libs/libtheora + media-libs/libvorbis + media-libs/openal + media-sound/mpg123 + virtual/opengl" +DEPEND="${RDEPEND}" + +DOCS=( "readme.md" "changes.txt" ) + +src_prepare() { + default + if [[ ${PV} == 9999* ]]; then + ./platform/unix/automagic || die + fi +} + +src_configure() { + econf --with-lua=$(usex lua_single_target_luajit luajit lua) \ + --with-luaversion=$(ver_cut 1-2 $(lua_get_version)) +} + +src_install() { + default + + find "${D}" -name '*.la' -delete || die + + if [[ ${SLOT} != 0 ]]; then + mv "${ED}/usr/bin/${PN}" "${ED}/usr/bin/${PN}-${SLOT}" || die + mv "${ED}"/usr/share/applications/love{,"-$SLOT"}.desktop || die + sed -i -e "/^Name=/s/$/ ($SLOT)/" -e "s|/usr/bin/love|/usr/bin/love-$SLOT|" "${ED}/usr/share/applications/love-$SLOT.desktop" || die + rm -r "${ED}"/usr/{lib64/liblove.so,share/{mime/,pixmaps/,icons/,man/}} || die + fi +} + +pkg_postinst() { + xdg_desktop_database_update + xdg_icon_cache_update + xdg_mimeinfo_database_update +} + +pkg_postrm() { + xdg_desktop_database_update + xdg_icon_cache_update + xdg_mimeinfo_database_update +}