diff options
author | Hiroki Sato <hrs@FreeBSD.org> | 2019-03-18 12:42:37 +0000 |
---|---|---|
committer | Hiroki Sato <hrs@FreeBSD.org> | 2019-03-18 12:42:37 +0000 |
commit | bfc7164b87c58e6fb7b0582db329b0d35614af4e (patch) | |
tree | f615fb943551a2d3838001308802e82183cd27f7 /security/openssl_tpm_engine | |
parent | a0b523cabede282cfa009ccce8b1bd3dac73c194 (diff) | |
download | ports-bfc7164b87c58e6fb7b0582db329b0d35614af4e.tar.gz ports-bfc7164b87c58e6fb7b0582db329b0d35614af4e.zip |
Add a workaround for shlib name depending on OpenSSL's version.
Notes
Notes:
svn path=/head/; revision=496141
Diffstat (limited to 'security/openssl_tpm_engine')
-rw-r--r-- | security/openssl_tpm_engine/Makefile | 23 | ||||
-rw-r--r-- | security/openssl_tpm_engine/files/patch-dist-openssl.cnf.sample | 2 |
2 files changed, 20 insertions, 5 deletions
diff --git a/security/openssl_tpm_engine/Makefile b/security/openssl_tpm_engine/Makefile index e403cb558386..4513578e75da 100644 --- a/security/openssl_tpm_engine/Makefile +++ b/security/openssl_tpm_engine/Makefile @@ -4,7 +4,7 @@ PORTNAME= openssl_tpm_engine PORTVERSION= 0.5.0 DISTVERSIONPREFIX= v -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= security MAINTAINER= hrs@FreeBSD.org @@ -24,8 +24,7 @@ GH_ACCOUNT= mgerstner GNU_CONFIGURE= yes CONFIGURE_ARGS= --with-openssl="${OPENSSLBASE}" SUB_FILES= pkg-message -PLIST_FILES= bin/create_tpm_key \ - lib/openssl/engines/tpm.so +PLIST_FILES= bin/create_tpm_key INSTALL_TARGET= install-strip PORTEXAMPLES= openssl.cnf.sample @@ -38,9 +37,25 @@ IGNORE= Detected LibreSSL (RAND_METHOD structure unsupported) .endif post-patch: - @${REINPLACE_CMD} 's|%%PREFIX%%|${PREFIX}|g' \ + (${CAT} ${OPENSSLINC}/openssl/opensslv.h; \ + ${ECHO_CMD} "#if OPENSSL_VERSION_NUMBER < 0x10100000L"; \ + ${ECHO_CMD} "lib/openssl/engines/libtpm.so"; \ + ${ECHO_CMD} "#else"; \ + ${ECHO_CMD} "lib/openssl/engines/tpm.so"; \ + ${ECHO_CMD} "#endif"; \ + ) | ${CPP} | ${GREP} -v \# > ${WRKDIR}/.tpmso; \ + ${REINPLACE_CMD} "s|%%TPMSO%%|${PREFIX}/$$(cat ${WRKDIR}/.tpmso)|g" \ ${WRKSRC}/dist/openssl.cnf.sample +.if defined(INSTALL_AS_USER) +_T=|| ${TRUE} +.endif +post-install: + (${CAT} ${WRKDIR}/.tpmso; \ + ${ECHO_CMD} "@postexec /usr/sbin/service ldconfig restart > /dev/null ${_T}" >> ${TMPPLIST}; \ + ${ECHO_CMD} "@postunexec /usr/sbin/service ldconfig restart > /dev/null ${_T}" >> ${TMPPLIST}; \ + ) >> ${TMPPLIST} + post-install-EXAMPLES-on: @${MKDIR} ${STAGEDIR}${EXAMPLESDIR} ${INSTALL_DATA} ${WRKSRC}/dist/openssl.cnf.sample \ diff --git a/security/openssl_tpm_engine/files/patch-dist-openssl.cnf.sample b/security/openssl_tpm_engine/files/patch-dist-openssl.cnf.sample index 6287dad80962..d6cdfb1fcb34 100644 --- a/security/openssl_tpm_engine/files/patch-dist-openssl.cnf.sample +++ b/security/openssl_tpm_engine/files/patch-dist-openssl.cnf.sample @@ -5,7 +5,7 @@ [tpm_section] -dynamic_path = /usr/local/ssl/lib/engines/libtpm.so -+dynamic_path = %%PREFIX%%/lib/openssl/engines/tpm.so ++dynamic_path = %%TPMSO%% engine_id = tpm default_algorithms = ALL #default_algorithms = RAND,RSA |