@mattn_jpさんが"Growl For Linux"を作っておりまして、
Big Sky :: Growl For Linuxを作ってます。
GitHub - mattn/growl-for-linux: Growl Implementation For Linux #growl4linux
mattn/growl-for-linux @ GitHub
Macでこれ動かすことは出来るのかな…?と思って試してみた。
まずはgit cloneしてきて、READMEに書かれている通りautogen.shを実行してみる。
$ git clone git://github.com/mattn/growl-for-linux.git $ cd growl-for-linux $ ./autogen.sh ./autogen.sh: line 3: libtoolize: command not found aclocal: couldn't open directory `m4': No such file or directory autoreconf: aclocal failed with exit status: 1
いきなりコマンドが見つからないそうな。libtoolというのを入れると使えるようになるようなのでインストールしてみる。
以下、$HOME/workをワーキングディレクトリとして諸々ダウンロードしたりビルドしたりするのに使う。インストール先はすべて$HOME/local以下とする。
$ cd $ mkdir work $ cd work
$ curl -O ftp://ftp.gnu.org/gnu/libtool/libtool-2.2.8.tar.gz $ tar zxvf libtool-2.2.8.tar.gz $ cd libtool-2.2.8 $ ./configure --prefix=$HOME/local $ make $ make install
入った。再挑戦
$ export PATH=$HOME/local/bin:$PATH $ cd $HOME/git/growl-for-linux $ ./autogen.sh libtoolize: putting auxiliary files in `.'. libtoolize: copying file `./config.guess' libtoolize: copying file `./config.sub' libtoolize: copying file `./install-sh' libtoolize: copying file `./ltmain.sh' libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'. libtoolize: copying file `m4/libtool.m4' libtoolize: copying file `m4/ltoptions.m4' libtoolize: copying file `m4/ltsugar.m4' libtoolize: copying file `m4/ltversion.m4' libtoolize: copying file `m4/lt~obsolete.m4' configure.ac:1: error: Autoconf version 2.65 or higher is required configure.ac:1: the top level autom4te: /usr/bin/gm4 failed with exit status: 63 aclocal: /usr/bin/autom4te failed with exit status: 63 autoreconf: aclocal failed with exit status: 63
今度はAutoconfのバージョンが低いよ、と怒られた
$ autoconf --version autoconf (GNU Autoconf) 2.61 Copyright (C) 2006 Free Software Foundation, Inc. This is free software. You may redistribute copies of it under the terms of the GNU General Public License <http://www.gnu.org/licenses/gpl.html>. There is NO WARRANTY, to the extent permitted by law. Written by David J. MacKenzie and Akim Demaille.
これも新しいのをインストールする。
$ cd $HOME/work $ curl -O ftp://ftp.gnu.org/gnu/autoconf/autoconf-2.68.tar.gz $ tar zxvf autoconf-2.68.tar.gz $ cd autoconf-2.68 $ ./configure --prefix=$HOME/local $ make $ make install
再々挑戦。
$ cd $HOME/git/growl-for-linux $ ./autogen.sh
エラー無く終了。configureファイルが作られた。早速configureを実行してみると…
$ ./configure --prefix=$HOME/local ... ./configure: line 10680: syntax error near unexpected token `GLIB2,' ./configure: line 10680: `PKG_CHECK_MODULES(GLIB2, glib-2.0)'
ググってみると、どうもマクロ定義が足りないということらしい。原因はautomakeにあるそうなので、これを新しくインストールする。
$ cd $HOME/work $ curl -O ftp://ftp.gnu.org/gnu/automake/automake-1.11.tar.gz $ tar zxvf automake-1.11.tar.gz $ cd automake-1.11 $ ./configure --prefix=$HOME/local $ make $ make install
これでもう一度autogen.shからやり直す。
$ cd $HOME/git/growl-for-linux $ ./autogen.sh $ ./configure --prefix=$HOME/local ... checking for GLIB2... no configure: error: Package requirements (glib-2.0) were not met: No package 'glib-2.0' found Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables GLIB2_CFLAGS and GLIB2_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.
今度は普通にglib-2.0が足りない、という指摘に。言われた通りに入れていく。
$ cd $HOME/work $ curl -O ftp://ftp.gtk.org/pub/glib/2.29/glib-2.29.2.tar.gz $ tar zxvf glib-2.29.2.tar.gz $ cd glib-2.29.2 $ ./configure --prefix=$HOME/local ... configure: error: *** You must have either have gettext support in your C library, or use the *** GNU gettext library. (http://www.gnu.org/software/gettext/gettext.html
…glib-2.0を入れるためにはgettextも必要、と。。
$ cd .. $ curl -O ftp://ftp.gnu.org/gnu/gettext/gettext-0.18.1.tar.gz $ tar zxvf gettext-0.18.1.tar.gz $ cd gettext-0.18.1 $ ./configure --prefix=$HOME/local $ make $ make install $ make -C gettext-tools/intl install $ make -C gettext-tools/src install
ちょっとよく分からないけどglib-2.0を入れる際にはgettext-tools/intlとかgettext-tools/src以下のコマンドとかも必要?なようだったので入れておく。再挑戦
$ cd ../glib-2.29.2 $ CFLAGS="-I$HOME/local/include -L$HOME/local/lib" ./configure --prefix=$HOME/local $ make ... gconvert.c:65:2: error: #error GNU libiconv not in use but included iconv.h is from libiconv make[4]: *** [gconvert.lo] Error 1 make[3]: *** [all-recursive] Error 1 make[2]: *** [all] Error 2 make[1]: *** [all-recursive] Error 1 make: *** [all] Error 2
…今度はlibiconvが足りない、と
$ cd $HOME/work $ curl -O ftp://ftp.gnu.org/gnu/libiconv/libiconv-1.13.tar.gz $ tar zxvf libiconv-1.13.tar.gz $ cd libiconv-1.13 $ ./configure --prefix=$HOME/local $ make $ make install
今度こそどうだ
$ cd ../glib-2.29.2 $ CFLAGS="-I$HOME/local/include -L$HOME/local/lib" ./configure --prefix=$HOME/local $ make $ make install
$ cd $HOME/git/growl-for-linux $ ./configure --prefix=$HOME/local ... checking for GLIB2... yes checking for GTK2... no configure: error: Package requirements (gtk+-2.0) were not met: No package 'gtk+-2.0' found Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables GTK2_CFLAGS and GTK2_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.
glib-2.0はパスしたが今度はgtk+-2.0が足りない。3.1.2?とかがあるみたいだけどとりあえず2.24.4が良さそう
$ cd $HOME/work $ curl -O ftp://ftp.gtk.org/pub/gtk/2.24/gtk+-2.24.4.tar.gz $ tar zxvf gtk+-2.24.4.tar.gz $ cd gtk+-2.24.4 $ ./configure --prefix=$HOME/local configure: error: Package requirements (glib-2.0 >= 2.28.0 atk >= 1.30 pango >= 1.24.0 cairo >= 1.10.0 cairo-gobject >= 1.10.0 gdk-pixbuf-2.0 >= 2.22.0) were not met: No package 'atk' found No package 'pango' found No package 'cairo' found No package 'cairo-gobject' found No package 'gdk-pixbuf-2.0' found Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables BASE_DEPENDENCIES_CFLAGS and BASE_DEPENDENCIES_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.
おぉぉ。。色々足りない…順番にいれてく。
$ cd .. $ curl -O ftp://ftp.gnome.org/pub/gnome/sources/atk/2.0/atk-2.0.0.tar.gz $ tar zxvf atk-2.0.0.tar.gz $ cd atk-2.0.0 $ ./configure --prefix=$HOME/local $ make $ make install
$ cd .. $ curl -O ftp://ftp.gnome.org/pub/gnome/sources/pango/1.28/pango-1.28.4.tar.gz $ tar zxvf pango-1.28.4.tar.gz $ cd pango-1.28.4 $ ./configure --prefix=$HOME/local $ make $ make install
$ cd .. $ curl -O http://cairographics.org/releases/cairo-1.10.2.tar.gz $ tar zxvf cairo-1.10.2.tar.gz $ cd cairo-1.10.2 $ ./configure --prefix=$HOME/local ... checking for cairo's PNG functions feature... configure: WARNING: Could not find libpng in the pkg-config search path checking whether cairo's PNG functions feature could be enabled... no configure: error: recommended PNG functions feature could not be enabled
おうふ。。libpngとな。
$ cd .. $ curl -O ftp://ftp.simplesystems.org/pub/libpng/png/src/libpng-1.5.2.tar.gz $ tar zxvf libpng-1.5.2.tar.gz $ cd libpng-1.5.2 $ ./configure --prefix=$HOME/local $ make $ make install
再チャレンジ
$ cd ../cairo-1.10.2 $ ./configure --prefix=$HOME/local ... checking for cairo's image surface backend feature... checking for pixman... no no checking whether cairo's image surface backend feature could be enabled... no (requires pixman-1 >= 0.18.4 http://cairographics.org/releases/) configure: error: mandatory image surface backend feature could not be enabled
今度はpixmanとやら
$ cd .. $ curl -O http://cairographics.org/releases/pixman-0.20.2.tar.gz $ tar zxvf pixman-0.20.2.tar.gz $ cd pixman-0.20.2 $ ./configure --prefix=$HOME/local $ make $ make install
で入った
$ cd ../cairo-1.10.2 $ ./configure --prefix=$HOME/local $ make $ make install
次
$ cd .. $ curl -O ftp://ftp.gnome.org/pub/gnome/sources/gdk-pixbuf/2.23/gdk-pixbuf-2.23.3.tar.gz $ tar zxvf gdk-pixbuf-2.23.3.tar.gz $ cd gdk-pixbuf-2.23.3 $ ./configure --prefix=$HOME/local ... configure: WARNING: *** TIFF loader will not be built (TIFF library not found) *** configure: error: *** Checks for TIFF loader failed. You can build without it by passing *** --without-libtiff to configure but some programs using GTK+ may *** not work properly
今度はlibtiff...
$ cd .. $ curl -O ftp://ftp.remotesensing.org/pub/libtiff/tiff-3.9.5.tar.gz $ tar zxvf tiff-3.9.5.tar.gz $ cd tiff-3.9.5 $ ./configure --prefix=$HOME/local $ make $ make install $ cd ../gdk-pixbuf-2.23.3 $ CFLAGS="-I$HOME/local/include -L$HOME/local/lib" ./configure --prefix=$HOME/local $ make $ make install
入った。これでgtkどうよ?
$ cd ../gtk+-2.24.4 $ ./configure --prefix=$HOME/local ... configure: error: *** fontconfig (http://www.fontconfig.org) is required by the X11 backend.
fontconfigを入れろ、と…X11を使わなければ要らない…? よく分からないのでとりあえず入れる
$ cd .. $ curl -O http://www.freedesktop.org/software/fontconfig/release/fontconfig-2.8.0.tar.gz $ tar zxvf fontconfig-2.8.0.tar.gz $ cd fontconfig-2.8.0 $ ./configure --prefix=$HOME/local $ make $ make install
で再挑戦
$ cd ../gtk+-2.24.4 $ ./configure --prefix=$HOME/local ... checking Pango flags... configure: error: *** Pango not found. Pango built with Cairo support is required *** to build GTK+. See http://www.pango.org for Pango information.
どうやらcairo入れた後にpangoを入れるべきだったらしい。ビルドしなおしてみる。
$ cd ../pango-1.28.4 $ make uninstall $ ./configure --prefix=$HOME/local ... configuration: backends: Cairo X $ make $ make install
おk。
$ cd ../gtk+-2.24.4 $ ./configure --prefix=$HOME/local $ make ...
なんか上手くいかない。configureが上手くいっていない? pangoft2が無いとかメッセージでてた。freetypeを入れ直してpangoをもう一度。
$ cd .. $ curl -O ftp://mirror.ovh.net/gentoo-distfiles/distfiles/freetype-2.4.4.tar.bz2 $ tar jxvf freetype-2.4.4.tar.bz2 $ ./configure --prefix=$HOME/local $ make $ make install $ cd ../pango-1.28.4 $ make uninstall $ ./configure --prefix=$HOME/local ... configuration: backends: Cairo FreeType X $ make $ make install
これで大丈夫そう
$ cd ../gtk+-2.24.4 $ ./configure --prefix=$HOME/local $ make $ make install
ようやくgtk+が入った。久々にgrowl-for-linuxに戻る。
$ cd $HOME/git/growl-for-linux $ ./configure --prefix=$HOME/local ... checking for GLIB2... yes checking for GTK2... yes checking for LIBCURL... no configure: error: Package requirements (libcurl) were not met: No package 'libcurl' found Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables LIBCURL_CFLAGS and LIBCURL_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.
次はlibcurlだ
$ cd $HOME/work $ curl -O http://curl.haxx.se/download/curl-7.21.6.tar.gz $ tar zxvf curl-7.21.6.tar.gz $ cd curl-7.21.6 $ ./configure --prefix=$HOME/local $ make $ make install
さぁもう一度
$ cd $HOME/git/growl-for-linux $ ./configure --prefix=$HOME/local ... checking for GLIB2... yes checking for GTK2... yes checking for LIBCURL... yes checking for LIBXML2... no configure: error: Package requirements (libxml-2.0) were not met: No package 'libxml-2.0' found Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables LIBXML2_CFLAGS and LIBXML2_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.
libxml2も入れる!
$ cd $HOME/work $ curl -O ftp://xmlsoft.org/libxml2/libxml2-2.7.8.tar.gz $ tar zxvf libxml2-2.7.8.tar.gz $ cd libxml2-2.7.8 $ ./configure --prefix=$HOME/local $ make $ make install
さぁ次はなんだ
$ cd $HOME/git/growl-for-linux $ ./configure --prefix=$HOME/local ... checking for GLIB2... yes checking for GTK2... yes checking for LIBCURL... yes checking for LIBXML2... yes checking for OPENSSL... no configure: error: Package requirements (openssl) were not met: No package 'openssl' found Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables OPENSSL_CFLAGS and OPENSSL_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.
opensslか そういえばこのへんはREADMEにもrequireって書いてあったな…
$ cd $HOME/work $ curl -O http://www.openssl.org/source/openssl-1.0.0d.tar.gz $ tar zxvf openssl-1.0.0d.tar.gz $ cd openssl-1.0.0d $ ./Configure darwin64-x86_64-cc --prefix=$HOME/local $ make $ make install
となると次は
$ cd $HOME/git/growl-for-linux $ ./configure --prefix=$HOME/local ... checking for GLIB2... yes checking for GTK2... yes checking for LIBCURL... yes checking for LIBXML2... yes checking for OPENSSL... yes checking for SQLITE3... no configure: error: Package requirements (sqlite3) were not met: No package 'sqlite3' found Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables SQLITE3_CFLAGS and SQLITE3_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.
ですよね
$ cd $HOME/work $ curl -O http://www.sqlite.org/sqlite-autoconf-3070602.tar.gz $ tar zxvf sqlite-autoconf-3070602.tar.gz $ cd sqlite-autoconf-3070602 $ ./configure --prefix=$HOME/local $ make $ make install
だいぶ慣れてきた
$ cd $HOME/git/growl-for-linux $ ./configure --prefix=$HOME/local ... checking for GLIB2... yes checking for GTK2... yes checking for LIBCURL... yes checking for LIBXML2... yes checking for OPENSSL... yes checking for SQLITE3... yes checking for DBUSGLIB1... no configure: error: Package requirements (dbus-glib-1) were not met: No package 'dbus-glib-1' found Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables DBUSGLIB1_CFLAGS and DBUSGLIB1_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.
何かよく分からないけどとにかく入れる
$ curl -O http://dbus.freedesktop.org/releases/dbus-glib/dbus-glib-0.92.tar.gz $ tar zxvf dbus-glib-0.92.tar.gz $ cd dbus-glib-0.92 $ CFLAGS="-I$HOME/local/include -L$HOME/local/lib" ./configure --prefix=$HOME/local ... checking for DBUS... no configure: error: DBus development libraries not found
先にDBusを入れないといけない
$ curl -O http://dbus.freedesktop.org/releases/dbus/dbus-1.4.8.tar.gz $ tar zxvf dbus-1.4.8.tar.gz $ cd dbus-1.4.8 $ ./configure --prefix=$HOME/local --disable-launchd $ make $ make install
launchdがあるとroot権限ないとinstall失敗するのでdisableで。再挑戦
$ cd ../dbus-glib-0.92 $ CFLAGS="-I$HOME/local/include -L$HOME/local/lib" ./configure --prefix=$HOME/local $ make $ make install
入った。これでついにgrowl-for-linuxのconfigureが出来るようになるようだ。
$ cd $HOME/git/growl-for-linux $ ./configure --prefix=$HOME/local
で、make & install
$ make $ make install ... desktop-file-install --dir=//Users/hoge/local/share/applications data/gol.desktop make[2]: desktop-file-install: No such file or directory make[2]: *** [install-data-local] Error 1 make[1]: *** [install-am] Error 2 make: *** [install-recursive] Error 1
makeは成功するがinstallする際にdesktop-file-installが無い、とコケる。
$ cd $HOME/work $ curl -O http://www.freedesktop.org/software/desktop-file-utils/releases/desktop-file-utils-0.18.tar.bz2 $ tar jxvf desktop-file-utils-0.18.tar.bz2 $ cd desktop-file-utils-0.18 $ CFLAGS="-I$HOME/local/include -L$HOME/local/lib" ./configure --prefix=$HOME/local $ make $ make install
もう一度install
$ cd $HOME/git/growl-for-linux $ make install
成功!
試しに実行してみる。
$ cd $ gol (process:83157): Gtk-WARNING **: Locale not supported by C library. Using the fallback 'C' locale. (gol:83157): Gtk-WARNING **: cannot open display:
むむ?Locale?
$ LC_ALL="ja_JP.UTF-8" gol (gol:83158): Gtk-WARNING **: cannot open display:
うーん コマンド実行までは出来るけどGtkが上手く動いていない…?
GTK+ Download: Mac OS Xというのもあるみたいだし、こういうのを使うべきなのかもしれない。(素直にMacのGrowlを使うべきなんだろうけど)
とりあえず今日はここまで。