View | Details | Raw Unified | Return to bug 48048
Collapse All | Expand All

(-)x11-servers/Xfstt/Makefile (-20 / +22 lines)
Lines 6-41 Link Here
6
#
6
#
7
7
8
PORTNAME=	xfstt
8
PORTNAME=	xfstt
9
PORTVERSION=	1.1
9
PORTVERSION=	1.4
10
PORTREVISION=	1
11
CATEGORIES=	x11-servers
10
CATEGORIES=	x11-servers
12
MASTER_SITES=	$(MASTER_SITE_SUNSITE)
11
MASTER_SITES=	http://download.berlios.de/xfstt/
13
MASTER_SITE_SUBDIR=	X11/fonts
14
12
15
MAINTAINER=	ports@FreeBSD.org
13
MAINTAINER=	ports@FreeBSD.org
16
14
17
USE_X_PREFIX=	yes
15
USE_X_PREFIX=	yes
18
MAN1=		xfstt.1
16
USE_REINPLACE=	yes
17
GNU_CONFIGURE=	yes
18
CONFIGURE_TARGET=	--build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
19
CONFIGURE_ARGS=	--disable-nls
19
20
20
do-install:
21
MAN1=		xfstt.1x
21
	$(INSTALL_PROGRAM) $(WRKSRC)/xfstt $(PREFIX)/bin
22
22
	$(INSTALL_MAN) $(WRKSRC)/xfstt.1x $(PREFIX)/man/man1/xfstt.1
23
TTFONTDIR=	${PREFIX}/lib/X11/fonts/TrueType
24
25
post-patch:
26
.for file in INSTALL doc/xfstt.1x src/perftest.cc src/xfstt.cc
27
	@${REINPLACE_CMD} -e 's|%%TTFONTDIR%%|${TTFONTDIR}|g' ${WRKSRC}/${file}
28
.endfor
23
29
24
post-install:
30
post-install:
25
	strip $(PREFIX)/bin/xfstt
31
	${SED} -e "s:%%PREFIX%%:${PREFIX}:g" ${FILESDIR}/xfstt.sh \
26
	${SED} -e "/%%PREFIX%%/s##${PREFIX}#g" ${FILESDIR}/xfstt.sh \
27
		> ${PREFIX}/etc/rc.d/xfstt.sh
32
		> ${PREFIX}/etc/rc.d/xfstt.sh
28
	${CHMOD} 755 ${PREFIX}/etc/rc.d/xfstt.sh
33
	@${CHMOD} 755 ${PREFIX}/etc/rc.d/xfstt.sh
29
	$(MKDIR) $(PREFIX)/lib/X11/fonts/TrueType
34
	@${MKDIR} ${TTFONTDIR}
30
.if !defined(NOPORTDOCS)
35
.if !defined{NOPORTDOCS}
31
	$(MKDIR) $(PREFIX)/share/doc/xfstt
36
	@${MKDIR} ${DOCSDIR}
32
	$(INSTALL_DATA) $(WRKSRC)/FAQ $(PREFIX)/share/doc/xfstt
37
.for file in CHANGES INSTALL THANKS
33
	$(INSTALL_DATA) $(WRKSRC)/CHANGES $(PREFIX)/share/doc/xfstt
38
	${INSTALL_DATA} ${WRKSRC}/${file} ${DOCSDIR}
34
	$(INSTALL_DATA) $(WRKSRC)/INSTALL $(PREFIX)/share/doc/xfstt
39
.endfor
35
	$(INSTALL_DATA) $(WRKSRC)/THANKS.txt $(PREFIX)/share/doc/xfstt
36
.endif
40
.endif
37
	@${ECHO}
38
	@${CAT} ${PKGMESSAGE}
41
	@${CAT} ${PKGMESSAGE}
39
	@${ECHO}
