summaryrefslogtreecommitdiff
path: root/community-testing/sfml
diff options
context:
space:
mode:
Diffstat (limited to 'community-testing/sfml')
-rw-r--r--community-testing/sfml/PKGBUILD60
-rw-r--r--community-testing/sfml/sfml.install3
-rw-r--r--community-testing/sfml/use-system-libs.patch70
3 files changed, 133 insertions, 0 deletions
diff --git a/community-testing/sfml/PKGBUILD b/community-testing/sfml/PKGBUILD
new file mode 100644
index 000000000..806e373d4
--- /dev/null
+++ b/community-testing/sfml/PKGBUILD
@@ -0,0 +1,60 @@
+# $Id: PKGBUILD 47923 2011-05-26 03:12:35Z svenstaro $
+# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
+# Contributor: Ondrej Martinak <omartinak@gmail.com>
+
+pkgname=sfml
+
+_git=true
+
+if [[ "${_git}" = "true" ]]; then
+ pkgver=1.99.git20110526
+fi
+
+pkgrel=1
+pkgdesc='A simple, fast, cross-platform, and object-oriented multimedia API'
+arch=('i686' 'x86_64')
+url='http://www.sfml-dev.org/'
+license=('zlib')
+depends=('libsndfile' 'libxrandr' 'libjpeg' 'openal' 'glew' 'freetype2')
+makedepends=('git' 'mesa' 'cmake' 'doxygen')
+
+_gitroot='https://github.com/LaurentGomila/SFML.git'
+_gitname='SFML'
+
+build() {
+ cd "$srcdir"
+ msg "Connecting to GIT server...."
+
+ if [ -d $_gitname ] ; then
+ cd $_gitname && git pull origin
+ msg "The local files are updated."
+ else
+ git clone $_gitroot
+ cd $_gitname
+ fi
+
+ msg "GIT checkout done or server timeout"
+ msg "Starting make..."
+
+ rm -rf "$srcdir/$_gitname-build"
+ cp -r "$srcdir/$_gitname" "$srcdir/$_gitname-build"
+ cd "$srcdir/$_gitname-build"
+
+ mkdir build && cd build
+ cmake -DCMAKE_INSTALL_PREFIX=/usr .. \
+ -DBUILD_DOC=true \
+ -DBUILD_EXAMPLES=true
+ make
+ make doc
+}
+
+package() {
+ cd "$srcdir/$_gitname-build/build"
+ make DESTDIR="$pkgdir/" install
+
+ install -Dm644 ../license.txt \
+ ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
+
+ make clean
+}
+
diff --git a/community-testing/sfml/sfml.install b/community-testing/sfml/sfml.install
new file mode 100644
index 000000000..9d18b5251
--- /dev/null
+++ b/community-testing/sfml/sfml.install
@@ -0,0 +1,3 @@
+post_install() {
+ echo "To view the SFML samples, go to /opt/SFML/samples/bin and run them individually"
+}
diff --git a/community-testing/sfml/use-system-libs.patch b/community-testing/sfml/use-system-libs.patch
new file mode 100644
index 000000000..5d3200225
--- /dev/null
+++ b/community-testing/sfml/use-system-libs.patch
@@ -0,0 +1,70 @@
+Only in SFML-1.6-old/lib: libsfml-graphics.so.1.6
+Binary files SFML-1.6-old/lib/libsfml-network.so.1.6 and SFML-1.6/lib/libsfml-network.so.1.6 differ
+Binary files SFML-1.6-old/lib/libsfml-system.so.1.6 and SFML-1.6/lib/libsfml-system.so.1.6 differ
+Binary files SFML-1.6-old/lib/libsfml-window.so.1.6 and SFML-1.6/lib/libsfml-window.so.1.6 differ
+diff -ur SFML-1.6-old/src/SFML/Graphics/ImageLoader.cpp SFML-1.6/src/SFML/Graphics/ImageLoader.cpp
+--- SFML-1.6-old/src/SFML/Graphics/ImageLoader.cpp 2010-01-27 15:00:05.000000000 +0100
++++ SFML-1.6/src/SFML/Graphics/ImageLoader.cpp 2010-08-16 12:27:33.983627625 +0200
+@@ -28,10 +28,10 @@
+ #include <SFML/Graphics/ImageLoader.hpp>
+ extern "C"
+ {
+- #include <SFML/Graphics/libjpeg/jpeglib.h>
+- #include <SFML/Graphics/libjpeg/jerror.h>
++ #include <jpeglib.h>
++ #include <jerror.h>
+ }
+-#include <SFML/Graphics/libpng/png.h>
++#include <png.h>
+ #include <SFML/Graphics/SOIL/SOIL.h>
+ #include <iostream>
+
+Only in SFML-1.6-old/src/SFML/Graphics: ImageLoader.cpp.rej
+diff -ur SFML-1.6-old/src/SFML/Graphics/Makefile SFML-1.6/src/SFML/Graphics/Makefile
+--- SFML-1.6-old/src/SFML/Graphics/Makefile 2010-01-27 15:00:05.000000000 +0100
++++ SFML-1.6/src/SFML/Graphics/Makefile 2010-08-16 12:25:13.663501212 +0200
+@@ -1,15 +1,5 @@
+ SRC = $(wildcard *.cpp)
+-SRCGLEW = $(wildcard ./GLEW/*.c)
+-SRCJPEG = $(wildcard ./libjpeg/*.c)
+-SRCPNG = $(wildcard ./libpng/*.c)
+-SRCSOIL = $(wildcard ./SOIL/*.c)
+-SRCZLIB = $(wildcard ./zlib/*.c)
+ OBJ = $(SRC:.cpp=.o)
+-OBJGLEW = $(SRCGLEW:.c=.o)
+-OBJJPEG = $(SRCJPEG:.c=.o)
+-OBJPNG = $(SRCPNG:.c=.o)
+-OBJSOIL = $(SRCSOIL:.c=.o)
+-OBJZLIB = $(SRCZLIB:.c=.o)
+
+ ifeq ($(STATIC), yes)
+ LIB = libsfml-graphics-s.a
+@@ -23,22 +13,19 @@
+
+ all: $(LIB)
+
+-libsfml-graphics-s.a: $(OBJ) $(OBJGLEW) $(OBJJPEG) $(OBJPNG) $(OBJSOIL) $(OBJZLIB)
+- $(AR) $(ARFLAGS) $(LIBNAME) $(OBJ) $(OBJGLEW) $(OBJJPEG) $(OBJPNG) $(OBJSOIL) $(OBJZLIB)
++libsfml-graphics-s.a: $(OBJ)
++ $(AR) $(ARFLAGS) $(LIBNAME) $(OBJ) -static -lGLEW -ljpeg -lpng -lsoil -lz -lSOIL
+
+-libsfml-graphics.so: $(OBJ) $(OBJGLEW) $(OBJJPEG) $(OBJPNG) $(OBJSOIL) $(OBJZLIB)
+- $(CPP) $(LDFLAGS) -Wl,-soname,$(LIB).$(VERSION) -o $(LIBNAME) $(OBJ) $(OBJGLEW) $(OBJJPEG) $(OBJPNG) $(OBJSOIL) $(OBJZLIB) -lfreetype -lX11 -lGL
++libsfml-graphics.so: $(OBJ)
++ $(CPP) $(LDFLAGS) -Wl,-soname,$(LIB).$(VERSION) -o $(LIBNAME) $(OBJ) -lGLEW -ljpeg -lpng -lSOIL -lz -lfreetype -lX11 -lGL
+
+ $(OBJ): %.o: %.cpp
+ $(CPP) -o $@ -c $< $(CFLAGS) -I/usr/include/freetype2
+
+-$(OBJGLEW) $(OBJJPEG) $(OBJPNG) $(OBJSOIL) $(OBJZLIB): %.o: %.c
+- $(CC) -o $@ -c $< $(CFLAGSEXT) -DSTBI_FAILURE_USERMSG
+-
+ .PHONY: clean mrproper
+
+ clean:
+- @rm -rf $(OBJ) $(OBJGLEW) $(OBJJPEG) $(OBJPNG) $(OBJSOIL) $(OBJZLIB)
++ @rm -rf $(OBJ)
+
+ mrproper: clean
+ @rm -rf $(LIBNAME)
+Only in SFML-1.6-old/src/SFML/Graphics: Makefile.rej