dmtx-utils 0.7.5
restore from boneyard new upstream on GitHub now works with ImageMagick 7 improved test block Closes #10693. Signed-off-by: ilovezfs <ilovezfs@icloud.com>
This commit is contained in:
parent
51ca92bcb9
commit
afd4f40cc1
2 changed files with 35 additions and 1 deletions
35
Formula/dmtx-utils.rb
Normal file
35
Formula/dmtx-utils.rb
Normal file
|
@ -0,0 +1,35 @@
|
|||
class DmtxUtils < Formula
|
||||
desc "Read and write data matrix barcodes"
|
||||
homepage "https://github.com/dmtx/dmtx-utils"
|
||||
url "https://github.com/dmtx/dmtx-utils/archive/v0.7.5.tar.gz"
|
||||
sha256 "6fa365cd321609db40800f6b34a2387c0ac56ef4643f6101ac83cb762f5ce9ef"
|
||||
|
||||
depends_on "autoconf" => :build
|
||||
depends_on "automake" => :build
|
||||
depends_on "pkg-config" => :build
|
||||
depends_on "imagemagick"
|
||||
depends_on "libdmtx"
|
||||
depends_on "libtool" => :run
|
||||
|
||||
resource "test_image12" do
|
||||
url "https://raw.githubusercontent.com/dmtx/libdmtx/ca9313f/test/rotate_test/images/test_image12.png"
|
||||
sha256 "683777f43ce2747c8a6c7a3d294f64bdbfee600d719aac60a18fcb36f7fc7242"
|
||||
end
|
||||
|
||||
def install
|
||||
system "autoreconf", "-fiv"
|
||||
system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}"
|
||||
system "make", "install"
|
||||
end
|
||||
|
||||
test do
|
||||
testpath.install resource("test_image12")
|
||||
image = File.read("test_image12.png")
|
||||
assert_equal "9411300724000003", pipe_output("#{bin}/dmtxread", image, 0)
|
||||
system "/bin/dd", "if=/dev/random", "of=in.bin", "bs=512", "count=3"
|
||||
dmtxwrite_output = pipe_output("#{bin}/dmtxwrite", File.read("in.bin"), 0)
|
||||
dmtxread_output = pipe_output("#{bin}/dmtxread", dmtxwrite_output, 0)
|
||||
(testpath/"out.bin").atomic_write dmtxread_output
|
||||
assert_equal (testpath/"in.bin").sha256, (testpath/"out.bin").sha256
|
||||
end
|
||||
end
|
|
@ -57,7 +57,6 @@
|
|||
"disco": "homebrew/boneyard",
|
||||
"discodex": "homebrew/boneyard",
|
||||
"djmount": "homebrew/fuse",
|
||||
"dmtx-utils": "homebrew/boneyard",
|
||||
"dotwrp": "homebrew/science",
|
||||
"drizzle": "homebrew/boneyard",
|
||||
"drush": "homebrew/php",
|
||||
|
|
Loading…
Reference in a new issue