diff --git a/dev-perl/net_ssleay/net_ssleay-1.94.recipe b/dev-perl/net_ssleay/net_ssleay-1.94.recipe new file mode 100644 index 000000000..5a12e8f29 --- /dev/null +++ b/dev-perl/net_ssleay/net_ssleay-1.94.recipe @@ -0,0 +1,63 @@ +SUMMARY="Perl bindings for OpenSSL and LibreSSL" +DESCRIPTION="This module provides Perl bindings for libssl (an SSL/TLS API) and libcrypto (a \ +cryptography API)." +HOMEPAGE="https://metacpan.org/pod/Net::SSLeay" +COPYRIGHT="1996-2003 Sampo Kellomäki + 2005-2010 Florian Ragwitz + 2005-2018 Mike McCauley + 2018 Tuure Vartiainen + 2018- Chris Novakovic + 2018- Heikki Vatiainen" +LICENSE="Artistic v2.0" +REVISION="1" +SOURCE_URI="https://cpan.metacpan.org/authors/id/C/CH/CHRISN/Net-SSLeay-$portVersion.tar.gz" +CHECKSUM_SHA256="9d7be8a56d1bedda05c425306cc504ba134307e0c09bda4a788c98744ebcd95d" +SOURCE_DIR="Net-SSLeay-$portVersion" +PATCHES="net_ssleay-$portVersion.patchset" + +ARCHITECTURES="all !x86_gcc2" +SECONDARY_ARCHITECTURES="x86" + +PROVIDES=" + net_ssleay$secondaryArchSuffix = $portVersion + " +if [ -n "$secondaryArchSuffix" ]; then + PROVIDES+=" + net_ssleay = $portVersion + " +fi +REQUIRES=" + haiku$secondaryArchSuffix + vendor_perl + lib:libcrypto$secondaryArchSuffix + lib:libssl$secondaryArchSuffix + lib:libz$secondaryArchSuffix + " + +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel + " +BUILD_PREREQUIRES=" + cmd:gcc$secondaryArchSuffix + cmd:make + cmd:perl + devel:libcrypto$secondaryArchSuffix >= 3 + devel:libssl$secondaryArchSuffix >= 3 + devel:libz$secondaryArchSuffix + " + +BUILD() +{ + perl Makefile.PL PREFIX=$prefix + make +} + +INSTALL() +{ + make pure_install +} + +TEST() +{ + make test +} diff --git a/dev-perl/net_ssleay/patches/net_ssleay-1.94.patchset b/dev-perl/net_ssleay/patches/net_ssleay-1.94.patchset new file mode 100644 index 000000000..628ddec57 --- /dev/null +++ b/dev-perl/net_ssleay/patches/net_ssleay-1.94.patchset @@ -0,0 +1,82 @@ +From c92c896c3b8219c25175b4ef1b4b33064d1f1767 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Joachim=20Mairb=C3=B6ck?= +Date: Sun, 26 Jan 2025 15:16:12 +0100 +Subject: add Haiku header and library paths + + +diff --git a/Makefile.PL b/Makefile.PL +index 94c72f2..c358621 100644 +--- a/Makefile.PL ++++ b/Makefile.PL +@@ -224,6 +224,8 @@ sub ssleay_get_build_opts { + my @try_includes = ( + 'include' => sub { 1 }, + 'inc32' => sub { $OSNAME eq 'MSWin32' }, ++ 'develop/headers/x86' => sub { $OSNAME eq 'haiku' && $Config{'archname'} =~ /BePC/ }, ++ 'develop/headers' => sub { $OSNAME eq 'haiku' }, + ); + + while ( +@@ -244,6 +246,8 @@ sub ssleay_get_build_opts { + # phase fails. + my @try_lib_paths = ( + ["$prefix/lib64", "$prefix/lib", "$prefix/out32dll", $prefix] => sub {$OSNAME eq 'darwin' }, ++ ["$prefix/develop/lib/x86"] => sub { $OSNAME eq 'haiku' && $Config{'archname'} =~ /BePC/ }, ++ ["$prefix/develop/lib"] => sub { $OSNAME eq 'haiku' }, + [$prefix, "$prefix/lib64", "$prefix/lib", "$prefix/out32dll"] => sub { 1 }, + ); + +-- +2.45.2 + + +From 105d28de7fb430720cf7bbe7269609f512299a04 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Joachim=20Mairb=C3=B6ck?= +Date: Sun, 26 Jan 2025 15:16:51 +0100 +Subject: disable network tests and the interactive prompt for them + + +diff --git a/Makefile.PL b/Makefile.PL +index c358621..3b2222b 100644 +--- a/Makefile.PL ++++ b/Makefile.PL +@@ -28,11 +28,7 @@ use constant ALERT_WIDTH => 78; + # the Net-SSLeay loadable object on Windows + my $win_link_statically = 0; + +-my $tests = prompt( +- "Do you want to run external tests?\n". +- "These tests *will* *fail* if you do not have network connectivity.", +- 'n', +-) =~ /^y/i ? 't/*/*.t t/*/*/*.t' : 't/local/*.t t/handle/local/*.t'; ++my $tests = 't/local/*.t t/handle/local/*.t'; + + my %eumm_args = ( + NAME => 'Net::SSLeay', +-- +2.45.2 + + +From 808cb091caa20c92d28b8b740d6e526a80c9af25 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Joachim=20Mairb=C3=B6ck?= +Date: Sun, 26 Jan 2025 16:42:26 +0100 +Subject: increase timeout for test + +The test took 142 seconds on my system (running in VirtualBox which could be the issue here). + +diff --git a/t/local/62_threads-ctx_new-deadlock.t b/t/local/62_threads-ctx_new-deadlock.t +index fac8808..cdb2f4b 100644 +--- a/t/local/62_threads-ctx_new-deadlock.t ++++ b/t/local/62_threads-ctx_new-deadlock.t +@@ -33,7 +33,7 @@ eval { Net::SSLeay::OPENSSL_INIT_NO_ATEXIT(); return 1; } ? + my $start_time = time; + + #exit the whole program if it runs too long +-threads->new( sub { sleep 20; warn "FATAL: TIMEOUT!"; exit } )->detach; ++threads->new( sub { sleep 200; warn "FATAL: TIMEOUT!"; exit } )->detach; + + #print STDERR "Gonna start multi-threading part\n"; + threads->new(\&do_check) for (1..100); +-- +2.45.2 +