Subject: | [PATCH] VMS build help for Net::SSLeay 1.49 |
Date: | Thu, 27 Sep 2012 10:24:33 -0500 |
To: | bug-Net-SSLeay [...] rt.cpan.org |
From: | "Craig A. Berry" <craigberry [...] mac.com> |
The first of the attached patches modifies the build procedures so that Net::SSLeay 1.49 builds on VMS. Here's what I did to get things working:
1.) Ported Module::Install to VMS (see <https://rt.cpan.org/Ticket/Display.html?id=79858>). Not included in the patch here, but just mentioning it so you'll keep an eye on Module::Install updates.
2.) The custom postamble in Makefile.PL was using hard-coded Unix-format paths and a hard-coded .o extension for the SSLeay object file. Now it uses the appropriate values for whatever platform we're running on.
3.) In inc::Module::Install::PRIVATE::Net::SSLeay.pm::ssleay_get_build_opts, added VMS-specific code to detect either a source build of OpenSSL or the HP-supplied kit installation.
4.) In inc::Module::Install::PRIVATE::Net::SSLeay.pm::check_no_path, there was a call to ExtUtils::Liblist->ext() that failed because the code in ExtUtils::Liblist::Kid::_vms_ext that we get dispatched to references $self, but $self ISA ExtUtils::Liblist rather than ExtUtils::MakeMaker. There is a comment at the top of ExtUtils::Liblist::Kid that says, "This kid package is to be used by MakeMaker. It will not work if $self is not a Makemaker." So to meet that requirement I changed to using ExtUtils::MM, which flattens together MakeMaker and Liblist, rather than Liblist directly.
5.) In inc::Module::Install::PRIVATE::Net::SSLeay.pm::find_openssl_prefix(), I added appropriate guesses to the list for locating installations of OpenSSL on VMS. I also noticed that there appeared to be an expectation that the guesses would be tried in order, but they were stored in a hash, which returns them in random order. So I converted the hash to an array.
6.) inc::Module::Install::PRIVATE::Net::SSLeay.pm::find_openssl_exec(), added appropriate binary locations.
7.) Several of the tests were using fork(), which is not available, so I made them skip when $Config{d_fork} is false.
The second patch fixes a few compiler warnings in SSLeay.xs. Most of them are just signed/unsigned pointer mismatches but there is one that actually fixes returning what would be an arbitrary value off the stack from get_my_thread_id if it happened to be called in a non-threaded build.
After these two patches (plus the Module::Install fix), Net::SSLeay builds just fine and passes all tests on VMS with perl 5.16.1. I also tested the patches on Mac OS X and everything still looks good there as well.
Show quoted text
________________________________________
Craig A. Berry
mailto:craigberry@mac.com
"... getting out of a sonnet is much more
difficult than getting in."
Brad Leithauser
Message body is not shown because sender requested not to inline it.
Message body is not shown because sender requested not to inline it.