Update to version 1.4.

PR:		48048
Submitted by:	Ports Fury
This commit is contained in:
Christian Weisgerber 2003-02-16 13:55:09 +00:00
parent 4e1fc2a699
commit 0fe1dd303a
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=75649
16 changed files with 92 additions and 192 deletions

View file

@ -6,36 +6,39 @@
#
PORTNAME= xfstt
PORTVERSION= 1.1
PORTREVISION= 1
PORTVERSION= 1.4
CATEGORIES= x11-servers
MASTER_SITES= $(MASTER_SITE_SUNSITE)
MASTER_SITE_SUBDIR= X11/fonts
MASTER_SITES= http://download.berlios.de/xfstt/
MAINTAINER= ports@FreeBSD.org
COMMENT= A TrueType font server for X11
USE_X_PREFIX= yes
MAN1= xfstt.1
USE_REINPLACE= yes
GNU_CONFIGURE= yes
CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
CONFIGURE_ARGS= --disable-nls
do-install:
$(INSTALL_PROGRAM) $(WRKSRC)/xfstt $(PREFIX)/bin
$(INSTALL_MAN) $(WRKSRC)/xfstt.1x $(PREFIX)/man/man1/xfstt.1
MAN1= xfstt.1x
TTFONTDIR= ${PREFIX}/lib/X11/fonts/TrueType
post-patch:
.for file in INSTALL doc/xfstt.1x src/perftest.cc src/xfstt.cc
@${REINPLACE_CMD} -e 's|%%TTFONTDIR%%|${TTFONTDIR}|g' ${WRKSRC}/${file}
.endfor
post-install:
strip $(PREFIX)/bin/xfstt
${SED} -e "/%%PREFIX%%/s##${PREFIX}#g" ${FILESDIR}/xfstt.sh \
${SED} -e "s:%%PREFIX%%:${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
$(INSTALL_DATA) $(WRKSRC)/CHANGES $(PREFIX)/share/doc/xfstt
$(INSTALL_DATA) $(WRKSRC)/INSTALL $(PREFIX)/share/doc/xfstt
$(INSTALL_DATA) $(WRKSRC)/THANKS.txt $(PREFIX)/share/doc/xfstt
@${CHMOD} 755 ${PREFIX}/etc/rc.d/xfstt.sh
@${MKDIR} ${TTFONTDIR}
.if !defined{NOPORTDOCS}
@${MKDIR} ${DOCSDIR}
.for file in CHANGES INSTALL THANKS
${INSTALL_DATA} ${WRKSRC}/${file} ${DOCSDIR}
.endfor
.endif
@${ECHO}
@${CAT} ${PKGMESSAGE}
@${ECHO}
.include <bsd.port.mk>

View file

@ -1 +1 @@
MD5 (xfstt-1.1.tar.gz) = e6588126aa49a5a50458591948424209
MD5 (xfstt-1.4.tar.gz) = e186b28d413056b4f95a02562e664bc6

View file

@ -0,0 +1,11 @@
--- INSTALL.orig Tue Nov 19 13:47:49 2002
+++ INSTALL Wed Nov 20 22:34:03 2002
@@ -32,7 +32,7 @@
$ make && make install
(use gmake instead of the standard make on FreeBSD)
-2) Create a writeable directory /usr/share/fonts/truetype, copy some
+2) Create a writeable directory %%TTFONTDIR%%, copy some
truetype *.ttf files or create soflinks to truetype directories
in there, then run

View file

@ -1,41 +0,0 @@
--- Makefile.orig Sun May 30 23:28:44 1999
+++ Makefile Sat Apr 1 18:15:32 2000
@@ -2,16 +2,21 @@
MISCOPT =
OPT = $(MISCOPT) $(MAXOPT)
-CFLAGS = $(OPT) -DMAGNIFY=0 -DNDEBUG
+#CFLAGS = $(OPT) -DMAGNIFY=0 -DNDEBUG
#CFLAGS = -fprofile-arcs -ftest-coverage -DMAGNIFY=0
-CFLAGS = -g -Wall -pedantic $(MISCOPT) -DMAGNIFY=0
+CFLAGS += -Wall -pedantic $(MISCOPT) -DMAGNIFY=0
#CFLAGS = -O -Wall -pedantic -DDEBUG $(MISCOPT)
-LFLAGS = -L/usr/X11R6/lib -L/usr/openwin/lib/X11
-LFLAGS = -g -L/usr/X11R6/lib
+.if !defined(CXXFLAGS)
+CXXFLAGS:=${CFLAGS}
+.endif
+CFLAGS := ${CXXFLAGS} -Wall -pedantic $(MISCOPT) -DMAGNIFY=0
-CC = c++
-LD = c++
+#LFLAGS = -L/usr/X11R6/lib -L/usr/openwin/lib/X11
+LFLAGS = -L$(X11BASE)/lib
+
+CC = ${CXX}
+LD = ${CXX}
OBJS = RAFile.o \
TTFont.o \
@@ -56,8 +61,8 @@
$(LD) -o $@ $(OBJS) xfstt.o encoding.o $(LFLAGS) -lm
xfstt.o : xfstt.cpp xfstt.h ttf.h arch.h Makefile
- $(CC) $(CFLAGS) -c $< -I/usr/X11R6/include/X11/fonts \
- -I/usr/X11R6/include/
+ $(CC) $(CFLAGS) -c $< -I$(X11BASE)/include/X11/fonts \
+ -I$(X11BASE)/include/
encoding.o : encoding.cpp encoding.h Makefile
$(CC) $(CFLAGS) -c $<

View file

@ -1,81 +0,0 @@
--- 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
// Change these if you don't lie being FHS complient
-#define TTFONTDIR "/usr/share/fonts/truetype"
-#define TTCACHEDIR "/var/cache/xfstt"
+#define TTFONTDIR "/usr/X11R6/lib/X11/fonts/TrueType"
+#define TTCACHEDIR "/usr/X11R6/lib/X11/fonts/TrueType"
#define TTINFO_LEAF "ttinfo.dir"
#define TTNAME_LEAF "ttname.dir"
@@ -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;
+ int bmpoff = xfs->fe.bitmaps - xfs->fe.buffer;
xfs->fe.buffer = (U8*)shrinkMem( xfs->fe.buffer, used);
- if( xfs->fe.buffer)
+ if( xfs->fe.buffer) {
xfs->fe.buflen = used;
- else {
+ xfs->fe.bitmaps = xfs->fe.buffer + bmpoff;
+ } else {
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")) {

View file

@ -1,11 +0,0 @@
--- perftest.cpp.orig Sat Jan 9 04:11:04 1999
+++ perftest.cpp Mon Dec 6 16:53:06 1999
@@ -1,7 +1,7 @@
// test ttf engine performance
// (C) Copyright 1997-1998 Herbert Duerr
-#define TTFONTDIR "/usr/share/fonts/truetype"
+#define TTFONTDIR "/usr/X11R6/lib/X11/fonts/TrueType"
#define MAXFONTBUFSIZE (2048*2048)
#include "ttf.h"

View file

@ -1,10 +0,0 @@
--- INSTALL.orig Mon Dec 6 16:56:27 1999
+++ INSTALL Mon Dec 6 16:56:48 1999
@@ -2,7 +2,7 @@
make && make install
(use gmake instead of the standard make on FreeBSD)
-2) Create a writeable directory /usr/share/fonts/truetype, copy some truetype *.ttf
+2) Create a writeable directory /usr/X11R6/lib/X11/fonts/TrueType, copy some truetype *.ttf
files or create soflinks to truetype directories in there, then run
xfstt --sync

View file

@ -1,25 +0,0 @@
--- 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).

View file

@ -0,0 +1,17 @@
--- doc/xfstt.1x.orig Thu Nov 14 21:08:07 2002
+++ doc/xfstt.1x Wed Nov 20 22:35:57 2002
@@ -58,12 +58,12 @@
.I "\-\-dir name"
Change xfstt's font directory.
The default directory is
-.IR /usr/share/fonts/truetype .
+.IR %%TTFONTDIR%% .
.TP
.I "\-\-cache name"
Change xfstt's font cache directory.
The default directory is
-.IR /var/cache/xfstt .
+.IR %%TTFONTDIR%% .
.TP
.I "\-\-pidfile name"
Change xfstt's pidfile location.

View file

@ -0,0 +1,10 @@
--- libfstt/arch.h.orig Thu Nov 14 21:08:10 2002
+++ libfstt/arch.h Wed Nov 20 22:44:27 2002
@@ -49,6 +49,7 @@
typedef signed short S16;
typedef signed int S32;
+#include <sys/types.h>
#include <netinet/in.h>
// byte swapping (doing it by ntohl/ntohs works only on little endian CPUs)

View file

@ -0,0 +1,11 @@
--- src/perftest.cc.orig Thu Nov 14 21:08:09 2002
+++ src/perftest.cc Wed Nov 20 23:17:01 2002
@@ -21,7 +21,7 @@
*
*/
-#define TTFONTDIR "/usr/share/fonts/truetype"
+#define TTFONTDIR "%%TTFONTDIR%%"
#define MAXFONTBUFSIZE (2048*2048)
#include "ttf.h"

View file

@ -0,0 +1,13 @@
--- src/xfstt.cc.orig Thu Nov 14 21:08:08 2002
+++ src/xfstt.cc Wed Nov 20 23:22:03 2002
@@ -31,8 +31,8 @@
#define UNSTRAPLIMIT 10500U
// Change these if you don't like being FHS complient
-#define TTFONTDIR "/usr/share/fonts/truetype"
-#define TTCACHEDIR "/var/cache/xfstt"
+#define TTFONTDIR "%%TTFONTDIR%%"
+#define TTCACHEDIR "%%TTFONTDIR%%"
#define TTINFO_LEAF "ttinfo.dir"
#define TTNAME_LEAF "ttname.dir"

View file

@ -1 +0,0 @@
A TrueType font server for X11

View file

@ -1 +1,3 @@
This is Xfstt, a free TrueType font server for X11.
WWW: http://developer.berlios.de/projects/xfstt/

View file

@ -1,3 +1,4 @@
******************************************************************
You will have to install your TrueType fonts in
PREFIX/lib/X11/fonts/TrueType
@ -9,3 +10,4 @@ You should also add the following line to the "Files"
Section of /etc/XF86Config:
FontPath "unix/:7101"
******************************************************************

View file

@ -1,9 +1,9 @@
@comment $FreeBSD$
etc/rc.d/xfstt.sh
bin/xfstt
%%PORTDOCS%%share/doc/xfstt/FAQ
%%PORTDOCS%%share/doc/xfstt/CHANGES
%%PORTDOCS%%share/doc/xfstt/INSTALL
%%PORTDOCS%%share/doc/xfstt/THANKS.txt
%%PORTDOCS%%share/doc/xfstt/THANKS
%%PORTDOCS%%@dirrm share/doc/xfstt
@exec mkdir -p %D/lib/X11/fonts/TrueType
@unexec rm -f %D/lib/X11/fonts/TrueType/ttname.dir