From e4956ba16c540f51890cc17fddf38e4abce01254 Mon Sep 17 00:00:00 2001 From: Sevan Janiyan Date: Wed, 17 May 2023 05:31:29 +0100 Subject: [PATCH] mercurial 6.5.1 --- Library/Formula/mercurial.rb | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/Library/Formula/mercurial.rb b/Library/Formula/mercurial.rb index 9178f63f55..ba8f3cca73 100644 --- a/Library/Formula/mercurial.rb +++ b/Library/Formula/mercurial.rb @@ -3,8 +3,8 @@ class Mercurial < Formula desc "Scalable distributed version control system" homepage "https://www.mercurial-scm.org/" - url "https://www.mercurial-scm.org/release/mercurial-3.5.1.tar.gz" - sha256 "997da45da303e399678c5bccd7be39b0fabf29c7e02fd3c8751c2ff88c8a259d" + url "https://www.mercurial-scm.org/release/mercurial-6.5.1.tar.gz" + sha256 "33f7de8d8b3607fa2b408cde4b8725e117eb0ad41926a787eaab409ca8a4fc2f" bottle do cellar :any @@ -14,10 +14,12 @@ class Mercurial < Formula sha256 "d39399222a31f040a5e22ef5853a9f99a476c1d76da85935710fdd80980d9ed5" => :mountain_lion end - depends_on :python if MacOS.version < :snow_leopard + depends_on :python3 def install ENV.minimal_optimization if MacOS.version <= :snow_leopard + # GCC 4.0 doesn't support granular error settings, so the build breaks + inreplace "setup.py", "-Werror=declaration-after-statement", "-Werror" system "make", "PREFIX=#{prefix}", "install-bin" # Install man pages, which come pre-built in source releases @@ -32,4 +34,21 @@ def install test do system "#{bin}/hg", "init" end + + # Fix PowerPC build + patch :p0, :DATA end +__END__ +--- mercurial/thirdparty/sha1dc/lib/sha1.c.orig 2023-04-11 20:39:20.000000000 +0000 ++++ mercurial/thirdparty/sha1dc/lib/sha1.c +@@ -102,6 +102,10 @@ + */ + #define SHA1DC_BIGENDIAN + ++#elif (defined(__APPLE__) && defined(__BIG_ENDIAN__) && !defined(SHA1DC_BIGENDIAN)) ++/* older gcc compilers which are the default on Apple PPC do not define __BYTE_ORDER__ */ ++#define SHA1DC_BIGENDIAN ++ + /* Not under GCC-alike or glibc or *BSD or newlib or or */ + #elif defined(SHA1DC_ON_INTEL_LIKE_PROCESSOR) + /*