class Libgpod < Formula desc "Library to access the contents of classic iPods" homepage "https://gtkpod.org/libgpod/" url "https://github.com/neuschaefer/libgpod/archive/0dda196286f5e42be89f0b870abd9278213989a5.tar.gz" sha256 "a9809f85b2b763196ac7c94903211a927efd37a24ef39c355c21b4a1bed28e52" license "LGPL-2.0-only" depends_on "autoconf" => :build depends_on "automake" => :build depends_on "libtool" => :build depends_on "pkg-config" => :build depends_on "gtk-doc" => :build depends_on "intltool" => :build depends_on "glib" depends_on "gdk-pixbuf" depends_on "libplist" depends_on "libxml2" depends_on "sqlite" def install # 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["sqlite"].opt_lib/"pkgconfig" ENV.prepend_path "PKG_CONFIG_PATH", Formula["glib"].opt_lib/"pkgconfig" ENV.prepend_path "PKG_CONFIG_PATH", Formula["glib"].opt_share/"pkgconfig" ENV.prepend_path "PKG_CONFIG_PATH", Formula["gdk-pixbuf"].opt_lib/"pkgconfig" # Upstream's autogen.sh is very old and may hardcode ancient automake checks # (e.g. looking for automake-1.7). Using autoreconf is the standard Homebrew # way and works with modern autotools. # # libgpod's build system expects gtk-doc's makefile snippet to exist (gtk-doc.make), # which is normally provided by running gtkdocize. system "gtkdocize", "--copy" # libgpod also uses intltool's Autoconf macros (IT_PROG_INTLTOOL). If intltoolize # is not run, the generated ./configure may contain unexpanded macros and fail. system "intltoolize", "--force", "--copy", "--automake" system "autoreconf", "-fiv" system "./configure", *std_configure_args, "--disable-dependency-tracking", "--with-hal=no", "--disable-udev", "--without-libimobiledevice", "--with-python=no", "--with-mono=no", "--disable-gtk-doc", "--disable-gtk-doc-html", "--disable-gtk-doc-pdf", "--enable-more-warnings=no" system "make", "install" end test do # Ensure pkg-config can find the expected module name used by Strawberry. assert_match "libgpod", shell_output("pkg-config --libs libgpod-1.0") end end