summaryrefslogtreecommitdiff
path: root/x11/xextensions
diff options
context:
space:
mode:
authorjmmv <jmmv@pkgsrc.org>2005-06-15 09:41:02 +0000
committerjmmv <jmmv@pkgsrc.org>2005-06-15 09:41:02 +0000
commit95568b34eda2f5295936048db71e1849fde389b3 (patch)
tree55730d71169f5f9c2dc9016074bd7ec0a2fd2e8b /x11/xextensions
parent1936bc8582937527d61ac26eb173e12ce23176ac (diff)
downloadpkgsrc-95568b34eda2f5295936048db71e1849fde389b3.tar.gz
Follow jlam@'s suggestion: as no X distribution provides an xextensions.pc
file, do not bother to check if it exists; doing this means we will always choose the pkgsrc version. Instead, create a fake .pc file inside the buildlink directory.
Diffstat (limited to 'x11/xextensions')
-rw-r--r--x11/xextensions/builtin.mk23
1 files changed, 18 insertions, 5 deletions
diff --git a/x11/xextensions/builtin.mk b/x11/xextensions/builtin.mk
index 8bac099e3f4..9e08695e428 100644
--- a/x11/xextensions/builtin.mk
+++ b/x11/xextensions/builtin.mk
@@ -1,12 +1,10 @@
-# $NetBSD: builtin.mk,v 1.4 2005/06/11 08:49:33 jmmv Exp $
+# $NetBSD: builtin.mk,v 1.5 2005/06/15 09:41:02 jmmv Exp $
BUILTIN_PKG:= xextensions
-BUILTIN_FIND_FILES_VAR:= H_XEXTENSIONS PC_XEXTENSIONS
+BUILTIN_FIND_FILES_VAR:= H_XEXTENSIONS
BUILTIN_FIND_FILES.H_XEXTENSIONS= \
${X11BASE}/include/X11/extensions/extutil.h
-BUILTIN_FIND_FILES.PC_XEXTENSIONS= \
- ${X11BASE}/lib/pkgconfig/xextensions.pc
.include "../../mk/buildlink3/bsd.builtin.mk"
@@ -21,7 +19,7 @@ IS_BUILTIN.xextensions= no
# 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 exists(${H_XEXTENSIONS}) && exists(${PC_XEXTENSIONS})
+. if exists(${H_XEXTENSIONS})
IS_BUILTIN.xextensions= yes
. endif
.endif
@@ -67,4 +65,19 @@ BUILDLINK_PREFIX.xextensions= ${X11BASE}
. include "../../mk/x11.builtin.mk"
. endif
+# Check whether the implementation we selected has a xextensions.pc file
+# or not. If the latter, generate a fake one.
+. if exists(${BUILDLINK_PREFIX.xextensions}/lib/pkgconfig/xextensions.pc)
+BUILDLINK_FILES.xextensions+= lib/pkgconfig/fontconfig.pc
+. else
+BUILDLINK_TARGETS+= xextensions-fake-pc
+
+xextensions-fake-pc:
+ @{ ${ECHO} "Name: XExtensions"; \
+ ${ECHO} "Description: Sundry X extension headers"; \
+ ${ECHO} "Version: 1.0.1"; \
+ ${ECHO} "Cflags: -I${BUILDLINK_PREFIX.xextensions}/include"; \
+ } >${BUILDLINK_DIR}/lib/pkgconfig/xextensions.pc
+. endif
+
.endif # CHECK_BUILTIN.xextensions