aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatteo Bernardini <ponce@slackbuilds.org>2012-09-23 19:41:09 +0200
committerRobby Workman <rworkman@slackbuilds.org>2012-09-24 22:53:32 -0500
commit0c182f49bf17a4db4161829ca0ac56395b1a151d (patch)
treed10d3b0b74ad34b28395670ab1aeaa4b605b6319
parentbad9401718a3c0e21d63ecea63138ce64dbe2fe0 (diff)
libraries/SFML: Added a patch for gcc-4.7.x.
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
-rw-r--r--libraries/SFML/SFML.SlackBuild5
-rw-r--r--libraries/SFML/gcc47.patch180
2 files changed, 184 insertions, 1 deletions
diff --git a/libraries/SFML/SFML.SlackBuild b/libraries/SFML/SFML.SlackBuild
index 29db2f7fd483b..91f9719fa914a 100644
--- a/libraries/SFML/SFML.SlackBuild
+++ b/libraries/SFML/SFML.SlackBuild
@@ -6,7 +6,7 @@
PRGNAM=SFML
VERSION=${VERSION:-1.6}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@@ -61,6 +61,9 @@ sed -i "s/CFLAGS\ .*=/CFLAGS +=/" src/SFML/Makefile
# Patch Makefile to put libs in correct place
sed -i "s|(DESTDIR)/lib|(DESTDIR)/lib$LIBDIRSUFFIX|" src/SFML/Makefile
+# Add a big patch for gcc-4.7.x
+patch -p1 < $CWD/gcc47.patch
+
CFLAGS="$SLKCFLAGS" \
make
make install DESTDIR=$PKG/usr
diff --git a/libraries/SFML/gcc47.patch b/libraries/SFML/gcc47.patch
new file mode 100644
index 0000000000000..7472b2990291f
--- /dev/null
+++ b/libraries/SFML/gcc47.patch
@@ -0,0 +1,180 @@
+Written by ponce@slackbuilds.org trying to build and fixing wherever necessary
+
+diff -Naur SFML-1.6.orig/include/SFML/System/ResourcePtr.inl SFML-1.6/include/SFML/System/ResourcePtr.inl
+--- SFML-1.6.orig/include/SFML/System/ResourcePtr.inl 2010-01-27 14:53:54.000000000 +0100
++++ SFML-1.6/include/SFML/System/ResourcePtr.inl 2012-09-23 19:19:33.736300968 +0200
+@@ -22,6 +22,7 @@
+ //
+ ////////////////////////////////////////////////////////////
+
++#include <unistd.h>
+
+ ////////////////////////////////////////////////////////////
+ /// Default constructor
+diff -Naur SFML-1.6.orig/src/SFML/Audio/Listener.cpp SFML-1.6/src/SFML/Audio/Listener.cpp
+--- SFML-1.6.orig/src/SFML/Audio/Listener.cpp 2010-01-27 15:00:19.000000000 +0100
++++ SFML-1.6/src/SFML/Audio/Listener.cpp 2012-09-23 19:23:25.645300966 +0200
+@@ -25,6 +25,8 @@
+ ////////////////////////////////////////////////////////////
+ // Headers
+ ////////////////////////////////////////////////////////////
++#include <unistd.h>
++#include <stddef.h>
+ #include <SFML/Audio/Listener.hpp>
+ #include <SFML/Audio/OpenAL.hpp>
+
+diff -Naur SFML-1.6.orig/src/SFML/Audio/Music.cpp SFML-1.6/src/SFML/Audio/Music.cpp
+--- SFML-1.6.orig/src/SFML/Audio/Music.cpp 2010-01-27 15:00:19.000000000 +0100
++++ SFML-1.6/src/SFML/Audio/Music.cpp 2012-09-23 19:33:23.931300967 +0200
+@@ -25,6 +25,8 @@
+ ////////////////////////////////////////////////////////////
+ // Headers
+ ////////////////////////////////////////////////////////////
++#include <unistd.h>
++#include <stddef.h>
+ #include <SFML/Audio/Music.hpp>
+ #include <SFML/Audio/OpenAL.hpp>
+ #include <SFML/Audio/SoundFile.hpp>
+diff -Naur SFML-1.6.orig/src/SFML/Audio/Sound.cpp SFML-1.6/src/SFML/Audio/Sound.cpp
+--- SFML-1.6.orig/src/SFML/Audio/Sound.cpp 2010-01-27 15:00:19.000000000 +0100
++++ SFML-1.6/src/SFML/Audio/Sound.cpp 2012-09-23 19:26:57.001300967 +0200
+@@ -25,6 +25,8 @@
+ ////////////////////////////////////////////////////////////
+ // Headers
+ ////////////////////////////////////////////////////////////
++#include <unistd.h>
++#include <stddef.h>
+ #include <SFML/Audio/Sound.hpp>
+ #include <SFML/Audio/SoundBuffer.hpp>
+ #include <SFML/Audio/OpenAL.hpp>
+diff -Naur SFML-1.6.orig/src/SFML/Audio/SoundBuffer.cpp SFML-1.6/src/SFML/Audio/SoundBuffer.cpp
+--- SFML-1.6.orig/src/SFML/Audio/SoundBuffer.cpp 2010-01-27 15:00:19.000000000 +0100
++++ SFML-1.6/src/SFML/Audio/SoundBuffer.cpp 2012-09-23 19:29:59.239300967 +0200
+@@ -25,6 +25,8 @@
+ ////////////////////////////////////////////////////////////
+ // Headers
+ ////////////////////////////////////////////////////////////
++#include <unistd.h>
++#include <stddef.h>
+ #include <SFML/Audio/SoundBuffer.hpp>
+ #include <SFML/Audio/SoundFile.hpp>
+ #include <SFML/Audio/Sound.hpp>
+diff -Naur SFML-1.6.orig/src/SFML/Audio/SoundBufferRecorder.cpp SFML-1.6/src/SFML/Audio/SoundBufferRecorder.cpp
+--- SFML-1.6.orig/src/SFML/Audio/SoundBufferRecorder.cpp 2010-01-27 15:00:19.000000000 +0100
++++ SFML-1.6/src/SFML/Audio/SoundBufferRecorder.cpp 2012-09-23 19:26:17.856300966 +0200
+@@ -25,6 +25,8 @@
+ ////////////////////////////////////////////////////////////
+ // Headers
+ ////////////////////////////////////////////////////////////
++#include <unistd.h>
++#include <stddef.h>
+ #include <SFML/Audio/SoundBufferRecorder.hpp>
+ #include <algorithm>
+ #include <iterator>
+diff -Naur SFML-1.6.orig/src/SFML/Audio/SoundStream.cpp SFML-1.6/src/SFML/Audio/SoundStream.cpp
+--- SFML-1.6.orig/src/SFML/Audio/SoundStream.cpp 2010-03-18 14:14:46.000000000 +0100
++++ SFML-1.6/src/SFML/Audio/SoundStream.cpp 2012-09-23 19:34:43.477300968 +0200
+@@ -25,6 +25,8 @@
+ ////////////////////////////////////////////////////////////
+ // Headers
+ ////////////////////////////////////////////////////////////
++#include <unistd.h>
++#include <stddef.h>
+ #include <SFML/Audio/SoundStream.hpp>
+ #include <SFML/Audio/AudioDevice.hpp>
+ #include <SFML/Audio/OpenAL.hpp>
+diff -Naur SFML-1.6.orig/src/SFML/Graphics/Font.cpp SFML-1.6/src/SFML/Graphics/Font.cpp
+--- SFML-1.6.orig/src/SFML/Graphics/Font.cpp 2010-03-18 14:14:41.000000000 +0100
++++ SFML-1.6/src/SFML/Graphics/Font.cpp 2012-09-23 19:32:06.580300966 +0200
+@@ -25,6 +25,8 @@
+ ////////////////////////////////////////////////////////////
+ // Headers
+ ////////////////////////////////////////////////////////////
++#include <unistd.h>
++#include <stddef.h>
+ #include <SFML/Graphics/Font.hpp>
+ #include <SFML/Graphics/FontLoader.hpp>
+ #include <iostream>
+diff -Naur SFML-1.6.orig/src/SFML/Graphics/Image.cpp SFML-1.6/src/SFML/Graphics/Image.cpp
+--- SFML-1.6.orig/src/SFML/Graphics/Image.cpp 2010-01-27 15:00:05.000000000 +0100
++++ SFML-1.6/src/SFML/Graphics/Image.cpp 2012-09-23 19:22:22.316300968 +0200
+@@ -25,6 +25,8 @@
+ ////////////////////////////////////////////////////////////
+ // Headers
+ ////////////////////////////////////////////////////////////
++#include <unistd.h>
++#include <stddef.h>
+ #include <SFML/Graphics/Image.hpp>
+ #include <SFML/Graphics/ImageLoader.hpp>
+ #include <SFML/Graphics/RenderWindow.hpp>
+diff -Naur SFML-1.6.orig/src/SFML/Graphics/PostFX.cpp SFML-1.6/src/SFML/Graphics/PostFX.cpp
+--- SFML-1.6.orig/src/SFML/Graphics/PostFX.cpp 2010-01-27 15:00:05.000000000 +0100
++++ SFML-1.6/src/SFML/Graphics/PostFX.cpp 2012-09-23 19:25:25.505300968 +0200
+@@ -26,6 +26,8 @@
+ ////////////////////////////////////////////////////////////
+ // Headers
+ ////////////////////////////////////////////////////////////
++#include <unistd.h>
++#include <stddef.h>
+ #include <SFML/Graphics/PostFX.hpp>
+ #include <SFML/Graphics/RenderWindow.hpp>
+ #include <SFML/Graphics/GraphicsContext.hpp>
+diff -Naur SFML-1.6.orig/src/SFML/Graphics/RenderTarget.cpp SFML-1.6/src/SFML/Graphics/RenderTarget.cpp
+--- SFML-1.6.orig/src/SFML/Graphics/RenderTarget.cpp 2010-01-27 15:00:05.000000000 +0100
++++ SFML-1.6/src/SFML/Graphics/RenderTarget.cpp 2012-09-23 19:24:35.953300966 +0200
+@@ -25,6 +25,8 @@
+ ////////////////////////////////////////////////////////////
+ // Headers
+ ////////////////////////////////////////////////////////////
++#include <unistd.h>
++#include <stddef.h>
+ #include <SFML/Graphics/RenderTarget.hpp>
+ #include <SFML/Graphics/Drawable.hpp>
+ #include <SFML/Graphics/GraphicsContext.hpp>
+diff -Naur SFML-1.6.orig/src/SFML/Graphics/RenderWindow.cpp SFML-1.6/src/SFML/Graphics/RenderWindow.cpp
+--- SFML-1.6.orig/src/SFML/Graphics/RenderWindow.cpp 2010-01-27 15:00:05.000000000 +0100
++++ SFML-1.6/src/SFML/Graphics/RenderWindow.cpp 2012-09-23 19:28:40.236300966 +0200
+@@ -25,6 +25,8 @@
+ ////////////////////////////////////////////////////////////
+ // Headers
+ ////////////////////////////////////////////////////////////
++#include <unistd.h>
++#include <stddef.h>
+ #include <SFML/Graphics/RenderWindow.hpp>
+ #include <SFML/Graphics/Drawable.hpp>
+ #include <SFML/Graphics/Image.hpp>
+diff -Naur SFML-1.6.orig/src/SFML/Graphics/Sprite.cpp SFML-1.6/src/SFML/Graphics/Sprite.cpp
+--- SFML-1.6.orig/src/SFML/Graphics/Sprite.cpp 2010-01-27 15:00:05.000000000 +0100
++++ SFML-1.6/src/SFML/Graphics/Sprite.cpp 2012-09-23 19:27:41.924300968 +0200
+@@ -25,6 +25,8 @@
+ ////////////////////////////////////////////////////////////
+ // Headers
+ ////////////////////////////////////////////////////////////
++#include <unistd.h>
++#include <stddef.h>
+ #include <SFML/Graphics/Sprite.hpp>
+ #include <SFML/Graphics/Image.hpp>
+ #include <SFML/Graphics/GraphicsContext.hpp>
+diff -Naur SFML-1.6.orig/src/SFML/Graphics/String.cpp SFML-1.6/src/SFML/Graphics/String.cpp
+--- SFML-1.6.orig/src/SFML/Graphics/String.cpp 2010-01-27 15:00:05.000000000 +0100
++++ SFML-1.6/src/SFML/Graphics/String.cpp 2012-09-23 19:31:08.332300966 +0200
+@@ -25,6 +25,8 @@
+ ////////////////////////////////////////////////////////////
+ // Headers
+ ////////////////////////////////////////////////////////////
++#include <unistd.h>
++#include <stddef.h>
+ #include <SFML/Graphics/String.hpp>
+ #include <SFML/Graphics/Image.hpp>
+ #include <SFML/Graphics/GraphicsContext.hpp>
+diff -Naur SFML-1.6.orig/src/SFML/Window/Linux/Joystick.cpp SFML-1.6/src/SFML/Window/Linux/Joystick.cpp
+--- SFML-1.6.orig/src/SFML/Window/Linux/Joystick.cpp 2010-01-27 15:00:27.000000000 +0100
++++ SFML-1.6/src/SFML/Window/Linux/Joystick.cpp 2012-09-23 19:12:09.461300157 +0200
+@@ -27,6 +27,7 @@
+ ////////////////////////////////////////////////////////////
+ #include <SFML/Window/Joystick.hpp>
+ #include <sstream>
++#include <unistd.h>
+
+
+ namespace sf