Skip to content

Commit 6eb3344

Browse files
committed
vsftpd: fix linux build
1 parent 63c2b5f commit 6eb3344

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Formula/v/vsftpd.rb

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ class Vsftpd < Formula
2828

2929
uses_from_macos "perl" => :build
3030

31+
on_linux do
32+
depends_on "libcap"
33+
depends_on "linux-pam"
34+
end
35+
3136
# Patch to remove UTMPX dependency, locate macOS's PAM library, and
3237
# remove incompatible LDFLAGS. (reported to developer via email)
3338
patch do
@@ -47,7 +52,9 @@ def install
4752
inreplace "defs.h", "/etc/vsftpd.conf", "#{etc}/vsftpd.conf"
4853
inreplace "tunables.c", "/etc", etc
4954
inreplace "tunables.c", "/var", var
50-
system "make"
55+
56+
args = OS.linux? ? ["LIBS=-lcap -lpam"] : []
57+
system "make", *args
5158

5259
# make install has all the paths hardcoded; this is easier:
5360
sbin.install "vsftpd"

0 commit comments

Comments
 (0)