From da7a2ac9f59938f8c34a89c069ce470984a09508 Mon Sep 17 00:00:00 2001 From: jlam Date: Wed, 11 Dec 2002 22:22:47 +0000 Subject: Allow an installed gettext-lib-0.10.35nb1 to satisfy gettext dependencies if we don't actually require gettext-lib>=0.11.5. For other installations where keeping an older gettext around isn't wanted, convert the gettext dependency to >=0.11.5 and include the necessary buildlink2 magic for libiconv support. --- devel/gettext-lib/buildlink2.mk | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) (limited to 'devel/gettext-lib') diff --git a/devel/gettext-lib/buildlink2.mk b/devel/gettext-lib/buildlink2.mk index b363abe4344..4d5c13d0801 100644 --- a/devel/gettext-lib/buildlink2.mk +++ b/devel/gettext-lib/buildlink2.mk @@ -1,4 +1,4 @@ -# $NetBSD: buildlink2.mk,v 1.15 2002/12/10 20:00:57 drochner Exp $ +# $NetBSD: buildlink2.mk,v 1.16 2002/12/11 22:22:47 jlam Exp $ .if !defined(GETTEXT_BUILDLINK2_MK) GETTEXT_BUILDLINK2_MK= # defined @@ -47,12 +47,25 @@ _NEED_GNU_GETTEXT= YES .endif .if ${_NEED_GNU_GETTEXT} == "YES" -# XXX overwrite previous value -BUILDLINK_DEPENDS.gettext= gettext-lib>=0.11.5 BUILDLINK_PACKAGES+= gettext EVAL_PREFIX+= BUILDLINK_PREFIX.gettext=gettext-lib BUILDLINK_PREFIX.gettext_DEFAULT= ${LOCALBASE} -.include "../../converters/libiconv/buildlink2.mk" +_GETTEXT_ICONV_DEPENDS= gettext-lib>=0.11.5 +_INSTALLED_GETTEXT_PKG!= ${PKG_INFO} -e gettext-lib || ${ECHO} "NO" +. if ${_INSTALLED_GETTEXT_PKG} == "NO" +_GETTEXT_NEEDS_ICONV= YES +. else +_GETTEXT_NEEDS_ICONV!= \ + if ${PKG_ADMIN} pmatch '${_GETTEXT_ICONV_DEPENDS}' ${_INSTALLED_GETTEXT_PKG}; then \ + ${ECHO} "YES"; \ + else \ + ${ECHO} "NO"; \ + fi +. endif +. if ${_GETTEXT_NEEDS_ICONV} == "YES" +BUILDLINK_DEPENDS.gettext= ${_GETTEXT_ICONV_DEPENDS} +. include "../../converters/libiconv/buildlink2.mk" +. endif .else BUILDLINK_PREFIX.gettext= /usr .endif -- cgit v1.2.3