summaryrefslogtreecommitdiff
path: root/community/sfml
diff options
context:
space:
mode:
authorroot <root@rshg047.dnsready.net>2011-06-02 22:47:10 +0000
committerroot <root@rshg047.dnsready.net>2011-06-02 22:47:10 +0000
commit2d8c4c44185a682290ccde4d23132ae3acf01678 (patch)
treec23dfddada868c72eb548f8159b7fd0b1179e02c /community/sfml
parente7b9c9697e6a50c3b9e78941fa95ba11c716d238 (diff)
Thu Jun 2 22:47:10 UTC 2011
Diffstat (limited to 'community/sfml')
-rw-r--r--community/sfml/PKGBUILD120
1 files changed, 42 insertions, 78 deletions
diff --git a/community/sfml/PKGBUILD b/community/sfml/PKGBUILD
index 00f1d39c9..806e373d4 100644
--- a/community/sfml/PKGBUILD
+++ b/community/sfml/PKGBUILD
@@ -1,96 +1,60 @@
-# $Id: PKGBUILD 23743 2010-08-16 10:49:18Z svenstaro $
+# $Id: PKGBUILD 47923 2011-05-26 03:12:35Z svenstaro $
# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
-# Contributor: scj <scj archlinux us>
+# Contributor: Ondrej Martinak <omartinak@gmail.com>
pkgname=sfml
-pkgver=1.6
-pkgrel=3
-pkgdesc="A simple, fast, cross-platform and object-oriented multimedia API."
-arch=('i686' 'x86_64')
-url="http://www.sfml-dev.org"
-license=('custom:zlib')
-depends=('libxrandr' 'libsndfile' 'openal' 'glew' 'libjpeg' 'libpng' 'soil' 'zlib' 'freetype2')
-optdepends=('qt: build qt-sample' 'wxgtk: build wxwidgets-sample')
-install=sfml.install
-source=(http://downloads.sourceforge.net/${pkgname}/SFML-${pkgver}-sdk-linux-64.tar.gz
- use-system-libs.patch)
-md5sums=('7a9b3a1ef6d14cd25090e440ccdbb3a8'
- '505ea908fb6e4b9359061d8d55373963')
-build() {
- cd "${srcdir}/SFML-${pkgver}"
+_git=true
- # apply patch to use system libs in favor of included ones (fixes many problems)
- patch -Np1 < ../use-system-libs.patch
+if [[ "${_git}" = "true" ]]; then
+ pkgver=1.99.git20110526
+fi
- # compile sfml
- make
+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')
- # prepare samples
- sed -e '/export LDFLAGS/d' -i samples/Makefile
+_gitroot='https://github.com/LaurentGomila/SFML.git'
+_gitname='SFML'
- #check optional dependencies
- if [ ! -e "/usr/bin/wx-config" ]; then
- sed -e 's/wxwidgets-sample //' -i samples/Makefile
- fi
- if [ ! -e "/usr/include/QtGui" ]; then
- sed -e 's/qt-sample //' -i samples/Makefile
+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
- # fix some samples
- sed -e 's|qt4/||g' -i samples/qt/Makefile
- sed -e '/#include <iostream>/a\#include <stdlib.h>' -i \
- samples/sockets/Sockets.cpp \
- samples/voip/VoIP.cpp
+ msg "GIT checkout done or server timeout"
+ msg "Starting make..."
- # fix the library softlinks for samples
- cd lib
- for lib in *; do
- ln -sf $lib ${lib/.${pkgver}/}
- done
- cd ..
+ rm -rf "$srcdir/$_gitname-build"
+ cp -r "$srcdir/$_gitname" "$srcdir/$_gitname-build"
+ cd "$srcdir/$_gitname-build"
- # compile samples
- LDFLAGS="-L${srcdir}/SFML-${pkgver}/lib" make sfml-samples
+ mkdir build && cd build
+ cmake -DCMAKE_INSTALL_PREFIX=/usr .. \
+ -DBUILD_DOC=true \
+ -DBUILD_EXAMPLES=true
+ make
+ make doc
}
package() {
- cd "${srcdir}/SFML-${pkgver}"
+ cd "$srcdir/$_gitname-build/build"
+ make DESTDIR="$pkgdir/" install
- # prepare some dirs
- mkdir -p ${pkgdir}/usr/lib \
- ${pkgdir}/usr/include \
- ${pkgdir}/usr/share/sfml \
- ${pkgdir}/usr/share/doc \
- ${pkgdir}/opt/SFML
+ install -Dm644 ../license.txt \
+ ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
- # install it
- sed '/export DESTDIR/d' -i src/SFML/Makefile
- make DESTDIR="${pkgdir}/usr" install
-
- # fix the library softlinks - again
- cd ${pkgdir}/usr/lib
- rm *.so
- for lib in *; do
- ln -s $lib ${lib/.${pkgver}/}
- done
- cd "${srcdir}/SFML-${pkgver}"
-
- # install samples
- cp -r samples ${pkgdir}/opt/SFML/samples
-
- # install docs
- cp -r doc ${pkgdir}/usr/share/doc/sfml
-
- # handy symlinks
- cd ${pkgdir}/usr/share/sfml
- ln -s ../../../opt/SFML/samples samples
- ln -s ../doc/sfml docs
-
- # install license
- install -Dm 644 ${srcdir}/SFML-${pkgver}/license.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
-
- # clean up
- find "${pkgdir}/opt/SFML/samples" -name "*.o" -delete
+ make clean
}
-# vim:set ts=2 sw=2 et:
+