diff options
author | jlam <jlam@pkgsrc.org> | 2004-02-12 01:59:37 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2004-02-12 01:59:37 +0000 |
commit | 1edfa505eddb87dd79db0d2897323b39e05e4a03 (patch) | |
tree | f36bdf155011b2521ad9dfd8a23373398462d265 /devel/gettext-lib | |
parent | 3574066d66f5570c39b086cbf1ccc1116cb66c7b (diff) | |
download | pkgsrc-1edfa505eddb87dd79db0d2897323b39e05e4a03.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 'devel/gettext-lib')
-rw-r--r-- | devel/gettext-lib/buildlink2.mk | 51 | ||||
-rw-r--r-- | devel/gettext-lib/buildlink3.mk | 57 |
2 files changed, 57 insertions, 51 deletions
diff --git a/devel/gettext-lib/buildlink2.mk b/devel/gettext-lib/buildlink2.mk index 729953a4d93..07592619993 100644 --- a/devel/gettext-lib/buildlink2.mk +++ b/devel/gettext-lib/buildlink2.mk @@ -1,4 +1,4 @@ -# $NetBSD: buildlink2.mk,v 1.28 2004/02/05 07:17:14 jlam Exp $ +# $NetBSD: buildlink2.mk,v 1.29 2004/02/12 01:59:37 jlam Exp $ .if !defined(GETTEXT_BUILDLINK2_MK) GETTEXT_BUILDLINK2_MK= # defined @@ -8,42 +8,43 @@ GETTEXT_BUILDLINK2_MK= # defined BUILDLINK_DEPENDS.gettext?= gettext-lib>=0.10.35nb1 BUILDLINK_PKGSRCDIR.gettext?= ../../devel/gettext-lib -.if defined(USE_GNU_GETTEXT) -_NEED_GNU_GETTEXT= YES -_BLNK_LIBINTL_FOUND= NO -.else -_BLNK_LIBINTL_LIST!= ${ECHO} /usr/lib/libintl.* -. if ${_BLNK_LIBINTL_LIST} != "/usr/lib/libintl.*" -_BLNK_LIBINTL_FOUND= YES -. else -_BLNK_LIBINTL_FOUND= NO -. endif -. if exists(/usr/include/libintl.h) +.if exists(/usr/include/libintl.h) # # Consider the base system libintl to be gettext-lib-0.10.35nb1. # _GETTEXT_PKG= gettext-lib-0.10.35nb1 _GETTEXT_DEPENDS= ${BUILDLINK_DEPENDS.gettext} -_NEED_GNU_GETTEXT!= \ +_BUILTIN_GETTEXT!= \ if ${PKG_ADMIN} pmatch '${_GETTEXT_DEPENDS}' ${_GETTEXT_PKG}; then \ - ${ECHO} "NO"; \ - else \ ${ECHO} "YES"; \ + else \ + ${ECHO} "NO"; \ fi +_BLNK_LIBINTL_LIST!= ${ECHO} /usr/lib/libintl.* +. if ${_BLNK_LIBINTL_LIST} != "/usr/lib/libintl.*" +_BLNK_LIBINTL_FOUND= YES . else -_NEED_GNU_GETTEXT= YES +_BLNK_LIBINTL_FOUND= NO . endif +.else +_BUILTIN_GETTEXT= NO +_BLNK_LIBINTL_FOUND= NO +.endif # -# Solaris has broken (for the purposes of pkgsrc) version of zlib and -# gettext. +# Solaris has broken (for the purposes of pkgsrc) version of gettext. # _INCOMPAT_GETTEXT= SunOS-*-* -INCOMPAT_GETTEXT?= # empty -. for _pattern_ in ${_INCOMPAT_GETTEXT} ${INCOMPAT_GETTEXT} -. if !empty(MACHINE_PLATFORM:M${_pattern_}) +.for _pattern_ in ${_INCOMPAT_GETTEXT} ${INCOMPAT_GETTEXT} +. if !empty(MACHINE_PLATFORM:M${_pattern_}) +_BUILTIN_GETTEXT= NO +_BLNK_LIBINTL_FOUND= NO +. endif +.endfor + +.if ${_BUILTIN_GETTEXT} == "YES" +_NEED_GNU_GETTEXT= NO +.else _NEED_GNU_GETTEXT= YES -. endif -. endfor .endif .if !empty(PREFER_PKGSRC:M[yY][eE][sS]) || \ @@ -51,6 +52,10 @@ _NEED_GNU_GETTEXT= YES _NEED_GNU_GETTEXT= YES .endif +.if defined(USE_GNU_GETTEXT) +_NEED_GNU_GETTEXT= YES +.endif + .if ${_NEED_GNU_GETTEXT} == "YES" BUILDLINK_PACKAGES+= gettext EVAL_PREFIX+= BUILDLINK_PREFIX.gettext=gettext-lib diff --git a/devel/gettext-lib/buildlink3.mk b/devel/gettext-lib/buildlink3.mk index df8e615caa9..9ed24b3d317 100644 --- a/devel/gettext-lib/buildlink3.mk +++ b/devel/gettext-lib/buildlink3.mk @@ -1,4 +1,4 @@ -# $NetBSD: buildlink3.mk,v 1.13 2004/02/11 11:30:49 jlam Exp $ +# $NetBSD: buildlink3.mk,v 1.14 2004/02/12 01:59:37 jlam Exp $ BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+ GETTEXT_BUILDLINK3_MK:= ${GETTEXT_BUILDLINK3_MK}+ @@ -17,21 +17,45 @@ BUILDLINK_CHECK_BUILTIN.gettext?= NO BUILDLINK_IS_BUILTIN.gettext= NO . if exists(/usr/include/libintl.h) BUILDLINK_IS_BUILTIN.gettext= YES +. if !empty(BUILDLINK_CHECK_BUILTIN.gettext:M[nN][oO]) +# +# Consider the base system libintl to be gettext-lib-0.10.35nb1. +# +_GETTEXT_PKG= gettext-lib-0.10.35nb1 +. for _depend_ in ${BUILDLINK_DEPENDS.gettext} +. if !empty(BUILDLINK_IS_BUILTIN.gettext:M[yY][eE][sS]) +BUILDLINK_IS_BUILTIN.gettext!= \ + if ${PKG_ADMIN} pmatch '${_depend_}' ${_GETTEXT_PKG}; then \ + ${ECHO} "YES"; \ + else \ + ${ECHO} "NO"; \ + fi +. endif +. endfor +. endif . endif +. if !empty(BUILDLINK_CHECK_BUILTIN.gettext:M[nN][oO]) # # The listed platforms have a broken (for the purposes of pkgsrc) version # of gettext-lib. # _INCOMPAT_GETTEXT= SunOS-*-* INCOMPAT_GETTEXT?= # empty -. for _pattern_ in ${_INCOMPAT_GETTEXT} ${INCOMPAT_GETTEXT} -. if !empty(MACHINE_PLATFORM:M${_pattern_}) +. for _pattern_ in ${_INCOMPAT_GETTEXT} ${INCOMPAT_GETTEXT} +. if !empty(MACHINE_PLATFORM:M${_pattern_}) BUILDLINK_IS_BUILTIN.gettext= NO -. endif -. endfor +. endif +. endfor +. endif MAKEFLAGS+= BUILDLINK_IS_BUILTIN.gettext=${BUILDLINK_IS_BUILTIN.gettext} .endif +.if !empty(BUILDLINK_IS_BUILTIN.gettext:M[yY][eE][sS]) +BUILDLINK_USE_BUILTIN.gettext= YES +.else +BUILDLINK_USE_BUILTIN.gettext= NO +.endif + .if !empty(PREFER_PKGSRC:M[yY][eE][sS]) || \ !empty(PREFER_PKGSRC:Mgettext) BUILDLINK_USE_BUILTIN.gettext= NO @@ -45,29 +69,6 @@ BUILDLINK_USE_BUILTIN.gettext= NO BUILDLINK_USE_BUILTIN.gettext= YES .endif -.if !defined(BUILDLINK_USE_BUILTIN.gettext) -. if !empty(BUILDLINK_IS_BUILTIN.gettext:M[nN][oO]) -BUILDLINK_USE_BUILTIN.gettext= NO -. else -# -# Consider the base system libintl to be gettext-lib-0.10.35nb1. -# -_GETTEXT_PKG= gettext-lib-0.10.35nb1 -BUILDLINK_USE_BUILTIN.gettext?= YES -. for _depend_ in ${BUILDLINK_DEPENDS.gettext} -. if !empty(BUILDLINK_USE_BUILTIN.gettext:M[yY][eE][sS]) -BUILDLINK_USE_BUILTIN.gettext!= \ - if ${PKG_ADMIN} pmatch '${_depend_}' ${_GETTEXT_PKG}; then \ - ${ECHO} "YES"; \ - else \ - ${ECHO} "NO"; \ - fi -. endif -. endfor -. endif -MAKEFLAGS+= BUILDLINK_USE_BUILTIN.gettext=${BUILDLINK_USE_BUILTIN.gettext} -.endif - .if !empty(BUILDLINK_USE_BUILTIN.gettext:M[nN][oO]) . if !empty(BUILDLINK_DEPTH:M+) BUILDLINK_DEPENDS+= gettext |