-
-
Save favadi/18438172892bc4178b27 to your computer and use it in GitHub Desktop.
#!/bin/bash | |
# Build latest version of Emacs, version management with stow | |
# OS: Ubuntu 14.04 LTS | |
# version: 24.5 | |
# Toolkit: lucid | |
# Warning, use updated version of this script in: https://github.com/favadi/build-emacs | |
set -e | |
readonly version="24.5" | |
# install dependencies | |
sudo apt-get install -y stow build-essential libx11-dev xaw3dg-dev \ | |
libjpeg-dev libpng12-dev libgif-dev libtiff4-dev libncurses5-dev \ | |
libxft-dev librsvg2-dev libmagickcore-dev libmagick++-dev \ | |
libxml2-dev libgpm-dev libghc-gconf-dev libotf-dev libm17n-dev \ | |
libgnutls-dev | |
# download source package | |
if [[ ! -d emacs-"$version" ]]; then | |
wget http://ftp.gnu.org/gnu/emacs/emacs-"$version".tar.xz | |
tar xvf emacs-"$version".tar.xz | |
fi | |
# buil and install | |
sudo mkdir /usr/local/stow | |
cd emacs-"$version" | |
./configure \ | |
--with-xft \ | |
--with-x-toolkit=lucid | |
make | |
sudo make install prefix=/usr/local/stow/emacs-"$version" | |
cd /usr/local/stow | |
sudo stow emacs-"$version" |
Thanks for sharing this... It seemed to work ok for me but the frame of the emacs 24.5 window is grey (and very thick/ugly) instead of black. I take it that's not normal? Here's the config.log. Any suggestions? I'm running vanilla Ubuntu 14.04.
@dowcet it is expected because we use lucid toolkit.
It works. Thanks a lot.
I suggest you change one line
sudo mkdir -p /usr/local/stow
to make it a bit more robust.
Agree with @ozdigennaro. In case someone has installed emacs before already, the script will failed at creating /usr/local/stow
Excellent!!!! Thank you!
Hey - I think the file needs to be renamed to build-emacs as it's a bash not sh file
Hi Thanks for sharing. However, this is version is not what I need. How should I uninstall this, after I installed using your script?
Basically, I have the same question in
http://askubuntu.com/questions/754251/uninstall-packages-with-stow
@xiaohl0913 I answered this question here: favadi/build-emacs#5
Hi, trying to compile emacs 25.1 on Ubuntu 16.04. The installed packages gives me a lot, except for:
Should Emacs use a relocating allocator for buffers? no
Should Emacs use mmap(2) for buffer allocation? no
Does Emacs use cairo? no
Does Emacs have dynamic modules support? no
Does Emacs support Xwidgets (requires gtk3)? no
Especially the last one would be useful to have, I think. For some reason the mouse still behaves a little weirdly inside the emacs window.
For Ubuntu 16.04 and Emacs 25.1, suggesting to add:
sudo apt-get install libgtk-3-dev libwebkitgtk-3.0-dev
and to configure with
./configure --with-cairo --with-xwidgets --with-x-toolkit=gtk3
Otherwise the menus seem not to work properly.
Emacs 25 now has dynamic module support. from Emacs ./configure --help
--with-modules compile with dynamic modules support
for more information about this feature cf. http://diobla.info/blog-archive/modules-tut.html
EDIT:
Just saw the message at the top of the script pointing me to the github repo where the newest script resides! Forget the items below.
===
Hello. Thanks for the script.
On a fresh install of Ubuntu 16.04.3 LTS
(with apt-get update
, apt-get upgrade
, apt-get autoremove
). First stop was your script. Thanks to your commentors, I changed the following to get things working:
- Removed
libghc-gconf-dev
as it does not appear to be a dependency in16.04.3
- Added
sudo mkdir -p /usr/local/stow
per @ozdigennaro
I'm not adept enough at scripting to pose a change, but hope this helps others.
@favadi While I can see the value in testing with travis against vanilla/fresh environments, I can also see that this is not the case under which folks would want to install emacs-via-stow. Are you expecting this script to be run only on fresh-installed systems?
Also, in the revisions of the above script, I don't see any changes since April. (?)