summaryrefslogtreecommitdiff
path: root/x11/xineramaproto
diff options
context:
space:
mode:
authortron <tron@pkgsrc.org>2008-01-05 16:05:52 +0000
committertron <tron@pkgsrc.org>2008-01-05 16:05:52 +0000
commit999c3df226e006d34bcc996171fa2d3586345034 (patch)
treee0a6d9e3322f4400955a47956d0646b0773e1092 /x11/xineramaproto
parentf08b9fd33bfc48de01e1aedfaa9690d189c2868a (diff)
downloadpkgsrc-999c3df226e006d34bcc996171fa2d3586345034.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.1.1..
Diffstat (limited to 'x11/xineramaproto')
-rw-r--r--x11/xineramaproto/builtin.mk47
1 files changed, 8 insertions, 39 deletions
diff --git a/x11/xineramaproto/builtin.mk b/x11/xineramaproto/builtin.mk
index 4b7bbbfed71..6349f48f096 100644
--- a/x11/xineramaproto/builtin.mk
+++ b/x11/xineramaproto/builtin.mk
@@ -1,12 +1,9 @@
-# $NetBSD: builtin.mk,v 1.1 2008/01/05 15:41:58 tron Exp $
-
-# TODO: builtin.mk failed to use native on XFree86
-# the two headers are identical with native XFree86
+# $NetBSD: builtin.mk,v 1.2 2008/01/05 16:05:52 tron Exp $
BUILTIN_PKG:= xineramaproto
-BUILTIN_FIND_FILES_VAR:= H_XINERAMA
-BUILTIN_FIND_FILES.H_XINERAMA= ${X11BASE}/include/X11/extensions/Xinerama.h
+BUILTIN_FIND_FILES_VAR:= PC_XINERAMAPROTO
+BUILTIN_FIND_FILES.PC_XINERAMAPROTO= ${X11BASE}/lib/pkgconfig/xineramaproto.pc
.include "../../mk/buildlink3/bsd.builtin.mk"
@@ -18,12 +15,7 @@ BUILTIN_FIND_FILES.H_XINERAMA= ${X11BASE}/include/X11/extensions/Xinerama.h
IS_BUILTIN.xineramaproto= no
.elif !defined(IS_BUILTIN.xineramaproto)
IS_BUILTIN.xineramaproto= no
-#
-# Here, we skip checking whether the files are under ${LOCALBASE} since
-# we'll consider this X11 package to be built-in even if it's a part
-# of one of the pkgsrc-installed X11 distributions.
-#
-. if empty(H_XINERAMA:M__nonexistent__)
+. if empty(PC_XINERAMAPROTO:M__nonexistent__)
IS_BUILTIN.xineramaproto= yes
. endif
.endif
@@ -35,15 +27,11 @@ MAKEVARS+= IS_BUILTIN.xineramaproto
###
.if !defined(BUILTIN_PKG.xineramaproto) && \
!empty(IS_BUILTIN.xineramaproto:M[yY][eE][sS]) && \
- empty(H_XINERAMA:M__nonexistent__)
-BUILTIN_VERSION.xineramaproto!= \
- ${AWK} '/\#define[ ]*XINERAMA_MAJOR/ { M = $$3 } \
- /\#define[ ]*XINERAMA_MINOR/ { m = "."$$3 } \
- END { printf "%s%s\n", M, m }' \
- ${H_XINERAMA}
-BUILTIN_PKG.xineramaproto= xineramaproto-${BUILTIN_VERSION.xineramaproto}
+ empty(PC_XINERAMAPROTO:M__nonexistent__)
+BUILTIN_VERSION.xineramaproto!= ${SED} -n -e 's/Version: //p' ${PC_XINERAMAPROTO}
+BUILTIN_PKG.xineramaproto= xineramaproto-${BUILTIN_VERSION.xineramaproto}
.endif
-MAKEVARS+= BUILTIN_PKG.xineramaproto
+MAKEVARS+= BUILTIN_PKG.xineramaproto
###
### Determine whether we should use the built-in implementation if it
@@ -71,22 +59,3 @@ USE_BUILTIN.xineramaproto!= \
. endif # PREFER.xineramaproto
.endif
MAKEVARS+= USE_BUILTIN.xineramaproto
-
-###
-### The section below only applies if we are not including this file
-### solely to determine whether a built-in implementation exists.
-###
-CHECK_BUILTIN.xineramaproto?= no
-.if !empty(CHECK_BUILTIN.xineramaproto:M[nN][oO])
-
-. if !empty(USE_BUILTIN.xineramaproto:M[nN][oO])
-BUILDLINK_API_DEPENDS.xineramaproto+= xineramaproto>=1.0
-. endif
-
-. if !empty(USE_BUILTIN.xineramaproto:M[yY][eE][sS])
-BUILDLINK_PREFIX.xineramaproto= ${X11BASE}
-. include "../../mk/x11.buildlink3.mk"
-. include "../../mk/x11.builtin.mk"
-. endif
-
-.endif # CHECK_BUILTIN.xineramaproto