-
-
Notifications
You must be signed in to change notification settings - Fork 12.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dbus: update build Signed-off-by: Rui Chen <[email protected]>
- Loading branch information
1 parent
3cb651e
commit e9e3314
Showing
1 changed file
with
36 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,10 +2,11 @@ class Dbus < Formula | |
# releases: even (1.12.x) = stable, odd (1.13.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.14.10.tar.xz" | ||
mirror "https://deb.debian.org/debian/pool/main/d/dbus/dbus_1.14.10.orig.tar.xz" | ||
sha256 "ba1f21d2bd9d339da2d4aa8780c09df32fea87998b73da24f49ab9df1e36a50f" | ||
url "https://dbus.freedesktop.org/releases/dbus/dbus-1.16.2.tar.xz" | ||
mirror "https://deb.debian.org/debian/pool/main/d/dbus/dbus_1.16.2.orig.tar.xz" | ||
sha256 "0ba2a1a4b16afe7bceb2c07e9ce99a8c2c3508e5dec290dbb643384bd6beb7e2" | ||
license any_of: ["AFL-2.1", "GPL-2.0-or-later"] | ||
head "https://gitlab.freedesktop.org/dbus/dbus.git", branch: "master" | ||
|
||
livecheck do | ||
url "https://dbus.freedesktop.org/releases/dbus/" | ||
|
@@ -25,59 +26,58 @@ class Dbus < Formula | |
sha256 x86_64_linux: "9037402e48fc19b05f8b621e0e32efa3b4214513f0b4737894ef3d57704ce81d" | ||
end | ||
|
||
head do | ||
url "https://gitlab.freedesktop.org/dbus/dbus.git", branch: "master" | ||
|
||
depends_on "autoconf" => :build | ||
depends_on "autoconf-archive" => :build | ||
depends_on "automake" => :build | ||
depends_on "libtool" => :build | ||
end | ||
|
||
depends_on "docbook" => :build | ||
depends_on "docbook-xsl" => :build | ||
depends_on "meson" => :build | ||
depends_on "ninja" => :build | ||
depends_on "pkgconf" => :build | ||
depends_on "xmlto" => :build | ||
|
||
uses_from_macos "expat" | ||
|
||
# Patch applies the config templating fixed in https://bugs.freedesktop.org/show_bug.cgi?id=94494 | ||
# Homebrew pr/issue: 50219 | ||
patch do | ||
on_macos do | ||
url "https://raw.githubusercontent.com/Homebrew/formula-patches/0a8a55872e/d-bus/org.freedesktop.dbus-session.plist.osx.diff" | ||
sha256 "a8aa6fe3f2d8f873ad3f683013491f5362d551bf5d4c3b469f1efbc5459a20dc" | ||
end | ||
end | ||
|
||
def install | ||
Check failure on line 38 in Formula/d/dbus.rb
|
||
# Fix the TMPDIR to one D-Bus doesn't reject due to odd symbols | ||
ENV["TMPDIR"] = "/tmp" | ||
ENV["XML_CATALOG_FILES"] = "#{etc}/xml/catalog" | ||
|
||
system "./autogen.sh", "--no-configure" if build.head? | ||
|
||
args = [ | ||
"--localstatedir=#{var}", | ||
"--sysconfdir=#{etc}", | ||
"--enable-xml-docs", | ||
"--disable-doxygen-docs", | ||
"--without-x", | ||
"--disable-tests", | ||
args = %W[ | ||
-Dlocalstatedir=#{var} | ||
-Dsysconfdir=#{etc} | ||
-Dxml_docs=enabled | ||
-Ddoxygen_docs=disabled | ||
-Dmodular_tests=disabled | ||
] | ||
|
||
if OS.mac? | ||
args << "--enable-launchd" | ||
args << "--with-launchd-agent-dir=#{prefix}" | ||
end | ||
args << "-Dlaunchd_agent_dir=#{lib}/Library/LaunchAgents" if OS.mac? | ||
|
||
system "./configure", *args, *std_configure_args | ||
system "make", "install" | ||
system "meson", "setup", "build", *args, *std_meson_args | ||
system "meson", "compile", "-C", "build", "--verbose" | ||
system "meson", "install", "-C", "build" | ||
end | ||
|
||
def post_install | ||
# Generate D-Bus's UUID for this machine | ||
system bin/"dbus-uuidgen", "--ensure=#{var}/lib/dbus/machine-id" | ||
end | ||
|
||
def caveats | ||
on_macos do | ||
<<~EOS | ||
To load #{name} at startup, activate the included Launch Daemon: | ||
sudo cp #{lib}/Library/LaunchDaemons/org.freedesktop.dbus-session.plist /Library/LaunchDaemons | ||
sudo chmod 644 /Library/LaunchDaemons/org.freedesktop.dbus-session.plist | ||
sudo launchctl load -w /Library/LaunchDaemons/org.freedesktop.dbus-session.plist | ||
If this is an upgrade and you already have the Launch Daemon loaded, you | ||
have to unload the Launch Daemon before reinstalling it: | ||
sudo launchctl unload -w /Library/LaunchDaemons/org.freedesktop.dbus-session.plist | ||
sudo rm /Library/LaunchDaemons/org.freedesktop.dbus-session.plist | ||
EOS | ||
end | ||
end | ||
|
||
service do | ||
name macos: "org.freedesktop.dbus-session" | ||
end | ||
|