perl/perl-Config-Find: Fix build if perl-Test-Pod is installed.

Signed-off-by: B. Watson <yalhcru@gmail.com>

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
B. Watson 2022-03-01 01:40:37 -05:00 committed by Willy Sudiarto Raharjo
parent 2db5975cde
commit 5f7399eb32
No known key found for this signature in database
GPG Key ID: 3F617144D7238786
1 changed files with 18 additions and 20 deletions

View File

@ -22,27 +22,21 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# 20220222 bkw: Modified by SlackBuilds.org, BUILD=2:
# - make this noarch, since there's no compiled code.
# - fix build if perl-Test-Pod is installed.
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=perl-Config-Find
VERSION=${VERSION:-0.26}
BUILD=${BUILD:-1}
BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
ARCH=noarch
SRCNAM="$( echo $PRGNAM | cut -d- -f2- )"
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i486 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi
# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
# the name of the created package would be, and then exit. This information
# could be useful to other scripts.
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
exit 0
@ -61,11 +55,17 @@ rm -rf $SRCNAM-$VERSION
tar xvf $CWD/$SRCNAM-$VERSION.tar.gz
cd $SRCNAM-$VERSION
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \
-exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
# 20220301 bkw: permissions are most bletcherous, don't revert to template.
find . -type f -exec chmod 644 {} \+
find . -type d -exec chmod 755 {} \+
# 20220301 bkw: if perl-Test-POD was installed, the test "t/3_pods.t" was
# failing, because the .pm files didn't specify an encoding for the
# embedded POD docs, and there's a non-ASCII character in the author's
# name in every file. The easy way to fix it would have been:
# rm -f t/3_pods.t
# but the *correct* fix is to do this:
sed -i '2i\\n=encoding latin1\n\n=cut\n\n' lib/Config/Find{/*,.pm}
perl Makefile.PL \
PREFIX=/usr \
@ -74,9 +74,7 @@ perl Makefile.PL \
make
make test
make install DESTDIR=$PKG
find $PKG/usr/man -type f -exec gzip -9 {} \;
for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
gzip $PKG/usr/man/man*/*
find $PKG -name perllocal.pod -o -name ".packlist" -o -name "*.bs" | xargs rm -f || true