Remove mk/find-prefix.mk usage from the security category.

The find-prefix infrastructure was required in a pkgviews world where
packages installed from pkgsrc could have different installation
prefixes, and this was a way for a dependency prefix to be determined.

Now that pkgviews has been removed there is no longer any need for the
overhead of this infrastructure.  Instead we use BUILDLINK_PREFIX.pkg
for dependencies pulled in via buildlink, or LOCALBASE/PREFIX where the
dependency is coming from pkgsrc.

Provides a reasonable performance win due to the reduction of `pkg_info
-qp` calls, some of which were redundant anyway as they were duplicating
the same information provided by BUILDLINK_PREFIX.pkg.
This commit is contained in:
jperkin 2015-11-25 12:58:02 +00:00
parent 636b8ba178
commit 4373d99d5d

View file

@ -1,4 +1,4 @@
# $NetBSD: options.mk,v 1.3 2015/10/22 19:18:34 tnn Exp $
# $NetBSD: options.mk,v 1.4 2015/11/25 12:58:02 jperkin Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.gpgme
PKG_OPTIONS_REQUIRED_GROUPS= gnupg
@ -9,17 +9,13 @@ PKG_SUGGESTED_OPTIONS= gnupg2
.if !empty(PKG_OPTIONS:Mgnupg21)
DEPENDS+= gnupg21>=2.1:../../security/gnupg21
FIND_PREFIX:= GPG2DIR=gnupg21
.include "../../mk/find-prefix.mk"
CONFIGURE_ARGS+= --with-gpgsm=${GPG2DIR}/bin/gpgsm
CONFIGURE_ARGS+= --with-gpg=${GPG2DIR}/bin/gpg2
CONFIGURE_ARGS+= --with-gpgsm=${LOCALBASE}/bin/gpgsm
CONFIGURE_ARGS+= --with-gpg=${LOCALBASE}/bin/gpg2
REPLACE_SH+= tests/gpg/pinentry
.elif !empty(PKG_OPTIONS:Mgnupg2)
DEPENDS+= gnupg2>=2.0<2.1:../../security/gnupg2
FIND_PREFIX:= GPG2DIR=gnupg2
.include "../../mk/find-prefix.mk"
CONFIGURE_ARGS+= --with-gpgsm=${GPG2DIR}/bin/gpgsm
CONFIGURE_ARGS+= --with-gpg=${GPG2DIR}/bin/gpg2
CONFIGURE_ARGS+= --with-gpgsm=${LOCALBASE}/bin/gpgsm
CONFIGURE_ARGS+= --with-gpg=${LOCALBASE}/bin/gpg2
REPLACE_SH+= tests/gpg/pinentry
.else
DEPENDS+= gnupg>=1.4.2:../../security/gnupg