Lines 31-46
Link Here
|
31 |
|
31 |
|
32 |
OpenSSL_Include_MAINTAINER= dinoex@FreeBSD.org |
32 |
OpenSSL_Include_MAINTAINER= dinoex@FreeBSD.org |
33 |
|
33 |
|
34 |
# If no preference was set, check for an installed base version |
34 |
.include "${PORTSDIR}/Mk/bsd.default-versions.mk" |
35 |
# but give an installed port preference over it. |
|
|
36 |
.if !defined(WITH_OPENSSL_BASE) && \ |
37 |
!defined(WITH_OPENSSL_PORT) && \ |
38 |
!exists(${DESTDIR}/${LOCALBASE}/lib/libcrypto.so) && \ |
39 |
exists(${DESTDIR}/usr/include/openssl/opensslv.h) |
40 |
WITH_OPENSSL_BASE=yes |
41 |
.endif |
42 |
|
35 |
|
43 |
.if defined(WITH_OPENSSL_BASE) |
36 |
.if ${SSL_DEFAULT} == base |
44 |
OPENSSLBASE= /usr |
37 |
OPENSSLBASE= /usr |
45 |
OPENSSLDIR?= /etc/ssl |
38 |
OPENSSLDIR?= /etc/ssl |
46 |
|
39 |
|
Lines 59-65
check-depends::
Link Here
|
59 |
@${ECHO_CMD} "Dependency error: This port wants the OpenSSL library from the FreeBSD" |
52 |
@${ECHO_CMD} "Dependency error: This port wants the OpenSSL library from the FreeBSD" |
60 |
@${ECHO_CMD} "base system. You can't build against it, while a newer" |
53 |
@${ECHO_CMD} "base system. You can't build against it, while a newer" |
61 |
@${ECHO_CMD} "version is installed by a port." |
54 |
@${ECHO_CMD} "version is installed by a port." |
62 |
@${ECHO_CMD} "Please deinstall the port or undefine WITH_OPENSSL_BASE." |
55 |
@${ECHO_CMD} "Please deinstall the port, remove DEFAULT_VERSIONS=ssl=base or undefine WITH_OPENSSL_BASE." |
63 |
@${FALSE} |
56 |
@${FALSE} |
64 |
. endif |
57 |
. endif |
65 |
|
58 |
|
Lines 81-119
OPENSSL_CFLAGS+= -DNO_IDEA
Link Here
|
81 |
MAKE_ARGS+= OPENSSL_CFLAGS="${OPENSSL_CFLAGS}" |
74 |
MAKE_ARGS+= OPENSSL_CFLAGS="${OPENSSL_CFLAGS}" |
82 |
. endif |
75 |
. endif |
83 |
|
76 |
|
84 |
.else # !defined(WITH_OPENSSL_BASE) |
77 |
.else # ${SSL_DEFAULT} != base |
85 |
|
78 |
|
86 |
OPENSSLBASE= ${LOCALBASE} |
79 |
OPENSSLBASE= ${LOCALBASE} |
87 |
. if !defined(OPENSSL_PORT) && \ |
|
|
88 |
exists(${DESTDIR}/${LOCALBASE}/lib/libcrypto.so) |
89 |
# find installed port and use it for dependency |
90 |
. if !defined(OPENSSL_INSTALLED) |
91 |
. if defined(DESTDIR) |
92 |
PKGARGS= -c ${DESTDIR} |
93 |
. else |
94 |
PKGARGS= |
95 |
. endif |
96 |
OPENSSL_INSTALLED!= ${PKG_BIN} ${PKGARGS} which -qo ${LOCALBASE}/lib/libcrypto.so || : |
97 |
. endif |
98 |
. if defined(OPENSSL_INSTALLED) && ${OPENSSL_INSTALLED} != "" |
99 |
OPENSSL_PORT= ${OPENSSL_INSTALLED} |
100 |
OPENSSL_SHLIBFILE!= ${PKG_INFO} -ql ${OPENSSL_INSTALLED} | ${GREP} "^`${PKG_QUERY} "%p" ${OPENSSL_INSTALLED}`/lib/libcrypto.so.[0-9]*$$" |
101 |
OPENSSL_SHLIBVER?= ${OPENSSL_SHLIBFILE:E} |
102 |
. endif |
103 |
. endif |
104 |
|
80 |
|
105 |
# LibreSSL and OpenSSL-BETA specific SHLIBVER |
81 |
OPENSSL_PORT= security/${SSL_DEFAULT} |
106 |
. if defined(OPENSSL_PORT) && ${OPENSSL_PORT} == security/libressl |
82 |
|
107 |
OPENSSL_SHLIBVER?= 37 |
83 |
# Get OPENSSL_SHLIBVER from the port |
108 |
. elif defined(OPENSSL_PORT) && ${OPENSSL_PORT} == security/libressl-devel |
84 |
.sinclude <${PORTSDIR}/${OPENSSL_PORT}/version.mk> |
109 |
OPENSSL_SHLIBVER?= 38 |
|
|
110 |
. elif defined(OPENSSL_PORT) && ${OPENSSL_PORT} == security/openssl-devel |
111 |
OPENSSL_SHLIBVER?= 9 |
112 |
. endif |
113 |
|
85 |
|
114 |
# default |
86 |
. if !defined(OPENSSL_SHLIBVER) |
115 |
OPENSSL_PORT?= security/openssl |
87 |
.error You are using an unsupported SSL provider ${SSL_DEFAULT} |
116 |
OPENSSL_SHLIBVER?= 8 |
88 |
. endif |
117 |
|
89 |
|
118 |
OPENSSLDIR?= ${OPENSSLBASE}/openssl |
90 |
OPENSSLDIR?= ${OPENSSLBASE}/openssl |
119 |
BUILD_DEPENDS+= ${LOCALBASE}/lib/libcrypto.so.${OPENSSL_SHLIBVER}:${OPENSSL_PORT} |
91 |
BUILD_DEPENDS+= ${LOCALBASE}/lib/libcrypto.so.${OPENSSL_SHLIBVER}:${OPENSSL_PORT} |