Skip to content

Commit

Permalink
pkgconf: drop-in replacement for pkg-config
Browse files Browse the repository at this point in the history
  • Loading branch information
cho-m committed Oct 30, 2024
1 parent 544f595 commit 60a8a3a
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 95 deletions.
1 change: 1 addition & 0 deletions Aliases/pkg-config
2 changes: 1 addition & 1 deletion Aliases/pkgconfig
92 changes: 0 additions & 92 deletions Formula/p/pkg-config.rb

This file was deleted.

12 changes: 10 additions & 2 deletions Formula/p/pkgconf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@ class Pkgconf < Formula
desc "Package compiler and linker metadata toolkit"
homepage "https://github.com/pkgconf/pkgconf"
url "https://distfiles.ariadne.space/pkgconf/pkgconf-2.3.0.tar.xz"
mirror "http://distfiles.ariadne.space/pkgconf/pkgconf-2.3.0.tar.xz"
sha256 "3a9080ac51d03615e7c1910a0a2a8df08424892b5f13b0628a204d3fcce0ea8b"
license "ISC"
revision 1

livecheck do
url "https://distfiles.ariadne.space/pkgconf/"
Expand All @@ -30,8 +32,6 @@ class Pkgconf < Formula
depends_on "libtool" => :build
end

conflicts_with "pkg-config", because: "both install `pkg.m4` file"

def install
if build.head?
ENV["LIBTOOLIZE"] = "glibtoolize"
Expand Down Expand Up @@ -59,6 +59,14 @@ def install
system "./configure", *configure_args
system "make"
system "make", "install"

# Make `pkgconf` a drop-in replacement for `pkg-config` by adding symlink[^1].
# Similar to Debian[^2], Fedora, ArchLinux and MacPorts.
#
# [^1]: https://github.com/pkgconf/pkgconf/#pkg-config-symlink
# [^2]: https://salsa.debian.org/debian/pkgconf/-/blob/debian/unstable/debian/pkgconf.links?ref_type=heads
bin.install_symlink "pkgconf" => "pkg-config"
man1.install_symlink "pkgconf.1" => "pkg-config.1"
end

test do
Expand Down

0 comments on commit 60a8a3a

Please sign in to comment.