summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libraries/SFML/SFML.SlackBuild18
1 files changed, 14 insertions, 4 deletions
diff --git a/libraries/SFML/SFML.SlackBuild b/libraries/SFML/SFML.SlackBuild
index 6a53a2e037..ab49557069 100644
--- a/libraries/SFML/SFML.SlackBuild
+++ b/libraries/SFML/SFML.SlackBuild
@@ -25,7 +25,7 @@
PRGNAM=SFML
VERSION=${VERSION:-2.1}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@@ -68,7 +68,7 @@ find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
-o -perm 511 \) -exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
- -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
mkdir -p build
cd build
@@ -76,7 +76,6 @@ cd build
-DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_INSTALL_PREFIX=/usr \
- -DLIB_SUFFIX=${LIBDIRSUFFIX} \
-DCMAKE_BUILD_TYPE=Release ..
make
make install DESTDIR=$PKG
@@ -85,7 +84,18 @@ cd ..
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
-rm -rf $PKG/usr/share
+## Patches ##
+
+# -DLIB_SUFFIX is ignored (issue on SFML forum filed). Patch CMakeLists as needed.
+if [ "$LIBDIRSUFFIX" = "64" ]; then
+ mv ${PKG}/usr/lib ${PKG}/usr/lib64
+fi
+
+# a cmake module from SFML is needed for SFGUI to build
+# but it is not installed by default for some reason
+CMAKEMODPATH=$(dirname `find /usr/share/ -type f -name "CMake.cmake"`)
+mkdir -p ${PKG}${CMAKEMODPATH}
+mv ${PKG}/usr/share/$PRGNAM/cmake/Modules/FindSFML.cmake ${PKG}${CMAKEMODPATH}/FindSFML.cmake
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a license.txt readme.txt $PKG/usr/doc/$PRGNAM-$VERSION