aboutsummaryrefslogtreecommitdiffstats
path: root/x11-fonts
diff options
context:
space:
mode:
authorijliao <ijliao@FreeBSD.org>2001-10-15 22:09:21 +0800
committerijliao <ijliao@FreeBSD.org>2001-10-15 22:09:21 +0800
commitafcb883b6ecb2e879135168acfef463a586e154c (patch)
tree2802c935f05a3c18ab3e6fbfffb6ba3b2e8119c2 /x11-fonts
parent32363ce84f6b4a46458f57b04edb5942ce6f8a4b (diff)
downloadfreebsd-ports-gnome-afcb883b6ecb2e879135168acfef463a586e154c.tar.gz
freebsd-ports-gnome-afcb883b6ecb2e879135168acfef463a586e154c.tar.zst
freebsd-ports-gnome-afcb883b6ecb2e879135168acfef463a586e154c.zip
add mkfontalias
Python script to make fonts.alias files for X PR: 30840 Submitted by: Stijn Hoop <stijn@win.tue.nl>
Diffstat (limited to 'x11-fonts')
-rw-r--r--x11-fonts/Makefile1
-rw-r--r--x11-fonts/mkfontalias/Makefile42
-rw-r--r--x11-fonts/mkfontalias/distinfo1
-rw-r--r--x11-fonts/mkfontalias/files/patch-aa41
-rw-r--r--x11-fonts/mkfontalias/pkg-comment1
-rw-r--r--x11-fonts/mkfontalias/pkg-descr4
-rw-r--r--x11-fonts/mkfontalias/pkg-plist1
7 files changed, 91 insertions, 0 deletions
diff --git a/x11-fonts/Makefile b/x11-fonts/Makefile
index a50906948efc..8e451438e440 100644
--- a/x11-fonts/Makefile
+++ b/x11-fonts/Makefile
@@ -16,6 +16,7 @@
SUBDIR += getbdf
SUBDIR += intlfonts
SUBDIR += jmk-x11-fonts
+ SUBDIR += mkfontalias
SUBDIR += mozilla-fonts
SUBDIR += nexfontsel
SUBDIR += nucleus
diff --git a/x11-fonts/mkfontalias/Makefile b/x11-fonts/mkfontalias/Makefile
new file mode 100644
index 000000000000..7bed7a474c4c
--- /dev/null
+++ b/x11-fonts/mkfontalias/Makefile
@@ -0,0 +1,42 @@
+# New ports collection makefile for: mkfontalias
+# Date created: 26 September 2001
+# Whom: Stijn Hoop <stijn@win.tue.nl>
+#
+# $FreeBSD$
+#
+
+PORTNAME= mkfontalias
+PORTVERSION= 0.3
+CATEGORIES= x11-fonts
+MASTER_SITES= http://home.c2i.net/dark/
+DISTNAME= mkfontalias.py
+EXTRACT_SUFX=
+
+MAINTAINER= stijn@win.tue.nl
+
+USE_PYTHON= yes
+USE_X_PREFIX= yes
+
+EXTRACT_CMD= ${CP}
+EXTRACT_BEFORE_ARGS=
+EXTRACT_AFTER_ARGS= ${WRKSRC}
+
+NO_WRKSUBDIR= yes
+NO_BUILD= yes
+
+.ifndef WITH_DPI
+DPI= 75
+.else
+DPI= ${WITH_DPI}
+.endif
+
+post-patch:
+ ${MV} ${WRKSRC}/mkfontalias.py ${WRKSRC}/mkfontalias.py.tmp
+ ${SED} -e "s,/usr/bin/python,${LOCALBASE}/bin/python," \
+ -e "s#'75', '75'#'${DPI}', '${DPI}'#" \
+ ${WRKSRC}/mkfontalias.py.tmp > ${WRKSRC}/mkfontalias.py
+
+do-install:
+ ${INSTALL_SCRIPT} ${WRKSRC}/mkfontalias.py ${PREFIX}/bin/mkfontalias
+
+.include <bsd.port.mk>
diff --git a/x11-fonts/mkfontalias/distinfo b/x11-fonts/mkfontalias/distinfo
new file mode 100644
index 000000000000..a8e88ac4b159
--- /dev/null
+++ b/x11-fonts/mkfontalias/distinfo
@@ -0,0 +1 @@
+MD5 (mkfontalias.py) = 1cfa6dfb2a71e1dbd5bfe3703eeb118c
diff --git a/x11-fonts/mkfontalias/files/patch-aa b/x11-fonts/mkfontalias/files/patch-aa
new file mode 100644
index 000000000000..8e595501020f
--- /dev/null
+++ b/x11-fonts/mkfontalias/files/patch-aa
@@ -0,0 +1,41 @@
+--- mkfontalias.py.orig Wed Sep 26 12:44:13 2001
++++ mkfontalias.py Wed Sep 26 12:45:50 2001
+@@ -71,22 +71,25 @@
+
+ map = _font_map.get ( name, None )
+
+- if map:
+- # Create a bunch of aliases, for each size
+- for size in _font_sizes:
+- # Do the 'cheating' - fallback to size if not in the cheat map
+- real_size = _cheat_map.get ( size, size )
++ if not map:
++ sys.stderr.write( "Warning: unknown font with name '%s'\n" % name )
++ map = name
+
+- name = string.join ( entries[:7] + [ str(real_size),
+- str(real_size * 10) ] +
+- entries[9:], '-' )
++ # Create a bunch of aliases, for each size
++ for size in _font_sizes:
++ # Do the 'cheating' - fallback to size if not in the cheat map
++ real_size = _cheat_map.get ( size, size )
+
+- alias = string.join ( entries[:2] + [map] + entries[3:7] +
+- [ str(size), str(size * 10) ] +
+- _res + entries[11:], '-' )
++ name = string.join ( entries[:7] + [ str(real_size),
++ str(real_size * 10) ] +
++ entries[9:], '-' )
+
+- # Add the entry to the aliases
+- _aliases.append ( '"%s" "%s"' % (alias, name) )
++ alias = string.join ( entries[:2] + [map] + entries[3:7] +
++ [ str(size), str(size * 10) ] +
++ _res + entries[11:], '-' )
++
++ # Add the entry to the aliases
++ _aliases.append ( '"%s" "%s"' % (alias, name) )
+
+ # Boast
+ print 'Created %s aliases' % len(_aliases)
diff --git a/x11-fonts/mkfontalias/pkg-comment b/x11-fonts/mkfontalias/pkg-comment
new file mode 100644
index 000000000000..31a7ad176662
--- /dev/null
+++ b/x11-fonts/mkfontalias/pkg-comment
@@ -0,0 +1 @@
+Python script to make fonts.alias files for X
diff --git a/x11-fonts/mkfontalias/pkg-descr b/x11-fonts/mkfontalias/pkg-descr
new file mode 100644
index 000000000000..1852b60ca68b
--- /dev/null
+++ b/x11-fonts/mkfontalias/pkg-descr
@@ -0,0 +1,4 @@
+A Python script that generates a fonts.alias file for use with TrueType
+fonts in X.
+
+WWW: http://home.c2i.net/dark/linux.html#fuzzy
diff --git a/x11-fonts/mkfontalias/pkg-plist b/x11-fonts/mkfontalias/pkg-plist
new file mode 100644
index 000000000000..1794eb36a087
--- /dev/null
+++ b/x11-fonts/mkfontalias/pkg-plist
@@ -0,0 +1 @@
+bin/mkfontalias