From cc066727423e582ce30f7e4b4b3122247eea2af4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joachim=20Mairb=C3=B6ck?= Date: Sat, 25 Jan 2025 20:58:45 +0100 Subject: [PATCH] test_requiresinternet: new perl module recipe --- .../test_requiresinternet-0.05.recipe | 59 +++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 dev-perl/test_requiresinternet/test_requiresinternet-0.05.recipe diff --git a/dev-perl/test_requiresinternet/test_requiresinternet-0.05.recipe b/dev-perl/test_requiresinternet/test_requiresinternet-0.05.recipe new file mode 100644 index 000000000..66062c9b7 --- /dev/null +++ b/dev-perl/test_requiresinternet/test_requiresinternet-0.05.recipe @@ -0,0 +1,59 @@ +SUMMARY="Easily test network connectivity" +DESCRIPTION="This module is intended to easily test network connectivity before functional tests \ +begin to non-local Internet resources. It does not require any modules beyond those supplied in \ +core Perl. +If you do not specify a host/port pair, then the module defaults to using www.google.com on port 80. +You may optionally specify the port by its name, as in http or ldap. If you do this, the test \ +module will attempt to look up the port number using getservbyname. +If you do specify a host and port, they must be specified in pairs. It is a fatal error to omit \ +one or the other. +If the environment variable NO_NETWORK_TESTING is set, then the tests will be skipped without \ +attempting any socket connections. +If the sockets cannot connect to the specified hosts and ports, the exception is caught, reported \ +and the tests skipped." +HOMEPAGE="https://metacpan.org/pod/Test::RequiresInternet" +COPYRIGHT="2014 by Mark Allen" +LICENSE="Artistic" +REVISION="1" +SOURCE_URI="https://cpan.metacpan.org/authors/id/M/MA/MALLEN/Test-RequiresInternet-$portVersion.tar.gz" +CHECKSUM_SHA256="bba7b32a1cc0d58ce2ec20b200a7347c69631641e8cae8ff4567ad24ef1e833e" +SOURCE_DIR="Test-RequiresInternet-$portVersion" + +ARCHITECTURES="any" + +PROVIDES=" + test_requiresinternet = $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 +}