aboutsummaryrefslogtreecommitdiffstats
path: root/x11-servers/XFree86-4-FontServer
diff options
context:
space:
mode:
authorlesi <lesi@FreeBSD.org>2005-01-19 06:09:14 +0800
committerlesi <lesi@FreeBSD.org>2005-01-19 06:09:14 +0800
commit89565fac9c700a75b34093aabd04c94c23581a43 (patch)
treeea67983f17694239fa08ed0946448cd5b5e2e46a /x11-servers/XFree86-4-FontServer
parentc46261ec96b0f69f61f413722662ad6826609a62 (diff)
downloadfreebsd-ports-gnome-89565fac9c700a75b34093aabd04c94c23581a43.tar.gz
freebsd-ports-gnome-89565fac9c700a75b34093aabd04c94c23581a43.tar.zst
freebsd-ports-gnome-89565fac9c700a75b34093aabd04c94c23581a43.zip
Enable font cacheing. [1]
Add rcNG startup script. [2] Noticed by: Gary Dunn (knowtree at aloha.com) [1] Inspired by: Jose M Rodriguez (josemi at freebsd.jazztel.es) [2] Bits and pieces for [2] stolen from: src/etc/rc.d/xfs, apache2 and squid ports
Diffstat (limited to 'x11-servers/XFree86-4-FontServer')
-rw-r--r--x11-servers/XFree86-4-FontServer/Makefile9
-rw-r--r--x11-servers/XFree86-4-FontServer/files/xfs.sh36
-rw-r--r--x11-servers/XFree86-4-FontServer/pkg-plist1
-rw-r--r--x11-servers/XFree86-4-FontServer/scripts/configure1
4 files changed, 46 insertions, 1 deletions
diff --git a/x11-servers/XFree86-4-FontServer/Makefile b/x11-servers/XFree86-4-FontServer/Makefile
index 45edd5256c4a..f22c37422b54 100644
--- a/x11-servers/XFree86-4-FontServer/Makefile
+++ b/x11-servers/XFree86-4-FontServer/Makefile
@@ -7,7 +7,7 @@
PORTNAME= FontServer
PORTVERSION= 4.4.0
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= x11-servers x11-fonts
MASTER_SITES= ${MASTER_SITE_XFREE}
MASTER_SITE_SUBDIR= ${PORTVERSION}
@@ -26,8 +26,15 @@ XBUILD_DIRS= programs/xfs
XINCLUDE_DIRS= lib/xtrans programs/Xserver
XINSTALL_MAN_DIRS= programs/xfs
EXTRA_PATCHES+= ${FILESDIR}/patch-programs::xfs::Imakefile
+USE_RC_SUBR= yes
+
+post-build:
+ @${SED} -e 's|%%PREFIX%%|${PREFIX}|g' \
+ -e 's|%%RC_SUBR%%|${RC_SUBR}|g' \
+ ${FILESDIR}/xfs.sh >${WRKDIR}/xfs.sh
post-install:
+ @${INSTALL_SCRIPT} ${WRKDIR}/xfs.sh ${PREFIX}/etc/rc.d
@${SETENV} ${SCRIPTS_ENV} PKG_PREFIX="${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
.include "${.CURDIR}/../../x11/XFree86-4-libraries/Makefile.inc"
diff --git a/x11-servers/XFree86-4-FontServer/files/xfs.sh b/x11-servers/XFree86-4-FontServer/files/xfs.sh
new file mode 100644
index 000000000000..9b3ade37c98e
--- /dev/null
+++ b/x11-servers/XFree86-4-FontServer/files/xfs.sh
@@ -0,0 +1,36 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+# PROVIDE: xfs
+# REQUIRE: cleartmp
+# BEFORE: LOGIN
+# KEYWORD: FreeBSD
+
+# The following variables are provided to control startup of X font server in
+# rc configuration file (eg /etc/rc.conf):
+# xfs_enable (bool): Set to "NO" by default.
+# Set it to "YES" to enable X font server
+# xfs_config (str): Set to "%%PREFIX%%/lib/X11/fs/config" by default.
+# Configuration file for X font server.
+#
+# Please see xfs(1), rc.conf(5) and rc(8) for further details.
+
+. %%RC_SUBR%%
+
+name="xfs"
+rcvar=`set_rcvar`
+
+# Set defaults
+[ -z "$xfs_enable" ] && xfs_enable="NO"
+[ -z "$xfs_config" ] && xfs_config="%%PREFIX%%/lib/X11/fs/config"
+
+load_rc_config $name
+
+command="%%PREFIX%%/bin/${name}"
+command_args="-config ${xfs_config} -daemon"
+required_files="$xfs_config"
+extra_commands="reload"
+
+run_rc_command "$1"
diff --git a/x11-servers/XFree86-4-FontServer/pkg-plist b/x11-servers/XFree86-4-FontServer/pkg-plist
index a06037d5a018..498ae0096911 100644
--- a/x11-servers/XFree86-4-FontServer/pkg-plist
+++ b/x11-servers/XFree86-4-FontServer/pkg-plist
@@ -1,3 +1,4 @@
@unexec if cmp -s %D/lib/X11/fs/config %D/lib/X11/fs/config.default; then rm -f %D/lib/X11/fs/config; fi
bin/xfs
+etc/rc.d/xfs.sh
lib/X11/fs/config.default
diff --git a/x11-servers/XFree86-4-FontServer/scripts/configure b/x11-servers/XFree86-4-FontServer/scripts/configure
index fb6e7475f125..2fe7598d1330 100644
--- a/x11-servers/XFree86-4-FontServer/scripts/configure
+++ b/x11-servers/XFree86-4-FontServer/scripts/configure
@@ -51,6 +51,7 @@ if [ X$InstallFSConfig = "X" ]; then
fi
echo "#define InstallFSConfig $InstallFSConfig" >> $LOCALDEF
echo "#define FreeBSDBuildXfs YES" >> $LOCALDEF
+echo "#define BuildFontCacheLib YES" >> $LOCALDEF
echo "#define UseInstalledPrograms YES" >> $LOCALDEF
echo "#define FreeBSDCC ${CC}" >> $LOCALDEF
echo "#define FreeBSDCXX ${CXX}" >> $LOCALDEF