aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'games-action/supertuxkart/supertuxkart-1.0.ebuild')
-rw-r--r--games-action/supertuxkart/supertuxkart-1.0.ebuild100
1 files changed, 100 insertions, 0 deletions
diff --git a/games-action/supertuxkart/supertuxkart-1.0.ebuild b/games-action/supertuxkart/supertuxkart-1.0.ebuild
new file mode 100644
index 0000000..3a1da01
--- /dev/null
+++ b/games-action/supertuxkart/supertuxkart-1.0.ebuild
@@ -0,0 +1,100 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit cmake-utils desktop gnome2-utils
+
+DESCRIPTION="A kart racing game starring Tux, the linux penguin (TuxKart fork)"
+HOMEPAGE="https://supertuxkart.net/"
+
+SRC_URI="mirror://gentoo/${PN}.png"
+
+if [[ ${PV} == 9999 ]]; then
+ inherit git-r3 subversion
+ EGIT_REPO_URI="https://github.com/${PN}/stk-code"
+ ESVN_REPO_URI="https://svn.code.sf.net/p/${PN}/code/stk-assets"
+else
+ SRC_URI+=" mirror://sourceforge/${PN}/SuperTuxKart/${PV}/${P}-src.tar.xz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+LICENSE="GPL-2 GPL-3 CC-BY-SA-3.0 CC-BY-2.0 public-domain ZLIB"
+SLOT="0"
+IUSE="debug fribidi recorder wiimote"
+
+# don't unbundle irrlicht and bullet
+# both are modified and system versions will break the game
+# https://sourceforge.net/p/irrlicht/feature-requests/138/
+
+RDEPEND="
+ media-libs/glew:0=
+ media-libs/libpng:0=
+ media-libs/libvorbis
+ media-libs/openal
+ net-libs/enet:1.3=
+ net-misc/curl
+ sys-libs/zlib
+ virtual/glu
+ virtual/jpeg:0
+ virtual/libintl
+ virtual/opengl
+ x11-libs/libX11
+ x11-libs/libXxf86vm
+ fribidi? ( dev-libs/fribidi )
+ recorder? ( media-libs/libopenglrecorder )
+ wiimote? ( net-wireless/bluez )"
+DEPEND="${RDEPEND}
+ sys-devel/gettext
+ virtual/pkgconfig"
+
+src_unpack() {
+ A_ARR=(${A})
+ cp ${DISTDIR}/${A_ARR[0]} ${WORKDIR}
+ if [[ ${PV} == 9999 ]]; then
+ git-r3_src_unpack
+ ( S="${WORKDIR}/stk-assets" subversion_src_unpack )
+ else
+ unpack ${A_ARR[1]}
+ fi
+}
+
+src_prepare() {
+ cmake-utils_src_prepare
+
+ # remove bundled libraries, just to be sure
+ rm -r lib/{enet,glew,jpeglib,libpng,zlib} || die
+}
+
+src_configure() {
+ local mycmakeargs=(
+ # system dev-libs/angelscript leads
+ # to failed assert segfaults
+ -DUSE_SYSTEM_ANGELSCRIPT=OFF
+ -DUSE_FRIBIDI=$(usex fribidi)
+ -DBUILD_RECORDER=$(usex recorder)
+ -DUSE_WIIUSE=$(usex wiimote)
+ -DSTK_INSTALL_BINARY_DIR=bin
+ -DSTK_INSTALL_DATA_DIR=share/${PN}
+ )
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+ dodoc CHANGELOG.md
+
+ doicon -s 64 "${WORKDIR}"/${PN}.png
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+}