diff options
author | dinoex <dinoex@FreeBSD.org> | 2006-10-07 16:15:48 +0800 |
---|---|---|
committer | dinoex <dinoex@FreeBSD.org> | 2006-10-07 16:15:48 +0800 |
commit | 33c5376f6d90b917fd7dcccec78821dab2be175f (patch) | |
tree | b14c1e6bda67593a966dd16aa3fb7b8758bdc8f4 /Mk | |
parent | 0b38bf484f42664af59c7cd857745a32b81af9c1 (diff) | |
download | freebsd-ports-gnome-33c5376f6d90b917fd7dcccec78821dab2be175f.tar.gz freebsd-ports-gnome-33c5376f6d90b917fd7dcccec78821dab2be175f.tar.zst freebsd-ports-gnome-33c5376f6d90b917fd7dcccec78821dab2be175f.zip |
- auto detect OPENSSL_PORT from installed package when not set in /etc/make.conf
this avoids recording of conflicting dependencies
Suggested by: rafan
- Fix A Comment
- Capialisatzion
PR: edwin
Submitted by: 104019
Diffstat (limited to 'Mk')
-rw-r--r-- | Mk/bsd.openssl.mk | 19 |
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 |