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.6.tar.gz" mirror "https://mirrors.ocf.berkeley.edu/debian/pool/main/d/dbus/dbus_1.10.6.orig.tar.gz" sha256 "b5fefa08a77edd76cd64d872db949eebc02cf6f3f8be82e4bbc641742af5d35f" head "https://anongit.freedesktop.org/git/dbus/dbus.git" bottle do sha256 "c09c506b0f1681a7a02181907125757dcd17f4bf90f552cc9b87092efd101a6c" => :el_capitan sha256 "716e6c3cfed5e66321d639761f0303c84b504fa32793a4611daa302829c9598f" => :yosemite sha256 "5547ab566d1f4d75cafa8757157e31af1153a178dc3a57a0652a47b820cf1fee" => :mavericks sha256 "5cf8f56149b284b43fdf554fa8d11ff9abad64b99dcfadf92002aca9972e713b" => :x86_64_linux 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/patches/0a8a55872e/d-bus/org.freedesktop.dbus-session.plist.osx.diff" sha256 "a8aa6fe3f2d8f873ad3f683013491f5362d551bf5d4c3b469f1efbc5459a20dc" end depends_on "expat" unless OS.mac? def install # Fix the TMPDIR to one D-Bus doesn't reject due to odd symbols ENV["TMPDIR"] = "/tmp" system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}", "--localstatedir=#{var}", "--sysconfdir=#{etc}", "--disable-xml-docs", "--disable-doxygen-docs", ("--enable-launchd" if OS.mac?), ("--with-launchd-agent-dir=#{prefix}" if OS.mac?), "--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