sysutils/pacman: Unbreak build on FreeBSD >= 12.1

ld: error: ../../lib/libalpm/.libs/libalpm.so: undefined reference to MD5_Final
ld: error: ../../lib/libalpm/.libs/libalpm.so: undefined reference to MD5_Init
ld: error: ../../lib/libalpm/.libs/libalpm.so: undefined reference to MD5_Update
ld: error: ../../lib/libalpm/.libs/libalpm.so: undefined reference to SHA256_Final
ld: error: ../../lib/libalpm/.libs/libalpm.so: undefined reference to SHA256_Init
ld: error: ../../lib/libalpm/.libs/libalpm.so: undefined reference to SHA256_Update

http://beefy6.nyi.freebsd.org/data/121amd64-default/529299/logs/errors/pacman-5.1.3.log

Add missing -lcrypto to SSL_LIBS and make sure libalpm is linked
directly with it instead of indirectly through dependencies.
This commit is contained in:
Tobias Kortkamp 2020-03-29 10:09:17 +00:00
parent 577a729230
commit 8ae5316825
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=529787

View file

@ -3,6 +3,7 @@
PORTNAME= pacman
PORTVERSION= 5.1.3
PORTREVISION= 1
CATEGORIES= sysutils
MASTER_SITES= https://sources.archlinux.org/other/${PORTNAME}/ \
https://mirror.amdmi3.ru/distfiles/
@ -24,7 +25,8 @@ SHEBANG_FILES= ${WRKSRC}/scripts/makepkg-template.pl.in \
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --with-root-dir="${PACMAN_ROOT}" \
--localstatedir=/var
CONFIGURE_ENV= LIBSSL_CFLAGS="-I${OPENSSLINC}" LIBSSL_LIBS="-L${OPENSSLLIB}"
CONFIGURE_ENV= LIBSSL_CFLAGS="-I${OPENSSLINC}" \
LIBSSL_LIBS="-L${OPENSSLLIB} -lcrypto"
USE_LDCONFIG= yes
BINARY_WRAPPERS= gm4
@ -51,10 +53,6 @@ NLS_CONFIGURE_ENABLE= nls
.include <bsd.port.options.mk>
.if ${OPSYS} == FreeBSD && ${OSVERSION} >= 1300000
BROKEN= does not build (undefined reference to MD5_Final)
.endif
post-patch:
@${REINPLACE_CMD} -e 's|m4|gm4|' ${WRKSRC}/scripts/Makefile.in
@${REINPLACE_CMD} -e '2 s/.*/exit 0/' ${WRKSRC}/build-aux/missing