mirror of
https://github.com/chromebrew/chromebrew.git
synced 2026-01-08 23:18:10 -05:00
Create perl_text_charwidth.rb (#1812)
This commit is contained in:
32
packages/perl_text_charwidth.rb
Normal file
32
packages/perl_text_charwidth.rb
Normal 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
|
||||
Reference in New Issue
Block a user