40
42
41
.include <bsd.port.mk>
43
.include <bsd.port.mk>
(-)x11-servers/Xfstt/distinfo (-1 / +1 lines)
Line 1 Link Here
1
MD5 (xfstt-1.1.tar.gz) = e6588126aa49a5a50458591948424209
1
MD5 (xfstt-1.4.tar.gz) = e186b28d413056b4f95a02562e664bc6
(-)x11-servers/Xfstt/files/patch-INSTALL (+11 lines)
Line 0 Link Here
1
--- INSTALL.orig	Tue Nov 19 13:47:49 2002
2
+++ INSTALL	Wed Nov 20 22:34:03 2002
3
@@ -32,7 +32,7 @@
4
  $ make && make install
5
    (use gmake instead of the standard make on FreeBSD)
6
 
7
-2) Create a writeable directory /usr/share/fonts/truetype, copy some
8
+2) Create a writeable directory %%TTFONTDIR%%, copy some
9
    truetype *.ttf files or create soflinks to truetype directories
10
    in there, then run
11
 
(-)x11-servers/Xfstt/files/patch-aa (-41 lines)
Lines 1-41 Link Here
1
--- Makefile.orig	Sun May 30 23:28:44 1999
2
+++ Makefile	Sat Apr  1 18:15:32 2000
3
@@ -2,16 +2,21 @@
4
 MISCOPT =
5
 OPT = $(MISCOPT) $(MAXOPT)
6
 
7
-CFLAGS = $(OPT) -DMAGNIFY=0 -DNDEBUG
8
+#CFLAGS = $(OPT) -DMAGNIFY=0 -DNDEBUG
9
 #CFLAGS = -fprofile-arcs -ftest-coverage -DMAGNIFY=0
10
-CFLAGS = -g -Wall -pedantic $(MISCOPT) -DMAGNIFY=0
11
+CFLAGS += -Wall -pedantic $(MISCOPT) -DMAGNIFY=0
12
 #CFLAGS = -O -Wall -pedantic -DDEBUG $(MISCOPT)
13
 
14
-LFLAGS = -L/usr/X11R6/lib -L/usr/openwin/lib/X11
15
-LFLAGS = -g -L/usr/X11R6/lib
16
+.if !defined(CXXFLAGS)
17
+CXXFLAGS:=${CFLAGS}
18
+.endif
19
+CFLAGS := ${CXXFLAGS} -Wall -pedantic $(MISCOPT) -DMAGNIFY=0
20
 
21
-CC = c++
22
-LD = c++
23
+#LFLAGS = -L/usr/X11R6/lib -L/usr/openwin/lib/X11
24
+LFLAGS = -L$(X11BASE)/lib
25
+
26
+CC = ${CXX}
27
+LD = ${CXX}
28
 
29
 OBJS =	RAFile.o	\
30
 	TTFont.o	\
31
@@ -56,8 +61,8 @@
32
 	$(LD) -o $@ $(OBJS) xfstt.o encoding.o $(LFLAGS) -lm
33
 
34
 xfstt.o : xfstt.cpp xfstt.h ttf.h arch.h Makefile
35
-	$(CC) $(CFLAGS) -c $< -I/usr/X11R6/include/X11/fonts	\
36
-		-I/usr/X11R6/include/
37
+	$(CC) $(CFLAGS) -c $< -I$(X11BASE)/include/X11/fonts	\
38
+		-I$(X11BASE)/include/
39
 
40
 encoding.o : encoding.cpp encoding.h Makefile
41
 	$(CC) $(CFLAGS) -c $<
(-)x11-servers/Xfstt/files/patch-ab (-81 lines)
Lines 1-81 Link Here
1
--- xfstt.cpp.orig	Sat Dec 11 19:23:45 1999
2
+++ xfstt.cpp	Sat Nov 18 15:57:30 2000
3
@@ -11,8 +11,8 @@
4
 #define UNSTRAPLIMIT	10500U
5
 
6
 // Change these if you don't lie being FHS complient
