games/KAdventure: Fix 15.0 build.

Signed-off-by: B. Watson <yalhcru@gmail.com>

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
B. Watson 2022-02-19 09:51:07 -05:00 committed by Willy Sudiarto Raharjo
parent 09b6f37d29
commit c9bebcd39e
No known key found for this signature in database
GPG key ID: 3F617144D7238786
3 changed files with 19 additions and 20 deletions

View file

@ -22,11 +22,15 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# 20220219 bkw: Modified by SlackBuilds.org, for Slackware 15.0:
# - add qt4 dependency (and use qmake-qt4).
# - more binary to /usr/games ('cause it's a game).
cd $(dirname $0) ; CWD=$(pwd) cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=KAdventure PRGNAM=KAdventure
VERSION=${VERSION:-gitfdc9579} VERSION=${VERSION:-gitfdc9579}
BUILD=${BUILD:-1} BUILD=${BUILD:-2}
TAG=${TAG:-_SBo} TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz} PKGTYPE=${PKGTYPE:-tgz}
@ -38,9 +42,6 @@ if [ -z "$ARCH" ]; then
esac esac
fi fi
# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
# the name of the created package would be, and then exit. This information
# could be useful to other scripts.
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
exit 0 exit 0
@ -75,33 +76,31 @@ cd $PRGNAM-master
#we'll patch the qml files to remove a runtime warning #we'll patch the qml files to remove a runtime warning
#upstream will be fixing this eventually. #upstream will be fixing this eventually.
sed -i "s/Qt 4.7/QtQuick 1.1/" src/*.qml
sed -i "s/Qt 4.7/QtQuick 1.1/" levels/BouncingBall.qml # 20220219 bkw: well, I wouldn't hold my breath...
sed -i "s/Qt 4.7/QtQuick 1.1/" objects/*.qml
sed -i "s/Qt 4.7/QtQuick 1.1/" \
src/*.qml levels/BouncingBall.qml objects/*.qml
chown -R root:root . chown -R root:root .
find -L . \ find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
-o -perm 511 \) -exec chmod 755 {} \; -o \ -o -perm 511 \) -exec chmod 755 {} \+ -o \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ \( -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 qmake-qt4 QMAKE_CFLAGS="$SLKCFLAGS" QMAKE_CXXFLAGS="$SLKCFLAGS" -config release
qmake QMAKE_CFLAGS="$SLKCFLAGS" QMAKE_CXXFLAGS="$SLKCFLAGS" -config release
make make
#the make file has no install info so we do things ourselves #the make file has no install info so we do things ourselves
mkdir -p $PKG/usr/bin $PKG/usr/share/applications/ mkdir -p $PKG/usr/games $PKG/usr/share/applications/
cp $PRGNAM $PKG/usr/bin install -s -m0755 $PRGNAM $PKG/usr/games
mkdir -p $PKG/usr/share/applications/ $PKG/usr/share/icons/hicolor/{128x128,48x48,16x16}/apps mkdir -p $PKG/usr/share/applications/ $PKG/usr/share/icons/hicolor/{128x128,48x48,16x16}/apps
cp images/player.png $PKG/usr/share/icons/hicolor/48x48/apps/$PRGNAM.png cp images/player.png $PKG/usr/share/icons/hicolor/48x48/apps/$PRGNAM.png
convert images/player.png -resize 128x128 $PKG/usr/share/icons/hicolor/128x128/apps/$PRGNAM.png convert images/player.png -resize 128x128 $PKG/usr/share/icons/hicolor/128x128/apps/$PRGNAM.png
convert images/player.png -resize 16x16 $PKG/usr/share/icons/hicolor/16x16/apps/$PRGNAM.png convert images/player.png -resize 16x16 $PKG/usr/share/icons/hicolor/16x16/apps/$PRGNAM.png
cp $CWD/$PRGNAM.desktop $PKG/usr/share/applications/$PRGNAM.desktop cp $CWD/$PRGNAM.desktop $PKG/usr/share/applications/$PRGNAM.desktop
#lets strip the executable
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 mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp README.md $PKG/usr/doc/$PRGNAM-$VERSION/ cp README.md $PKG/usr/doc/$PRGNAM-$VERSION/
cd .. cd ..

View file

@ -1,7 +1,7 @@
[Desktop Entry] [Desktop Entry]
Name=KAdventure Name=KAdventure
Comment=Simple 2D puzzle Game. Guide the man to the exit Comment=Simple 2D puzzle game: guide the man to the exit.
Exec=KAdventure Exec=/usr/games/KAdventure
Icon=KAdventure Icon=KAdventure
Terminal=false Terminal=false
StartupNotify=false StartupNotify=false

View file

@ -5,6 +5,6 @@ DOWNLOAD="http://sourceforge.net/projects/slackbuildsdirectlinks/files/KAdventur
MD5SUM="a089f6a795190fcd570edecd3e4b5460" MD5SUM="a089f6a795190fcd570edecd3e4b5460"
DOWNLOAD_x86_64="" DOWNLOAD_x86_64=""
MD5SUM_x86_64="" MD5SUM_x86_64=""
REQUIRES="" REQUIRES="qt4"
MAINTAINER="Tim Dickson" MAINTAINER="Tim Dickson"
EMAIL="dickson.tim@googlemail.com" EMAIL="dickson.tim@googlemail.com"