Sha256: 2147b276549468cce3174897a00ea24c14337fc443309c4922fb5b0fd64066e0
Contents?: true
Size: 1004 Bytes
Versions: 1
Compression:
Stored size: 1004 Bytes
Contents
require 'pathname' dir = Pathname.new File.expand_path(File.dirname(__FILE__)) gem_dir = dir.join("..") bin_dir = gem_dir.join("bin") pdf2json_dir = gem_dir.join("pdf2json-0.52-source") Dir.chdir(pdf2json_dir) do system "./configure --prefix=#{gem_dir} --bindir=#{bin_dir} && make clean && make && make install" end # from https://github.com/pwnall/zerg_support/blob/master/lib/zerg_support/gems.rb # tricks rubygems into believeing that the extension compiled and worked out module Zerg module Support module Gems def self.emulate_extension_install(extension_name) File.open('Makefile', 'w') { |f| f.write "all:\n\ninstall:\n\n" } File.open('make', 'w') do |f| f.write '#!/bin/sh' f.chmod f.stat.mode | 0111 end File.open(extension_name + '.so', 'w') {} File.open(extension_name + '.dll', 'w') {} File.open('nmake.bat', 'w') { |f| } end end end end Zerg::Support::Gems.emulate_extension_install('pdf2json')
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
pdf2json-0.2.0 | ext/extconf.rb |