diff options
author | jlam <jlam> | 2004-03-10 17:57:14 +0000 |
---|---|---|
committer | jlam <jlam> | 2004-03-10 17:57:14 +0000 |
commit | dcc66b8df5c6733d79956b8b5a9fd3a9c8d948f7 (patch) | |
tree | 1226d07b8f66083168895189decc88848b70903f /archivers/bzip2/builtin.mk | |
parent | e21a48d5290393121554d500c5350afe393cefba (diff) | |
download | pkgsrc-dcc66b8df5c6733d79956b8b5a9fd3a9c8d948f7.tar.gz |
Split out the code that deals with checking whether the software is
built-in or not into a separate builtin.mk file. The code to deal
checking for built-in software is much simpler to deal with in pkgsrc.
The buildlink3.mk file for a package will be of the usual format
regardless of the package, which makes it simpler for packagers to
update a package.
The builtin.mk file for a package must define a single yes/no variable
USE_BUILTIN.<pkg> that is used by bsd.buildlink3.mk to decide whether
to use the built-in software or to use the pkgsrc software.
Diffstat (limited to 'archivers/bzip2/builtin.mk')
-rw-r--r-- | archivers/bzip2/builtin.mk | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/archivers/bzip2/builtin.mk b/archivers/bzip2/builtin.mk new file mode 100644 index 00000000000..408657f8b59 --- /dev/null +++ b/archivers/bzip2/builtin.mk @@ -0,0 +1,41 @@ +# $NetBSD: builtin.mk,v 1.1 2004/03/10 17:57:14 jlam Exp $ + +.if !defined(IS_BUILTIN.bzip2) +IS_BUILTIN.bzip2= no +. if exists(/usr/include/bzlib.h) +IS_BUILTIN.bzip2!= \ + if ${GREP} -q "BZ2_" /usr/include/bzlib.h; then \ + ${ECHO} "yes"; \ + else \ + ${ECHO} "no"; \ + fi +. endif +MAKEFLAGS+= IS_BUILTIN.bzip2=${IS_BUILTIN.bzip2} +.endif + +CHECK_BUILTIN.bzip2?= no +.if !empty(CHECK_BUILTIN.bzip2:M[yY][eE][sS]) +USE_BUILTIN.bzip2= yes +.endif + +.if !defined(USE_BUILTIN.bzip2) +USE_BUILTIN.bzip2?= ${IS_BUILTIN.bzip2} +PREFER.bzip2?= pkgsrc + +. if defined(USE_BZIP2) +. if !empty(IS_BUILTIN.bzip2:M[nN][oO]) || \ + (${PREFER.bzip2} == "pkgsrc") +USE_BUILTIN.bzip2= no +. endif +. endif + +# Solaris 9 has bzip2 1.0.1, build it on older versions. +# Darwin only has a static libbz2.a. +# +_INCOMPAT_BZIP2?= SunOS-5.[678]-* Darwin-* +. for _pattern_ in ${_INCOMPAT_BZIP2} ${INCOMPAT_BZIP2} +. if !empty(MACHINE_PLATFORM:M${_pattern_}) +USE_BUILTIN.bzip2= no +. endif +. endfor +.endif # USE_BUILTIN.bzip2 |