gnu: emacs-pdf-tools: Use emacs-build-system for elisp side.
* gnu/packages/emacs.scm (emacs-pdf-tools)[arguments]: Add phases from emacs-build-system to build elisp side. Co-authored-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
parent
5e3161d38e
commit
1bcae5c5c5
|
@ -1018,21 +1018,26 @@ single buffer.")
|
||||||
(arguments
|
(arguments
|
||||||
`(#:tests? #f ; there are no tests
|
`(#:tests? #f ; there are no tests
|
||||||
#:modules ((guix build gnu-build-system)
|
#:modules ((guix build gnu-build-system)
|
||||||
|
((guix build emacs-build-system) #:prefix emacs:)
|
||||||
(guix build utils)
|
(guix build utils)
|
||||||
(guix build emacs-utils))
|
(guix build emacs-utils))
|
||||||
#:imported-modules (,@%gnu-build-system-modules
|
#:imported-modules (,@%gnu-build-system-modules
|
||||||
|
(guix build emacs-build-system)
|
||||||
(guix build emacs-utils))
|
(guix build emacs-utils))
|
||||||
#:phases
|
#:phases
|
||||||
(modify-phases %standard-phases
|
(modify-phases %standard-phases
|
||||||
(add-after 'unpack 'enter-dir (lambda _ (chdir "server") #t))
|
;; Build server side using 'gnu-build-system'.
|
||||||
(add-before
|
(add-after 'unpack 'enter-server-dir
|
||||||
'configure 'autogen
|
(lambda _ (chdir "server") #t))
|
||||||
|
(add-before 'configure 'autogen
|
||||||
(lambda _
|
(lambda _
|
||||||
(zero? (system* "bash" "autogen.sh"))))
|
(zero? (system* "bash" "autogen.sh"))))
|
||||||
(add-before
|
|
||||||
'build 'patch-variables
|
;; Build emacs side using 'emacs-build-system'.
|
||||||
|
(add-after 'compress-documentation 'enter-lisp-dir
|
||||||
|
(lambda _ (chdir "../lisp") #t))
|
||||||
|
(add-after 'enter-lisp-dir 'emacs-patch-variables
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
(lambda* (#:key outputs #:allow-other-keys)
|
||||||
(with-directory-excursion "../lisp"
|
|
||||||
;; Set path to epdfinfo program.
|
;; Set path to epdfinfo program.
|
||||||
(emacs-substitute-variables "pdf-info.el"
|
(emacs-substitute-variables "pdf-info.el"
|
||||||
("pdf-info-epdfinfo-program"
|
("pdf-info-epdfinfo-program"
|
||||||
|
@ -1041,17 +1046,13 @@ single buffer.")
|
||||||
;; Set 'pdf-tools-handle-upgrades' to nil to avoid "auto
|
;; Set 'pdf-tools-handle-upgrades' to nil to avoid "auto
|
||||||
;; upgrading" that pdf-tools tries to perform.
|
;; upgrading" that pdf-tools tries to perform.
|
||||||
(emacs-substitute-variables "pdf-tools.el"
|
(emacs-substitute-variables "pdf-tools.el"
|
||||||
("pdf-tools-handle-upgrades" '())))))
|
("pdf-tools-handle-upgrades" '()))))
|
||||||
(add-after
|
(add-after 'emacs-patch-variables 'emacs-install
|
||||||
'install 'install-lisp
|
(assoc-ref emacs:%standard-phases 'install))
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
(add-after 'emacs-install 'emacs-build
|
||||||
(let ((target (string-append (assoc-ref outputs "out")
|
(assoc-ref emacs:%standard-phases 'build))
|
||||||
"/share/emacs/site-lisp/")))
|
(add-after 'emacs-install 'emacs-make-autoloads
|
||||||
(for-each (lambda (file)
|
(assoc-ref emacs:%standard-phases 'make-autoloads)))))
|
||||||
(install-file file target))
|
|
||||||
(find-files "../lisp" "^(pdf|tab).*\\.elc?"))
|
|
||||||
(emacs-byte-compile-directory target)
|
|
||||||
(emacs-generate-autoloads "pdf-tools" target)))))))
|
|
||||||
(native-inputs `(("autoconf" ,autoconf)
|
(native-inputs `(("autoconf" ,autoconf)
|
||||||
("automake" ,automake)
|
("automake" ,automake)
|
||||||
("pkg-config" ,pkg-config)
|
("pkg-config" ,pkg-config)
|
||||||
|
|
Loading…
Reference in New Issue