From a4a932186119d9537400d7c54e5d6ea2169e7b92 Mon Sep 17 00:00:00 2001 From: tron Date: Sat, 5 Jan 2008 16:00:08 +0000 Subject: Use the "pkg-config" file to detect the version number. A builtin version will otherwise get rejected because we require at least version 1.4. --- x11/inputproto/builtin.mk | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'x11/inputproto') diff --git a/x11/inputproto/builtin.mk b/x11/inputproto/builtin.mk index 4a372ab9829..46e1ba6f329 100644 --- a/x11/inputproto/builtin.mk +++ b/x11/inputproto/builtin.mk @@ -1,9 +1,9 @@ -# $NetBSD: builtin.mk,v 1.1 2008/01/05 15:27:08 tron Exp $ +# $NetBSD: builtin.mk,v 1.2 2008/01/05 16:00:08 tron Exp $ BUILTIN_PKG:= inputproto -BUILTIN_FIND_FILES_VAR:= H_XI -BUILTIN_FIND_FILES.H_XI= ${X11BASE}/include/X11/extensions/XI.h +BUILTIN_FIND_FILES_VAR:= PC_INPUTPROTO +BUILTIN_FIND_FILES.PC_INPUTPROTO= ${X11BASE}/lib/pkgconfig/inputproto.pc .include "../../mk/buildlink3/bsd.builtin.mk" @@ -15,12 +15,24 @@ BUILTIN_FIND_FILES.H_XI= ${X11BASE}/include/X11/extensions/XI.h IS_BUILTIN.inputproto= no .elif !defined(IS_BUILTIN.inputproto) IS_BUILTIN.inputproto= no -. if empty(H_XI:M__nonexistent__) +. if empty(PC_INPUTPROTO:M__nonexistent__) IS_BUILTIN.inputproto= yes . endif .endif MAKEVARS+= IS_BUILTIN.inputproto +### +### If there is a built-in implementation, then set BUILTIN_PKG. to +### a package name to represent the built-in package. +### +.if !defined(BUILTIN_PKG.inputproto) && \ + !empty(IS_BUILTIN.inputproto:M[yY][eE][sS]) && \ + empty(PC_INPUTPROTO:M__nonexistent__) +BUILTIN_VERSION.inputproto!= ${SED} -n -e 's/Version: //p' ${PC_INPUTPROTO} +BUILTIN_PKG.inputproto= inputproto-${BUILTIN_VERSION.inputproto} +.endif +MAKEVARS+= BUILTIN_PKG.inputproto + ### ### Determine whether we should use the built-in implementation if it ### exists, and set USE_BUILTIN. appropriate ("yes" or "no"). -- cgit v1.2.3