pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/emulators Teach the suse*_fontconfig packages to insta...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/72c33958c06a
branches:  trunk
changeset: 532583:72c33958c06a
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Thu Aug 23 20:42:32 2007 +0000

description:
Teach the suse*_fontconfig packages to install a /etc/fonts/local.conf
containing the paths to font directories for font packages installed
through pkgsrc.  This allows Linux packages that use fontconfig to
locate fonts to actually find them when X11_TYPE != "native".

This should fix PR pkg/35160 and PR pkg/35505.

Bump the PKGREVISION.

diffstat:

 emulators/suse100_fontconfig/Makefile            |  14 +++++++-
 emulators/suse100_fontconfig/files/generate.awk  |  37 ++++++++++++++++++++++++
 emulators/suse100_fontconfig/files/local.conf.in |  11 +++++++
 emulators/suse91_fontconfig/Makefile             |   4 +-
 emulators/suse91_fontconfig/files/generate.awk   |  37 ++++++++++++++++++++++++
 emulators/suse91_fontconfig/files/local.conf.in  |  11 +++++++
 6 files changed, 110 insertions(+), 4 deletions(-)

diffs (153 lines):

diff -r df830ecee67d -r 72c33958c06a emulators/suse100_fontconfig/Makefile
--- a/emulators/suse100_fontconfig/Makefile     Thu Aug 23 20:40:56 2007 +0000
+++ b/emulators/suse100_fontconfig/Makefile     Thu Aug 23 20:42:32 2007 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.6 2007/07/29 05:18:42 jlam Exp $
+# $NetBSD: Makefile,v 1.7 2007/08/23 20:42:32 jlam Exp $
 
 DISTNAME=      suse_fontconfig-${SUSE_VERSION}
-PKGREVISION=   3
+PKGREVISION=   4
 CATEGORIES=    emulators
 DISTFILES=     fontconfig-2.3.2.20050721-10.2.${SUSE_ARCH}.rpm
 
@@ -11,4 +11,14 @@
 EMUL_MODULES.linux=    expat freetype2
 
 .include "../../emulators/suse100_linux/Makefile.common"
+
+do-build:
+       ${SETENV} LOCALBASE=${LOCALBASE:Q} X11PREFIX=${X11PREFIX:Q}     \
+       ${AWK} -f ${FILESDIR}/generate.awk ${FILESDIR}/local.conf.in    \
+               > ${WRKSRC}/local.conf
+
+post-install:
+       ${INSTALL_DATA} ${WRKSRC}/local.conf                            \
+               ${PREFIX}/${EMULSUBDIR}/etc/fonts/local.conf
+
 .include "../../mk/bsd.pkg.mk"
diff -r df830ecee67d -r 72c33958c06a emulators/suse100_fontconfig/files/generate.awk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/emulators/suse100_fontconfig/files/generate.awk   Thu Aug 23 20:42:32 2007 +0000
@@ -0,0 +1,37 @@
+# $NetBSD: generate.awk,v 1.1 2007/08/23 20:42:32 jlam Exp $
+#
+# AWK script to replace @FONTDIR_ENTRIES@ with a list of <dir></dir>
+# entries taken from the "entries" array.  We do variable replacement
+# for ${LOCALBASE} and ${X11PREFIX} using the values of LOCALBASE and
+# X11PREFIX that are passed to the script.
+#
+
+BEGIN {
+       entries[0]  = "${X11PREFIX}/lib/X11/fonts"
+       entries[1]  = "${LOCALBASE}/OpenOffice.org1.1.5/share/fonts"
+       entries[2]  = "${LOCALBASE}/openoffice.org2.2/share/fonts"
+       entries[3]  = "${LOCALBASE}/java/blackdown-1.3.1/lib/fonts"
+       entries[4]  = "${LOCALBASE}/java/scsl-1.5/lib/fonts"
+       entries[5]  = "${LOCALBASE}/java/sun-1.3.1/lib/fonts"
+       entries[6]  = "${LOCALBASE}/java/sun-1.4/lib/fonts"
+       entries[7]  = "${LOCALBASE}/java/sun-1.5/lib/fonts"
+       entries[8]  = "${LOCALBASE}/java/sun-6/lib/fonts"
+       entries[9]  = "${LOCALBASE}/Acrobat4/Resource/CIDFont"
+       entries[10] = "${LOCALBASE}/Acrobat5/Resource/Font"
+       entries[11] = "${LOCALBASE}/Acrobat7/Resource/CIDFont"
+       num_entries = 12
+
+       LOCALBASE = ENVIRON["LOCALBASE"] ? ENVIRON["LOCALBASE"] : "/usr/pkg"
+       X11PREFIX = ENVIRON["X11PREFIX"] ? ENVIRON["X11PREFIX"] : "/usr/X11R6"
+}
+
+/^@FONTDIR_ENTRIES@/ {
+       for (i = 0; i < num_entries; i++) {
+               entry = entries[i]
+               sub("[$]{LOCALBASE}", LOCALBASE, entry)
+               sub("[$]{X11PREFIX}", X11PREFIX, entry)
+               print " <dir>" entry "</dir>"
+       }
+       next
+}
+{ print }
diff -r df830ecee67d -r 72c33958c06a emulators/suse100_fontconfig/files/local.conf.in
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/emulators/suse100_fontconfig/files/local.conf.in  Thu Aug 23 20:42:32 2007 +0000
@@ -0,0 +1,11 @@
+<?xml version="1.0"?>
+<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
+<!-- $NetBSD: local.conf.in,v 1.1 2007/08/23 20:42:32 jlam Exp $ -->
+<!-- /etc/fonts/fonts.conf file to configure system font access -->
+<fontconfig>
+
+<!-- Local font directory list -->
+
+@FONTDIR_ENTRIES@
+
+</fontconfig>
diff -r df830ecee67d -r 72c33958c06a emulators/suse91_fontconfig/Makefile
--- a/emulators/suse91_fontconfig/Makefile      Thu Aug 23 20:40:56 2007 +0000
+++ b/emulators/suse91_fontconfig/Makefile      Thu Aug 23 20:42:32 2007 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.8 2007/07/29 05:19:07 jlam Exp $
+# $NetBSD: Makefile,v 1.9 2007/08/23 20:42:32 jlam Exp $
 
 DISTNAME=      suse_fontconfig-${SUSE_VERSION}
