summaryrefslogtreecommitdiff
path: root/emulators/suse91_fontconfig
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2007-08-23 20:42:32 +0000
committerjlam <jlam@pkgsrc.org>2007-08-23 20:42:32 +0000
commita34715535c10b0b8a6f0afd900bcaefa6b874b9e (patch)
treead6ebfe017ce69742aae6b9179f722144bf016d6 /emulators/suse91_fontconfig
parent9368c471eb1abcfaeba014d80ad5150836c46ca2 (diff)
downloadpkgsrc-a34715535c10b0b8a6f0afd900bcaefa6b874b9e.tar.gz
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 (limited to 'emulators/suse91_fontconfig')
-rw-r--r--emulators/suse91_fontconfig/Makefile4
-rw-r--r--emulators/suse91_fontconfig/files/generate.awk37
-rw-r--r--emulators/suse91_fontconfig/files/local.conf.in11
3 files changed, 50 insertions, 2 deletions
diff --git a/emulators/suse91_fontconfig/Makefile b/emulators/suse91_fontconfig/Makefile
index e8f661ea773..379b0f04e6e 100644
--- a/emulators/suse91_fontconfig/Makefile
+++ b/emulators/suse91_fontconfig/Makefile
@@ -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
diff --git a/emulators/suse91_fontconfig/files/generate.awk b/emulators/suse91_fontconfig/files/generate.awk
new file mode 100644
index 00000000000..c8611ce15af
--- /dev/null
+++ b/emulators/suse91_fontconfig/files/generate.awk
@@ -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 --git a/emulators/suse91_fontconfig/files/local.conf.in b/emulators/suse91_fontconfig/files/local.conf.in
new file mode 100644
index 00000000000..ba496c68a44
--- /dev/null
+++ b/emulators/suse91_fontconfig/files/local.conf.in
@@ -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>