summaryrefslogtreecommitdiffstats
path: root/x11-fonts
diff options
context:
space:
mode:
authorkwm <kwm@058c260c-8361-11dd-a0ac-aa2bafec7d09>2012-03-02 19:24:03 +0800
committerkwm <kwm@058c260c-8361-11dd-a0ac-aa2bafec7d09>2012-03-02 19:24:03 +0800
commit24639888f8a1abdd99b8acc450e2a326d30ebe9b (patch)
tree8ec3407369fe975a36a11bc37c8d3c8894b88de7 /x11-fonts
parentb6ae3c56df54fbc04e16074f16800cd5f980631c (diff)
downloadxorg-devel-ports-24639888f8a1abdd99b8acc450e2a326d30ebe9b.tar
xorg-devel-ports-24639888f8a1abdd99b8acc450e2a326d30ebe9b.tar.gz
xorg-devel-ports-24639888f8a1abdd99b8acc450e2a326d30ebe9b.tar.bz2
xorg-devel-ports-24639888f8a1abdd99b8acc450e2a326d30ebe9b.tar.lz
xorg-devel-ports-24639888f8a1abdd99b8acc450e2a326d30ebe9b.tar.xz
xorg-devel-ports-24639888f8a1abdd99b8acc450e2a326d30ebe9b.tar.zst
xorg-devel-ports-24639888f8a1abdd99b8acc450e2a326d30ebe9b.zip
Update xfs to 1.1.2.
Add upstream patches to libXfont to fix the build with xfs and to plug security issue [1]. Obtained from: libXfont upstream [1] http://cgit.freedesktop.org/xorg/lib/libXfont/commit/?id=bd48ad11fd11412c62c3ac8ed5d52c4f10a985aa Security: CVE-2011-2895 [1] git-svn-id: https://trillian.chruetertee.ch/svn/ports/trunk@431 058c260c-8361-11dd-a0ac-aa2bafec7d09
Diffstat (limited to 'x11-fonts')
-rw-r--r--x11-fonts/libXfont/Makefile24
-rw-r--r--x11-fonts/libXfont/distinfo2
-rw-r--r--x11-fonts/libXfont/files/patch-fontmisc.h25
-rw-r--r--x11-fonts/libXfont/files/patch-src_fontfile_decompress.c99
-rw-r--r--x11-fonts/libXfont/files/patch-src_util_atom.c30
-rw-r--r--x11-fonts/libXfont/pkg-descr3
-rw-r--r--x11-fonts/libXfont/pkg-plist21
-rw-r--r--x11-fonts/xfs/Makefile40
-rw-r--r--x11-fonts/xfs/distinfo2
-rw-r--r--x11-fonts/xfs/files/xfs.in37
-rw-r--r--x11-fonts/xfs/pkg-descr3
-rw-r--r--x11-fonts/xfs/pkg-install12
-rw-r--r--x11-fonts/xfs/pkg-plist6
13 files changed, 304 insertions, 0 deletions
diff --git a/x11-fonts/libXfont/Makefile b/x11-fonts/libXfont/Makefile
new file mode 100644
index 0000000..96a9eb9
--- /dev/null
+++ b/x11-fonts/libXfont/Makefile
@@ -0,0 +1,24 @@
+# New ports collection makefile for: libXfont
+# Date Created: 29 Oct, 2003
+# Whom: Eric Anholt <anholt@FreeBSD.org>
+#
+# $FreeBSD: ports/x11-fonts/libXfont/Makefile,v 1.27 2011/11/09 15:26:02 miwi Exp $
+#
+
+PORTNAME= libXfont
+PORTVERSION= 1.4.4
+PORTREVISION= 1
+PORTEPOCH= 1
+CATEGORIES= x11-fonts
+
+MAINTAINER= x11@FreeBSD.org
+COMMENT= X font libary
+
+LIB_DEPENDS= freetype.9:${PORTSDIR}/print/freetype2
+
+XORG_CAT= lib
+USE_XORG= xproto:both xtrans fontsproto:both fontenc
+
+CONFIGURE_ARGS=--without-xmlto --disable-devel-docs
+
+.include <bsd.port.mk>
diff --git a/x11-fonts/libXfont/distinfo b/x11-fonts/libXfont/distinfo
new file mode 100644
index 0000000..41f79ca
--- /dev/null
+++ b/x11-fonts/libXfont/distinfo
@@ -0,0 +1,2 @@
+SHA256 (xorg/lib/libXfont-1.4.4.tar.bz2) = a2065f5f66882f7a9cb0eb674e16d284da48e449af443eda272e99832be8239a
+SIZE (xorg/lib/libXfont-1.4.4.tar.bz2) = 440022
diff --git a/x11-fonts/libXfont/files/patch-fontmisc.h b/x11-fonts/libXfont/files/patch-fontmisc.h
new file mode 100644
index 0000000..3932c2d
--- /dev/null
+++ b/x11-fonts/libXfont/files/patch-fontmisc.h
@@ -0,0 +1,25 @@
+From 3715cd752bac912a56aa1cbb9dd874624a709aab Mon Sep 17 00:00:00 2001
+From: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Sun, 02 Oct 2011 16:16:05 +0000
+Subject: Add const attributes to fix gcc -Wwrite-strings warnings
+
+Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
+---
+(limited to 'include/X11/fonts/fontmisc.h')
+
+diff --git a/include/X11/fonts/fontmisc.h b/include/X11/fonts/fontmisc.h
+index 3da1e63..73a8247 100644
+--- include/X11/fonts/fontmisc.h
++++ include/X11/fonts/fontmisc.h
+@@ -52,7 +52,7 @@ in this Software without prior written authorization from The Open Group.
+ #define FALSE 0
+ #endif
+
+-extern Atom MakeAtom ( char *string, unsigned len, int makeit );
++extern Atom MakeAtom ( const char *string, unsigned len, int makeit );
+ extern int ValidAtom ( Atom atom );
+ extern char *NameForAtom (Atom atom);
+
+--
+cgit v0.9.0.2-2-gbebe
diff --git a/x11-fonts/libXfont/files/patch-src_fontfile_decompress.c b/x11-fonts/libXfont/files/patch-src_fontfile_decompress.c
new file mode 100644
index 0000000..fe04e06
--- /dev/null
+++ b/x11-fonts/libXfont/files/patch-src_fontfile_decompress.c
@@ -0,0 +1,99 @@
+From bd48ad11fd11412c62c3ac8ed5d52c4f10a985aa Mon Sep 17 00:00:00 2001
+From: Joerg Sonnenberger <joerg@britannica.bec.de>
+Date: Sun, 21 Aug 2011 16:51:53 +0000
+Subject: Do proper input validation to fix for CVE-2011-2895.
+
+It ensures that all valid input can be decompressed, checks that the
+overflow conditions doesn't happen and generally tightens the
+validation of the LZW stream and doesn't pessimize the inner loop for
+no good reason. It's derived from a change in libarchive from 2004.
+
+Signed-off-by: Matthieu Herrb <matthieu.herrb@laas.fr>
+Reviewed-by: Tomas Hoger <thoger@redhat.com>
+---
+--- src/fontfile/decompress.c.orig 2011-08-10 22:22:01.000000000 +0200
++++ src/fontfile/decompress.c 2012-03-02 11:59:57.000000000 +0100
+@@ -97,7 +97,7 @@
+ #define FIRST 257 /* first free entry */
+ #define CLEAR 256 /* table clear output code */
+
+-#define STACK_SIZE 8192
++#define STACK_SIZE 65300
+
+ typedef struct _compressedFILE {
+ BufFilePtr file;
+@@ -178,14 +178,12 @@
+ file->tab_suffix[code] = (char_type) code;
+ }
+ file->free_ent = ((file->block_compress) ? FIRST : 256 );
++ file->oldcode = -1;
+ file->clear_flg = 0;
+ file->offset = 0;
+ file->size = 0;
+ file->stackp = file->de_stack;
+ bzero(file->buf, BITS);
+- file->finchar = file->oldcode = getcode (file);
+- if (file->oldcode != -1)
+- *file->stackp++ = file->finchar;
+ return BufFileCreate ((char *) file,
+ BufCompressedFill,
+ 0,
+@@ -230,9 +228,6 @@
+ if (buf == bufend)
+ break;
+
+- if (oldcode == -1)
+- break;
+-
+ code = getcode (file);
+ if (code == -1)
+ break;
+@@ -241,26 +236,34 @@
+ for ( code = 255; code >= 0; code-- )
+ file->tab_prefix[code] = 0;
+ file->clear_flg = 1;
+- file->free_ent = FIRST - 1;
+- if ( (code = getcode (file)) == -1 ) /* O, untimely death! */
+- break;
++ file->free_ent = FIRST;
++ oldcode = -1;
++ continue;
+ }
+ incode = code;
+ /*
+ * Special case for KwKwK string.
+ */
+ if ( code >= file->free_ent ) {
++ if ( code > file->free_ent || oldcode == -1 ) {
++ /* Bad stream. */
++ return BUFFILEEOF;
++ }
+ *stackp++ = finchar;
+ code = oldcode;
+ }
++ /*
++ * The above condition ensures that code < free_ent.
++ * The construction of tab_prefeixof in turn guarantees that
++ * each iteration decreased code and therefore stack usage is
++ * bound by 1 << BITS - 256.
++ */
+
+ /*
+ * Generate output characters in reverse order
+ */
+ while ( code >= 256 )
+ {
+- if (stackp - de_stack >= STACK_SIZE - 1)
+- return BUFFILEEOF;
+ *stackp++ = file->tab_suffix[code];
+ code = file->tab_prefix[code];
+ }
+@@ -270,7 +273,7 @@
+ /*
+ * Generate the new entry.
+ */
+- if ( (code=file->free_ent) < file->maxmaxcode ) {
++ if ( (code=file->free_ent) < file->maxmaxcode && oldcode != -1) {
+ file->tab_prefix[code] = (unsigned short)oldcode;
+ file->tab_suffix[code] = finchar;
+ file->free_ent = code+1;
diff --git a/x11-fonts/libXfont/files/patch-src_util_atom.c b/x11-fonts/libXfont/files/patch-src_util_atom.c
new file mode 100644
index 0000000..c417479
--- /dev/null
+++ b/x11-fonts/libXfont/files/patch-src_util_atom.c
@@ -0,0 +1,30 @@
+From 3715cd752bac912a56aa1cbb9dd874624a709aab Mon Sep 17 00:00:00 2001
+From: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Sun, 02 Oct 2011 16:16:05 +0000
+Subject: Add const attributes to fix gcc -Wwrite-strings warnings
+
+Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
+---
+(limited to 'src/util/atom.c')
+
+--- src/util/atom.c.orig 2010-10-07 06:12:21.000000000 +0200
++++ src/util/atom.c 2012-03-02 12:09:16.000000000 +0100
+@@ -54,7 +54,7 @@
+ static Atom lastAtom;
+
+ static int
+-Hash(char *string, int len)
++Hash(const char *string, int len)
+ {
+ int h;
+
+@@ -147,7 +147,7 @@
+ #endif
+
+ weak Atom
+-MakeAtom(char *string, unsigned len, int makeit)
++MakeAtom(const char *string, unsigned len, int makeit)
+ {
+ AtomListPtr a;
+ int hash;
diff --git a/x11-fonts/libXfont/pkg-descr b/x11-fonts/libXfont/pkg-descr
new file mode 100644
index 0000000..8353c67
--- /dev/null
+++ b/x11-fonts/libXfont/pkg-descr
@@ -0,0 +1,3 @@
+This package contains the X font libary
+
+WWW: http://www.freedesktop.org/Software/xlibs
diff --git a/x11-fonts/libXfont/pkg-plist b/x11-fonts/libXfont/pkg-plist
new file mode 100644
index 0000000..213eebd
--- /dev/null
+++ b/x11-fonts/libXfont/pkg-plist
@@ -0,0 +1,21 @@
+include/X11/fonts/bdfint.h
+include/X11/fonts/bitmap.h
+include/X11/fonts/bufio.h
+include/X11/fonts/fntfil.h
+include/X11/fonts/fntfilio.h
+include/X11/fonts/fntfilst.h
+include/X11/fonts/fontconf.h
+include/X11/fonts/fontencc.h
+include/X11/fonts/fontmisc.h
+include/X11/fonts/fontshow.h
+include/X11/fonts/fontutil.h
+include/X11/fonts/fontxlfd.h
+include/X11/fonts/ft.h
+include/X11/fonts/ftfuncs.h
+include/X11/fonts/pcf.h
+lib/libXfont.a
+lib/libXfont.la
+lib/libXfont.so
+lib/libXfont.so.1
+libdata/pkgconfig/xfont.pc
+@dirrmtry include/X11/fonts
diff --git a/x11-fonts/xfs/Makefile b/x11-fonts/xfs/Makefile
new file mode 100644
index 0000000..39a84f2
--- /dev/null
+++ b/x11-fonts/xfs/Makefile
@@ -0,0 +1,40 @@
+# New ports collection makefile for: xfs
+# Date Created: 17 Feb 2006
+# Whom: Florent Thoumie <flz@FreeBSD.org>
+#
+# $FreeBSD: ports/x11-fonts/xfs/Makefile,v 1.21 2011/02/25 16:52:47 miwi Exp $
+#
+
+PORTNAME= xfs
+PORTVERSION= 1.1.2
+PORTEPOCH= 1
+CATEGORIES= x11-fonts
+
+MAINTAINER= x11@FreeBSD.org
+COMMENT= X.Org font server
+
+XORG_CAT= app
+USE_GMAKE= yes
+USE_XORG= libfs xfont xtrans
+USE_RC_SUBR= xfs
+CONFIGURE_ARGS= --without-xmlto
+#CONFIGURE_ENV+= ac_cv_path_XMLTO=""
+
+MAN1= xfs.1
+
+post-patch:
+ ${REINPLACE_CMD} '/^config_DATA/d' ${WRKSRC}/config/Makefile.in
+.if defined(WITHOUT_XFS_CACHE)
+ ${REINPLACE_CMD} -e 's|^cache|XCOMM &|' ${WRKSRC}/config.cpp
+.endif
+
+post-build:
+ @cd ${WRKSRC}/config/ && ${GMAKE} config
+
+post-install:
+ ${INSTALL_SCRIPT} ${WRKSRC}/config/config ${PREFIX}/etc/X11/fs/config.default
+ @if [ ! -f ${PREFIX}/etc/X11/fs/config ]; then \
+ ${INSTALL_SCRIPT} ${WRKSRC}/config/config ${PREFIX}/etc/X11/fs/config; \
+ fi
+
+.include <bsd.port.mk>
diff --git a/x11-fonts/xfs/distinfo b/x11-fonts/xfs/distinfo
new file mode 100644
index 0000000..9424af8
--- /dev/null
+++ b/x11-fonts/xfs/distinfo
@@ -0,0 +1,2 @@
+SHA256 (xorg/app/xfs-1.1.2.tar.bz2) = 0dea61cce3897b4d9d844bbd2c7850cd4e80e12c12b38158b4f92574b027e39d
+SIZE (xorg/app/xfs-1.1.2.tar.bz2) = 231065
diff --git a/x11-fonts/xfs/files/xfs.in b/x11-fonts/xfs/files/xfs.in
new file mode 100644
index 0000000..f326139
--- /dev/null
+++ b/x11-fonts/xfs/files/xfs.in
@@ -0,0 +1,37 @@
+#!/bin/sh
+#
+# $FreeBSD: ports/x11-fonts/xfs/files/xfs.in,v 1.6 2012/01/14 08:57:23 dougb Exp $
+#
+
+# PROVIDE: xfs
+# REQUIRE: cleartmp ldconfig
+# BEFORE: LOGIN
+
+# 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%%/etc/X11/fs/config" by default.
+# Configuration file for X font server.
+#
+# Please see xfs(1), rc.conf(5) and rc(8) for further details.
+
+. /etc/rc.subr
+
+name="xfs"
+rcvar=xfs_enable
+
+# Set defaults
+[ -z "$xfs_enable" ] && xfs_enable="NO"
+[ -z "$xfs_config" ] && xfs_config="%%PREFIX%%/etc/X11/fs/config"
+
+load_rc_config $name
+
+command="%%PREFIX%%/bin/${name}"
+command_args="-config ${xfs_config} -daemon ${xfs_user:+-user ${xfs_user}}"
+required_files="$xfs_config"
+extra_commands="reload"
+
+unset xfs_user
+
+run_rc_command "$1"
diff --git a/x11-fonts/xfs/pkg-descr b/x11-fonts/xfs/pkg-descr
new file mode 100644
index 0000000..81d8c54
--- /dev/null
+++ b/x11-fonts/xfs/pkg-descr
@@ -0,0 +1,3 @@
+This package contains the X.Org font server.
+
+WWW: http://www.x.org/
diff --git a/x11-fonts/xfs/pkg-install b/x11-fonts/xfs/pkg-install
new file mode 100644
index 0000000..2370260
--- /dev/null
+++ b/x11-fonts/xfs/pkg-install
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+if [ "$2" != "POST-INSTALL" ]; then
+ exit 0
+fi
+
+PKG_PREFIX=${PKG_PREFIX:=/usr/local}
+
+XINITCONFDIR=${PKG_PREFIX}/etc/X11/fs
+if [ ! -f ${XINITCONFDIR}/config ]; then
+ cp ${XINITCONFDIR}/config.default ${XINITCONFDIR}/config
+fi
diff --git a/x11-fonts/xfs/pkg-plist b/x11-fonts/xfs/pkg-plist
new file mode 100644
index 0000000..e2378ab
--- /dev/null
+++ b/x11-fonts/xfs/pkg-plist
@@ -0,0 +1,6 @@
+bin/xfs
+@unexec if cmp -s %D/etc/X11/fs/config.default %D/etc/X11/fs/config; then rm -f %D/etc/X11/fs/config; fi
+etc/X11/fs/config.default
+@exec if [ ! -f %D/etc/X11/fs/config ] ; then cp -p %D/%F %B/config; fi
+@dirrmtry etc/X11/fs
+@dirrmtry etc/X11