macportsでvariantsを変更する方法のメモ
macportsでインストールしたパッケージのvariantsを後で変更したくなることがありますが、そのような場合には --enforce-variantsオプションが利用できます。
例)
pre>>
% sudo port upgrade --enforce-variants git-core +svn
<<--
macportsでインストールしたパッケージのvariantsを後で変更したくなることがありますが、そのような場合には --enforce-variantsオプションが利用できます。
例)
pre>>
% sudo port upgrade --enforce-variants git-core +svn
<<--
めもめも。
MacPortsでステキなUNIXツールをインストール
http://d.hatena.ne.jp/hakobe932/20061208/1165646618
###portを最新に+ソフトウェア一覧を更新。
shell>>
sudo port -d selfupdate
sudo port -d sync
<<--
###一覧
shell>>
port installed
<<--
###インストール
shell>>
sudo port -v install php5 +apache2
<<--
via http://javaflavor.cocolog-nifty.com/blog/2007/07/macportsapache2_43a4.html
*「ruby +mactk」と「ruby +mactk +thread_hooks」は別物として認識されるので、「ruby +mactk」をインストールした後に「thread_hooks」を追加する場合、「ruby +mactk」をアンインストールまたは無効化する必要がある。
http://oamaxa2.u-abel.net/wordpress/?p=30
メモ:LimeChatを入れようとしたのだけど、なぜかうまく動かず:
stack level too deep(SystemStackError) のエラー
LimeChatは--enable-sharedオプションで入れたrubyでないとダメだということだが、MacPortsで入れたrubyの場合だと、+universalで入れないといけないということらしい(下記)
You need to build the ruby interpreter as an universal build when using it with RubyCocoa. Try +universal variant.
http://groups.google.com/group/limechatosx/browse_thread/thread/4c814a119a556be7
###MacPortsの+universal variantについて
Building with the +universal variant changes this to always include both Intel and PowerPC code
###Rubyの--enable-sharedオプションについて
--enable-sharedというのはrubyコマンドのほとんどをダイナミックリンクライブラリ(libruby.so)として外に出すオプションだ。必須でないプラットホームでも --enable-shared を付けておくと eruby や mod_ruby を作るときにダイナミックリンクになるので便利である (でなければスタティックリンクになる)。
MacPortsを利用してインストールしたrubyのインストールオプションを知りたくなったので、調べました。
###port installed rubyで確認
下記の場合、thread_hooksがvariantsとして指定されインストールされている:
shell>>
% port installed ruby
The following ports are currently installed:
ruby @1.8.7-p72_2+thread_hooks (active)
<<--
###MacPortsのrubyで指定可能なインストールオプション:variants
portでインストールされるrubyには下記のvariantsがあります:
shell>>
% port variants ruby
ruby has the variants:
universal
darwin
darwin_7
tk: enable tk support
mactk: enable MacTk (Tk.framework without X11) support
thread_hooks: apply Apple's thread_hooks patch
no_doc: do not install rdoc documents
<<--
また後でvariantsを追加してインストール場合は、別のrubyとみなされるようなので、deactivateかuninstallする必要があるようです:
* As「ruby +mactk」and「ruby +mactk +thread_hooks」are recognized as another, if you add to「thread_hooks」after installing「ruby +mactk」, you need to uninstall or be deactivate「ruby +mactk」.