aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Ballard2009-12-03 19:42:40 -0800
committerMax Howell2010-01-17 09:14:35 +0000
commit8d6720204d28a49903058de2d289c6d6b9afedec (patch)
treebdafd249b3159db3e69d696b91835350d8687db5
parentc5ad8cae33a3672a8945a39c877f92a485117987 (diff)
downloadhomebrew-8d6720204d28a49903058de2d289c6d6b9afedec.tar.bz2
Fix irssi's perl support
The system-provided Perl adds various -arch flags which are incompatible with some flags that homebrew sets in CFLAGS. Patch the configure file to remove the -arch flags for the Perl module compilation. Fixes #367
-rw-r--r--Library/Formula/irssi.rb34
1 files changed, 26 insertions, 8 deletions
diff --git a/Library/Formula/irssi.rb b/Library/Formula/irssi.rb
index 11828c26d..5d8044151 100644
--- a/Library/Formula/irssi.rb
+++ b/Library/Formula/irssi.rb
@@ -12,20 +12,38 @@ class Irssi <Formula
path == bin+'irssi'
end
+ def patches
+ DATA
+ end
+
def install
ENV.append 'ARCHFLAGS', ' ' # wtf?
cargs = ["--prefix=#{prefix}", "--disable-debug", "--disable-dependency-tracking",
- "--with-modules", "--enable-ssl", "--enable-ipv6"]
-
- # http://github.com/mxcl/homebrew/issues/#issue/367
- if MACOS_VERSION > 10.5
- cargs << "--with-perl=no"
- else
- cargs << "--with-perl=yes"
- end
+ "--with-modules", "--enable-ssl", "--enable-ipv6", "--with-perl=yes"]
system "./configure", *cargs
system "make install"
end
end
+__END__
+--- a/configure 2009-12-03 19:35:07.000000000 -0800
++++ b/configure 2009-12-03 19:35:33.000000000 -0800
+@@ -27419,7 +27419,7 @@
+ if test -z "$perlpath"; then
+ perl_check_error="perl binary not found"
+ else
+- PERL_CFLAGS=`$perlpath -MExtUtils::Embed -e ccopts 2>/dev/null`
++ PERL_CFLAGS=`$perlpath -MExtUtils::Embed -e ccopts 2>/dev/null | $SED -e 's/-arch [^ ]\{1,\}//g'`
+ fi
+
+ if test "x$ac_cv_c_compiler_gnu" = "xyes" -a -z "`echo $host_os|grep 'bsd\|linux'`"; then
+@@ -27437,7 +27437,7 @@
+ $as_echo "not found, building without Perl" >&6; }
+ want_perl=no
+ else
+- PERL_LDFLAGS=`$perlpath -MExtUtils::Embed -e ldopts 2>/dev/null`
++ PERL_LDFLAGS=`$perlpath -MExtUtils::Embed -e ldopts 2>/dev/null | $SED -e 's/-arch [^ ]\{1,\}//g'`
+
+ if test "x$DYNLIB_MODULES" = "xno" -a "$want_perl" != "static"; then
+ want_perl=static