summaryrefslogtreecommitdiff
path: root/devel/gettext-lib
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2002-12-11 22:22:47 +0000
committerjlam <jlam@pkgsrc.org>2002-12-11 22:22:47 +0000
commitda7a2ac9f59938f8c34a89c069ce470984a09508 (patch)
tree705ab750076c68bfbe7fbf15186933f7fc534602 /devel/gettext-lib
parent4312171263923827c99b2488e5930adc1f5832fb (diff)
downloadpkgsrc-da7a2ac9f59938f8c34a89c069ce470984a09508.tar.gz
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.
Diffstat (limited to 'devel/gettext-lib')
-rw-r--r--devel/gettext-lib/buildlink2.mk21
1 files changed, 17 insertions, 4 deletions
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