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:
parent
2db5975cde
commit
5f7399eb32
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue