From fdc2d3f8ee7f93513d6f6effb69813640580c05a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joachim=20Mairb=C3=B6ck?= Date: Sun, 17 Sep 2023 10:51:34 +0200 Subject: [PATCH] text_patch: add tests, cleanup Tests require algorithm_diff (see previous commit). --- dev-perl/text_patch/text_patch-1.8.recipe | 28 ++++++++++++++++------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/dev-perl/text_patch/text_patch-1.8.recipe b/dev-perl/text_patch/text_patch-1.8.recipe index bfcc40bcf..d34e7f027 100644 --- a/dev-perl/text_patch/text_patch-1.8.recipe +++ b/dev-perl/text_patch/text_patch-1.8.recipe @@ -1,12 +1,10 @@ -SUMMARY="Get information about a class and its structure" -DESCRIPTION="Class::Inspector allows you to get information about a loaded class. Most or all of \ -this information can be found in other ways, but they aren't always very friendly, and usually \ -involve a relatively high level of Perl wizardry, or strange and unusual looking code. \ -Class::Inspector attempts to provide an easier, more friendly interface to this information." +SUMMARY="Patches text with given patch" +DESCRIPTION="Text::Patch combines source text with given diff (difference) data. Diff data is \ +produced by Text::Diff module or by the standard diff utility (man diff, see -u option)." HOMEPAGE="https://metacpan.org/pod/Text::Patch" -COPYRIGHT="2002-2019 by Adam Kennedy" +COPYRIGHT="2007-2010 by Vladi Belperchinov-Shabanski" LICENSE="Artistic" -REVISION="1" +REVISION="2" SOURCE_URI="https://cpan.metacpan.org/authors/id/C/CA/CADE/Text-Patch-$portVersion.tar.gz" CHECKSUM_SHA256="eaf18e61ba6a3e143846a7cc66f08ce58a0c4fbda92acb31aede25cb3b5c3dcc" SOURCE_DIR="Text-Patch-$portVersion" @@ -30,6 +28,10 @@ BUILD_PREREQUIRES=" cmd:perl " +TEST_REQUIRES=" + algorithm_diff + " + BUILD() { perl Makefile.PL PREFIX=$prefix @@ -38,5 +40,15 @@ BUILD() INSTALL() { - make install DESTDIR="${DESTDIR}" + make pure_install + + # remove architecture-specific files + cd $prefix + rm -r $(perl -V:vendorarch | cut -d\' -f2 | cut -d/ -f5-) + # cut extracts the quoted string and strips the prefix (which is perl's and not ours) +} + +TEST() +{ + make test }