2013-03-02 23:42:21 +00:00
|
|
|
# encoding: UTF-8
|
|
|
|
|
2012-04-05 13:22:42 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Bsdconv < Formula
|
|
|
|
homepage 'https://github.com/buganini/bsdconv'
|
2013-09-16 16:11:08 +00:00
|
|
|
url 'https://github.com/buganini/bsdconv/archive/11.1.tar.gz'
|
|
|
|
sha1 'd2dd2e94fd013d2d7cfa4d55ebff0bd6a7c5c244'
|
2012-04-05 13:22:42 +00:00
|
|
|
|
|
|
|
head 'https://github.com/buganini/bsdconv.git'
|
|
|
|
|
|
|
|
def install
|
|
|
|
system "make", "PREFIX=#{prefix}"
|
|
|
|
system "make", "PREFIX=#{prefix}", "install"
|
|
|
|
end
|
|
|
|
|
2013-03-25 04:39:48 +00:00
|
|
|
test do
|
|
|
|
require 'open3'
|
|
|
|
Open3.popen3("#{bin}/bsdconv", "big5:utf-8") do |stdin, stdout, _|
|
|
|
|
stdin.write("\263\134\245\134\273\134")
|
|
|
|
stdin.close
|
2013-06-09 02:26:18 +00:00
|
|
|
assert_equal "許功蓋", stdout.read
|
2013-03-25 04:39:48 +00:00
|
|
|
end
|
2012-04-05 13:22:42 +00:00
|
|
|
end
|
|
|
|
end
|