diff options
author | schmonz <schmonz@pkgsrc.org> | 2004-07-18 09:35:08 +0000 |
---|---|---|
committer | schmonz <schmonz@pkgsrc.org> | 2004-07-18 09:35:08 +0000 |
commit | e464fcb387b1aa4585d2240dbee70b5e8965c8ce (patch) | |
tree | 3be3331865db31cbfa6e060e72d99780f2da1b2e | |
parent | 52fa112d0b5d5cc75346f07e01a15f22b3d529b1 (diff) | |
download | pkgsrc-e464fcb387b1aa4585d2240dbee70b5e8965c8ce.tar.gz |
dlcompat was added to OS X "Panther". Add a builtin.mk to detect
its presence. Bump BUILDLINK_DEPENDS to the latest version.
Evaluate the contents of buildlink3.mk only if we're on Darwin,
which lets us simply .include "../../devel/dlcompat/buildlink3.mk"
anywhere we might need it without affecting other platforms.
-rw-r--r-- | devel/dlcompat/buildlink3.mk | 8 | ||||
-rw-r--r-- | devel/dlcompat/builtin.mk | 56 |
2 files changed, 62 insertions, 2 deletions
diff --git a/devel/dlcompat/buildlink3.mk b/devel/dlcompat/buildlink3.mk index c6a7e02fd4f..5b6358b1529 100644 --- a/devel/dlcompat/buildlink3.mk +++ b/devel/dlcompat/buildlink3.mk @@ -1,4 +1,6 @@ -# $NetBSD: buildlink3.mk,v 1.5 2004/03/05 19:25:10 jlam Exp $ +# $NetBSD: buildlink3.mk,v 1.6 2004/07/18 09:35:08 schmonz Exp $ + +.if ${OPSYS} == "Darwin" BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+ DLCOMPAT_BUILDLINK3_MK:= ${DLCOMPAT_BUILDLINK3_MK}+ @@ -11,8 +13,10 @@ BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Ndlcompat} BUILDLINK_PACKAGES+= dlcompat .if !empty(DLCOMPAT_BUILDLINK3_MK:M+) -BUILDLINK_DEPENDS.dlcompat+= dlcompat>=20020606 +BUILDLINK_DEPENDS.dlcompat+= dlcompat>=20030629 BUILDLINK_PKGSRCDIR.dlcompat?= ../../devel/dlcompat .endif # DLCOMPAT_BUILDLINK3_MK BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//} + +.endif # OPSYS diff --git a/devel/dlcompat/builtin.mk b/devel/dlcompat/builtin.mk new file mode 100644 index 00000000000..c3d9bae2aa2 --- /dev/null +++ b/devel/dlcompat/builtin.mk @@ -0,0 +1,56 @@ +# $NetBSD: builtin.mk,v 1.1 2004/07/18 09:35:08 schmonz Exp $ + +.if !defined(_BLNK_LIBDL_FOUND) +_BLNK_LIBDL_FOUND!= \ + if [ "`${ECHO} /usr/lib/libdl.*`" = "/usr/lib/libdl.*" ]; then \ + ${ECHO} "no"; \ + else \ + ${ECHO} "yes"; \ + fi +BUILDLINK_VARS+= _BLNK_LIBDL_FOUND +.endif + +_DL_H= /usr/include/dlfcn.h + +.if !defined(IS_BUILTIN.dlcompat) +IS_BUILTIN.dlcompat= no +. if !empty(_BLNK_LIBDL_FOUND:M[yY][eE][sS]) +IS_BUILTIN.dlcompat= yes +. elif exists(${_DL_H}) +IS_BUILTIN.dlcompat= yes +. if !empty(IS_BUILTIN.dlcompat:M[yY][eE][sS]) +_DL_VERSION= 20030629 +BUILTIN_PKG.dlcompat= dlcompat-${_DL_VERSION} +BUILDLINK_VARS+= BUILTIN_PKG.dlcompat +. endif +. endif +BUILDLINK_VARS+= IS_BUILTIN.dlcompat +.endif # IS_BUILTIN.dlcompat + +.if !defined(USE_BUILTIN.dlcompat) +USE_BUILTIN.dlcompat?= ${IS_BUILTIN.dlcompat} +PREFER.dlcompat?= pkgsrc + +. if defined(BUILTIN_PKG.dlcompat) +USE_BUILTIN.dlcompat= yes +. for _depend_ in ${BUILDLINK_DEPENDS.dlcompat} +. if !empty(IS_BUILTIN.dlcompat:M[yY][eE][sS]) +USE_BUILTIN.dlcompat!= \ + if ${PKG_ADMIN} pmatch '${_depend_}' ${BUILTIN_PKG.dlcompat}; then \ + ${ECHO} "yes"; \ + else \ + ${ECHO} "no"; \ + fi +. endif +. endfor +. endif + +. if ${PREFER.dlcompat} == "native" +USE_BUILTIN.dlcompat= yes +. endif + +. if !empty(IS_BUILTIN.dlcompat:M[nN][oO]) || \ + (${PREFER.dlcompat} == "pkgsrc") +USE_BUILTIN.dlcompat= no +. endif +.endif # USE_BUILTIN.dlcompat |