freebsd-ports/security/p5-Crypt-SSLeay/Makefile
Dimitry Andric 6597d3e9cc security/p5-Crypt-SSLeay: fix build with clang 15
During an exp-run for llvm 15 (see bug 265425), it turned out that
security/p5-Crypt-SSLeay failed to build with clang 15:

  SSLeay.xs:159:31: warning: call to undeclared function 'SSLv2_client_method'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
              ctx = SSL_CTX_new(SSLv2_client_method());
                                ^
  SSLeay.xs:159:31: error: incompatible integer to pointer conversion passing 'int' to parameter of type 'const SSL_METHOD *' (aka 'const struct ssl_method_st *') [-Wint-conversion]
              ctx = SSL_CTX_new(SSLv2_client_method());
                                ^~~~~~~~~~~~~~~~~~~~~

This is because SSLeay.xs uses the obsolete define OPENSSL_NO_SSL2 to
determine whether OpenSSL still supports SSLv2. Since this define was
removed from OpenSSL 1.1 and later, define it via CFLAGS instead.

PR:		268258
Approved by:	portmgr (tcberner)
MFH:		2022Q4
2022-12-18 18:28:19 +01:00

28 lines
752 B
Makefile

PORTNAME= Crypt-SSLeay
PORTVERSION= 0.72
PORTREVISION= 3
CATEGORIES= security perl5
MASTER_SITES= CPAN
PKGNAMEPREFIX= p5-
MAINTAINER= perl@FreeBSD.org
COMMENT= Perl5 interface to allow p5-libwww LWP to make https connections
WWW= https://metacpan.org/release/Crypt-SSLeay
LICENSE= ART20
BUILD_DEPENDS= p5-LWP-Protocol-https>=6.02:www/p5-LWP-Protocol-https \
p5-Path-Class>=0.26:devel/p5-Path-Class \
p5-Try-Tiny>=0.19:lang/p5-Try-Tiny
RUN_DEPENDS= p5-LWP-Protocol-https>=6.02:www/p5-LWP-Protocol-https
USES= perl5 ssl
USE_PERL5= configure
CONFIGURE_ARGS= --no-live-tests
CFLAGS+= -I${OPENSSLINC}
CFLAGS+= -DOPENSSL_NO_SSL2
post-install:
${STRIP_CMD} ${STAGEDIR}${PREFIX}/${SITE_ARCH_REL}/auto/Crypt/SSLeay/SSLeay.so
.include <bsd.port.mk>