dev-perl/File-Rename: add 2.01

Signed-off-by: Alfred Wingate <parona@protonmail.com>
This commit is contained in:
Alfred Wingate 2023-07-17 17:35:21 +03:00
parent f739003834
commit e7c7447c68
No known key found for this signature in database
GPG Key ID: A12750536B5E7010
2 changed files with 62 additions and 0 deletions

View File

@ -0,0 +1,61 @@
# Copyright 2021-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DIST_AUTHOR=RMBARKER
inherit perl-module
DESCRIPTION="Perl extension for renaming multiple files"
SLOT="0"
KEYWORDS="~amd64"
# No virtuals for
# Pod::Usage
# File::Basename
RDEPEND="
>=virtual/perl-ExtUtils-MakeMaker-7.36
virtual/perl-File-Spec
>=virtual/perl-Getopt-Long-2.24
"
BDEPEND="
test? (
${RDEPEND}
virtual/perl-File-Temp
)
"
#BDEPEND="
# dev-perl/Module-Build
# virtual/perl-File-Spec
#"
# There are differences between distributions on the name of this binary.
# currently Debian derivatives call it prename while Arch derivatives call
# it perl-rename. It can't be named "rename" as util-linux provides
# a binary of the same name.
src_prepare() {
eapply_user
# Rename script name from "rename" to "prename" to not conflict with "rename" from util-linux
sed -i \
-e'/my \$script/,/;/ s/\([^-]\)rename/\1prename/' \
-e '/my \$unsafe/,/;/ s/\([^-]\)unsafe-rename/\1unsafe-prename/' \
Makefile.PL || die
# Modify man page to make sense with previous change to script name
sed -i \
-e '/\=head1 NAME/,/^rename/ s/^rename/prename/' \
-e '/\=head1 SYNOPSIS/,/B<rename>/ s/B<rename>/B<prename>/' \
-e '/\=head1 DESCRIPTION/,/C<rename>/ s/C<rename>/C<prename>/' \
-e '/\=head2 Examples/,/\=head1 OPTIONS/ s/\(^\s\)rename/\1prename/' \
source/rename || die
# Also modify tests so that they work with the above changes
sed -i \
-e '/sub script_name/,/;/ s/\([^-]\)rename/\1prename/' \
-e '/sub unsafe_script_name/,/;/ s/\([^-]\)unsafe-rename/\1unsafe-prename/' \
t/testlib.pl || die
sed -i "s/my \$generic = 'rename';/my \$generic = 'prename';/" t/rename-examples.t || die
sed -i "s/my \$generic = 'rename';/my \$generic = 'prename';/" t/u/rename-examples.t || die
}

View File

@ -1,2 +1,3 @@
DIST File-Rename-1.20.tar.gz 15139 BLAKE2B b0ecdd0ceda467c7fe92bd218d91dc950686d79756690ced78173c87affb93547067df2fbb567b987d6b5acf9afabd56eb0930840b0add7716aeb83dcaa72f3a SHA512 3ba6bfe6f1b69c4f8e43ea7164d6c84a368f4954e29ca731bc7e59d35b59a62c82aa9d7a1a617c15d63a227ba5c73f76d1cb0939d1b393fd2c53fe8d4f441966 DIST File-Rename-1.20.tar.gz 15139 BLAKE2B b0ecdd0ceda467c7fe92bd218d91dc950686d79756690ced78173c87affb93547067df2fbb567b987d6b5acf9afabd56eb0930840b0add7716aeb83dcaa72f3a SHA512 3ba6bfe6f1b69c4f8e43ea7164d6c84a368f4954e29ca731bc7e59d35b59a62c82aa9d7a1a617c15d63a227ba5c73f76d1cb0939d1b393fd2c53fe8d4f441966
DIST File-Rename-1.31.tar.gz 14918 BLAKE2B c850a307f8f6867111e14b0110401304325de53857f3ba1f4dd703246a3f19b4cb805d058fd52f24fb19fecf28a65882d3e626bbdb6d6d0088dd583b2f80ce38 SHA512 167e9febe279ab5ee29b748310e321c09c165cec717618c7668b846262fd898ada40c16c5b6b92baea2553ff827a6bd285f4801bd9487245b4715dfcafee9428 DIST File-Rename-1.31.tar.gz 14918 BLAKE2B c850a307f8f6867111e14b0110401304325de53857f3ba1f4dd703246a3f19b4cb805d058fd52f24fb19fecf28a65882d3e626bbdb6d6d0088dd583b2f80ce38 SHA512 167e9febe279ab5ee29b748310e321c09c165cec717618c7668b846262fd898ada40c16c5b6b92baea2553ff827a6bd285f4801bd9487245b4715dfcafee9428
DIST File-Rename-2.01.tar.gz 17018 BLAKE2B 6025d67570bb5196fd6177501ed03999856d9ccccfe6c27d743d2ffe20ba78dcf2208a24c62795f4ba8503fe75769763e72a8044fe924f1ae39e8cf1ee628f9f SHA512 7cbb08facf94c1246a9a1bed6baa1a0e1eface35d5baab1726596daa51b1eb4beb2bfcc75de5945d4fcd265c5119db5e1ef5b9280fc4dbbc1735e2d80d922cae