commit: 717acbf6e8480ecca5df107092efaa766e745731
Author: Tomas Fabrizio Orsi <torsi <AT> fi <DOT> uba <DOT> ar>
AuthorDate: Sun Jun 16 21:03:45 2024 +0000
Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Tue Jun 18 17:58:58 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=717acbf6
app-emacs/calfw: Added patch for calfw time-ranges representation
Signed-off-by: Tomas Fabrizio Orsi <torsi <AT> fi.uba.ar>
[Patches squashed, patch file renamed]
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>
.../{calfw-1.6.ebuild => calfw-1.6-r1.ebuild} | 8 +++--
app-emacs/calfw/files/calfw-1.6-time-ranges.patch | 39 ++++++++++++++++++++++
2 files changed, 45 insertions(+), 2 deletions(-)
diff --git a/app-emacs/calfw/calfw-1.6.ebuild
b/app-emacs/calfw/calfw-1.6-r1.ebuild
similarity index 85%
rename from app-emacs/calfw/calfw-1.6.ebuild
rename to app-emacs/calfw/calfw-1.6-r1.ebuild
index da8343f73582..28efbf62a8b7 100644
--- a/app-emacs/calfw/calfw-1.6.ebuild
+++ b/app-emacs/calfw/calfw-1.6-r1.ebuild
@@ -1,7 +1,7 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
inherit elisp
@@ -21,6 +21,10 @@ S="${WORKDIR}/emacs-${PN}-${PV}"
SITEFILE="50${PN}-gentoo.el"
DOCS="readme.md"
+PATCHES=(
+ "${FILESDIR}"/${P}-time-ranges.patch
+)
+
src_prepare() {
elisp_src_prepare
use howm || rm calfw-howm.el || die
diff --git a/app-emacs/calfw/files/calfw-1.6-time-ranges.patch
b/app-emacs/calfw/files/calfw-1.6-time-ranges.patch
new file mode 100644
index 000000000000..582b8f443b45
--- /dev/null
+++ b/app-emacs/calfw/files/calfw-1.6-time-ranges.patch
@@ -0,0 +1,39 @@
+From fc4306c44b681b6e8f956ebc2740002bdb66d266 Mon Sep 17 00:00:00 2001
+From: Maxime Wack <[email protected]>
+Date: Wed, 3 Feb 2021 12:51:20 +0100
+Subject: [PATCH 1/3] Fix cfw:org-get-timerange to display the correct
+ timerange
+
+From 407b0eb31b1d16532e22316edfba5b0b76f4cd3b Mon Sep 17 00:00:00 2001
+From: Maxime Wack <[email protected]>
+Date: Mon, 7 Jun 2021 00:58:43 +0200
+Subject: [PATCH 2/3] Re-use start-date, as permitted by let*
+
+From 6c75fd3acb47f634d0b2c3c591e659c5bae448cc Mon Sep 17 00:00:00 2001
+From: Maxime Wack <[email protected]>
+Date: Mon, 7 Jun 2021 00:59:35 +0200
+Subject: [PATCH 3/3] Fix the double displaying of timeranges with times
+
+--- a/calfw-org.el
++++ b/calfw-org.el
+@@ -238,14 +238,13 @@
+ (match-string 1 extra)))
+ (total-days (string-to-number
+ (match-string 2 extra)))
+- (start-date (time-subtract
+- (org-read-date nil t date-string)
+- (seconds-to-time (* 3600 24 (- cur-day 1)))))
++ (start-date (org-read-date nil t date-string))
+ (end-date (time-add
+- (org-read-date nil t date-string)
+- (seconds-to-time (* 3600 24 (- total-days
cur-day))))))
+- (list (calendar-gregorian-from-absolute (time-to-days
start-date))
+- (calendar-gregorian-from-absolute (time-to-days
end-date)) text))
++ start-date
++ (seconds-to-time (* 3600 24 (- total-days
1))))))
++ (unless (= cur-day total-days)
++ (list (calendar-gregorian-from-absolute (time-to-days
start-date))
++ (calendar-gregorian-from-absolute
(time-to-days end-date)) text)))
+ )))))
+
+ (defun cfw:org-schedule-period-to-calendar (begin end)