1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-19 19:59:43 +00:00

lang/swi-pl: USES+=ssl and handle SSLv3 method for LibreSSL support

While here, used OPSYS:tl instead of hardcoded freebsd

Approved by:	SSL blanket
This commit is contained in:
John Marino 2016-09-10 19:23:23 +00:00
parent 5c58a1ea38
commit 931da8d472
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=421730
2 changed files with 32 additions and 3 deletions

View File

@ -18,14 +18,15 @@ SWIPLDIR= ${PORTNAME:C/-//}-${PORTVERSION}
NOPRECIOUSMAKEVARS= yes
USE_XORG= xft xpm xt
USES= gmake jpeg libarchive pathfix pkgconfig shebangfix
USES= gmake jpeg libarchive pathfix pkgconfig shebangfix ssl
MAKE_JOBS_UNSAFE= yes
GNU_CONFIGURE= yes
CONFIGURE_ENV= ARCH=${ARCH}-${OPSYS:tl}
CONFIGURE_TARGET= ${ARCH}-${OPSYS:tl}
CONFIGURE_ARGS= --with-world --without-jpl --enable-shared
MAKE_ARGS= DISABLE_PKGS=jpl \
ac_cv_lib_ossp_uuid_uuid_create=no ac_cv_lib_uuid_uuid_create=no
ac_cv_lib_ossp_uuid_uuid_create=no \
ac_cv_lib_uuid_uuid_create=no
SHEBANG_LANG= swipl
swipl_OLD_CMD= /usr/bin/swipl
@ -70,6 +71,6 @@ post-patch:
post-install:
@${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/xpce-client \
${STAGEDIR}${PREFIX}/lib/${SWIPLDIR}/lib/${ARCH}-freebsd/pl2xpce.so
${STAGEDIR}${PREFIX}/lib/${SWIPLDIR}/lib/${ARCH}-${OPSYS:tl}/pl2xpce.so
.include <bsd.port.post.mk>

View File

@ -0,0 +1,28 @@
--- packages/ssl/ssl4pl.c.orig 2015-06-09 09:25:57 UTC
+++ packages/ssl/ssl4pl.c
@@ -1127,8 +1127,12 @@ pl_ssl_context(term_t role, term_t confi
if (!PL_get_atom(method, &method_name))
return PL_domain_error("ssl_method", method);
- if (method_name == ATOM_sslv3)
+ if (0)
+ { /* never reached */ }
+#ifndef OPENSSL_NO_SSL3
+ else if (method_name == ATOM_sslv3)
ssl_method = SSLv3_method();
+#endif
#ifdef HAVE_SSLV2_METHOD
else if (method_name == ATOM_sslv2)
ssl_method = SSLv2_method();
@@ -1736,9 +1740,11 @@ pl_ssl_session(term_t stream_t, term_t s
PL_INTEGER, (int)session->ssl_version))
return FALSE;
+#ifndef OPENSSL_NO_SSL2
if ( !add_key_string(list_t, FUNCTOR_session_key1,
session->key_arg_length, session->key_arg) )
return FALSE;
+#endif
if ( !add_key_string(list_t, FUNCTOR_master_key1,
session->master_key_length, session->master_key) )