diff options
author | lesi <lesi@FreeBSD.org> | 2005-01-23 19:50:40 +0000 |
---|---|---|
committer | lesi <lesi@FreeBSD.org> | 2005-01-23 19:50:40 +0000 |
commit | 5ed7787ddc20c519e5827ec787f9dedbf4c96dac (patch) | |
tree | 7f471aaef3d3d1cb9de381acec5485bb89ed0de5 /x11-fonts | |
parent | 0da48f333b21e8ff8866e355ffdc02701a4f03e0 (diff) | |
download | FreeBSD-ports-5ed7787ddc20c519e5827ec787f9dedbf4c96dac.zip FreeBSD-ports-5ed7787ddc20c519e5827ec787f9dedbf4c96dac.tar.gz |
Add rcNG startup script. [1]
Font cache is not build by default, which makes related lines in
default configure file wrong, which in turn causes xfs to error out
on startup with default file. Tweak generation of said file in a way
that would make proper configuration depending on existance of font
caching code, so that this patch can be sent upstream. [2]
Inspired by: Jose M Rodriguez (josemi at freebsd.jazztel.es) [1]
Bits and pieces for [1] stolen from:
src/etc/rc.d/xfs, apache2 and squid ports
Noticed by: Gary Dunn (knowtree at aloha.com) [2]
Diffstat (limited to 'x11-fonts')
-rw-r--r-- | x11-fonts/xfs/Makefile | 7 | ||||
-rw-r--r-- | x11-fonts/xfs/files/patch-Imakefile | 14 | ||||
-rw-r--r-- | x11-fonts/xfs/files/patch-config.cpp | 13 | ||||
-rw-r--r-- | x11-fonts/xfs/files/xfs.sh | 36 | ||||
-rw-r--r-- | x11-fonts/xfs/pkg-plist | 1 |
5 files changed, 71 insertions, 0 deletions
diff --git a/x11-fonts/xfs/Makefile b/x11-fonts/xfs/Makefile index 05a37a8..3d63b4b 100644 --- a/x11-fonts/xfs/Makefile +++ b/x11-fonts/xfs/Makefile @@ -7,6 +7,7 @@ PORTNAME= xorg-fontserver PORTVERSION= 6.8.1 +PORTREVISION= 1 CATEGORIES= x11-servers MASTER_SITES= ${MASTER_SITE_XORG} MASTER_SITE_SUBDIR= X11R${PORTVERSION}/tars @@ -28,7 +29,13 @@ XBUILD_DIRS= programs/xfs XINCLUDE_DIRS= lib/xtrans XMAN_DIRS= programs/xfs +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 ${INSTALL_SCRIPT} ${WRKSRC}/programs/xfs/config \ ${PREFIX}/lib/X11/fs/config.default diff --git a/x11-fonts/xfs/files/patch-Imakefile b/x11-fonts/xfs/files/patch-Imakefile new file mode 100644 index 0000000..64b65de --- /dev/null +++ b/x11-fonts/xfs/files/patch-Imakefile @@ -0,0 +1,14 @@ +--- programs/xfs/Imakefile.orig Tue Jan 18 22:28:55 2005 ++++ programs/xfs/Imakefile Tue Jan 18 22:30:24 2005 +@@ -37,7 +37,11 @@ + FSLIBDIR = $(LIBDIR)/fs + FSERRORS = $(LOGDIRECTORY)/xfs.log + DEFAULTFONTPATH = DefaultFSFontPath ++#if defined(BuildFontCacheLib) && BuildFontCacheLib ++SITE_CONFIG = -DDEFAULTFONTPATH=$(DEFAULTFONTPATH) -DFSERRORS=$(FSERRORS) -DFONTCACHE ++#else + SITE_CONFIG = -DDEFAULTFONTPATH=$(DEFAULTFONTPATH) -DFSERRORS=$(FSERRORS) ++#endif + + $(OSLIB): $(OSDIR) + diff --git a/x11-fonts/xfs/files/patch-config.cpp b/x11-fonts/xfs/files/patch-config.cpp new file mode 100644 index 0000000..d44e630 --- /dev/null +++ b/x11-fonts/xfs/files/patch-config.cpp @@ -0,0 +1,13 @@ +--- programs/xfs/config.cpp.orig Tue Jan 18 22:31:25 2005 ++++ programs/xfs/config.cpp Tue Jan 18 22:32:13 2005 +@@ -8,8 +8,10 @@ + XCOMM in decipoints + default-point-size = 120 + default-resolutions = 75,75,100,100 ++#ifdef FONTCACHE + + XCOMM font cache control, specified in KB + cache-hi-mark = 2048 + cache-low-mark = 1433 + cache-balance = 70 ++#endif diff --git a/x11-fonts/xfs/files/xfs.sh b/x11-fonts/xfs/files/xfs.sh new file mode 100644 index 0000000..815dfae --- /dev/null +++ b/x11-fonts/xfs/files/xfs.sh @@ -0,0 +1,36 @@ +#!/bin/sh +# +# $FreeBSD: /tmp/pcvs/ports/x11-fonts/xfs/files/Attic/xfs.sh,v 1.1 2005-01-23 19:50:40 lesi Exp $ +# + +# 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-fonts/xfs/pkg-plist b/x11-fonts/xfs/pkg-plist index ce88bda..5f0e1b5 100644 --- a/x11-fonts/xfs/pkg-plist +++ b/x11-fonts/xfs/pkg-plist @@ -1,3 +1,4 @@ bin/xfs +etc/rc.d/xfs.sh @unexec if cmp -s %D/lib/X11/fs/config.default %D/lib/X11/fs/config; then rm -f %D/lib/X11/fs/config; fi lib/X11/fs/config.default |