@peccul is peccu

(love peccu '(emacs lisp cat outdoor bicycle mac linux coffee))

= emacs24をGentoo/Prefix Mac OS Xでいれてみた

[2010-08-11 15:19:40]
>>>[gentoo]
>>>[osx]
>>>[emacs]

偉大なるなおたさんのbuild.logの読み解き方 #0 「sys-apps/groff-1.20.1-r3」 - Emacs ひきこもり生活に影響されて私もあげてみます.
grepしたりそんな高度なことはしてませんよ笑


まずemacs24のパッケージ名を探しますね

% emerge --search emacs
Searching...    
[ Results for search key : emacs ]
[ Applications found : 20 ]

*  app-accessibility/emacspeak [ Masked ]
      Latest version available: 9999
      Latest version installed: [ Not Installed ]
      Size of files: 0 kB
      Homepage:      http://emacspeak.sourceforge.net/
      Description:   the emacspeak audio desktop
      License:       BSD GPL-2

*  app-editors/emacs
      Latest version available: 23.2
      Latest version installed: [ Not Installed ]
      Size of files: 37,478 kB
      Homepage:      http://www.gnu.org/software/emacs/
      Description:   The extensible, customizable, self-documenting real-time display editor
      License:       GPL-3 FDL-1.3 BSD as-is MIT W3C unicode

*  app-editors/emacs-vcs [ Masked ]
      Latest version available: 24.0.9999
      Latest version installed: [ Not Installed ]
      Size of files: 0 kB
      Homepage:      http://www.gnu.org/software/emacs/
      Description:   The extensible, customizable, self-documenting real-time display editor
      License:       GPL-3 FDL-1.3 BSD as-is MIT W3C unicode

*  virtual/emacs
      Latest version available: 23
      Latest version installed: [ Not Installed ]
      Size of files: 0 kB
      Homepage:      
      Description:   Virtual for GNU Emacs
      License:       
...いっぱい省略

24なのはemacs-vcsだなと.

% emerge -uDNvaj emacs-vcs

These are the packages that would be merged, in order:

Calculating dependencies... done!

!!! All ebuilds that could satisfy "app-editors/emacs-vcs" have been masked.
!!! One of the following masked packages is required to complete your request:
- app-editors/emacs-vcs-24.0.9999 (masked by: package.mask)
/Users/peccu/Gentoo/usr/portage/profiles/package.mask:
# Ulrich Mueller <ulm@gentoo.org> (10 Mar 2010)
# Emacs live ebuilds. Use at your own risk.
...略

マスクされてますねー

% autounmask app-editors/emacs-vcs

 autounmask version 0.27 (using PortageXS-0.02.09 and portage-2.2.01.15478)

 * Using repositories:
     /Users/peccu/Gentoo/usr/portage
     /Users/peccu/Gentoo/var/lib/layman/naota-prefix

 * The given category/package-version does not seem to exist. Listing existing versions:

 * gentoo_prefix (/Users/peccu/Gentoo/usr/portage):
     app-editors/emacs-vcs-24.0.9999

 * naota-prefix (/Users/peccu/Gentoo/var/lib/layman/naota-prefix):
     app-editors/emacs-vcs-24.0.9999

 * Please pick one of the versions given above and try again.

% autounmask app-editors/emacs-vcs-24.0.9999
...略

バージョン指定してなかったから指定して,unmask.あとはemergeするだけ.

と,思いきや

% emerge -uDNvaj emacs-vcs          

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild  N    ] net-libs/liblockfile-1.08  30 kB [0]
[ebuild  N    ] app-emacs/emacs-common-gentoo-1.2-r1  USE="-X -emacs22icons" 46 kB [0]
[ebuild  N    ] app-admin/eselect-ctags-1.13  8 kB [0]
[ebuild  N    ] app-admin/eselect-emacs-1.13  0 kB [0]
[ebuild  N    ] app-editors/emacs-23.2  USE="aqua xpm -X -Xaw3d (-alsa) -dbus -gconf -gif (-gpm) -gtk -gzip-el (-hesiod) -jpeg -kerberos (-m17n-lib) -motif -png -sound -source -svg -tiff -toolkit-scroll-bars -xft" 37,479 kB [0]
[ebuild  N    ] virtual/emacs-23  0 kB [0]
[ebuild  N    ] dev-python/setuptools-0.6.14  275 kB [0]
[ebuild  N    ] dev-python/pycrypto-2.1.0  USE="gmp -doc" 260 kB [0]
[ebuild  N    ] dev-python/paramiko-1.7.6  USE="-doc -examples" 824 kB [0]
[ebuild  N    ] dev-vcs/bzr-2.1.2  USE="sftp -bash-completion -curl -doc -emacs -test" 6,665 kB [0]
[ebuild  N    ] app-editors/emacs-vcs-24.0.9999  USE="xpm -X -Xaw3d (-alsa) -dbus -gconf -gif (-gpm) -gtk -gzip-el (-hesiod) -jpeg -kerberos (-m17n-lib) -motif -ns -png -sound -source -svg -tiff -toolkit-scroll-bars -xft" 0 kB [1]

Total: 11 packages (11 new), Size of downloads: 45,584 kB
Portage tree and overlays:
 [0] /Users/peccu/Gentoo/usr/portage
 [1] /Users/peccu/Gentoo/var/lib/layman/naota-prefix

Would you like to merge these packages? [Yes/No] n

Quitting.

