-
Notifications
You must be signed in to change notification settings - Fork 152
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
What to do with package that requires autotools and configure and make to build... #386
Comments
There is no user-facing way to get the build directory currently; see #274. You can use (straight--build-dir "vm") Perhaps you want something like (defun my-vm-build (package &rest _)
(when (string= package "vm")
(let ((default-directory (straight--build-dir "vm")))
(straight--get-call "autoconf")
(straight--get-call "./configure")
(straight--get-call "make"))))
(add-hook 'straight-use-package-pre-build-functions #'my-vm-build) although it is completely untested -- you will have to spend some time playing around with things to get it to work how you want. See #115 (as per https://github.com/dimitri/el-get/blob/5534e20b8a9d071f43285161a453924cc42ccd5b/recipes/vm.rcp) and #72 for proper support. |
Neat, thank you. I have it [almost working], with this, which grabs the right branch of my fork of the project and builds it with the extra args to hook up bbd. BUT, see below (defun my-vm-build (package &rest _)
(when (string= package "vm")
(let ((default-directory (straight--repos-dir "vm")))
(straight--get-call "autoconf")
(straight--get-call (concat default-directory "/configure")
(concat "--with-other-dirs=" (straight--build-dir "bbdb")))
(straight--get-call "make"))))
(add-hook 'straight-use-package-pre-build-functions #'my-vm-build)
(use-package vm
:straight (vm :type git :host github :repo "emacsmirror/vm"
:fork (:host github
:repo "hartzell/vm"
:branch "wip")
:no-byte-compile t
)
:init
(require 'cl)
:commands (vm)
:config
;; [elided]
) My first attempt, without the I ended up inserting But, there are a bunch of |
On the other hand, I just set up the symlinks for the elc files between the |
You should be able to link the Anything else troubling you? |
I'll play with files. Thanks for all the hints and suggestions. Straight's great! |
For posterity's sake (as if there are any other (defun my-vm-build (package &rest _)
(when (string= package "vm")
(let ((default-directory (straight--repos-dir "vm")))
(straight--get-call "autoconf")
(straight--get-call (concat default-directory "/configure")
(concat "--with-other-dirs=" (straight--build-dir "bbdb")))
(straight--get-call "make")))
)
(add-hook 'straight-use-package-pre-build-functions #'my-vm-build)
(use-package vm
:straight (vm :type git :host github :repo "emacsmirror/vm"
:fork (:host github
:repo "hartzell/vm"
:branch "oldie")
:no-byte-compile t
:files (:defaults "lisp/*.elc")
)
:commands (vm)
:init
(require 'cl)
:config
;; Make VM your default mail agent in Emacs
(setq mail-user-agent 'vm-user-agent)
;; [and etc...]
) |
Ah, so one thing that I've noticed is that the autoconf/config/make cycle seems to get run every time I start up emacs. It'd be nice to use Suggestions (I can put something together and PR it if it seems useful). I could pull the bit that provides the value for |
The fact that the hook is run when the package is unmodified (and hence does not need to be rebuilt) is a bug. Feel free to submit a pull request fixing that. It's an easy change. |
I hesitate to ask, but.... I've been reading my mail in
vm
for a very long time. Its definitely moribund, if not mostly dead, but it works.I've switched nearly all of my emacs set up to use
use-package
(akastraight-use-package
), but I'm still wiring up my vm by hand from a copy of it's 8.2.0b release.While this might be a job for Miracle Max the Wizard ("mostly dead", obligatory Princess Bride ref), I wanted to see what I could do about it.
I was fascinated to discover that straight would happily 'use-package' it, but not in the least surprised that it didn't work.
It turns out that it's mirrored here: https://github.com/emacsmirror/vm and that's what straight's picking up. That tree, however, seems to need to have autotools called on it, then configure (with a bit of extra info to tie it into bbdb in my case).
And then, there are a couple bits that don't actually work; they removed the bundled vcard.el for reasons their commit doesn't specify, but didn't commit it out of the Makefile.in. Nor the vm-vcard.el that was using it..... There's also a use of
&optional &rest ...
that irritates emacs and that I've fixed before by just removing the&optional
).So, at a minimum seems like I should fork the repo, fix those bits, then have straight use my fork (and branch).
For experimenting, I've cloned the repo, run autoconf and then configure. It makes successfully, albeit without the bbdb bits. So in addition to asking about a straight-approved way of calling autoconf and then make, I suppose I should also ask if there's a non-ugly way to get at the path where straight has built bbdb for me?
Thanks
The text was updated successfully, but these errors were encountered: