CC: | Shaun Jackman <sjackman [...] gmail.com> |
Subject: | Patch to allow building Net:SSLeay on Linuxbrew (currently only supports MacOS brew) |
Date: | Wed, 28 Jun 2017 17:56:09 +1000 |
To: | bug-Net-SSLeay [...] rt.cpan.org |
From: | Torsten Seemann <torsten.seemann [...] gmail.com> |
Hello,
I have discovered a bug when building Net::SSLeay under Linuxbrew (a
linuxbrew version of MacOS Homebrew). The problem applies to all
'non-standard' openssl installations, but here I provide a fix to work with
the default Linuxbrew installation prefix:
File: *Net-SSLeay-1.81/inc/Module/Install/PRIVATE/Net/SSLeay.pm*
my @guesses = (
* '/home/linuxbrew/.linuxbrew/opt/openssl/bin/openssl' =>
'/home/linuxbrew/.linuxbrew/opt/openssl', # LinuxBrew openssl*
'/usr/local/opt/openssl/bin/openssl' => '/usr/local/opt/openssl', #
OSX homebrew openssl
'/usr/local/bin/openssl' => '/usr/local', # OSX homebrew
openssl
'/opt/local/bin/openssl' => '/opt/local', # Macports openssl
'/usr/bin/openssl' => '/usr',
'/usr/sbin/openssl' => '/usr',
'/opt/ssl/bin/openssl' => '/opt/ssl',
'/opt/ssl/sbin/openssl' => '/opt/ssl',
'/usr/local/ssl/bin/openssl' => '/usr/local/ssl',
'/usr/local/openssl/bin/openssl' => '/usr/local/openssl',
'/apps/openssl/std/bin/openssl' => '/apps/openssl/std',
'/usr/sfw/bin/openssl' => '/usr/sfw', # Open Solaris
'C:\OpenSSL\bin\openssl.exe' => 'C:\OpenSSL',
'C:\OpenSSL-Win32\bin\openssl.exe' => 'C:\OpenSSL-Win32',
$Config{prefix} . '\bin\openssl.exe' => $Config{prefix},
# strawberry perl
$Config{prefix} . '\..\c\bin\openssl.exe' => $Config{prefix} .
'\..\c', # strawberry perl
'/sslexe/openssl.exe' => '/sslroot', # VMS, openssl.org
'/ssl$exe/openssl.exe' => '/ssl$root', # VMS, HP install
);
It might also be useful to ALSO include a line like this for user-based
installations (non-root)
* $ENV{HOME}.'/.linuxbrew/opt/openssl/bin/openssl' =>
$ENV{HOME}.'/.linuxbrew/opt/openssl', # LinuxBrew (user) openssl*
Thank you for considering this patch.
--Torsten Seemann