diff options
author | jlam <jlam@pkgsrc.org> | 2004-02-11 12:17:58 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2004-02-11 12:17:58 +0000 |
commit | 31282d855f92cf5bc815acdfba344d1352f7e421 (patch) | |
tree | 8173dc9e1c125f76e330216ef98e44fd6c3c6fb2 /converters/libiconv | |
parent | 5e26843d9c570857548f46ae345a6ef76abb0456 (diff) | |
download | pkgsrc-31282d855f92cf5bc815acdfba344d1352f7e421.tar.gz |
Replace ICONV_IS_GNU with ICONV_TYPE, which can be checked to be either
"gnu" or "native".
Diffstat (limited to 'converters/libiconv')
-rw-r--r-- | converters/libiconv/buildlink2.mk | 5 | ||||
-rw-r--r-- | converters/libiconv/buildlink3.mk | 20 |
2 files changed, 21 insertions, 4 deletions
diff --git a/converters/libiconv/buildlink2.mk b/converters/libiconv/buildlink2.mk index 37a4520a1e8..c44ccf280af 100644 --- a/converters/libiconv/buildlink2.mk +++ b/converters/libiconv/buildlink2.mk @@ -1,4 +1,4 @@ -# $NetBSD: buildlink2.mk,v 1.15 2004/02/05 07:17:14 jlam Exp $ +# $NetBSD: buildlink2.mk,v 1.16 2004/02/11 12:17:58 jlam Exp $ .if !defined(ICONV_BUILDLINK2_MK) ICONV_BUILDLINK2_MK= # defined @@ -41,12 +41,13 @@ _NEED_ICONV= YES .if ${_NEED_ICONV} == "YES" # let other packages know that we're using the pkgsrc # GNU libiconv -ICONV_IS_GNU= YES +ICONV_TYPE= gnu BUILDLINK_PACKAGES+= iconv EVAL_PREFIX+= BUILDLINK_PREFIX.iconv=libiconv BUILDLINK_PREFIX.iconv_DEFAULT= ${LOCALBASE} _BLNK_ICONV_LDFLAGS= -L${BUILDLINK_PREFIX.iconv}/lib -liconv .else +ICONV_TYPE= native BUILDLINK_PREFIX.iconv= /usr . if ${_BLNK_LIBICONV_FOUND} == "YES" _BLNK_ICONV_LDFLAGS= -liconv diff --git a/converters/libiconv/buildlink3.mk b/converters/libiconv/buildlink3.mk index 4e811f7daff..e9b3cf9f117 100644 --- a/converters/libiconv/buildlink3.mk +++ b/converters/libiconv/buildlink3.mk @@ -1,4 +1,4 @@ -# $NetBSD: buildlink3.mk,v 1.11 2004/02/11 11:30:49 jlam Exp $ +# $NetBSD: buildlink3.mk,v 1.12 2004/02/11 12:17:58 jlam Exp $ BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+ ICONV_BUILDLINK3_MK:= ${ICONV_BUILDLINK3_MK}+ @@ -13,9 +13,11 @@ BUILDLINK_PKGSRCDIR.iconv?= ../../converters/libiconv BUILDLINK_CHECK_BUILTIN.iconv?= NO +_ICONV_H= /usr/include/iconv.h + .if !defined(BUILDLINK_IS_BUILTIN.iconv) BUILDLINK_IS_BUILTIN.iconv= NO -. if exists(/usr/include/iconv.h) +. if exists(${_ICONV_H}) BUILDLINK_IS_BUILTIN.iconv= YES . endif _INCOMPAT_ICONV?= # should be set from defs.${OPSYS}.mk @@ -76,6 +78,20 @@ BUILDLINK_TRANSFORM+= l:iconv: BUILDLINK_LDADD.iconv?= ${_BLNK_LIBICONV} . endif +.if !defined(ICONV_TYPE) +ICONV_TYPE?= gnu +. if !empty(BUILDLINK_USE_BUILTIN.iconv:M[yY][eE][sS]) && \ + exists(${_ICONV_H}) +ICONV_TYPE!= \ + if ${GREP} -q "GNU LIBICONV Library" ${_ICONV_H}; then \ + ${ECHO} "gnu"; \ + else \ + ${ECHO} "native"; \ + fi +. endif +MAKEFLAGS+= ICONV_TYPE=${ICONV_TYPE} +.endif + . if defined(GNU_CONFIGURE) . if !empty(BUILDLINK_USE_BUILTIN.iconv:M[nN][oO]) CONFIGURE_ARGS+= --with-libiconv-prefix=${BUILDLINK_PREFIX.iconv} |