gnu: Add kafs-client
[jackhill/guix/guix.git] / gnu / packages / patches / irrlicht-use-system-libs.patch
CommitLineData
7b8a7536
EF
1This patch is a combination of the two following patches with minor
2changes to the install code
3https://sources.debian.org/src/irrlicht/1.8.4+dfsg1-1/debian/patches/debian/link-against-needed-libs.diff/
4https://sources.debian.org/src/irrlicht/1.8.4+dfsg1-1/debian/patches/debian/use-system-libs.diff/
5
6
7---
8 include/IrrCompileConfig.h | 26 +++++++++------------
9 source/Irrlicht/CIrrDeviceLinux.h | 2 +-
10 source/Irrlicht/COpenGLExtensionHandler.h | 8 +++----
11 source/Irrlicht/COpenGLSLMaterialRenderer.h | 2 +-
12 source/Irrlicht/Makefile | 15 ++++++------
13 5 files changed, 25 insertions(+), 28 deletions(-)
14
15diff --git a/include/IrrCompileConfig.h b/include/IrrCompileConfig.h
16index 6bb0589..2216353 100644
17--- a/include/IrrCompileConfig.h
18+++ b/include/IrrCompileConfig.h
19@@ -238,6 +238,17 @@ for Windows based systems. You also have to set #define UNICODE for this to comp
20 #undef _IRR_WCHAR_FILESYSTEM\r
21 #endif\r
22 \r
23+//! Define _IRR_COMPILE_WITH_ZLIB_ to enable compiling the engine using zlib.\r
24+/** This enables the engine to read from compressed .zip archives. If you\r
25+disable this feature, the engine can still read archives, but only uncompressed\r
26+ones. */\r
27+#define _IRR_COMPILE_WITH_ZLIB_\r
28+\r
29+//! Define _IRR_USE_NON_SYSTEM_ZLIB_ to let irrlicht use the zlib which comes with irrlicht.\r
30+/** If this is commented out, Irrlicht will try to compile using the zlib installed in the system.\r
31+ This is only used when _IRR_COMPILE_WITH_ZLIB_ is defined. */\r
32+#undef _IRR_USE_NON_SYSTEM_ZLIB_\r
33+\r
34 //! Define _IRR_COMPILE_WITH_JPEGLIB_ to enable compiling the engine using libjpeg.\r
35 /** This enables the engine to read jpeg images. If you comment this out,\r
36 the engine will no longer read .jpeg images. */\r
37@@ -249,10 +260,7 @@ the engine will no longer read .jpeg images. */
38 //! Define _IRR_USE_NON_SYSTEM_JPEG_LIB_ to let irrlicht use the jpeglib which comes with irrlicht.\r
39 /** If this is commented out, Irrlicht will try to compile using the jpeg lib installed in the system.\r
40 This is only used when _IRR_COMPILE_WITH_LIBJPEG_ is defined. */\r
41-#define _IRR_USE_NON_SYSTEM_JPEG_LIB_\r
42-#ifdef NO_IRR_USE_NON_SYSTEM_JPEG_LIB_\r
43 #undef _IRR_USE_NON_SYSTEM_JPEG_LIB_\r
44-#endif\r
45 \r
46 //! Define _IRR_COMPILE_WITH_LIBPNG_ to enable compiling the engine using libpng.\r
47 /** This enables the engine to read png images. If you comment this out,\r
48@@ -265,10 +273,7 @@ the engine will no longer read .png images. */
49 //! Define _IRR_USE_NON_SYSTEM_LIBPNG_ to let irrlicht use the libpng which comes with irrlicht.\r
50 /** If this is commented out, Irrlicht will try to compile using the libpng installed in the system.\r
51 This is only used when _IRR_COMPILE_WITH_LIBPNG_ is defined. */\r
52-#define _IRR_USE_NON_SYSTEM_LIB_PNG_\r
53-#ifdef NO_IRR_USE_NON_SYSTEM_LIB_PNG_\r
54 #undef _IRR_USE_NON_SYSTEM_LIB_PNG_\r
55-#endif\r
56 \r
57 //! Define _IRR_D3D_NO_SHADER_DEBUGGING to disable shader debugging in D3D9\r
58 /** If _IRR_D3D_NO_SHADER_DEBUGGING is undefined in IrrCompileConfig.h,\r
59@@ -602,10 +607,7 @@ ones. */
60 /** If this is commented out, Irrlicht will try to compile using the zlib\r
61 installed on the system. This is only used when _IRR_COMPILE_WITH_ZLIB_ is\r
62 defined. */\r
63-#define _IRR_USE_NON_SYSTEM_ZLIB_\r
64-#ifdef NO_IRR_USE_NON_SYSTEM_ZLIB_\r
65 #undef _IRR_USE_NON_SYSTEM_ZLIB_\r
66-#endif\r
67 //! Define _IRR_COMPILE_WITH_ZIP_ENCRYPTION_ if you want to read AES-encrypted ZIP archives\r
68 #define _IRR_COMPILE_WITH_ZIP_ENCRYPTION_\r
69 #ifdef NO_IRR_COMPILE_WITH_ZIP_ENCRYPTION_\r
70@@ -623,18 +625,12 @@ library. */
71 /** If this is commented out, Irrlicht will try to compile using the bzlib\r
72 installed on the system. This is only used when _IRR_COMPILE_WITH_BZLIB_ is\r
73 defined. */\r
74-#define _IRR_USE_NON_SYSTEM_BZLIB_\r
75-#ifdef NO_IRR_USE_NON_SYSTEM_BZLIB_\r
76 #undef _IRR_USE_NON_SYSTEM_BZLIB_\r
77-#endif\r
78 //! Define _IRR_COMPILE_WITH_LZMA_ if you want to use LZMA compressed zip files.\r
79 /** LZMA is a very efficient compression code, known from 7zip. Irrlicht\r
80 currently only supports zip archives, though. */\r
81-#define _IRR_COMPILE_WITH_LZMA_\r
82-#ifdef NO_IRR_COMPILE_WITH_LZMA_\r
83 #undef _IRR_COMPILE_WITH_LZMA_\r
84 #endif\r
85-#endif\r
86 \r
87 //! Define __IRR_COMPILE_WITH_MOUNT_ARCHIVE_LOADER_ if you want to mount folders as archives\r
88 #define __IRR_COMPILE_WITH_MOUNT_ARCHIVE_LOADER_\r
89diff --git a/source/Irrlicht/CIrrDeviceLinux.h b/source/Irrlicht/CIrrDeviceLinux.h
90index 4d2a2c6..8cf24ba 100644
91--- a/source/Irrlicht/CIrrDeviceLinux.h
92+++ b/source/Irrlicht/CIrrDeviceLinux.h
93@@ -22,7 +22,7 @@
94 #define GLX_GLXEXT_LEGACY 1\r
95 #include <GL/glx.h>\r
96 #ifdef _IRR_OPENGL_USE_EXTPOINTER_\r
97-#include "glxext.h"\r
98+#include <GL/glxext.h>\r
99 #endif\r
100 #endif\r
101 \r
102diff --git a/source/Irrlicht/COpenGLExtensionHandler.h b/source/Irrlicht/COpenGLExtensionHandler.h
103index 1b77bad..3886a0e 100644
104--- a/source/Irrlicht/COpenGLExtensionHandler.h
105+++ b/source/Irrlicht/COpenGLExtensionHandler.h
106@@ -35,7 +35,7 @@
107 #endif\r
108 #include <OpenGL/gl.h>\r
109 #if defined(_IRR_OPENGL_USE_EXTPOINTER_)\r
110- #include "glext.h"\r
111+ #include <GL/glext.h>\r
112 #endif\r
113 #elif defined(_IRR_COMPILE_WITH_SDL_DEVICE_) && !defined(_IRR_COMPILE_WITH_X11_DEVICE_)\r
114 #if defined(_IRR_OPENGL_USE_EXTPOINTER_)\r
115@@ -48,7 +48,7 @@
116 #define NO_SDL_GLEXT\r
117 #include <SDL/SDL_video.h>\r
118 #include <SDL/SDL_opengl.h>\r
119- #include "glext.h"\r
120+ #include <GL/glext.h>\r
121 #else\r
122 #if defined(_IRR_OPENGL_USE_EXTPOINTER_)\r
123 #define GL_GLEXT_LEGACY 1\r
124@@ -60,9 +60,9 @@
125 #include <GL/gl.h>\r
126 #include <GL/glx.h>\r
127 #if defined(_IRR_OPENGL_USE_EXTPOINTER_)\r
128- #include "glext.h"\r
129+ #include <GL/glext.h>\r
130 #undef GLX_ARB_get_proc_address // avoid problems with local glxext.h\r
131- #include "glxext.h"\r
132+ #include <GL/glxext.h>\r
133 #endif\r
134 #endif\r
135 \r
136diff --git a/source/Irrlicht/COpenGLSLMaterialRenderer.h b/source/Irrlicht/COpenGLSLMaterialRenderer.h
137index ff71150..f8a6007 100644
138--- a/source/Irrlicht/COpenGLSLMaterialRenderer.h
139+++ b/source/Irrlicht/COpenGLSLMaterialRenderer.h
140@@ -25,7 +25,7 @@
141 #include <GL/gl.h>\r
142 #endif\r
143 #if defined(_IRR_OPENGL_USE_EXTPOINTER_)\r
144- #include "glext.h"\r
145+ #include <GL/glext.h>\r
146 #endif\r
147 #endif\r
148 \r
149diff --git a/source/Irrlicht/Makefile b/source/Irrlicht/Makefile
150index 67a3899..d9ea7f3 100644
151--- a/source/Irrlicht/Makefile
152+++ b/source/Irrlicht/Makefile
153@@ -43,7 +43,7 @@ IRRIMAGEOBJ = CColorConverter.o CImage.o CImageLoaderBMP.o CImageLoaderDDS.o CIm
154 CImageWriterBMP.o CImageWriterJPG.o CImageWriterPCX.o CImageWriterPNG.o CImageWriterPPM.o CImageWriterPSD.o CImageWriterTGA.o\r
155 IRRVIDEOOBJ = CVideoModeList.o CFPSCounter.o $(IRRDRVROBJ) $(IRRIMAGEOBJ)\r
156 IRRSWRENDEROBJ = CSoftwareDriver.o CSoftwareTexture.o CTRFlat.o CTRFlatWire.o CTRGouraud.o CTRGouraudWire.o CTRNormalMap.o CTRStencilShadow.o CTRTextureFlat.o CTRTextureFlatWire.o CTRTextureGouraud.o CTRTextureGouraudAdd.o CTRTextureGouraudNoZ.o CTRTextureGouraudWire.o CZBuffer.o CTRTextureGouraudVertexAlpha2.o CTRTextureGouraudNoZ2.o CTRTextureLightMap2_M2.o CTRTextureLightMap2_M4.o CTRTextureLightMap2_M1.o CSoftwareDriver2.o CSoftwareTexture2.o CTRTextureGouraud2.o CTRGouraud2.o CTRGouraudAlpha2.o CTRGouraudAlphaNoZ2.o CTRTextureDetailMap2.o CTRTextureGouraudAdd2.o CTRTextureGouraudAddNoZ2.o CTRTextureWire2.o CTRTextureLightMap2_Add.o CTRTextureLightMapGouraud2_M4.o IBurningShader.o CTRTextureBlend.o CTRTextureGouraudAlpha.o CTRTextureGouraudAlphaNoZ.o CDepthBuffer.o CBurningShader_Raster_Reference.o\r
157-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
158+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\r
159 IRROTHEROBJ = CIrrDeviceSDL.o CIrrDeviceLinux.o CIrrDeviceConsole.o CIrrDeviceStub.o CIrrDeviceWin32.o CIrrDeviceFB.o CLogger.o COSOperator.o Irrlicht.o os.o\r
160 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
161 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
162@@ -56,14 +56,14 @@ BZIP2OBJ = bzip2/blocksort.o bzip2/huffman.o bzip2/crctable.o bzip2/randtable.o
163 EXTRAOBJ =\r
164 LINKOBJ = $(IRRMESHOBJ) $(IRROBJ) $(IRRPARTICLEOBJ) $(IRRANIMOBJ) \\r
165 $(IRRVIDEOOBJ) $(IRRSWRENDEROBJ) $(IRRIOOBJ) $(IRROTHEROBJ) \\r
166- $(IRRGUIOBJ) $(ZLIBOBJ) $(JPEGLIBOBJ) $(LIBPNGOBJ) $(LIBAESGM) \\r
167- $(BZIP2OBJ) $(EXTRAOBJ)\r
168+ $(IRRGUIOBJ) $(LIBAESGM) \\r
169+ $(EXTRAOBJ)\r
170 \r
171 ###############\r
172 #Compiler flags\r
173-CXXINCS = -I../../include -Izlib -Ijpeglib -Ilibpng\r
174+CXXINCS = -I../../include # -Izlib -Ijpeglib -Ilibpng\r
175 CPPFLAGS += $(CXXINCS) -DIRRLICHT_EXPORTS=1\r
176-CXXFLAGS += -Wall -pipe -fno-exceptions -fno-rtti -fstrict-aliasing\r
177+CXXFLAGS += -Wall -pipe -fno-exceptions -fstrict-aliasing\r
178 ifndef NDEBUG\r
179 CXXFLAGS += -g -D_DEBUG\r
180 else\r
181@@ -88,7 +88,7 @@ STATIC_LIB = libIrrlicht.a
182 LIB_PATH = ../../lib/$(SYSTEM)\r
183 INSTALL_DIR = /usr/local/lib\r
184 sharedlib install: SHARED_LIB = libIrrlicht.so\r
185-sharedlib: LDFLAGS += -L/usr/X11R6/lib$(LIBSELECT) -lGL -lXxf86vm\r
186+staticlib sharedlib: LDFLAGS += -L/usr/X11R6/lib$(LIBSELECT) -lGL -lXxf86vm -lX11 -lz -lpng -ljpeg -lbz2\r
187 staticlib sharedlib: CXXINCS += -I/usr/X11R6/include\r
188 \r
189 #OSX specific options\r
190@@ -153,7 +153,8 @@ install install_osx:
191 $(RM) -r $(INSTALL_DIR)/../include/irrlicht\r
192 mkdir -p $(INSTALL_DIR)/../include/irrlicht\r
193 cp ../../include/*.h $(INSTALL_DIR)/../include/irrlicht/\r
194- cp $(LIB_PATH)/$(SHARED_FULLNAME) $(INSTALL_DIR)\r
195+ cp $(LIB_PATH)/$(SHARED_FULLNAME) $(INSTALL_DIR) || true\r
196+ cp $(LIB_PATH)/$(STATIC_LIB) $(INSTALL_DIR) || true\r
197 cd $(INSTALL_DIR) && ln -s -f $(SHARED_FULLNAME) $(SONAME)\r
198 cd $(INSTALL_DIR) && ln -s -f $(SONAME) $(SHARED_LIB)\r
199 # ldconfig -n $(INSTALL_DIR)\r
200--
2012.18.0
202