diff options
author | jlam <jlam> | 2004-02-12 01:59:37 +0000 |
---|---|---|
committer | jlam <jlam> | 2004-02-12 01:59:37 +0000 |
commit | db14b05ecdfa92241cb3b9ca1a9c55447e2b1ae4 (patch) | |
tree | f36bdf155011b2521ad9dfd8a23373398462d265 /converters | |
parent | 342253e6bd51ec74765e2ef9c6471f0c92aaddba (diff) | |
download | pkgsrc-db14b05ecdfa92241cb3b9ca1a9c55447e2b1ae4.tar.gz |
Reorganize code so that any dependencies are checked as part of deciding
whether the software is built-in or not. This facilitates implementing
the forthcoming PKGSRC_NATIVE variable.
Diffstat (limited to 'converters')
-rw-r--r-- | converters/libiconv/buildlink2.mk | 39 | ||||
-rw-r--r-- | converters/libiconv/buildlink3.mk | 27 |
2 files changed, 35 insertions, 31 deletions
diff --git a/converters/libiconv/buildlink2.mk b/converters/libiconv/buildlink2.mk index c44ccf280af..ccb964c9021 100644 --- a/converters/libiconv/buildlink2.mk +++ b/converters/libiconv/buildlink2.mk @@ -1,4 +1,4 @@ -# $NetBSD: buildlink2.mk,v 1.16 2004/02/11 12:17:58 jlam Exp $ +# $NetBSD: buildlink2.mk,v 1.17 2004/02/12 01:59:37 jlam Exp $ .if !defined(ICONV_BUILDLINK2_MK) ICONV_BUILDLINK2_MK= # defined @@ -8,29 +8,30 @@ ICONV_BUILDLINK2_MK= # defined BUILDLINK_DEPENDS.iconv?= libiconv>=1.9.1 BUILDLINK_PKGSRCDIR.iconv?= ../../converters/libiconv -.if defined(USE_GNU_ICONV) -_NEED_ICONV= YES -_BLNK_LIBICONV_FOUND= NO -.else -. if exists(/usr/include/iconv.h) -_NEED_ICONV= NO +.if exists(/usr/include/iconv.h) +_BUILTIN_ICONV= YES _BLNK_LIBICONV_LIST!= ${ECHO} /usr/lib/libiconv.* -. if ${_BLNK_LIBICONV_LIST} != "/usr/lib/libiconv.*" +. if ${_BLNK_LIBICONV_LIST} != "/usr/lib/libiconv.*" _BLNK_LIBICONV_FOUND= YES -. else -_BLNK_LIBICONV_FOUND= NO -. endif . else -_NEED_ICONV= YES _BLNK_LIBICONV_FOUND= NO . endif +.else +_BUILTIN_ICONV= NO +_BLNK_LIBICONV_FOUND= NO +.endif _INCOMPAT_ICONV?= # should be set from defs.${OPSYS}.mk -INCOMPAT_ICONV?= # empty -. for _pattern_ in ${_INCOMPAT_ICONV} ${INCOMPAT_ICONV} -. if !empty(MACHINE_PLATFORM:M${_pattern_}) +.for _pattern_ in ${_INCOMPAT_ICONV} ${INCOMPAT_ICONV} +. if !empty(MACHINE_PLATFORM:M${_pattern_}) +_BUILTIN_ICONV= NO +_BLNK_LIBICONV_FOUND= NO +. endif +.endfor + +.if ${_BUILTIN_ICONV} == "YES" +_NEED_ICONV= NO +.else _NEED_ICONV= YES -. endif -. endfor .endif .if !empty(PREFER_PKGSRC:M[yY][eE][sS]) || \ @@ -38,6 +39,10 @@ _NEED_ICONV= YES _NEED_ICONV= YES .endif +.if defined(USE_GNU_ICONV) +_NEED_ICONV= YES +.endif + .if ${_NEED_ICONV} == "YES" # let other packages know that we're using the pkgsrc # GNU libiconv diff --git a/converters/libiconv/buildlink3.mk b/converters/libiconv/buildlink3.mk index e9b3cf9f117..f72f13a3d36 100644 --- a/converters/libiconv/buildlink3.mk +++ b/converters/libiconv/buildlink3.mk @@ -1,4 +1,4 @@ -# $NetBSD: buildlink3.mk,v 1.12 2004/02/11 12:17:58 jlam Exp $ +# $NetBSD: buildlink3.mk,v 1.13 2004/02/12 01:59:37 jlam Exp $ BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+ ICONV_BUILDLINK3_MK:= ${ICONV_BUILDLINK3_MK}+ @@ -20,12 +20,20 @@ BUILDLINK_IS_BUILTIN.iconv= NO . if exists(${_ICONV_H}) BUILDLINK_IS_BUILTIN.iconv= YES . endif +. if !empty(BUILDLINK_CHECK_BUILTIN.iconv:M[nN][oO]) _INCOMPAT_ICONV?= # should be set from defs.${OPSYS}.mk -. for _pattern_ in ${_INCOMPAT_ICONV} ${INCOMPAT_ICONV} -. if !empty(MACHINE_PLATFORM:M${_pattern_}) +. for _pattern_ in ${_INCOMPAT_ICONV} ${INCOMPAT_ICONV} +. if !empty(MACHINE_PLATFORM:M${_pattern_}) BUILDLINK_IS_BUILTIN.iconv= NO -. endif -. endfor +. endif +. endfor +. endif +.endif + +.if !empty(BUILDLINK_IS_BUILTIN.iconv:M[yY][eE][sS]) +BUILDLINK_USE_BUILTIN.iconv= YES +.else +BUILDLINK_USE_BUILTIN.iconv= NO .endif .if !empty(PREFER_PKGSRC:M[yY][eE][sS]) || \ @@ -41,15 +49,6 @@ BUILDLINK_USE_BUILTIN.iconv= NO BUILDLINK_USE_BUILTIN.iconv= YES .endif -.if !defined(BUILDLINK_USE_BUILTIN.iconv) -. if !empty(BUILDLINK_IS_BUILTIN.iconv:M[nN][oO]) -BUILDLINK_USE_BUILTIN.iconv= NO -. else -BUILDLINK_USE_BUILTIN.iconv= YES -. endif -MAKEFLAGS+= BUILDLINK_USE_BUILTIN.iconv=${BUILDLINK_USE_BUILTIN.iconv} -.endif - .if !empty(BUILDLINK_USE_BUILTIN.iconv:M[nN][oO]) . if !empty(BUILDLINK_DEPTH:M+) BUILDLINK_DEPENDS+= iconv |