readline7.rb 1.24 KB
Newer Older
1 2 3
require 'package'

class Readline7 < Package
4 5
  description 'The GNU Readline library provides a set of functions for use by applications that allow users to edit command lines as they are typed in.'
  homepage 'http://cnswww.cns.cwru.edu/php/chet/readline/rltop.html'
6 7 8 9 10 11 12 13 14
  version '7.0p3'
  source_url 'ftp://ftp.gnu.org/gnu/readline/readline-7.0.tar.gz'
  source_sha1 'd9095fa14a812495052357e1d678b3f2ac635463'

  depends_on 'buildessential' => :build
  depends_on 'patch' => :build
  depends_on 'ncurses'

  def self.build
15 16 17
    system "wget -r -N -nd --no-parent ftp://ftp.gnu.org/gnu/readline/readline-7.0-patches/readline70-001 -P readline-7.0-patches"
    system "wget -r -N -nd --no-parent ftp://ftp.gnu.org/gnu/readline/readline-7.0-patches/readline70-002 -P readline-7.0-patches"
    system "wget -r -N -nd --no-parent ftp://ftp.gnu.org/gnu/readline/readline-7.0-patches/readline70-003 -P readline-7.0-patches"
18 19 20
    # system "for i in readline-7.0-patches/*.sig; do gpg $i; done"
    system "for i in readline-7.0-patches/readline70-???; do patch < $i; done"

21
    system "CC='gcc' ./configure --libdir=#{CREW_LIB_PREFIX} --disable-static --with-curses"
22 23 24 25 26 27 28
    system "make"
  end

  def self.install
    system "make", "DESTDIR=#{CREW_DEST_DIR}", "install"
  end
end