From 95568b34eda2f5295936048db71e1849fde389b3 Mon Sep 17 00:00:00 2001 From: jmmv Date: Wed, 15 Jun 2005 09:41:02 +0000 Subject: 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. --- x11/xextensions/builtin.mk | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) (limited to 'x11/xextensions') 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 -- cgit v1.2.3