Skip to content

Commit 7a69bf6

Browse files
authored
Merge pull request #204722 from Homebrew/dwm-fontconfig
dwm: add `fontconfig` dependency, update macOS-specific logic
2 parents 408dcd6 + 4d4d940 commit 7a69bf6

File tree

1 file changed

+28
-24
lines changed

1 file changed

+28
-24
lines changed

Formula/d/dwm.rb

+28-24
Original file line numberDiff line numberDiff line change
@@ -12,42 +12,46 @@ class Dwm < Formula
1212
end
1313

1414
bottle do
15-
sha256 cellar: :any, arm64_sequoia: "7f3bd584e74a1509385d3d4c2aa8af20cee13e86f93c8542674b7c19d7ede22c"
16-
sha256 cellar: :any, arm64_sonoma: "42c934372742b8f035539bf79d2b8d0a7a22d9391329b1ce9aa1d6ce030ae410"
17-
sha256 cellar: :any, arm64_ventura: "6bacb2762fae033de162a20665ca7695e7af99e739ca869563cb2503d546ef89"
18-
sha256 cellar: :any, arm64_monterey: "c9746655f8aec5b7da2106a02ba7e3851dc43e46536bcea2bb102c616ec4b1d8"
19-
sha256 cellar: :any, sonoma: "bbd11ee191cfbd498a774fd08f57f6df864e020da44e9ecfb6abb1a57ed8669e"
20-
sha256 cellar: :any, ventura: "c9d816f1f7133f785e6453df1d59d21743bf32bd11f9618d8c5882724a7e3a02"
21-
sha256 cellar: :any, monterey: "aa0f35f0f7e181e1f6b8c0fa959f637e8919b04561072881721a14c2d31ef4a8"
22-
sha256 cellar: :any_skip_relocation, x86_64_linux: "49d9965667c723f02db24e1ea68f1f1a80c891115028a12f8934d921c9a112ac"
15+
rebuild 1
16+
sha256 cellar: :any, arm64_sequoia: "1aea6c7c3cc131887b7d471659137384ac7e415dd9fbe7d15e3d8ae9c6dbe180"
17+
sha256 cellar: :any, arm64_sonoma: "922787e07a3be0599f223d64f413f62ca8b7bb2a6d6fefec4565a7357c359564"
18+
sha256 cellar: :any, arm64_ventura: "b7971ddb4bf6f52bfc8a844ff6ea0681a0c9d6645cea923b0851e94771068785"
19+
sha256 cellar: :any, sonoma: "ddc7a7f3fbae58d7c4e8924ef3f53cff4906ac384f91a039bca5bdf097eb60d8"
20+
sha256 cellar: :any, ventura: "bb5ad3a4079c76769e85ebda55ad12a1260e946be09c5b611bdbfdff3146fdf1"
21+
sha256 cellar: :any_skip_relocation, x86_64_linux: "107dc6ce40aaa02fca9690bd3a7ac7804664cbfc49776b76354beccc8ba6da10"
2322
end
2423

2524
depends_on "dmenu"
25+
depends_on "fontconfig"
2626
depends_on "libx11"
2727
depends_on "libxft"
2828
depends_on "libxinerama"
2929

3030
def install
31-
# The dwm default quit keybinding Mod1-Shift-q collides with
32-
# the Mac OS X Log Out shortcut in the Apple menu.
33-
inreplace "config.def.h",
34-
"{ MODKEY|ShiftMask, XK_q, quit, {0} },",
35-
"{ MODKEY|ControlMask, XK_q, quit, {0} },"
36-
inreplace "dwm.1", '.B Mod1\-Shift\-q', '.B Mod1\-Control\-q'
31+
if OS.mac?
32+
# The dwm default quit keybinding Mod1-Shift-q collides with
33+
# the Mac OS X Log Out shortcut in the Apple menu.
34+
inreplace "config.def.h",
35+
"{ MODKEY|ShiftMask, XK_q, quit, {0} },",
36+
"{ MODKEY|ControlMask, XK_q, quit, {0} },"
37+
inreplace "dwm.1", '.B Mod1\-Shift\-q', '.B Mod1\-Control\-q'
38+
end
3739
system "make", "FREETYPEINC=#{Formula["freetype2"].opt_include}/freetype2", "PREFIX=#{prefix}", "install"
3840
end
3941

4042
def caveats
41-
<<~EOS
42-
In order to use the Mac OS X command key for dwm commands,
43-
change the X11 keyboard modifier map using xmodmap (1).
44-
45-
e.g. by running the following command from $HOME/.xinitrc
46-
xmodmap -e 'remove Mod2 = Meta_L' -e 'add Mod1 = Meta_L'&
47-
48-
See also https://gist.github.com/311377 for a handful of tips and tricks
49-
for running dwm on Mac OS X.
50-
EOS
43+
on_macos do
44+
<<~EOS
45+
In order to use the Mac OS X command key for dwm commands,
46+
change the X11 keyboard modifier map using xmodmap (1).
47+
48+
e.g. by running the following command from $HOME/.xinitrc
49+
xmodmap -e 'remove Mod2 = Meta_L' -e 'add Mod1 = Meta_L'&
50+
51+
See also https://gist.github.com/311377 for a handful of tips and tricks
52+
for running dwm on Mac OS X.
53+
EOS
54+
end
5155
end
5256

5357
test do

0 commit comments

Comments
 (0)