projects/guix·blob python-team · refs

153 lines · 7.5 KiB

1Subject: [PATCH] debian/use-system-libs
2
3Path to build irrlicht using the system libraries for png,zlib and
4jpeg as well as the glext family of header files.
5
6Signed-off-by: Christoph Egger <[email protected]
7
8--- irrlicht.orig/include/IrrCompileConfig.h
9+++ irrlicht/include/IrrCompileConfig.h
10@@ -253,10 +253,7 @@
11 //! Define _IRR_USE_NON_SYSTEM_JPEG_LIB_ to let irrlicht use the jpeglib which comes with irrlicht.
12 /** If this is commented out, Irrlicht will try to compile using the jpeg lib installed in the system.
13 This is only used when _IRR_COMPILE_WITH_LIBJPEG_ is defined. */
14-#define _IRR_USE_NON_SYSTEM_JPEG_LIB_
15-#ifdef NO_IRR_USE_NON_SYSTEM_JPEG_LIB_
16 #undef _IRR_USE_NON_SYSTEM_JPEG_LIB_
17-#endif
18
19 //! Define _IRR_COMPILE_WITH_LIBPNG_ to enable compiling the engine using libpng.
20 /** This enables the engine to read png images. If you comment this out,
21@@ -269,10 +266,7 @@
22 //! Define _IRR_USE_NON_SYSTEM_LIBPNG_ to let irrlicht use the libpng which comes with irrlicht.
23 /** If this is commented out, Irrlicht will try to compile using the libpng installed in the system.
24 This is only used when _IRR_COMPILE_WITH_LIBPNG_ is defined. */
25-#define _IRR_USE_NON_SYSTEM_LIB_PNG_
26-#ifdef NO_IRR_USE_NON_SYSTEM_LIB_PNG_
27 #undef _IRR_USE_NON_SYSTEM_LIB_PNG_
28-#endif
29
30 //! Define _IRR_D3D_NO_SHADER_DEBUGGING to disable shader debugging in D3D9
31 /** If _IRR_D3D_NO_SHADER_DEBUGGING is undefined in IrrCompileConfig.h,
32@@ -606,10 +600,7 @@
33 /** If this is commented out, Irrlicht will try to compile using the zlib
34 installed on the system. This is only used when _IRR_COMPILE_WITH_ZLIB_ is
35 defined. */
36-#define _IRR_USE_NON_SYSTEM_ZLIB_
37-#ifdef NO_IRR_USE_NON_SYSTEM_ZLIB_
38 #undef _IRR_USE_NON_SYSTEM_ZLIB_
39-#endif
40 //! Define _IRR_COMPILE_WITH_ZIP_ENCRYPTION_ if you want to read AES-encrypted ZIP archives
41 #define _IRR_COMPILE_WITH_ZIP_ENCRYPTION_
42 #ifdef NO_IRR_COMPILE_WITH_ZIP_ENCRYPTION_
43@@ -627,18 +618,12 @@
44 /** If this is commented out, Irrlicht will try to compile using the bzlib
45 installed on the system. This is only used when _IRR_COMPILE_WITH_BZLIB_ is
46 defined. */
47-#define _IRR_USE_NON_SYSTEM_BZLIB_
48-#ifdef NO_IRR_USE_NON_SYSTEM_BZLIB_
49 #undef _IRR_USE_NON_SYSTEM_BZLIB_
50-#endif
51 //! Define _IRR_COMPILE_WITH_LZMA_ if you want to use LZMA compressed zip files.
52 /** LZMA is a very efficient compression code, known from 7zip. Irrlicht
53 currently only supports zip archives, though. */
54-#define _IRR_COMPILE_WITH_LZMA_
55-#ifdef NO_IRR_COMPILE_WITH_LZMA_
56 #undef _IRR_COMPILE_WITH_LZMA_
57 #endif
58-#endif
59
60 //! Define __IRR_COMPILE_WITH_MOUNT_ARCHIVE_LOADER_ if you want to mount folders as archives
61 #define __IRR_COMPILE_WITH_MOUNT_ARCHIVE_LOADER_
62--- irrlicht.orig/source/Irrlicht/CIrrDeviceLinux.h
63+++ irrlicht/source/Irrlicht/CIrrDeviceLinux.h
64@@ -22,7 +22,7 @@
65 #define GLX_GLXEXT_LEGACY 1
66 #include <GL/glx.h>
67 #ifdef _IRR_OPENGL_USE_EXTPOINTER_
68-#include "glxext.h"
69+#include <GL/glxext.h>
70 #endif
71 #endif
72
73--- irrlicht.orig/source/Irrlicht/COpenGLExtensionHandler.h
74+++ irrlicht/source/Irrlicht/COpenGLExtensionHandler.h
75@@ -35,7 +35,7 @@
76 #endif
77 #include <OpenGL/gl.h>
78 #if defined(_IRR_OPENGL_USE_EXTPOINTER_)
79- #include "glext.h"
80+ #include <GL/glext.h>
81 #endif
82 #elif defined(_IRR_COMPILE_WITH_SDL_DEVICE_) && !defined(_IRR_COMPILE_WITH_X11_DEVICE_)
83 #if defined(_IRR_OPENGL_USE_EXTPOINTER_)
84@@ -48,7 +48,7 @@
85 #define NO_SDL_GLEXT
86 #include <SDL/SDL_video.h>
87 #include <SDL/SDL_opengl.h>
88- #include "glext.h"
89+ #include <GL/glext.h>
90 #else
91 #if defined(_IRR_OPENGL_USE_EXTPOINTER_)
92 #define GL_GLEXT_LEGACY 1
93@@ -60,9 +60,9 @@
94 #include <GL/gl.h>
95 #include <GL/glx.h>
96 #if defined(_IRR_OPENGL_USE_EXTPOINTER_)
97- #include "glext.h"
98+ #include <GL/glext.h>
99 #undef GLX_ARB_get_proc_address // avoid problems with local glxext.h
100- #include "glxext.h"
101+ #include <GL/glxext.h>
102 #endif
103 #endif
104
105--- irrlicht.orig/source/Irrlicht/COpenGLSLMaterialRenderer.h
106+++ irrlicht/source/Irrlicht/COpenGLSLMaterialRenderer.h
107@@ -25,7 +25,7 @@
108 #include <GL/gl.h>
109 #endif
110 #if defined(_IRR_OPENGL_USE_EXTPOINTER_)
111- #include "glext.h"
112+ #include <GL/glext.h>
113 #endif
114 #endif
115
116--- irrlicht.orig/source/Irrlicht/Makefile
117+++ irrlicht/source/Irrlicht/Makefile
118@@ -45,7 +45,7 @@
119 CImageWriterBMP.o CImageWriterJPG.o CImageWriterPCX.o CImageWriterPNG.o CImageWriterPPM.o CImageWriterPSD.o CImageWriterTGA.o
120 IRRVIDEOOBJ = CVideoModeList.o CFPSCounter.o $(IRRDRVROBJ) $(IRRIMAGEOBJ)
121 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
122-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
123+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
124 IRROTHEROBJ = CIrrDeviceSDL.o CIrrDeviceLinux.o CIrrDeviceConsole.o CIrrDeviceStub.o CIrrDeviceWin32.o CIrrDeviceFB.o CLogger.o COSOperator.o Irrlicht.o os.o
125 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
126 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
127@@ -58,14 +58,14 @@
128 EXTRAOBJ =
129 LINKOBJ = $(IRRMESHOBJ) $(IRROBJ) $(IRRPARTICLEOBJ) $(IRRANIMOBJ) \
130 $(IRRVIDEOOBJ) $(IRRSWRENDEROBJ) $(IRRIOOBJ) $(IRROTHEROBJ) \
131- $(IRRGUIOBJ) $(ZLIBOBJ) $(JPEGLIBOBJ) $(LIBPNGOBJ) $(LIBAESGM) \
132- $(BZIP2OBJ) $(EXTRAOBJ)
133+ $(IRRGUIOBJ) $(LIBAESGM) \
134+ $(EXTRAOBJ)
135
136 ###############
137 #Compiler flags
138-CXXINCS = -I../../include -Izlib -Ijpeglib -Ilibpng
139+CXXINCS = -I../../include # -Izlib -Ijpeglib -Ilibpng
140 CPPFLAGS += $(CXXINCS) -DIRRLICHT_EXPORTS=1
141-CXXFLAGS += -Wall -pipe -fno-exceptions -fno-rtti -fstrict-aliasing
142+CXXFLAGS += -Wall -pipe -fno-exceptions -fstrict-aliasing
143 ifndef NDEBUG
144 CXXFLAGS += -g -D_DEBUG
145 else
146@@ -156,6 +156,7 @@
147 mkdir -p $(INSTALL_DIR)/../include/irrlicht
148 cp ../../include/*.h $(INSTALL_DIR)/../include/irrlicht/
149 cp $(LIB_PATH)/$(SHARED_FULLNAME) $(INSTALL_DIR)
150+ cp $(LIB_PATH)/$(STATIC_LIB) $(INSTALL_DIR)
151 cd $(INSTALL_DIR) && ln -s -f $(SHARED_FULLNAME) $(SONAME)
152 cd $(INSTALL_DIR) && ln -s -f $(SONAME) $(SHARED_LIB)
153 # ldconfig -n $(INSTALL_DIR)