Subject: Re: Adding fontconfig path to CHECK_FILES_SKIP?
To: None <tech-pkg@netbsd.org>
From: Joerg Sonnenberger <joerg@britannica.bec.de>
List: tech-pkg
Date: 09/17/2006 19:47:07
--Boundary_(ID_cXTNfbJ3UPl7iDLD0E++NQ)
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7BIT
Content-disposition: inline
On Sun, Sep 17, 2006 at 06:57:59PM +0200, Julio M. Merino Vidal wrote:
> On 9/17/06, Joerg Sonnenberger <joerg@britannica.bec.de> wrote:
> >On Sun, Sep 17, 2006 at 03:05:47AM +0200, Thomas Klausner wrote:
> >> Latest fontconfig (2.4.0) seems to populate ${PREFIX}/var/fontconfig
> >> sometimes, which breaks CHECK_FILES builds. Is it ok to add that
> >> directory to CHECK_FILES_SKIP?
> >
> >I'd prefer the attached patch. Any objections?
>
> Would you please use a INSTALL script instead of @exec/@unexec lines?
Updated patch is attached. It also creates the fc-cache at build time.
What about checking if ${PREFIX}/bin/fc-cache exists in
mk/pkginstall/fonts and call it if it is present?
Joerg
--Boundary_(ID_cXTNfbJ3UPl7iDLD0E++NQ)
Content-type: text/plain; charset=us-ascii; NAME=fontconfig.diff
Content-transfer-encoding: 7BIT
Content-disposition: attachment; filename=fontconfig.diff
Index: DEINSTALL
===================================================================
RCS file: DEINSTALL
diff -N DEINSTALL
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ DEINSTALL 17 Sep 2006 17:47:30 -0000
@@ -0,0 +1,10 @@
+# $NetBSD$
+
+VARBASE="@VARBASE@"
+RM="@RM@"
+
+case ${STAGE} in
+DEINSTALL)
+ ${RM} -rf ${VARBASE}/cache/fontconfig
+ ;;
+esac
Index: INSTALL
===================================================================
RCS file: INSTALL
diff -N INSTALL
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ INSTALL 17 Sep 2006 17:47:30 -0000
@@ -0,0 +1,12 @@
+# $NetBSD$
+
+MKDIR="@MKDIR@"
+PREFIX="@PREFIX@"
+VARBASE="@VARBASE@"
+
+case ${STAGE} in
+POST-INSTALL)
+ ${MKDIR} ${VARBASE}/cache/fontconfig
+ ${PREFIX}/bin/fc-cache
+ ;;
+esac
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/fonts/fontconfig/Makefile,v
retrieving revision 1.56
diff -u -r1.56 Makefile
--- Makefile 14 Sep 2006 15:07:12 -0000 1.56
+++ Makefile 17 Sep 2006 17:47:30 -0000
@@ -1,6 +1,7 @@
# $NetBSD: Makefile,v 1.56 2006/09/14 15:07:12 tron Exp $
DISTNAME= fontconfig-2.4.0
+PKGREVISION= 1
CATEGORIES= fonts
MASTER_SITES= http://www.fontconfig.org/release/
@@ -23,6 +24,7 @@
CONFIGURE_ARGS+= --with-expat-includes=${BUILDLINK_PREFIX.expat}/include
CONFIGURE_ARGS+= --with-expat-lib=${BUILDLINK_PREFIX.expat}/lib
CONFIGURE_ARGS+= --with-confdir=${PKG_SYSCONFDIR:Q}
+CONFIGURE_ARGS+= --with-cache-dir=${VARBASE:Q}/cache/fontconfig
CONFIGURE_ARGS+= --with-x
CONFIGURE_ARGS+= --enable-docs
CONFIGURE_ENV+= HASDOCBOOK=no
@@ -57,6 +59,8 @@
CONF_FILES+= ${EGDIR}/conf.d/80-delicious.conf ${PKG_SYSCONFDIR}/conf.d/80-delicious.conf
CONF_FILES+= ${EGDIR}/conf.d/90-synthetic.conf ${PKG_SYSCONFDIR}/conf.d/90-synthetic.conf
+MAKE_DIRS+= ${VARBASE}/cache
+
LIBS+= ${BUILDLINK_LDADD.iconv}
TEST_TARGET= check
Index: PLIST
===================================================================
RCS file: /cvsroot/pkgsrc/fonts/fontconfig/PLIST,v
retrieving revision 1.12
diff -u -r1.12 PLIST
--- PLIST 11 Sep 2006 18:53:16 -0000 1.12
+++ PLIST 17 Sep 2006 17:47:30 -0000
@@ -318,10 +318,6 @@
share/examples/fontconfig/conf.d/90-synthetic.conf
share/examples/fontconfig/fonts.conf
share/examples/fontconfig/fonts.dtd
-@exec ${MKDIR} %D/var/cache/fontconfig
-@unexec ${RMDIR} %D/var/cache/fontconfig 2> /dev/null || ${TRUE}
-@unexec ${RMDIR} %D/var/cache 2> /dev/null || ${TRUE}
-@unexec ${RMDIR} %D/var 2> /dev/null || ${TRUE}
@dirrm share/examples/fontconfig/conf.d
@dirrm share/examples/fontconfig/conf.avail
@dirrm share/examples/fontconfig
--Boundary_(ID_cXTNfbJ3UPl7iDLD0E++NQ)--