class Libxdmcp < Formula desc "X.Org: X Display Manager Control Protocol library" homepage "https://www.x.org/" url "https://www.x.org/archive/individual/lib/libXdmcp-1.1.5.tar.xz" sha256 "d8a5222828c3adab70adf69a5583f1d32eb5ece04304f7f8392b6a353aa2228c" license "MIT" depends_on "pkg-config" => :build depends_on "xorgproto" def install args = %W[ --prefix=#{prefix} --sysconfdir=#{etc} --localstatedir=#{var} --disable-dependency-tracking --disable-silent-rules --enable-docs=no ] system "./configure", *args system "make" system "make", "install" end test do (testpath/"test.c").write <<~EOS #include "X11/Xdmcp.h" int main(int argc, char* argv[]) { xdmOpCode code; return 0; } EOS system ENV.cc, "test.c" assert_equal 0, $CHILD_STATUS.exitstatus end end