Add pkg-config shim for libplist in libgpod formula to ensure compatibility with Homebrew's library naming conventions during installation.
This commit is contained in:
@@ -19,6 +19,25 @@ class Libgpod < Formula
|
|||||||
depends_on "sqlite"
|
depends_on "sqlite"
|
||||||
|
|
||||||
def install
|
def install
|
||||||
|
# libgpod's configure.ac checks for pkg-config module name "libplist".
|
||||||
|
# Homebrew provides "libplist-2.0", so we provide a tiny shim .pc file to
|
||||||
|
# satisfy the expected name.
|
||||||
|
(buildpath/"brew-pkgconfig").mkpath
|
||||||
|
(buildpath/"brew-pkgconfig/libplist.pc").write <<~EOS
|
||||||
|
prefix=#{Formula["libplist"].opt_prefix}
|
||||||
|
exec_prefix=${prefix}
|
||||||
|
libdir=#{Formula["libplist"].opt_lib}
|
||||||
|
includedir=#{Formula["libplist"].opt_include}
|
||||||
|
|
||||||
|
Name: libplist
|
||||||
|
Description: Apple property list library (Homebrew shim for libgpod)
|
||||||
|
Version: #{Formula["libplist"].version}
|
||||||
|
Libs: -L${libdir} -lplist-2.0
|
||||||
|
Cflags: -I${includedir}
|
||||||
|
EOS
|
||||||
|
|
||||||
|
ENV.prepend_path "PKG_CONFIG_PATH", buildpath/"brew-pkgconfig"
|
||||||
|
|
||||||
# Ensure pkg-config can find Homebrew keg .pc files during configure.
|
# Ensure pkg-config can find Homebrew keg .pc files during configure.
|
||||||
ENV.prepend_path "PKG_CONFIG_PATH", Formula["libplist"].opt_lib/"pkgconfig"
|
ENV.prepend_path "PKG_CONFIG_PATH", Formula["libplist"].opt_lib/"pkgconfig"
|
||||||
ENV.prepend_path "PKG_CONFIG_PATH", Formula["sqlite"].opt_lib/"pkgconfig"
|
ENV.prepend_path "PKG_CONFIG_PATH", Formula["sqlite"].opt_lib/"pkgconfig"
|
||||||
|
|||||||
Reference in New Issue
Block a user