From 91a40ef1e4bd27ccfd6c8b8deac94c3615f1054f Mon Sep 17 00:00:00 2001 From: David Spencer Date: Tue, 28 Jul 2015 12:06:30 +0100 Subject: academic/flashqard: Patched to build on -current. Fails to build with qt-4.8.7. Template cleanups. Signed-off-by: David Spencer Signed-off-by: Willy Sudiarto Raharjo --- academic/flashqard/flashqard-0.15.0_qt-4.8.7.patch | 22 +++++++++++++ academic/flashqard/flashqard.SlackBuild | 37 ++++++++++++++-------- 2 files changed, 46 insertions(+), 13 deletions(-) create mode 100644 academic/flashqard/flashqard-0.15.0_qt-4.8.7.patch (limited to 'academic/flashqard') diff --git a/academic/flashqard/flashqard-0.15.0_qt-4.8.7.patch b/academic/flashqard/flashqard-0.15.0_qt-4.8.7.patch new file mode 100644 index 000000000000..57bce20dce4f --- /dev/null +++ b/academic/flashqard/flashqard-0.15.0_qt-4.8.7.patch @@ -0,0 +1,22 @@ +diff -u -r flashqard-0.15.0/src/PrettyButton.cpp flashqard-0.15.0-patched/src/PrettyButton.cpp +--- flashqard-0.15.0/src/PrettyButton.cpp 2009-09-08 22:56:54.000000000 +0100 ++++ flashqard-0.15.0-patched/src/PrettyButton.cpp 2015-07-28 11:49:56.506872447 +0100 +@@ -25,6 +25,7 @@ + #include "PrettyButton.h" + #include "TextEditor.h" + #include "MimeData.h" ++#include + #include + #include + #include +diff -u -r flashqard-0.15.0/src/Utilities.cpp flashqard-0.15.0-patched/src/Utilities.cpp +--- flashqard-0.15.0/src/Utilities.cpp 2009-09-08 22:56:54.000000000 +0100 ++++ flashqard-0.15.0-patched/src/Utilities.cpp 2015-07-28 11:45:33.484870666 +0100 +@@ -22,6 +22,7 @@ + // | Author: Shahab Shirazi | + // +-------------------------------------------------------------------------+ + ++#include + #include + #include + #include diff --git a/academic/flashqard/flashqard.SlackBuild b/academic/flashqard/flashqard.SlackBuild index 7e57e1c7990b..f749eb317b7a 100644 --- a/academic/flashqard/flashqard.SlackBuild +++ b/academic/flashqard/flashqard.SlackBuild @@ -18,8 +18,8 @@ fi CWD=$(pwd) TMP=${TMP:-/tmp/SBo} -OUTPUT=${OUTPUT:-/tmp} PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} if [ "$ARCH" = "i486" ]; then SLKCFLAGS="-O2 -march=i486 -mtune=i686" @@ -40,29 +40,40 @@ set -e rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP -rm -rf $TMP/$PRGNAM-$VERSION +rm -rf $PRGNAM-$VERSION tar xvf $CWD/$PRGNAM-$VERSION.tar.gz cd $PRGNAM-$VERSION chown -R root:root . 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 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ - -exec chmod 644 {} \; + \( -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 {} \; + +# Patch for missing includes with qt-4.8.7 +patch -p1 < $CWD/flashqard-0.15.0_qt-4.8.7.patch -mkdir build +mkdir -p build cd build - cmake -DCMAKE_INSTALL_PREFIX=/usr .. - make VERBOSE=1 - make install VERBOSE=1 DESTDIR=$PKG + cmake \ + -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DLIB_SUFFIX=${LIBDIRSUFFIX} \ + -DMAN_INSTALL_DIR=/usr/man \ + -DCMAKE_BUILD_TYPE=Release .. + make + make install DESTDIR=$PKG cd .. -find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ +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 COPYING ChangeLog README AUTHORS INSTALL $PKG/usr/doc/$PRGNAM-$VERSION -cat $CWD/flashqard.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/flashqard.SlackBuild +cp -a \ + COPYING ChangeLog README AUTHORS INSTALL \ + $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc -- cgit v1.2.3