summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorjoerg <joerg>2006-09-22 21:53:56 +0000
committerjoerg <joerg>2006-09-22 21:53:56 +0000
commitbcaa74d78c4bb00b45e3ba6f025114edd61b83a2 (patch)
treedb83b25b7768e178196b801eef79294cee44fa06 /mk
parent2a25027705e71b83c42ccbdae2739d56d535f049 (diff)
downloadpkgsrc-bcaa74d78c4bb00b45e3ba6f025114edd61b83a2.tar.gz
- Compute CHEKCK_FILES filter on the entries requested and keep it
as tight as possible. Files we don't handle shouldn't be skipped. - fonts.alias is not created automatically, so don't remove it. - create fonts.encoding with mkfontdir using -e X11_ENCODINGSDIR. On platforms not following the X11R6 loayout this might need to be overriden. - Fix type1inst calls. - Modify packages which installed fonts.alias before to actually include it in the PLIST and bump the revisions accordingly. - Modify xorg-fonts* packages to use FONTS_DIRS.* to build indices at run time. Discussed with wiz and jlam.
Diffstat (limited to 'mk')
-rw-r--r--mk/bsd.prefs.mk5
-rw-r--r--mk/check/check-files.mk13
-rw-r--r--mk/pkginstall/bsd.pkginstall.mk4
-rw-r--r--mk/pkginstall/fonts18
4 files changed, 28 insertions, 12 deletions
diff --git a/mk/bsd.prefs.mk b/mk/bsd.prefs.mk
index c5c9d22f056..a1f9e8e76db 100644
--- a/mk/bsd.prefs.mk
+++ b/mk/bsd.prefs.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.prefs.mk,v 1.235 2006/09/10 20:19:39 schwarz Exp $
+# $NetBSD: bsd.prefs.mk,v 1.236 2006/09/22 21:53:57 joerg Exp $
#
# Make file, included to get the site preferences, if any. Should
# only be included by package Makefiles before any .if defined()
@@ -413,6 +413,9 @@ X11PREFIX= ${LOCALBASE}
X11PREFIX= ${X11BASE}
.endif
+# Default directory for font encodings
+X11_ENCODINGSDIR?= ${X11BASE}/lib/X11/fonts/encodings
+
DEPOT_SUBDIR?= packages
DEPOTBASE= ${LOCALBASE}/${DEPOT_SUBDIR}
diff --git a/mk/check/check-files.mk b/mk/check/check-files.mk
index fc95f459fbd..9bf97b02382 100644
--- a/mk/check/check-files.mk
+++ b/mk/check/check-files.mk
@@ -1,4 +1,4 @@
-# $NetBSD: check-files.mk,v 1.7 2006/09/17 17:02:38 joerg Exp $
+# $NetBSD: check-files.mk,v 1.8 2006/09/22 21:53:58 joerg Exp $
.if defined(PKG_DEVELOPER)
CHECK_FILES?= yes
@@ -48,12 +48,17 @@ CHECK_FILES_SKIP+= ${d:C/^([^\/])/${PREFIX}\/\1/}.*
.endfor
# Mutable X11 font database files
+.if (defined(FONTS_DIRS.x11) && !empty(FONTS_DIRS.x11:M*))
+CHECK_FILES_SKIP+= ${PREFIX}/.*/encodings.dir
+CHECK_FILES_SKIP+= ${PREFIX}/.*/fonts.dir
+.endif
+.if (defined(FONTS_DIRS.ttf) && !empty(FONTS_DIRS.ttf:M*)) || \
+ (defined(FONTS_DIRS.type1) && !empty(FONTS_DIRS.type1:M*))
+CHECK_FILES_SKIP+= ${PREFIX}/.*/fonts.scale
+.endif
.if (defined(FONTS_DIRS.ttf) && !empty(FONTS_DIRS.ttf:M*)) || \
(defined(FONTS_DIRS.type1) && !empty(FONTS_DIRS.type1:M*)) || \
(defined(FONTS_DIRS.x11) && !empty(FONTS_DIRS.x11:M*))
-CHECK_FILES_SKIP+= ${PREFIX}/.*/fonts.alias
-CHECK_FILES_SKIP+= ${PREFIX}/.*/fonts.dir
-CHECK_FILES_SKIP+= ${PREFIX}/.*/fonts.scale
CHECK_FILES_SKIP+= ${PREFIX}/.*/fonts.cache-1
.endif
diff --git a/mk/pkginstall/bsd.pkginstall.mk b/mk/pkginstall/bsd.pkginstall.mk
index ab41bfc9b6b..c2daca46614 100644
--- a/mk/pkginstall/bsd.pkginstall.mk
+++ b/mk/pkginstall/bsd.pkginstall.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkginstall.mk,v 1.14 2006/07/19 18:05:35 jlam Exp $
+# $NetBSD: bsd.pkginstall.mk,v 1.15 2006/09/22 21:53:58 joerg Exp $
#
# This Makefile fragment is included by bsd.pkg.mk and implements the
# common INSTALL/DEINSTALL scripts framework. To use the pkginstall
@@ -700,6 +700,8 @@ USE_TOOLS+= mkfontdir:run
FILES_SUBST+= MKFONTDIR=${TOOLS_PATH.mkfontdir:Q}
.endif
+FILES_SUBST+= X11_ENCODINGSDIR=${X11_ENCODINGSDIR:Q}
+
${_INSTALL_FONTS_DATAFILE}:
${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H}
${_PKG_SILENT}${_PKG_DEBUG}${_FUNC_STRIP_PREFIX}; \
diff --git a/mk/pkginstall/fonts b/mk/pkginstall/fonts
index e60dd268faf..e57a316c126 100644
--- a/mk/pkginstall/fonts
+++ b/mk/pkginstall/fonts
@@ -1,4 +1,4 @@
-# $NetBSD: fonts,v 1.2 2006/07/19 22:26:26 jlam Exp $
+# $NetBSD: fonts,v 1.3 2006/09/22 21:53:58 joerg Exp $
#
# Generate a +FONTS script that updates font databases for the package.
#
@@ -37,6 +37,7 @@ TEST="@TEST@"
TRUE="@TRUE@"
TTMKFDIR="@TTMKFDIR@"
TYPE1INST="@TYPE1INST@"
+X11_ENCODINGSDIR="@X11_ENCODINGSDIR@"
SELF=$0
@@ -74,19 +75,24 @@ ${SED} -n "/^\# FONTS: /{s/^\# FONTS: //;p;}" ${SELF} | ${SORT} -u |
esac
( ${ECHO} " $dir ($font_type)"
cd $dir
+ update_args=
+ post_update_cmd=
case $font_type in
[tT][tT][fF]) update_cmd="${TTMKFDIR}" ;;
- [tT][yY][pP][eE]1) update_cmd="${TYPE1INST}; ${RM} type1inst.log" ;;
- [xX]11) update_cmd="${MKFONTDIR}" ;;
+ [tT][yY][pP][eE]1) update_cmd="${TYPE1INST}"
+ post_update_cmd="${RM} type1inst.log" ;;
+ [xX]11) update_cmd="${MKFONTDIR}"
+ [ ! -z "${X11_ENCODINGSDIR}" ] && update_args="-e ${X11_ENCODINGSDIR}" ;;
esac
${TEST} -f "$update_cmd" || update_cmd="${TRUE}"
- $update_cmd >/dev/null
+ $update_cmd $update_args >/dev/null
+ $post_update_cmd
#
# Remove fonts databases if there are no fonts in the directory.
- # We filter out the encodings.dir, fonts.{alias,dirs,scale}, and
+ # We filter out the encodings.dir, fonts.{dirs,scale}, and
# Fontmap database files from the directory listing.
#
- ${FIND} . -type f | ${GREP} -v "/encodings.dir" | ${GREP} -v "/fonts\." | ${GREP} -v "/Fontmap" >/dev/null || ${RM} -f fonts.* Fontmap*
+ ${FIND} . -type f | ${GREP} -v "/encodings.dir" | ${GREP} -v "/fonts\.scale" | ${GREP} -v "/fonts\.dir" | ${GREP} -v "/Fontmap" >/dev/null || ${RM} -f fonts.dir fonts.scale Fontmap* encodings.dir > /dev/null
)
done
case "$printed_header" in