From 55d8ec0ac36d5e19ad3dfed620b48e2635afde44 Mon Sep 17 00:00:00 2001 From: Sebastian Boehm Date: Wed, 8 Apr 2015 10:23:59 +0200 Subject: gnu-utils: fix "invalid/nonprinting UTF-8" warning Closes #38454. Signed-off-by: Mike McQuaid --- Library/Formula/gnu-units.rb | 39 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) (limited to 'Library/Formula') diff --git a/Library/Formula/gnu-units.rb b/Library/Formula/gnu-units.rb index 941aa8e16..1c8491e5d 100644 --- a/Library/Formula/gnu-units.rb +++ b/Library/Formula/gnu-units.rb @@ -1,9 +1,10 @@ +# coding: utf-8 require "formula" class GnuUnits < Formula homepage "https://www.gnu.org/software/units/" url "http://ftpmirror.gnu.org/units/units-2.02.tar.gz" - mirror "http://ftp.gnu.org/gnu/units/units-2.02.tar.gz" + mirror "https://ftp.gnu.org/gnu/units/units-2.02.tar.gz" sha1 "e460371dc97034d17ce452e6b64991f7fd2d1409" bottle do @@ -16,6 +17,17 @@ class GnuUnits < Formula option "with-default-names", "Do not prepend 'g' to the binary" + # Temporary fix for "invalid/nonprinting UTF-8" warnings on startup, + # see https://github.com/Homebrew/homebrew/issues/20297. + # + # The current maintainer of GNU units, Adrian Mariano, is aware of + # the issue (reported by mail on 2015-04-08) and has fixed it in the + # currently unreleased development version which will be released + # later this year. + # + # See https://github.com/Homebrew/homebrew/issues/38454 for details. + patch :DATA + def install args = ["--prefix=#{prefix}"] args << "--program-prefix=g" if build.without? "default-names" @@ -28,3 +40,28 @@ class GnuUnits < Formula assert_equal "* 18288", shell_output("#{bin}/gunits '600 feet' 'cm' -1").strip end end + +__END__ +diff --git a/definitions.units b/definitions.units +index a0c61f2..06269ce 100644 +--- a/definitions.units ++++ b/definitions.units +@@ -5248,9 +5248,6 @@ röntgen roentgen + ㍴ bar + # ㍵ oV??? + ㍶ pc +-#㍷ dm invalid on Mac +-#㍸ dm^2 invalid on Mac +-#㍹ dm^3 invalid on Mac + ㎀ pA + ㎁ nA + ㎂ µA +@@ -5342,9 +5339,6 @@ röntgen roentgen + ㏛ sr + ㏜ Sv + ㏝ Wb +-#㏞ V/m Invalid on Mac +-#㏟ A/m Invalid on Mac +-#㏿ gal Invalid on Mac + + !endutf8 -- cgit v1.2.3