From 3c96f5b316f8d2f189a855b5a8f7236150465129 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joachim=20Mairb=C3=B6ck?= Date: Sat, 26 Oct 2024 18:25:13 +0200 Subject: [PATCH] test_warnings: new perl module recipe --- .../test_warnings/test_warnings-0.033.recipe | 57 +++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 dev-perl/test_warnings/test_warnings-0.033.recipe diff --git a/dev-perl/test_warnings/test_warnings-0.033.recipe b/dev-perl/test_warnings/test_warnings-0.033.recipe new file mode 100644 index 000000000..48660fb76 --- /dev/null +++ b/dev-perl/test_warnings/test_warnings-0.033.recipe @@ -0,0 +1,57 @@ +SUMMARY="Test for warnings and the lack of them" +DESCRIPTION="If you've ever tried to use Test::NoWarnings to confirm there are no warnings \ +generated by your tests, combined with the convenience of done_testing to not have to declare a \ +test count, you'll have discovered that these two features do not play well together, as the test \ +count will be calculated before the warnings test is run, resulting in a TAP error. (See \ +examples/test_nowarnings.pl in this distribution for a demonstration.) + +This module is intended to be used as a drop-in replacement for Test::NoWarnings: it also adds an \ +extra test, but runs this test before done_testing calculates the test count, rather than after. \ +It does this by hooking into done_testing as well as via an END block. You can declare a plan, or \ +not, and things will still Just Work." +HOMEPAGE="https://metacpan.org/pod/Test::Warnings" +COPYRIGHT="2013 by Karen Etheridge" +LICENSE="Artistic" +REVISION="1" +SOURCE_URI="https://cpan.metacpan.org/authors/id/E/ET/ETHER/Test-Warnings-$portVersion.tar.gz" +CHECKSUM_SHA256="b9c375719f2c61c5f97aa5ee6cf4c901a972347c415969379b0b51f67c48bbcb" +SOURCE_DIR="Test-Warnings-$portVersion" + +ARCHITECTURES="any" + +PROVIDES=" + test_warnings = $portVersion + " +REQUIRES=" + haiku + vendor_perl + " + +BUILD_REQUIRES=" + haiku_devel + " +BUILD_PREREQUIRES=" + cmd:make + cmd:perl + " + +BUILD() +{ + perl Makefile.PL PREFIX=$prefix + make +} + +INSTALL() +{ + 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 +}