aboutsummaryrefslogtreecommitdiff
path: root/Mk/bsd.openssl.mk
diff options
context:
space:
mode:
authorDirk Meyer <dinoex@FreeBSD.org>2006-10-07 08:15:48 +0000
committerDirk Meyer <dinoex@FreeBSD.org>2006-10-07 08:15:48 +0000
commit03a734dee79be51ea20481bbf48567c692acdbb9 (patch)
treee508dc883ef4a06c9c5a2f614f58bed168258319 /Mk/bsd.openssl.mk
parentbc198cbb744499ecae821d170211c43ee9a113d7 (diff)
downloadports-03a734dee79be51ea20481bbf48567c692acdbb9.tar.gz
ports-03a734dee79be51ea20481bbf48567c692acdbb9.zip
Notes
Diffstat (limited to 'Mk/bsd.openssl.mk')
-rw-r--r--Mk/bsd.openssl.mk19
1 files changed, 16 insertions, 3 deletions
diff --git a/Mk/bsd.openssl.mk b/Mk/bsd.openssl.mk
index 38edd01fde97..b15a165d7f3c 100644
--- a/Mk/bsd.openssl.mk
+++ b/Mk/bsd.openssl.mk
@@ -2,18 +2,18 @@
# Date created: 31 May 2002
# Whom: dinoex
#
-# $FreeBSD: /tmp/pcvs/ports/Mk/bsd.openssl.mk,v 1.31 2006-08-04 12:34:41 erwin Exp $
+# $FreeBSD: /tmp/pcvs/ports/Mk/bsd.openssl.mk,v 1.32 2006-10-07 08:15:48 dinoex Exp $
#
# Use of 'USE_OPENSSL=yes' includes this Makefile after bsd.ports.pre.mk
#
# the user/port can now set this options in the makefiles.
#
# WITH_OPENSSL_BASE=yes - Use the version in the base system.
-# WITH_OPENSSL_PORT=yes - Use the port, even if base if up to date
+# WITH_OPENSSL_PORT=yes - Use the port, even if base is up to date
# WITH_OPENSSL_BETA=yes - Use a snapshot of recent openssl
# WITH_OPENSSL_STABLE=yes - Use an older openssl version
#
-# USE_OPENSSL_RPATH=yes - pass RFLAGS options in CFLAGS,
+# USE_OPENSSL_RPATH=yes - Pass RFLAGS options in CFLAGS,
# needed for ports who don't use LDFLAGS
#
# Overrideable defaults:
@@ -118,6 +118,19 @@ OPENSSL_SHLIBVER?= 4
OPENSSL_SHLIBVER?= 3
.endif
.else
+.if !defined(OPENSSL_PORT) && \
+ exists(${LOCALBASE}/lib/libcrypto.so)
+# find installed port and use it for dependency
+PKG_DBDIR?= ${DESTDIR}/var/db/pkg
+OPENSSL_INSTALLED!= grep -l -r "libssl.so." "${PKG_DBDIR}" | \
+ while read contents; do \
+ sslprefix=`grep "^@cwd " "$${contents}" | ${HEAD} -n 1`; \
+ if test "$${sslprefix}" = "@cwd ${LOCALBASE_REL}" ; then \
+ echo "$${contents}"; break; fi; done
+OPENSSL_PORT!= grep "^@comment ORIGIN:" "${OPENSSL_INSTALLED}" | ${CUT} -d : -f 2
+OPENSSL_SHLIBFILE!= grep "^lib/libssl.so." "${OPENSSL_INSTALLED}"
+OPENSSL_SHLIBVER?= ${OPENSSL_SHLIBFILE:E}
+.endif
OPENSSL_PORT?= security/openssl
.if ( ${OSVERSION} >= 600100 )
OPENSSL_SHLIBVER?= 5