summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /games-action/supertuxkart
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'games-action/supertuxkart')
-rw-r--r--games-action/supertuxkart/Manifest2
-rw-r--r--games-action/supertuxkart/files/supertuxkart-0.8.1-cmake.patch20
-rw-r--r--games-action/supertuxkart/files/supertuxkart-0.8.1-desktopfile.patch24
-rw-r--r--games-action/supertuxkart/files/supertuxkart-0.8.1-gentoo.patch47
-rw-r--r--games-action/supertuxkart/files/supertuxkart-0.8.1-icon-dest.patch19
-rw-r--r--games-action/supertuxkart/files/supertuxkart-0.8.1-irrlicht.patch69
-rw-r--r--games-action/supertuxkart/files/supertuxkart-0.8.1-jpeg9.patch11
-rw-r--r--games-action/supertuxkart/files/supertuxkart-0.8.1-mesa-10.x.patch38
-rw-r--r--games-action/supertuxkart/metadata.xml12
-rw-r--r--games-action/supertuxkart/supertuxkart-0.8.1.ebuild92
10 files changed, 334 insertions, 0 deletions
diff --git a/games-action/supertuxkart/Manifest b/games-action/supertuxkart/Manifest
new file mode 100644
index 000000000000..ebd2f36d3e34
--- /dev/null
+++ b/games-action/supertuxkart/Manifest
@@ -0,0 +1,2 @@
+DIST supertuxkart-0.8.1-src.tar.bz2 229944480 SHA256 335301ae61b0c177be68d5593c65e5b197dc807421f08a8a35740a254cacf8d6 SHA512 1d72230a2cfa6196c6ea6c5464f01d1a0064994c9dafbf5d47c04b5db87e82590fde57a88d5316f2cf6094dcebae5e115b81e5ecc964a29bd669bc83d527d13a WHIRLPOOL 5cf87e57cd5b5d12e4549bf49efb0596e4a1fafa7cba58e366c843e2ebf61c02e5c3471d1591f1231194021cbcb6082829e026616403680fc7ad05bd235b155e
+DIST supertuxkart.png 4435 SHA256 99bc1801cb0514946cb0171d6d5a84484b6dc881edfa7f096b6eb5fea2f28828 SHA512 a180332f79220431922fa8b351cb476ebc5d9d1df09f20707eb3bdd7002fd264cb027b8190c73c5221050e6e8601beb6758a5809d05aedfb18f0bdb426f47eda WHIRLPOOL eef651802a927b451226fc06a682d7dea68b65b05195130ccfc7544165f26f65bda4fc9565e09d6487d02be3cf57880b0c6c257f26587c6bc6d30afc6aa5d3c2
diff --git a/games-action/supertuxkart/files/supertuxkart-0.8.1-cmake.patch b/games-action/supertuxkart/files/supertuxkart-0.8.1-cmake.patch
new file mode 100644
index 000000000000..17a723640f7f
--- /dev/null
+++ b/games-action/supertuxkart/files/supertuxkart-0.8.1-cmake.patch
@@ -0,0 +1,20 @@
+--- CMakeLists.txt.orig 2015-06-13 01:47:50.493401323 -0400
++++ CMakeLists.txt 2015-06-13 01:48:53.691255054 -0400
+@@ -128,6 +128,9 @@
+ find_package(OpenGL REQUIRED)
+ include_directories(${OPENGL_INCLUDE_DIR})
+
++find_package(X11 REQUIRED)
++include_directories(${X11_INCLUDE_DIR})
++
+ if(UNIX AND NOT APPLE)
+ find_library(IRRLICHT_XF86VM_LIBRARY Xxf86vm)
+ mark_as_advanced(IRRLICHT_XF86VM_LIBRARY)
+@@ -239,6 +242,7 @@
+ ${IRRLICHT_XF86VM_LIBRARY}
+ ${OPENAL_LIBRARY}
+ ${OPENGL_LIBRARIES}
++ ${X11_LIBRARIES}
+ png
+ jpeg
+ bz2
diff --git a/games-action/supertuxkart/files/supertuxkart-0.8.1-desktopfile.patch b/games-action/supertuxkart/files/supertuxkart-0.8.1-desktopfile.patch
new file mode 100644
index 000000000000..076645692bcd
--- /dev/null
+++ b/games-action/supertuxkart/files/supertuxkart-0.8.1-desktopfile.patch
@@ -0,0 +1,24 @@
+From: Julian Ospald <hasufell@gentoo.org>
+Date: Thu Dec 13 18:45:18 UTC 2012
+Subject: fix desktop file
+
+--- data/supertuxkart_desktop.template
++++ data/supertuxkart_desktop.template
+@@ -1,14 +1,14 @@
+ [Desktop Entry]
+ Name=SuperTuxKart
+-Icon=@PREFIX@/share/pixmaps/supertuxkart_128.png
++Icon=supertuxkart
+ GenericName=A kart racing game
+ GenericName[de_DE]=Ein Kart-Rennspiel
+ GenericName[fr_FR]=Un jeu de karting
+ GenericName[gl]=Xogo de carreiras con karts
+ GenericName[ro_RO]=Un joc de curse cu carturi
+-Exec=@PREFIX@/@STK_INSTALL_BINARY_DIR@/supertuxkart --no-console
++Exec=@STK_INSTALL_BINARY_DIR@/supertuxkart --no-console
+ Terminal=false
+ StartupNotify=false
+ Type=Application
+-TryExec=@PREFIX@/@STK_INSTALL_BINARY_DIR@/supertuxkart
++TryExec=@STK_INSTALL_BINARY_DIR@/supertuxkart
+ Categories=Game;ArcadeGame;
diff --git a/games-action/supertuxkart/files/supertuxkart-0.8.1-gentoo.patch b/games-action/supertuxkart/files/supertuxkart-0.8.1-gentoo.patch
new file mode 100644
index 000000000000..647c52245dab
--- /dev/null
+++ b/games-action/supertuxkart/files/supertuxkart-0.8.1-gentoo.patch
@@ -0,0 +1,47 @@
+gentoo specific hacks because we unbundle the
+deps of irrlicht
+
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -45,7 +45,6 @@ add_subdirectory("${PROJECT_SOURCE_DIR}/lib/enet")
+ include_directories("${PROJECT_SOURCE_DIR}/lib/enet/include")
+
+ # Build the irrlicht library
+-add_subdirectory("${PROJECT_SOURCE_DIR}/lib/irrlicht")
+ include_directories("${PROJECT_SOURCE_DIR}/lib/irrlicht/include")
+
+ # Build the Wiiuse library
+@@ -137,6 +136,13 @@ else()
+ endif()
+
+
++# Irrlicht
++if (APPLE)
++ set(IRRLICHT_LIBRARY "/Library/Frameworks/IrrFramework.framework")
++else()
++ set(IRRLICHT_LIBRARY ${PROJECT_SOURCE_DIR}/lib/irrlicht/lib/Linux/libIrrlicht.a)
++endif()
++
+
+ # Set some compiler options
+ if(UNIX)
+@@ -226,12 +232,17 @@ target_link_libraries(supertuxkart
+ bulletcollision
+ bulletmath
+ enet
+- stkirrlicht
+ ${CURL_LIBRARIES}
++ ${IRRLICHT_LIBRARIES}
+ ${OGGVORBIS_LIBRARIES}
++ ${IRRLICHT_LIBRARY}
+ ${IRRLICHT_XF86VM_LIBRARY}
+ ${OPENAL_LIBRARY}
+- ${OPENGL_LIBRARIES})
++ ${OPENGL_LIBRARIES}
++ png
++ jpeg
++ bz2
++ z)
+
+ if(APPLE)
+ # In theory it would be cleaner to let CMake detect the right dependencies. In practice, this means that if a OSX user has
diff --git a/games-action/supertuxkart/files/supertuxkart-0.8.1-icon-dest.patch b/games-action/supertuxkart/files/supertuxkart-0.8.1-icon-dest.patch
new file mode 100644
index 000000000000..5ce3fff0dd39
--- /dev/null
+++ b/games-action/supertuxkart/files/supertuxkart-0.8.1-icon-dest.patch
@@ -0,0 +1,19 @@
+commit f46a26640382ffc76e71f58eaaf1e5223a11c9a0
+Author: hasufell <hasufell@gentoo.org>
+Date: Tue Nov 26 22:13:21 2013 +0100
+
+ fix icon install dest
+
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -304,7 +304,9 @@ endif()
+ install(TARGETS supertuxkart RUNTIME DESTINATION ${STK_INSTALL_BINARY_DIR} BUNDLE DESTINATION .)
+ install(DIRECTORY ${STK_DATA_DIR} DESTINATION ${STK_INSTALL_DATA_DIR} PATTERN ".svn" EXCLUDE)
+ install(FILES ${PROJECT_BINARY_DIR}/supertuxkart.desktop DESTINATION share/applications)
+-install(FILES data/supertuxkart_32.png data/supertuxkart_128.png DESTINATION share/pixmaps)
++install(FILES data/supertuxkart_128.png DESTINATION share/icons/hicolor/128x128/apps RENAME supertuxkart.png)
++install(FILES data/supertuxkart_32.png DESTINATION share/icons/hicolor/32x32/apps RENAME supertuxkart.png)
++
+
+ set(PREFIX ${CMAKE_INSTALL_PREFIX})
+ configure_file(data/supertuxkart_desktop.template supertuxkart.desktop)
diff --git a/games-action/supertuxkart/files/supertuxkart-0.8.1-irrlicht.patch b/games-action/supertuxkart/files/supertuxkart-0.8.1-irrlicht.patch
new file mode 100644
index 000000000000..43130d14a09a
--- /dev/null
+++ b/games-action/supertuxkart/files/supertuxkart-0.8.1-irrlicht.patch
@@ -0,0 +1,69 @@
+unbundle Irrlicht dependencies
+and respect CFLAGS
+
+--- lib/irrlicht/include/IrrCompileConfig.h
++++ lib/irrlicht/include/IrrCompileConfig.h
+@@ -245,7 +245,7 @@
+ //! Define _IRR_USE_NON_SYSTEM_JPEG_LIB_ to let irrlicht use the jpeglib which comes with irrlicht.
+ /** If this is commented out, Irrlicht will try to compile using the jpeg lib installed in the system.
+ This is only used when _IRR_COMPILE_WITH_LIBJPEG_ is defined. */
+-#define _IRR_USE_NON_SYSTEM_JPEG_LIB_
++//#define _IRR_USE_NON_SYSTEM_JPEG_LIB_
+ #ifdef NO_IRR_USE_NON_SYSTEM_JPEG_LIB_
+ #undef _IRR_USE_NON_SYSTEM_JPEG_LIB_
+ #endif
+@@ -261,7 +261,7 @@
+ //! Define _IRR_USE_NON_SYSTEM_LIBPNG_ to let irrlicht use the libpng which comes with irrlicht.
+ /** If this is commented out, Irrlicht will try to compile using the libpng installed in the system.
+ This is only used when _IRR_COMPILE_WITH_LIBPNG_ is defined. */
+-#define _IRR_USE_NON_SYSTEM_LIB_PNG_
++//#define _IRR_USE_NON_SYSTEM_LIB_PNG_
+ #ifdef NO_IRR_USE_NON_SYSTEM_LIB_PNG_
+ #undef _IRR_USE_NON_SYSTEM_LIB_PNG_
+ #endif
+@@ -598,7 +598,7 @@
+ /** If this is commented out, Irrlicht will try to compile using the zlib
+ installed on the system. This is only used when _IRR_COMPILE_WITH_ZLIB_ is
+ defined. */
+-#define _IRR_USE_NON_SYSTEM_ZLIB_
++//#define _IRR_USE_NON_SYSTEM_ZLIB_
+ #ifdef NO_IRR_USE_NON_SYSTEM_ZLIB_
+ #undef _IRR_USE_NON_SYSTEM_ZLIB_
+ #endif
+--- lib/irrlicht/source/Irrlicht/Makefile
++++ lib/irrlicht/source/Irrlicht/Makefile
+@@ -46,11 +46,7 @@
+ IRRIOOBJ = CFileList.o CFileSystem.o CLimitReadFile.o CMemoryFile.o CReadFile.o CWriteFile.o CXMLReader.o CXMLWriter.o CWADReader.o CZipReader.o CPakReader.o CNPKReader.o CTarReader.o CMountPointReader.o irrXML.o CAttributes.o lzma/LzmaDec.o
+ IRROTHEROBJ = CIrrDeviceSDL.o CIrrDeviceLinux.o CIrrDeviceConsole.o CIrrDeviceStub.o CIrrDeviceWin32.o CIrrDeviceFB.o CLogger.o COSOperator.o Irrlicht.o os.o
+ IRRGUIOBJ = CGUIButton.o CGUICheckBox.o CGUIComboBox.o CGUIContextMenu.o CGUIEditBox.o CGUIEnvironment.o CGUIFileOpenDialog.o CGUIFont.o CGUIImage.o CGUIInOutFader.o CGUIListBox.o CGUIMenu.o CGUIMeshViewer.o CGUIMessageBox.o CGUIModalScreen.o CGUIScrollBar.o CGUISpinBox.o CGUISkin.o CGUIStaticText.o CGUITabControl.o CGUITable.o CGUIToolBar.o CGUIWindow.o CGUIColorSelectDialog.o CDefaultGUIElementFactory.o CGUISpriteBank.o CGUIImageList.o CGUITreeView.o
+-ZLIBOBJ = zlib/adler32.o zlib/compress.o zlib/crc32.o zlib/deflate.o zlib/inffast.o zlib/inflate.o zlib/inftrees.o zlib/trees.o zlib/uncompr.o zlib/zutil.o
+-JPEGLIBOBJ = jpeglib/jcapimin.o jpeglib/jcapistd.o jpeglib/jccoefct.o jpeglib/jccolor.o jpeglib/jcdctmgr.o jpeglib/jchuff.o jpeglib/jcinit.o jpeglib/jcmainct.o jpeglib/jcmarker.o jpeglib/jcmaster.o jpeglib/jcomapi.o jpeglib/jcparam.o jpeglib/jcprepct.o jpeglib/jcsample.o jpeglib/jctrans.o jpeglib/jdapimin.o jpeglib/jdapistd.o jpeglib/jdatadst.o jpeglib/jdatasrc.o jpeglib/jdcoefct.o jpeglib/jdcolor.o jpeglib/jddctmgr.o jpeglib/jdhuff.o jpeglib/jdinput.o jpeglib/jdmainct.o jpeglib/jdmarker.o jpeglib/jdmaster.o jpeglib/jdmerge.o jpeglib/jdpostct.o jpeglib/jdsample.o jpeglib/jdtrans.o jpeglib/jerror.o jpeglib/jfdctflt.o jpeglib/jfdctfst.o jpeglib/jfdctint.o jpeglib/jidctflt.o jpeglib/jidctfst.o jpeglib/jidctint.o jpeglib/jmemmgr.o jpeglib/jmemnobs.o jpeglib/jquant1.o jpeglib/jquant2.o jpeglib/jutils.o jpeglib/jcarith.o jpeglib/jdarith.o jpeglib/jaricom.o
+-LIBPNGOBJ = libpng/png.o libpng/pngerror.o libpng/pngget.o libpng/pngmem.o libpng/pngpread.o libpng/pngread.o libpng/pngrio.o libpng/pngrtran.o libpng/pngrutil.o libpng/pngset.o libpng/pngtrans.o libpng/pngwio.o libpng/pngwrite.o libpng/pngwtran.o libpng/pngwutil.o
+ LIBAESGM = aesGladman/aescrypt.o aesGladman/aeskey.o aesGladman/aestab.o aesGladman/fileenc.o aesGladman/hmac.o aesGladman/prng.o aesGladman/pwd2key.o aesGladman/sha1.o aesGladman/sha2.o
+-BZIP2OBJ = bzip2/blocksort.o bzip2/huffman.o bzip2/crctable.o bzip2/randtable.o bzip2/bzcompress.o bzip2/decompress.o bzip2/bzlib.o
+
+ # Next variable is for additional scene nodes etc. of customized Irrlicht versions
+ EXTRAOBJ =
+@@ -61,18 +57,16 @@
+
+ ###############
+ #Compiler flags
+-CXXINCS = -I../../include -Izlib -Ijpeglib -Ilibpng
++CXXINCS = -I../../include
+ CPPFLAGS += $(CXXINCS) -DIRRLICHT_EXPORTS=1
+-CXXFLAGS += -Wall -pipe -fno-exceptions -fno-rtti -fstrict-aliasing
++CXXFLAGS += -Wall -fno-exceptions -fno-rtti
+ ifndef NDEBUG
+-CXXFLAGS += -g -D_DEBUG
+-else
+-CXXFLAGS += -fexpensive-optimizations -O3
++CXXFLAGS += -D_DEBUG
+ endif
+ ifdef PROFILE
+ CXXFLAGS += -pg
+ endif
+-CFLAGS := -O3 -fexpensive-optimizations -DPNG_THREAD_UNSAFE_OK -DPNG_NO_MMX_CODE -DPNG_NO_MNG_FEATURES
++CFLAGS += -DPNG_THREAD_UNSAFE_OK -DPNG_NO_MMX_CODE -DPNG_NO_MNG_FEATURES
+
+ sharedlib sharedlib_osx: CXXFLAGS += -fPIC
+ sharedlib sharedlib_osx: CFLAGS += -fPIC
diff --git a/games-action/supertuxkart/files/supertuxkart-0.8.1-jpeg9.patch b/games-action/supertuxkart/files/supertuxkart-0.8.1-jpeg9.patch
new file mode 100644
index 000000000000..b1bae371b71d
--- /dev/null
+++ b/games-action/supertuxkart/files/supertuxkart-0.8.1-jpeg9.patch
@@ -0,0 +1,11 @@
+--- lib/irrlicht/source/Irrlicht/CImageLoaderJPG.cpp.old
++++ lib/irrlicht/source/Irrlicht/CImageLoaderJPG.cpp
+@@ -66,7 +66,7 @@
+ boolean CImageLoaderJPG::fill_input_buffer (j_decompress_ptr cinfo)
+ {
+ // DO NOTHING
+- return 1;
++ return TRUE;
+ }
+
+
diff --git a/games-action/supertuxkart/files/supertuxkart-0.8.1-mesa-10.x.patch b/games-action/supertuxkart/files/supertuxkart-0.8.1-mesa-10.x.patch
new file mode 100644
index 000000000000..b4d8e68a9049
--- /dev/null
+++ b/games-action/supertuxkart/files/supertuxkart-0.8.1-mesa-10.x.patch
@@ -0,0 +1,38 @@
+From: Julian Ospald <hasufell@gentoo.org>
+Date: Tue Apr 29 23:28:11 UTC 2014
+Subject: fix build with mesa-10.x
+
+--- lib/irrlicht/source/Irrlicht/COpenGLExtensionHandler.h
++++ lib/irrlicht/source/Irrlicht/COpenGLExtensionHandler.h
+@@ -21,6 +21,7 @@
+ #endif
+ #include <GL/gl.h>
+ #if defined(_IRR_OPENGL_USE_EXTPOINTER_)
++ typedef void (APIENTRYP PFNGLBLENDEQUATIONPROC) (GLenum mode);
+ #include "glext.h"
+ #endif
+ #include "wglext.h"
+@@ -36,6 +37,7 @@
+ #endif
+ #include <OpenGL/gl.h>
+ #if defined(_IRR_OPENGL_USE_EXTPOINTER_)
++ typedef void (APIENTRYP PFNGLBLENDEQUATIONPROC) (GLenum mode);
+ #include "glext.h"
+ #endif
+ #elif defined(_IRR_COMPILE_WITH_SDL_DEVICE_) && !defined(_IRR_COMPILE_WITH_X11_DEVICE_)
+@@ -49,6 +51,7 @@
+ #define NO_SDL_GLEXT
+ #include <SDL/SDL_video.h>
+ #include <SDL/SDL_opengl.h>
++ typedef void (APIENTRYP PFNGLBLENDEQUATIONPROC) (GLenum mode);
+ #include "glext.h"
+ #else
+ #if defined(_IRR_OPENGL_USE_EXTPOINTER_)
+@@ -61,6 +64,7 @@
+ #include <GL/gl.h>
+ #include <GL/glx.h>
+ #if defined(_IRR_OPENGL_USE_EXTPOINTER_)
++ typedef void (APIENTRYP PFNGLBLENDEQUATIONPROC) (GLenum mode);
+ #include "glext.h"
+ #undef GLX_ARB_get_proc_address // avoid problems with local glxext.h
+ #include "glxext.h"
diff --git a/games-action/supertuxkart/metadata.xml b/games-action/supertuxkart/metadata.xml
new file mode 100644
index 000000000000..701854e762a8
--- /dev/null
+++ b/games-action/supertuxkart/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>games</herd>
+ <use>
+ <flag name="fribidi">Support for right-to-left languages</flag>
+ <flag name="wiimote">Support for wiimote input devices</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">supertuxkart</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/games-action/supertuxkart/supertuxkart-0.8.1.ebuild b/games-action/supertuxkart/supertuxkart-0.8.1.ebuild
new file mode 100644
index 000000000000..4ae2a2ba0566
--- /dev/null
+++ b/games-action/supertuxkart/supertuxkart-0.8.1.ebuild
@@ -0,0 +1,92 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit gnome2-utils cmake-utils eutils games
+
+DESCRIPTION="A kart racing game starring Tux, the linux penguin (TuxKart fork)"
+HOMEPAGE="http://supertuxkart.sourceforge.net/"
+SRC_URI="mirror://sourceforge/supertuxkart/SuperTuxKart/${PV}/${P}-src.tar.bz2
+ mirror://gentoo/${PN}.png"
+
+LICENSE="GPL-3 CC-BY-SA-3.0 CC-BY-2.0 public-domain ZLIB"
+SLOT="0"
+KEYWORDS="amd64 ~ppc x86"
+IUSE="debug fribidi wiimote"
+
+# don't unbundle irrlicht and bullet
+# both are modified and system versions will break the game
+# http://sourceforge.net/tracker/?func=detail&aid=3454889&group_id=74339&atid=540679
+
+# VERSION BUMP NOTICE: enet might be needed for supertuxkart-0.9
+RDEPEND="media-libs/freeglut
+ media-libs/libpng:0
+ media-libs/libvorbis
+ media-libs/openal
+ 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 )
+ wiimote? ( net-wireless/bluez )"
+DEPEND="${RDEPEND}
+ sys-devel/gettext
+ virtual/pkgconfig"
+
+S=${WORKDIR}/SuperTuxKart-${PV}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-{gentoo,icon-dest,irrlicht,desktopfile,mesa-10.x,jpeg9,cmake}.patch
+
+ # inconsistent handling of debug definition
+ # avoid using Debug build type
+ if use debug ; then
+ sed -i \
+ -e 's/add_definitions(-DNDEBUG)/add_definitions(-DDEBUG)/' \
+ CMakeLists.txt || die
+ fi
+}
+
+src_configure() {
+ local mycmakeargs=(
+ $(cmake-utils_use_use fribidi FRIBIDI)
+ $(cmake-utils_use_use wiimote WIIUSE)
+ -DSTK_INSTALL_BINARY_DIR="${GAMES_BINDIR}"
+ -DSTK_INSTALL_DATA_DIR="${GAMES_DATADIR}"/${PN}
+ )
+
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ # build bundled irrlicht
+ NDEBUG=1 emake -C lib/irrlicht/source/Irrlicht
+
+ cmake-utils_src_compile
+}
+
+src_install() {
+ cmake-utils_src_install
+ doicon -s 64 "${DISTDIR}"/${PN}.png
+ dodoc AUTHORS ChangeLog README TODO
+ prepgamesdirs
+}
+
+pkg_preinst() {
+ games_pkg_preinst
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+}