aboutsummaryrefslogtreecommitdiff
path: root/multimedia
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2021-09-10 23:06:50 -0400
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2021-10-13 00:52:20 +0700
commit17eb7bd15d79652eda6da2a6ffe1c5d3a8beeb19 (patch)
treea7fea58ad0950f62f41ebbe08726da4f2e857332 /multimedia
parent12dacd96ee57e90462083f65c819a26315b7c2e2 (diff)
multimedia/nted: Fix -current build.
Signed-off-by: B. Watson <yalhcru@gmail.com> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'multimedia')
-rw-r--r--multimedia/nted/compilefix.diff20
-rw-r--r--multimedia/nted/nted.SlackBuild21
2 files changed, 31 insertions, 10 deletions
diff --git a/multimedia/nted/compilefix.diff b/multimedia/nted/compilefix.diff
new file mode 100644
index 0000000000000..7641910a2c602
--- /dev/null
+++ b/multimedia/nted/compilefix.diff
@@ -0,0 +1,20 @@
+diff -Naur nted-1.10.18/voice.cpp nted-1.10.18.patched/voice.cpp
+--- nted-1.10.18/voice.cpp 2011-01-27 08:09:44.000000000 -0500
++++ nted-1.10.18.patched/voice.cpp 2021-09-10 22:50:23.045105704 -0400
+@@ -20,6 +20,7 @@
+ /****************************************************************************************/
+
+ #include <string.h>
++#include <stdint.h>
+ #include "voice.h"
+ #include "beaming.h"
+ #include "staff.h"
+@@ -1369,7 +1370,7 @@
+ return FALSE;
+ }
+ ref_duration = (method == 1) ? templ->getDuration() / 2 : templ->getDuration();
+- if ((min_pos_ptr = g_list_find(m_chord_or_rests, templ)) < 0) {
++ if ((intptr_t)(min_pos_ptr = g_list_find(m_chord_or_rests, templ)) < 0) {
+ NedResource::Abort("NedVoice::tryConvertToTuplet(1)");
+ }
+ if ((minpos = g_list_index(m_chord_or_rests, templ)) < 0) {
diff --git a/multimedia/nted/nted.SlackBuild b/multimedia/nted/nted.SlackBuild
index eeb0c433db05d..bc7f05844f6b7 100644
--- a/multimedia/nted/nted.SlackBuild
+++ b/multimedia/nted/nted.SlackBuild
@@ -1,8 +1,6 @@
#!/bin/bash
# Slackware build script for nted
-#(http://vsr.informatik.tu-chemnitz.de/staff/jan/nted/nted.xhtml)
-# 20180905 bkw: original homepage is long gone.
# Copyright 2008 Corrado Franco (email removed)
# All rights reserved.
@@ -26,6 +24,11 @@
# Modified by the SlackBuilds.org project
+# 20210910 bkw: fix build on -current (gcc11)
+# TODO: occasionally nted segfaults on exit, fix if possible. It's
+# difficult to reproduce, and when I compile with debugging symbols
+# I can't get it to happen at all.
+
# 20180905 bkw: upstream has been dead a while, switch homepage to
# debian's package page, and use their patches. VERSION now 1.10.18_12,
# original version + debian patchlevel 12. The debian patches fix a few
@@ -38,7 +41,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=nted
VERSION=${VERSION:-1.10.18_12}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -50,9 +53,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
@@ -62,7 +62,8 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-DOCS="ABOUT* AUTHORS COPYING* ChangeLog FAQ INSTALL NEWS README"
+# 20210910 bkw: NEWS and ChangeLog are 0-byte placeholders, ignore
+DOCS="ABOUT* AUTHORS COPYING* FAQ INSTALL README"
if [ "$ARCH" = "i586" ]; then
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
@@ -91,6 +92,8 @@ chown -R root:root .
find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
\! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
+patch -p1 < $CWD/compilefix.diff
+
for i in $( cat debian/patches/series ); do
patch -p1 < debian/patches/$i
done
@@ -120,14 +123,12 @@ CXXFLAGS="$SLKCFLAGS -fpermissive -Wno-narrowing" \
make
make install-strip DESTDIR=$PKG
+gzip -9 $PKG/usr/man/man?/*.*
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
-find $PKG/usr/man -type f -exec gzip -9 {} \;
-for i in $(find $PKG/usr/man -type l) ; do ln -s $(readlink $i).gz $i.gz ; rm $i ; done
-
# Overwrite shipped .desktop file with fixed one that validates
cat $CWD/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop