pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/security/openssl Allow packages that use OpenSSL to sp...
details: https://anonhg.NetBSD.org/pkgsrc/rev/1df3fe5b30a1
branches: trunk
changeset: 533058:1df3fe5b30a1
user: jlam <jlam%pkgsrc.org@localhost>
date: Fri Sep 07 17:26:23 2007 +0000
description:
Allow packages that use OpenSSL to specify that they need an OpenSSL
built with support for threads. This is done by adding the following
line to the package Makefile before the inclusion of openssl/buildlink3.mk:
USE_FEATURES.openssl= threads
The openssl/builtin.mk file is also adjusted to detect whether or not
the built-in OpenSSL was built with support for threads and the result
is used accordingly to determine whether or not a pkgsrc OpenSSL is
needed.
diffstat:
security/openssl/buildlink3.mk | 6 +++++-
security/openssl/builtin.mk | 41 ++++++++++++++++++++++++++++++-----------
2 files changed, 35 insertions(+), 12 deletions(-)
diffs (135 lines):
diff -r 402695f8a381 -r 1df3fe5b30a1 security/openssl/buildlink3.mk
--- a/security/openssl/buildlink3.mk Fri Sep 07 17:16:43 2007 +0000
+++ b/security/openssl/buildlink3.mk Fri Sep 07 17:26:23 2007 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink3.mk,v 1.36 2007/05/30 08:54:31 rillig Exp $
+# $NetBSD: buildlink3.mk,v 1.37 2007/09/07 17:26:23 jlam Exp $
BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+
OPENSSL_BUILDLINK3_MK:= ${OPENSSL_BUILDLINK3_MK}+
@@ -15,7 +15,11 @@
.if !empty(OPENSSL_BUILDLINK3_MK:M+)
BUILDLINK_API_DEPENDS.openssl+= openssl>=0.9.6m
+. if defined(USE_FEATURES.openssl) && !empty(USE_FEATURES.openssl:Mthreads)
+BUILDLINK_ABI_DEPENDS.openssl+= openssl>=0.9.7inb4
+. else
BUILDLINK_ABI_DEPENDS.openssl+= openssl>=0.9.7inb1
+. endif
BUILDLINK_PKGSRCDIR.openssl?= ../../security/openssl
# Ensure that -lcrypt comes before -lcrypto when linking so that the
diff -r 402695f8a381 -r 1df3fe5b30a1 security/openssl/builtin.mk
--- a/security/openssl/builtin.mk Fri Sep 07 17:16:43 2007 +0000
+++ b/security/openssl/builtin.mk Fri Sep 07 17:26:23 2007 +0000
@@ -1,10 +1,11 @@
-# $NetBSD: builtin.mk,v 1.21 2007/02/22 19:27:08 wiz Exp $
+# $NetBSD: builtin.mk,v 1.22 2007/09/07 17:26:23 jlam Exp $
BUILTIN_PKG:= openssl
BUILTIN_FIND_LIBS:= des
-BUILTIN_FIND_FILES_VAR:= H_OPENSSL
-BUILTIN_FIND_FILES.H_OPENSSL= /usr/include/openssl/opensslv.h
+BUILTIN_FIND_FILES_VAR:= H_OPENSSLCONF H_OPENSSLV
+BUILTIN_FIND_FILES.H_OPENSSLCONF= /usr/include/openssl/opensslconf.h
+BUILTIN_FIND_FILES.H_OPENSSLV= /usr/include/openssl/opensslv.h
.include "../../mk/buildlink3/bsd.builtin.mk"
@@ -14,7 +15,7 @@
###
.if !defined(IS_BUILTIN.openssl)
IS_BUILTIN.openssl= no
-. if empty(H_OPENSSL:M__nonexistent__) && empty(H_OPENSSL:M${LOCALBASE}/*)
+. if empty(H_OPENSSLV:M__nonexistent__) && empty(H_OPENSSLV:M${LOCALBASE}/*)
IS_BUILTIN.openssl= yes
. endif
.endif
@@ -26,7 +27,7 @@
###
.if !defined(BUILTIN_PKG.openssl) && \
!empty(IS_BUILTIN.openssl:M[yY][eE][sS]) && \
- empty(H_OPENSSL:M__nonexistent__)
+ empty(H_OPENSSLV:M__nonexistent__)
BUILTIN_VERSION.openssl!= \
${AWK} 'BEGIN { hex="0123456789abcdef"; \
split("abcdefghijklmnopqrstuvwxyz", alpha, ""); \
@@ -52,10 +53,10 @@
major, minor, teeny, patchlevel; \
exit 0; \
} \
- ' ${H_OPENSSL}
+ ' ${H_OPENSSLV}
. if !empty(BUILTIN_VERSION.openssl:M0\.9\.6g) && \
- empty(H_OPENSSL:M__nonexistent__)
+ empty(H_OPENSSLV:M__nonexistent__)
#
# If the native OpenSSL contains the security fixes pulled up to the
# netbsd-1-6 branch on 2003-11-07, then pretend it's openssl-0.9.6l.
@@ -64,7 +65,7 @@
${AWK} 'BEGIN { ans = "no" } \
/OPENSSL_HAS_20031107_FIX/ { ans = "yes" } \
END { print ans; exit 0 } \
- ' ${H_OPENSSL}
+ ' ${H_OPENSSLV}
. if !empty(BUILTIN_OPENSSL_HAS_20031107_FIX:M[yY][eE][sS])
BUILTIN_VERSION.openssl= 0.9.6l
. endif
@@ -76,12 +77,12 @@
${AWK} 'BEGIN { ans = "no" } \
/OPENSSL_HAS_20040401_FIX/ { ans = "yes" } \
END { print ans; exit 0 } \
- ' ${H_OPENSSL}
+ ' ${H_OPENSSLV}
. if !empty(BUILTIN_OPENSSL_HAS_20040401_FIX:M[yY][eE][sS])
BUILTIN_VERSION.openssl= 0.9.6m
. endif
. elif !empty(BUILTIN_VERSION.openssl:M0\.9\.7d) && \
- empty(H_OPENSSL:M__nonexistent__)
+ empty(H_OPENSSLV:M__nonexistent__)
#
# If the native OpenSSL contains the security fixes pulled up to the
# netbsd-2-0, netbsd-2, and netbsd-3-0 branches on 2005-10-11, then
@@ -91,7 +92,7 @@
${AWK} 'BEGIN { ans = "no" } \
/OPENSSL_HAS_20051011_FIX/ { ans = "yes" } \
END { print ans; exit 0 } \
- ' ${H_OPENSSL}
+ ' ${H_OPENSSLV}
. if !empty(BUILTIN_OPENSSL_HAS_20051011_FIX:M[yY][eE][sS])
BUILTIN_VERSION.openssl= 0.9.7h
. endif
@@ -100,6 +101,18 @@
.endif
MAKEVARS+= BUILTIN_PKG.openssl
+.if !defined(BUILTIN_OPENSSL_HAS_THREADS) && \
+ !empty(IS_BUILTIN.openssl:M[yY][eE][sS]) && \
+ empty(H_OPENSSLCONF:M__nonexistent__)
+BUILTIN_OPENSSL_HAS_THREADS!= \
+ ${AWK} 'BEGIN { ans = "no" } \
+ /\#[ ]*define[ ]*OPENSSL_THREADS/ { ans= "yes" } \
+ /\#[ ]*define[ ]*THREADS/ { ans = "yes" } \
+ END { print ans; exit 0 } \
+ ' ${H_OPENSSLCONF:Q}
+.endif
+MAKEVARS+= BUILTIN_OPENSSL_HAS_THREADS
+
###
### Determine whether we should use the built-in implementation if it
### exists, and set USE_BUILTIN.<pkg> appropriate ("yes" or "no").
@@ -123,6 +136,12 @@
. endif
. endfor
. endif
+. if defined(USE_FEATURES.openssl)
+. if !empty(USE_FEATURES.openssl:Mthreads) && \
+ !empty(BUILTIN_OPENSSL_HAS_THREADS:M[nN][oO])
+USE_BUILTIN.openssl= no
+. endif
+. endif
. endif # PREFER.openssl
.endif
MAKEVARS+= USE_BUILTIN.openssl
Home |
Main Index |
Thread Index |
Old Index