aboutsummaryrefslogtreecommitdiff
path: root/x11-servers/Xfstt
diff options
context:
space:
mode:
authorAde Lovett <ade@FreeBSD.org>2000-11-18 23:45:17 +0000
committerAde Lovett <ade@FreeBSD.org>2000-11-18 23:45:17 +0000
commit0de2b402202cce32ef8b4b509d44fde7c5d84b0d (patch)
tree8c2e607069989ac7240317939e6234d5e647097d /x11-servers/Xfstt
parentca308a57a4e20159c5bd91e96fec6697b6e12c39 (diff)
downloadports-0de2b402202cce32ef8b4b509d44fde7c5d84b0d.tar.gz
ports-0de2b402202cce32ef8b4b509d44fde7c5d84b0d.zip
Notes
Diffstat (limited to 'x11-servers/Xfstt')
-rw-r--r--x11-servers/Xfstt/Makefile14
-rw-r--r--x11-servers/Xfstt/files/patch-ab59
-rw-r--r--x11-servers/Xfstt/files/patch-ae25
-rw-r--r--x11-servers/Xfstt/files/xfstt.sh18
-rw-r--r--x11-servers/Xfstt/pkg-message11
-rw-r--r--x11-servers/Xfstt/pkg-plist15
6 files changed, 134 insertions, 8 deletions
diff --git a/x11-servers/Xfstt/Makefile b/x11-servers/Xfstt/Makefile
index 7fb16c6e5a2f..fea95c40ae67 100644
--- a/x11-servers/Xfstt/Makefile
+++ b/x11-servers/Xfstt/Makefile
@@ -7,6 +7,7 @@
PORTNAME= xfstt
PORTVERSION= 1.1
+PORTREVISION= 1
CATEGORIES= x11-servers
MASTER_SITES= $(MASTER_SITE_SUNSITE)
MASTER_SITE_SUBDIR= X11/fonts
@@ -16,12 +17,22 @@ MAINTAINER= olgeni@uli.it
USE_X_PREFIX= yes
MAN1= xfstt.1
+.if defined(NOPORTDOCS)
+NODOCS= "@comment "
+.endif
+
+PLIST_SUB= NOPORTDOCS=${NODOCS}
+
do-install:
$(INSTALL_PROGRAM) $(WRKSRC)/xfstt $(PREFIX)/bin
$(INSTALL_MAN) $(WRKSRC)/xfstt.1x $(PREFIX)/man/man1/xfstt.1
post-install:
strip $(PREFIX)/bin/xfstt
+ ${SED} -e "/%%PREFIX%%/s##${PREFIX}#g" ${FILESDIR}/xfstt.sh \
+ > ${PREFIX}/etc/rc.d/xfstt.sh
+ ${CHMOD} 755 ${PREFIX}/etc/rc.d/xfstt.sh
+ $(MKDIR) $(PREFIX)/lib/X11/fonts/TrueType
.if !defined(NOPORTDOCS)
$(MKDIR) $(PREFIX)/share/doc/xfstt
$(INSTALL_DATA) $(WRKSRC)/FAQ $(PREFIX)/share/doc/xfstt
@@ -29,5 +40,8 @@ post-install:
$(INSTALL_DATA) $(WRKSRC)/INSTALL $(PREFIX)/share/doc/xfstt
$(INSTALL_DATA) $(WRKSRC)/THANKS.txt $(PREFIX)/share/doc/xfstt
.endif
+ @${ECHO}
+ @${CAT} ${PKGMESSAGE}
+ @${ECHO}
.include <bsd.port.mk>
diff --git a/x11-servers/Xfstt/files/patch-ab b/x11-servers/Xfstt/files/patch-ab
index 2e5d08f522eb..36d69814cd82 100644
--- a/x11-servers/Xfstt/files/patch-ab
+++ b/x11-servers/Xfstt/files/patch-ab
@@ -1,5 +1,5 @@
---- xfstt.cpp.orig Thu Jul 6 18:14:25 2000
-+++ xfstt.cpp Thu Jul 6 18:15:31 2000
+--- xfstt.cpp.orig Sat Dec 11 19:23:45 1999
++++ xfstt.cpp Sat Nov 18 15:57:30 2000
@@ -11,8 +11,8 @@
#define UNSTRAPLIMIT 10500U
@@ -11,7 +11,23 @@
#define TTINFO_LEAF "ttinfo.dir"
#define TTNAME_LEAF "ttname.dir"
-@@ -470,10 +470,12 @@
+@@ -73,6 +73,7 @@
+ char* fontdir = TTFONTDIR;
+ char* cachedir = TTCACHEDIR;
+ int defaultres = 0;
++int NoTCP = 0;
+
+ uid_t newuid = (uid_t)(-2);
+ gid_t newgid = (uid_t)(-2);
+@@ -95,6 +96,7 @@
+ printf( "\t--sync put ttf-fonts in \"%s\" in database\n", fontdir);
+ printf( "\t--gslist print ghostscript style ttf fontlist\n ");
+ printf( "\t--port change port number from default 7101\n");
++ printf( "\t--notcp don't open TCP socket, use unix domain only\n");
+ printf( "\t--dir use other font directory than "TTFONTDIR"\n");
+ printf( "\t--cache use other font cache directory than "TTCACHEDIR"\n");
+ printf( "\t--res force default resolution to this value\n");
+@@ -470,10 +472,12 @@
raster->getFontExtent( &xfs->fe);
int used = (xfs->fe.bitmaps + xfs->fe.bmplen) - xfs->fe.buffer;
@@ -26,3 +42,40 @@
xfs->fid = 0; //###
xfs = 0;
}
+@@ -652,7 +656,7 @@
+ listen( sd_unix, 1); // only one connection
+ }
+
+- if( !sd_inet) {
++ if( !NoTCP && !sd_inet) {
+ // prepare inet connection
+ sd_inet = socket( PF_INET, SOCK_STREAM, IPPROTO_TCP);
+
+@@ -668,7 +672,8 @@
+ fd_set sdlist;
+ FD_ZERO( &sdlist);
+ FD_SET( sd_unix, &sdlist);
+- FD_SET( sd_inet, &sdlist);
++ if( !NoTCP )
++ FD_SET( sd_inet, &sdlist);
+ int maxsd = (sd_inet > sd_unix) ? sd_inet : sd_unix;
+ select( maxsd+1, &sdlist, 0L, 0L, 0L);
+
+@@ -676,7 +681,7 @@
+ unsigned int saLength = sizeof(struct sockaddr);
+ if( FD_ISSET( sd_unix, &sdlist))
+ sd = accept( sd_unix, (struct sockaddr*)&s_unix, &saLength);
+- else if( FD_ISSET( sd_inet, &sdlist))
++ else if( !NoTCP && FD_ISSET( sd_inet, &sdlist))
+ sd = accept( sd_inet, (struct sockaddr*)&s_inet, &saLength);
+ dprintf2( "accept( saLength = %d) = %d\n", saLength, sd);
+
+@@ -1604,6 +1609,8 @@
+ inetdConnection = 1;
+ } else if( !strcmp( argv[i], "--multi")) {
+ multiConnection = 1;
++ } else if( !strcmp( argv[i], "--notcp")) {
++ NoTCP = 1;
+ } else if( !strcmp( argv[i], "--once")) {
+ multiConnection = 0;
+ } else if( !strcmp( argv[i], "--unstrap")) {
diff --git a/x11-servers/Xfstt/files/patch-ae b/x11-servers/Xfstt/files/patch-ae
new file mode 100644
index 000000000000..dba172a1b2dc
--- /dev/null
+++ b/x11-servers/Xfstt/files/patch-ae
@@ -0,0 +1,25 @@
+--- xfstt.1x.orig Tue Jul 13 05:07:15 1999
++++ xfstt.1x Sat Nov 18 16:08:20 2000
+@@ -3,7 +3,7 @@
+ xfstt \- X11 font server for *ttf fonts
+ .SH SYNOPSIS
+ .B xfstt
+-[--port n] [--dir dirname] [--unstrap]
++[--port n] [--notcp] [--dir dirname] [--unstrap]
+ [--multi] [--once] [--user username]
+ [[--gslist] --sync]
+ [--res resolution] [--encoding list]
+@@ -43,9 +43,12 @@
+ Change the port number for xfstt's font services.
+ This version of Xfstt defaults to --port 7101.
+ .TP
++.I "\-\-notcp"
++Don't open TCP socket, use unix domain only.
++.TP
+ .I "\-\-dir name"
+ Change xfstt's font directory.
+-The default is --dir /usr/share/fonts/truetype.
++The default is --dir /usr/X11R6/lib/X11/fonts/TrueType.
+ .TP
+ .I "\-\-res value"
+ Force the resolution for underspecified fonts to value (typically 96 or 120).
diff --git a/x11-servers/Xfstt/files/xfstt.sh b/x11-servers/Xfstt/files/xfstt.sh
new file mode 100644
index 000000000000..60c0691185b1
--- /dev/null
+++ b/x11-servers/Xfstt/files/xfstt.sh
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+PREFIX=%%PREFIX%%
+
+case "$1" in
+
+start)
+ ${PREFIX}/bin/xfstt --sync >/dev/null
+ ${PREFIX}/bin/xfstt --user nobody --notcp --daemon && echo -n ' xfstt'
+ ;;
+stop)
+ /usr/bin/killall xfstt 2>/dev/null && echo -n ' xfstt'
+ ;;
+*)
+ echo "$0 start | stop"
+ ;;
+
+esac
diff --git a/x11-servers/Xfstt/pkg-message b/x11-servers/Xfstt/pkg-message
new file mode 100644
index 000000000000..4c565fac1e4f
--- /dev/null
+++ b/x11-servers/Xfstt/pkg-message
@@ -0,0 +1,11 @@
+You will have to install your TrueType fonts in
+
+ PREFIX/lib/X11/fonts/TrueType
+
+Remember to run the "xfstt --sync" command if you
+add fonts while the font server is running.
+
+You should also add the following line to the "Files"
+Section of /etc/XF86Config:
+
+ FontPath "unix/:7101"
diff --git a/x11-servers/Xfstt/pkg-plist b/x11-servers/Xfstt/pkg-plist
index a59d0d310ea8..1b7086dd93f4 100644
--- a/x11-servers/Xfstt/pkg-plist
+++ b/x11-servers/Xfstt/pkg-plist
@@ -1,6 +1,11 @@
+etc/rc.d/xfstt.sh
bin/xfstt
-share/doc/xfstt/FAQ
-share/doc/xfstt/CHANGES
-share/doc/xfstt/INSTALL
-share/doc/xfstt/THANKS.txt
-@dirrm share/doc/xfstt
+%%NOPORTDOCS%%share/doc/xfstt/FAQ
+%%NOPORTDOCS%%share/doc/xfstt/CHANGES
+%%NOPORTDOCS%%share/doc/xfstt/INSTALL
+%%NOPORTDOCS%%share/doc/xfstt/THANKS.txt
+%%NOPORTDOCS%%@dirrm share/doc/xfstt
+@exec mkdir -p %D/lib/X11/fonts/TrueType
+@unexec rm -f %D/lib/X11/fonts/TrueType/ttname.dir
+@unexec rm -f %D/lib/X11/fonts/TrueType/ttinfo.dir
+@unexec rmdir %D/lib/X11/fonts/TrueType 2>/dev/null || true