homebrew-core/Formula/dbus.rb
2017-10-31 03:11:00 -07:00

70 lines
2.6 KiB
Ruby

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.12.0.tar.gz"
mirror "https://mirrors.ocf.berkeley.edu/debian/pool/main/d/dbus/dbus_1.12.0.orig.tar.gz"
sha256 "39af0d9267391434b549c5c4adc001b735518c96f7630c3fe7162af1d13ef3c0"
bottle do
sha256 "5a63cbb97d2a67a8cf436b9e8e2839244866e99c270d75bf4da81328c7e47c56" => :high_sierra
sha256 "c5d996e65bcea606002e529a29d9aef1beecf22f87dd2e80f608588097f8d51b" => :sierra
sha256 "ed30ee39295625f8cfdb5360400f64dbda511c4e7a08d7288e9a3897bcf83811" => :el_capitan
end
head do
url "https://anongit.freedesktop.org/git/dbus/dbus.git"
depends_on "autoconf" => :build
depends_on "autoconf-archive" => :build
depends_on "automake" => :build
depends_on "libtool" => :build
end
depends_on "xmlto" => :build
# 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"
# macOS doesn't include a pkg-config file for expat
ENV["EXPAT_CFLAGS"] = "-I#{MacOS.sdk_path}/usr/include"
ENV["EXPAT_LIBS"] = "-lexpat"
ENV["XML_CATALOG_FILES"] = "#{etc}/xml/catalog"
system "./autogen.sh", "--no-configure" if build.head?
system "./configure", "--disable-dependency-tracking",
"--prefix=#{prefix}",
"--localstatedir=#{var}",
"--sysconfdir=#{etc}",
"--enable-xml-docs",
"--disable-doxygen-docs",
"--enable-launchd",
"--with-launchd-agent-dir=#{prefix}",
"--without-x",
"--disable-tests"
# Fix "../build-aux/install-sh: invalid option: -m700"
# Reported 31 Oct 2017 https://bugs.freedesktop.org/show_bug.cgi?id=103521
inreplace "test/Makefile", "-m700 ", "-m 700 "
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