summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAli Polatel <hawking@gentoo.org>2007-07-18 23:07:06 +0000
committerAli Polatel <hawking@gentoo.org>2007-07-18 23:07:06 +0000
commiteb66a4ad419e249fe5b020eee88dcb0d22e23b59 (patch)
tree0155d11cbbd80efb1f0105f824704bb4dd845689 /dev-python/fonttools
parentQA EXECSTACK handling (diff)
downloadgentoo-2-eb66a4ad419e249fe5b020eee88dcb0d22e23b59.tar.gz
gentoo-2-eb66a4ad419e249fe5b020eee88dcb0d22e23b59.tar.bz2
gentoo-2-eb66a4ad419e249fe5b020eee88dcb0d22e23b59.zip
revbump, adapted to use numpy.oldnumeric instead of numeric
(Portage version: 2.1.3_rc8)
Diffstat (limited to 'dev-python/fonttools')
-rw-r--r--dev-python/fonttools/ChangeLog9
-rw-r--r--dev-python/fonttools/files/digest-fonttools-2.0_beta1-r13
-rw-r--r--dev-python/fonttools/files/fonttools-2.0_beta1-numpy.patch272
-rw-r--r--dev-python/fonttools/fonttools-2.0_beta1-r1.ebuild40
4 files changed, 323 insertions, 1 deletions
diff --git a/dev-python/fonttools/ChangeLog b/dev-python/fonttools/ChangeLog
index c965bda1c0fa..2b1ce1a23958 100644
--- a/dev-python/fonttools/ChangeLog
+++ b/dev-python/fonttools/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for dev-python/fonttools
# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/fonttools/ChangeLog,v 1.8 2007/04/07 04:22:25 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-python/fonttools/ChangeLog,v 1.9 2007/07/18 23:07:06 hawking Exp $
+
+*fonttools-2.0_beta1-r1 (18 Jul 2007)
+
+ 18 Jul 2007; Ali Polatel <hawking@gentoo.org>
+ +files/fonttools-2.0_beta1-numpy.patch, +fonttools-2.0_beta1-r1.ebuild:
+ revbump, adapted to use numpy.oldnumeric instead of numeric, changed numeric
+ to numpy in DEPEND
07 Apr 2007; Mike Frysinger <vapier@gentoo.org>
fonttools-2.0_beta1.ebuild:
diff --git a/dev-python/fonttools/files/digest-fonttools-2.0_beta1-r1 b/dev-python/fonttools/files/digest-fonttools-2.0_beta1-r1
new file mode 100644
index 000000000000..b2662e678e6a
--- /dev/null
+++ b/dev-python/fonttools/files/digest-fonttools-2.0_beta1-r1
@@ -0,0 +1,3 @@
+MD5 f9eb9fcb994af6537e10692f14c2778c fonttools-2.0b1.tgz 226164
+RMD160 8634f66b3a643edad9eba4a7da130def3d3cce4b fonttools-2.0b1.tgz 226164
+SHA256 b9b84949fe5f22b207bb22a28cde3052a96a51b8021488aeb18e43bc1b2e84f2 fonttools-2.0b1.tgz 226164
diff --git a/dev-python/fonttools/files/fonttools-2.0_beta1-numpy.patch b/dev-python/fonttools/files/fonttools-2.0_beta1-numpy.patch
new file mode 100644
index 000000000000..5956f9476e09
--- /dev/null
+++ b/dev-python/fonttools/files/fonttools-2.0_beta1-numpy.patch
@@ -0,0 +1,272 @@
+diff -ur fonttools/Lib/fontTools/cffLib.py fonttools_numpy/Lib/fontTools/cffLib.py
+--- fonttools/Lib/fontTools/cffLib.py 2002-09-10 22:43:07.000000000 +0300
++++ fonttools_numpy/Lib/fontTools/cffLib.py 2007-07-19 01:06:17.000000000 +0300
+@@ -1,3 +1,5 @@
++## Automatically adapted for numpy.oldnumeric Jul 19, 2007 by hawking
++
+ """cffLib.py -- read/write tools for Adobe CFF fonts."""
+
+ #
+@@ -1005,7 +1007,7 @@
+
+
+ def encodeNumber(num):
+- if type(num) == FloatType:
++ if isinstance(num, FloatType):
+ return psCharStrings.encodeFloat(num)
+ else:
+ return psCharStrings.encodeIntCFF(num)
+diff -ur fonttools/Lib/fontTools/misc/arrayTools.py fonttools_numpy/Lib/fontTools/misc/arrayTools.py
+--- fonttools/Lib/fontTools/misc/arrayTools.py 2000-01-26 21:32:45.000000000 +0200
++++ fonttools_numpy/Lib/fontTools/misc/arrayTools.py 2007-07-19 01:06:17.000000000 +0300
+@@ -1,8 +1,10 @@
++## Automatically adapted for numpy.oldnumeric Jul 19, 2007 by hawking
++
+ #
+ # Various array and rectangle tools
+ #
+
+-import Numeric
++import numpy.oldnumeric as Numeric
+
+
+ def calcBounds(array):
+diff -ur fonttools/Lib/fontTools/misc/psCharStrings.py fonttools_numpy/Lib/fontTools/misc/psCharStrings.py
+--- fonttools/Lib/fontTools/misc/psCharStrings.py 2002-09-10 22:43:12.000000000 +0300
++++ fonttools_numpy/Lib/fontTools/misc/psCharStrings.py 2007-07-19 01:06:17.000000000 +0300
+@@ -1,3 +1,5 @@
++## Automatically adapted for numpy.oldnumeric Jul 19, 2007 by hawking
++
+ """psCharStrings.py -- module implementing various kinds of CharStrings:
+ CFF dictionary data and Type1/Type2 CharStrings.
+ """
+@@ -526,7 +528,7 @@
+ self.defaultWidthX = defaultWidthX
+
+ def reset(self):
+- import Numeric
++ import numpy.oldnumeric as Numeric
+ SimpleT2Decompiler.reset(self)
+ self.hints = []
+ self.gotWidth = 0
+@@ -545,7 +547,7 @@
+ self.contours[-1][2] = 1
+
+ def appendPoint(self, point, isPrimary):
+- import Numeric
++ import numpy.oldnumeric as Numeric
+ point = self.currentPoint + Numeric.array(point, Numeric.Int16)
+ if not self.contours or self.contours[-1][2]:
+ # The subpath doesn't start with a moveto. Not sure whether
+diff -ur fonttools/Lib/fontTools/nfntLib.py fonttools_numpy/Lib/fontTools/nfntLib.py
+--- fonttools/Lib/fontTools/nfntLib.py 2001-03-09 14:42:25.000000000 +0200
++++ fonttools_numpy/Lib/fontTools/nfntLib.py 2007-07-19 01:06:17.000000000 +0300
+@@ -1,3 +1,5 @@
++## Automatically adapted for numpy.oldnumeric Jul 19, 2007 by hawking
++
+ import struct, sstruct
+ import string
+ import types
+@@ -77,7 +79,7 @@
+ return header + self.bits + locTable + owTable
+
+ def unpackGlyphs(self):
+- import Numeric
++ import numpy.oldnumeric as Numeric
+ nGlyphs = len(self.locTable) - 1
+ self.glyphs = [None] * nGlyphs
+
+@@ -108,7 +110,7 @@
+ self.glyphs[i] = glyph = Glyph(width, offset, bitImage[imageL:imageR])
+
+ def packGlyphs(self):
+- import Numeric
++ import numpy.oldnumeric as Numeric
+ imageWidth = 0
+ kernMax = 0
+ imageHeight = None
+@@ -260,7 +262,7 @@
+ class Glyph:
+
+ def __init__(self, width, offset, pixels=None, pixelDepth=1):
+- import Numeric
++ import numpy.oldnumeric as Numeric
+ self.width = width
+ self.offset = offset
+ self.pixelDepth = pixelDepth
+@@ -279,7 +281,7 @@
+ if not nameOrID:
+ # just take the first in the file
+ res = Res.Get1IndResource(resType, 1)
+- elif type(nameOrID) == types.IntType:
++ elif isinstance(nameOrID, types.IntType):
+ res = Res.Get1Resource(resType, nameOrID)
+ else:
+ res = Res.Get1NamedResource(resType, nameOrID)
+diff -ur fonttools/Lib/fontTools/ttLib/sfnt.py fonttools_numpy/Lib/fontTools/ttLib/sfnt.py
+--- fonttools/Lib/fontTools/ttLib/sfnt.py 2002-09-10 22:43:18.000000000 +0300
++++ fonttools_numpy/Lib/fontTools/ttLib/sfnt.py 2007-07-19 01:06:17.000000000 +0300
+@@ -1,3 +1,5 @@
++## Automatically adapted for numpy.oldnumeric Jul 19, 2007 by hawking
++
+ """ttLib/sfnt.py -- low-level module to deal with the sfnt file format.
+
+ Defines two public classes:
+@@ -13,7 +15,7 @@
+ """
+
+ import struct, sstruct
+-import Numeric
++import numpy.oldnumeric as Numeric
+ import os
+
+
+@@ -213,7 +215,7 @@
+ data = data + '\0' * (4-remainder)
+ a = Numeric.fromstring(struct.pack(">l", start) + data, Numeric.Int32)
+ if ttLib.endian <> "big":
+- a = a.byteswapped()
++ a = a.byteswap()
+ return Numeric.add.reduce(a)
+
+
+diff -ur fonttools/Lib/fontTools/ttLib/tables/_g_l_y_f.py fonttools_numpy/Lib/fontTools/ttLib/tables/_g_l_y_f.py
+--- fonttools/Lib/fontTools/ttLib/tables/_g_l_y_f.py 2002-09-10 22:43:24.000000000 +0300
++++ fonttools_numpy/Lib/fontTools/ttLib/tables/_g_l_y_f.py 2007-07-19 01:06:18.000000000 +0300
+@@ -1,3 +1,5 @@
++## Automatically adapted for numpy.oldnumeric Jul 19, 2007 by hawking
++
+ """_g_l_y_f.py -- Converter classes for the 'glyf' table."""
+
+
+@@ -20,7 +22,7 @@
+ from fontTools.misc.textTools import safeEval, readHex
+ import ttProgram
+ import array
+-import Numeric
++import numpy.oldnumeric as Numeric
+ from types import StringType, TupleType
+
+
+@@ -468,7 +470,7 @@
+ nCoordinates = len(self.coordinates)
+
+ # make a copy
+- coordinates = self.coordinates.astype(self.coordinates.typecode())
++ coordinates = self.coordinates.astype(self.coordinates.dtype.char)
+ # absolute to relative coordinates
+ coordinates[1:] = Numeric.subtract(coordinates[1:], coordinates[:-1])
+ flags = self.flags
+diff -ur fonttools/Lib/fontTools/ttLib/tables/_h_m_t_x.py fonttools_numpy/Lib/fontTools/ttLib/tables/_h_m_t_x.py
+--- fonttools/Lib/fontTools/ttLib/tables/_h_m_t_x.py 2002-09-10 22:43:25.000000000 +0300
++++ fonttools_numpy/Lib/fontTools/ttLib/tables/_h_m_t_x.py 2007-07-19 01:06:18.000000000 +0300
+@@ -1,5 +1,7 @@
++## Automatically adapted for numpy.oldnumeric Jul 19, 2007 by hawking
++
+ import DefaultTable
+-import Numeric
++import numpy.oldnumeric as Numeric
+ from fontTools import ttLib
+ from fontTools.misc.textTools import safeEval
+
+@@ -16,7 +18,7 @@
+ metrics = Numeric.fromstring(data[:4 * numberOfMetrics],
+ Numeric.Int16)
+ if ttLib.endian <> "big":
+- metrics = metrics.byteswapped()
++ metrics = metrics.byteswap()
+ metrics.shape = (numberOfMetrics, 2)
+ data = data[4 * numberOfMetrics:]
+ numberOfSideBearings = ttFont['maxp'].numGlyphs - numberOfMetrics
+@@ -29,7 +31,7 @@
+ sideBearings = Numeric.fromstring(data[:2 * numberOfSideBearings],
+ Numeric.Int16)
+ if ttLib.endian <> "big":
+- sideBearings = sideBearings.byteswapped()
++ sideBearings = sideBearings.byteswap()
+ data = data[2 * numberOfSideBearings:]
+ additionalMetrics = Numeric.array([advances, sideBearings],
+ Numeric.Int16)
+@@ -63,12 +65,12 @@
+
+ metrics = Numeric.array(metrics, Numeric.Int16)
+ if ttLib.endian <> "big":
+- metrics = metrics.byteswapped()
++ metrics = metrics.byteswap()
+ data = metrics.tostring()
+
+ additionalMetrics = Numeric.array(additionalMetrics, Numeric.Int16)
+ if ttLib.endian <> "big":
+- additionalMetrics = additionalMetrics.byteswapped()
++ additionalMetrics = additionalMetrics.byteswap()
+ data = data + additionalMetrics.tostring()
+ return data
+
+diff -ur fonttools/Lib/fontTools/ttLib/tables/_l_o_c_a.py fonttools_numpy/Lib/fontTools/ttLib/tables/_l_o_c_a.py
+--- fonttools/Lib/fontTools/ttLib/tables/_l_o_c_a.py 2000-11-03 12:29:08.000000000 +0200
++++ fonttools_numpy/Lib/fontTools/ttLib/tables/_l_o_c_a.py 2007-07-19 01:06:18.000000000 +0300
+@@ -1,6 +1,8 @@
++## Automatically adapted for numpy.oldnumeric Jul 19, 2007 by hawking
++
+ import DefaultTable
+ import array
+-import Numeric
++import numpy.oldnumeric as Numeric
+ from fontTools import ttLib
+ import struct
+
+@@ -34,7 +36,7 @@
+ else:
+ ttFont['head'].indexToLocFormat = 1
+ if ttLib.endian <> "big":
+- locations = locations.byteswapped()
++ locations = locations.byteswap()
+ return locations.tostring()
+
+ def set(self, locations):
+diff -ur fonttools/Lib/fontTools/ttLib/tables/_v_m_t_x.py fonttools_numpy/Lib/fontTools/ttLib/tables/_v_m_t_x.py
+--- fonttools/Lib/fontTools/ttLib/tables/_v_m_t_x.py 1999-12-16 23:34:53.000000000 +0200
++++ fonttools_numpy/Lib/fontTools/ttLib/tables/_v_m_t_x.py 2007-07-19 01:06:18.000000000 +0300
+@@ -1,5 +1,7 @@
++## Automatically adapted for numpy.oldnumeric Jul 19, 2007 by hawking
++
+ import DefaultTable
+-import Numeric
++import numpy.oldnumeric as Numeric
+ from fontTools import ttLib
+ from fontTools.misc.textTools import safeEval
+
+diff -ur fonttools/Lib/fontTools/ttLib/test/ttBrowser.py fonttools_numpy/Lib/fontTools/ttLib/test/ttBrowser.py
+--- fonttools/Lib/fontTools/ttLib/test/ttBrowser.py 2000-03-15 01:21:26.000000000 +0200
++++ fonttools_numpy/Lib/fontTools/ttLib/test/ttBrowser.py 2007-07-19 01:06:18.000000000 +0300
+@@ -1,3 +1,5 @@
++## Automatically adapted for numpy.oldnumeric Jul 19, 2007 by hawking
++
+ """Mac-only TrueType browser window."""
+
+ from fontTools import ttLib
+@@ -7,7 +9,7 @@
+ import W, Lists
+ import os
+ import ATM
+-import Numeric
++import numpy.oldnumeric as Numeric
+ import Qd
+ from rf.views.wGlyphList import GlyphList
+
+diff -ur fonttools/setup.py fonttools_numpy/setup.py
+--- fonttools/setup.py 2002-09-10 22:43:05.000000000 +0300
++++ fonttools_numpy/setup.py 2007-07-19 01:07:59.000000000 +0300
+@@ -11,10 +11,9 @@
+ pass
+
+ try:
+- import Numeric
++ import numpy.oldnumeric as Numeric
+ except ImportError:
+- print "*** Warning: FontTools needs Numerical Python (NumPy), see:"
+- print " http://sourceforge.net/projects/numpy/"
++ print "*** Warning: FontTools needs numpy.oldnumeric module."
+
+ try:
+ import xml.parsers.expat
diff --git a/dev-python/fonttools/fonttools-2.0_beta1-r1.ebuild b/dev-python/fonttools/fonttools-2.0_beta1-r1.ebuild
new file mode 100644
index 000000000000..eaa45de80e51
--- /dev/null
+++ b/dev-python/fonttools/fonttools-2.0_beta1-r1.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-python/fonttools/fonttools-2.0_beta1-r1.ebuild,v 1.1 2007/07/18 23:07:06 hawking Exp $
+
+inherit distutils eutils
+
+MY_P=${P/_beta/b}
+DESCRIPTION="Library for manipulating TrueType, OpenType, AFM and Type1 fonts"
+HOMEPAGE="http://fonttools.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tgz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~ia64 ~ppc ~x86"
+IUSE=""
+
+DEPEND="virtual/python
+ >=dev-python/numpy-1.0.2
+ dev-python/pyxml"
+
+S=${WORKDIR}/${PN}
+
+DOCS="README.txt Doc/*.txt"
+
+src_unpack() {
+ distutils_src_unpack
+
+ epatch "${FILESDIR}/${P}-numpy.patch"
+}
+
+src_install() {
+ distutils_src_install
+ dohtml Doc/*.html
+}
+
+pkg_postinst() {
+ ewarn "This version has been automatically adapted to use numpy.oldnumeric"
+ ewarn "instead of the old numeric module. If this causes any unforeseen"
+ ewarn "problems please file a bug on http://bugs.gentoo.org."
+}