Add games-action/supertuxkart-0.8.1. with patches
[shuber-gentoo-overlay.git] / games-action / supertuxkart / files / supertuxkart-0.8.1-irrlicht.patch
1 unbundle Irrlicht dependencies
2 and respect CFLAGS
3
4 --- lib/irrlicht/include/IrrCompileConfig.h
5 +++ lib/irrlicht/include/IrrCompileConfig.h
6 @@ -245,7 +245,7 @@
7 //! Define _IRR_USE_NON_SYSTEM_JPEG_LIB_ to let irrlicht use the jpeglib which comes with irrlicht.
8 /** If this is commented out, Irrlicht will try to compile using the jpeg lib installed in the system.
9 This is only used when _IRR_COMPILE_WITH_LIBJPEG_ is defined. */
10 -#define _IRR_USE_NON_SYSTEM_JPEG_LIB_
11 +//#define _IRR_USE_NON_SYSTEM_JPEG_LIB_
12 #ifdef NO_IRR_USE_NON_SYSTEM_JPEG_LIB_
13 #undef _IRR_USE_NON_SYSTEM_JPEG_LIB_
14 #endif
15 @@ -261,7 +261,7 @@
16 //! Define _IRR_USE_NON_SYSTEM_LIBPNG_ to let irrlicht use the libpng which comes with irrlicht.
17 /** If this is commented out, Irrlicht will try to compile using the libpng installed in the system.
18 This is only used when _IRR_COMPILE_WITH_LIBPNG_ is defined. */
19 -#define _IRR_USE_NON_SYSTEM_LIB_PNG_
20 +//#define _IRR_USE_NON_SYSTEM_LIB_PNG_
21 #ifdef NO_IRR_USE_NON_SYSTEM_LIB_PNG_
22 #undef _IRR_USE_NON_SYSTEM_LIB_PNG_
23 #endif
24 @@ -598,7 +598,7 @@
25 /** If this is commented out, Irrlicht will try to compile using the zlib
26 installed on the system. This is only used when _IRR_COMPILE_WITH_ZLIB_ is
27 defined. */
28 -#define _IRR_USE_NON_SYSTEM_ZLIB_
29 +//#define _IRR_USE_NON_SYSTEM_ZLIB_
30 #ifdef NO_IRR_USE_NON_SYSTEM_ZLIB_
31 #undef _IRR_USE_NON_SYSTEM_ZLIB_
32 #endif
33 --- lib/irrlicht/source/Irrlicht/Makefile
34 +++ lib/irrlicht/source/Irrlicht/Makefile
35 @@ -46,11 +46,7 @@
36 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
37 IRROTHEROBJ = CIrrDeviceSDL.o CIrrDeviceLinux.o CIrrDeviceConsole.o CIrrDeviceStub.o CIrrDeviceWin32.o CIrrDeviceFB.o CLogger.o COSOperator.o Irrlicht.o os.o
38 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
39 -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
40 -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
41 -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
42 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
43 -BZIP2OBJ = bzip2/blocksort.o bzip2/huffman.o bzip2/crctable.o bzip2/randtable.o bzip2/bzcompress.o bzip2/decompress.o bzip2/bzlib.o
44
45 # Next variable is for additional scene nodes etc. of customized Irrlicht versions
46 EXTRAOBJ =
47 @@ -61,18 +57,16 @@
48
49 ###############
50 #Compiler flags
51 -CXXINCS = -I../../include -Izlib -Ijpeglib -Ilibpng
52 +CXXINCS = -I../../include
53 CPPFLAGS += $(CXXINCS) -DIRRLICHT_EXPORTS=1
54 -CXXFLAGS += -Wall -pipe -fno-exceptions -fno-rtti -fstrict-aliasing
55 +CXXFLAGS += -Wall -fno-exceptions -fno-rtti
56 ifndef NDEBUG
57 -CXXFLAGS += -g -D_DEBUG
58 -else
59 -CXXFLAGS += -fexpensive-optimizations -O3
60 +CXXFLAGS += -D_DEBUG
61 endif
62 ifdef PROFILE
63 CXXFLAGS += -pg
64 endif
65 -CFLAGS := -O3 -fexpensive-optimizations -DPNG_THREAD_UNSAFE_OK -DPNG_NO_MMX_CODE -DPNG_NO_MNG_FEATURES
66 +CFLAGS += -DPNG_THREAD_UNSAFE_OK -DPNG_NO_MMX_CODE -DPNG_NO_MNG_FEATURES
67
68 sharedlib sharedlib_osx: CXXFLAGS += -fPIC
69 sharedlib sharedlib_osx: CFLAGS += -fPIC