diff options
author | jlam <jlam> | 2002-08-05 21:26:04 +0000 |
---|---|---|
committer | jlam <jlam> | 2002-08-05 21:26:04 +0000 |
commit | 9e0be8fa9dce1106da7bc0ab7aefb93f860138b1 (patch) | |
tree | eb72b722ba97b5faa1326fd1e4f9761ebb90cdf1 /converters/libiconv | |
parent | e3e409df6f339b5835259aa8523a9f1dcbaf3fe8 (diff) | |
download | pkgsrc-9e0be8fa9dce1106da7bc0ab7aefb93f860138b1.tar.gz |
Allow system libiconv to be used if it's provided. If USE_GNU_ICONV is
defined, then we always use the pkgsrc libiconv. INCOMPAT_ICONV can be
appended to with machine platform style entries, e.g. NetBSD-*-*, to note
when a system libiconv can't be used. We currently default to needing
pkgsrc libiconv on NetBSD only. This should fix pkg/17500.
Diffstat (limited to 'converters/libiconv')
-rw-r--r-- | converters/libiconv/buildlink.mk | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/converters/libiconv/buildlink.mk b/converters/libiconv/buildlink.mk index 271451b06c8..81b66d126ce 100644 --- a/converters/libiconv/buildlink.mk +++ b/converters/libiconv/buildlink.mk @@ -1,4 +1,4 @@ -# $NetBSD: buildlink.mk,v 1.10 2002/05/14 15:57:55 wiz Exp $ +# $NetBSD: buildlink.mk,v 1.11 2002/08/05 21:26:04 jlam Exp $ # # This Makefile fragment is included by packages that use libiconv. # @@ -18,10 +18,31 @@ ICONV_BUILDLINK_MK= # defined .include "../../mk/bsd.buildlink.mk" BUILDLINK_DEPENDS.iconv?= libiconv>=1.7nb2 -DEPENDS+= ${BUILDLINK_DEPENDS.iconv}:../../converters/libiconv +.if defined(USE_GNU_ICONV) +_NEED_ICONV= YES +.else +. if exists(/usr/include/iconv.h) +_NEED_ICONV= NO +. else +_NEED_ICONV= YES +. endif +_INCOMPAT_ICONV= NetBSD-*-* ${INCOMPAT_ICONV} +. for _pattern_ in ${_INCOMPAT_ICONV} +. if !empty(MACHINE_PLATFORM:M${_pattern_}) +_NEED_ICONV= YES +. endif +. endfor +.endif + +.if ${_NEED_ICONV} == "YES" +DEPENDS+= ${BUILDLINK_DEPENDS.iconv}:../../converters/libiconv EVAL_PREFIX+= BUILDLINK_PREFIX.iconv=libiconv BUILDLINK_PREFIX.iconv_DEFAULT= ${LOCALBASE} +.else +BUILDLINK_PREFIX.iconv= /usr +.endif + BUILDLINK_FILES.iconv= include/iconv.h BUILDLINK_FILES.iconv+= include/libcharset.h BUILDLINK_FILES.iconv+= lib/libcharset.* |