From cfb8df7f4f1762cbe27d51fd41491114a4692c1a Mon Sep 17 00:00:00 2001 From: mrg Date: Mon, 7 Sep 2009 21:07:02 +0000 Subject: [PATCH] install the fontconfig files into /etc/fonts/conf.avail, and symlink the default ones into /etc/fonts/conf.d, as per default. reported by jukka marin on netbsd-users. --- distrib/sets/lists/base/mi | 3 +- distrib/sets/lists/xetc/mi | 39 +++++++++++------ etc/mtree/NetBSD.dist.base | 3 +- external/mit/xorg/Makefile | 6 ++- external/mit/xorg/lib/fontconfig/etc/Makefile | 42 +++---------------- .../lib/fontconfig/etc/conf.avail/Makefile | 38 +++++++++++++++++ .../xorg/lib/fontconfig/etc/conf.d/Makefile | 31 ++++++++++++++ usr.sbin/postinstall/postinstall | 39 ++++++++++++++++- 8 files changed, 147 insertions(+), 54 deletions(-) create mode 100644 external/mit/xorg/lib/fontconfig/etc/conf.avail/Makefile create mode 100644 external/mit/xorg/lib/fontconfig/etc/conf.d/Makefile diff --git a/distrib/sets/lists/base/mi b/distrib/sets/lists/base/mi index 2ea79968b5c6..d954cef06ccc 100644 --- a/distrib/sets/lists/base/mi +++ b/distrib/sets/lists/base/mi @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.827 2009/09/07 19:34:29 mrg Exp $ +# $NetBSD: mi,v 1.828 2009/09/07 21:07:02 mrg Exp $ # # Note: Don't delete entries from here - mark them as "obsolete" instead, # unless otherwise stated below. @@ -89,6 +89,7 @@ ./etc/disklabels base-obsolete obsolete ./etc/fonts base-x11-root ./etc/fonts/conf.d base-x11-root +./etc/fonts/conf.avail base-x11-root ./etc/iscsi base-sysutil-root ./etc/kerberosIV base-obsolete obsolete ./etc/kerberosV base-krb5-root diff --git a/distrib/sets/lists/xetc/mi b/distrib/sets/lists/xetc/mi index 8cdafc15314c..b61c2ba1a58f 100644 --- a/distrib/sets/lists/xetc/mi +++ b/distrib/sets/lists/xetc/mi @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.15 2009/04/20 21:33:49 mrg Exp $ +# $NetBSD: mi,v 1.16 2009/09/07 21:07:03 mrg Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -55,16 +55,34 @@ ./etc/X11/xserver/SecurityPolicy -unknown- x11 ./etc/X11/xsm/system.xsm -unknown- x11 ./etc/X11/xsm/system.xsm -unknown- xorg -./etc/fonts/conf.d/10-autohint.conf -unknown- xorg -./etc/fonts/conf.d/10-no-sub-pixel.conf -unknown- xorg -./etc/fonts/conf.d/10-sub-pixel-bgr.conf -unknown- xorg -./etc/fonts/conf.d/10-sub-pixel-rgb.conf -unknown- xorg -./etc/fonts/conf.d/10-sub-pixel-vbgr.conf -unknown- xorg -./etc/fonts/conf.d/10-sub-pixel-vrgb.conf -unknown- xorg -./etc/fonts/conf.d/10-unhinted.conf -unknown- xorg +./etc/fonts/conf.avail/10-autohint.conf -unknown- xorg +./etc/fonts/conf.avail/10-no-sub-pixel.conf -unknown- xorg +./etc/fonts/conf.avail/10-sub-pixel-bgr.conf -unknown- xorg +./etc/fonts/conf.avail/10-sub-pixel-rgb.conf -unknown- xorg +./etc/fonts/conf.avail/10-sub-pixel-vbgr.conf -unknown- xorg +./etc/fonts/conf.avail/10-sub-pixel-vrgb.conf -unknown- xorg +./etc/fonts/conf.avail/10-unhinted.conf -unknown- xorg +./etc/fonts/conf.avail/20-fix-globaladvance.conf -unknown- xorg +./etc/fonts/conf.avail/20-unhint-small-vera.conf -unknown- xorg +./etc/fonts/conf.avail/25-unhint-nonlatin.conf -unknown- xorg +./etc/fonts/conf.avail/30-metric-aliases.conf -unknown- xorg +./etc/fonts/conf.avail/30-urw-aliases.conf -unknown- xorg +./etc/fonts/conf.avail/40-nonlatin.conf -unknown- xorg +./etc/fonts/conf.avail/45-latin.conf -unknown- xorg +./etc/fonts/conf.avail/49-sansserif.conf -unknown- xorg +./etc/fonts/conf.avail/50-user.conf -unknown- xorg +./etc/fonts/conf.avail/51-local.conf -unknown- xorg +./etc/fonts/conf.avail/60-latin.conf -unknown- xorg +./etc/fonts/conf.avail/65-fonts-persian.conf -unknown- xorg +./etc/fonts/conf.avail/65-khmer.conf -unknown- xorg +./etc/fonts/conf.avail/65-nonlatin.conf -unknown- xorg +./etc/fonts/conf.avail/69-unifont.conf -unknown- xorg +./etc/fonts/conf.avail/70-no-bitmaps.conf -unknown- xorg +./etc/fonts/conf.avail/70-yes-bitmaps.conf -unknown- xorg +./etc/fonts/conf.avail/80-delicious.conf -unknown- xorg +./etc/fonts/conf.avail/90-synthetic.conf -unknown- xorg ./etc/fonts/conf.d/20-fix-globaladvance.conf -unknown- xorg ./etc/fonts/conf.d/20-unhint-small-vera.conf -unknown- xorg -./etc/fonts/conf.d/25-unhint-nonlatin.conf -unknown- xorg ./etc/fonts/conf.d/30-metric-aliases.conf -unknown- xorg ./etc/fonts/conf.d/30-urw-aliases.conf -unknown- xorg ./etc/fonts/conf.d/40-nonlatin.conf -unknown- xorg @@ -74,11 +92,8 @@ ./etc/fonts/conf.d/51-local.conf -unknown- xorg ./etc/fonts/conf.d/60-latin.conf -unknown- xorg ./etc/fonts/conf.d/65-fonts-persian.conf -unknown- xorg -./etc/fonts/conf.d/65-khmer.conf -unknown- xorg ./etc/fonts/conf.d/65-nonlatin.conf -unknown- xorg ./etc/fonts/conf.d/69-unifont.conf -unknown- xorg -./etc/fonts/conf.d/70-no-bitmaps.conf -unknown- xorg -./etc/fonts/conf.d/70-yes-bitmaps.conf -unknown- xorg ./etc/fonts/conf.d/80-delicious.conf -unknown- xorg ./etc/fonts/conf.d/90-synthetic.conf -unknown- xorg ./etc/fonts/fonts.conf -unknown- x11 diff --git a/etc/mtree/NetBSD.dist.base b/etc/mtree/NetBSD.dist.base index e73d16d6d080..b396a6a42069 100644 --- a/etc/mtree/NetBSD.dist.base +++ b/etc/mtree/NetBSD.dist.base @@ -1,4 +1,4 @@ -# $NetBSD: NetBSD.dist.base,v 1.1 2009/09/07 19:34:30 mrg Exp $ +# $NetBSD: NetBSD.dist.base,v 1.2 2009/09/07 21:07:03 mrg Exp $ # @(#)4.4BSD.dist 8.1 (Berkeley) 6/13/93 # Do not customize this file as it may be overwritten on upgrades. @@ -33,6 +33,7 @@ ./etc/defaults ./etc/fonts ./etc/fonts/conf.d +./etc/fonts/conf.avail ./etc/iscsi ./etc/kerberosV ./etc/mail diff --git a/external/mit/xorg/Makefile b/external/mit/xorg/Makefile index 4dd32a437c1e..9d3e7378ed2d 100644 --- a/external/mit/xorg/Makefile +++ b/external/mit/xorg/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.6 2009/04/20 15:39:46 jnemeth Exp $ +# $NetBSD: Makefile,v 1.7 2009/09/07 21:07:03 mrg Exp $ # Top level Makefile to cross build xorg inside the NetBSD tree. @@ -57,7 +57,9 @@ DISTRIBTARGETS= \ bin/xfs \ bin/xinit \ bin/xsm \ - lib/fontconfig/etc + lib/fontconfig/etc \ + lib/fontconfig/etc/conf.avail \ + lib/fontconfig/etc/conf.d distribution: check_X11SRCDIR .for tgt in ${DISTRIBTARGETS} diff --git a/external/mit/xorg/lib/fontconfig/etc/Makefile b/external/mit/xorg/lib/fontconfig/etc/Makefile index 7104e3ab0184..6f82e6734fc1 100644 --- a/external/mit/xorg/lib/fontconfig/etc/Makefile +++ b/external/mit/xorg/lib/fontconfig/etc/Makefile @@ -1,4 +1,6 @@ -# $NetBSD: Makefile,v 1.2 2008/09/26 07:02:57 rtr Exp $ +# $NetBSD: Makefile,v 1.3 2009/09/07 21:07:03 mrg Exp $ + +SUBDIR= conf.d conf.avail .include @@ -7,43 +9,9 @@ CONFIGFILES= \ fonts.conf \ fonts.dtd -FILESDIR_fonts.conf= \ - /etc/fonts - -FILESDIR_fonts.dtd= \ - /etc/fonts - -.PATH: ${X11SRCDIR.fontconfig}/conf.d -CONFIGFILES+= \ - 10-autohint.conf \ - 10-no-sub-pixel.conf \ - 10-sub-pixel-bgr.conf \ - 10-sub-pixel-rgb.conf \ - 10-sub-pixel-vbgr.conf \ - 10-sub-pixel-vrgb.conf \ - 10-unhinted.conf \ - 20-fix-globaladvance.conf \ - 20-unhint-small-vera.conf \ - 25-unhint-nonlatin.conf \ - 30-metric-aliases.conf \ - 30-urw-aliases.conf \ - 40-nonlatin.conf \ - 45-latin.conf \ - 49-sansserif.conf \ - 50-user.conf \ - 51-local.conf \ - 60-latin.conf \ - 65-fonts-persian.conf \ - 65-khmer.conf \ - 65-nonlatin.conf \ - 69-unifont.conf \ - 70-no-bitmaps.conf \ - 70-yes-bitmaps.conf \ - 80-delicious.conf \ - 90-synthetic.conf - FILESDIR= \ - /etc/fonts/conf.d + /etc/fonts .include .include +.include diff --git a/external/mit/xorg/lib/fontconfig/etc/conf.avail/Makefile b/external/mit/xorg/lib/fontconfig/etc/conf.avail/Makefile new file mode 100644 index 000000000000..528622786aa1 --- /dev/null +++ b/external/mit/xorg/lib/fontconfig/etc/conf.avail/Makefile @@ -0,0 +1,38 @@ +# $NetBSD: Makefile,v 1.1 2009/09/07 21:07:04 mrg Exp $ + +.include + +.PATH: ${X11SRCDIR.fontconfig}/conf.d +CONFIGFILES= \ + 10-autohint.conf \ + 10-no-sub-pixel.conf \ + 10-sub-pixel-bgr.conf \ + 10-sub-pixel-rgb.conf \ + 10-sub-pixel-vbgr.conf \ + 10-sub-pixel-vrgb.conf \ + 10-unhinted.conf \ + 20-fix-globaladvance.conf \ + 20-unhint-small-vera.conf \ + 25-unhint-nonlatin.conf \ + 30-metric-aliases.conf \ + 30-urw-aliases.conf \ + 40-nonlatin.conf \ + 45-latin.conf \ + 49-sansserif.conf \ + 50-user.conf \ + 51-local.conf \ + 60-latin.conf \ + 65-fonts-persian.conf \ + 65-khmer.conf \ + 65-nonlatin.conf \ + 69-unifont.conf \ + 70-no-bitmaps.conf \ + 70-yes-bitmaps.conf \ + 80-delicious.conf \ + 90-synthetic.conf + +FILESDIR= \ + /etc/fonts/conf.avail + +.include +.include diff --git a/external/mit/xorg/lib/fontconfig/etc/conf.d/Makefile b/external/mit/xorg/lib/fontconfig/etc/conf.d/Makefile new file mode 100644 index 000000000000..442012addef1 --- /dev/null +++ b/external/mit/xorg/lib/fontconfig/etc/conf.d/Makefile @@ -0,0 +1,31 @@ +# $NetBSD: Makefile,v 1.1 2009/09/07 21:07:04 mrg Exp $ + +.include + +.PATH: ${X11SRCDIR.fontconfig}/conf.d +FONTCONFIG_LINKS= \ + 20-fix-globaladvance.conf \ + 20-unhint-small-vera.conf \ + 30-urw-aliases.conf \ + 30-metric-aliases.conf \ + 40-nonlatin.conf \ + 45-latin.conf \ + 49-sansserif.conf \ + 50-user.conf \ + 51-local.conf \ + 60-latin.conf \ + 65-fonts-persian.conf \ + 65-nonlatin.conf \ + 69-unifont.conf \ + 80-delicious.conf \ + 90-synthetic.conf + +CONFAVAILDIR= ../conf.avail +CONFDIR= /etc/fonts/conf.d + +.for _conffile in ${FONTCONFIG_LINKS} +CONFIGSYMLINKS+=${CONFAVAILDIR}/${_conffile} ${CONFDIR}/${_conffile} +.endfor + +.include +.include diff --git a/usr.sbin/postinstall/postinstall b/usr.sbin/postinstall/postinstall index 57eefea47c40..756e0981bf87 100755 --- a/usr.sbin/postinstall/postinstall +++ b/usr.sbin/postinstall/postinstall @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: postinstall,v 1.102 2009/09/07 19:34:30 mrg Exp $ +# $NetBSD: postinstall,v 1.103 2009/09/07 21:07:04 mrg Exp $ # # Copyright (c) 2002-2008 The NetBSD Foundation, Inc. # All rights reserved. @@ -758,6 +758,43 @@ do_envsys() return ${failed} } +# +# X11 fontconfig +# +additem fontconfig "X11 font configuration is up to date" +do_fontconfig() +{ + [ -n "$1" ] || err 3 "USAGE: do_fontconfig fix|check" + op="$1" + failed=0 + + if [ -f "${DEST_DIR}/etc/fonts/conf.d/10-unhinted.conf" -a \ + -f "${DEST_DIR}/etc/fonts/conf.d/10-autohint.conf" ]; then + failed=1 + fi + + if [ "$op" = "check" -a "$failed" = 1 ]; then + msg \ + "Broken fontconfig configuration found; please delete these files" + msg \ + "in the ${DESTDIR}/etc/fonts/conf.d/ subdirectory:" + msg \ + " 10-autohint.conf 10-no-sub-pixel.conf 10-sub-pixel-bgr.conf" + msg \ + " 10-sub-pixel-rgb.conf 10-sub-pixel-vbgr.conf" + msg \ + " 10-sub-pixel-vrgb.conf 10-unhinted.conf 25-unhint-nonlatin.conf" + msg \ + " 65-khmer.conf 70-no-bitmaps.conf 70-yes-bitmaps.conf" + msg \ + "(This warning only appears if both the 10-unhinted.conf and" + msg \ + "10-autohint.conf files are present." + fi + + return ${failed} +} + # # gid #