summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Ospald <hasufell@gentoo.org>2012-12-07 23:43:23 +0000
committerJulian Ospald <hasufell@gentoo.org>2012-12-07 23:43:23 +0000
commit73cd3c734640898767ce87a77bf4fc55520830b3 (patch)
treef503b7efab624801d1ddf5d166c4aeca5d119dbf /dev-games/irrlicht
parentprepare deps for irrlicht-1.8 import (diff)
downloadhistorical-73cd3c734640898767ce87a77bf4fc55520830b3.tar.gz
historical-73cd3c734640898767ce87a77bf4fc55520830b3.tar.bz2
historical-73cd3c734640898767ce87a77bf4fc55520830b3.zip
version bump
Package-Manager: portage-2.2.0_alpha144/cvs/Linux x86_64 Manifest-Sign-Key: 0xE73C35B3
Diffstat (limited to 'dev-games/irrlicht')
-rw-r--r--dev-games/irrlicht/ChangeLog9
-rw-r--r--dev-games/irrlicht/Manifest21
-rw-r--r--dev-games/irrlicht/files/irrlicht-1.8-config.patch29
-rw-r--r--dev-games/irrlicht/files/irrlicht-1.8-demoMake.patch764
-rw-r--r--dev-games/irrlicht/files/irrlicht-1.8-gentoo.patch37
-rw-r--r--dev-games/irrlicht/irrlicht-1.8.ebuild68
6 files changed, 926 insertions, 2 deletions
diff --git a/dev-games/irrlicht/ChangeLog b/dev-games/irrlicht/ChangeLog
index 6f50987f581d..f56ae1cff79c 100644
--- a/dev-games/irrlicht/ChangeLog
+++ b/dev-games/irrlicht/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for dev-games/irrlicht
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-games/irrlicht/ChangeLog,v 1.55 2012/08/08 19:51:00 ranger Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-games/irrlicht/ChangeLog,v 1.56 2012/12/07 23:43:22 hasufell Exp $
+
+*irrlicht-1.8 (07 Dec 2012)
+
+ 07 Dec 2012; Julian Ospald <hasufell@gentoo.org> +irrlicht-1.8.ebuild,
+ +files/irrlicht-1.8-config.patch, +files/irrlicht-1.8-demoMake.patch,
+ +files/irrlicht-1.8-gentoo.patch:
+ version bump
08 Aug 2012; Brent Baude <ranger@gentoo.org> irrlicht-1.7.3.ebuild:
Marking irrlicht-1.7.3 ppc for bug 425860
diff --git a/dev-games/irrlicht/Manifest b/dev-games/irrlicht/Manifest
index cab24ed0c465..50f617f92ab9 100644
--- a/dev-games/irrlicht/Manifest
+++ b/dev-games/irrlicht/Manifest
@@ -1,3 +1,6 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA256
+
AUX irrlicht-1.7.2-config.patch 1452 SHA256 462261491e7e07656b2bccf5ffef3cb5a04326e4ec43416391758adbfc0f81c4 SHA512 a6d7f4b8a7f1a962e57c99756655a757dda253d7d54ea5d2db55476ef90a4ec30bf9a343ff0b4d04a0b3f780b2a7f791e09bd3740bcb7e642ed95d22f64bc884 WHIRLPOOL 6405eb52832672c2e2133958efbcc082d893480dae8ef7f20fc657415a817625589f7180d4a242064e3aef51872c5569c06c85bded7e2e0c54ed453e79bc0dd2
AUX irrlicht-1.7.2-demoMake.patch 19873 SHA256 f4686dceb39913fb26035f970e999dff7b8dd82e87de6b999f3dfb5aacf846d0 SHA512 f7f931f46239e2f63fcf408f5b8edabd477614fd8893fc3a15a0105790f99f8dc3107544faa2a6281ac909184137c2e85ed42428cdf5dba3ebf70e41d0af057d WHIRLPOOL 441a95a9624002b8c8ba99eb6b03723c67117d4ccb497afde833b89b496f0fe8b640f88dd1caa525f3710375b3ca313c5635b83708ad2ccd420eac91382ced02
AUX irrlicht-1.7.2-gcc46.patch 402 SHA256 a942e9374e1182eec9ebb46f53b343cc050c26d02cfea3dd7027e318f50b9777 SHA512 39254ba5b7b1b1ab5fd6064450c46d1491d71df63df25a5aa752c5f82139396fd858733131f516d0d7aa1389a9423f37f815d84ca464f446acda2e674bf89d7b WHIRLPOOL 0b771adb26a5b07214d43e1e4f6bcf54de12b3a08ab08a944c3fc5334b580e49f8343dc1e3330bececfdd02144f598dc0d2df1bf22773d92d73fc7caeba019c7
@@ -7,9 +10,25 @@ AUX irrlicht-1.7.3-config.patch 1452 SHA256 462261491e7e07656b2bccf5ffef3cb5a043
AUX irrlicht-1.7.3-demoMake.patch 19873 SHA256 f4686dceb39913fb26035f970e999dff7b8dd82e87de6b999f3dfb5aacf846d0 SHA512 f7f931f46239e2f63fcf408f5b8edabd477614fd8893fc3a15a0105790f99f8dc3107544faa2a6281ac909184137c2e85ed42428cdf5dba3ebf70e41d0af057d WHIRLPOOL 441a95a9624002b8c8ba99eb6b03723c67117d4ccb497afde833b89b496f0fe8b640f88dd1caa525f3710375b3ca313c5635b83708ad2ccd420eac91382ced02
AUX irrlicht-1.7.3-gentoo.patch 3719 SHA256 2f9424314ed9b1845741f0df85839cf5293de74dcb796a67c7f0dd6e74613fa0 SHA512 5abd64f0f832d7cff834d38044e51ee5c1c3e3a8569b21bed7418c2fdf1190bc8ee2d75ea53a7243c612c2d63629d39c560e2b1ab731c615887977702319fa72 WHIRLPOOL 3f05bf15e3ae0f0dee81908f8850d611a51e924e81e09bfe37622124ff0c682accad4ba79ddc7a1c0aa56b76d0fc13dd236603656741fb29460290029d882626
AUX irrlicht-1.7.3-libpng15.patch 1205 SHA256 79d71023e8af56aca5a9c6e2402163f9da547d5b62f8dcf8633b855d47add9a5 SHA512 c7a2c14b71a9a425282f79630288e8d1173f1c993ed630cec335aa795813816878f0a903c36cddbe32eb9662d43d6fb4d829bf6b5c592d044cc0115e341de601 WHIRLPOOL 3aff335547905cdd5d4052ecaed7f4046fd685f6f5aea93fb55eb86917095a383a753bec90df53e81a4ee3090585b15662044991a282b9a995ac30ad7932409b
+AUX irrlicht-1.8-config.patch 1302 SHA256 34e1b4184cb499ef8d245b8f97e8a4e8cd88f03f4eecddeff661c97a44f24ab2 SHA512 3c08639425517af9e0dcad919b80ce049e42ded399bf81354f824c425e4355c033b4574f0e76a926cbccc471b06e80ac73ae94232fa1db2b3d2f7da3fa5a840d WHIRLPOOL e9d2f51fc9665826170123daab4d1d4691e6740d2ce92d676ccb18df432ce7c3dfa2a2134b2543cb42968d1a0acfe97c1ac4a775c460c93cf7ac46865b68a633
+AUX irrlicht-1.8-demoMake.patch 27382 SHA256 e8d5ee8145f4bda5ee2ff78b9300a2f47e1c287481cbc490a382e74813fcea61 SHA512 72ef258a578620c2b927ca258b105e25fd96971a63d82715a3a68363aa335c0ff6bf0e983c6b1385a6fd9c9c1505e9472970cd3c3b48c2c592d6ca09f897971f WHIRLPOOL c1e4f4419dcae706e5c9189672505b8572ed813eaa4efed2a6f82c89d59d1d2d9777fbd5f0e1904cce7c955db8f924ef1da873cc0621be88167191d2fea7227b
+AUX irrlicht-1.8-gentoo.patch 3432 SHA256 45dd91f42f88677f475d466a02c786e3d8e0729fb7da8e8285584f1e33729f2f SHA512 3a4b7a16ce6900e9afef9fdc2fdcd766155d593febc85093da840e683a1c147dc5a664e9581a87b5707fa36deb9e749c2daeb5e4d9929af07f4429dc5518d1af WHIRLPOOL 3bc3e9817958bb0f1c8816bb92ef1639b6a98280c0a34c758e4da3a2e255e03c234b2884927ffef05c92d640d92c109646e6a6f93c6c4d9a031390a16f5fd5af
DIST irrlicht-1.7.2.zip 24603866 SHA256 be1de9a850a94eaa5cc57a6014de5ab5304a364d45ce504315b5442be3e0d01d SHA512 395df6700e5a779aff04acc2add13bdcc4c7f62cb1cfac41370be284846560b50cf3913c7a577e9f366f21ce31b19f5a6eb5ac2d19288396727fe3b6da71a84f WHIRLPOOL 92a6b166f9e2a13dc9e1385555399c4f2d5405b5b386ba235d1b471060286e1d4ba7beda7e8ab3cab95c6ba54f294a9d12c0de9eeed8845f951e10c013735c65
DIST irrlicht-1.7.3.zip 16344294 SHA256 7230c1210a169944f815a79a975fabf2c0db0d3181dd62345b9fac9095ae026d SHA512 554c1b09ea9f591eb8f4346b8b66df15d3bd7339f29bfaadc076121ba7a5771116f15ec977e4fd226b346dd8c176dc7903dcfb4002c0a5a80671cbaafe54cab8 WHIRLPOOL 53bcdb60a2ed38e04cc77a91d6f61d8a5c0725a6c91b900748d7b8435a1b3e89ba33b41874d0f57c763a33e4617e79fac8f9e2890728a08f451e6448e4962d85
+DIST irrlicht-1.8.zip 23674513 SHA256 f8756c3cf83f16f41eb1eca8f4ebb530f0e8fd572443905e3d8eb8f09445a642 SHA512 07aa6e49252f073e352fbd715b77d171b6d25d22e6b0faccaf7328b28693e6851f37498cfb4094f7b09d122170c491571431bf8f698828e82c2aa9d7ff792af7 WHIRLPOOL b021cc06fb216a9add40ad70beac22f41f2902f0b053713491c80057c04f05f9f45e19c282c109850235d7db89675ffaa7f5170b0b83f2b8918a0915ee43837d
EBUILD irrlicht-1.7.2.ebuild 1448 SHA256 53ecb76647e4d18b7584593c84ab49b29f5ff051d55489f5341167d564e593f8 SHA512 1fc472072671a4f9b3b0a5d4d9396da62eba6079dd9bc601f1ceb0694518b87e495bd8d69c733efdde032c706c2842ad1be0ccf945081fc274ac01a4ea8c6b53 WHIRLPOOL 3fb3c215e891fe21d4968398f5605ac68ccc3f30b1cf28782cb1fac1005c1ebb6caae3a5c2c1cc26a249b349deff99ba1fc9862947eac39af45d93efda5244d9
EBUILD irrlicht-1.7.3.ebuild 1413 SHA256 c8c63650da7108dc768c632c384b0fed96dd41442be653fa1422ec4d52f95825 SHA512 c7f29f50d846c81492e17cc8c2cd01b5516c6b7a4dd43b05bbd777580c96ace310ac3cb1287b95dfb78c390970b6a09bc3a65536d2596bc6f97a596ac8e9c328 WHIRLPOOL 0e449e2236107ac21d600124eb9ec3de2a9a2a1ff9e1f285e5b5de171f6eb617b18192308f0af3f6f0ec4439871d00b8368ea9885584b0f2db4e7db1fd47f98f
-MISC ChangeLog 8995 SHA256 0474fafecc6a6f4896d8ae78b0775dceff4f58cf4f23199e657e98669b930d95 SHA512 55467124af587059a8d230d94b5c286dae919f6dd278a9e4516875eb2722e3a70b774eab2cb390d6a54f703710acaa529073d419da7868cf93070e5c13011fcf WHIRLPOOL 6f4e4a14f80333d467997a625e44d4230354cdfeeb7bf657a8b954944b70d5a7b4db91ba064335778123e701260ab1cbc0e1cfae785e8d254448b0b39c56067a
+EBUILD irrlicht-1.8.ebuild 1608 SHA256 a12a5a17b3e7a318b918155c6478672df3aabc79a3f59589de69d04a3015de3c SHA512 2faeda926505e7ef3ce5608675ca49cfdf7695441b95ae06ba05c17dd705f7a3cce49da562d81a9f6ac29a562ebad407300f5c58a9357ea04003b8af4a847d92 WHIRLPOOL 2e41b4fba03dfc03077953b6111cb31d57d2ed1f1aaa71fe2e442734b05ddf62744f368d0d44838b3b12b7963f8baf141a5326f13e2a173322fefad40563b202
+MISC ChangeLog 9223 SHA256 999a9d3df3618263b550e0d6b6a03e80efdec9c3f2b5c684b10e06fe960912fd SHA512 daa71bf42548c462358a09febec3710ea4ee8915f16bb6c83cff320abd5a2a07ae007147ba397472f0a4fe4a7a9f4c71844a0fecb43e08231ef91df63ccd8083 WHIRLPOOL 7823baec737059aeed9be270f462b74811974a62c623cca736ba31853459d8409bef79f671a24f6fd72575d4cb8604e98d97c55edab198390313b716cc21d735
MISC metadata.xml 790 SHA256 f98d87925d064aebca00d2da850d027f1e2a66586c6715e12151e34a9167fffc SHA512 d4006cf3f5afcb96934d074360aaa49e35249ecf346965bd170704947ae6a194ef6daa8f4bff7cf473bbbab4f658f978a5398e3a1efda8ce034314637903719a WHIRLPOOL 6cc67212be3a7109e97e0fa471f83ea6d73e01d5ac49f45e62b89d6dbd28d2e861d4179a22f5a7ac53fe0835c7b9d92d2d22c56e9b07a8ac72b189db1e318d0b
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v2.0.19 (GNU/Linux)
+
+iQEbBAEBCAAGBQJQwn8bAAoJEFpvPKfnPDWz0aoH93foPHLYDA8WaneSQSx5GRfG
+juzBRheClv7pY7P8L0PDs+/LbM6K/iyaGG7pW/7jO0H0EgSUMbw9MPo+AzlTF0QX
+k1GSX5DjrNyAsPBP5yNYb3LwjVkMJ08mbSuctiNNhFGi6hTB56tyyaiHsINrRCLC
+rlFIc0JyB/n0jPuiJDpGkRxQKCvT2CakD4Cqrzw2vQiVkTJMbKGc4eeOHfjrahjP
+Tv8ZN5HiN3gBbTXtlWrGdjpQL8Qf2vvNJ5yF6OUt1D3lw1eNDmkZbEYDcTUV61K7
+QFHNRMEl3VyotSzFOMLadfX2KzzHZFaD1M3XpANdpwwM9/h5bpTVjSxd0MOtYA==
+=Mi4c
+-----END PGP SIGNATURE-----
diff --git a/dev-games/irrlicht/files/irrlicht-1.8-config.patch b/dev-games/irrlicht/files/irrlicht-1.8-config.patch
new file mode 100644
index 000000000000..5cb2a75b7872
--- /dev/null
+++ b/dev-games/irrlicht/files/irrlicht-1.8-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-demoMake.patch b/dev-games/irrlicht/files/irrlicht-1.8-demoMake.patch
new file mode 100644
index 000000000000..27f553dfdb21
--- /dev/null
+++ b/dev-games/irrlicht/files/irrlicht-1.8-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-gentoo.patch b/dev-games/irrlicht/files/irrlicht-1.8-gentoo.patch
new file mode 100644
index 000000000000..49e41281a829
--- /dev/null
+++ b/dev-games/irrlicht/files/irrlicht-1.8-gentoo.patch
@@ -0,0 +1,37 @@
+--- 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
diff --git a/dev-games/irrlicht/irrlicht-1.8.ebuild b/dev-games/irrlicht/irrlicht-1.8.ebuild
new file mode 100644
index 000000000000..8419bd84adb5
--- /dev/null
+++ b/dev-games/irrlicht/irrlicht-1.8.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-games/irrlicht/irrlicht-1.8.ebuild,v 1.1 2012/12/07 23:43:23 hasufell Exp $
+
+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"
+
+RDEPEND="virtual/jpeg
+ media-libs/libpng:0
+ app-arch/bzip2
+ 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
+
+ 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 staticlib
+}
+
+src_install() {
+ cd "${WORKDIR}"/${P} || die
+
+ dolib.a lib/Linux/libIrrlicht.a
+ dolib.so lib/Linux/libIrrlicht.so*
+
+ # create library symlinks
+ dosym lib/Linux/libIrrlicht.so.1.8.0 /usr/$(get_libdir)/libIrrlicht.so.1.8
+ dosym lib/Linux/libIrrlicht.so.1.8.0 /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
+}