mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-21 04:06:46 +00:00
- Fix build with SSL on 12.0
Vsftpd uses an ugly way of checking whether it needs to link libssl/libcrypto by grepping object file (!) for SSL_library_init (which may be or not be actually used depending on a define). This does not work if SSL_library_init is a macro which is the case with OpenSSL 1.1.0: /usr/include/openssl/ssl.h:# define SSL_library_init() OPENSSL_init_ssl(0, NULL) Because of this, on 12.0 the check always fails, OpenSSL libs are not linked, and the build fails with linker errors: /usr/bin/ld: error: undefined symbol: OPENSSL_init_ssl >>> referenced by ssl.c >>> ssl.o:(ssl_init) /usr/bin/ld: error: undefined symbol: TLS_server_method >>> referenced by ssl.c >>> ssl.o:(ssl_init) /usr/bin/ld: error: undefined symbol: SSL_CTX_new >>> referenced by ssl.c >>> ssl.o:(ssl_init) Since we know beforehand whether we need SSL, just replace the check with true if SSL is enabled. - While here, partially convert to options helpers
This commit is contained in:
parent
356644ecfc
commit
8393a2e065
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=488552
@ -53,6 +53,9 @@ CFLAGS+= -I${OPENSSLINC}
|
||||
LDFLAGS+= -L${OPENSSLLIB}
|
||||
.endif
|
||||
|
||||
post-patch-VSFTPD_SSL-on:
|
||||
@${REINPLACE_CMD} -e 's|find_func SSL_library_init ssl.o|true|' ${WRKSRC}/vsf_findlibs.sh
|
||||
|
||||
do-configure:
|
||||
.if ${PORT_OPTIONS:MVSFTPD_SSL} && !defined(WITHOUT_SSL)
|
||||
${REINPLACE_CMD} -e \
|
||||
@ -97,13 +100,13 @@ do-install:
|
||||
${INSTALL_MAN} ${WRKSRC}/vsftpd.conf.5 ${STAGEDIR}${PREFIX}/man/man5/
|
||||
${INSTALL_MAN} ${WRKSRC}/vsftpd.8 ${STAGEDIR}${PREFIX}/man/man8/
|
||||
${MKDIR} ${STAGEDIR}/var/ftp ${STAGEDIR}${PREFIX}/share/vsftpd/empty
|
||||
.if ${PORT_OPTIONS:MDOCS}
|
||||
|
||||
do-install-DOCS-on:
|
||||
${MKDIR} ${STAGEDIR}${DOCSDIR}
|
||||
${INSTALL_DATA} ${DOCFILES:S,^,${WRKSRC}/,} ${STAGEDIR}${DOCSDIR}/
|
||||
.for i in EXAMPLE SECURITY
|
||||
${MKDIR} ${STAGEDIR}${DOCSDIR}/${i}
|
||||
${CP} -p -R -L ${WRKSRC}/${i}/./ ${STAGEDIR}${DOCSDIR}/${i}/
|
||||
.endfor
|
||||
.endif
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
Loading…
Reference in New Issue
Block a user