diff options
Diffstat (limited to 'office/calcurse')
-rw-r--r-- | office/calcurse/0001-Don-t-fclose-fp-if-it-failed-to-fopen.patch | 50 | ||||
-rw-r--r-- | office/calcurse/README | 15 | ||||
-rw-r--r-- | office/calcurse/calcurse.SlackBuild | 30 | ||||
-rw-r--r-- | office/calcurse/calcurse.info | 10 | ||||
-rw-r--r-- | office/calcurse/dst_change.patch | 15 |
5 files changed, 82 insertions, 38 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(¬e_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 0332ff35b4..147a8bb101 100644 --- a/office/calcurse/README +++ b/office/calcurse/README @@ -1,6 +1,9 @@ -calcurse is a calendar and scheduling application for the command line. It -helps keep track of events, appointments and everyday tasks. A configurable -notification system reminds user of upcoming deadlines, the 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. +Calcurse is a calendar and scheduling application for the command line. +It helps keep track of events, appointments and everyday tasks. A +configurable notification system reminds user of upcoming deadlines, the +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 python3-httplib2 if you want to use +the calcurse-caldav utility. diff --git a/office/calcurse/calcurse.SlackBuild b/office/calcurse/calcurse.SlackBuild index 02c4c2c2ff..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.5.0} +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,9 +83,7 @@ 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 {} \; -# Fix a problem with DST -# https://lists.calcurse.org/bugs/msg00281.html -patch -p1 <$CWD/dst_change.patch +patch -p1 <$CWD/0001-Don-t-fclose-fp-if-it-failed-to-fopen.patch CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ @@ -98,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 a38861365d..e1c300125d 100644 --- a/office/calcurse/calcurse.info +++ b/office/calcurse/calcurse.info @@ -1,10 +1,10 @@ PRGNAM="calcurse" -VERSION="4.5.0" -HOMEPAGE="http://calcurse.org/" -DOWNLOAD="https://calcurse.org/files/calcurse-4.5.0.tar.gz" -MD5SUM="26e8c3e47a5cde45d216525b1e1e464d" +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" diff --git a/office/calcurse/dst_change.patch b/office/calcurse/dst_change.patch deleted file mode 100644 index db0800db79..0000000000 --- a/office/calcurse/dst_change.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff -Naur a/src/utils.c b/src/utils.c ---- a/src/utils.c 2019-06-16 20:04:39.000000000 +0100 -+++ b/src/utils.c 2019-08-01 16:12:00.864953675 +0100 -@@ -526,9 +526,11 @@ - t.tm_mon += delta_month; - t.tm_mday += delta_day; - -+ t.tm_isdst = -1; - if (mktime(&t) == -1) { - return 1; - } else { -+ t.tm_isdst = -1; - *date = t; - return 0; - } |