Skip to content

Commit

Permalink
ossp-uuid 1.6.3
Browse files Browse the repository at this point in the history
autobump: add ossp-uuid

Signed-off-by: Rui Chen <[email protected]>

ossp-uuid: needs libmd

Signed-off-by: Rui Chen <[email protected]>
  • Loading branch information
chenrui333 committed Oct 24, 2024
1 parent 47dab63 commit 1d21b17
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 24 deletions.
1 change: 1 addition & 0 deletions .github/autobump.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2105,6 +2105,7 @@ osinfo-db
osm2pgsql
ospray
osslsigncode
ossp-uuid
osv-scanner
otree
ott
Expand Down
44 changes: 20 additions & 24 deletions Formula/o/ossp-uuid.rb
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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

Expand Down

0 comments on commit 1d21b17

Please sign in to comment.