homebrew-core/Formula/ykpers.rb
Jack Nagel 53473b6bf5 Clean up MacOS version method usage
The MacOS.version? family of methods (other than "leopard?") are poorly
defined and lead to confusing code. Replace them in formulae with more
explicit comparisons.

"MacOS.version" is a special version object that can be compared to
numerics, symbols, and strings using the standard Ruby comparison
methods.

The old methods were moved to compat when the version comparison code
was merged, and they must remain there "forever", but they should not be
used in new code.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-09-10 16:16:54 -05:00

26 lines
860 B
Ruby

require 'formula'
class Ykpers < Formula
homepage 'http://code.google.com/p/yubikey-personalization/'
url 'http://yubikey-personalization.googlecode.com/files/ykpers-1.7.0.tar.gz'
sha1 'de325107c1d6e9d3a61199cad5eeac69b98a36d7'
depends_on 'libyubikey'
# Pre-Lion fix, per MacPorts. See:
# https://trac.macports.org/ticket/34910
def patches
{:p0 =>
"https://trac.macports.org/export/96037/trunk/dports/security/ykpers/files/patch-pre-Lion-strnlen.diff"
} unless MacOS.version >= :lion
end
def install
libyubikey_prefix = Formula.factory('libyubikey').prefix
system "./configure", "--prefix=#{prefix}",
"--with-libyubikey-prefix=#{libyubikey_prefix}",
'--with-backend=osx',
'--disable-dependency-tracking'
system "make install"
end
end