aboutsummaryrefslogtreecommitdiff
path: root/academic/flashqard
diff options
context:
space:
mode:
authorDavid Spencer <baildon.research@googlemail.com>2015-07-28 12:06:30 +0100
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2016-01-17 09:40:16 +0700
commit91a40ef1e4bd27ccfd6c8b8deac94c3615f1054f (patch)
treec4cc58c7cbc7e8ac485fa716d3dad698adb2efc6 /academic/flashqard
parent7d7ef4b6a3d3becdbf91353f291c1a24750c14f4 (diff)
academic/flashqard: Patched to build on -current.
Fails to build with qt-4.8.7. Template cleanups. Signed-off-by: David Spencer <baildon.research@googlemail.com> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'academic/flashqard')
-rw-r--r--academic/flashqard/flashqard-0.15.0_qt-4.8.7.patch22
-rw-r--r--academic/flashqard/flashqard.SlackBuild37
2 files changed, 46 insertions, 13 deletions
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 0000000000000..57bce20dce4f3
--- /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 <QApplication>
+ #include <QPainter>
+ #include <QTimerEvent>
+ #include <QDropEvent>
+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 <shahab@flashqard-project.org> |
+ // +-------------------------------------------------------------------------+
+
++#include <QDir>
+ #include <QRegExp>
+ #include <QToolBar>
+ #include <QMessageBox>
diff --git a/academic/flashqard/flashqard.SlackBuild b/academic/flashqard/flashqard.SlackBuild
index 7e57e1c7990ba..f749eb317b7aa 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