mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-24 10:02:29 +01:00
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>
This commit is contained in:
parent
7d7ef4b6a3
commit
91a40ef1e4
2 changed files with 46 additions and 13 deletions
22
academic/flashqard/flashqard-0.15.0_qt-4.8.7.patch
Normal file
22
academic/flashqard/flashqard-0.15.0_qt-4.8.7.patch
Normal file
|
@ -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>
|
|
@ -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 {} \;
|
||||
|
||||
mkdir build
|
||||
# Patch for missing includes with qt-4.8.7
|
||||
patch -p1 < $CWD/flashqard-0.15.0_qt-4.8.7.patch
|
||||
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue