freebsd-ports/security/duo_openvpn/Makefile
Rene Ladan 3d9a815d9c all: remove explicit versions in USES=python for "3.x+"
The logic in USES=python will automatically convert this to 3.8+ by
itself.

Adjust two ports that only had Python 3.7 mentioned but build fine
on Python 3.8 too.

finance/quickfix: mark BROKEN with PYTHON

libtool: compile:  c++ -DHAVE_CONFIG_H -I. -I../.. -I -I. -I.. -I../.. -I../C++ -DLIBICONV_PLUG -DPYTHON_MAJOR_VERSION=3 -Wno-unused-variable -Wno-maybe-uninitialized -O2 -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DLIBICONV_PLUG -Wall -ansi -Wno-unused-command-line-argument -Wpointer-arith -Wwrite-strings -Wno-overloaded-virtual -Wno-deprecated-declarations -Wno-deprecated -std=c++0x -MT _quickfix_la-QuickfixPython.lo -MD -MP -MF .deps/_quickfix_la-QuickfixPython.Tpo -c QuickfixPython.cpp  -fPIC -DPIC -o .libs/_quickfix_la-QuickfixPython.o
warning: unknown warning option '-Wno-maybe-uninitialized'; did you mean '-Wno-uninitialized'? [-Wunknown-warning-option]
QuickfixPython.cpp:175:11: fatal error: 'Python.h' file not found
          ^~~~~~~~~~
1 warning and 1 error generated.

Reviewed by:	portmgr, vishwin, yuri
Differential Revision:	<https://reviews.freebsd.org/D40568>
2023-06-27 21:34:34 +02:00

63 lines
1.8 KiB
Makefile

PORTNAME= duo_openvpn
PORTVERSION= 2.4
PORTREVISION= 2
CATEGORIES= security net-vpn
MAINTAINER= zi@FreeBSD.org
COMMENT= Duo two-factor authentication for OpenVPN
WWW= https://github.com/duosecurity/duo_openvpn
LICENSE= GPLv2
RUN_DEPENDS= openvpn>0:security/openvpn
USES= gmake shebangfix
SHEBANG_FILES= duo_openvpn.pl
USE_GITHUB= yes
GH_ACCOUNT= duosecurity
SUB_FILES= pkg-message
OPTIONS_DEFINE= METHOD USERNAME
OPTIONS_SINGLE= HELPER
OPTIONS_SINGLE_HELPER= PERL PYTHON
OPTIONS_DEFAULT=PERL
OPTIONS_SUB= yes
METHOD_DESC= Force an authentication method (defaults to push, via METHOD)
USERNAME_DESC= Force duo to use username variable, instead of common_name
METHOD?= push
PERL_USES= perl5
PERL_VARS= USE_PERL5=run CFLAGS+=-DUSE_PERL
PERL_RUN_DEPENDS= p5-JSON-XS>0:converters/p5-JSON-XS \
p5-libwww>0:www/p5-libwww \
p5-LWP-Protocol-https>0:www/p5-LWP-Protocol-https \
p5-Digest-HMAC>0:security/p5-Digest-HMAC
PYTHON_USES= python:run
.include <bsd.port.options.mk>
post-patch:
${REINPLACE_CMD} 's|%%SHEBANG%%|${PYTHON_CMD}|' ${WRKSRC}/duo_openvpn.py
${REINPLACE_CMD} 's|PREFIX "|"${DATADIR}|' ${WRKSRC}/duo_openvpn.c
.if ${PORT_OPTIONS:MUSERNAME}
${REINPLACE_CMD} 's|common_name|username|' ${WRKSRC}/duo_openvpn.c
.endif
.if ${PORT_OPTIONS:MMETHOD}
${REINPLACE_CMD} 's|get_env("password", envp);|"${METHOD}";|' ${WRKSRC}/duo_openvpn.c
.endif
do-install:
@${MKDIR} ${STAGEDIR}${DATADIR}
${INSTALL_LIB} ${WRKSRC}/duo_openvpn.so ${STAGEDIR}${DATADIR}
${INSTALL_DATA} ${WRKSRC}/ca_certs.pem ${STAGEDIR}${DATADIR}
do-install-PERL-on:
${INSTALL_SCRIPT} ${WRKSRC}/duo_openvpn.pl ${STAGEDIR}${DATADIR}
do-install-PYTHON-on:
${INSTALL_SCRIPT} ${WRKSRC}/duo_openvpn.py ${STAGEDIR}${DATADIR}
${INSTALL_SCRIPT} ${WRKSRC}/https_wrapper.py ${STAGEDIR}${DATADIR}
${INSTALL_SCRIPT} ${WRKSRC}/six.py ${STAGEDIR}${DATADIR}
.include <bsd.port.mk>