Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 23 May 2007 18:45:54 +0400
From:      Boris Samorodov <bsam@ipt.ru>
To:        pav@FreeBSD.org
Cc:        dmitry@karasik.eu.org, Alexander Leidinger <Alexander@leidinger.net>, freebsd-emulation@FreeBSD.org
Subject:   Re: ports/112851: x11-fonts/linux-fontconfig /etc/fonts/fonts.conf not updated with xorg 7.2
Message-ID:  <53875373@srv.sem.ipt.ru>
In-Reply-To: <1179921135.34567.7.camel@pav.hide.vol.cz> (Pav Lucistnik's message of "Wed\, 23 May 2007 13\:52\:14 %2B0200")
References:  <200705231116.l4NBGKJI082138@freefall.freebsd.org> <20070523133902.47ewer69wkckcgs0@webmail.leidinger.net> <1179921135.34567.7.camel@pav.hide.vol.cz>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 23 May 2007 13:52:14 +0200 Pav Lucistnik wrote:
> Alexander Leidinger píše v st 23. 05. 2007 v 13:39 +0200:

> > Pav, do we (or better: has bsam) portmgr approval to fix
> > linux-fontconfig?

> Yes, please commit. I wasn't aware of ports/110632, I think the spirit
> of that patch is good (you should use LOCALBASE now, X11BASE is going
> away in the future).

> As for the actual mechanics, I think something like

> post-patch:
> 	@${CAT} ${FILESDIR}/fonts.conf | ${SED} 's|/usr/X11R6|%%LOCALBASE%%|' > ${WRKSRC}/fonts.conf

> post-install:
> 	${INSTALL_DATA} ${WRKSRC}/fonts.conf ${PREFIX}/etc/fonts/fonts.conf

> would be more elegant than replacing it in place after installation.

> But please do commit a fix. Don't forget PORTREVISION bump!

Here is the new patch:

. change prefix (/usr/X11 -> %{LOCALBASE}) at the configuration file;  [1]
. do REINPLACE at post-patch instead of post-install;                  [2]
. don't let the linux fc-cache mess up the native cache file (delete   [3]
  the binary and man);
. add some comments to the Makefile.

PR:           110632  [1]
Submitted by: Karol Kwiatkowski <karol.kwiat at gmail.com>  [1]
Suggested by: pav  [2], netchild  [3]
Approved by:  portmgr (pav)

-----
Index: Makefile
===================================================================
RCS file: /home/pcvs/ports/x11-fonts/linux-fontconfig/Makefile,v
retrieving revision 1.18
diff -u -r1.18 Makefile
--- Makefile	19 Mar 2007 05:13:58 -0000	1.18
+++ Makefile	23 May 2007 14:24:19 -0000
@@ -7,7 +7,7 @@
 
 PORTNAME=	fontconfig
 PORTVERSION=	2.2.3
-PORTREVISION=	6
+PORTREVISION=	7
 CATEGORIES=	x11-fonts linux
 DISTNAME=	${PORTNAME}-${PORTVERSION}-13
 
@@ -24,10 +24,15 @@
 
 BRANDELF_DIRS=	usr/bin
 
+# We will use some other configuration file, so delete a linux one
+# Don't let the linux fc-cache mess up the native cache file
 post-extract:
-	${RM} ${WRKSRC}/etc/fonts/fonts.conf
-
-post-install:
-	${INSTALL_DATA} ${FILESDIR}/fonts.conf ${PREFIX}/etc/fonts/fonts.conf
+	@${RM} ${WRKSRC}/etc/fonts/fonts.conf \
+		${WRKSRC}/usr/bin/fc-cache \
+		${WRKSRC}/usr/share/man/man1/fc-cache.1.gz
+
+# Here is our configuration file
+post-patch:
+	@${CAT} ${FILESDIR}/fonts.conf | ${SED} 's:/usr/X11R6:${LOCALBASE}:g' > ${WRKSRC}/etc/fonts/fonts.conf
 
 .include <bsd.port.mk>
Index: pkg-plist
===================================================================
RCS file: /home/pcvs/ports/x11-fonts/linux-fontconfig/pkg-plist,v
retrieving revision 1.2
diff -u -r1.2 pkg-plist
--- pkg-plist	9 Jul 2006 21:01:45 -0000	1.2
+++ pkg-plist	23 May 2007 14:24:19 -0000
@@ -1,7 +1,6 @@
 etc/fonts/fonts.conf
 etc/fonts/fonts.dtd
 etc/fonts/local.conf
-usr/bin/fc-cache
 usr/bin/fc-list
 usr/lib/libfontconfig.so.1
 usr/lib/libfontconfig.so.1.0.4
@@ -10,7 +9,6 @@
 usr/share/doc/fontconfig-%%PORTVERSION%%/README
 usr/share/doc/fontconfig-%%PORTVERSION%%/fontconfig-user.html
 usr/share/doc/fontconfig-%%PORTVERSION%%/fontconfig-user.txt
-usr/share/man/man1/fc-cache.1.gz
 usr/share/man/man1/fc-list.1.gz
 usr/share/man/man5/fonts-conf.5.gz
 @dirrm etc/fonts
-----


WBR
-- 
Boris Samorodov (bsam)
Research Engineer, http://www.ipt.ru Telephone & Internet SP
FreeBSD committer, http://www.FreeBSD.org The Power To Serve



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?53875373>