-PKGREVISION=   3
+PKGREVISION=   4
 CATEGORIES=    emulators
 
 MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
diff -r df830ecee67d -r 72c33958c06a emulators/suse91_fontconfig/files/generate.awk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/emulators/suse91_fontconfig/files/generate.awk    Thu Aug 23 20:42:32 2007 +0000
@@ -0,0 +1,37 @@
+# $NetBSD: generate.awk,v 1.1 2007/08/23 20:42:33 jlam Exp $
+#
+# AWK script to replace @FONTDIR_ENTRIES@ with a list of <dir></dir>
+# entries taken from the "entries" array.  We do variable replacement
+# for ${LOCALBASE} and ${X11PREFIX} using the values of LOCALBASE and
+# X11PREFIX that are passed to the script.
+#
+
+BEGIN {
+       entries[0]  = "${X11PREFIX}/lib/X11/fonts"
+       entries[1]  = "${LOCALBASE}/OpenOffice.org1.1.5/share/fonts"
+       entries[2]  = "${LOCALBASE}/openoffice.org2.2/share/fonts"
+       entries[3]  = "${LOCALBASE}/java/blackdown-1.3.1/lib/fonts"
+       entries[4]  = "${LOCALBASE}/java/scsl-1.5/lib/fonts"
+       entries[5]  = "${LOCALBASE}/java/sun-1.3.1/lib/fonts"
+       entries[6]  = "${LOCALBASE}/java/sun-1.4/lib/fonts"
+       entries[7]  = "${LOCALBASE}/java/sun-1.5/lib/fonts"
+       entries[8]  = "${LOCALBASE}/java/sun-6/lib/fonts"
+       entries[9]  = "${LOCALBASE}/Acrobat4/Resource/CIDFont"
+       entries[10] = "${LOCALBASE}/Acrobat5/Resource/Font"
+       entries[11] = "${LOCALBASE}/Acrobat7/Resource/CIDFont"
+       num_entries = 12
+
+       LOCALBASE = ENVIRON["LOCALBASE"] ? ENVIRON["LOCALBASE"] : "/usr/pkg"
+       X11PREFIX = ENVIRON["X11PREFIX"] ? ENVIRON["X11PREFIX"] : "/usr/X11R6"
+}
+
+/^@FONTDIR_ENTRIES@/ {
+       for (i = 0; i < num_entries; i++) {
+               entry = entries[i]
+               sub("[$]{LOCALBASE}", LOCALBASE, entry)
+               sub("[$]{X11PREFIX}", X11PREFIX, entry)
+               print " <dir>" entry "</dir>"
+       }
+       next
+}
+{ print }
diff -r df830ecee67d -r 72c33958c06a emulators/suse91_fontconfig/files/local.conf.in
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/emulators/suse91_fontconfig/files/local.conf.in   Thu Aug 23 20:42:32 2007 +0000
@@ -0,0 +1,11 @@
+<?xml version="1.0"?>
+<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
+<!-- $NetBSD: local.conf.in,v 1.1 2007/08/23 20:42:33 jlam Exp $ -->
+<!-- /etc/fonts/fonts.conf file to configure system font access -->
+<fontconfig>
+
+<!-- Local font directory list -->
+
+@FONTDIR_ENTRIES@
+
+</fontconfig>



Home | Main Index | Thread Index | Old Index