aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/bitchx.rb
blob: 0d9d066e3b8560136f5af6af9b5e1e82b760330d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
require "formula"

class Bitchx < Formula

  homepage "https://github.com/BitchX"
  url "http://bitchx.ca/BitchX-1.2-final.tar.gz"
  mirror "http://pkgs.fedoraproject.org/repo/pkgs/BitchX/BitchX-1.2-final.tar.gz/5c4947f5a345574e28d93f78cb191ce4/BitchX-1.2-final.tar.gz"
  sha1 "a2162a18d3a96ade7d2410f6a560e43f7d6b8763"

  # Reported upstream:
  # https://github.com/BitchX/BitchX/pull/8
  patch :DATA

  def install
    args = %W{
      --prefix=#{prefix}
      --with-ssl
      --with-plugins=acro,aim,arcfour,amp,autocycle,blowfish,cavlink,encrypt,fserv,hint,identd,nap,pkga,possum,qbx,qmail
      --enable-ipv6
      --mandir=#{man}
    }

    system "./configure", *args
    system "make"
    system "make", "install"
  end

  def caveats; <<-EOS.undent
    On case-sensitive filesytems, it is necessary to run `BitchX` not `bitchx`.
    For best visual appearance, your terminal emulator may need:
    * Character encoding set to Western (ISO Latin 1).
      (or a similar, compatible encoding)
    * A font capable of extended ASCII characters:
      See: https://www.google.com/search?q=perfect+dos+vga+437
    EOS
  end

  test do
    system bin/"BitchX", "-v"
  end

end

__END__
diff --git a/source/compat.c b/source/compat.c
index fa68988..9549bd6 100644
--- a/source/compat.c
+++ b/source/compat.c
@@ -1011,6 +1011,10 @@ int  scandir (const char *name,
 #include <stddef.h>
 #include <string.h>

+#if defined(__APPLE__)
+ #define environ (*_NSGetEnviron())
+#endif
+
 int   bsd_setenv(const char *name, const char *value, int rewrite);

 /*