Skip to content

Commit

Permalink
get rid of accidental regression.
Browse files Browse the repository at this point in the history
  • Loading branch information
patcoll committed Feb 20, 2010
1 parent dc759e7 commit 4ad5fa4
Show file tree
Hide file tree
Showing 26 changed files with 31 additions and 27 deletions.
8 changes: 6 additions & 2 deletions lib/buildphp.rb
Expand Up @@ -39,8 +39,12 @@ def system_is_64_bit?
system("sysctl hw.cpu64bit_capable > /dev/null 2>&1")
end

def is_linux?
RUBY_PLATFORM =~ /linux/i
def x86_64?
RUBY_PLATFORM =~ /x86_64/i
end

def mac?
RUBY_PLATFORM =~ /darwin/i
end

module VersionShortcut
Expand Down
2 changes: 1 addition & 1 deletion lib/buildphp/package.rb
Expand Up @@ -139,7 +139,7 @@ def flags
# end

# enable PIC
if is_linux? and system_is_64_bit?
if x86_64?
f << "-fPIC"
elsif RUBY_PLATFORM =~ /darwin/i
# -fno-common enables PIC on Mac OS
Expand Down
2 changes: 1 addition & 1 deletion lib/buildphp/packages/apache.rb
Expand Up @@ -8,7 +8,7 @@

