various: fix "Hardware.is_32_bit?" deprecation issues (#3461)

This commit is contained in:
Matthew Callis 2016-07-30 20:20:53 -07:00 committed by Dominyk Tiller
parent fe3ef4beff
commit 568a93e72a
7 changed files with 7 additions and 7 deletions

View file

@ -65,7 +65,7 @@ class Avidemux < Formula
# For 32-bit compilation under gcc 4.2, see:
# https://trac.macports.org/ticket/20938#comment:22
if MacOS.version <= :leopard || (Hardware.is_32_bit? && Hardware::CPU.intel? && ENV.compiler == :clang)
if MacOS.version <= :leopard || (Hardware::CPU.is_32_bit? && Hardware::CPU.intel? && ENV.compiler == :clang)
inreplace "cmake/admFFmpegBuild.cmake",
"${CMAKE_INSTALL_PREFIX})",
"${CMAKE_INSTALL_PREFIX} --extra-cflags=-mdynamic-no-pic)"

View file

@ -179,7 +179,7 @@ class Ffmpeg < Formula
# For 32-bit compilation under gcc 4.2, see:
# https://trac.macports.org/ticket/20938#comment:22
ENV.append_to_cflags "-mdynamic-no-pic" if Hardware.is_32_bit? && Hardware::CPU.intel? && ENV.compiler == :clang
ENV.append_to_cflags "-mdynamic-no-pic" if Hardware::CPU.is_32_bit? && Hardware::CPU.intel? && ENV.compiler == :clang
system "./configure", *args

View file

@ -48,7 +48,7 @@ class Flac < Formula
--enable-static
]
args << "--disable-asm-optimizations" if build.universal? || Hardware.is_32_bit?
args << "--disable-asm-optimizations" if build.universal? || Hardware::CPU.is_32_bit?
args << "--without-ogg" if build.without? "libogg"
system "./autogen.sh" if build.head?

View file

@ -34,7 +34,7 @@ class Libvpx < Formula
# configure misdetects 32-bit 10.6
# https://code.google.com/p/webm/issues/detail?id=401
if MacOS.version == "10.6" && Hardware.is_32_bit?
if MacOS.version == "10.6" && Hardware::CPU.is_32_bit?
args << "--target=x86-darwin10-gcc"
end

View file

@ -23,7 +23,7 @@ class Nspr < Formula
cd "nspr" do
# Fixes a bug with linking against CoreFoundation, needed to work with SpiderMonkey
# See: https://openradar.appspot.com/7209349
target_frameworks = (Hardware.is_32_bit? || MacOS.version <= :leopard) ? "-framework Carbon" : ""
target_frameworks = (Hardware::CPU.is_32_bit? || MacOS.version <= :leopard) ? "-framework Carbon" : ""
inreplace "pr/src/Makefile.in", "-framework CoreServices -framework CoreFoundation", target_frameworks
args = %W[

View file

@ -31,7 +31,7 @@ class RdiffBackup < Formula
# We remove 'ppc' support, so we can pass Intel-optimized CFLAGS.
archs = archs_for_command("python")
archs.remove_ppc!
archs.delete :x86_64 if Hardware.is_32_bit?
archs.delete :x86_64 if Hardware::CPU.is_32_bit?
ENV["ARCHFLAGS"] = archs.as_arch_flags
system "python", "setup.py", "--librsync-dir=#{prefix}", "build"
libexec.install Dir["build/lib.macosx*/rdiff_backup"]

View file

@ -58,7 +58,7 @@ class Zookeeper < Formula
def install
# Don't try to build extensions for PPC
if Hardware.is_32_bit?
if Hardware::CPU.is_32_bit?
ENV["ARCHFLAGS"] = "-arch #{Hardware::CPU.arch_32_bit}"
else
ENV["ARCHFLAGS"] = Hardware::CPU.universal_archs.as_arch_flags