From 881698e16b3037b9ce78bd1c1f8d551a06b5c37b Mon Sep 17 00:00:00 2001 From: Sam Stephenson Date: Mon, 4 Feb 2013 16:56:42 -0600 Subject: [PATCH] Handle 32-bit OS X --- bin/ruby-build | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bin/ruby-build b/bin/ruby-build index fa37f20a..edc11388 100755 --- a/bin/ruby-build +++ b/bin/ruby-build @@ -533,7 +533,12 @@ build_package_replace_osx_openssl() { # Normally, we'd use ./config to automatically guess our platform. But # that doesn't work for 64-bit Darwin: it picks 32-bit by default and # asks you to run ./Configure by hand if you want 64-bit. So, here we are: - OPENSSL_CONFIGURE="${OPENSSL_CONFIGURE:-perl ./Configure darwin64-x86_64-cc}" + if [ "$(uname -m)" = "x86_64" ]; then + local platform="darwin64-x86_64-cc" + else + local platform="darwin-i386-cc" + fi + OPENSSL_CONFIGURE="${OPENSSL_CONFIGURE:-perl ./Configure $platform}" # Compile with zlib, no kerberos, and do a static build. package_option openssl configure --openssldir="$OPENSSLDIR" zlib no-krb5 no-shared