--- /dev/null
+AUX supertuxkart-0.8.1-gentoo.patch 377 SHA256 a574c514490744cb98dc97460d33acfd26336d41d6fbc84145be7ea052b7c3f8 SHA512 07a49a03f943fb14543a01c705f69dbf7fc5238510d6ad615243c51cb142e856af3e3bb4cc2134b28652acf2944fdf9075311947c2afdb9d6dd62033222a016e WHIRLPOOL 2e0086cdbc34a278707254cde7239ac38549212baecea608b56f014aed9431910e28b6504e532ac8992b4ecac01001a8878557fdf9703167e8ddc767c2e5a555
+AUX supertuxkart-0.8.1-irrlicht.patch 4824 SHA256 0388d3e5f5519039208069e0ff88edb7936ccf8038e3082c4ed432ab46deb09d SHA512 1ac949874baf83ae501bbf01b0678fe91a9d019b9939f7f1383c182a0ff0ace0b9154c23d14fc2bca8b4e7d8708d81b4f3a58e0019032c2a8738f887ad7990ce WHIRLPOOL 06b719b6136841baff4c9d81f386f4d56bda04ab224c21522c54369af1259f01a1e85e372a675aa5d78b6c1e8221fc45012d869dfe5c034bb4de25df1acc7add
+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
+EBUILD supertuxkart-0.8.1.ebuild 1879 SHA256 15999f636f694522607b203710c5464aa0ca6c40ff84f18722f4a860c0d73299 SHA512 a77c7bf55eaaaedd7c9bac3dfc54aa84247f6bd27ed0aa397e72a5b650a9bf443208ffc8a6344e7b5867e18a1d2104a6f55e681739b568383280f2854bce07a6 WHIRLPOOL a2e4c7590cea3482d094e767601ab51dca732f1273eec29703c706d9b660162f0912c4f7cef2c59625bbbe7b630efeeab572edc9bd777695bdf6eabbacb5631e
--- /dev/null
+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.\r
+ /** If this is commented out, Irrlicht will try to compile using the jpeg lib installed in the system.\r
+ This is only used when _IRR_COMPILE_WITH_LIBJPEG_ is defined. */\r
+-#define _IRR_USE_NON_SYSTEM_JPEG_LIB_\r
++//#define _IRR_USE_NON_SYSTEM_JPEG_LIB_\r
+ #ifdef NO_IRR_USE_NON_SYSTEM_JPEG_LIB_\r
+ #undef _IRR_USE_NON_SYSTEM_JPEG_LIB_\r
+ #endif\r
+@@ -261,7 +261,7 @@
+ //! Define _IRR_USE_NON_SYSTEM_LIBPNG_ to let irrlicht use the libpng which comes with irrlicht.\r
+ /** If this is commented out, Irrlicht will try to compile using the libpng installed in the system.\r
+ This is only used when _IRR_COMPILE_WITH_LIBPNG_ is defined. */\r
+-#define _IRR_USE_NON_SYSTEM_LIB_PNG_\r
++//#define _IRR_USE_NON_SYSTEM_LIB_PNG_\r
+ #ifdef NO_IRR_USE_NON_SYSTEM_LIB_PNG_\r
+ #undef _IRR_USE_NON_SYSTEM_LIB_PNG_\r
+ #endif\r
+@@ -598,7 +598,7 @@
+ /** If this is commented out, Irrlicht will try to compile using the zlib\r
+ installed on the system. This is only used when _IRR_COMPILE_WITH_ZLIB_ is\r
+ defined. */\r
+-#define _IRR_USE_NON_SYSTEM_ZLIB_\r
++//#define _IRR_USE_NON_SYSTEM_ZLIB_\r
+ #ifdef NO_IRR_USE_NON_SYSTEM_ZLIB_\r
+ #undef _IRR_USE_NON_SYSTEM_ZLIB_\r
+ #endif\r
+--- 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\r
+ IRROTHEROBJ = CIrrDeviceSDL.o CIrrDeviceLinux.o CIrrDeviceConsole.o CIrrDeviceStub.o CIrrDeviceWin32.o CIrrDeviceFB.o CLogger.o COSOperator.o Irrlicht.o os.o\r
+ 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\r
+-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\r
+-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\r
+-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\r
+ 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\r
+-BZIP2OBJ = bzip2/blocksort.o bzip2/huffman.o bzip2/crctable.o bzip2/randtable.o bzip2/bzcompress.o bzip2/decompress.o bzip2/bzlib.o\r
+ \r
+ # Next variable is for additional scene nodes etc. of customized Irrlicht versions\r
+ EXTRAOBJ =\r
+@@ -61,18 +57,16 @@
+ \r
+ ###############\r
+ #Compiler flags\r
+-CXXINCS = -I../../include -Izlib -Ijpeglib -Ilibpng\r
++CXXINCS = -I../../include\r
+ CPPFLAGS += $(CXXINCS) -DIRRLICHT_EXPORTS=1\r
+-CXXFLAGS += -Wall -pipe -fno-exceptions -fno-rtti -fstrict-aliasing\r
++CXXFLAGS += -Wall -fno-exceptions -fno-rtti\r
+ ifndef NDEBUG\r
+-CXXFLAGS += -g -D_DEBUG\r
+-else\r
+-CXXFLAGS += -fexpensive-optimizations -O3\r
++CXXFLAGS += -D_DEBUG\r
+ endif\r
+ ifdef PROFILE\r
+ CXXFLAGS += -pg\r
+ endif\r
+-CFLAGS := -O3 -fexpensive-optimizations -DPNG_THREAD_UNSAFE_OK -DPNG_NO_MMX_CODE -DPNG_NO_MNG_FEATURES\r
++CFLAGS += -DPNG_THREAD_UNSAFE_OK -DPNG_NO_MMX_CODE -DPNG_NO_MNG_FEATURES\r
+ \r
+ sharedlib sharedlib_osx: CXXFLAGS += -fPIC\r
+ sharedlib sharedlib_osx: CFLAGS += -fPIC\r
--- /dev/null
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/games-action/supertuxkart/supertuxkart-0.8.ebuild,v 1.8 2013/02/07 21:59:52 ulm Exp $
+
+EAPI=2
+inherit 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"
+
+# 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="dev-libs/fribidi
+ media-libs/freeglut
+ media-libs/libpng:0
+ media-libs/libvorbis
+ media-libs/openal
+ net-misc/curl
+ sys-libs/zlib
+ virtual/glu
+ virtual/jpeg
+ virtual/libintl
+ virtual/opengl
+ x11-libs/libX11
+ x11-libs/libXxf86vm"
+DEPEND="${RDEPEND}
+ sys-devel/gettext
+ virtual/pkgconfig"
+
+S=${WORKDIR}/SuperTuxKart-${PV}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-{gentoo,irrlicht}.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=(
+ -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 "${DISTDIR}"/${PN}.png
+ dodoc AUTHORS ChangeLog README TODO
+ prepgamesdirs
+}