Skip to content

Instantly share code, notes, and snippets.

@kjunichi
Last active February 16, 2016 05:18
Show Gist options
  • Save kjunichi/200b960559a757e829be to your computer and use it in GitHub Desktop.
Save kjunichi/200b960559a757e829be to your computer and use it in GitHub Desktop.
MRuby::Build.new do |conf|
# load specific toolchain settings
# Gets set by the VS command prompts.
if ENV['VisualStudioVersion'] || ENV['VSINSTALLDIR']
toolchain :visualcpp
else
toolchain :gcc
end
enable_debug
# Use mrbgems
# conf.gem :github => 'masuidrive/mrbgems-example', :checksum_hash => '76518e8aecd131d047378448ac8055fa29d974a9'
# conf.gem :git => 'git@github.com:masuidrive/mrbgems-example.git', :branch => 'master', :options => '-v'
#conf.gem :github => 'kjunichi/mruby-mrmagick'
# include the default GEMs
conf.gembox 'default'
end
MRuby::CrossBuild.new('i686-w64-migw') do |conf|
toolchain :gcc
conf.cc do |cc|
cc.command = "/usr/bin/i686-w64-mingw32-gcc"
end
conf.linker do |linker|
linker.command = "/usr/bin/i686-w64-mingw32-gcc"
end
conf.archiver do |archiver|
archiver.command = "/usr/bin/i686-w64-mingw32-ar"
end
conf.gem :github => 'kjunichi/mruby-mrmagick'
conf.gembox 'default'
end
if build.kind_of?(MRuby::CrossBuild) && %w(x86_64-w64-mingw32 i686-w64-mingw32).include?(build.host_target)
spec.linker.libraries += ['ws2_32']
end

libjpeg

jpeg-6b

明示的にstaticオプション付けると存在しない./libtoolを使おうとして失敗する。 staticオプションの指定はせずにビルドすれば、.aも作成される。

zlib

libpng

http://downloads.sourceforge.net/project/libpng/libpng16/1.6.20rc02/libpng-1.6.20rc02.tar.xz

ImageMagick本体

入手

git clone -b ImageMagick-6 --depth 1 https://github.com/ImageMagick/ImageMagick.git
LIBS="/usr/i686-w64-mingw32/lib/libws2_32.a /usr/i686-w64-mingw32/lib/libmsvcr110.a" ./configure --enable-static=yes --enable-shared=no --host=i686-w64-mingw32 --prefix=/usr/i686-w64-mingw32 --without-perl --disable-docs
make -j4

mrmagick

PKG_CONFIG_PATH=/usr/i686-w64-mingw32/lib/pkgconfig PATH=/usr/i686-w64-mingw32/bin:$PATH rake
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment