pkg-config (pc) and -config scripts

This commit is contained in:
rtr 2004-01-06 06:15:45 +00:00
parent e11055d090
commit f2914ee88d
4 changed files with 100 additions and 10 deletions

View File

@ -1,7 +1,4 @@
# $NetBSD: Makefile,v 1.3 2003/09/13 20:18:46 lukem Exp $
#XTODO xcursor.pc
#XTODO xcursor-config
# $NetBSD: Makefile,v 1.4 2004/01/06 06:15:45 rtr Exp $
.include <bsd.own.mk>
@ -21,5 +18,31 @@ CPPFLAGS+= -DICONDIR=\"${X11LIBDIR}/icons\"
LDADD+= -lXrender -lXext -lX11
DPADD+= ${LIBXRENDER} ${LIBXEXT} ${LIBX11}
# XXX it would be really swell if SCRIPTS was available from bsd.lib.mk
FILES= xcursor.pc xcursor-config
FILESDIR_xcursor.pc= ${X11USRLIBDIR}/pkgconfig
FILESDIR_xcursor-config=${X11BINDIR}
FILESOWN_xcursor-config=${BINOWN}
FILESGRP_xcursor-config=${BINGRP}
FILESMODE_xcursor-config=${BINMODE}
.PHONY: xcursor.pc xcursor-config
all dependall: xcursor.pc xcursor-config
# XXX this should be ${SHELL} but I'm not getting joy w/ it.
XCURSORDIR= ${X11SRCDIR.xc}/lib/Xcursor
CONFIG_SUBST= sh ${XCURSORDIR}/config-subst \
prefix="${X11ROOTDIR}" \
exec_prefix="${X11BINDIR}" \
libdir="${X11USRLIBDIR}" \
includedir="${X11INCDIR}" \
PACKAGE_VERSION="1.0.0"
xcursor.pc:
${CONFIG_SUBST} < ${XCURSORDIR}/xcursor.pc.in > ${.TARGET}
xcursor-config:
${CONFIG_SUBST} < ${XCURSORDIR}/xcursor-config.in > ${.TARGET}
.include <bsd.x11.mk>
.include <bsd.lib.mk>

View File

@ -1,7 +1,4 @@
# $NetBSD: Makefile,v 1.3 2003/09/30 06:41:30 lukem Exp $
#XTODO xft.pc
#XTODO xft-config
# $NetBSD: Makefile,v 1.4 2004/01/06 06:15:45 rtr Exp $
.include <bsd.own.mk>
@ -20,5 +17,36 @@ MAN= Xft.3
CPPFLAGS+= ${X11FLAGS.THREADLIB}
CPPFLAGS+= -DFREETYPE2 -I${DESTDIR}${X11INCDIR}/freetype2
# XXX it would be really swell if SCRIPTS was available from bsd.lib.mk
FILES= xft.pc xft-config
FILESDIR_xft.pc= ${X11USRLIBDIR}/pkgconfig
FILESDIR_xft-config= ${X11BINDIR}
FILESOWN_xft-config= ${BINOWN}
FILESGRP_xft-config= ${BINGRP}
FILESMODE_xft-config= ${BINMODE}
.PHONY: xft.pc xft-config
all dependall: xft.pc xft-config
# XXX this should be ${SHELL} but I'm not getting joy w/ it.
XFTDIR= ${X11SRCDIR.xc}/lib/Xft
CONFIG_SUBST= sh ${XFTDIR}/config/config-subst \
prefix="${X11ROOTDIR}" \
exec_prefix="${X11BINDIR}" \
libdir="${X11USRLIBDIR}" \
includedir="${X11INCDIR}" \
PACKAGE_VERSION="2.1.0" \
FREETYPE_LIBS="-L${X11USRLIBDIR} -lfreetype" \
FREETYPE_CFLAGS="-I${X11INCDIR}/freetype2" \
XRENDER_LIBS="-L${X11USRLIBDIR} -lXrender" \
XRENDER_CFLAGS="-I${X11INCDIR}" \
FONTCONFIG_CFLAGS="-I${X11INCDIR}"
xft.pc:
${CONFIG_SUBST} < ${XFTDIR}/xft.pc.in > ${.TARGET}
xft-config:
${CONFIG_SUBST} < ${XFTDIR}/xft-config.in > ${.TARGET}
.include <bsd.x11.mk>
.include <bsd.lib.mk>

View File

@ -1,8 +1,32 @@
# $NetBSD: Makefile,v 1.2 2003/09/13 20:18:54 lukem Exp $
# $NetBSD: Makefile,v 1.3 2004/01/06 06:15:45 rtr Exp $
.include <bsd.own.mk>
SUBDIR= fontconfig src etc
FILES= fontconfig.pc
FILESDIR= ${X11USRLIBDIR}/pkgconfig
SCRIPTS= fontconfig-config
.PHONY: fontconfig.pc fontconfig-config
all dependall: fontconfig.pc fontconfig-config
# XXX this should be ${SHELL} but I'm not getting joy w/ it.
FONTCONFIGDIR= ${X11SRCDIR.xc}/lib/fontconfig
CONFIG_SUBST= sh ${FONTCONFIGDIR}/config/config-subst \
prefix="${X11ROOTDIR}" \
exec_prefix="${X11BINDIR}" \
libdir="${X11USRLIBDIR}" \
includedir="${X11INCDIR}" \
PACKAGE_VERSION="1.0.1"
fontconfig.pc:
${CONFIG_SUBST} < ${FONTCONFIGDIR}/fontconfig.pc.in > ${.TARGET}
fontconfig-config:
${CONFIG_SUBST} < ${FONTCONFIGDIR}/fontconfig-config.in > ${.TARGET}
.include <bsd.x11.mk>
.include <bsd.prog.mk> # for SCRIPTS
.include <bsd.subdir.mk>

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.2 2003/09/13 20:18:56 lukem Exp $
# $NetBSD: Makefile,v 1.3 2004/01/06 06:15:45 rtr Exp $
.include <bsd.own.mk>
@ -14,6 +14,21 @@ INCS= ftbdf.h fterrdef.h ftsysio.h ftsysmem.h ftxf86.h freetype.h \
ftoutln.h ftrender.h ftsizes.h ftsnames.h ftsynth.h ftsystem.h \
fttrigon.h fttypes.h t1tables.h ttnameid.h tttables.h tttags.h
SCRIPTS= freetype-config
.PHONY: freetype-config
all dependall: freetype-config
# XXX hijack config-subst from Xft
CONFIG_SUBST= sed -e 's%@prefix@%${X11ROOTDIR}%' \
-e 's%@exec_prefix@%${X11BINDIR}%' \
-e 's%@libdir@%${X11USRLIBDIR}%g' \
-e 's%@includedir@%${X11INCDIR}%' \
-e 's%@ft_version@%9.0.3%'
freetype-config:
${CONFIG_SUBST} < ${X11SRCDIR.xc}/extras/freetype2/builds/unix/freetype-config.in > ${.TARGET}
.include <bsd.x11.mk>
.include <bsd.prog.mk>
.include <bsd.subdir.mk>