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 /dev-games/irrlicht
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 'dev-games/irrlicht')
-rw-r--r--dev-games/irrlicht/Manifest1
-rw-r--r--dev-games/irrlicht/files/irrlicht-1.8.1-config.patch29
-rw-r--r--dev-games/irrlicht/files/irrlicht-1.8.1-demoMake.patch764
-rw-r--r--dev-games/irrlicht/files/irrlicht-1.8.1-gentoo.patch46
-rw-r--r--dev-games/irrlicht/files/irrlicht-1.8.1-jpeg-9a.patch15
-rw-r--r--dev-games/irrlicht/files/irrlicht-1.8.1-mesa-10.x.patch40
-rw-r--r--dev-games/irrlicht/irrlicht-1.8.1-r1.ebuild71
-rw-r--r--dev-games/irrlicht/irrlicht-1.8.1.ebuild71
-rw-r--r--dev-games/irrlicht/metadata.xml18
9 files changed, 1055 insertions, 0 deletions
diff --git a/dev-games/irrlicht/Manifest b/dev-games/irrlicht/Manifest
new file mode 100644
index 000000000000..2ddd5afe1486
--- /dev/null
+++ b/dev-games/irrlicht/Manifest
@@ -0,0 +1 @@
+DIST irrlicht-1.8.1.zip 24167632 SHA256 814bb90116d5429449ba1d169e2cbff881c473b7eada4c2447132bc4f4a6e97b SHA512 93390c162e5a8edb231588d47dc421c24d21a34e833df1f3b92c85a9e8ef4a96a61d854e05eedb37f88f7f02821059e78a40a52cbc8e39356c4d36b17775dfbb WHIRLPOOL c66f0a15575327667cbe82c79919518771e55d5e919c972e64e104a6272b78a20bbb7bbba864722dead4248fb43dd722227181d696eb63e82b4093aaadac132b
diff --git a/dev-games/irrlicht/files/irrlicht-1.8.1-config.patch b/dev-games/irrlicht/files/irrlicht-1.8.1-config.patch
new file mode 100644
index 000000000000..5cb2a75b7872
--- /dev/null
+++ b/dev-games/irrlicht/files/irrlicht-1.8.1-config.patch
@@ -0,0 +1,29 @@
+--- include/IrrCompileConfig.h
++++ 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
diff --git a/dev-games/irrlicht/files/irrlicht-1.8.1-demoMake.patch b/dev-games/irrlicht/files/irrlicht-1.8.1-demoMake.patch
new file mode 100644
index 000000000000..27f553dfdb21
--- /dev/null
+++ b/dev-games/irrlicht/files/irrlicht-1.8.1-demoMake.patch
@@ -0,0 +1,764 @@
+--- examples/Demo/Makefile
++++ examples/Demo/Makefile
+@@ -2,8 +2,9 @@
+ Target = Demo
+ Sources = CDemo.cpp CMainMenu.cpp main.cpp
+
+-CPPFLAGS = -I../../include -I/usr/X11R6/include
+-CXXFLAGS = -Wall -O3 -ffast-math
++CXXFLAGS ?= -O3
++CPPFLAGS += -I/usr/include/irrlicht
++CXXFLAGS += -Wall -ffast-math
+
+ ifeq ($(HOSTTYPE), x86_64)
+ LIBSELECT=64
+@@ -13,7 +14,7 @@
+
+ # target specific settings
+ all_linux: SYSTEM=Linux
+-all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/$(SYSTEM) -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXcursor
++all_linux: LDFLAGS += -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXcursor -lpng -ljpeg
+
+ all_win32 clean_win32: SYSTEM=Win32-gcc
+ all_win32: LDFLAGS = -L../../lib/$(SYSTEM) -lIrrlicht -lopengl32 -lm
+--- examples/14.Win32Window/Makefile
++++ examples/14.Win32Window/Makefile
+@@ -5,8 +5,9 @@
+ Sources = main.cpp
+
+ # general compiler settings
+-CPPFLAGS = -I../../include -I/usr/X11R6/include
+-CXXFLAGS = -O3 -ffast-math
++CPPFLAGS += -I/usr/include/irrlicht
++CXXFLAGS ?= -O3
++CXXFLAGS += -ffast-math
+ #CXXFLAGS = -g -Wall
+
+ #default target is Linux
+@@ -17,13 +18,13 @@
+ endif
+
+ # target specific settings
+-all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXcursor
++all_linux: LDFLAGS += -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXcursor -lpng -ljpeg
+ all_linux clean_linux: SYSTEM=Linux
+ all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm
+ all_win32 clean_win32: SYSTEM=Win32-gcc
+ all_win32 clean_win32: SUF=.exe
+ # name of the binary - only valid for targets which set SYSTEM
+-DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF)
++DESTPATH = ../../bin/$(Target)$(SUF)
+
+ all_linux all_win32:
+ $(warning Building...)
+--- examples/12.TerrainRendering/Makefile
++++ examples/12.TerrainRendering/Makefile
+@@ -5,8 +5,9 @@
+ Sources = main.cpp
+
+ # general compiler settings
+-CPPFLAGS = -I../../include -I/usr/X11R6/include
+-CXXFLAGS = -O3 -ffast-math
++CPPFLAGS += -I/usr/include/irrlicht
++CXXFLAGS ?= -O3
++CXXFLAGS += -ffast-math
+ #CXXFLAGS = -g -Wall
+
+ #default target is Linux
+@@ -17,13 +18,13 @@
+ endif
+
+ # target specific settings
+-all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXcursor
++all_linux: LDFLAGS += -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXcursor -lpng -ljpeg
+ all_linux clean_linux: SYSTEM=Linux
+ all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm
+ all_win32 clean_win32: SYSTEM=Win32-gcc
+ all_win32 clean_win32: SUF=.exe
+ # name of the binary - only valid for targets which set SYSTEM
+-DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF)
++DESTPATH = ../../bin/$(Target)$(SUF)
+
+ all_linux all_win32:
+ $(warning Building...)
+--- examples/11.PerPixelLighting/Makefile
++++ examples/11.PerPixelLighting/Makefile
+@@ -5,8 +5,9 @@
+ Sources = main.cpp
+
+ # general compiler settings
+-CPPFLAGS = -I../../include -I/usr/X11R6/include
+-CXXFLAGS = -O3 -ffast-math
++CPPFLAGS += -I/usr/include/irrlicht
++CXXFLAGS ?= -O3
++CXXFLAGS += -ffast-math
+ #CXXFLAGS = -g -Wall
+
+ #default target is Linux
+@@ -17,13 +18,13 @@
+ endif
+
+ # target specific settings
+-all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXcursor
++all_linux: LDFLAGS += -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXcursor -lpng -ljpeg
+ all_linux clean_linux: SYSTEM=Linux
+ all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm
+ all_win32 clean_win32: SYSTEM=Win32-gcc
+ all_win32 clean_win32: SUF=.exe
+ # name of the binary - only valid for targets which set SYSTEM
+-DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF)
++DESTPATH = ../../bin/$(Target)$(SUF)
+
+ all_linux all_win32:
+ $(warning Building...)
+--- examples/08.SpecialFX/Makefile
++++ examples/08.SpecialFX/Makefile
+@@ -5,8 +5,9 @@
+ Sources = main.cpp
+
+ # general compiler settings
+-CPPFLAGS = -I../../include -I/usr/X11R6/include
+-CXXFLAGS = -O3 -ffast-math
++CPPFLAGS += -I/usr/include/irrlicht
++CXXFLAGS ?= -O3
++CXXFLAGS += -ffast-math
+ #CXXFLAGS = -g -Wall
+
+ #default target is Linux
+@@ -17,13 +18,13 @@
+ endif
+
+ # target specific settings
+-all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXcursor
++all_linux: LDFLAGS += -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXcursor -lpng -ljpeg
+ all_linux clean_linux: SYSTEM=Linux
+ all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm
+ all_win32 clean_win32: SYSTEM=Win32-gcc
+ all_win32 clean_win32: SUF=.exe
+ # name of the binary - only valid for targets which set SYSTEM
+-DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF)
++DESTPATH = ../../bin/$(Target)$(SUF)
+
+ all_linux all_win32:
+ $(warning Building...)
+--- examples/06.2DGraphics/Makefile
++++ examples/06.2DGraphics/Makefile
+@@ -5,8 +5,9 @@
+ Sources = main.cpp
+
+ # general compiler settings
+-CPPFLAGS = -I../../include -I/usr/X11R6/include
+-CXXFLAGS = -O3 -ffast-math
++CPPFLAGS += -I/usr/include/irrlicht
++CXXFLAGS ?= -O3
++CXXFLAGS += -ffast-math
+ #CXXFLAGS = -g -Wall
+
+ #default target is Linux
+@@ -17,13 +18,13 @@
+ endif
+
+ # target specific settings
+-all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXcursor
++all_linux: LDFLAGS += -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXcursor -lpng -ljpeg
+ all_linux clean_linux: SYSTEM=Linux
+ all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm
+ all_win32 clean_win32: SYSTEM=Win32-gcc
+ all_win32 clean_win32: SUF=.exe
+ # name of the binary - only valid for targets which set SYSTEM
+-DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF)
++DESTPATH = ../../bin/$(Target)$(SUF)
+
+ all_linux all_win32:
+ $(warning Building...)
+--- examples/04.Movement/Makefile
++++ examples/04.Movement/Makefile
+@@ -5,8 +5,9 @@
+ Sources = main.cpp
+
+ # general compiler settings
+-CPPFLAGS = -I../../include -I/usr/X11R6/include
+-CXXFLAGS = -O3 -ffast-math
++CPPFLAGS += -I/usr/include/irrlicht
++CXXFLAGS ?= -O3
++CXXFLAGS += -ffast-math
+ #CXXFLAGS = -g -Wall
+
+ #default target is Linux
+@@ -17,14 +18,14 @@
+ endif
+
+ # target specific settings
+-all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXcursor
++all_linux: LDFLAGS += -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXcursor -lpng -ljpeg
+ all_linux clean_linux: SYSTEM=Linux
+ all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm
+ all_win32: CPPFLAGS += -D__GNUWIN32__ -D_WIN32 -DWIN32 -D_WINDOWS -D_MBCS -D_USRDLL
+ all_win32 clean_win32: SYSTEM=Win32-gcc
+ all_win32 clean_win32: SUF=.exe
+ # name of the binary - only valid for targets which set SYSTEM
+-DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF)
++DESTPATH = ../../bin/$(Target)$(SUF)
+
+ all_linux all_win32:
+ $(warning Building...)
+--- examples/16.Quake3MapShader/Makefile
++++ examples/16.Quake3MapShader/Makefile
+@@ -5,8 +5,9 @@
+ Sources = main.cpp
+
+ # general compiler settings
+-CPPFLAGS = -I../../include -I/usr/X11R6/include
+-CXXFLAGS = -O3 -ffast-math
++CPPFLAGS += -I/usr/include/irrlicht
++CXXFLAGS ?= -O3
++CXXFLAGS += -ffast-math
+ #CXXFLAGS = -g -Wall
+
+ #default target is Linux
+@@ -17,13 +18,13 @@
+ endif
+
+ # target specific settings
+-all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXcursor
++all_linux: LDFLAGS += -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXcursor -lpng -ljpeg
+ all_linux clean_linux: SYSTEM=Linux
+ all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm
+ all_win32 clean_win32: SYSTEM=Win32-gcc
+ all_win32 clean_win32: SUF=.exe
+ # name of the binary - only valid for targets which set SYSTEM
+-DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF)
++DESTPATH = ../../bin/$(Target)$(SUF)
+
+ all_linux all_win32:
+ $(warning Building...)
+--- examples/15.LoadIrrFile/Makefile
++++ examples/15.LoadIrrFile/Makefile
+@@ -5,8 +5,9 @@
+ Sources = main.cpp
+
+ # general compiler settings
+-CPPFLAGS = -I../../include -I/usr/X11R6/include
+-CXXFLAGS = -O3 -ffast-math
++CPPFLAGS += -I/usr/include/irrlicht
++CXXFLAGS ?= -O3
++CXXFLAGS += -ffast-math
+ #CXXFLAGS = -g -Wall
+
+ #default target is Linux
+@@ -17,13 +18,13 @@
+ endif
+
+ # target specific settings
+-all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXcursor
++all_linux: LDFLAGS += -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXcursor -lpng -ljpeg
+ all_linux clean_linux: SYSTEM=Linux
+ all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm
+ all_win32 clean_win32: SYSTEM=Win32-gcc
+ all_win32 clean_win32: SUF=.exe
+ # name of the binary - only valid for targets which set SYSTEM
+-DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF)
++DESTPATH = ../../bin/$(Target)$(SUF)
+
+ all_linux all_win32:
+ $(warning Building...)
+--- examples/02.Quake3Map/Makefile
++++ examples/02.Quake3Map/Makefile
+@@ -5,8 +5,9 @@
+ Sources = main.cpp
+
+ # general compiler settings
+-CPPFLAGS = -I../../include -I/usr/X11R6/include
+-CXXFLAGS = -O3 -ffast-math
++CPPFLAGS += -I/usr/include/irrlicht
++CXXFLAGS ?= -O3
++CXXFLAGS += -ffast-math
+ #CXXFLAGS = -g -Wall
+
+ #default target is Linux
+@@ -17,7 +18,7 @@
+ endif
+
+ # target specific settings
+-all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXcursor
++all_linux: LDFLAGS += -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXcursor -lpng -ljpeg
+ all_linux clean_linux: SYSTEM=Linux
+ all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht
+ static_win32: LDFLAGS += -lgdi32 -lopengl32 -ld3dx9d -lwinmm -lm
+@@ -25,7 +25,7 @@
+ static_win32 all_win32 clean_win32: SYSTEM=Win32-gcc
+ static_win32 all_win32 clean_win32: SUF=.exe
+ # name of the binary - only valid for targets which set SYSTEM
+-DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF)
++DESTPATH = ../../bin/$(Target)$(SUF)
+
+ all_linux all_win32 static_win32:
+ $(warning Building...)
+--- examples/19.MouseAndJoystick/Makefile
++++ examples/19.MouseAndJoystick/Makefile
+@@ -5,9 +5,10 @@
+ Sources = main.cpp
+
+ # general compiler settings
+-CPPFLAGS = -I../../include -I/usr/X11R6/include
++CPPFLAGS += -I/usr/include/irrlicht
+ #CXXFLAGS = -O3 -ffast-math
+-CXXFLAGS = -g -Wall
++CXXFLAGS ?= -O3
++CXXFLAGS += -Wall
+
+ #default target is Linux
+ all: all_linux
+@@ -17,14 +18,14 @@
+ endif
+
+ # target specific settings
+-all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXcursor
++all_linux: LDFLAGS += -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXcursor -lpng -ljpeg
+ all_linux clean_linux: SYSTEM=Linux
+ all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm
+ all_win32: CPPFLAGS += -D__GNUWIN32__ -D_WIN32 -DWIN32 -D_WINDOWS -D_MBCS -D_USRDLL
+ all_win32 clean_win32: SYSTEM=Win32-gcc
+ all_win32 clean_win32: SUF=.exe
+ # name of the binary - only valid for targets which set SYSTEM
+-DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF)
++DESTPATH = ../../bin/$(Target)$(SUF)
+
+ all_linux all_win32:
+ $(warning Building...)
+--- examples/13.RenderToTexture/Makefile
++++ examples/13.RenderToTexture/Makefile
+@@ -5,8 +5,9 @@
+ Sources = main.cpp
+
+ # general compiler settings
+-CPPFLAGS = -I../../include -I/usr/X11R6/include
+-CXXFLAGS = -O3 -ffast-math
++CPPFLAGS += -I/usr/include/irrlicht
++CXXFLAGS ?= -O3
++CXXFLAGS += -ffast-math
+ #CXXFLAGS = -g -Wall
+
+ #default target is Linux
+@@ -17,13 +18,13 @@
+ endif
+
+ # target specific settings
+-all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXcursor
++all_linux: LDFLAGS += -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXcursor -lpng -ljpeg
+ all_linux clean_linux: SYSTEM=Linux
+ all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm
+ all_win32 clean_win32: SYSTEM=Win32-gcc
+ all_win32 clean_win32: SUF=.exe
+ # name of the binary - only valid for targets which set SYSTEM
+-DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF)
++DESTPATH = ../../bin/$(Target)$(SUF)
+
+ all_linux all_win32:
+ $(warning Building...)
+--- examples/10.Shaders/Makefile
++++ examples/10.Shaders/Makefile
+@@ -5,8 +5,9 @@
+ Sources = main.cpp
+
+ # general compiler settings
+-CPPFLAGS = -I../../include -I/usr/X11R6/include
+-CXXFLAGS = -O3 -ffast-math
++CPPFLAGS += -I/usr/include/irrlicht
++CXXFLAGS ?= -O3
++CXXFLAGS += -ffast-math
+ #CXXFLAGS = -g -Wall
+
+ #default target is Linux
+@@ -17,13 +18,13 @@
+ endif
+
+ # target specific settings
+-all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXcursor
++all_linux: LDFLAGS += -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXcursor -lpng -ljpeg
+ all_linux clean_linux: SYSTEM=Linux
+ all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm
+ all_win32 clean_win32: SYSTEM=Win32-gcc
+ all_win32 clean_win32: SUF=.exe
+ # name of the binary - only valid for targets which set SYSTEM
+-DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF)
++DESTPATH = ../../bin/$(Target)$(SUF)
+
+ all_linux all_win32:
+ $(warning Building...)
+--- examples/09.Meshviewer/Makefile
++++ examples/09.Meshviewer/Makefile
+@@ -5,8 +5,9 @@
+ Sources = main.cpp
+
+ # general compiler settings
+-CPPFLAGS = -I../../include -I/usr/X11R6/include
+-CXXFLAGS = -O3 -ffast-math
++CPPFLAGS += -I/usr/include/irrlicht
++CXXFLAGS ?= -O3
++CXXFLAGS += -ffast-math
+ #CXXFLAGS = -g -Wall
+
+ #default target is Linux
+@@ -17,13 +18,13 @@
+ endif
+
+ # target specific settings
+-all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXcursor
++all_linux: LDFLAGS += -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXcursor -lpng -ljpeg
+ all_linux clean_linux: SYSTEM=Linux
+ all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm
+ all_win32 clean_win32: SYSTEM=Win32-gcc
+ all_win32 clean_win32: SUF=.exe
+ # name of the binary - only valid for targets which set SYSTEM
+-DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF)
++DESTPATH = ../../bin/$(Target)$(SUF)
+
+ all_linux all_win32:
+ $(warning Building...)
+--- examples/21.Quake3Explorer/Makefile
++++ examples/21.Quake3Explorer/Makefile
+@@ -5,9 +5,10 @@
+ Sources = main.cpp sound.cpp q3factory.cpp
+
+ # general compiler settings
+-CPPFLAGS = -I../../include -I/usr/X11R6/include
++CPPFLAGS += -I/usr/include/irrlicht
+ #CXXFLAGS = -O3 -ffast-math
++CXXFLAGS ?= -O3
+-CXXFLAGS = -g -Wall
++CXXFLAGS += -Wall
+
+ #default target is Linux
+ all: all_linux
+@@ -17,13 +18,13 @@
+ endif
+
+ # target specific settings
+-all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXcursor
++all_linux: LDFLAGS += -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXcursor -lpng -ljpeg
+ all_linux clean_linux: SYSTEM=Linux
+ all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm
+ all_win32 clean_win32: SYSTEM=Win32-gcc
+ all_win32 clean_win32: SUF=.exe
+ # name of the binary - only valid for targets which set SYSTEM
+-DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF)
++DESTPATH = ../../bin/$(Target)$(SUF)
+
+ all_linux all_win32:
+ $(warning Building...)
+--- examples/03.CustomSceneNode/Makefile
++++ examples/03.CustomSceneNode/Makefile
+@@ -5,8 +5,9 @@
+ Sources = main.cpp
+
+ # general compiler settings
+-CPPFLAGS = -I../../include -I/usr/X11R6/include
+-CXXFLAGS = -O3 -ffast-math
++CPPFLAGS += -I/usr/include/irrlicht
++CXXFLAGS ?= -O3
++CXXFLAGS += -ffast-math
+ #CXXFLAGS = -g -Wall
+
+ #default target is Linux
+@@ -17,13 +18,13 @@
+ endif
+
+ # target specific settings
+-all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXcursor
++all_linux: LDFLAGS += -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXcursor -lpng -ljpeg
+ all_linux clean_linux: SYSTEM=Linux
+ all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm
+ all_win32 clean_win32: SYSTEM=Win32-gcc
+ all_win32 clean_win32: SUF=.exe
+ # name of the binary - only valid for targets which set SYSTEM
+-DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF)
++DESTPATH = ../../bin/$(Target)$(SUF)
+
+ all_linux all_win32:
+ $(warning Building...)
+--- examples/20.ManagedLights/Makefile
++++ examples/20.ManagedLights/Makefile
+@@ -5,9 +5,10 @@
+ Sources = main.cpp
+
+ # general compiler settings
+-CPPFLAGS = -I../../include -I/usr/X11R6/include
++CPPFLAGS += -I/usr/include/irrlicht
+ #CXXFLAGS = -O3 -ffast-math
++CXXFLAGS ?= -O3
+-CXXFLAGS = -g -Wall
++CXXFLAGS += -Wall
+
+ #default target is Linux
+ all: all_linux
+@@ -17,14 +18,14 @@
+ endif
+
+ # target specific settings
+-all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXcursor
++all_linux: LDFLAGS += -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXcursor -lpng -ljpeg
+ all_linux clean_linux: SYSTEM=Linux
+ all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm
+ all_win32: CPPFLAGS += -D__GNUWIN32__ -D_WIN32 -DWIN32 -D_WINDOWS -D_MBCS -D_USRDLL
+ all_win32 clean_win32: SYSTEM=Win32-gcc
+ all_win32 clean_win32: SUF=.exe
+ # name of the binary - only valid for targets which set SYSTEM
+-DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF)
++DESTPATH = ../../bin/$(Target)$(SUF)
+
+ all_linux all_win32:
+ $(warning Building...)
+--- examples/05.UserInterface/Makefile
++++ examples/05.UserInterface/Makefile
+@@ -5,8 +5,9 @@
+ Sources = main.cpp
+
+ # general compiler settings
+-CPPFLAGS = -I../../include -I/usr/X11R6/include
+-CXXFLAGS = -O3 -ffast-math
++CPPFLAGS += -I/usr/include/irrlicht
++CXXFLAGS ?= -O3
++CXXFLAGS += -ffast-math
+ #CXXFLAGS = -g -Wall
+
+ #default target is Linux
+@@ -17,13 +18,13 @@
+ endif
+
+ # target specific settings
+-all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXcursor
++all_linux: LDFLAGS += -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXcursor -lpng -ljpeg
+ all_linux clean_linux: SYSTEM=Linux
+ all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm
+ all_win32 clean_win32: SYSTEM=Win32-gcc
+ all_win32 clean_win32: SUF=.exe
+ # name of the binary - only valid for targets which set SYSTEM
+-DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF)
++DESTPATH = ../../bin/$(Target)$(SUF)
+
+ all_linux all_win32:
+ $(warning Building...)
+--- examples/01.HelloWorld/Makefile
++++ examples/01.HelloWorld/Makefile
+@@ -7,15 +7,15 @@
+ # List of source files, separated by spaces
+ Sources := main.cpp
+ # Path to Irrlicht directory, should contain include/ and lib/
+-IrrlichtHome := ../..
++IrrlichtHome := /usr
+ # Path for the executable. Note that Irrlicht.dll should usually also be there for win32 systems
+-BinPath = ../../bin/$(SYSTEM)
++BinPath = ../../bin
+
+ # general compiler settings (might need to be set when compiling the lib, too)
+ # preprocessor flags, e.g. defines and include paths
+ USERCPPFLAGS =
+ # compiler flags such as optimization flags
+-USERCXXFLAGS = -O3 -ffast-math
++USERCXXFLAGS = -ffast-math
+ #USERCXXFLAGS = -g -Wall
+ # linker flags such as additional libraries and link paths
+ USERLDFLAGS =
+@@ -24,16 +24,17 @@
+ #no changes necessary below this line
+ ####
+
+-CPPFLAGS = -I$(IrrlichtHome)/include -I/usr/X11R6/include $(USERCPPFLAGS)
+-CXXFLAGS = $(USERCXXFLAGS)
+-LDFLAGS = $(USERLDFLAGS)
++CPPFLAGS += -I/usr/include/irrlicht $(USERCPPFLAGS)
++CXXFLAGS ?= -O3
++CXXFLAGS += $(USERCXXFLAGS)
++LDFLAGS += $(USERLDFLAGS)
+
+ #default target is Linux
+ all: all_linux
+
+ # target specific settings
+-all_linux all_win32 static_win32: LDFLAGS += -L$(IrrlichtHome)/lib/$(SYSTEM) -lIrrlicht
+-all_linux: LDFLAGS += -L/usr/X11R6/lib$(LIBSELECT) -lGL -lXxf86vm -lXext -lX11 -lXcursor
++all_linux all_win32 static_win32: LDFLAGS += -lIrrlicht
++all_linux: LDFLAGS += -lGL -lXxf86vm -lXext -lX11 -lXcursor -lpng -ljpeg
+ all_linux clean_linux: SYSTEM=Linux
+ all_win32 clean_win32 static_win32: SYSTEM=Win32-gcc
+ all_win32 clean_win32 static_win32: SUF=.exe
+--- examples/18.SplitScreen/Makefile
++++ examples/18.SplitScreen/Makefile
+@@ -5,8 +5,9 @@
+ Sources = main.cpp
+
+ # general compiler settings
+-CPPFLAGS = -I../../include -I/usr/X11R6/include
+-CXXFLAGS = -O3 -ffast-math
++CPPFLAGS += -I/usr/include/irrlicht
++CXXFLAGS ?= -O3
++CXXFLAGS += -ffast-math
+ #CXXFLAGS = -g -Wall
+
+ #default target is Linux
+@@ -17,13 +18,13 @@
+ endif
+
+ # target specific settings
+-all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXcursor
++all_linux: LDFLAGS += -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXcursor -lpng -ljpeg
+ all_linux clean_linux: SYSTEM=Linux
+ all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm
+ all_win32 clean_win32: SYSTEM=Win32-gcc
+ all_win32 clean_win32: SUF=.exe
+ # name of the binary - only valid for targets which set SYSTEM
+-DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF)
++DESTPATH = ../../bin/$(Target)$(SUF)
+
+ all_linux all_win32:
+ $(warning Building...)
+--- examples/07.Collision/Makefile
++++ examples/07.Collision/Makefile
+@@ -5,8 +5,9 @@
+ Sources = main.cpp
+
+ # general compiler settings
+-CPPFLAGS = -I../../include -I/usr/X11R6/include
+-CXXFLAGS = -O3 -ffast-math
++CPPFLAGS += -I/usr/include/irrlicht
++CXXFLAGS ?= -O3
++CXXFLAGS += -ffast-math
+ #CXXFLAGS = -g -Wall
+
+ #default target is Linux
+@@ -17,13 +18,13 @@
+ endif
+
+ # target specific settings
+-all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXcursor
++all_linux: LDFLAGS += -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXcursor -lpng -ljpeg
+ all_linux clean_linux: SYSTEM=Linux
+ all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm
+ all_win32 clean_win32: SYSTEM=Win32-gcc
+ all_win32 clean_win32: SUF=.exe
+ # name of the binary - only valid for targets which set SYSTEM
+-DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF)
++DESTPATH = ../../bin/$(Target)$(SUF)
+
+ all_linux all_win32:
+ $(warning Building...)
+--- examples/24.CursorControl/Makefile
++++ examples/24.CursorControl/Makefile
+@@ -7,15 +7,15 @@
+ # List of source files, separated by spaces
+ Sources := main.cpp
+ # Path to Irrlicht directory, should contain include/ and lib/
+-IrrlichtHome := ../..
++IrrlichtHome := /usr
+ # Path for the executable. Note that Irrlicht.dll should usually also be there for win32 systems
+-BinPath = ../../bin/$(SYSTEM)
++BinPath = ../../bin
+
+ # general compiler settings (might need to be set when compiling the lib, too)
+ # preprocessor flags, e.g. defines and include paths
+ USERCPPFLAGS =
+ # compiler flags such as optimization flags
+-USERCXXFLAGS = -O3 -ffast-math
++USERCXXFLAGS = -ffast-math
+ #USERCXXFLAGS = -g -Wall
+ # linker flags such as additional libraries and link paths
+ USERLDFLAGS =
+@@ -24,16 +24,17 @@
+ #no changes necessary below this line
+ ####
+
+-CPPFLAGS = -I$(IrrlichtHome)/include -I/usr/X11R6/include $(USERCPPFLAGS)
+-CXXFLAGS = $(USERCXXFLAGS)
+-LDFLAGS = $(USERLDFLAGS)
++CPPFLAGS += -I/usr/include/irrlicht $(USERCPPFLAGS)
++CXXFLAGS ?= -O3
++CXXFLAGS += $(USERCXXFLAGS)
++LDFLAGS += $(USERLDFLAGS)
+
+ #default target is Linux
+ all: all_linux
+
+ # target specific settings
+-all_linux all_win32 static_win32: LDFLAGS += -L$(IrrlichtHome)/lib/$(SYSTEM) -lIrrlicht
+-all_linux: LDFLAGS += -L/usr/X11R6/lib$(LIBSELECT) -lGL -lXxf86vm -lXext -lX11 -lXcursor
++all_linux all_win32 static_win32: LDFLAGS += -lIrrlicht
++all_linux: LDFLAGS += -lGL -lXxf86vm -lXext -lX11 -lXcursor -lpng -ljpeg
+ all_linux clean_linux: SYSTEM=Linux
+ all_win32 clean_win32 static_win32: SYSTEM=Win32-gcc
+ all_win32 clean_win32 static_win32: SUF=.exe
+--- examples/25.XmlHandling/Makefile
++++ examples/25.XmlHandling/Makefile
+@@ -7,15 +7,15 @@
+ # List of source files, separated by spaces
+ Sources := main.cpp
+ # Path to Irrlicht directory, should contain include/ and lib/
+-IrrlichtHome := ../..
++IrrlichtHome := /usr
+ # Path for the executable. Note that Irrlicht.dll should usually also be there for win32 systems
+-BinPath = ../../bin/$(SYSTEM)
++BinPath = ../../bin
+
+ # general compiler settings (might need to be set when compiling the lib, too)
+ # preprocessor flags, e.g. defines and include paths
+ USERCPPFLAGS =
+ # compiler flags such as optimization flags
+-USERCXXFLAGS = -O3 -ffast-math
++USERCXXFLAGS = -ffast-math
+ #USERCXXFLAGS = -g -Wall
+ # linker flags such as additional libraries and link paths
+ USERLDFLAGS =
+@@ -24,16 +24,17 @@
+ #no changes necessary below this line
+ ####
+
+-CPPFLAGS = -I$(IrrlichtHome)/include -I/usr/X11R6/include $(USERCPPFLAGS)
+-CXXFLAGS = $(USERCXXFLAGS)
+-LDFLAGS = $(USERLDFLAGS)
++CPPFLAGS += -I/usr/include/irrlicht $(USERCPPFLAGS)
++CXXFLAGS ?= -O3
++CXXFLAGS += $(USERCXXFLAGS)
++LDFLAGS += $(USERLDFLAGS)
+
+ #default target is Linux
+ all: all_linux
+
+ # target specific settings
+-all_linux all_win32 static_win32: LDFLAGS += -L$(IrrlichtHome)/lib/$(SYSTEM) -lIrrlicht
+-all_linux: LDFLAGS += -L/usr/X11R6/lib$(LIBSELECT) -lGL -lXxf86vm -lXext -lX11 -lXcursor
++all_linux all_win32 static_win32: LDFLAGS += -lIrrlicht
++all_linux: LDFLAGS += -lGL -lXxf86vm -lXext -lX11 -lXcursor -lpng -ljpeg
+ all_linux clean_linux: SYSTEM=Linux
+ all_win32 clean_win32 static_win32: SYSTEM=Win32-gcc
+ all_win32 clean_win32 static_win32: SUF=.exe
+--- examples/26.OcclusionQuery/Makefile
++++ examples/26.OcclusionQuery/Makefile
+@@ -5,8 +5,9 @@
+ Sources = main.cpp
+
+ # general compiler settings
+-CPPFLAGS = -I../../include -I/usr/X11R6/include
+-CXXFLAGS = -O3 -ffast-math
++CPPFLAGS += -I/usr/include/irrlicht
++CXXFLAGS ?= -O3
++CXXFLAGS += -ffast-math
+ #CXXFLAGS = -g -Wall
+
+ #default target is Linux
+@@ -17,14 +18,14 @@
+ endif
+
+ # target specific settings
+-all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXcursor
++all_linux: LDFLAGS += -L../../lib/Linux -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXcursor -lpng -ljpeg
+ all_linux clean_linux: SYSTEM=Linux
+ all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm
+ all_win32: CPPFLAGS += -D__GNUWIN32__ -D_WIN32 -DWIN32 -D_WINDOWS -D_MBCS -D_USRDLL
+ all_win32 clean_win32: SYSTEM=Win32-gcc
+ all_win32 clean_win32: SUF=.exe
+ # name of the binary - only valid for targets which set SYSTEM
+-DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF)
++DESTPATH = ../../bin/$(Target)$(SUF)
+
+ all_linux all_win32:
+ $(warning Building...)
diff --git a/dev-games/irrlicht/files/irrlicht-1.8.1-gentoo.patch b/dev-games/irrlicht/files/irrlicht-1.8.1-gentoo.patch
new file mode 100644
index 000000000000..ccbf2cfb921e
--- /dev/null
+++ b/dev-games/irrlicht/files/irrlicht-1.8.1-gentoo.patch
@@ -0,0 +1,46 @@
+--- source/Irrlicht/Makefile
++++ 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
+@@ -88,7 +82,7 @@
+ LIB_PATH = ../../lib/$(SYSTEM)
+ INSTALL_DIR = /usr/local/lib
+ sharedlib install: SHARED_LIB = libIrrlicht.so
+-sharedlib: LDFLAGS += -L/usr/X11R6/lib$(LIBSELECT) -lGL -lXxf86vm
++sharedlib: LDFLAGS += -L/usr/X11R6/lib$(LIBSELECT) -lGL -lXxf86vm -ljpeg -lpng -lbz2 -lz
+ staticlib sharedlib: CXXINCS += -I/usr/X11R6/include
+
+ #OSX specific options
diff --git a/dev-games/irrlicht/files/irrlicht-1.8.1-jpeg-9a.patch b/dev-games/irrlicht/files/irrlicht-1.8.1-jpeg-9a.patch
new file mode 100644
index 000000000000..90ed828d1a99
--- /dev/null
+++ b/dev-games/irrlicht/files/irrlicht-1.8.1-jpeg-9a.patch
@@ -0,0 +1,15 @@
+http://bugs.gentoo.org/show_bug.cgi?id=520746
+
+http://code.metager.de/source/diff/irrlicht/source/Irrlicht/CImageLoaderJPG.cpp?r2=%2Firrlicht%2Fsource%2FIrrlicht%2FCImageLoaderJPG.cpp%404823&r1=%2Firrlicht%2Fsource%2FIrrlicht%2FCImageLoaderJPG.cpp%404320
+
+--- source/Irrlicht/CImageLoaderJPG.cpp
++++ 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/dev-games/irrlicht/files/irrlicht-1.8.1-mesa-10.x.patch b/dev-games/irrlicht/files/irrlicht-1.8.1-mesa-10.x.patch
new file mode 100644
index 000000000000..e90ff36443a0
--- /dev/null
+++ b/dev-games/irrlicht/files/irrlicht-1.8.1-mesa-10.x.patch
@@ -0,0 +1,40 @@
+From 244d00280c1b082ca164f92337773e9e4e1a3898 Mon Sep 17 00:00:00 2001
+From: hiker <henrichsjoerg@mgail.com>
+Date: Wed, 26 Feb 2014 11:13:03 +1100
+Subject: [PATCH] Applied patch from jpirie for fixing mesa 10 compilation
+ problems.
+
+--- irrlicht-1.8.1/source/Irrlicht/COpenGLExtensionHandler.h
++++ irrlicht-1.8.1/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"
+@@ -35,6 +36,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_)
+@@ -48,6 +50,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_)
+@@ -60,6 +63,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/dev-games/irrlicht/irrlicht-1.8.1-r1.ebuild b/dev-games/irrlicht/irrlicht-1.8.1-r1.ebuild
new file mode 100644
index 000000000000..d53a4cc8cfdd
--- /dev/null
+++ b/dev-games/irrlicht/irrlicht-1.8.1-r1.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils multilib toolchain-funcs
+
+DESCRIPTION="open source high performance realtime 3D engine written in C++"
+HOMEPAGE="http://irrlicht.sourceforge.net/"
+SRC_URI="mirror://sourceforge/irrlicht/${P}.zip"
+
+LICENSE="ZLIB"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE="debug doc static-libs"
+
+RDEPEND="virtual/jpeg:0
+ media-libs/libpng:0
+ app-arch/bzip2
+ sys-libs/zlib
+ virtual/opengl
+ x11-libs/libX11
+ x11-libs/libXxf86vm"
+DEPEND="${RDEPEND}
+ app-arch/unzip
+ x11-proto/xproto
+ x11-proto/xf86vidmodeproto"
+
+S=${WORKDIR}/${P}/source/Irrlicht
+
+src_prepare() {
+ cd "${WORKDIR}"/${P} || die
+ edos2unix include/IrrCompileConfig.h
+
+ epatch \
+ "${FILESDIR}"/${P}-gentoo.patch \
+ "${FILESDIR}"/${P}-config.patch \
+ "${FILESDIR}"/${P}-demoMake.patch \
+ "${FILESDIR}"/${P}-mesa-10.x.patch \
+ "${FILESDIR}"/${P}-jpeg-9a.patch
+
+ sed -i \
+ -e 's:\.\./\.\./media:../media:g' \
+ $(grep -rl '\.\./\.\./media' examples) \
+ || die 'sed failed'
+}
+
+src_compile() {
+ tc-export CXX CC AR
+ emake NDEBUG=$(usex debug "" "1") sharedlib $(usex static-libs "staticlib" "")
+}
+
+src_install() {
+ cd "${WORKDIR}"/${P} || die
+
+ use static-libs && dolib.a lib/Linux/libIrrlicht.a
+ dolib.so lib/Linux/libIrrlicht.so*
+
+ # create library symlinks
+ dosym libIrrlicht.so.${PV} /usr/$(get_libdir)/libIrrlicht.so.1.8
+ dosym libIrrlicht.so.${PV} /usr/$(get_libdir)/libIrrlicht.so
+
+ insinto /usr/include/${PN}
+ doins include/*
+
+ dodoc changes.txt readme.txt
+ if use doc ; then
+ insinto /usr/share/doc/${PF}
+ doins -r examples media
+ fi
+}
diff --git a/dev-games/irrlicht/irrlicht-1.8.1.ebuild b/dev-games/irrlicht/irrlicht-1.8.1.ebuild
new file mode 100644
index 000000000000..d53a4cc8cfdd
--- /dev/null
+++ b/dev-games/irrlicht/irrlicht-1.8.1.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils multilib toolchain-funcs
+
+DESCRIPTION="open source high performance realtime 3D engine written in C++"
+HOMEPAGE="http://irrlicht.sourceforge.net/"
+SRC_URI="mirror://sourceforge/irrlicht/${P}.zip"
+
+LICENSE="ZLIB"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE="debug doc static-libs"
+
+RDEPEND="virtual/jpeg:0
+ media-libs/libpng:0
+ app-arch/bzip2
+ sys-libs/zlib
+ virtual/opengl
+ x11-libs/libX11
+ x11-libs/libXxf86vm"
+DEPEND="${RDEPEND}
+ app-arch/unzip
+ x11-proto/xproto
+ x11-proto/xf86vidmodeproto"
+
+S=${WORKDIR}/${P}/source/Irrlicht
+
+src_prepare() {
+ cd "${WORKDIR}"/${P} || die
+ edos2unix include/IrrCompileConfig.h
+
+ epatch \
+ "${FILESDIR}"/${P}-gentoo.patch \
+ "${FILESDIR}"/${P}-config.patch \
+ "${FILESDIR}"/${P}-demoMake.patch \
+ "${FILESDIR}"/${P}-mesa-10.x.patch \
+ "${FILESDIR}"/${P}-jpeg-9a.patch
+
+ sed -i \
+ -e 's:\.\./\.\./media:../media:g' \
+ $(grep -rl '\.\./\.\./media' examples) \
+ || die 'sed failed'
+}
+
+src_compile() {
+ tc-export CXX CC AR
+ emake NDEBUG=$(usex debug "" "1") sharedlib $(usex static-libs "staticlib" "")
+}
+
+src_install() {
+ cd "${WORKDIR}"/${P} || die
+
+ use static-libs && dolib.a lib/Linux/libIrrlicht.a
+ dolib.so lib/Linux/libIrrlicht.so*
+
+ # create library symlinks
+ dosym libIrrlicht.so.${PV} /usr/$(get_libdir)/libIrrlicht.so.1.8
+ dosym libIrrlicht.so.${PV} /usr/$(get_libdir)/libIrrlicht.so
+
+ insinto /usr/include/${PN}
+ doins include/*
+
+ dodoc changes.txt readme.txt
+ if use doc ; then
+ insinto /usr/share/doc/${PF}
+ doins -r examples media
+ fi
+}
diff --git a/dev-games/irrlicht/metadata.xml b/dev-games/irrlicht/metadata.xml
new file mode 100644
index 000000000000..3d46e569143f
--- /dev/null
+++ b/dev-games/irrlicht/metadata.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>games</herd>
+ <longdescription>
+The Irrlicht Engine is an open source high performance realtime 3D engine written in
+C++. It is completely cross-platform, using D3D, OpenGL and its own software renderer,
+and has all of the state-of-the-art features which can be found in commercial 3d
+engines.
+We've got a huge active community, and there are lots of games in development that use
+the engine. You can find enhancements for Irrlicht all over the web, like alternative
+terrain renderers, portal renderers, world layers, tutorials, editors, bindings for
+perl, ruby, python, and so on. And best of all: It's completely free.
+</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">irrlicht</remote-id>
+ </upstream>
+</pkgmetadata>