class Dbus < Formula # releases: even (1.10.x) = stable, odd (1.11.x) = development desc "Message bus system, providing inter-application communication" homepage "https://wiki.freedesktop.org/www/Software/dbus" url "https://dbus.freedesktop.org/releases/dbus/dbus-1.10.12.tar.gz" mirror "https://mirrors.ocf.berkeley.edu/debian/pool/main/d/dbus/dbus_1.10.12.orig.tar.gz" sha256 "210a79430b276eafc6406c71705e9140d25b9956d18068df98a70156dc0e475d" bottle do sha256 "8848b7e368750df3a9526f4c5d47a0649359e9e89cd9d94cb45e706402bdb66c" => :sierra sha256 "153735bc649bf2b7c8e995a5fdf44947d9f1c1a0091f1e351283a9621f281298" => :el_capitan sha256 "93fba26972dd5930cc211f9d76b4d16c93a120ce7b3c19c2f2be2aedbceac09c" => :yosemite end devel do url "https://dbus.freedesktop.org/releases/dbus/dbus-1.11.4.tar.gz" mirror "https://mirrors.ocf.berkeley.edu/debian/pool/main/d/dbus/dbus_1.11.4.orig.tar.gz" sha256 "474de2afde8087adbd26b3fc5cbf6ec45559763c75b21981169a9a1fbac256c9" end head do url "https://anongit.freedesktop.org/git/dbus/dbus.git" depends_on "autoconf" => :build depends_on "automake" => :build depends_on "libtool" => :build end # Patch applies the config templating fixed in https://bugs.freedesktop.org/show_bug.cgi?id=94494 # Homebrew pr/issue: 50219 patch do url "https://raw.githubusercontent.com/Homebrew/formula-patches/0a8a55872e/d-bus/org.freedesktop.dbus-session.plist.osx.diff" sha256 "a8aa6fe3f2d8f873ad3f683013491f5362d551bf5d4c3b469f1efbc5459a20dc" end def install # Fix the TMPDIR to one D-Bus doesn't reject due to odd symbols ENV["TMPDIR"] = "/tmp" system "./autogen.sh", "--no-configure" if build.head? system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}", "--localstatedir=#{var}", "--sysconfdir=#{etc}", "--disable-xml-docs", "--disable-doxygen-docs", "--enable-launchd", "--with-launchd-agent-dir=#{prefix}", "--without-x", "--disable-tests" system "make" ENV.deparallelize system "make", "install" end def post_install # Generate D-Bus's UUID for this machine system "#{bin}/dbus-uuidgen", "--ensure=#{var}/lib/dbus/machine-id" end test do system "#{bin}/dbus-daemon", "--version" end end