Consolidate openssl handling to options.mk. In particular, do not

pass --with-ssl to configure when the option is actually disabled.
This commit is contained in:
tnn 2017-07-27 18:54:44 +00:00
parent 8648074c88
commit c1cabe0f9e
2 changed files with 4 additions and 14 deletions

View file

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.221 2017/04/20 14:38:40 joerg Exp $
# $NetBSD: Makefile,v 1.222 2017/07/27 18:54:44 tnn Exp $
# Notes to package maintainers:
#
@ -114,12 +114,6 @@ BUILDLINK_API_DEPENDS.libarchive+= libarchive>=3.3.1
.include "options.mk"
.if !empty(USE_BUILTIN.openssl:M[yY][eE][sS])
CONFIGURE_ARGS+= --with-ssl
.include "../../security/openssl/buildlink3.mk"
.endif
.if empty(USE_BUILTIN.bzip2:M[yY][eE][sS]) || \
empty(USE_BUILTIN.zlib:M[yY][eE][sS])
USE_BUILTIN.libarchive= no
@ -143,12 +137,6 @@ LDFLAGS+= -L${WRKDIR}/zlib
CPPFLAGS+= -I${WRKDIR}/libarchive/libarchive
LDFLAGS+= -L${WRKDIR}/libarchive/.libs
# Until we support pkgsrc openssl at bootstrap time, disable it completely
# if asked to avoid the builtin.
. if empty(USE_BUILTIN.openssl:M[Yy][Ee][Ss])
LIBARCHIVE_CONFIGURE_ARGS+= --without-openssl
. endif
# Only use XZ if we actually have builtin support for it. Some systems
# install the header, but without usable library or prefer to not use
# the system version, so give them some control.

View file

@ -1,4 +1,4 @@
# $NetBSD: options.mk,v 1.4 2012/07/27 13:50:43 jperkin Exp $
# $NetBSD: options.mk,v 1.5 2017/07/27 18:54:44 tnn Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.libfetch
PKG_SUPPORTED_OPTIONS= inet6 openssl
@ -19,10 +19,12 @@ MAKE_ENV+= FETCH_WITH_INET6=no
.endif
.if !empty(PKG_OPTIONS:Mopenssl)
CONFIGURE_ARGS+= --with-ssl
MAKE_ENV+= FETCH_WITH_OPENSSL=yes
LDFLAGS+= -lssl -lcrypto
.include "../../security/openssl/buildlink3.mk"
.else
LIBARCHIVE_CONFIGURE_ARGS+= --without-openssl
MAKE_ENV+= FETCH_WITH_OPENSSL=no
.endif