diff options
Diffstat (limited to 'libraries/glfw3/glfw3.SlackBuild')
-rw-r--r-- | libraries/glfw3/glfw3.SlackBuild | 43 |
1 files changed, 24 insertions, 19 deletions
diff --git a/libraries/glfw3/glfw3.SlackBuild b/libraries/glfw3/glfw3.SlackBuild index d1b41ad62ff2..dd9194c69544 100644 --- a/libraries/glfw3/glfw3.SlackBuild +++ b/libraries/glfw3/glfw3.SlackBuild @@ -3,6 +3,7 @@ # Slackware build script for glfw3 # Copyright 2015 Jeffrey T. Read <bitwize@gmail.com> USA +# Copyright 2018 Hunter Sezen California, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -23,8 +24,8 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. PRGNAM=glfw3 -OLDPRGNAM=glfw -VERSION=${VERSION:-3.1.1} +SRCNAM=${PRGNAM%3} +VERSION=${VERSION:-3.2.1} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} @@ -55,14 +56,14 @@ else LIBDIRSUFFIX="" fi -set -e +set -eu rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP -rm -rf $OLDPRGNAM-$VERSION -unzip $CWD/$OLDPRGNAM-$VERSION.zip -cd $OLDPRGNAM-$VERSION +rm -rf $SRCNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +cd $SRCNAM-$VERSION chown -R root:root . find -L . \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ @@ -70,23 +71,27 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; -CFLAGS="$SLKCFLAGS" \ -CXXFLAGS="$SLKCFLAGS" \ -cmake -DCMAKE_INSTALL_PREFIX:PATH=$PKG/usr -DLIB_SUFFIX=$LIBDIRSUFFIX -DBUILD_SHARED_LIBS=1 . +# glfw3 doesn'5 install documentation or examples so don't build them. -make all -make install +mkdir -p build +cd build + cmake \ + -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DLIB_SUFFIX=${LIBDIRSUFFIX} \ + -DBUILD_SHARED_LIBS=1 \ + -DGLFW_BUILD_EXAMPLES=OFF \ + -DGLFW_BUILD_DOCS=OFF \ + -DCMAKE_BUILD_TYPE=Release .. + make + make install DESTDIR=$PKG +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 - -find $PKG -name perllocal.pod \ - -o -name ".packlist" \ - -o -name "*.bs" \ - | xargs rm -f +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 mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a docs/*.dox docs/*.xml docs/*.svg docs/*.in docs/*.css docs/html $PKG/usr/doc/$PRGNAM-$VERSION +cp -a COPYING.txt README.md $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PKG/install |