|
3 | 3 |
|
4 | 4 | (package! org |
5 | 5 | :recipe (:host github |
6 | | - ;; REVIEW I intentionally avoid git.savannah.gnu.org because of SSL |
| 6 | + ;; REVIEW: I intentionally avoid git.savannah.gnu.org because of SSL |
7 | 7 | ;; issues (see #5655), uptime issues, download time, and lack of |
8 | 8 | ;; shallow clone support. |
9 | 9 | :repo "emacs-straight/org-mode" |
10 | 10 | :files (:defaults "etc") |
11 | 11 | :depth 1 |
12 | | - ;; HACK Org requires a post-install compilation step to generate a |
13 | | - ;; org-version.el with org-release and org-git-version functions, |
14 | | - ;; using a 'git describe ...' call. This won't work in a sparse |
15 | | - ;; clone and I value smaller network burdens on users over |
16 | | - ;; non-essential variables so we fake it: |
| 12 | + ;; HACK: Org has a post-install step that generates org-version.el |
| 13 | + ;; and org-loaddefs.el, but Straight doesn't invoke this step, and |
| 14 | + ;; the former doesn't work if the Org repo is a shallow clone. |
| 15 | + ;; Rather than impose the network burden of a full clone (and other |
| 16 | + ;; redundant work in Org's makefile), I'd rather fake these files |
| 17 | + ;; instead. Besides, Straight already produces a org-autoloads.el, |
| 18 | + ;; so org-loaddefs.el isn't needed. |
17 | 19 | :build t |
18 | 20 | :pre-build |
19 | | - (with-temp-file "org-version.el" |
20 | | - (let ((version |
21 | | - (with-temp-buffer |
22 | | - (insert-file-contents (doom-path "lisp/org.el") nil 0 1024) |
23 | | - (if (re-search-forward "^;; Version: \\([^\n-]+\\)" nil t) |
24 | | - (match-string-no-properties 1) |
25 | | - "Unknown")))) |
26 | | - (insert (format "(defun org-release () %S)\n" version) |
27 | | - (format "(defun org-git-version (&rest _) \"%s-??-%s\")\n" |
28 | | - version (cdr (doom-call-process "git" "rev-parse" "--short" "HEAD"))) |
29 | | - "(provide 'org-version)\n")))) |
| 21 | + (progn |
| 22 | + (with-temp-file "org-loaddefs.el") |
| 23 | + (with-temp-file "org-version.el" |
| 24 | + (let ((version |
| 25 | + (with-temp-buffer |
| 26 | + (insert-file-contents (doom-path "lisp/org.el") nil 0 1024) |
| 27 | + (if (re-search-forward "^;; Version: \\([^\n-]+\\)" nil t) |
| 28 | + (match-string-no-properties 1) |
| 29 | + "Unknown")))) |
| 30 | + (insert (format "(defun org-release () %S)\n" version) |
| 31 | + (format "(defun org-git-version (&rest _) \"%s-??-%s\")\n" |
| 32 | + version (cdr (doom-call-process "git" "rev-parse" "--short" "HEAD"))) |
| 33 | + "(provide 'org-version)\n"))))) |
30 | 34 | :pin "fe92a3cedba541482d5954eacb2b13e6f57a39c4") |
31 | 35 | (package! org-contrib |
32 | 36 | :recipe (:host github |
|
0 commit comments