Change ncurses.rb and ncursesw.rb to not install static libraries and strip binary and libraries

parent adee0e73
......@@ -3,24 +3,36 @@ require 'package'
class Ncurses < Package
description 'The ncurses (new curses) library is a free software emulation of curses in System V Release 4.0 (SVr4), and more.'
homepage 'https://www.gnu.org/software/ncurses/'
version '6.0-1'
version '6.0-2'
source_url 'ftp://ftp.gnu.org/pub/gnu/ncurses/ncurses-6.0.tar.gz'
source_sha1 'acd606135a5124905da770803c05f1f20dd3b21c'
depends_on "diffutils"
depends_on "diffutils" => :build
depends_on "ncursesw"
def self.build
system './configure ' \
'CFLAGS=" -fPIC" ' \
'--without-debug ' \
'--prefix=/usr/local ' \
'--with-shared ' \
'--with-cxx-shared '
system './configure',
'--prefix=/usr/local',
'--without-normal',
'--with-shared',
'--with-cxx-shared',
'--without-debug'
system "make"
end
def self.install
system "make", "DESTDIR=#{CREW_DEST_DIR}", "install"
# strip binaries
system "strip", "#{CREW_DEST_DIR}/usr/local/bin/clear"
system "strip", "#{CREW_DEST_DIR}/usr/local/bin/infocmp"
system "strip", "#{CREW_DEST_DIR}/usr/local/bin/tabs"
system "strip", "#{CREW_DEST_DIR}/usr/local/bin/tic"
system "strip", "#{CREW_DEST_DIR}/usr/local/bin/tput"
system "strip", "#{CREW_DEST_DIR}/usr/local/bin/tset"
system "strip", "#{CREW_DEST_DIR}/usr/local/bin/toe"
# strip libraries here since `make install` re-link libraries again
system "find #{CREW_DEST_DIR}/usr/local -name 'lib*.so.*' -print | xargs strip -S"
end
end
require 'package'
class Ncursesw < Package
version '6.0'
version '6.0-2'
source_url 'ftp://ftp.gnu.org/pub/gnu/ncurses/ncurses-6.0.tar.gz'
source_sha1 'acd606135a5124905da770803c05f1f20dd3b21c'
depends_on "diffutils"
depends_on "diffutils" => :build
def self.build
# Check ncurses doesn't conflict with ncrusesw
......@@ -18,17 +18,29 @@ class Ncursesw < Package
end
end
# Build ncursesw
system './configure ' \
'CFLAGS=" -fPIC" ' \
'--without-debug ' \
'--prefix=/usr/local ' \
'--with-shared ' \
'--with-cxx-shared ' \
system './configure',
'--prefix=/usr/local',
'--without-normal',
'--with-shared',
'--with-cxx-shared',
'--without-debug',
'--enable-widec'
system "make"
end
def self.install
system "make", "DESTDIR=#{CREW_DEST_DIR}", "install"
# remove binary files which are installed by ncurses also
system "rm", "#{CREW_DEST_DIR}/usr/local/bin/clear"
system "rm", "#{CREW_DEST_DIR}/usr/local/bin/infocmp"
system "rm", "#{CREW_DEST_DIR}/usr/local/bin/tabs"
system "rm", "#{CREW_DEST_DIR}/usr/local/bin/tic"
system "rm", "#{CREW_DEST_DIR}/usr/local/bin/tput"
system "rm", "#{CREW_DEST_DIR}/usr/local/bin/tset"
system "rm", "#{CREW_DEST_DIR}/usr/local/bin/toe"
# strip libraries here since `make install` re-link libraries again
system "find #{CREW_DEST_DIR}/usr/local -name 'lib*.so.*' -print | xargs strip -S"
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment