summaryrefslogtreecommitdiff
path: root/ext/io
diff options
context:
space:
mode:
Diffstat (limited to 'ext/io')
-rwxr-xr-xext/io/console/buildgem.sh5
-rw-r--r--ext/io/console/extconf.rb3
-rw-r--r--ext/io/console/io-console.gemspec4
3 files changed, 9 insertions, 3 deletions
diff --git a/ext/io/console/buildgem.sh b/ext/io/console/buildgem.sh
new file mode 100755
index 0000000..65fe545
--- /dev/null
+++ b/ext/io/console/buildgem.sh
@@ -0,0 +1,5 @@
+#!/bin/sh -e
+cd ${0%/*}
+trap "mv depend.$$ depend" 0 2
+${RUBY-ruby} -i.$$ -pe 'exit if /^win32_vk/' depend
+${GEM-gem} build io-console.gemspec
diff --git a/ext/io/console/extconf.rb b/ext/io/console/extconf.rb
index a4dbd0f..381520a 100644
--- a/ext/io/console/extconf.rb
+++ b/ext/io/console/extconf.rb
@@ -6,7 +6,8 @@ hdr = nil
case
when macro_defined?("_WIN32", "")
# rb_w32_map_errno: 1.8.7
- vk_header = ($nmake == ?m ? "{$(srcdir)}" : "") << "win32_vk.chksum"
+ vk_header = File.exist?("#$srcdir/win32_vk.list") ? "chksum" : "inc"
+ vk_header = "#{'{$(srcdir)}' if $nmake == ?m}win32_vk.#{vk_header}"
when hdr = %w"termios.h termio.h".find {|h| have_header(h)}
have_func("cfmakeraw", hdr)
when have_header(hdr = "sgtty.h")
diff --git a/ext/io/console/io-console.gemspec b/ext/io/console/io-console.gemspec
index f77de85..2c5ce6b 100644
--- a/ext/io/console/io-console.gemspec
+++ b/ext/io/console/io-console.gemspec
@@ -1,5 +1,5 @@
# -*- ruby -*-
-_VERSION = "0.4.4"
+_VERSION = "0.4.5"
date = %w$Date:: $[1]
Gem::Specification.new do |s|
@@ -13,7 +13,7 @@ Gem::Specification.new do |s|
s.homepage = "http://www.ruby-lang.org"
s.authors = ["Nobu Nakada"]
s.require_path = %[lib]
- s.files = %w[console.c extconf.rb lib/console/size.rb]
+ s.files = %w[console.c depend extconf.rb lib/console/size.rb win32_vk.inc]
s.extensions = %w[extconf.rb]
s.license = "BSD-2-Clause"
s.cert_chain = %w[certs/nobu.pem]