summaryrefslogtreecommitdiff
path: root/x11/inputproto
diff options
context:
space:
mode:
authortron <tron>2008-01-05 16:00:08 +0000
committertron <tron>2008-01-05 16:00:08 +0000
commita4a932186119d9537400d7c54e5d6ea2169e7b92 (patch)
tree5548d0c27fd56c957e1cf266d001f8bcc2f03558 /x11/inputproto
parentd5d8c7bb981a311899859bd7ca2efc38b7e0f8b2 (diff)
downloadpkgsrc-a4a932186119d9537400d7c54e5d6ea2169e7b92.tar.gz
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.
Diffstat (limited to 'x11/inputproto')
-rw-r--r--x11/inputproto/builtin.mk20
1 files changed, 16 insertions, 4 deletions
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,13 +15,25 @@ 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.<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.<pkg> appropriate ("yes" or "no").
###