homebrew-core/Formula/qhull.rb
Jack Nagel 7c648d9732 Shore up a number of shell quoting issues
When interpolating in strings passed to Formula#system, it should be
done in such a way that if any interpolated variables contain spaces,
they are either (a) passed as part of a list or (b) protected by quotes
if they are part of a long string (which is subject to shell expansion).
Otherwise, they will be split on the space when expanded by the shell
and passed as multiple arguments to whatever process is being executed.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-05-15 14:03:11 -05:00

27 lines
963 B
Ruby

require 'formula'
class Qhull < Formula
homepage 'http://www.qhull.org/'
url 'http://www.qhull.org/download/qhull-2011.1-src.tgz'
md5 'a65061cf2a6e6581182f4df0f3667a8e'
depends_on 'cmake' => :build
def patches
# Patch from MacPorts that makes a couple of cosmetic edits to CMakeLists.txt:
#
# * The testing programs user_eg, user_eg2 and user_eg3 are no longer
# built and installed.
#
# * The VERSION property is no longer set on the command line tools.
# Setting this property causes CMake to install `binname-version` along
# with a symlink `binname` that points to `binname-version`. This is
# pointless for something that is managed by a package manager.
{:p0 => 'https://trac.macports.org/export/83287/trunk/dports/math/qhull/files/patch-CMakeLists.txt.diff'}
end
def install
system "cmake #{std_cmake_parameters} -DMAN_INSTALL_DIR='#{man1}' ."
system "make install"
end
end