From 1d21b1735aa40e8b10d7a2940a9584361221c8bb Mon Sep 17 00:00:00 2001 From: Rui Chen Date: Wed, 23 Oct 2024 17:19:17 -0400 Subject: [PATCH] ossp-uuid 1.6.3 autobump: add ossp-uuid Signed-off-by: Rui Chen ossp-uuid: needs libmd Signed-off-by: Rui Chen --- .github/autobump.txt | 1 + Formula/o/ossp-uuid.rb | 44 +++++++++++++++++++----------------------- 2 files changed, 21 insertions(+), 24 deletions(-) diff --git a/.github/autobump.txt b/.github/autobump.txt index f8a730a263f1..9632ffc716e8 100644 --- a/.github/autobump.txt +++ b/.github/autobump.txt @@ -2105,6 +2105,7 @@ osinfo-db osm2pgsql ospray osslsigncode +ossp-uuid osv-scanner otree ott diff --git a/Formula/o/ossp-uuid.rb b/Formula/o/ossp-uuid.rb index 0ac222025ed1..0e44230e999b 100644 --- a/Formula/o/ossp-uuid.rb +++ b/Formula/o/ossp-uuid.rb @@ -1,14 +1,16 @@ class OsspUuid < Formula desc "ISO-C API and CLI for generating UUIDs" - homepage "http://www.ossp.org/pkg/lib/uuid/" - url "https://deb.debian.org/debian/pool/main/o/ossp-uuid/ossp-uuid_1.6.2.orig.tar.gz" - sha256 "11a615225baa5f8bb686824423f50e4427acd3f70d394765bdff32801f0fd5b0" + homepage "https://git.sr.ht/~nabijaczleweli/ossp-uuid" + url "https://git.sr.ht/~nabijaczleweli/ossp-uuid/archive/UUID_1_6_3.tar.gz" + sha256 "630b7480b63c5c3e298fe1e3c39469440cd5fca4e13ba04690fba401fdab64f8" license "BSD-1-Clause" - revision 2 livecheck do - url "https://deb.debian.org/debian/pool/main/o/ossp-uuid/" - regex(/href=["']?ossp-uuid[._-]v?(\d+(?:\.\d+)+)\.orig\.t/i) + url :stable + regex(/^UUID[._-]v?(\d+(?:[._]\d+)+)$/i) + strategy :git do |tags, regex| + tags.map { |tag| tag[regex, 1]&.tr("_", ".") } + end end bottle do @@ -29,32 +31,26 @@ class OsspUuid < Formula sha256 cellar: :any_skip_relocation, x86_64_linux: "ec70863fae3001fc9281f76cef9ac231bd6dbb957c6382457a5848312ee1f1b0" end + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "libmd" # for md5.h + on_linux do conflicts_with "util-linux", because: "both install `uuid.3` file" end - # Fix -flat_namespace being used on Big Sur and later. - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/libtool/configure-pre-0.4.2.418-big_sur.diff" - sha256 "83af02f2aa2b746bb7225872cab29a253264be49db0ecebb12f841562d9a2923" - end - def install - # upstream ticket: http://cvs.ossp.org/tktview?tn=200 - # pkg-config --cflags uuid returns the wrong directory since we override the - # default, but uuid.pc.in does not use it - inreplace "uuid.pc.in" do |s| - s.gsub!(/^(exec_prefix)=\$\{prefix\}$/, '\1=@\1@') - s.gsub! %r{^(includedir)=\$\{prefix\}/include$}, '\1=@\1@' - s.gsub! %r{^(libdir)=\$\{exec_prefix\}/lib$}, '\1=@\1@' - end + # Fix compile with newer Clang + ENV.append_to_cflags "-Wno-implicit-function-declaration" if DevelopmentTools.clang_build_version >= 1403 + + # Patch Makefile.in to remove the --version-script option on macOS + inreplace "Makefile.in", "-Wl,--version-script=$(S)/libuuid.ver", "" if OS.mac? + system "autoreconf", "--force", "--install", "--verbose" system "./configure", "--prefix=#{prefix}", "--includedir=#{include}/ossp", - "--without-perl", - "--without-php", - "--without-pgsql" - system "make" + "--without-perl" system "make", "install" end