diff options
author | obache <obache> | 2014-04-23 12:22:48 +0000 |
---|---|---|
committer | obache <obache> | 2014-04-23 12:22:48 +0000 |
commit | 96c828e0e1c191e71406909d4018cc268590d4ba (patch) | |
tree | c73b6f84388d6ea6e49c07a6771c47a34c391183 /x11 | |
parent | 60681d17907395483f2883022f85dfccb5c9aa53 (diff) | |
download | pkgsrc-96c828e0e1c191e71406909d4018cc268590d4ba.tar.gz |
Add builtin detection for libXi (mainly for the case X11_TYPE=native but builtin
version is older than required version).
Set API_DEPENDS for required package for the case using libXi from pkgsrc,
same as specified to build this package.
Diffstat (limited to 'x11')
-rw-r--r-- | x11/libXi/buildlink3.mk | 18 | ||||
-rw-r--r-- | x11/libXi/builtin.mk | 44 |
2 files changed, 60 insertions, 2 deletions
diff --git a/x11/libXi/buildlink3.mk b/x11/libXi/buildlink3.mk index 4aa3eb411dc..a294b95f820 100644 --- a/x11/libXi/buildlink3.mk +++ b/x11/libXi/buildlink3.mk @@ -1,8 +1,9 @@ -# $NetBSD: buildlink3.mk,v 1.7 2013/04/06 08:18:01 wiz Exp $ +# $NetBSD: buildlink3.mk,v 1.8 2014/04/23 12:22:48 obache Exp $ .include "../../mk/bsd.fast.prefs.mk" -.if ${X11_TYPE} != "modular" +.if ${X11_TYPE} != "modular" && \ + !defined(BUILDLINK_API_DEPENDS.libXi) .include "../../mk/x11.buildlink3.mk" .else @@ -11,9 +12,22 @@ BUILDLINK_TREE+= libXi .if !defined(LIBXI_BUILDLINK3_MK) LIBXI_BUILDLINK3_MK:= +. if !defined(USE_BUILTIN.libXi) +CHECK_BUILTIN.libXi:= yes +. include "../../x11/libXi/builtin.mk" +CHECK_BUILTIN.libXi:= no +. endif + BUILDLINK_API_DEPENDS.libXi+= libXi>=1.0.0 BUILDLINK_PKGSRCDIR.libXi?= ../../x11/libXi +. if !empty(USE_BUILTIN.libXi:M[Nn][Oo]) +BUILDLINK_API_DEPENDS.inputproto+= inputproto>=2.3 +BUILDLINK_API_DEPENDS.libX11+= libX11>=1.5 +BUILDLINK_API_DEPENDS.libXext+= libXext>=1.1 +BUILDLINK_API_DEPENDS.xextproto+= xextproto>=7.0.3 +BUILDLINK_API_DEPENDS.xproto+= xproto>=7.0.13 +. endif .include "../../x11/inputproto/buildlink3.mk" .include "../../x11/libX11/buildlink3.mk" .include "../../x11/libXext/buildlink3.mk" diff --git a/x11/libXi/builtin.mk b/x11/libXi/builtin.mk new file mode 100644 index 00000000000..60199c5c879 --- /dev/null +++ b/x11/libXi/builtin.mk @@ -0,0 +1,44 @@ +# $NetBSD: builtin.mk,v 1.1 2014/04/23 12:22:48 obache Exp $ + +BUILTIN_PKG:= libXi +PKGCONFIG_FILE.libXi= ${X11BASE}/lib/pkgconfig/xi.pc +PKGCONFIG_FILE.libXi+= ${X11BASE}/lib${LIBABISUFFIX}/pkgconfig/xi.pc + +BUILTIN_FIND_FILES_VAR:= H_XINPUT +BUILTIN_FIND_FILES.H_XINPUT= ${X11BASE}/include/X11/extensions/XInput.h + +.include "../../mk/buildlink3/bsd.builtin.mk" + +### +### Determine if there is a built-in implementation of the package and +### set IS_BUILTIN.<pkg> appropriately ("yes" or "no"). +### +.if ${X11BASE} == ${LOCALBASE} +IS_BUILTIN.libXi= no +.elif !defined(IS_BUILTIN.libXi) +IS_BUILTIN.libXi= no +. if empty(H_XINPUT:M__nonexistent__) +IS_BUILTIN.libXi= yes +. endif +.endif +MAKEVARS+= IS_BUILTIN.libXi + +### +### Determine whether we should use the built-in implementation if it +### exists, and set USE_BUILTIN.<pkg> appropriate ("yes" or "no"). +### +.if !defined(USE_BUILTIN.libXi) && !defined(BUILDLINK_API_DEPENDS.libXi) +. if ${PREFER.libXi} == "pkgsrc" +USE_BUILTIN.libXi= no +. else +USE_BUILTIN.libXi= ${IS_BUILTIN.libXi} +. if defined(BUILTIN_PKG.libXi) && \ + !empty(IS_BUILTIN.libXi:M[yY][eE][sS]) +USE_BUILTIN.libXi= yes +. endif +. endif # PREFER.libXi +.endif +MAKEVARS+= USE_BUILTIN.libXi + +.include "../../mk/buildlink3/pkgconfig-builtin.mk" +.include "../../mk/x11.builtin.mk" |