7
-#define TTFONTDIR	"/usr/share/fonts/truetype"
8
-#define TTCACHEDIR      "/var/cache/xfstt"
9
+#define TTFONTDIR       "/usr/X11R6/lib/X11/fonts/TrueType"
10
+#define TTCACHEDIR      "/usr/X11R6/lib/X11/fonts/TrueType"
11
 
12
 #define TTINFO_LEAF     "ttinfo.dir"
13
 #define TTNAME_LEAF     "ttname.dir"
14
@@ -73,6 +73,7 @@
15
 char* fontdir = TTFONTDIR;
16
 char* cachedir = TTCACHEDIR;
17
 int defaultres = 0;
18
+int NoTCP = 0;
19
20
 uid_t newuid = (uid_t)(-2);
21
 gid_t newgid = (uid_t)(-2);
22
@@ -95,6 +96,7 @@
23
 	printf( "\t--sync     put ttf-fonts in \"%s\" in database\n", fontdir);
24
 	printf( "\t--gslist   print ghostscript style ttf fontlist\n ");
25
 	printf( "\t--port     change port number from default 7101\n");
26
+	printf( "\t--notcp    don't open TCP socket, use unix domain only\n");
27
 	printf( "\t--dir      use other font directory than "TTFONTDIR"\n");
28
 	printf( "\t--cache    use other font cache directory than "TTCACHEDIR"\n");
29
 	printf( "\t--res      force default resolution to this value\n");
30
@@ -470,10 +472,12 @@
31
 	raster->getFontExtent( &xfs->fe);
32
 
33
 	int used = (xfs->fe.bitmaps + xfs->fe.bmplen) - xfs->fe.buffer;
34
+	int bmpoff = xfs->fe.bitmaps - xfs->fe.buffer;
35
 	xfs->fe.buffer = (U8*)shrinkMem( xfs->fe.buffer, used);
36
-	if( xfs->fe.buffer)
37
+	if( xfs->fe.buffer) {
38
 		xfs->fe.buflen = used;
39
-	else {
40
+		xfs->fe.bitmaps = xfs->fe.buffer + bmpoff;
41
+	} else {
42
 		xfs->fid = 0;	//###
43
 		xfs = 0;
44
 	}
45
@@ -652,7 +656,7 @@
46
 		listen( sd_unix, 1);	// only one connection
47
 	}
48
49
-	if( !sd_inet) {
50
+	if( !NoTCP && !sd_inet) {
51
 		// prepare inet connection
52
 		sd_inet = socket( PF_INET, SOCK_STREAM, IPPROTO_TCP);
53
54
@@ -668,7 +672,8 @@
55
 	fd_set sdlist;
56
 	FD_ZERO( &sdlist);
57
 	FD_SET( sd_unix, &sdlist);
58
-	FD_SET( sd_inet, &sdlist);
59
+	if( !NoTCP )
60
+		FD_SET( sd_inet, &sdlist);
61
 	int maxsd = (sd_inet > sd_unix) ? sd_inet : sd_unix;
62
 	select( maxsd+1, &sdlist, 0L, 0L, 0L);
63
64
@@ -676,7 +681,7 @@
65
 	unsigned int saLength = sizeof(struct sockaddr);
66
 	if( FD_ISSET( sd_unix, &sdlist))
67
 		sd = accept( sd_unix, (struct sockaddr*)&s_unix, &saLength);
68
-	else if( FD_ISSET( sd_inet, &sdlist))
69
+	else if( !NoTCP && FD_ISSET( sd_inet, &sdlist))
70
 		sd = accept( sd_inet, (struct sockaddr*)&s_inet, &saLength);
71
 	dprintf2( "accept( saLength = %d) = %d\n", saLength, sd);
72
73
@@ -1604,6 +1609,8 @@
74
 			inetdConnection = 1;
75
 		} else if( !strcmp( argv[i], "--multi")) {
76
 			multiConnection = 1;
77
+		} else if( !strcmp( argv[i], "--notcp")) {
78
+			NoTCP = 1;
79
 		} else if( !strcmp( argv[i], "--once")) {
80
 			multiConnection = 0;
81
 		} else if( !strcmp( argv[i], "--unstrap")) {
(-)x11-servers/Xfstt/files/patch-ac (-11 lines)
Lines 1-11 Link Here
1
--- perftest.cpp.orig	Sat Jan  9 04:11:04 1999
2
+++ perftest.cpp	Mon Dec  6 16:53:06 1999
3
@@ -1,7 +1,7 @@
4
 // test ttf engine performance
5
 // (C) Copyright 1997-1998 Herbert Duerr
6
 
7
-#define TTFONTDIR	"/usr/share/fonts/truetype"
8
+#define TTFONTDIR	"/usr/X11R6/lib/X11/fonts/TrueType"
9
 #define MAXFONTBUFSIZE (2048*2048)
10
 
11
 #include "ttf.h"
(-)x11-servers/Xfstt/files/patch-ad (-10 lines)
Lines 1-10 Link Here
1
--- INSTALL.orig	Mon Dec  6 16:56:27 1999
2
+++ INSTALL	Mon Dec  6 16:56:48 1999
3
@@ -2,7 +2,7 @@
4
 	make && make install
5
    (use gmake instead of the standard make on FreeBSD)
6
 
7
-2) Create a writeable directory /usr/share/fonts/truetype, copy some truetype *.ttf
8
+2) Create a writeable directory /usr/X11R6/lib/X11/fonts/TrueType, copy some truetype *.ttf
9
    files or create soflinks to truetype directories in there, then run
