calcurse: Work-around for #8661. (#8665)

$XDG_DATA_HOME (~/config/non-packaged/data) should always be there,
so avoid errors while tryiing to mkdir() it again while trying to
create the "calcurse" subdir.
This commit is contained in:
OscarL
2023-05-18 01:30:47 -03:00
committed by GitHub
parent acbf22fa48
commit ab63f98c52
2 changed files with 37 additions and 3 deletions

View File

@@ -8,7 +8,7 @@ appointments, making it suitable for use in scripts."
HOMEPAGE="https://calcurse.org/"
COPYRIGHT="2004-2022 calcurse Development Team"
LICENSE="BSD (2-clause)"
REVISION="1"
REVISION="2"
SOURCE_URI="http://calcurse.org/files/calcurse-$portVersion.tar.gz"
CHECKSUM_SHA256="48a736666cc4b6b53012d73b3aa70152c18b41e6c7b4807fab0f168d645ae32c"
PATCHES="calcurse-$portVersion.patchset"

View File

@@ -1,4 +1,4 @@
From be7e7bc4d56fd3e86611800b8771d733ff8835cc Mon Sep 17 00:00:00 2001
From ac53791060c087a09e4b7b52aedfbba585383afc Mon Sep 17 00:00:00 2001
From: Begasus <begasus@gmail.com>
Date: Wed, 17 May 2023 15:08:43 +0200
Subject: Fix version
@@ -21,7 +21,7 @@ index e7594c5..f3924a9 100644
2.37.3
From ac1bac201c3961ccb90fab2f6a4a86ec6b3b532f Mon Sep 17 00:00:00 2001
From f674aa5e919eb3031bc9d4ab8f078efe8fef0b6d Mon Sep 17 00:00:00 2001
From: Begasus <begasus@gmail.com>
Date: Wed, 17 May 2023 15:13:23 +0200
Subject: Revert check for libncurses (no need for autoconf-archive)
@@ -68,3 +68,37 @@ index f3924a9..4fc1874 100644
--
2.37.3
From 552dc8abe1b5175e5df3111f49223b9ea56fb1ff Mon Sep 17 00:00:00 2001
From: Oscar Lesta <oscar.lesta@gmail.com>
Date: Thu, 18 May 2023 01:04:02 -0300
Subject: Avoid errors due to ~/config (packagefs) being read-only.
Just assume $XDG_DATA_HOME exists, and let the code attempt mkdir()
on that instead of trying to mimic "mkdir -p" all the way there.
Work-arounds Haikuports's #8661.
diff --git a/src/io.c b/src/io.c
index e7ad094..147f248 100644
--- a/src/io.c
+++ b/src/io.c
@@ -1074,6 +1074,7 @@ int io_check_dir(const char *dir)
int existed = 1, failed = 0;
errno = 0;
+#ifndef __HAIKU__
for (index = path + 1; *index; index++) {
if (*index == '/') {
*index = '\0';
@@ -1088,6 +1089,7 @@ int io_check_dir(const char *dir)
*index = '/';
}
}
+#endif
if (!failed && mkdir(path, 0700) != 0) {
if (errno != EEXIST)
--
2.37.3