coreutils 8.28

Closes #17520.

Signed-off-by: FX Coudert <fxcoudert@gmail.com>
This commit is contained in:
Zhiming Wang 2017-09-02 10:58:55 +08:00 committed by FX Coudert
parent d993a3c388
commit adb4e37bda

View file

@ -1,42 +1,9 @@
class Coreutils < Formula
desc "GNU File, Shell, and Text utilities"
homepage "https://www.gnu.org/software/coreutils"
stable do
url "https://ftp.gnu.org/gnu/coreutils/coreutils-8.27.tar.xz"
mirror "https://ftpmirror.gnu.org/coreutils/coreutils-8.27.tar.xz"
sha256 "8891d349ee87b9ff7870f52b6d9312a9db672d2439d289bc57084771ca21656b"
# Remove for > 8.27
# Fix "Undefined symbols _renameat"
# Reported upstream 10 Mar 2017 https://debbugs.gnu.org/cgi/bugreport.cgi?bug=26044
# The patches are from MacPorts. This has been fixed in HEAD.
if MacOS.version < :yosemite
depends_on "autoconf" => :build
depends_on "automake" => :build
depends_on "gettext" => :build
resource "renameat_c" do
url "https://raw.githubusercontent.com/macports/macports-ports/61f1b0d/sysutils/coreutils/files/renameat.c"
sha256 "1867c22dcb4e503bd1f075e5e78b7194af25cded7286225ea77ee2ec8703a1fb"
end
resource "renameat_m4" do
url "https://raw.githubusercontent.com/macports/macports-ports/61f1b0d/sysutils/coreutils/files/renameat.m4"
sha256 "09e79dea1d4ae8294297948d8d092ec1e3a1a4fb104faedef8b3d8f67293fd4d"
end
patch :p0 do
url "https://raw.githubusercontent.com/macports/macports-ports/61f1b0d/sysutils/coreutils/files/patch-m4_gnulib-comp.m4-add-renameat.diff"
sha256 "df9bedeae2ca6d335147b5b4c3f19db2f36ff8c84973fd15fe1697de70538247"
end
patch :p0 do
url "https://raw.githubusercontent.com/macports/macports-ports/61f1b0d/sysutils/coreutils/files/patch-lib_gnulib.mk-add-renameat.c.diff"
sha256 "f7e2b21f04085f589c3d10c2f6ac5a4185e2b907e8bdb5bb6e4f93888d7ab546"
end
end
end
url "https://ftp.gnu.org/gnu/coreutils/coreutils-8.28.tar.xz"
mirror "https://ftpmirror.gnu.org/coreutils/coreutils-8.28.tar.xz"
sha256 "1117b1a16039ddd84d51a9923948307cfa28c2cea03d1a2438742253df0a0c65"
bottle do
sha256 "a951d21ffbf3407ca84356d369ed6009d248b263587b79f644d9a95300465fa6" => :sierra
@ -63,15 +30,6 @@ class Coreutils < Formula
conflicts_with "idutils", :because => "both install `gid` and `gid.1`"
conflicts_with "aardvark_shell_utils", :because => "both install `realpath` binaries"
# Fix crash from usage of %n in dynamic format strings on High Sierra
# Patch credit to Jeremy Huddleston Sequoia <jeremyhu@apple.com>
if MacOS.version >= :high_sierra
patch :p0 do
url "https://raw.githubusercontent.com/macports/macports-ports/b832494a90b/sysutils/coreutils/files/secure_snprintf.patch"
sha256 "57f972940a10d448efbd3d5ba46e65979ae4eea93681a85e1d998060b356e0d2"
end
end
def install
# Work around unremovable, nested dirs bug that affects lots of
# GNU projects. See:
@ -81,13 +39,7 @@ class Coreutils < Formula
# https://lists.gnu.org/archive/html/bug-tar/2015-10/msg00017.html
ENV["gl_cv_func_getcwd_abort_bug"] = "no" if MacOS.version == :el_capitan
if build.head?
system "./bootstrap"
elsif MacOS.version < :yosemite
(buildpath/"lib").install resource("renameat_c")
(buildpath/"m4").install resource("renameat_m4")
system "autoreconf", "-fiv"
end
system "./bootstrap" if build.head?
args = %W[
--prefix=#{prefix}