Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@myokoym
Last active December 22, 2015 16:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save myokoym/6497033 to your computer and use it in GitHub Desktop.
Save myokoym/6497033 to your computer and use it in GitHub Desktop.
Ruby-GNOME2のクロスコンパイルに必要なパッケージまとめ(作成中のため、過不足あり)

(作成中のため、過不足あり)

バイブル

Ruby

  • 2.0.0を使う。
    • Ruby 1.9.3バンドルのRubyGemsが古くて最新のrake-compilerだと使えないため。
    • (1.9.3バンドルのRubyGemsをアップデートしてもよい)

RubyGems

  • rake-compiler
  • mechanize
  • yard
  • bundler
  • packnga

apt

local

  • ディレクトリ構成の例
    • /home/user/work/ruby/ruby-gnome2.win32
    • /home/user/work/ruby/rcairo.win32
  • 上記2ディレクトリでbundle install
  • rcairoのroot(/home/user/work/ruby/rcairo.win32など)でrake windows:build
    • こっちかも RUBYLIB="$HOME/work/ruby/pkg-config/lib" rake RUBY_CC_VERSION=1.9.3:2.0.0 cross clean compile native

Wineの設定

pkg-config gem

workaround

cd /work/ruby
git clone https://github.com/ruby-gnome2/pkg-config

rake-compiler

1.9.3は1.9.3じゃないとビルドできない?

rbenv global 1.9.3-p484
gem update --system
gem i rake-compiler
rake-compiler cross-ruby HOST=i686-w64-mingw32 VERSION=1.9.3-p484 EXTS=--without-extensions
rake-compiler cross-ruby HOST=x86_64-w64-mingw32 VERSION=1.9.3-p484 EXTS=--without-extensions
rbenv global 2.0.0-p353
rake-compiler cross-ruby HOST=i686-w64-mingw32 VERSION=2.0.0-p353 EXTS=--without-extensions
rake-compiler cross-ruby HOST=i686-w64-mingw32 VERSION=2.1.0-preview2 EXTS=--without-extensions
rake-compiler cross-ruby HOST=x86_64-w64-mingw32 VERSION=2.0.0-p353 EXTS=--without-extensions
rake-compiler cross-ruby HOST=x86_64-w64-mingw32 VERSION=2.1.0-preview2 EXTS=--without-extensions

実行

  • cd /work/ruby/ruby-gnome2.win32
  • rake gem:win32:download
    • TODO: rake 10以降だと、clutterのタスクが失敗する?(あれ、しないかも)
  • RUBYLIB="$HOME/work/ruby/pkg-config/lib" rake gem:win32:clean gem:win32:build
    • オプションで並列実行が可能(MAKE_N_JOBS=8のように指定する)
    • glib2のビルド後にrake win32:gettext:header:fixを手動で実行する必要がありそう
      • TODO: 自動化できる?

参考

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment