Skip to content

Commit

Permalink
lnav: fix argument to --with-libcurl and simplify
Browse files Browse the repository at this point in the history
- The flag "--with-libcurl" wants curl's `opt_lib` not `opt_prefix`
- There's no need to add curl's `bin` to the PATH or to add
  "-lcrypto -lssl" to the LIBS environment variable. This happens
  indirectly via libssh2.

Closes #52.

Signed-off-by: ilovezfs <ilovezfs@icloud.com>
  • Loading branch information
ilovezfs committed Apr 6, 2016
1 parent b5cfb3e commit b7b3a0d
Showing 1 changed file with 4 additions and 15 deletions.
19 changes: 4 additions & 15 deletions Formula/lnav.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,21 +30,10 @@ def install
--with-readline=#{Formula["readline"].opt_prefix}
]

if build.with? "curl"
# Specify the cURL binary path, so that the configure script
# can look up the correct compile time flags.
ENV.prepend_path "PATH", "#{Formula["curl"].bin}"

# cURL depends on libssh2, due to the 'with-libssh2' flag, which in turn
# depends on libcrypto and libssl. These are neither specified by the
# lnav configure scripts, nor curl-config binary.
ENV.append "LIBS", "-lcrypto -lssl"

# OS X ships with libcurl by default, albeit without sftp support. If we
# want lnav to use the keg-only cURL formula that we specify as a
# dependency, we need to pass in the path.
args << "--with-libcurl=#{Formula["curl"].opt_prefix}"
end
# OS X ships with libcurl by default, albeit without sftp support. If we
# want lnav to use the keg-only curl formula that we specify as a
# dependency, we need to pass in the path.
args << "--with-libcurl=#{Formula["curl"].opt_lib}" if build.with? "curl"

system "./autogen.sh" if build.head?
system "./configure", *args
Expand Down

0 comments on commit b7b3a0d

Please sign in to comment.