aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2012-05-29 23:37:03 -0500
committerJack Nagel2012-05-29 23:39:10 -0500
commita1418a85e820aeafc96b4cfd58d879d16f086d1b (patch)
tree2c89c59cf7928ec40836968ea0c413cf1e752628 /Library
parentd8005c3939301826602abebaf4e7ce5c0f5e836c (diff)
downloadhomebrew-a1418a85e820aeafc96b4cfd58d879d16f086d1b.tar.bz2
xchat: add patch for newer glib support
xchat hasn't had any activity upstream since 2010, so here's a patch to fix the build against recent glib. While at it, modernize the style a bit. Fixes #12477. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/xchat.rb77
1 files changed, 70 insertions, 7 deletions
diff --git a/Library/Formula/xchat.rb b/Library/Formula/xchat.rb
index 0809ddbb9..1784d4d72 100644
--- a/Library/Formula/xchat.rb
+++ b/Library/Formula/xchat.rb
@@ -1,21 +1,28 @@
require 'formula'
class Xchat < Formula
- url 'http://xchat.org/files/source/2.8/xchat-2.8.8.tar.bz2'
homepage 'http://xchat.org'
+ url 'http://xchat.org/files/source/2.8/xchat-2.8.8.tar.bz2'
md5 '6775c44f38e84d06c06c336b32c4a452'
depends_on 'pkg-config' => :build
depends_on 'gettext'
depends_on 'gtk+'
+ # Adjust to newer glib include conventions
+ # No upstream activity since 2010
+ def patches; DATA; end
+
def install
- args = ["--prefix=#{prefix}",
- "--enable-openssl",
- "--disable-python",
- "--disable-xlib",
- "--disable-perl",
- "--disable-plugin"]
+ ENV.append 'LDFLAGS', '-lgmodule-2.0'
+
+ args = %W[--prefix=#{prefix}
+ --disable-dependency-tracking
+ --enable-openssl
+ --disable-python
+ --disable-xlib
+ --disable-perl
+ --disable-plugin]
# Fails on 32-bit core solo without this
args << "--disable-mmx" unless MacOS.prefer_64_bit?
@@ -26,3 +33,59 @@ class Xchat < Formula
rm_rf share+"pixmaps"
end
end
+
+__END__
+diff --git a/src/common/servlist.c b/src/common/servlist.c
+index 1728928..0829c99 100644
+--- a/src/common/servlist.c
++++ b/src/common/servlist.c
+@@ -24,7 +24,7 @@
+ #include <unistd.h>
+
+ #include "xchat.h"
+-#include <glib/ghash.h>
++#include <glib.h>
+
+ #include "cfgfiles.h"
+ #include "fe.h"
+diff --git a/src/common/text.c b/src/common/text.c
+index a219851..6b11174 100644
+--- a/src/common/text.c
++++ b/src/common/text.c
+@@ -28,7 +28,7 @@
+ #include <sys/mman.h>
+
+ #include "xchat.h"
+-#include <glib/ghash.h>
++#include <glib.h>
+ #include "cfgfiles.h"
+ #include "chanopt.h"
+ #include "plugin.h"
+diff --git a/src/common/util.c b/src/common/util.c
+index 49517ec..5a0ab6c 100644
+--- a/src/common/util.c
++++ b/src/common/util.c
+@@ -39,7 +39,7 @@
+ #include <errno.h>
+ #include "xchat.h"
+ #include "xchatc.h"
+-#include <glib/gmarkup.h>
++#include <glib.h>
+ #include <ctype.h>
+ #include "util.h"
+ #include "../../config.h"
+diff --git a/src/common/xchat.h b/src/common/xchat.h
+index 013d6a1..e3f15a8 100644
+--- a/src/common/xchat.h
++++ b/src/common/xchat.h
+@@ -1,10 +1,6 @@
+ #include "../../config.h"
+
+-#include <glib/gslist.h>
+-#include <glib/glist.h>
+-#include <glib/gutils.h>
+-#include <glib/giochannel.h>
+-#include <glib/gstrfuncs.h>
++#include <glib.h>
+ #include <time.h> /* need time_t */
+