USEフラグでdbusが抜けてるんですね.あと画像系も.aquaが入ってるからターミナルから出てくれることを期待しつつ(今のところターミナルでしか動いてない.設定なのか呼び出し方なのか...)
dbusいい感じって聞いてたのでいれたいね.

というわけでdbusつけてemergeですわ.

% USE="dbus" emerge -uDNvaj emacs-vcs 
...略
 * CPV:  app-editors/emacs-vcs-24.0.9999
 * REPO: naota-prefix
 * USE:  dbus elibc_Darwin kernel_Darwin prefix userland_GNU x86-macos xpm
>>> Unpacking source...
 * bzr fetch start -->
 *    repository: http://bzr.savannah.gnu.org/r/emacs/trunk/ => /Users/peccu/Gentoo/usr/portage/distfiles/bzr-src/emacs-trunk
 * exporting ...KB/s | Build phase:Apply phase:adding file 50/53                                                                                                                  
>>> Source unpacked in /Users/peccu/Gentoo/var/tmp/portage/app-editors/emacs-vcs-24.0.9999/work
>>> Preparing source in /Users/peccu/Gentoo/var/tmp/portage/app-editors/emacs-vcs-24.0.9999/work/emacs-vcs-24.0.9999 ...

 * Emacs branch: trunk
 * Emacs version number: 24.0.50

 * Running eautoreconf in '/Users/peccu/Gentoo/var/tmp/portage/app-editors/emacs-vcs-24.0.9999/work/emacs-vcs-24.0.9999' ...
 * Running aclocal -I /Users/peccu/Gentoo/usr/share/aclocal ...          [ !! ]

 * Failed Running aclocal !
 * 
 * Include in your bugreport the contents of:
 * 
 *   /Users/peccu/Gentoo/var/tmp/portage/app-editors/emacs-vcs-24.0.9999/temp/aclocal.out

 * ERROR: app-editors/emacs-vcs-24.0.9999 failed:
 *   Failed Running aclocal !
 * 
 * Call stack:
 *     ebuild.sh, line   53:  Called call-ebuildshell 'src_prepare'
 *   environment, line  757:  Called src_prepare
 *   environment, line 3770:  Called eautoreconf
 *   environment, line 1229:  Called eaclocal
 *   environment, line 1162:  Called autotools_run_tool 'aclocal' '-I' '/Users/peccu/Gentoo/usr/share/aclocal'
 *   environment, line  551:  Called die
 * The specific snippet of code:
 *           die "Failed Running $1 !";
 * 
 * If you need support, post the output of 'emerge --info =app-editors/emacs-vcs-24.0.9999',
 * the complete build log and the output of 'emerge -pqv =app-editors/emacs-vcs-24.0.9999'.
 * This ebuild is from an overlay named 'naota-prefix': '/Users/peccu/Gentoo/var/lib/layman/naota-prefix/'
 * The complete build log is located at '/Users/peccu/Gentoo/var/tmp/portage/app-editors/emacs-vcs-24.0.9999/temp/build.log'.
 * The ebuild environment file is located at '/Users/peccu/Gentoo/var/tmp/portage/app-editors/emacs-vcs-24.0.9999/temp/environment'.
 * S: '/Users/peccu/Gentoo/var/tmp/portage/app-editors/emacs-vcs-24.0.9999/work/emacs-vcs-24.0.9999'
...略

とまぁaclocalで失敗してますね

% cat /Users/peccu/Gentoo/var/tmp/portage/app-editors/emacs-vcs-24.0.9999/temp/aclocal.out
***** aclocal *****
***** PWD: /Users/peccu/Gentoo/var/tmp/portage/app-editors/emacs-vcs-24.0.9999/work/emacs-vcs-24.0.9999
***** aclocal -I /Users/peccu/Gentoo/usr/share/aclocal

configure.in:26: error: Autoconf version 2.66 or higher is required
configure.in:26: the top level
autom4te-2.65: /Users/peccu/Gentoo/usr/bin/m4 failed with exit status: 63
aclocal-1.11: autom4te failed with exit status: 63

% autoconf --version
autoconf (GNU Autoconf) 2.65
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+/Autoconf: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>, <http://gnu.org/licenses/exceptions.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by David J. MacKenzie and Akim Demaille.

% which autoconf    
/Users/peccu/Gentoo/usr/bin/autoconf

autoconfのバージョンが2.66以上を要求してるけど,手元では2.65やった.(こういう依存関係を解決してくれるのがportageだと思ってたんだけどなぁ)
そんなこと言わずに2.66を入れてみるか.と

% emerge -uDNvaj "=autoconf-2.66"
These are the packages that would be merged, in order:
Calculating dependencies... done!
emerge: there are no ebuilds to satisfy "=sys-devel/autoconf-2.66".

2.66が無いと.で,sys-devel/autoconfでぐぐったら,2.66は飛んで2.67やった

% emerge -uDNvaj "=autoconf-2.67"
% autounmask !!:$
% autounmask "=sys-devel/autoconf-2.67"
% emerge -uDNvaj "=autoconf-2.67"
% USE="dbus" emerge -uDNvaj emacs-vcs

これではいりました.途中の!!:$は直前のコマンド(!!)の最後の引数(:$)って意味ですよ.最近知ってうれしいのです.
で,autoconfではsys-devel/もいると怒られたのでautoconfし直してます

% hash -r

でパス内のコマンドを理ハッシュしたら,emacsで補完するとemacs-23,emacs-24とか,それぞれのemacsclientも出てくるようになりましたとさ.

ただ,ぼくにはまだemacs24使えないです.ターミナルの中じゃちょっとCarbonEmacsからは移行できないですorz