pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/security/openssl Attempt to deal with the differing DE...
details: https://anonhg.NetBSD.org/pkgsrc/rev/09422229d33c
branches: trunk
changeset: 485095:09422229d33c
user: jlam <jlam%pkgsrc.org@localhost>
date: Fri Dec 03 23:03:09 2004 +0000
description:
Attempt to deal with the differing DES APIs between OpenSSL 0.9.6 (in
pkgsrc and in NetBSD-1.6.x) and OpenSSL 0.9.7 (in NetBSD-2.0), by
creating a new yes/no variable USE_OLD_DES_API that flags whether the
package wants to use the old DES API. If USE_OLD_DES_API is "yes",
then:
* For OpenSSL 0.9.6, symlink ${BUILDLINK_DIR}/include/openssl/des_old.h
to ${SSLBASE}/include/openssl/des.h.
* For NetBSD 2.0's "special" installation of OpenSSL 0.9.7, symlink
${BUILDLINK_DIR}/include/openssl/des_old.h to /usr/include/des.h,
and transform "-lcrypto" into "-ldes -lcrypto". This makes it
behave like stock OpenSSL 0.9.7 where the old DES functions are
part of libcrypto.
Software that wants to use the old DES API should be taught to do it
in a way that works with a stock installation of OpenSSL 0.9.7 -- by
including <openssl/des_old.h> and linking against "-lcrypto". Software
that wants to use the new DES API should simply depend on openssl>=0.9.7.
This change has no impact on existing packages as the new code is
active only when USE_OLD_DES_API == "yes".
diffstat:
security/openssl/builtin.mk | 57 ++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 56 insertions(+), 1 deletions(-)
diffs (75 lines):
diff -r c5b6e08b565d -r 09422229d33c security/openssl/builtin.mk
--- a/security/openssl/builtin.mk Fri Dec 03 22:53:27 2004 +0000
+++ b/security/openssl/builtin.mk Fri Dec 03 23:03:09 2004 +0000
@@ -1,8 +1,23 @@
-# $NetBSD: builtin.mk,v 1.5 2004/04/02 23:41:50 wiz Exp $
+# $NetBSD: builtin.mk,v 1.6 2004/12/03 23:03:09 jlam Exp $
_OPENSSL_PKGSRC_PKGNAME= openssl-0.9.6m
_OPENSSL_OPENSSLV_H= /usr/include/openssl/opensslv.h
+.for _lib_ in des
+. if !defined(_BLNK_LIB_FOUND.${_lib_})
+_BLNK_LIB_FOUND.${_lib_}!= \
+ if ${TEST} "`${ECHO} /usr/lib/lib${_lib_}.*`" != "/usr/lib/lib${_lib_}.*"; then \
+ ${ECHO} "yes"; \
+ elif ${TEST} "`${ECHO} /lib/lib${_lib_}.*`" != "/lib/lib${_lib_}.*"; then \
+ ${ECHO} "yes"; \
+ else \
+ ${ECHO} "no"; \
+ fi
+BUILDLINK_VARS+= _BLNK_LIB_FOUND.${_lib_}
+. endif
+.endfor
+.undef _lib_
+
.if !defined(IS_BUILTIN.openssl)
IS_BUILTIN.openssl= no
. if exists(${_OPENSSL_OPENSSLV_H})
@@ -131,6 +146,46 @@
"Unable to satisfy dependency: ${BUILDLINK_DEPENDS.openssl}"
.endif
+# By default, we don't bother with the old DES API.
+USE_OLD_DES_API?= no
+
+.if !empty(USE_BUILTIN.openssl:M[yY][eE][sS])
+BUILDLINK_PREFIX.openssl= /usr
+#
+# If we're using the old DES API, then check to see if the old DES
+# code was factored out into a separate library and header files and
+# no longer a part of libcrypto.
+#
+. if !empty(USE_OLD_DES_API:M[yY][eE][sS]) && \
+ !exists(${BUILDLINK_PREFIX.openssl}/include/openssl/des_old.h)
+. if exists(${BUILDLINK_PREFIX.openssl}/include/des.h) && \
+ !empty(_BLNK_LIB_FOUND.des:M[yY][eE][sS])
+BUILDLINK_TRANSFORM+= l:crypto:des:crypto
+WRAPPER_REORDER_CMDS+= reorder:l:des:crypto
+. endif
+
+BUILDLINK_TARGETS+= buildlink-openssl-des-old.h
+. if !target(buildlink-openssl-des-old.h)
+.PHONY: buildlink-openssl-des-old.h
+buildlink-openssl-des-old.h:
+ ${_PKG_SILENT}${_PKG_DEBUG} \
+ dest="${BUILDLINK_DIR}/include/openssl/des_old.h"; \
+ if ${TEST} ! -f "$$dest"; then \
+ for src in \
+ ${BUILDLINK_PREFIX.openssl}/include/des.h \
+ ${BUILDLINK_PREFIX.openssl}/include/openssl/des.h; \
+ do \
+ if ${TEST} -f "$$src"; then \
+ ${MKDIR} -p `${DIRNAME} "$$dest"`; \
+ ${LN} -fs $$src $$dest; \
+ break; \
+ fi; \
+ done; \
+ fi
+. endif
+. endif # USE_OLD_DES_API == yes
+.endif # USE_BUILTIN.openssl == yes
+
.if defined(PKG_SYSCONFDIR.openssl)
SSLCERTS= ${PKG_SYSCONFDIR.openssl}/certs
.elif ${OPSYS} == "NetBSD"
Home |
Main Index |
Thread Index |
Old Index