configure do |c|
c << "./configure"
c << "--enable-pie" if is_linux? and system_is_64_bit?
c << "--enable-pie" if x86_64?
c << %W(
--prefix="#{@prefix}"
--with-included-apr
Expand Down
2 changes: 1 addition & 1 deletion lib/buildphp/packages/bz2.rb
Expand Up @@ -20,7 +20,7 @@
# Ideally, we should detect the platform and use the appropriate PIC flag for that platform.
#
# If we don't do this, while compiling PHP will complain that bz2 was not compiled with PIC.
if is_linux? and system_is_64_bit?
if x86_64?
# use GNU sed options because we're on linux
@compile_cmd = "sed -r -i.bak -e 's/^(CFLAGS=)(.+)$/\\1-fPIC \\2/' Makefile && #{@compile_cmd}"
end
Expand Down
2 changes: 1 addition & 1 deletion lib/buildphp/packages/curl.rb
Expand Up @@ -7,7 +7,7 @@

configure do |c|
c << "./configure"
c << "--with-pic" if is_linux? and system_is_64_bit?
c << "--with-pic" if x86_64?
c << "--prefix=#{@prefix}"
c << "--with-ssl"
c << "--with-zlib=#{FACTORY.zlib.prefix}"
Expand Down
2 changes: 1 addition & 1 deletion lib/buildphp/packages/expat.rb
Expand Up @@ -7,7 +7,7 @@

configure do |c|
c << "./configure"
c << "--with-pic" if is_linux? and system_is_64_bit?
c << "--with-pic" if x86_64?
c << "--prefix=#{@prefix}"
end

Expand Down
2 changes: 1 addition & 1 deletion lib/buildphp/packages/freetype.rb
Expand Up @@ -7,7 +7,7 @@

configure do |c|
c << "./configure"
c << "--with-pic" if is_linux? and system_is_64_bit?
c << "--with-pic" if x86_64?
c << "--prefix=#{@prefix}"
c << "--without-zlib"
end
Expand Down
2 changes: 1 addition & 1 deletion lib/buildphp/packages/gd.rb
Expand Up @@ -7,7 +7,7 @@

configure do |c|
c << "./configure"
c << "--with-pic" if is_linux? and system_is_64_bit?
c << "--with-pic" if x86_64?
c << "--prefix=#{@prefix}"
c << "--with-libiconv-prefix=#{FACTORY.iconv.prefix}"
c << "--with-freetype=#{FACTORY.freetype.prefix}"
Expand Down
2 changes: 1 addition & 1 deletion lib/buildphp/packages/gettext.rb
Expand Up @@ -7,7 +7,7 @@

configure do |c|
c << "./configure"
c << "--with-pic" if is_linux? and system_is_64_bit?
c << "--with-pic" if x86_64?
c << "--prefix=#{@prefix}"
c << "--disable-java"
c << "--disable-native-java"
Expand Down
2 changes: 1 addition & 1 deletion lib/buildphp/packages/iconv.rb
Expand Up @@ -7,7 +7,7 @@

configure do |c|
c << "./configure"
c << "--with-pic" if is_linux? and system_is_64_bit?
c << "--with-pic" if x86_64?
c << "--prefix=#{@prefix}"
c << "--enable-relocatable"
c << "--enable-static"
Expand Down
2 changes: 1 addition & 1 deletion lib/buildphp/packages/jpeg.rb
Expand Up @@ -11,7 +11,7 @@ def package_dir

configure do |c|
c << "./configure"
c << "--with-pic" if is_linux? and system_is_64_bit?
c << "--with-pic" if x86_64?
c << "--prefix=#{@prefix}"
end

Expand Down
2 changes: 1 addition & 1 deletion lib/buildphp/packages/libtool.rb
Expand Up @@ -11,7 +11,7 @@ def package_dir

configure do |c|
c << "./configure"
c << "--with-pic" if is_linux? and system_is_64_bit?
c << "--with-pic" if x86_64?
c << "--prefix=#{@prefix}"
end

Expand Down
2 changes: 1 addition & 1 deletion lib/buildphp/packages/mcrypt.rb
Expand Up @@ -7,7 +7,7 @@

configure do |c|
c << "./configure"
c << "--with-pic" if is_linux? and system_is_64_bit?
c << "--with-pic" if x86_64?
c << "--prefix=#{@prefix}"
end

Expand Down
2 changes: 1 addition & 1 deletion lib/buildphp/packages/mhash.rb
Expand Up @@ -7,7 +7,7 @@

configure do |c|
c << "./configure"
c << "--with-pic" if is_linux? and system_is_64_bit?
c << "--with-pic" if x86_64?
c << "--prefix=#{@prefix}"
end

Expand Down
2 changes: 1 addition & 1 deletion lib/buildphp/packages/mssql.rb
Expand Up @@ -7,7 +7,7 @@

configure do |c|
c << "./configure"
c << "--with-pic" if is_linux? and system_is_64_bit?
c << "--with-pic" if x86_64?
c << "--prefix=#{@prefix}"
c << "--with-tdsver=8.0"
c << "--enable-odbc"
Expand Down
2 changes: 1 addition & 1 deletion lib/buildphp/packages/mysql.rb
Expand Up @@ -9,7 +9,7 @@

configure do |c|
c << "./configure"
c << "--with-pic" if is_linux? and system_is_64_bit?
c << "--with-pic" if x86_64?
c << "--prefix=#{@prefix}"
c << "--with-plugins=max"
c << "--with-charset=utf8"
Expand Down
2 changes: 1 addition & 1 deletion lib/buildphp/packages/ncurses.rb
Expand Up @@ -7,7 +7,7 @@

configure do |c|
c << "./configure"
c << "--with-pic" if is_linux? and system_is_64_bit?
c << "--with-pic" if x86_64?
c << "--prefix=#{@prefix}"
c << "--without-debug"
c << "--with-shared"
Expand Down
2 changes: 1 addition & 1 deletion lib/buildphp/packages/odbc.rb
Expand Up @@ -7,7 +7,7 @@

configure do |c|
c << "./configure"
c << "--with-pic" if is_linux? and system_is_64_bit?
c << "--with-pic" if x86_64?
c << "--prefix=#{@prefix}"
c << "--disable-gui"
c << "--enable-iconv"
Expand Down
2 changes: 1 addition & 1 deletion lib/buildphp/packages/openssl.rb
Expand Up @@ -9,7 +9,7 @@
c << './config'
c << "-I#{Buildphp::INSTALL_TO}/include"
c << "-L#{Buildphp::INSTALL_TO}/lib"
c << "-fPIC" if is_linux? and system_is_64_bit?
c << "-fPIC" if x86_64?
c << "--prefix=#{@prefix}"
c << "zlib-dynamic"
c << "no-krb5"
Expand Down
2 changes: 1 addition & 1 deletion lib/buildphp/packages/pcre.rb
Expand Up @@ -7,7 +7,7 @@

configure do |c|
c << './configure'
c << "--with-pic" if is_linux? and system_is_64_bit?
c << "--with-pic" if x86_64?
c << "--prefix=#{@prefix}"
c << "--enable-utf8"
c << "--enable-unicode-properties"
Expand Down
2 changes: 1 addition & 1 deletion lib/buildphp/packages/perl.rb
Expand Up @@ -7,7 +7,7 @@

configure do |c|
c << 'sh Configure -de'
c << "-Duse64bitall" if is_linux? and system_is_64_bit?
c << "-Duse64bitall" if system_is_64_bit?
c << "-Dprefix='#{@prefix}'"
end

Expand Down
2 changes: 1 addition & 1 deletion lib/buildphp/packages/php.rb
Expand Up @@ -57,7 +57,7 @@ def modules_ini

configure do |parts|
parts << './configure'
parts << "--with-pic" if is_linux? and system_is_64_bit?
parts << "--with-pic" if x86_64?
parts << "--with-gnu-ld"

# add configuration flags based on which interface we're building
Expand Down
2 changes: 1 addition & 1 deletion lib/buildphp/packages/pkg_config.rb
Expand Up @@ -7,7 +7,7 @@

configure do |c|
c << './configure'
c << "--with-pic" if is_linux? and system_is_64_bit?
c << "--with-pic" if x86_64?
c << "--prefix=#{@prefix}"
end

Expand Down
2 changes: 1 addition & 1 deletion lib/buildphp/packages/png.rb
Expand Up @@ -8,7 +8,7 @@

configure do |c|
c << './configure'
c << "--with-pic" if is_linux? and system_is_64_bit?
c << "--with-pic" if x86_64?
c << "--prefix=#{@prefix}"
end

Expand Down
2 changes: 1 addition & 1 deletion lib/buildphp/packages/xml.rb
Expand Up @@ -7,7 +7,7 @@

configure do |c|
c << './configure'
c << "--with-pic" if is_linux? and system_is_64_bit?
c << "--with-pic" if x86_64?
c << "--prefix=#{@prefix}"
c << "--with-iconv=#{FACTORY.iconv.prefix}"
c << "--with-zlib=#{FACTORY.zlib.prefix}"
Expand Down
2 changes: 1 addition & 1 deletion lib/buildphp/packages/xsl.rb
Expand Up @@ -7,7 +7,7 @@

configure do |c|
c << './configure'
c << "--with-pic" if is_linux? and system_is_64_bit?
c << "--with-pic" if x86_64?
c << "--prefix=#{@prefix}"
c << "--with-libxml-prefix=#{FACTORY.xml.prefix}"
c << "--with-libxml-include-prefix=#{FACTORY.xml.prefix}/include"
Expand Down

0 comments on commit 4ad5fa4

Please sign in to comment.