freebsd-ports/security/libfido2/Makefile
Mark Linimon 7bfae932f7 Prepare for powerpc-on-clang by deleting hard-coded tests for libstdc++.so
as a stand-in for "are we running on gcc".

For people already testing powerpc on clang, it is possible that they
already have both compilers in base.  Thus, the assumption that "gcc is
in base" (e.g.  libstdc++.so exists) always means "force use of GCC" is
already broken.  It will be for everyone on -CURRENT once the switch is
made.

While here, standardize on compiler:c++11-lang instead of -lib (they are
equivalent these days), pet portlint, and do some other cleanup.

Approved by:	portmgr (tier-2 blanket)
2019-07-12 02:25:07 +00:00

35 lines
954 B
Makefile

# Created by: Po-Chuan Hsieh <sunpoet@FreeBSD.org>
# $FreeBSD$
PORTNAME= libfido2
PORTVERSION= 0.4.0
CATEGORIES= security
MASTER_SITES= https://developers.yubico.com/libfido2/Releases/
MAINTAINER= sunpoet@FreeBSD.org
COMMENT= Provides library functionality for FIDO 2.0
LICENSE= BSD2CLAUSE
LICENSE_FILE= ${WRKSRC}/LICENSE
LIB_DEPENDS= libcbor.so:devel/libcbor \
libhidapi.so.0:comms/hidapi
USES= cmake compiler pkgconfig ssl
CFLAGS+= -D_WITH_GETLINE
LDFLAGS+= -lcrypto
OPTIONS_DEFINE= DOCS
.include <bsd.port.pre.mk>
post-patch:
@${REINPLACE_CMD} -e '/libcrypto/d' ${WRKSRC}/CMakeLists.txt
@${REINPLACE_CMD} -e 's|share/man|man|' ${WRKSRC}/man/CMakeLists.txt
@${REINPLACE_CMD} -e 's|endian.h|sys/&|' ${WRKSRC}/CMakeLists.txt ${WRKSRC}/openbsd-compat/openbsd-compat.h
.if ${CHOSEN_COMPILER_TYPE} == gcc
@${REINPLACE_CMD} -e '/-Wno-unused-result/d; /-Wno-discarded-qualifiers/d' ${WRKSRC}/CMakeLists.txt
.endif
.include <bsd.port.post.mk>