Create perl_text_charwidth.rb (#1812)

This commit is contained in:
lovedheart
2018-02-09 22:48:42 +01:00
committed by Ed Reel
parent 7a5546d63f
commit a7cb12a706

View File

@@ -0,0 +1,32 @@
require 'package'
class Perl_text_charwidth < Package
description 'Text::CharWidth - Get number of occupied columns of a string on terminals'
homepage 'https://metacpan.org/pod/Text::CharWidth'
version '0.04'
source_url 'https://cpan.metacpan.org/authors/id/K/KU/KUBOTA/Text-CharWidth-0.04.tar.gz'
source_sha256 'abded5f4fdd9338e89fd2f1d8271c44989dae5bf50aece41b6179d8e230704f8'
depends_on 'perl'
def self.build
end
def self.install
# install files to build directory
system 'cpanm', '-l', "build", '--self-contained', '.'
# install lib
libdir = `perl -e 'require Config; print $Config::Config{'"'installsitelib'"'};'`
system "mkdir -p #{CREW_DEST_DIR}#{libdir}"
system "(cd build/lib/perl5; tar cf - .) | (cd #{CREW_DEST_DIR}#{libdir}; tar xfp -)"
# install man
mandir = "#{CREW_PREFIX}/share/man"
system "mkdir -p #{CREW_DEST_DIR}#{mandir}"
system "(cd build/man; tar cf - .) | (cd #{CREW_DEST_DIR}#{mandir}; tar xfp -)"
end
def self.check
end
end