Skip Menu |
 

This queue is for tickets about the Crypt-OpenSSL-Random CPAN distribution.

Report information
The Basics
Id: 56455
Status: open
Priority: 0/
Queue: Crypt-OpenSSL-Random

People
Owner: Nobody in particular
Requestors: kmx [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Win32 compatibility patch
Hi,

Please consider aplying the following simple patch to Makefile.PL that enables building this module on Win32 Strawberry Perl

diff -ru Crypt-OpenSSL-Random-0.04.orig\Makefile.PL Crypt-OpenSSL-Random-0.04\Makefile.PL
--- Crypt-OpenSSL-Random-0.04.orig\Makefile.PL    Mon Apr 09 04:17:54 2001
+++ Crypt-OpenSSL-Random-0.04\Makefile.PL    Sat Apr 10 08:51:32 2010
@@ -5,7 +5,7 @@
     'NAME'        => 'Crypt::OpenSSL::Random',
     'VERSION_FROM'    => 'Random.pm', # finds $VERSION
     'PREREQ_PM'        => {}, # e.g., Module::Name => 1.1
-    'LIBS'            => ['-lssl -lcrypto'],   # e.g., '-lm'
+    'LIBS'            => ($^O eq 'MSWin32') ? ['-lssl32 -leay32'] : ['-lssl -lcrypto'],
     'DEFINE'        => '', # e.g., '-DHAVE_SOMETHING'
     'INC'        => '', # e.g., '-I/usr/include/other'
 );


--
kmx
From: mpapet [...] yahoo.com
Download (untitled) / with headers
text/plain 890b
On Sat Apr 10 03:16:10 2010, KMX wrote: Show quoted text
> Hi, > > Please consider aplying the following simple patch to Makefile.PL that > enables > building this module on Win32 Strawberry Perl > > diff -ru Crypt-OpenSSL-Random-0.04.orig\Makefile.PL > Crypt-OpenSSL-Random-0.04\Makefile.PL > --- Crypt-OpenSSL-Random-0.04.orig\Makefile.PL Mon Apr 09 04:17:54 > 2001 > +++ Crypt-OpenSSL-Random-0.04\Makefile.PL Sat Apr 10 08:51:32 2010 > @@ -5,7 +5,7 @@ > 'NAME' => 'Crypt::OpenSSL::Random', > 'VERSION_FROM' => 'Random.pm', # finds $VERSION > 'PREREQ_PM' => {}, # e.g., Module::Name => 1.1 > - 'LIBS' => ['-lssl -lcrypto'], # e.g., '-lm' > + 'LIBS' => ($^O eq 'MSWin32') ? ['-lssl32 -leay32'] : ['-lssl > -lcrypto'], > 'DEFINE' => '', # e.g., '-DHAVE_SOMETHING' > 'INC' => '', # e.g., '-I/usr/include/other' > ); > > > -- > kmx
Hello, This change works for me on Strawberry Perl. I recommend it.
Download (untitled) / with headers
text/plain 441b
On Sat Apr 10 03:16:10 2010, KMX wrote: Show quoted text
> Please consider aplying the following simple patch to Makefile.PL that > enables > building this module on Win32 Strawberry Perl
This change doesn't make module working on ActiveState with MSVC compiler. Additional check should be made to use '-llibeay32 -lssleay32' if $Config{'cc'} eq 'cl' Show quoted text
> + 'LIBS' => ($^O eq 'MSWin32') ? ['-lssl32 -leay32'] : ['-lssl > -lcrypto'],
-- Serguei Trouchelle
Show quoted text
> This change doesn't make module working on ActiveState with MSVC
> compiler. Additional check should be made to use '-llibeay32 -lssleay32'
> if $Config{'cc'} eq 'cl'

OK, here is another approach covering MSVC as well as GCC compiler on MS Windows.

Please put the enclosed file MSWin32.pl to Crypt-OpenSSL-Random-0.04\hints\MSWin32.pl (no changes to Makefile.PL needed).

--
kmx

Subject: MSWin32.pl
Download MSWin32.pl
text/x-perl 145b
use Config; $self->{LIBS} = ['-lssleay32 -llibeay32'] if $Config{cc} =~ /cl/; $self->{LIBS} = ['-lssl32 -leay32'] if $Config{cc} =~ /gcc/;


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.