Subject: [bug#37288] [PATCH] Update emacs-org-pomodoro.

From: Brian Leung <[email-masked]>
Date: Tue, 3 Sep 2019 00:17:46 +0200

See attached.
From c2013581fa1bad84917a240be26c8c14c0275f57 Mon Sep 17 00:00:00 2001
From: Brian Leung <[email-masked]>
Date: Tue, 3 Sep 2019 00:10:04 +0200
Subject: [PATCH] gnu: emacs-org-pomodoro: Update to 2.1.0-1.aa07c11.

* gnu/packages/emacs-xyz.scm (emacs-org-pomodoro): Update to 2.1.0-1.aa07c11.
[arguments]: Include "resources" directory and run tests.
[source]: Update url.
---
 gnu/packages/emacs-xyz.scm | 64 +++++++++++++++++++++++++++-----------
 1 file changed, 45 insertions(+), 19 deletions(-)

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 4bfc09d0aa..74bfe6e30a 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -4229,24 +4229,50 @@ number.")
     (license license:gpl3+)))
 
 (define-public emacs-org-pomodoro
-  (package
-    (name "emacs-org-pomodoro")
-    (version "2.1.0")
-    (source
-     (origin
-       (method git-fetch)
-       (uri (git-reference
-             (url "https://github.com/lolownia/org-pomodoro.git")
-             (commit version)))
-       (file-name (git-file-name name version))
-       (sha256
-        (base32 "0r5shgikm34d66i2hblyknbblpg92lb2zc9x4bcb28xkh7m9d0xv"))))
-    (build-system emacs-build-system)
-    (propagated-inputs
-     `(("emacs-alert" ,emacs-alert)))
-    (home-page "https://github.com/lolownia/org-pomodoro")
-    (synopsis "Pomodoro technique for org-mode")
-    (description "@code{emacs-org-pomodoro} adds very basic support for
+  ;; Last release version was from 2016.
+  (let ((commit "aa07c11318f91219336197e62c47bc7a3d090479")
+        (revision "1"))
+    (package
+      (name "emacs-org-pomodoro")
+      (version (git-version "2.1.0" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/marcinkoziej/org-pomodoro.git")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "0nbprh2nhnmb7ngp9ndr6zr37ashcsvpi5slv7a37x1dl7j6w1k4"))))
+      (build-system emacs-build-system)
+      (propagated-inputs
+       `(("emacs-alert" ,emacs-alert)))
+      (arguments
+       `(#:include (cons "^resources\\/" %default-include)
+         #:tests? #t
+         #:test-command '("emacs" "--batch"
+                          "-l" "org-pomodoro-tests.el"
+                          "-f" "ert-run-tests-batch-and-exit")
+         #:phases
+         (modify-phases %standard-phases
+           (add-before 'check 'make-tests-writable
+             (lambda _
+               (make-file-writable "org-pomodoro-tests.el")
+               #t))
+           (add-before 'check 'add-require
+             (lambda _
+               (emacs-batch-edit-file "org-pomodoro-tests.el"
+                 `(progn (progn (goto-char (point-min))
+                                (re-search-forward
+                                 "ert-deftest")
+                                (beginning-of-line)
+                                (forward-line -1)
+                                (insert "(require 'org-pomodoro)"))
+                         (basic-save-buffer)))
+               #t)))))
+      (home-page "https://github.com/marcinkoziej/org-pomodoro")
+      (synopsis "Pomodoro technique for org-mode")
+      (description "@code{emacs-org-pomodoro} adds very basic support for
 Pomodoro technique in Emacs org-mode.
 
 Run @code{M-x org-pomodoro} for the task at point or select one of the
@@ -4254,7 +4280,7 @@ last tasks that you clocked time for.  Each clocked-in pomodoro starts
 a timer of 25 minutes and after each pomodoro a break timer of 5
 minutes is started automatically.  Every 4 breaks a long break is
 started with 20 minutes.  All values are customizable.")
-    (license license:gpl3+)))
+      (license license:gpl3+))))
 
 (define-public emacs-org-sidebar
   (let ((commit "74ca98b9920f3de3f13d49866581435e1ec63ec5")
-- 
2.23.0