class Rdesktop < Formula desc "UNIX client for connecting to Windows Remote Desktop Services" homepage "https://www.rdesktop.org/" url "https://github.com/rdesktop/rdesktop/releases/download/v1.8.6/rdesktop-1.8.6.tar.gz" sha256 "4131c5cc3d6a2e1a6515180502093c2b1b94cc8c34dd3f86aa8b3475399634ef" bottle do sha256 "502610835305f8ad03ffaff82d4ed349ec999680e79835225c1053124cb6b628" => :mojave sha256 "86b656a23bae94a0eb4769f69afe491bc6b620320c450679a1f32250a89f5edb" => :high_sierra sha256 "e8a895ce49ccf9df4b41f557a53dedf055eec20f14c17d24351750b816695d45" => :sierra end depends_on "openssl" depends_on :x11 # Note: The patch below is meant to remove the reference to the # undefined symbol SCARD_CTL_CODE. # upstream bug report: https://sourceforge.net/p/rdesktop/bugs/352/ patch :DATA def install args = %W[ --prefix=#{prefix} --disable-credssp --enable-smartcard --with-openssl=#{Formula["openssl"].opt_prefix} --x-includes=#{MacOS::X11.include} --x-libraries=#{MacOS::X11.lib} ] system "./configure", *args system "make", "install" end test do assert_match version.to_s, shell_output("#{bin}/rdesktop -help 2>&1", 64) end end __END__ diff --git a/scard.c b/scard.c index caa0745..5521ee9 100644 --- a/scard.c +++ b/scard.c @@ -2152,7 +2152,6 @@ TS_SCardControl(STREAM in, STREAM out) { /* Translate to local encoding */ dwControlCode = (dwControlCode & 0x3ffc) >> 2; - dwControlCode = SCARD_CTL_CODE(dwControlCode); } else { @@ -2198,7 +2197,7 @@ TS_SCardControl(STREAM in, STREAM out) } #ifdef PCSCLITE_VERSION_NUMBER - if (dwControlCode == SCARD_CTL_CODE(3400)) + if (0) { int i; SERVER_DWORD cc;