diff --git a/349cd94d171cf4e1e7541884df0d12bb6d4e841a.patch b/349cd94d171cf4e1e7541884df0d12bb6d4e841a.patch deleted file mode 100644 index 6d74654..0000000 --- a/349cd94d171cf4e1e7541884df0d12bb6d4e841a.patch +++ /dev/null @@ -1,484 +0,0 @@ -From 349cd94d171cf4e1e7541884df0d12bb6d4e841a Mon Sep 17 00:00:00 2001 -From: Behdad Esfahbod -Date: Wed, 5 Sep 2018 21:11:36 -0700 -Subject: [PATCH] [graphite] Fix for big-endian - -Make all "if sys.byteorder..." and "byteswap" be on the same line for -earsier grep verification. - -Fixes https://github.com/fonttools/fonttools/issues/1311 ---- - Lib/fontTools/ttLib/tables/C_P_A_L_.py | 6 ++---- - Lib/fontTools/ttLib/tables/G_P_K_G_.py | 12 ++++------- - Lib/fontTools/ttLib/tables/G__l_o_c.py | 12 +++++------ - Lib/fontTools/ttLib/tables/S__i_l_f.py | 6 +++--- - Lib/fontTools/ttLib/tables/T_S_I__5.py | 6 ++---- - Lib/fontTools/ttLib/tables/TupleVariation.py | 6 ++---- - Lib/fontTools/ttLib/tables/_c_m_a_p.py | 22 +++++++------------- - Lib/fontTools/ttLib/tables/_c_v_t.py | 6 ++---- - Lib/fontTools/ttLib/tables/_g_l_y_f.py | 6 ++---- - Lib/fontTools/ttLib/tables/_g_v_a_r.py | 6 ++---- - Lib/fontTools/ttLib/tables/_h_m_t_x.py | 6 ++---- - Lib/fontTools/ttLib/tables/_k_e_r_n.py | 3 +-- - Lib/fontTools/ttLib/tables/_l_o_c_a.py | 6 ++---- - Lib/fontTools/ttLib/tables/_p_o_s_t.py | 12 ++++------- - Lib/fontTools/ttLib/tables/otBase.py | 3 +-- - Lib/fontTools/ttLib/woff2.py | 6 ++---- - 16 files changed, 45 insertions(+), 79 deletions(-) - -diff --git a/Lib/fontTools/ttLib/tables/C_P_A_L_.py b/Lib/fontTools/ttLib/tables/C_P_A_L_.py -index 25d50a5ef..c687c7a1e 100644 ---- a/Lib/fontTools/ttLib/tables/C_P_A_L_.py -+++ b/Lib/fontTools/ttLib/tables/C_P_A_L_.py -@@ -56,8 +56,7 @@ def _decompileUInt16Array(self, data, offset, numElements): - if offset == 0: - return [0] * numElements - result = array.array("H", data[offset : offset + 2 * numElements]) -- if sys.byteorder != "big": -- result.byteswap() -+ if sys.byteorder != "big": result.byteswap() - assert len(result) == numElements, result - return result.tolist() - -@@ -65,8 +64,7 @@ def _decompileUInt32Array(self, data, offset, numElements): - if offset == 0: - return [0] * numElements - result = array.array("I", data[offset : offset + 4 * numElements]) -- if sys.byteorder != "big": -- result.byteswap() -+ if sys.byteorder != "big": result.byteswap() - assert len(result) == numElements, result - return result.tolist() - -diff --git a/Lib/fontTools/ttLib/tables/G_P_K_G_.py b/Lib/fontTools/ttLib/tables/G_P_K_G_.py -index 4e13830b0..b835f4af7 100644 ---- a/Lib/fontTools/ttLib/tables/G_P_K_G_.py -+++ b/Lib/fontTools/ttLib/tables/G_P_K_G_.py -@@ -25,8 +25,7 @@ def decompile(self, data, ttFont): - GMAPoffsets = array.array("I") - endPos = (self.numGMAPs+1) * 4 - GMAPoffsets.fromstring(newData[:endPos]) -- if sys.byteorder != "big": -- GMAPoffsets.byteswap() -+ if sys.byteorder != "big": GMAPoffsets.byteswap() - self.GMAPs = [] - for i in range(self.numGMAPs): - start = GMAPoffsets[i] -@@ -36,8 +35,7 @@ def decompile(self, data, ttFont): - endPos = pos + (self.numGlyplets + 1)*4 - glyphletOffsets = array.array("I") - glyphletOffsets.fromstring(newData[pos:endPos]) -- if sys.byteorder != "big": -- glyphletOffsets.byteswap() -+ if sys.byteorder != "big": glyphletOffsets.byteswap() - self.glyphlets = [] - for i in range(self.numGlyplets): - start = glyphletOffsets[i] -@@ -58,8 +56,7 @@ def compile(self, ttFont): - pos += len(self.GMAPs[i-1]) - GMAPoffsets[i] = pos - gmapArray = array.array("I", GMAPoffsets) -- if sys.byteorder != "big": -- gmapArray.byteswap() -+ if sys.byteorder != "big": gmapArray.byteswap() - dataList.append(gmapArray.tostring()) - - glyphletOffsets[0] = pos -@@ -67,8 +64,7 @@ def compile(self, ttFont): - pos += len(self.glyphlets[i-1]) - glyphletOffsets[i] = pos - glyphletArray = array.array("I", glyphletOffsets) -- if sys.byteorder != "big": -- glyphletArray.byteswap() -+ if sys.byteorder != "big": glyphletArray.byteswap() - dataList.append(glyphletArray.tostring()) - dataList += self.GMAPs - dataList += self.glyphlets -diff --git a/Lib/fontTools/ttLib/tables/G__l_o_c.py b/Lib/fontTools/ttLib/tables/G__l_o_c.py -index d77c4837a..c388883b0 100644 ---- a/Lib/fontTools/ttLib/tables/G__l_o_c.py -+++ b/Lib/fontTools/ttLib/tables/G__l_o_c.py -@@ -30,23 +30,23 @@ def decompile(self, data, ttFont): - del self.flags - self.locations = array.array('I' if flags & 1 else 'H') - self.locations.fromstring(data[:len(data) - self.numAttribs * (flags & 2)]) -- self.locations.byteswap() -+ if sys.byteorder != "big": self.locations.byteswap() - self.attribIds = array.array('H') - if flags & 2: - self.attribIds.fromstring(data[-self.numAttribs * 2:]) -- self.attribIds.byteswap() -+ if sys.byteorder != "big": self.attribIds.byteswap() - - def compile(self, ttFont): - data = sstruct.pack(Gloc_header, dict(version=1.0, - flags=(bool(self.attribIds) << 1) + (self.locations.typecode == 'I'), - numAttribs=self.numAttribs)) -- self.locations.byteswap() -+ if sys.byteorder != "big": self.locations.byteswap() - data += self.locations.tostring() -- self.locations.byteswap() -+ if sys.byteorder != "big": self.locations.byteswap() - if self.attribIds: -- self.attribIds.byteswap() -+ if sys.byteorder != "big": self.attribIds.byteswap() - data += self.attribIds.tostring() -- self.attribIds.byteswap() -+ if sys.byteorder != "big": self.attribIds.byteswap() - return data - - def set(self, locations): -diff --git a/Lib/fontTools/ttLib/tables/S__i_l_f.py b/Lib/fontTools/ttLib/tables/S__i_l_f.py -index 2afd71eaa..44dd69b0d 100644 ---- a/Lib/fontTools/ttLib/tables/S__i_l_f.py -+++ b/Lib/fontTools/ttLib/tables/S__i_l_f.py -@@ -717,7 +717,7 @@ def decompile(self, data, ttFont, version=2.0): - data = data[2 * self.numRules + 2:] - for i in range(self.numTransitional): - a = array("H", data[i*self.numColumns*2:(i+1)*self.numColumns*2]) -- a.byteswap() -+ if sys.byteorder != "big": a.byteswap() - self.stateTrans.append(a) - data = data[self.numTransitional * self.numColumns * 2 + 1:] - self.passConstraints = data[:pConstraint] -@@ -738,9 +738,9 @@ def compile(self, ttFont, base, version=2.0): - constraintCode = "\000" + "".join(self.ruleConstraints) - transes = [] - for t in self.stateTrans: -- t.byteswap() -+ if sys.byteorder != "big": t.byteswap() - transes.append(t.tostring()) -- t.byteswap() -+ if sys.byteorder != "big": t.byteswap() - if not len(transes): - self.startStates = [0] - oRuleMap = reduce(lambda a, x: (a[0]+len(x), a[1]+[a[0]]), self.rules+[[]], (0, []))[1] -diff --git a/Lib/fontTools/ttLib/tables/T_S_I__5.py b/Lib/fontTools/ttLib/tables/T_S_I__5.py -index dbf9e5a2c..61b76044c 100644 ---- a/Lib/fontTools/ttLib/tables/T_S_I__5.py -+++ b/Lib/fontTools/ttLib/tables/T_S_I__5.py -@@ -18,8 +18,7 @@ def decompile(self, data, ttFont): - assert len(data) == 2 * numGlyphs - a = array.array("H") - a.fromstring(data) -- if sys.byteorder != "big": -- a.byteswap() -+ if sys.byteorder != "big": a.byteswap() - self.glyphGrouping = {} - for i in range(numGlyphs): - self.glyphGrouping[ttFont.getGlyphName(i)] = a[i] -@@ -29,8 +28,7 @@ def compile(self, ttFont): - a = array.array("H") - for i in range(len(glyphNames)): - a.append(self.glyphGrouping.get(glyphNames[i], 0)) -- if sys.byteorder != "big": -- a.byteswap() -+ if sys.byteorder != "big": a.byteswap() - return a.tostring() - - def toXML(self, writer, ttFont): -diff --git a/Lib/fontTools/ttLib/tables/TupleVariation.py b/Lib/fontTools/ttLib/tables/TupleVariation.py -index 5fa71c844..92d07a11b 100644 ---- a/Lib/fontTools/ttLib/tables/TupleVariation.py -+++ b/Lib/fontTools/ttLib/tables/TupleVariation.py -@@ -267,8 +267,7 @@ def decompilePoints_(numPoints, data, offset, tableTag): - points = array.array("B") - pointsSize = numPointsInRun - points.fromstring(data[pos:pos+pointsSize]) -- if sys.byteorder != "big": -- points.byteswap() -+ if sys.byteorder != "big": points.byteswap() - - assert len(points) == numPointsInRun - pos += pointsSize -@@ -425,8 +424,7 @@ def decompileDeltas_(numDeltas, data, offset): - deltas = array.array("b") - deltasSize = numDeltasInRun - deltas.fromstring(data[pos:pos+deltasSize]) -- if sys.byteorder != "big": -- deltas.byteswap() -+ if sys.byteorder != "big": deltas.byteswap() - assert len(deltas) == numDeltasInRun - pos += deltasSize - result.extend(deltas) -diff --git a/Lib/fontTools/ttLib/tables/_c_m_a_p.py b/Lib/fontTools/ttLib/tables/_c_m_a_p.py -index eccf69e00..5bc9354f2 100644 ---- a/Lib/fontTools/ttLib/tables/_c_m_a_p.py -+++ b/Lib/fontTools/ttLib/tables/_c_m_a_p.py -@@ -340,8 +340,7 @@ def decompile(self, data, ttFont): - allKeys = array.array("H") - allKeys.fromstring(data[:512]) - data = data[512:] -- if sys.byteorder != "big": -- allKeys.byteswap() -+ if sys.byteorder != "big": allKeys.byteswap() - subHeaderKeys = [ key//8 for key in allKeys] - maxSubHeaderindex = max(subHeaderKeys) - -@@ -356,8 +355,7 @@ def decompile(self, data, ttFont): - giDataPos = pos + subHeader.idRangeOffset-2 - giList = array.array("H") - giList.fromstring(data[giDataPos:giDataPos + subHeader.entryCount*2]) -- if sys.byteorder != "big": -- giList.byteswap() -+ if sys.byteorder != "big": giList.byteswap() - subHeader.glyphIndexArray = giList - subHeaderList.append(subHeader) - # How this gets processed. -@@ -702,8 +700,7 @@ def decompile(self, data, ttFont): - allCodes.fromstring(data) - self.data = data = None - -- if sys.byteorder != "big": -- allCodes.byteswap() -+ if sys.byteorder != "big": allCodes.byteswap() - - # divide the data - endCode = allCodes[:segCount] -@@ -829,10 +826,9 @@ def compile(self, ttFont): - charCodeArray = array.array("H", endCode + [0] + startCode) - idDeltaArray = array.array("H", idDelta) - restArray = array.array("H", idRangeOffset + glyphIndexArray) -- if sys.byteorder != "big": -- charCodeArray.byteswap() -- idDeltaArray.byteswap() -- restArray.byteswap() -+ if sys.byteorder != "big": charCodeArray.byteswap() -+ if sys.byteorder != "big": idDeltaArray.byteswap() -+ if sys.byteorder != "big": restArray.byteswap() - data = charCodeArray.tostring() + idDeltaArray.tostring() + restArray.tostring() - - length = struct.calcsize(cmap_format_4_format) + len(data) -@@ -872,8 +868,7 @@ def decompile(self, data, ttFont): - #assert len(data) == 2 * entryCount # XXX not true in Apple's Helvetica!!! - gids = array.array("H") - gids.fromstring(data[:2 * int(entryCount)]) -- if sys.byteorder != "big": -- gids.byteswap() -+ if sys.byteorder != "big": gids.byteswap() - self.data = data = None - - charCodes = list(range(firstCode, firstCode + len(gids))) -@@ -892,8 +887,7 @@ def compile(self, ttFont): - for code in codes - ] - gids = array.array("H", valueList) -- if sys.byteorder != "big": -- gids.byteswap() -+ if sys.byteorder != "big": gids.byteswap() - data = gids.tostring() - else: - data = b"" -diff --git a/Lib/fontTools/ttLib/tables/_c_v_t.py b/Lib/fontTools/ttLib/tables/_c_v_t.py -index 4fbee7bfc..21df0bad8 100644 ---- a/Lib/fontTools/ttLib/tables/_c_v_t.py -+++ b/Lib/fontTools/ttLib/tables/_c_v_t.py -@@ -10,14 +10,12 @@ class table__c_v_t(DefaultTable.DefaultTable): - def decompile(self, data, ttFont): - values = array.array("h") - values.fromstring(data) -- if sys.byteorder != "big": -- values.byteswap() -+ if sys.byteorder != "big": values.byteswap() - self.values = values - - def compile(self, ttFont): - values = self.values[:] -- if sys.byteorder != "big": -- values.byteswap() -+ if sys.byteorder != "big": values.byteswap() - return values.tostring() - - def toXML(self, writer, ttFont): -diff --git a/Lib/fontTools/ttLib/tables/_g_l_y_f.py b/Lib/fontTools/ttLib/tables/_g_l_y_f.py -index 58c1eb2ce..c1118c911 100644 ---- a/Lib/fontTools/ttLib/tables/_g_l_y_f.py -+++ b/Lib/fontTools/ttLib/tables/_g_l_y_f.py -@@ -512,8 +512,7 @@ def decompileComponents(self, data, glyfTable): - def decompileCoordinates(self, data): - endPtsOfContours = array.array("h") - endPtsOfContours.fromstring(data[:2*self.numberOfContours]) -- if sys.byteorder != "big": -- endPtsOfContours.byteswap() -+ if sys.byteorder != "big": endPtsOfContours.byteswap() - self.endPtsOfContours = endPtsOfContours.tolist() - - data = data[2*self.numberOfContours:] -@@ -625,8 +624,7 @@ def compileCoordinates(self): - assert len(self.coordinates) == len(self.flags) - data = [] - endPtsOfContours = array.array("h", self.endPtsOfContours) -- if sys.byteorder != "big": -- endPtsOfContours.byteswap() -+ if sys.byteorder != "big": endPtsOfContours.byteswap() - data.append(endPtsOfContours.tostring()) - instructions = self.program.getBytecode() - data.append(struct.pack(">h", len(instructions))) -diff --git a/Lib/fontTools/ttLib/tables/_g_v_a_r.py b/Lib/fontTools/ttLib/tables/_g_v_a_r.py -index 9f97c31a2..608b6a2d9 100644 ---- a/Lib/fontTools/ttLib/tables/_g_v_a_r.py -+++ b/Lib/fontTools/ttLib/tables/_g_v_a_r.py -@@ -121,8 +121,7 @@ def decompileOffsets_(data, tableFormat, glyphCount): - offsets = array.array("I") - offsetsSize = (glyphCount + 1) * 4 - offsets.fromstring(data[0 : offsetsSize]) -- if sys.byteorder != "big": -- offsets.byteswap() -+ if sys.byteorder != "big": offsets.byteswap() - - # In the short format, offsets need to be multiplied by 2. - # This is not documented in Apple's TrueType specification, -@@ -152,8 +151,7 @@ def compileOffsets_(offsets): - else: - packed = array.array("I", offsets) - tableFormat = 1 -- if sys.byteorder != "big": -- packed.byteswap() -+ if sys.byteorder != "big": packed.byteswap() - return (packed.tostring(), tableFormat) - - def toXML(self, writer, ttFont): -diff --git a/Lib/fontTools/ttLib/tables/_h_m_t_x.py b/Lib/fontTools/ttLib/tables/_h_m_t_x.py -index e6b8ea9bd..6f8bb972f 100644 ---- a/Lib/fontTools/ttLib/tables/_h_m_t_x.py -+++ b/Lib/fontTools/ttLib/tables/_h_m_t_x.py -@@ -40,8 +40,7 @@ def decompile(self, data, ttFont): - sideBearings = array.array("h", data[:2 * numberOfSideBearings]) - data = data[2 * numberOfSideBearings:] - -- if sys.byteorder != "big": -- sideBearings.byteswap() -+ if sys.byteorder != "big": sideBearings.byteswap() - if data: - log.warning("too much '%s' table data" % self.tableTag) - self.metrics = {} -@@ -98,8 +97,7 @@ def compile(self, ttFont): - else: - raise - additionalMetrics = array.array("h", additionalMetrics) -- if sys.byteorder != "big": -- additionalMetrics.byteswap() -+ if sys.byteorder != "big": additionalMetrics.byteswap() - data = data + additionalMetrics.tostring() - return data - -diff --git a/Lib/fontTools/ttLib/tables/_k_e_r_n.py b/Lib/fontTools/ttLib/tables/_k_e_r_n.py -index 6e21a4bd2..98eb70923 100644 ---- a/Lib/fontTools/ttLib/tables/_k_e_r_n.py -+++ b/Lib/fontTools/ttLib/tables/_k_e_r_n.py -@@ -130,8 +130,7 @@ def decompile(self, data, ttFont): - - nPairs = min(nPairs, len(data) // 6) - datas = array.array("H", data[:6 * nPairs]) -- if sys.byteorder != "big": # pragma: no cover -- datas.byteswap() -+ if sys.byteorder != "big": datas.byteswap() - it = iter(datas) - glyphOrder = ttFont.getGlyphOrder() - for k in range(nPairs): -diff --git a/Lib/fontTools/ttLib/tables/_l_o_c_a.py b/Lib/fontTools/ttLib/tables/_l_o_c_a.py -index 2fcd52840..6aa530308 100644 ---- a/Lib/fontTools/ttLib/tables/_l_o_c_a.py -+++ b/Lib/fontTools/ttLib/tables/_l_o_c_a.py -@@ -21,8 +21,7 @@ def decompile(self, data, ttFont): - format = "H" - locations = array.array(format) - locations.fromstring(data) -- if sys.byteorder != "big": -- locations.byteswap() -+ if sys.byteorder != "big": locations.byteswap() - if not longFormat: - l = array.array("I") - for i in range(len(locations)): -@@ -47,8 +46,7 @@ def compile(self, ttFont): - else: - locations = array.array("I", self.locations) - ttFont['head'].indexToLocFormat = 1 -- if sys.byteorder != "big": -- locations.byteswap() -+ if sys.byteorder != "big": locations.byteswap() - return locations.tostring() - - def set(self, locations): -diff --git a/Lib/fontTools/ttLib/tables/_p_o_s_t.py b/Lib/fontTools/ttLib/tables/_p_o_s_t.py -index ede62dabc..4874ecd94 100644 ---- a/Lib/fontTools/ttLib/tables/_p_o_s_t.py -+++ b/Lib/fontTools/ttLib/tables/_p_o_s_t.py -@@ -84,8 +84,7 @@ def decode_format_2_0(self, data, ttFont): - data = data[2:] - indices = array.array("H") - indices.fromstring(data[:2*numGlyphs]) -- if sys.byteorder != "big": -- indices.byteswap() -+ if sys.byteorder != "big": indices.byteswap() - data = data[2*numGlyphs:] - self.extraNames = extraNames = unpackPStrings(data) - self.glyphOrder = glyphOrder = [""] * int(ttFont['maxp'].numGlyphs) -@@ -134,8 +133,7 @@ def decode_format_4_0(self, data, ttFont): - numGlyphs = ttFont['maxp'].numGlyphs - indices = array.array("H") - indices.fromstring(data) -- if sys.byteorder != "big": -- indices.byteswap() -+ if sys.byteorder != "big": indices.byteswap() - # In some older fonts, the size of the post table doesn't match - # the number of glyphs. Sometimes it's bigger, sometimes smaller. - self.glyphOrder = glyphOrder = [''] * int(numGlyphs) -@@ -173,8 +171,7 @@ def encode_format_2_0(self, ttFont): - extraDict[psName] = len(extraNames) - extraNames.append(psName) - indices.append(index) -- if sys.byteorder != "big": -- indices.byteswap() -+ if sys.byteorder != "big": indices.byteswap() - return struct.pack(">H", numGlyphs) + indices.tostring() + packPStrings(extraNames) - - def encode_format_4_0(self, ttFont): -@@ -191,8 +188,7 @@ def encode_format_4_0(self, ttFont): - indices.append(int(glyphID[3:],16)) - else: - indices.append(0xFFFF) -- if sys.byteorder != "big": -- indices.byteswap() -+ if sys.byteorder != "big": indices.byteswap() - return indices.tostring() - - def toXML(self, writer, ttFont): -diff --git a/Lib/fontTools/ttLib/tables/otBase.py b/Lib/fontTools/ttLib/tables/otBase.py -index 04b82fef7..c71cc8dbe 100644 ---- a/Lib/fontTools/ttLib/tables/otBase.py -+++ b/Lib/fontTools/ttLib/tables/otBase.py -@@ -145,8 +145,7 @@ def readUShortArray(self, count): - pos = self.pos - newpos = pos + count * 2 - value = array.array("H", self.data[pos:newpos]) -- if sys.byteorder != "big": -- value.byteswap() -+ if sys.byteorder != "big": value.byteswap() - self.pos = newpos - return value - -diff --git a/Lib/fontTools/ttLib/woff2.py b/Lib/fontTools/ttLib/woff2.py -index 1952682c5..c0c0e7044 100644 ---- a/Lib/fontTools/ttLib/woff2.py -+++ b/Lib/fontTools/ttLib/woff2.py -@@ -582,8 +582,7 @@ def compile(self, ttFont): - locations.append(self.locations[i] // 2) - else: - locations = array.array("I", self.locations) -- if sys.byteorder != "big": -- locations.byteswap() -+ if sys.byteorder != "big": locations.byteswap() - data = locations.tostring() - else: - # use the most compact indexFormat given the current glyph offsets -@@ -627,8 +626,7 @@ def reconstruct(self, data, ttFont): - self.bboxStream = self.bboxStream[bboxBitmapSize:] - - self.nContourStream = array.array("h", self.nContourStream) -- if sys.byteorder != "big": -- self.nContourStream.byteswap() -+ if sys.byteorder != "big": self.nContourStream.byteswap() - assert len(self.nContourStream) == self.numGlyphs - - if 'head' in ttFont: diff --git a/fix-missing-sys.patch b/fix-missing-sys.patch deleted file mode 100644 index 8db2cb1..0000000 --- a/fix-missing-sys.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/Lib/fontTools/ttLib/tables/G__l_o_c.py -+++ b/Lib/fontTools/ttLib/tables/G__l_o_c.py -@@ -4,6 +4,7 @@ from fontTools.misc import sstruct - from fontTools.misc.textTools import safeEval - from . import DefaultTable - import array -+import sys - - Gloc_header = ''' - > # big endian diff --git a/fonttools-3.29.0.zip b/fonttools-3.29.0.zip deleted file mode 100644 index f707dd4..0000000 --- a/fonttools-3.29.0.zip +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:aab38c8c131670684321437d4857dcb4de1c775efd152a9ca9c4d81f1cb97fe7 -size 2591294 diff --git a/fonttools-3.39.0.zip b/fonttools-3.39.0.zip new file mode 100644 index 0000000..be18a94 --- /dev/null +++ b/fonttools-3.39.0.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e21f35440877b24fdfe49e9c74d1084b50bd3be881a83e065d62424bd640fb41 +size 2861041 diff --git a/python-FontTools.changes b/python-FontTools.changes index 69a78b6..efc8277 100644 --- a/python-FontTools.changes +++ b/python-FontTools.changes @@ -1,3 +1,16 @@ +------------------------------------------------------------------- +Mon Apr 1 12:14:15 UTC 2019 - pgajdos@suse.com + +- version update to 3.39.0 + see NEWS.rst +- deleted patches + - 349cd94d171cf4e1e7541884df0d12bb6d4e841a.patch (upstreamed) + - fix-missing-sys.patch (upstreamed) +- run the testsuite +- do not provide extra subpackage for tools +- do not require python-munkres, it is suprefluous when scipy is + required + ------------------------------------------------------------------- Thu Sep 6 07:22:24 UTC 2018 - Matěj Cepl diff --git a/python-FontTools.spec b/python-FontTools.spec index 7c7d475..c96625b 100644 --- a/python-FontTools.spec +++ b/python-FontTools.spec @@ -1,7 +1,7 @@ # # spec file for package python-FontTools # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -12,49 +12,46 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # %{?!python_module:%define python_module() python-%{**} python3-%{**}} -%bcond_without test Name: python-FontTools -Version: 3.29.0 +Version: 3.39.0 Release: 0 Summary: Suite of Tools and Libraries for Manipulating Fonts License: MIT AND OFL-1.1 Group: Development/Languages/Python URL: http://github.com/fonttools/fonttools Source: https://files.pythonhosted.org/packages/source/f/fonttools/fonttools-%{version}.zip -# https://github.com/fonttools/fonttools/commit/349cd94d171cf4e1e7541884df0d12bb6d4e841a -Patch0: 349cd94d171cf4e1e7541884df0d12bb6d4e841a.patch -Patch1: fix-missing-sys.patch BuildRequires: %{python_module devel} +BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros BuildRequires: unzip -Recommends: python-brotlipy -Recommends: python-munkres -Recommends: python-numpy -Recommends: python-reportlab -Recommends: python-scipy -Recommends: python-sympy -BuildArch: noarch -%if %{with test} -BuildRequires: %{python_module brotlipy} -BuildRequires: %{python_module munkres} -BuildRequires: %{python_module numpy} -BuildRequires: %{python_module pytest >= 3.0} -BuildRequires: %{python_module pytest-runner} -BuildRequires: %{python_module reportlab} -BuildRequires: %{python_module scipy} -BuildRequires: %{python_module setuptools} -BuildRequires: %{python_module tox} +Requires: python-brotlipy >= 0.7.0 +%ifpython2 +Requires: python-enum34 %endif +Requires: python-fs >= 2.4.4 +Requires: python-reportlab +Requires: python-scipy >= 1.2.1 +Requires: python-sympy +# SECTION test requirements +BuildRequires: %{python_module brotlipy >= 0.7.0} +BuildRequires: %{python_module fs >= 2.4.4} +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module scipy >= 1.2.1} +BuildRequires: %{python_module sympy} +BuildRequires: python2-enum34 +BuildRequires: zip +# /SECTION %ifpython3 -Recommends: fonttools = %{version} -Conflicts: fonttools < %{version} +Obsoletes: fonttools +Provides: fonttools %endif +BuildArch: noarch %python_subpackages %description @@ -65,22 +62,8 @@ It currently reads and writes TrueType font files, reads PostScript Type 1 fonts, and more. It contains two command line programs to convert TrueType fonts to an XML based format (called TTX) and back. -%package -n fonttools -Summary: Suite of Tools and Libraries for Manipulating Fonts -Group: Productivity/Graphics/Vector Editors -Requires: python3-FontTools - -%description -n fonttools -FontTools is a suite of tools and libraries for manipulating fonts -written in Python. - -It currently reads and writes TrueType font files, reads PostScript -Type 1 fonts, and more. It contains two command line programs to -convert TrueType fonts to an XML based format (called TTX) and back. - %prep %setup -q -n fonttools-%{version} -%autopatch -p1 # Remove shebang sed -i -e '/^#!\//, 1d' Lib/fontTools/mtiLib/__init__.py @@ -90,26 +73,32 @@ sed -i -e '/^#!\//, 1d' Lib/fontTools/mtiLib/__init__.py %install %python_install %python_expand %fdupes %{buildroot}%{$python_sitelib} +# remove undocumented and non working script +rm %{buildroot}%{_bindir}/fonttools -%if %{with test} %check +ufodir='Tests/ufoLib/testdata/TestFont1 (UFO3).ufo' +if [ ! -e "${ufodir}z" ]; then + # they forgot to ship Tests/ufoLib/testdata/TestFont1 (UFO3).ufoz + pushd $(dirname "$ufodir") + name=$(basename "$ufodir") + zip -r "${name}z" "$name" + popd +else + echo "this can be removed (including zip buildrequires)" + exit 1 +fi export LANG=en_US.UTF-8 -%python_exec setup.py test -%endif +export PYTHONDONTWRITEBYTECODE=1 +%pytest %files %{python_files} %license LICENSE LICENSE.external %doc README.rst NEWS.rst %{python_sitelib}/* - -%files -n fonttools -%license LICENSE LICENSE.external -%doc README.rst NEWS.rst -%{_bindir}/fonttools -%{_bindir}/pyftinspect -%{_bindir}/pyftmerge -%{_bindir}/pyftsubset -%{_bindir}/ttx -%{_mandir}/man1/ttx.1%{?ext_man} +%python3_only %{_bindir}/pyftmerge +%python3_only %{_bindir}/pyftsubset +%python3_only %{_bindir}/ttx +%python3_only %{_mandir}/man1/ttx.1%{?ext_man} %changelog