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

parent adee0e73
...@@ -3,24 +3,36 @@ require 'package' ...@@ -3,24 +3,36 @@ require 'package'
class Ncurses < 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.' 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/' 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_url 'ftp://ftp.gnu.org/pub/gnu/ncurses/ncurses-6.0.tar.gz'
source_sha1 'acd606135a5124905da770803c05f1f20dd3b21c' source_sha1 'acd606135a5124905da770803c05f1f20dd3b21c'
depends_on "diffutils" depends_on "diffutils" => :build
depends_on "ncursesw" depends_on "ncursesw"
def self.build def self.build
system './configure ' \ system './configure',
'CFLAGS=" -fPIC" ' \ '--prefix=/usr/local',
'--without-debug ' \ '--without-normal',
'--prefix=/usr/local ' \ '--with-shared',
'--with-shared ' \ '--with-cxx-shared',
'--with-cxx-shared ' '--without-debug'
system "make" system "make"
end end
def self.install def self.install
system "make", "DESTDIR=#{CREW_DEST_DIR}", "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
end end
require 'package' require 'package'
class Ncursesw < 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_url 'ftp://ftp.gnu.org/pub/gnu/ncurses/ncurses-6.0.tar.gz'
source_sha1 'acd606135a5124905da770803c05f1f20dd3b21c' source_sha1 'acd606135a5124905da770803c05f1f20dd3b21c'
depends_on "diffutils" depends_on "diffutils" => :build
def self.build def self.build
# Check ncurses doesn't conflict with ncrusesw # Check ncurses doesn't conflict with ncrusesw
...@@ -18,17 +18,29 @@ class Ncursesw < Package ...@@ -18,17 +18,29 @@ class Ncursesw < Package
end end
end end
# Build ncursesw # Build ncursesw
system './configure ' \ system './configure',
'CFLAGS=" -fPIC" ' \ '--prefix=/usr/local',
'--without-debug ' \ '--without-normal',
'--prefix=/usr/local ' \ '--with-shared',
'--with-shared ' \ '--with-cxx-shared',
'--with-cxx-shared ' \ '--without-debug',
'--enable-widec' '--enable-widec'
system "make" system "make"
end end
def self.install def self.install
system "make", "DESTDIR=#{CREW_DEST_DIR}", "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
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