pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/converters/libiconv Replace ICONV_IS_GNU with ICONV_TY...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/7982dc08cbfb
branches:  trunk
changeset: 468233:7982dc08cbfb
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Wed Feb 11 12:17:58 2004 +0000

description:
Replace ICONV_IS_GNU with ICONV_TYPE, which can be checked to be either
"gnu" or "native".

diffstat:

 converters/libiconv/buildlink2.mk |   5 +++--
 converters/libiconv/buildlink3.mk |  20 ++++++++++++++++++--
 2 files changed, 21 insertions(+), 4 deletions(-)

diffs (67 lines):

diff -r 3ef0d0a031eb -r 7982dc08cbfb converters/libiconv/buildlink2.mk
--- a/converters/libiconv/buildlink2.mk Wed Feb 11 11:48:02 2004 +0000
+++ b/converters/libiconv/buildlink2.mk Wed Feb 11 12:17:58 2004 +0000
@@ -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 @@
 .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 -r 3ef0d0a031eb -r 7982dc08cbfb converters/libiconv/buildlink3.mk
--- a/converters/libiconv/buildlink3.mk Wed Feb 11 11:48:02 2004 +0000
+++ b/converters/libiconv/buildlink3.mk Wed Feb 11 12:17:58 2004 +0000
@@ -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_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_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}



Home | Main Index | Thread Index | Old Index