diff options
author | B. Watson <yalhcru@gmail.com> | 2021-12-17 16:04:34 -0500 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2021-12-27 16:20:27 +0700 |
commit | 67defd630c841a5e92d31f373a87298f0e7c8a52 (patch) | |
tree | 76073a77d63a889856cce3e41785f5728b378645 /graphics/baires/baires.SlackBuild | |
parent | e1f783f139e98dc89a817db1a5b7bdf3666557d1 (diff) |
graphics/baires: Fix -current build.
Signed-off-by: B. Watson <yalhcru@gmail.com>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'graphics/baires/baires.SlackBuild')
-rw-r--r-- | graphics/baires/baires.SlackBuild | 55 |
1 files changed, 40 insertions, 15 deletions
diff --git a/graphics/baires/baires.SlackBuild b/graphics/baires/baires.SlackBuild index f09aa158c9a12..60cfc2bca219d 100644 --- a/graphics/baires/baires.SlackBuild +++ b/graphics/baires/baires.SlackBuild @@ -1,7 +1,8 @@ #!/bin/bash # Slackware build script for Baires -# Copyright 2012, Bojan Popovic, Belgrade, Serbia, <bocke@slackware-srbija.org> +# Copyright 2012, Bojan Popovic, Belgrade, Serbia, <email removed> +# Now maintained by B. Watson <yalhcru@gmail.com> # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -21,6 +22,10 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# 20211217 bkw: BUILD=2 +# - fix -current build (by porting to qt5). +# - new-style icons. + # Modified by B. Watson, 20141208: # - took over as maintainer # - use archive.org URLs in .info file @@ -34,7 +39,7 @@ cd $(dirname $0) ; CWD=$(pwd) PRGNAM=baires VERSION=${VERSION:-1.2r1} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -46,9 +51,6 @@ if [ -z "$ARCH" ]; then esac 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 echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" exit 0 @@ -84,11 +86,24 @@ rm -rf $PRGNAM tar xvf $CWD/$PRGNAM.tar.?z* cd $PRGNAM 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 {} \; +find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \ + \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+ + +# 20211217 bkw: turned out to be fairly trivial to port this to qt5. + +# The patch also removes the 'Ruski' option from the Language +# dropdown, since the Cyrillic characters in the source somehow got +# mojibaked into a bunch of question marks. What appears to have +# happened: the original translations.cpp file was either UTF-8, or +# a mix of ISO-8859-1 and whatever Cyrillic encoding the translator +# used... and someone converted it to ISO-8859-1 (on purpose, or by +# using a crappy editor that silently converted it). The only ways to +# fix this would be to either find an older version of baires from +# before the corruption (unlikely, since upstream's site is long +# dead) or find someone who knows Russian and is willing to redo the +# translation. + +patch -p1 < $CWD/qt5.diff # use locally installed copies of HTML docs, since upstream's site has # gone away. @@ -98,14 +113,14 @@ sed -i \ # the HTML docs have fully qualified URLs for images, use local copies # for these, too. -ICON=/usr/share/pixmaps/$PRGNAM.png +ICON=/usr/share/icons/hicolor/64x64/apps/$PRGNAM.png SNAPS=/usr/doc/$PRGNAM-$VERSION/snapshots sed -i \ -e "s,http://www\.beli\.ws/images/baires-64\.png,file://$ICON," \ -e "s,http://www\.beli\.ws/images/\(baires._..\.png\),file://$SNAPS/\1," \ documentation/*.html -qmake QMAKE_CFLAGS="$SLKCFLAGS" \ +qmake-qt5 QMAKE_CFLAGS="$SLKCFLAGS" \ QMAKE_CXXFLAGS="$SLKCFLAGS" \ $PRGNAM.pro @@ -113,12 +128,22 @@ make mkdir -p $PKG/usr/bin $PKG/usr/share/pixmaps $PKG/usr/share/applications install -s -m 755 $PRGNAM $PKG/usr/bin -cat icons/$PRGNAM-128.png > $PKG/$ICON + +for px in 32 48 64 128; do + size=${px}x${px} + dir=$PKG/usr/share/icons/hicolor/$size/apps + mkdir -p $dir + cp -a icons/$PRGNAM-$px.png $dir/$PRGNAM.png +done + +ln -s ../icons/hicolor/48x48/apps/$PRGNAM.png $PKG/usr/share/pixmaps/$PRGNAM.png # Get rid of deprecated & nonstandard keys from .desktop, for # desktop-file-validate. -grep -v -e ^Encoding -e ^X-SuSE $PRGNAM.desktop \ - > $PKG/usr/share/applications/$PRGNAM.desktop +sed -e '/^Encoding/d' \ + -e '/^X-SuSE/d' \ + -e '/^Icon/s,=.*,=baires,' \ + $PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION |