aboutsummaryrefslogtreecommitdiff
path: root/security/gnutls
diff options
context:
space:
mode:
authorTijl Coosemans <tijl@FreeBSD.org>2019-02-24 15:22:40 +0000
committerTijl Coosemans <tijl@FreeBSD.org>2019-02-24 15:22:40 +0000
commit4494d8b75abd4d7d9069ca591b8a20cd66a2ce6d (patch)
tree99313613ddede2c394eee21fd8435b5c3674e12b /security/gnutls
parent16e283f7a7331c3bb04ae41f4a449ce9201508bd (diff)
downloadports-4494d8b75abd4d7d9069ca591b8a20cd66a2ce6d.tar.gz
ports-4494d8b75abd4d7d9069ca591b8a20cd66a2ce6d.zip
- Let gnutls look for its configuration files in PREFIX/etc instead of /etc.
- Use --with-default-trust-store-file to set the location of the root certificates so configure doesn't have to autodetect this and the build dependency can be removed. - Define TEST_TARGET. - Remove DOCSDIR. The files are also in PREFIX/share/info. - Use p11-kit-trust as the default PKCS#11 trust store. PR: 235703 Reported by: mi
Notes
Notes: svn path=/head/; revision=493765
Diffstat (limited to 'security/gnutls')
-rw-r--r--security/gnutls/Makefile61
-rw-r--r--security/gnutls/pkg-plist9
2 files changed, 54 insertions, 16 deletions
diff --git a/security/gnutls/Makefile b/security/gnutls/Makefile
index 2b60205126a2..406613fbdd51 100644
--- a/security/gnutls/Makefile
+++ b/security/gnutls/Makefile
@@ -2,7 +2,7 @@
PORTNAME= gnutls
PORTVERSION= 3.6.6
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= security net
MASTER_SITES= GNUPG/gnutls/v${PORTVERSION:R}
@@ -18,23 +18,25 @@ LIB_DEPENDS= libgmp.so:math/gmp \
libnettle.so:security/nettle \
libtasn1.so:security/libtasn1 \
libunistring.so:devel/libunistring
-BUILD_DEPENDS+= ${LOCALBASE}/share/certs/ca-root-nss.crt:security/ca_root_nss
-RUN_DEPENDS+= ${LOCALBASE}/share/certs/ca-root-nss.crt:security/ca_root_nss
+RUN_DEPENDS= ${LOCALBASE}/share/certs/ca-root-nss.crt:security/ca_root_nss
USES= compiler:c11 cpe gmake iconv libtool localbase makeinfo \
- pathfix pkgconfig tar:xz
+ pkgconfig tar:xz
USE_LDCONFIG= yes
+
+CPE_VENDOR= gnu
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --disable-guile \
--enable-local-libopts \
+ --with-system-priority-file=${PREFIX}/etc/gnutls/default-priorities \
+ --with-default-trust-store-file=${LOCALBASE}/share/certs/ca-root-nss.crt \
--with-trousers-lib=${LOCALBASE}/lib/libtspi.so.1 \
ac_cv_type_max_align_t=yes
MAKE_ENV= MAKEINFOFLAGS=--no-split
INSTALL_TARGET= install-strip
+TEST_TARGET= check
-CPE_VENDOR= gnu
-
-OPTIONS_DEFINE= DANE DOCS EXAMPLES IDN NLS P11KIT TPM ZLIB
+OPTIONS_DEFINE= DANE EXAMPLES IDN NLS P11KIT TPM ZLIB
OPTIONS_DEFAULT= IDN P11KIT TPM ZLIB
OPTIONS_SUB= yes
@@ -51,6 +53,7 @@ NLS_USES= gettext
P11KIT_DESC= PKCS\#11 and p11-kit support
P11KIT_CONFIGURE_WITH= p11-kit
+P11KIT_CONFIGURE_ON= --with-default-trust-store-pkcs11="pkcs11:model=p11-kit-trust;manufacturer=PKCS%2311%20Kit"
P11KIT_LIB_DEPENDS= libp11-kit.so:security/p11-kit
TPM_DESC= Trusted Platform Module support
@@ -63,8 +66,52 @@ INFO= gnutls gnutls-guile
post-patch:
@${RM} ${WRKSRC}/doc/*.info*
+ @${REINPLACE_CMD} 's,/usr/share,${PREFIX}/share,' \
+ ${WRKSRC}/doc/manpages/*.[13]
+ @${REINPLACE_CMD} -E 's,/etc/(gnutls|tpasswd),${PREFIX}&,g' \
+ ${WRKSRC}/doc/cha-gtls-app.texi \
+ ${WRKSRC}/doc/gnutls-api.texi \
+ ${WRKSRC}/doc/invoke-certtool.texi \
+ ${WRKSRC}/doc/invoke-gnutls-cli.texi \
+ ${WRKSRC}/doc/invoke-gnutls-serv.texi \
+ ${WRKSRC}/doc/invoke-p11tool.texi \
+ ${WRKSRC}/doc/invoke-srptool.texi \
+ ${WRKSRC}/doc/manpages/certtool.1 \
+ ${WRKSRC}/doc/manpages/gnutls_priority_init2.3 \
+ ${WRKSRC}/doc/manpages/gnutls-cli.1 \
+ ${WRKSRC}/doc/manpages/gnutls-serv.1 \
+ ${WRKSRC}/doc/manpages/p11tool.1 \
+ ${WRKSRC}/doc/manpages/srptool.1 \
+ ${WRKSRC}/lib/includes/gnutls/pkcs11.h \
+ ${WRKSRC}/lib/pkcs11.c \
+ ${WRKSRC}/src/p11tool-args.c.bak \
+ ${WRKSRC}/src/srptool.c
+ @${REINPLACE_CMD} \
+ 's,/etc/pkcs11/modules,${PREFIX}/share/p11-kit/modules,' \
+ ${WRKSRC}/doc/cha-tokens.texi \
+ ${WRKSRC}/doc/invoke-p11tool.texi \
+ ${WRKSRC}/doc/manpages/p11tool.1 \
+ ${WRKSRC}/src/p11tool-args.c.bak
+# Prevent regeneration. The order is important.
+ @${TOUCH} ${WRKSRC}/doc/enums.texi \
+ ${WRKSRC}/doc/invoke-gnutls-cli.texi \
+ ${WRKSRC}/doc/invoke-gnutls-cli-debug.texi \
+ ${WRKSRC}/doc/invoke-gnutls-serv.texi \
+ ${WRKSRC}/doc/invoke-certtool.texi \
+ ${WRKSRC}/doc/invoke-ocsptool.texi \
+ ${WRKSRC}/doc/invoke-danetool.texi \
+ ${WRKSRC}/doc/invoke-srptool.texi \
+ ${WRKSRC}/doc/invoke-psktool.texi \
+ ${WRKSRC}/doc/invoke-p11tool.texi \
+ ${WRKSRC}/doc/invoke-tpmtool.texi \
+ ${WRKSRC}/doc/pkcs11-api.texi \
+ ${WRKSRC}/doc/manpages/stamp_mans \
+ ${WRKSRC}/doc/stamp_enums \
+ ${WRKSRC}/doc/stamp_functions
post-install:
+ @${RM} ${STAGEDIR}${DOCSDIR}/*.png
+ @${RMDIR} ${STAGEDIR}${DOCSDIR}
@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
${INSTALL_DATA} ${WRKSRC}/doc/examples/*.[ch] ${STAGEDIR}${EXAMPLESDIR}
diff --git a/security/gnutls/pkg-plist b/security/gnutls/pkg-plist
index c6cdef97bb85..7822ff599815 100644
--- a/security/gnutls/pkg-plist
+++ b/security/gnutls/pkg-plist
@@ -1173,15 +1173,6 @@ man/man3/gnutls_x509_trust_list_remove_trust_mem.3.gz
man/man3/gnutls_x509_trust_list_verify_crt.3.gz
man/man3/gnutls_x509_trust_list_verify_crt2.3.gz
man/man3/gnutls_x509_trust_list_verify_named_crt.3.gz
-%%PORTDOCS%%%%DOCSDIR%%/gnutls-client-server-use-case.png
-%%PORTDOCS%%%%DOCSDIR%%/gnutls-handshake-sequence.png
-%%PORTDOCS%%%%DOCSDIR%%/gnutls-handshake-state.png
-%%PORTDOCS%%%%DOCSDIR%%/gnutls-internals.png
-%%PORTDOCS%%%%DOCSDIR%%/gnutls-layers.png
-%%PORTDOCS%%%%DOCSDIR%%/gnutls-logo.png
-%%PORTDOCS%%%%DOCSDIR%%/gnutls-modauth.png
-%%PORTDOCS%%%%DOCSDIR%%/gnutls-x509.png
-%%PORTDOCS%%%%DOCSDIR%%/pkcs11-vision.png
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/ex-alert.c
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/ex-cert-select-pkcs11.c
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/ex-cert-select.c