10
 	xfstt --sync
(-)x11-servers/Xfstt/files/patch-ae (-25 lines)
Lines 1-25 Link Here
1
--- xfstt.1x.orig	Tue Jul 13 05:07:15 1999
2
+++ xfstt.1x	Sat Nov 18 16:08:20 2000
3
@@ -3,7 +3,7 @@
4
 xfstt \- X11 font server for *ttf fonts
5
 .SH SYNOPSIS
6
 .B xfstt
7
-[--port n] [--dir dirname] [--unstrap]
8
+[--port n] [--notcp] [--dir dirname] [--unstrap]
9
 [--multi] [--once] [--user username]
10
 [[--gslist] --sync]
11
 [--res resolution] [--encoding list]
12
@@ -43,9 +43,12 @@
13
 Change the port number for xfstt's font services.
14
 This version of Xfstt defaults to --port 7101.
15
 .TP
16
+.I "\-\-notcp"
17
+Don't open TCP socket, use unix domain only.
18
+.TP
19
 .I "\-\-dir name"
20
 Change xfstt's font directory.
21
-The default is --dir /usr/share/fonts/truetype.
22
+The default is --dir /usr/X11R6/lib/X11/fonts/TrueType.
23
 .TP
24
 .I "\-\-res value"
25
 Force the resolution for underspecified fonts to value (typically 96 or 120).
(-)x11-servers/Xfstt/files/patch-doc::xfstt.1x (+17 lines)
Line 0 Link Here
1
--- doc/xfstt.1x.orig	Thu Nov 14 21:08:07 2002
2
+++ doc/xfstt.1x	Wed Nov 20 22:35:57 2002
3
@@ -58,12 +58,12 @@
4
 .I "\-\-dir name"
5
 Change xfstt's font directory.
6
 The default directory is
7
-.IR /usr/share/fonts/truetype .
8
+.IR %%TTFONTDIR%% .
9
 .TP
10
 .I "\-\-cache name"
11
 Change xfstt's font cache directory.
12
 The default directory is
13
-.IR /var/cache/xfstt .
14
+.IR %%TTFONTDIR%% .
15
 .TP
16
 .I "\-\-pidfile name"
17
 Change xfstt's pidfile location.
(-)x11-servers/Xfstt/files/patch-libfstt::arch.h (+10 lines)
Line 0 Link Here
1
--- libfstt/arch.h.orig	Thu Nov 14 21:08:10 2002
2
+++ libfstt/arch.h	Wed Nov 20 22:44:27 2002
3
@@ -49,6 +49,7 @@
4
 typedef signed short	S16;
