SUZZ Blog

主にアーケード、レトロゲームに関するブログ

MacPorts で meld をインストール

2011年05月06日 20時57分08秒 | PC

meld_mac

 

$ sudo port install meld

で、インストールできると思いきや、一筋縄では行かず。。。

 

  • policykit でビルドエラー
    不具合報告を参考に Portfile を修正することで回避。
    https://trac.macports.org/ticket/29279

    /opt/local/var/macports/sources/rsync.macports.org/release/ports/security/policykit/Portfile
    (先頭の数字は行番号)

    27 post-patch      {
    28                     if {${os.major}
    29                         reinplace "s|security/pam|pam/pam|" ${worksrcpath}/configure \
    30                             ${worksrcpath}/src/polkitagent/polkitagenthelper-pam.c \
    31                             ${worksrcpath}/src/programs/pkexec.c
    32
    33                         reinplace "s|fdatasync|fsync|" ${worksrcpath}/src/polkitagent/polkitagenthelperprivate.c
    34                     }
    35                 }

  • atlas で configure エラー
    INSTALL.TXT によると、

    ATLAS config tries to detect if CPU throttling is enabled, but it may not
    always detect it, and sometimes may detect it after you have disabled it.
    In the latter case, to force the configure to continue regardless of the
    results of the CPU throttling probe, pass this flag to configure:
       -Si cputhrchk 0

    とのことなので、Portfile を編集して configure に引数を追加。

    /opt/local/var/macports/sources/rsync.macports.org/release/ports/math/atlas/Portfile
    (先頭の数字は行番号)

    108 if {${build_arch} == "ppc" || ${build_arch} == "ppc64"} {
    109         configure.args-append   -t 0
    -Si cputhrchk 0
    110 }

  • meld 起動時にエラー
    $ meld &
    [1] 44648
    $ Xlib:  extension "RANDR" missing on display "/tmp/launch-Gl7Jle/:0".
    Dynamic session lookup supported but failed: launchd did not provide a socket path, verify that org.freedesktop.dbus-session.plist is loaded!
    Traceback (most recent call last):
      File "/opt/local/bin/meld", line 123, in
        main()
      File "/opt/local/bin/meld", line 115, in main
        app = meld.meldapp.MeldApp()
      File "/opt/local/lib/meld/meld/meldapp.py", line 136, in __init__
        self.prefs = preferences.MeldPreferences()
      File "/opt/local/lib/meld/meld/preferences.py", line 289, in __init__
        super(MeldPreferences, self).__init__("/apps/meld", self.defaults)
      File "/opt/local/lib/meld/meld/util/prefs.py", line 92, in __init__
        self._gconf.add_dir(rootkey, gconf.CLIENT_PRELOAD_NONE)
    glib.GError: 設定サーバ (gconfd) に接続できませんでした: いくつか考えられる原因として、ORBit の TCP/IP ネットワークを有効にしていない、あるいはお使いのシステムで古い NFS のロックがクラッシュを引き起こしたことが考えられます。これに関連する情報については
    http://projects.gnome.org/gconf/ を参照して下さい: (詳細 -  1: セッションへの接続に失敗しました: Not enough memory)
    [1]+  Exit 1                  meld

    dbus 関連のエラーのようで、以下のURL を参考に呪文を唱えたところ、スーパーユーザーでは動作。
    http://kzar.co.uk/blog/view/meld-darwinport-problem

      $ sudo launchctl load -w /Library/LaunchDaemons/org.freedesktop.dbus-system.plist
      $ sudo launchctl load -w /Library/LaunchAgents/org.freedesktop.dbus-session.plist
      $ sudo meld &

    以下のスレッドにあった呪文を唱えたところ、一般ユーザーでも動作。
    http://lists.macosforge.org/pipermail/macports-users/2011-January/023218.html
    http://lists.macosforge.org/pipermail/macports-users/2011-January/023223.html

    $ launchctl load -w /Library/LaunchAgents/org.freedesktop.dbus-session.plist
    $ meld &

正直、理由はよくわからない・・・

dbus のインストール時に本件に関する情報が出力されていたようなのだが、 port に -d スイッチをつけて、デバッグメッセージを出力していたため、気がつかなかったようだ。

とりあえず、動くようになったので満足。