aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/gettext.rb
blob: 81a82abc70b9ad254ac98eddf75b539db8e7936b (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
require 'brewkit'

class Gettext <Formula
  @url='http://ftp.gnu.org/pub/gnu/gettext/gettext-0.17.tar.gz'
  @md5='58a2bc6d39c0ba57823034d55d65d606'
  @homepage='http://www.gnu.org/software/gettext/'

  def install
    ENV.libxml2
    # TODO seems like this package needs more optmisation
    # maybe someone can tell me how glib depends on gettext, but gettext 
    # depends on glib and thus includes its own?!
    system "./configure", "--disable-debug",
                          "--prefix=#{prefix}",
                          "--disable-dependency-tracking",
                        # '--disable-nls ',
                          '--without-emacs', 
                          '--without-included-gettext',
                          '--without-included-glib',
                          '--without-included-libcroco',
                          '--without-included-libxml'
    system "make"
    ENV.deparallelize # install doesn't support multiple make jobs
    system "make install"

    (doc+'examples').rmtree unless ARGV.include? '--with-examples'

    def caveats
      "GNU gettext is bloated and manky, please try not to depend on it"
    end
  end
end