summaryrefslogtreecommitdiffstats
path: root/office/calcurse
diff options
context:
space:
mode:
Diffstat (limited to 'office/calcurse')
-rw-r--r--office/calcurse/0001-Don-t-fclose-fp-if-it-failed-to-fopen.patch50
-rw-r--r--office/calcurse/README4
-rw-r--r--office/calcurse/calcurse.SlackBuild30
-rw-r--r--office/calcurse/calcurse.info10
4 files changed, 77 insertions, 17 deletions
diff --git a/office/calcurse/0001-Don-t-fclose-fp-if-it-failed-to-fopen.patch b/office/calcurse/0001-Don-t-fclose-fp-if-it-failed-to-fopen.patch
new file mode 100644
index 0000000000..533dfaf24e
--- /dev/null
+++ b/office/calcurse/0001-Don-t-fclose-fp-if-it-failed-to-fopen.patch
@@ -0,0 +1,50 @@
+From dc63cf73781f9303ed1f12dc7e4ecfb6f3938f3c Mon Sep 17 00:00:00 2001
+From: dave <dave@slackbuilds.org>
+Date: Sat, 28 Jan 2023 01:51:55 +0000
+Subject: [PATCH] Don't fclose(fp) if it failed to fopen()
+MIME-Version: 1.0
+Content-Type: multipart/mixed; boundary="------------true"
+
+This is a multi-part message in MIME format.
+--------------true
+Content-Type: text/plain; charset=UTF-8; format=fixed
+Content-Transfer-Encoding: 8bit
+
+
+This fixes a segfault in fclose@@GLIBC_2.2.5
+'calcurse -c /path/to/apts -G' segfaults at first note seen.
+Split the tests @ ical.c:216 into two:
+return if fopen(fp) failed.
+fclose(fp) and return @ EOF.
+
+Signed-off-by: dave <dave@slackbuilds.org>
+---
+ src/ical.c | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+
+--------------true
+Content-Type: text/x-patch; name="0001-Don-t-fclose-fp-if-it-failed-to-fopen.patch"
+Content-Transfer-Encoding: 8bit
+Content-Disposition: attachment; filename="0001-Don-t-fclose-fp-if-it-failed-to-fopen.patch"
+
+diff --git a/src/ical.c b/src/ical.c
+index 535bca8..4b55343 100644
+--- a/src/ical.c
++++ b/src/ical.c
+@@ -213,7 +213,10 @@ static void ical_export_note(FILE *stream, char *name)
+ int has_desc, has_prop, i;
+
+ asprintf(&note_file, "%s/%s", path_notes, name);
+- if (!(fp = fopen(note_file, "r")) || ungetc(getc(fp), fp) == EOF) {
++ if (!(fp = fopen(note_file, "r"))) {
++ return;
++ }
++ if (ungetc(getc(fp), fp) == EOF) {
+ fclose(fp);
+ return;
+ }
+
+--------------true--
+
+
diff --git a/office/calcurse/README b/office/calcurse/README
index be95ad316f..147a8bb101 100644
--- a/office/calcurse/README
+++ b/office/calcurse/README
@@ -5,5 +5,5 @@ curses based interface can be customized to suit user needs and a very
powerful set of command line options can be used to filter and format
appointments, making it suitable for use in scripts.
-There is an optional dependency on httplib2 if you want to use the
-calcurse-caldav utility.
+There is an optional dependency on python3-httplib2 if you want to use
+the calcurse-caldav utility.
diff --git a/office/calcurse/calcurse.SlackBuild b/office/calcurse/calcurse.SlackBuild
index 6a979d2fc5..2dbd716088 100644
--- a/office/calcurse/calcurse.SlackBuild
+++ b/office/calcurse/calcurse.SlackBuild
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for calcurse
@@ -26,10 +26,13 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=calcurse
-VERSION=${VERSION:-4.6.0}
-BUILD=${BUILD:-1}
+VERSION=${VERSION:-4.8.0}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -39,7 +42,14 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+# 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
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -73,6 +83,8 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+patch -p1 <$CWD/0001-Don-t-fclose-fp-if-it-failed-to-fopen.patch
+
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
@@ -94,17 +106,15 @@ 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
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a ABOUT-NLS AUTHORS COPYING INSTALL doc/manual* doc/$PRGNAM.1.txt \
+cp -a ABOUT-NLS AUTHORS COPYING doc/manual* doc/$PRGNAM.1.txt \
$PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
# move doc to the right place
-cp -a $PKG/usr/share/doc/calcurse/* $PKG/usr/doc/$PRGNAM-$VERSION/
-rm -Rf $PKG/usr/share/doc
-
-cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+#rm -rf $PKG/usr/share/doc
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/office/calcurse/calcurse.info b/office/calcurse/calcurse.info
index 72ad284cd2..e1c300125d 100644
--- a/office/calcurse/calcurse.info
+++ b/office/calcurse/calcurse.info
@@ -1,10 +1,10 @@
PRGNAM="calcurse"
-VERSION="4.6.0"
-HOMEPAGE="http://calcurse.org/"
-DOWNLOAD="https://calcurse.org/files/calcurse-4.6.0.tar.gz"
-MD5SUM="20b59e3a41713f6433be252ea8413dbe"
+VERSION="4.8.0"
+HOMEPAGE="https://calcurse.org/"
+DOWNLOAD="https://calcurse.org/files/calcurse-4.8.0.tar.gz"
+MD5SUM="59eaebddb5539c5aa6a9e6e5d63e0dbc"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
-MAINTAINER="Dave Woodfall"
+MAINTAINER="D Woodfall"
EMAIL="dave@slackbuilds.org"