diff options
author | jlam <jlam> | 2004-02-12 01:59:37 +0000 |
---|---|---|
committer | jlam <jlam> | 2004-02-12 01:59:37 +0000 |
commit | d1197e2dbd26577a4d276890bc662b2a7f93e572 (patch) | |
tree | f36bdf155011b2521ad9dfd8a23373398462d265 /archivers | |
parent | 2645f9642e2b6553e699f80dbfe9905e21c03d99 (diff) | |
download | pkgsrc-d1197e2dbd26577a4d276890bc662b2a7f93e572.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 'archivers')
-rw-r--r-- | archivers/bzip2/buildlink2.mk | 33 | ||||
-rw-r--r-- | archivers/bzip2/buildlink3.mk | 27 |
2 files changed, 27 insertions, 33 deletions
diff --git a/archivers/bzip2/buildlink2.mk b/archivers/bzip2/buildlink2.mk index 0dbc71604e9..28ed9e56b6c 100644 --- a/archivers/bzip2/buildlink2.mk +++ b/archivers/bzip2/buildlink2.mk @@ -1,4 +1,4 @@ -# $NetBSD: buildlink2.mk,v 1.9 2004/02/05 07:17:14 jlam Exp $ +# $NetBSD: buildlink2.mk,v 1.10 2004/02/12 01:59:37 jlam Exp $ .if !defined(BZIP2_BUILDLINK2_MK) BZIP2_BUILDLINK2_MK= # defined @@ -8,37 +8,32 @@ BZIP2_BUILDLINK2_MK= # defined BUILDLINK_DEPENDS.bzip2?= bzip2>=1.0.1 BUILDLINK_PKGSRCDIR.bzip2?= ../../archivers/bzip2 -.if defined(USE_BZIP2) -_NEED_BZIP2= YES -.else -. if exists(/usr/include/bzlib.h) +.if exists(/usr/include/bzlib.h) # # Recent versions of the libbz2 API prefix all functions with "BZ2_". # _BUILTIN_BZIP2!= ${EGREP} -c "BZ2_" /usr/include/bzlib.h || ${TRUE} -. else +.else _BUILTIN_BZIP2= 0 -. endif -. if ${_BUILTIN_BZIP2} == "0" -_NEED_BZIP2= YES -. else -_NEED_BZIP2= NO -. endif +.endif # # Solaris 9 has bzip2 1.0.1, build it on older versions. # Darwin only has static libbz2.a, which can't be buildlinked # _INCOMPAT_BZIP2= SunOS-5.[678]-* Darwin-* -INCOMPAT_BZIP2?= # empty -. for _pattern_ in ${_INCOMPAT_BZIP2} ${INCOMPAT_BZIP2} -. if !empty(MACHINE_PLATFORM:M${_pattern_}) +.for _pattern_ in ${_INCOMPAT_BZIP2} ${INCOMPAT_BZIP2} +. if !empty(MACHINE_PLATFORM:M${_pattern_}) +_BUILTIN_BZIP2= 0 +. endif +.endfor + +.if ${_BUILTIN_BZIP2} == "0" _NEED_BZIP2= YES -. endif -. endfor +.else +_NEED_BZIP2= NO .endif -.if !empty(PREFER_PKGSRC:M[yY][eE][sS]) || \ - !empty(PREFER_PKGSRC:Mbzip2) +.if defined(USE_BZIP2) _NEED_BZIP2= YES .endif diff --git a/archivers/bzip2/buildlink3.mk b/archivers/bzip2/buildlink3.mk index 08082f3f076..a8284bf9d32 100644 --- a/archivers/bzip2/buildlink3.mk +++ b/archivers/bzip2/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/12 01:59:37 jlam Exp $ BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+ BZIP2_BUILDLINK3_MK:= ${BZIP2_BUILDLINK3_MK}+ @@ -23,19 +23,27 @@ BUILDLINK_IS_BUILTIN.bzip2!= \ ${ECHO} "NO"; \ fi . endif +. if !empty(BUILDLINK_CHECK_BUILTIN.bzip2:M[nN][oO]) # # Solaris 9 has bzip2 1.0.1, build it on older versions. # Darwin only has static libbz2.a, which can't be buildlinked. # _INCOMPAT_BZIP2?= SunOS-5.[678]-* Darwin-* -. for _pattern_ in ${_INCOMPAT_BZIP2} ${INCOMPAT_BZIP2} -. if !empty(MACHINE_PLATFORM:M${_pattern_}) +. for _pattern_ in ${_INCOMPAT_BZIP2} ${INCOMPAT_BZIP2} +. if !empty(MACHINE_PLATFORM:M${_pattern_}) BUILDLINK_IS_BUILTIN.bzip2= NO -. endif -. endfor +. endif +. endfor +. endif MAKEFLAGS+= BUILDLINK_IS_BUILTIN.bzip2=${BUILDLINK_IS_BUILTIN.bzip2} .endif +.if !empty(BUILDLINK_IS_BUILTIN.bzip2:M[yY][eE][sS]) +BUILDLINK_USE_BUILTIN.bzip2= YES +.else +BUILDLINK_USE_BUILTIN.bzip2= NO +.endif + .if !empty(PREFER_PKGSRC:M[yY][eE][sS]) || \ !empty(PREFER_PKGSRC:Mbzip2) BUILDLINK_USE_BUILTIN.bzip2= NO @@ -49,15 +57,6 @@ BUILDLINK_USE_BUILTIN.bzip2= NO BUILDLINK_USE_BUILTIN.bzip2= YES .endif -.if !defined(BUILDLINK_USE_BUILTIN.bzip2) -. if !empty(BUILDLINK_IS_BUILTIN.bzip2:M[nN][oO]) -BUILDLINK_USE_BUILTIN.bzip2= NO -. else -BUILDLINK_USE_BUILTIN.bzip2= YES -. endif -MAKEFLAGS+= BUILDLINK_USE_BUILTIN.bzip2=${BUILDLINK_USE_BUILTIN.bzip2} -.endif - .if !empty(BUILDLINK_USE_BUILTIN.bzip2:M[nN][oO]) . if !empty(BUILDLINK_DEPTH:M+) BUILDLINK_DEPENDS+= bzip2 |