5
 typedef signed int	S32;
6
 
7
+#include <sys/types.h>
8
 #include <netinet/in.h>
9
 
10
 // byte swapping (doing it by ntohl/ntohs works only on little endian CPUs)
(-)x11-servers/Xfstt/files/patch-src::perftest.cc (+11 lines)
Line 0 Link Here
1
--- src/perftest.cc.orig	Thu Nov 14 21:08:09 2002
2
+++ src/perftest.cc	Wed Nov 20 23:17:01 2002
3
@@ -21,7 +21,7 @@
4
  *
5
  */
6
 
7
-#define TTFONTDIR	"/usr/share/fonts/truetype"
8
+#define TTFONTDIR	"%%TTFONTDIR%%"
9
 #define MAXFONTBUFSIZE (2048*2048)
10
 
11
 #include "ttf.h"
(-)x11-servers/Xfstt/files/patch-src::xfstt.cc (+13 lines)
Line 0 Link Here
1
--- src/xfstt.cc.orig	Thu Nov 14 21:08:08 2002
2
+++ src/xfstt.cc	Wed Nov 20 23:22:03 2002
3
@@ -31,8 +31,8 @@
4
 #define UNSTRAPLIMIT	10500U
5
 
6
 // Change these if you don't like being FHS complient
7
-#define TTFONTDIR	"/usr/share/fonts/truetype"
8
-#define TTCACHEDIR	"/var/cache/xfstt"
9
+#define TTFONTDIR	"%%TTFONTDIR%%"
10
+#define TTCACHEDIR	"%%TTFONTDIR%%"
11
 
12
 #define TTINFO_LEAF	"ttinfo.dir"
13
 #define TTNAME_LEAF	"ttname.dir"
(-)x11-servers/Xfstt/pkg-descr (+2 lines)
Line 1 Link Here
1
This is Xfstt, a free TrueType font server for X11.
1
This is Xfstt, a free TrueType font server for X11.
2
3
WWW: http://developer.berlios.de/projects/xfstt/
(-)x11-servers/Xfstt/pkg-message (+2 lines)
Lines 1-3 Link Here
1
******************************************************************
1
You will have to install your TrueType fonts in
2
You will have to install your TrueType fonts in
2
3
3
	PREFIX/lib/X11/fonts/TrueType
4
	PREFIX/lib/X11/fonts/TrueType
Lines 9-11 Link Here
9
Section of /etc/XF86Config:
10
Section of /etc/XF86Config:
10
11
11
	FontPath   "unix/:7101"
12
	FontPath   "unix/:7101"
13
******************************************************************
(-)x11-servers/Xfstt/pkg-plist (-2 / +1 lines)
Lines 1-9 Link Here
1
etc/rc.d/xfstt.sh
1
etc/rc.d/xfstt.sh
2
bin/xfstt
2
bin/xfstt
3
%%PORTDOCS%%share/doc/xfstt/FAQ
4
%%PORTDOCS%%share/doc/xfstt/CHANGES
3
%%PORTDOCS%%share/doc/xfstt/CHANGES
5
%%PORTDOCS%%share/doc/xfstt/INSTALL
4
%%PORTDOCS%%share/doc/xfstt/INSTALL
6
%%PORTDOCS%%share/doc/xfstt/THANKS.txt
5
%%PORTDOCS%%share/doc/xfstt/THANKS
7
%%PORTDOCS%%@dirrm share/doc/xfstt
6
%%PORTDOCS%%@dirrm share/doc/xfstt
8
@exec mkdir -p %D/lib/X11/fonts/TrueType
7
@exec mkdir -p %D/lib/X11/fonts/TrueType
9
@unexec rm -f %D/lib/X11/fonts/TrueType/ttname.dir
8
@unexec rm -f %D/lib/X11/fonts/TrueType/ttname.dir

Return to bug 48048