aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorXu Cheng2015-03-25 22:08:36 +0800
committerXu Cheng2015-03-27 16:03:36 +0800
commit727bac51faf4779fdf3fd8d35ac1808490163555 (patch)
tree8d0e8d8a9417a09ae080b841fc9f155409f26314 /Library/Formula
parent1fa7ca7e4f5b121182249a326d9300078725ed5b (diff)
downloadhomebrew-727bac51faf4779fdf3fd8d35ac1808490163555.tar.bz2
pdf2json: add test and simplify install method
Closes #38087. Signed-off-by: Xu Cheng <xucheng@me.com>
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/pdf2json.rb20
1 files changed, 10 insertions, 10 deletions
diff --git a/Library/Formula/pdf2json.rb b/Library/Formula/pdf2json.rb
index 652e9d1a4..7b85d1518 100644
--- a/Library/Formula/pdf2json.rb
+++ b/Library/Formula/pdf2json.rb
@@ -1,16 +1,16 @@
-require 'formula'
-
class Pdf2json < Formula
- homepage 'http://code.google.com/p/pdf2json/'
- url 'https://pdf2json.googlecode.com/files/pdf2json-0.68.tar.gz'
- sha1 '1cb0f4b3b1216c6ce515fd256d92ac196d002a7e'
+ homepage "https://code.google.com/p/pdf2json/"
+ url "https://pdf2json.googlecode.com/files/pdf2json-0.68.tar.gz"
+ sha256 "34907954b2029a51a0b372b9db86d6c5112e4a1648201352e514ca5606050673"
def install
- system "./configure", "--prefix=#{prefix}"
- # Fix manpage install location. See:
- # http://code.google.com/p/pdf2json/issues/detail?id=2
- inreplace "Makefile", "/man/", "/share/man/"
+ system "./configure"
system "make", "CC=#{ENV.cc}", "CXX=#{ENV.cxx}"
- bin.install 'src/pdf2json'
+ bin.install "src/pdf2json"
+ end
+
+ test do
+ system bin/"pdf2json", test_fixtures("test.pdf"), "test.json"
+ assert File.exist?("test.json")
end
end