Changeset View
Changeset View
Standalone View
Standalone View
Mk/bsd.openssl.mk
Show All 10 Lines | |||||
# | # | ||||
# USE_OPENSSL_RPATH=yes - Pass RFLAGS options in CFLAGS, | # USE_OPENSSL_RPATH=yes - Pass RFLAGS options in CFLAGS, | ||||
# needed for ports who don't use LDFLAGS. | # needed for ports who don't use LDFLAGS. | ||||
# | # | ||||
# Overrideable defaults: | # Overrideable defaults: | ||||
# | # | ||||
# OPENSSL_SHLIBVER= 8 | # OPENSSL_SHLIBVER= 8 | ||||
# OPENSSL_PORT= security/openssl | # OPENSSL_PORT= security/openssl | ||||
# | # | ||||
# Oerridable defaults for LibreSSL: | |||||
# | |||||
# USE_LIBRESSL= yes - Use LibreSSL as provider of libcrypto | |||||
# and libssl | |||||
# DEFAULT_VERSIONS+= libressl=2.2|2.3 - Use specific version of libressl | |||||
# | |||||
# The Makefile sets these variables: | # The Makefile sets these variables: | ||||
# OPENSSLBASE - "/usr" or ${LOCALBASE} | # OPENSSLBASE - "/usr" or ${LOCALBASE} | ||||
# OPENSSLDIR - path to openssl | # OPENSSLDIR - path to openssl | ||||
# OPENSSLLIB - path to the libs | # OPENSSLLIB - path to the libs | ||||
# OPENSSLINC - path to the matching includes | # OPENSSLINC - path to the matching includes | ||||
# OPENSSLRPATH - rpath for dynamic linker | # OPENSSLRPATH - rpath for dynamic linker | ||||
# | # | ||||
# MAKE_ENV - extended with the variables above | # MAKE_ENV - extended with the variables above | ||||
▲ Show 20 Lines • Show All 72 Lines • ▼ Show 20 Lines | |||||
OPENSSL_PORT= ${OPENSSL_INSTALLED} | OPENSSL_PORT= ${OPENSSL_INSTALLED} | ||||
OPENSSL_SHLIBFILE!= ${PKG_INFO} -ql ${OPENSSL_INSTALLED} | ${GREP} "^`${PKG_QUERY} "%p" ${OPENSSL_INSTALLED}`/lib/libcrypto.so.[0-9]*$$" | OPENSSL_SHLIBFILE!= ${PKG_INFO} -ql ${OPENSSL_INSTALLED} | ${GREP} "^`${PKG_QUERY} "%p" ${OPENSSL_INSTALLED}`/lib/libcrypto.so.[0-9]*$$" | ||||
OPENSSL_SHLIBVER?= ${OPENSSL_SHLIBFILE:E} | OPENSSL_SHLIBVER?= ${OPENSSL_SHLIBFILE:E} | ||||
.else | .else | ||||
# PKG_DBDIR was not found | # PKG_DBDIR was not found | ||||
.endif | .endif | ||||
.endif | .endif | ||||
# try to guess SHLIBVER for libressl | # LibreSSL | ||||
.if defined(OPENSSL_PORT) && ${OPENSSL_PORT} == security/libressl | .include "${PORTSDIR}/Mk/bsd.default-versions.mk" | ||||
.if "${OPENSSL_PORT}" == security/libressl | |||||
WARNING+= "OPENSSL_PORT=${OPENSSL_PORT} is defined, this is deprecated. Please use USE_LIBRESSL in stead." | |||||
USE_LIBRESSL= yes | |||||
.endif | |||||
.if defined(USE_LIBRESSL) | |||||
LIBRESSL_VER= ${LIBRESSL_DEFAULT:S/.//} | |||||
WITH_OPENSSL_PORT?= yes | |||||
OPENSSL_PORT= security/libressl${LIBRESSL_VER} | |||||
# Set the correct SHLIBVER for the LibreSSL version | |||||
.if ${LIBRESSL_VER} == 22 | |||||
OPENSSL_SHLIBVER?= 35 | OPENSSL_SHLIBVER?= 35 | ||||
.elif ${LIBRESSL_VER} == 23 | |||||
OPENSSL_SHLIBVER?= 35 | |||||
BUILD_DEPENDS+= ${LOCALBASE}/lib/libtls.so.7:${PORTSDIR}/${OPENSSL_PORT} | |||||
.else | |||||
IGNORE+= "Unsupported version of LibreSSL defined" | |||||
.endif | |||||
.endif | .endif | ||||
# default | # default | ||||
OPENSSL_PORT?= security/openssl | OPENSSL_PORT?= security/openssl | ||||
OPENSSL_SHLIBVER?= 8 | OPENSSL_SHLIBVER?= 8 | ||||
OPENSSLDIR?= ${OPENSSLBASE}/openssl | OPENSSLDIR?= ${OPENSSLBASE}/openssl | ||||
BUILD_DEPENDS+= ${LOCALBASE}/lib/libcrypto.so.${OPENSSL_SHLIBVER}:${PORTSDIR}/${OPENSSL_PORT} | BUILD_DEPENDS+= ${LOCALBASE}/lib/libcrypto.so.${OPENSSL_SHLIBVER}:${PORTSDIR}/${OPENSSL_PORT} | ||||
Show All 25 Lines |