diff --git a/.fmf/version b/.fmf/version new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/.fmf/version @@ -0,0 +1 @@ +1 diff --git a/.gitignore b/.gitignore index a671a0a..c15e946 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,15 @@ fontforge_full-20100501.tar.bz2 /20150612.tar.gz /fontforge-20150824.tar.gz /fontforge-20160404.tar.gz +/fontforge-20161001.tar.gz +/fontforge-20161004.tar.gz +/fontforge-20161005.tar.gz +/fontforge-20161012.tar.gz +/fontforge-20170731.tar.gz +/gnulib-b324052.tar.gz +/fontforge-20190317.tar.gz +/fontforge-20190413.tar.gz +/fontforge-20200314.tar.gz +/fontforge-20201107.tar.gz +/fontforge-20230101.tar.gz +/fontforge-20251009.tar.gz diff --git a/0001-Fix-errors-in-French-and-Italian-translations.patch b/0001-Fix-errors-in-French-and-Italian-translations.patch new file mode 100644 index 0000000..8158ea8 --- /dev/null +++ b/0001-Fix-errors-in-French-and-Italian-translations.patch @@ -0,0 +1,181 @@ +From 472e238cafcff113c7be9815a13ff864540d5ef9 Mon Sep 17 00:00:00 2001 +From: Yaakov Selkowitz +Date: Thu, 6 Jul 2023 19:15:53 -0400 +Subject: [PATCH] Fix errors in French and Italian translations + +With gettext-0.22, these mismatches trigger errors: + +'msgstr' is not a valid C format string, unlike 'msgid'. Reason: In the +directive number 2, the argument size specifier is invalid. +--- + po/fr.po | 36 ++++++++++++++++++------------------ + po/it.po | 8 ++++---- + 2 files changed, 22 insertions(+), 22 deletions(-) + +diff --git a/po/fr.po b/po/fr.po +index 26e446b38..cb492d7a0 100644 +--- a/po/fr.po ++++ b/po/fr.po +@@ -291,7 +291,7 @@ msgstr "chaîne %1$.30s pour %2$.30s" + #. GT: $4 is the changed flag ('*' for the changed items) + #, c-format + msgid "%1$.80s at %2$d from %3$.90s%4$s" +-msgstr "%1$.80s à %2$d de %3$.90hs%4$s" ++msgstr "%1$.80s à %2$d de %3$.90s%4$s" + + #. GT: This is the title for a window showing a bitmap character + #. GT: It will look something like: +@@ -302,7 +302,7 @@ msgstr "%1$.80s à %2$d de %3$.90hs%4$s" + #. GT: $4 is the font name + #, c-format + msgid "%1$.80s at %2$d size %3$d from %4$.80s" +-msgstr "%1$.80s (%2$d) taille %3$d de %4$.80hs" ++msgstr "%1$.80s (%2$d) taille %3$d de %4$.80s" + + #, c-format + msgid "%1$s from lookup subtable %2$.50s" +@@ -7433,7 +7433,7 @@ msgid "" + "Reverting the file will lose those changes.\n" + "Is that what you want?" + msgstr "" +-"La fonte %1$.40s dans le fichier %2$.40hs a été modifiée.\n" ++"La fonte %1$.40s dans le fichier %2$.40s a été modifiée.\n" + "Revenir vous fera perdre toutes les modifications.\n" + "Voulez vous vraiment revenir ?" + +@@ -19925,7 +19925,7 @@ msgid "" + "The fonts %1$.30s and %2$.30s have a different number of glyphs or different " + "encodings" + msgstr "" +-"Les fontes %1$.30s et %2$.30hs n'ont pas le même nombre de glyphes ou des " ++"Les fontes %1$.30s et %2$.30s n'ont pas le même nombre de glyphes ou des " + "codages différents" + + #, c-format +@@ -19933,7 +19933,7 @@ msgid "" + "The fonts %1$.30s and %2$.30s use different types of splines (one quadratic, " + "one cubic)" + msgstr "" +-"Les fontes %1$.30s et %2$.30hs utilisent des courbes de Bézier d'ordres " ++"Les fontes %1$.30s et %2$.30s utilisent des courbes de Bézier d'ordres " + "différents (quadratique et cubique)" + + msgid "The generated font won't work with ATM" +@@ -19968,8 +19968,8 @@ msgid "" + "The glyph %1$.30s in font %2$.30s has a different hint mask on its contours " + "than in %3$.30s" + msgstr "" +-"Le glyphe %1$.30s dans la police %2$.30hs a un masque de hints différent que " +-"dans %3$.30hs" ++"Le glyphe %1$.30s dans la police %2$.30s a un masque de hints différent que " ++"dans %3$.30s" + + #, c-format + msgid "" +@@ -19984,8 +19984,8 @@ msgid "" + "The glyph %1$.30s in font %2$.30s has a different number of references than " + "in %3$.30s" + msgstr "" +-"Le glyphe %1$.30s de la fonte %2$.30hs a un nombre de références différent " +-"dans %3$.30hs" ++"Le glyphe %1$.30s de la fonte %2$.30s a un nombre de références différent " ++"dans %3$.30s" + + #, c-format + msgid "" +@@ -20457,7 +20457,7 @@ msgstr "" + #, c-format + msgid "The outlines of glyph %2$.30s were not found in the font %1$.60s" + msgstr "" +-"Le contours du glyphe %2$.30s n'ont pas été trouvés dans la police %1$.60hs" ++"Le contours du glyphe %2$.30s n'ont pas été trouvés dans la police %1$.60s" + + msgid "The paths that make up this glyph intersect one another" + msgstr "Les chemins qui composent ce glyphe se coupent les uns les autres" +@@ -21042,7 +21042,7 @@ msgstr "Il y a déjà une sous-table avec ce nom, changez de nom SVP" + + #, c-format + msgid "There is already an anchor point named %1$.40s in %2$.40s." +-msgstr "Il y a déjà une ancre appelée %1$.40s dans %2$.40hs." ++msgstr "Il y a déjà une ancre appelée %1$.40s dans %2$.40s." + + msgid "There is another glyph in the font with this name" + msgstr "Il y a un autre glyphe dans la fonte avec ce nom" +@@ -21441,8 +21441,8 @@ msgid "" + "been able to find is %1$.20s-%2$.20s-%4$d.\n" + "Shall I use that or let you search?" + msgstr "" +-"Cette fonte est basée sur le jeu de caractères %1$.20s-%2$.20hs-%3$d, mais " +-"ce que j'ai trouvé de mieux c'est %1$.20hs-%2$.20hs-%4$d.\n" ++"Cette fonte est basée sur le jeu de caractères %1$.20s-%2$.20s-%3$d, mais " ++"ce que j'ai trouvé de mieux c'est %1$.20s-%2$.20s-%4$d.\n" + "Devrais-je utiliser cette valeur ou préférez vous chercher ?" + + msgid "" +@@ -21770,7 +21770,7 @@ msgid "" + "with a 0 offset for this combination. Would you like to alter this kerning " + "class entry (or create a kerning pair for just these two glyphs)?" + msgstr "" +-"Cette paire de crénage (%.20s et %.20hs) est dans une classe de crénage\n" ++"Cette paire de crénage (%.20s et %.20s) est dans une classe de crénage\n" + "avec un déplacement de 0 pour cette combinaison. Voulez-vous modifier cette " + "partie\n" + "de la classe de crénage (ou créer une nouvelle paire rien que pour ces 2 " +@@ -24551,8 +24551,8 @@ msgid "" + "referred to.\n" + "It will not be copied." + msgstr "" +-"Vous essayer de coller une référence vers %1$s dans %2$hs.\n" +-"Mais %1$hs n'existe pas dans cette fonte, et FontForge ne trouve pas le " ++"Vous essayer de coller une référence vers %1$s dans %2$s.\n" ++"Mais %1$s n'existe pas dans cette fonte, et FontForge ne trouve pas le " + "glyphe auquel il se référait.\n" + "Le glyphe ne sera pas copié." + +@@ -24562,8 +24562,8 @@ msgid "" + "But %1$s does not exist in this font.\n" + "Would you like to copy the original splines (or delete the reference)?" + msgstr "" +-"Vous essayer de coller une référence vers %1$s dans %2$hs.\n" +-"Mais %1$hs n'existe pas dans cette fonte.\n" ++"Vous essayer de coller une référence vers %1$s dans %2$s.\n" ++"Mais %1$s n'existe pas dans cette fonte.\n" + "Voulez vous copier le contour d'origine (ou supprimer la référence)?" + + msgid "" +diff --git a/po/it.po b/po/it.po +index e13711485..d0c3ea987 100644 +--- a/po/it.po ++++ b/po/it.po +@@ -2303,7 +2303,7 @@ msgid "" + "Reverting the file will lose those changes.\n" + "Is that what you want?" + msgstr "" +-"Il font %1$.40s nel file %2$.40hs è stato modificato.\n" ++"Il font %1$.40s nel file %2$.40s è stato modificato.\n" + "Ripristinando il file perderai tutte le modifiche.\n" + "È quello che vuoi fare?" + +@@ -5835,7 +5835,7 @@ msgid "" + "The glyph %1$.30s has a different number of contours in font %2$.30s than in " + "%3$.30s" + msgstr "" +-"Il glifo %1$.30s ha un diverso numero di contorni nel font %2$.30hs rispetto " ++"Il glifo %1$.30s ha un diverso numero di contorni nel font %2$.30s rispetto " + "a %3$.30s" + + #, c-format +@@ -6235,8 +6235,8 @@ msgid "" + "been able to find is %1$.20s-%2$.20s-%4$d.\n" + "Shall I use that or let you search?" + msgstr "" +-"Questo font è basato sulla codifica di caratteri %1$.20s-%2$.20hs-%3$d, ma " +-"il migliore che io abbia trovato è %1$.20hs-%2$.20hs-%4$d.\n" ++"Questo font è basato sulla codifica di caratteri %1$.20s-%2$.20s-%3$d, ma " ++"il migliore che io abbia trovato è %1$.20s-%2$.20s-%4$d.\n" + "Devo usare questo valore o preferisci cercare tu stesso?" + + msgid "" +-- +2.41.0 + diff --git a/Add-python3-support.patch b/Add-python3-support.patch deleted file mode 100644 index d9a90ae..0000000 --- a/Add-python3-support.patch +++ /dev/null @@ -1,473 +0,0 @@ -From 75426cbbe57138849b96537ab1dee81e7861af11 Mon Sep 17 00:00:00 2001 -From: Parag Nemade -Date: Fri, 8 Apr 2016 12:03:12 +0530 -Subject: [PATCH] Add python3 support - ---- - pycontrib/FontCompare/fc/BitmapHandler.py | 20 +++++++-------- - pycontrib/FontCompare/fc/DocCompare.py | 2 +- - pycontrib/FontCompare/fc/FontCompare.py | 2 +- - pycontrib/FontCompare/fc/GlyphConsistency.py | 2 +- - pycontrib/FontCompare/fontcompare | 2 +- - pycontrib/FontCompare/unittests/unittests.py | 18 ++++++------- - pycontrib/collab/web-test-collab.py | 2 +- - pycontrib/even.py | 2 +- - pycontrib/gdraw/__init__.py | 2 +- - pycontrib/gdraw/gdraw.py | 18 ++++++------- - pycontrib/graphicore.py | 2 +- - pycontrib/graphicore/ipython_view.py | 13 +++++----- - pycontrib/graphicore/shell.py | 2 +- - pycontrib/svg2sfd.py | 38 ++++++++++++++-------------- - pycontrib/webcollab.py | 2 +- - 15 files changed, 64 insertions(+), 63 deletions(-) - -diff --git a/pycontrib/FontCompare/fc/BitmapHandler.py b/pycontrib/FontCompare/fc/BitmapHandler.py -index d4d00da..c159128 100644 ---- a/pycontrib/FontCompare/fc/BitmapHandler.py -+++ b/pycontrib/FontCompare/fc/BitmapHandler.py -@@ -35,7 +35,7 @@ def white_bg_square(img): - "return a white-background-color image having the img in exact center" - size = (max(img.size),)*2 - layer = Image.new('1', size, 1) -- layer.paste(img, tuple(map(lambda x:(x[0]-x[1])/2, zip(size, img.size)))) -+ layer.paste(img, tuple([(x[0]-x[1])/2 for x in zip(size, img.size)])) - return layer - - class BitmapCompare: -@@ -73,13 +73,13 @@ class CreateSpriteSheet: - #seperate each image with lots of whitespace - master_height = pixelsize - oldfont = font -- print "the master image will by %d by %d" % (master_width, master_height) -- print "creating image..." -+ print("the master image will by %d by %d" % (master_width, master_height)) -+ print("creating image...") - master = Image.new( - mode='1', - size=(master_width, master_height), - color=0) # fully transparent -- print "created." -+ print("created.") - if effects == "italic": - font.selection.all() - font = font.italicize(-13) -@@ -92,16 +92,16 @@ class CreateSpriteSheet: - font[i].changeWeight(50,"auto",0,0,"auto") - font[i].export("temp.bmp",pixelsize,1) - img = Image.open("temp.bmp") -- print "adding %s at %d..." % (str(i)+".bmp", location), -+ print("adding %s at %d..." % (str(i)+".bmp", location), end=' ') - square_one = white_bg_square(img) - square_one.resize((pixelsize, pixelsize)) - master.paste(square_one,(location,0)) -- print "added." -+ print("added.") - except: -- print "ooopsy" -+ print("ooopsy") - count+=1 -- print "done adding pics." -- print "saving mastersprite.bmp..." -+ print("done adding pics.") -+ print("saving mastersprite.bmp...") - master.save('data/mastersprite'+effects+'.bmp' ) -- print "saved!" -+ print("saved!") - font.close() -diff --git a/pycontrib/FontCompare/fc/DocCompare.py b/pycontrib/FontCompare/fc/DocCompare.py -index 3a54bf9..df431e2 100644 ---- a/pycontrib/FontCompare/fc/DocCompare.py -+++ b/pycontrib/FontCompare/fc/DocCompare.py -@@ -41,7 +41,7 @@ class DocCompare: - bashcommand = "hb-view --output-format=\"png\" --output-file=\"/var/tmp/test.png\" --font-size="+str(fontsize)+" --text-file=\"" - bashcommand+=docpath+"\" "+"\""+testpath+"\"" - os.system(str(bashcommand)) -- print bashcommand -+ print(bashcommand) - thefile = pkg_resources.resource_filename("fc",mockfont.highresdocfile) - shutil.copy(thefile,"/var/tmp/standard.png") - cm = BitmapCompare() -diff --git a/pycontrib/FontCompare/fc/FontCompare.py b/pycontrib/FontCompare/fc/FontCompare.py -index f21718c..c82b788 100644 ---- a/pycontrib/FontCompare/fc/FontCompare.py -+++ b/pycontrib/FontCompare/fc/FontCompare.py -@@ -111,7 +111,7 @@ class FontCompare(object): - scores = list() - comparator = BitmapCompare() - pixelsize = (resolution*ptsize)/72 -- print spritepath -+ print(spritepath) - for i in range (glyphRange[0],glyphRange[1]): - if i in Testfont: - Testfont[i].export("/var/tmp/tmp.bmp",pixelsize,1) -diff --git a/pycontrib/FontCompare/fc/GlyphConsistency.py b/pycontrib/FontCompare/fc/GlyphConsistency.py -index 38273c9..d5265fa 100644 ---- a/pycontrib/FontCompare/fc/GlyphConsistency.py -+++ b/pycontrib/FontCompare/fc/GlyphConsistency.py -@@ -102,7 +102,7 @@ class GlyphConsistency: - for i in range (glyphrange[0],glyphrange[1]): - if i in font: - score = self.glyph_round_compare(font[i],pixelsize) -- print score -+ print(score) - set_round_score+=score - total+=1 - font.close() -diff --git a/pycontrib/FontCompare/fontcompare b/pycontrib/FontCompare/fontcompare -index e7e68d8..fdf7336 100755 ---- a/pycontrib/FontCompare/fontcompare -+++ b/pycontrib/FontCompare/fontcompare -@@ -15,7 +15,7 @@ - along with this program. If not, see . - """ - --#! /usr/bin/python -+#! /usr/bin/python3 - from PyQt4.QtGui import QMessageBox - from PyQt4.QtGui import QMainWindow - from PyQt4.QtGui import QApplication -diff --git a/pycontrib/FontCompare/unittests/unittests.py b/pycontrib/FontCompare/unittests/unittests.py -index 18e1e95..d8a1190 100644 ---- a/pycontrib/FontCompare/unittests/unittests.py -+++ b/pycontrib/FontCompare/unittests/unittests.py -@@ -55,7 +55,7 @@ class Basictests(unittest.TestCase): - for tup in basic: - if tup[1]!=10: - bastest=0 -- self.failUnless(bastest) -+ self.assertTrue(bastest) - testfont = fontforge.open("unittests/lohit.ttf") - bold = cm.font_facecompare(testfont,mockfont,(0x900,0x97f),\ - 600,12,1,"bold") -@@ -66,28 +66,28 @@ class Basictests(unittest.TestCase): - normal = cm.font_facecompare(testfont,mockfont,(0x900,0x97f),\ - 600,12,1,"normal") - test = 1 -- print len(normal) -+ print(len(normal)) - for tup in bold: - if tup[1]==100 or tup[1]==0: - test1=1 - break -- self.failUnless(test) -+ self.assertTrue(test) - test = 0 - for tup in italic: - if tup[1]==100 or tup[1]==0: - test=1 - break -- self.failUnless(test is 1) -+ self.assertTrue(test is 1) - test = 0 - for tup in normal: - if tup[1]==100 or tup[1]==0: - test=1 - break -- self.failUnless(test is 1) -+ self.assertTrue(test is 1) - test = 0 - if len(normal) == len(bold) == len(italic): - test = 1 -- self.failUnless(test is 1) -+ self.assertTrue(test is 1) - - def testGlyphConsistency(self): - cm = GlyphConsistency() -@@ -99,11 +99,11 @@ class Basictests(unittest.TestCase): - test3 = cm.glyph_round_consistency(testfont,(0x900,0x97f),50) - - test = (0 <= test1[0][1] <= 10) -- self.failUnless(test) -+ self.assertTrue(test) - test2 = (0 <= test2 <= 10) -- self.failUnless(test2) -+ self.assertTrue(test2) - test3 = (0 <= test3 <= 10) -- self.failUnless(test3) -+ self.assertTrue(test3) - - """ - unittests for DocCompare not required. -diff --git a/pycontrib/collab/web-test-collab.py b/pycontrib/collab/web-test-collab.py -index 47b763f..b19f930 100755 ---- a/pycontrib/collab/web-test-collab.py -+++ b/pycontrib/collab/web-test-collab.py -@@ -68,7 +68,7 @@ def OnCollabUpdate(f): - "end": "null" # this is simply so we dont have to manage keeping the last item with no terminating , - }, - sort_keys=True, indent=4, separators=(',', ': ')) -- print js -+ print(js) - fi = open(fontJsonOnDisk, 'w') - fi.write(js) - -diff --git a/pycontrib/even.py b/pycontrib/even.py -index 96f9128..4f30fcb 100755 ---- a/pycontrib/even.py -+++ b/pycontrib/even.py -@@ -1,4 +1,4 @@ --#!/usr/bin/python -+#!/usr/bin/python3 - # -*- coding: utf-8 -*- - """ - running even from the fontforge menu -diff --git a/pycontrib/gdraw/__init__.py b/pycontrib/gdraw/__init__.py -index d47976c..25bf981 100644 ---- a/pycontrib/gdraw/__init__.py -+++ b/pycontrib/gdraw/__init__.py -@@ -1,4 +1,4 @@ --#!/usr/bin/python -+#!/usr/bin/python3 - # vim:ts=8:sw=4:expandtab:encoding=utf-8 - ''' - Copyright 2009 -diff --git a/pycontrib/gdraw/gdraw.py b/pycontrib/gdraw/gdraw.py -index f2d5e50..3ed3abd 100755 ---- a/pycontrib/gdraw/gdraw.py -+++ b/pycontrib/gdraw/gdraw.py -@@ -1,4 +1,4 @@ --#!/usr/bin/python -+#!/usr/bin/python3 - '''ctypes wrapper to Attach the GDraw event handler to the gtk main loop. - - Copyright 2009 -@@ -111,7 +111,7 @@ class Timer: - - return - def dodo(*args): -- print 'aaa' -+ print('aaa') - return False - self.add(1000, dodo) - -@@ -122,7 +122,7 @@ class Timer: - - def _event_handler(self, gw, event): - evt = event.contents -- print "_event_handler()" -+ print("_event_handler()") - if evt.type == et_timer: - timer = evt.u.timer.timer - tkey = addressof(timer.contents) -@@ -147,7 +147,7 @@ class Timer: - ci.func = CallBackFunc(func) - ci.data = data - -- print "timer.add timeout", timeout -+ print("timer.add timeout", timeout) - frequency = 1 # Use return value of func() to decide repeat like gtk. - timer = GDrawRequestTimer(self.win, timeout, timeout, byref(ci)) - -@@ -190,7 +190,7 @@ class GtkRunner: - - def _do_main(self, *args): - '''The function called by the gdraw timeout handler.''' -- print "do_main" -+ print("do_main") - while gtk.events_pending(): - gtk.main_iteration(False) - return True -@@ -207,15 +207,15 @@ class GtkRunner: - self.gtk_timer = None - - def OnDestroyWindow(self, widget, fd ): -- print fd -+ print(fd) - fontforge.removeGtkWindowToMainEventLoopByFD( fd ) - self.stop() - return True - - def sniffwindow(self,w): - '''sniff key presses for a gtk window''' -- print "sniffwindow w", w -- print "sniff active font:", fontforge.activeFont() -+ print("sniffwindow w", w) -+ print("sniff active font:", fontforge.activeFont()) - w.connect("key-release-event", self._do_main) - fontforge.addGtkWindowToMainEventLoop(w.window.xid) - fd = fontforge.getGtkWindowMainEventLoopFD(w.window.xid) -@@ -223,7 +223,7 @@ class GtkRunner: - - def sniffwindowid(self,xid): - '''sniff key presses for a gtk window''' -- print "sniffwindowid xid", xid -+ print("sniffwindowid xid", xid) - #w.connect("key-release-event", self._do_main) - - def start(self, timeout=GTIMEOUT): -diff --git a/pycontrib/graphicore.py b/pycontrib/graphicore.py -index f95e488..a986327 100755 ---- a/pycontrib/graphicore.py -+++ b/pycontrib/graphicore.py -@@ -1,4 +1,4 @@ --#!/usr/bin/python -+#!/usr/bin/python3 - # -*- coding: utf-8 -*- - """ - running the fontforge scripts in the graphicore folder on fontforge startup -diff --git a/pycontrib/graphicore/ipython_view.py b/pycontrib/graphicore/ipython_view.py -index f39eedb..2b77395 100644 ---- a/pycontrib/graphicore/ipython_view.py -+++ b/pycontrib/graphicore/ipython_view.py -@@ -1,4 +1,4 @@ --#!/usr/bin/python -+#!/usr/bin/python3 - ''' - Provides IPython console widget. - -@@ -17,10 +17,11 @@ import re - import sys - import os - import pango --from StringIO import StringIO --import thread -+from io import StringIO -+import _thread - - import IPython -+from functools import reduce - - class IterableIPShell: - ''' -@@ -118,7 +119,7 @@ class IterableIPShell: - ''' - This function updates namespace with sys.modules - ''' -- for k,v in sys.modules.items(): -+ for k,v in list(sys.modules.items()): - if not '.' in k: - self.IP.user_ns.update({k:v}) - -@@ -271,11 +272,11 @@ class IterableIPShell: - @type header: string - ''' - stat = 0 -- if verbose or debug: print header+cmd -+ if verbose or debug: print(header+cmd) - # flush stdout so we don't mangle python's buffering - if not debug: - input, output = os.popen4(cmd) -- print output.read() -+ print(output.read()) - output.close() - input.close() - -diff --git a/pycontrib/graphicore/shell.py b/pycontrib/graphicore/shell.py -index 5d102f7..2728ae2 100755 ---- a/pycontrib/graphicore/shell.py -+++ b/pycontrib/graphicore/shell.py -@@ -1,4 +1,4 @@ --#!/usr/bin/python -+#!/usr/bin/python3 - # -*- coding: utf-8 -*- - """ - FontForge Interactive Python Shell -diff --git a/pycontrib/svg2sfd.py b/pycontrib/svg2sfd.py -index e1fc0ac..e23cb15 100644 ---- a/pycontrib/svg2sfd.py -+++ b/pycontrib/svg2sfd.py -@@ -1,4 +1,4 @@ --#!/usr/bin/python -+#!/usr/bin/python3 - # - # Copyright 2013 Google Inc. All rights reserved. - # -@@ -49,7 +49,7 @@ def print_one_cmd(cmd, args): - result.append('%f' % (scale * args[i])) - result.append(cmd) - result.append('0') # TODO: should mark corner points -- print ' '.join(result) -+ print(' '.join(result)) - - def apply_rel_xy(xy, args): - x0, y0 = xy -@@ -75,7 +75,7 @@ def path_to_sfd(path): - for i in range(num_args_cmd(cmd)): - m = fre.match(path) - if m is None: -- print 'no float match:', path -+ print('no float match:', path) - args.append(float(m.group(1))) - path = path[m.end():] - #print cmd, args -@@ -128,13 +128,13 @@ def conv_svg(fn, char, glyphnum = None): - if glyphnum == None: - glyphnum = lastglyphnum + 1 - lastglyphnum = glyphnum -- print 'StartChar:', os.path.basename(fn)[:-4] -- print 'Encoding: %d %d %d' % (char, glyphnum, char) -- print 'Width: %d' % (21 * 40) -- print 'Flags: W' -- print 'LayerCount: 2' -- print 'Fore' -- print 'SplineSet' -+ print('StartChar:', os.path.basename(fn)[:-4]) -+ print('Encoding: %d %d %d' % (char, glyphnum, char)) -+ print('Width: %d' % (21 * 40)) -+ print('Flags: W') -+ print('LayerCount: 2') -+ print('Fore') -+ print('SplineSet') - doc = xml.dom.minidom.parse(fn) - # TODO: reverse paths if fill color is white-ish (this is more code, - # and in the meantime, we'll rely on correct path direction in FF) -@@ -147,16 +147,16 @@ def conv_svg(fn, char, glyphnum = None): - cy = float(circle.getAttribute('cy')) - r = float(circle.getAttribute('r')) - circle_to_sfd(cx, cy, r) -- print 'EndSplineSet' -- print 'EndChar' -+ print('EndSplineSet') -+ print('EndChar') - - def print_header(): - global header_printed -- print '''SplineFontDB: 3.0 -+ print('''SplineFontDB: 3.0 - FontName: %s - FullName: %s --FamilyName: %s''' % (font_name, font_name, font_name) -- print '''Weight: Medium -+FamilyName: %s''' % (font_name, font_name, font_name)) -+ print('''Weight: Medium - Copyright: Copyright (C) 2011 Google Inc. - Version: 001.000 - UnderlinePosition: -120 -@@ -180,12 +180,12 @@ HheadAOffset: 0 - HheadDescent: 200 - HheadDOffset: 0 - BeginChars: 57600 57600 --''' -+''') - header_printed = True - - def print_footer(): -- print '''EndChars --EndSplineFont''' -+ print('''EndChars -+EndSplineFont''') - - def parse_int(x): - if x.startswith('0x'): -@@ -197,7 +197,7 @@ def run_file(fn): - global char_num - global font_name - directory = '' -- for l in file(fn).xreadlines(): -+ for l in file(fn): - if l.startswith('#'): - continue - s = l.strip().split() -diff --git a/pycontrib/webcollab.py b/pycontrib/webcollab.py -index 9ee0f17..f96828c 100755 ---- a/pycontrib/webcollab.py -+++ b/pycontrib/webcollab.py -@@ -1,4 +1,4 @@ --#!/usr/bin/python -+#!/usr/bin/python3 - # -*- coding: utf-8 -*- - """ - running web collab server hooks --- -2.7.3 - diff --git a/Fix_Splinefont_shell_invocation.patch b/Fix_Splinefont_shell_invocation.patch new file mode 100644 index 0000000..1d75f6c --- /dev/null +++ b/Fix_Splinefont_shell_invocation.patch @@ -0,0 +1,178 @@ +From a64099931ea004a08e074b08ad0984d92c25daa2 Mon Sep 17 00:00:00 2001 +From: Peter Kydas +Date: Tue, 6 Feb 2024 10:23:36 +1100 +Subject: [PATCH] fix splinefont shell command injection + +--- + fontforge/splinefont.c | 125 +++++++++++++++++++++++++++++------------ + 1 file changed, 90 insertions(+), 35 deletions(-) + +diff --git a/fontforge/splinefont.c b/fontforge/splinefont.c +index 239fdc035b..647daee109 100644 +--- a/fontforge/splinefont.c ++++ b/fontforge/splinefont.c +@@ -788,11 +788,14 @@ return( name ); + + char *Unarchive(char *name, char **_archivedir) { + char *dir = getenv("TMPDIR"); +- char *pt, *archivedir, *listfile, *listcommand, *unarchivecmd, *desiredfile; ++ char *pt, *archivedir, *listfile, *desiredfile; + char *finalfile; + int i; + int doall=false; + static int cnt=0; ++ gchar *command[5]; ++ gchar *stdoutresponse = NULL; ++ gchar *stderrresponse = NULL; + + *_archivedir = NULL; + +@@ -827,18 +830,30 @@ return( NULL ); + listfile = malloc(strlen(archivedir)+strlen("/" TOC_NAME)+1); + sprintf( listfile, "%s/" TOC_NAME, archivedir ); + +- listcommand = malloc( strlen(archivers[i].unarchive) + 1 + +- strlen( archivers[i].listargs) + 1 + +- strlen( name ) + 3 + +- strlen( listfile ) +4 ); +- sprintf( listcommand, "%s %s %s > %s", archivers[i].unarchive, +- archivers[i].listargs, name, listfile ); +- if ( system(listcommand)!=0 ) { +- free(listcommand); free(listfile); +- ArchiveCleanup(archivedir); +-return( NULL ); +- } +- free(listcommand); ++ command[0] = archivers[i].unarchive; ++ command[1] = archivers[i].listargs; ++ command[2] = name; ++ command[3] = NULL; // command args need to be NULL-terminated ++ ++ if ( g_spawn_sync( ++ NULL, ++ command, ++ NULL, ++ G_SPAWN_SEARCH_PATH, ++ NULL, ++ NULL, ++ &stdoutresponse, ++ &stderrresponse, ++ NULL, ++ NULL ++ ) == FALSE) { // did not successfully execute ++ ArchiveCleanup(archivedir); ++ return( NULL ); ++ } ++ // Write out the listfile to be read in later ++ FILE *fp = fopen(listfile, "wb"); ++ fwrite(stdoutresponse, strlen(stdoutresponse), 1, fp); ++ fclose(fp); + + desiredfile = ArchiveParseTOC(listfile, archivers[i].ars, &doall); + free(listfile); +@@ -847,22 +862,28 @@ return( NULL ); + return( NULL ); + } + +- /* I tried sending everything to stdout, but that doesn't work if the */ +- /* output is a directory file (ufo, sfdir) */ +- unarchivecmd = malloc( strlen(archivers[i].unarchive) + 1 + +- strlen( archivers[i].listargs) + 1 + +- strlen( name ) + 1 + +- strlen( desiredfile ) + 3 + +- strlen( archivedir ) + 30 ); +- sprintf( unarchivecmd, "( cd %s ; %s %s %s %s ) > /dev/null", archivedir, +- archivers[i].unarchive, +- archivers[i].extractargs, name, doall ? "" : desiredfile ); +- if ( system(unarchivecmd)!=0 ) { +- free(unarchivecmd); free(desiredfile); +- ArchiveCleanup(archivedir); +-return( NULL ); ++ command[0] = archivers[i].unarchive; ++ command[1] = archivers[i].extractargs; ++ command[2] = name; ++ command[3] = doall ? "" : desiredfile; ++ command[4] = NULL; ++ ++ if ( g_spawn_sync( ++ (gchar*)archivedir, ++ command, ++ NULL, ++ G_SPAWN_SEARCH_PATH, ++ NULL, ++ NULL, ++ &stdoutresponse, ++ &stderrresponse, ++ NULL, ++ NULL ++ ) == FALSE) { // did not successfully execute ++ free(desiredfile); ++ ArchiveCleanup(archivedir); ++ return( NULL ); + } +- free(unarchivecmd); + + finalfile = malloc( strlen(archivedir) + 1 + strlen(desiredfile) + 1); + sprintf( finalfile, "%s/%s", archivedir, desiredfile ); +@@ -885,20 +906,54 @@ struct compressors compressors[] = { + + char *Decompress(char *name, int compression) { + char *dir = getenv("TMPDIR"); +- char buf[1500]; + char *tmpfn; +- ++ gchar *command[4]; ++ gint stdout_pipe; ++ gchar buffer[4096]; ++ gssize bytes_read; ++ GByteArray *binary_data = g_byte_array_new(); ++ + if ( dir==NULL ) dir = P_tmpdir; + tmpfn = malloc(strlen(dir)+strlen(GFileNameTail(name))+2); + strcpy(tmpfn,dir); + strcat(tmpfn,"/"); + strcat(tmpfn,GFileNameTail(name)); + *strrchr(tmpfn,'.') = '\0'; +- snprintf( buf, sizeof(buf), "%s < %s > %s", compressors[compression].decomp, name, tmpfn ); +- if ( system(buf)==0 ) +-return( tmpfn ); +- free(tmpfn); +-return( NULL ); ++ ++ command[0] = compressors[compression].decomp; ++ command[1] = "-c"; ++ command[2] = name; ++ command[3] = NULL; ++ ++ // Have to use async because g_spawn_sync doesn't handle nul-bytes in the output (which happens with binary data) ++ if (g_spawn_async_with_pipes( ++ NULL, ++ command, ++ NULL, ++ G_SPAWN_DO_NOT_REAP_CHILD | G_SPAWN_SEARCH_PATH, ++ NULL, ++ NULL, ++ NULL, ++ NULL, ++ &stdout_pipe, ++ NULL, ++ NULL) == FALSE) { ++ //command has failed ++ return( NULL ); ++ } ++ ++ // Read binary data from pipe and output to file ++ while ((bytes_read = read(stdout_pipe, buffer, sizeof(buffer))) > 0) { ++ g_byte_array_append(binary_data, (guint8 *)buffer, bytes_read); ++ } ++ close(stdout_pipe); ++ ++ FILE *fp = fopen(tmpfn, "wb"); ++ fwrite(binary_data->data, sizeof(gchar), binary_data->len, fp); ++ fclose(fp); ++ g_byte_array_free(binary_data, TRUE); ++ ++ return(tmpfn); + } + + static char *ForceFileToHaveName(FILE *file, char *exten) { diff --git a/fontforge-20090224-pythondl.patch b/fontforge-20090224-pythondl.patch deleted file mode 100644 index 45e04bf..0000000 --- a/fontforge-20090224-pythondl.patch +++ /dev/null @@ -1,41 +0,0 @@ -diff -Nur fontforge-20090224.orig/configure fontforge-20090224/configure ---- fontforge-20090224.orig/configure 2008-12-24 14:04:18.000000000 -0700 -+++ fontforge-20090224/configure 2009-04-01 22:56:07.000000000 -0600 -@@ -26670,6 +26670,7 @@ - else - PYLIBS="" - fi -+ PYDEFINES="$PYDEFINES, ('SOLIBDIR','\"$libdir/\"')" - PY=pyhook/setup.py - fi - -diff -Nur fontforge-20090224.orig/pyhook/loadfontforge.h fontforge-20090224/pyhook/loadfontforge.h ---- fontforge-20090224.orig/pyhook/loadfontforge.h 2007-12-23 19:28:35.000000000 -0700 -+++ fontforge-20090224/pyhook/loadfontforge.h 2009-04-01 22:49:08.000000000 -0600 -@@ -11,7 +11,7 @@ - - if ( (lib = dlopen("libgunicode" SO_EXT,RTLD_LAZY))==NULL ) { - #ifdef PREFIX -- lib = dlopen( PREFIX "/lib/" "libgunicode" SO_EXT,RTLD_LAZY); -+ lib = dlopen( SOLIBDIR "libgunicode.so.3" ,RTLD_LAZY); - #endif - } - if ( lib==NULL ) { -@@ -21,7 +21,7 @@ - - if ( (lib = dlopen("libgutils" SO_EXT,RTLD_LAZY))==NULL ) { - #ifdef PREFIX -- lib = dlopen( PREFIX "/lib/" "libgutils" SO_EXT,RTLD_LAZY); -+ lib = dlopen( SOLIBDIR "libgutils.so.1" ,RTLD_LAZY); - #endif - } - if ( lib==NULL ) { -@@ -31,7 +31,7 @@ - - if ( (lib = dlopen("libfontforge" SO_EXT,RTLD_LAZY))==NULL ) { - #ifdef PREFIX -- lib = dlopen( PREFIX "/lib/" "libfontforge" SO_EXT,RTLD_LAZY); -+ lib = dlopen( SOLIBDIR "libfontforge.so.1" ,RTLD_LAZY); - #endif - } - if ( lib==NULL ) { diff --git a/fontforge-20120731-pdf-bounds.patch b/fontforge-20120731-pdf-bounds.patch deleted file mode 100644 index 400ece4..0000000 --- a/fontforge-20120731-pdf-bounds.patch +++ /dev/null @@ -1,37 +0,0 @@ ---- fontforge-20120731-b/fontforge/parsepdf.c 2012-08-02 16:09:09.000000000 +0100 -+++ fontforge-20120731-b-new/fontforge/parsepdf.c 2013-02-07 17:44:05.371466086 +0000 -@@ -1691,9 +1691,9 @@ - /* to "Unicode" values it specifies rather than to the real order in which the glyphs are */ - /* stored in the file */ - pos = cmap_from_cid || sf->map == NULL ? gid : sf->map->map[gid]; -- sc = sf->glyphs[pos]; - -- if (pos >= 0 && pos < sf->glyphcnt && (sc->unicodeenc != uvals[0] || nuni > 1)) { -+ if (pos >= 0 && pos < sf->glyphcnt && (sf->glyphs[pos]->unicodeenc != uvals[0] || nuni > 1)) { -+ sc = sf->glyphs[pos]; - /* Sometimes FF instead of assigning proper Unicode values to TTF glyphs keeps */ - /* them encoded to the same codepoint, but creates for each glyph an alternate */ - /* encoding, corresponding to the position this glyph has in the font's encoding */ -@@ -1723,6 +1723,7 @@ - FILE *file; - int i, j, gid, start, end, uni, cur=0, nuni, nhex, nchars, lo, *uvals; - long *mappings; -+ size_t num_mappings; - char tok[200], *ccval, prevtok[200]; - SplineFont *sf = basesf->subfontcnt > 0 ? basesf->subfonts[0] : basesf; - -@@ -1733,9 +1734,14 @@ - return; - rewind(file); - -+ num_mappings = sf->glyphcnt; - mappings = gcalloc(sf->glyphcnt,sizeof(long)); - while ( pdf_getprotectedtok(file,tok) >= 0 ) { - if ( strcmp(tok,"beginbfchar") == 0 && sscanf(prevtok,"%d",&nchars)) { -+ if (cur + nchars >= num_mappings) { -+ num_mappings = cur + nchars; -+ mappings = grealloc(mappings, num_mappings * sizeof(long)); -+ } - for (i=0; i= 0 && sscanf(tok,"%x",&gid) && - pdf_skip_brackets(file,tok) >= 0 && sscanf(tok,"%lx",&mappings[cur])) { diff --git a/fontforge-20120731-pdf-filters.patch b/fontforge-20120731-pdf-filters.patch deleted file mode 100644 index ed67875..0000000 --- a/fontforge-20120731-pdf-filters.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- fontforge-20120731-b/fontforge/parsepdf.c.orig 2013-04-15 17:47:51.113706334 +0100 -+++ fontforge-20120731-b/fontforge/parsepdf.c 2013-04-15 17:55:55.531682304 +0100 -@@ -960,6 +960,8 @@ - start = 0; - num = pdf_getinteger(pt,pc); - } -+ if ( (pt=PSDictHasEntry(&pc->pdfdict,"DecodeParms"))!=NULL && strstr(pt, "/Predictor")!=NULL) -+return( NULL ); - if ( (pt=PSDictHasEntry(&pc->pdfdict,"Index"))!=NULL ) { - if ( sscanf(pt,"[%d %d]", &start, &num )!=2 ) - return( NULL ); diff --git a/fontforge-20140813-use-system-uthash.patch b/fontforge-20140813-use-system-uthash.patch deleted file mode 100644 index a9ad950..0000000 --- a/fontforge-20140813-use-system-uthash.patch +++ /dev/null @@ -1,30 +0,0 @@ ---- Makefile.am.old 2014-08-12 10:07:32.000000000 +0530 -+++ Makefile.am 2014-09-08 16:23:56.046996941 +0530 -@@ -43,7 +43,6 @@ - AM_CPPFLAGS = - AM_LDFLAGS = - --BUILT_SOURCES = uthash/src - EXTRA_DIST = - CLEANFILES = - MOSTLYCLEANFILES = -@@ -113,7 +112,6 @@ - Packaging/FontForge-doc.spec \ - Packaging/FontForge.spec \ - Packaging/FontForge.static.spec \ -- uthash/src \ - $(NULL) - - #-------------------------------------------------------------------------- -@@ -129,11 +127,6 @@ - - - #-------------------------------------------------------------------------- --uthash/src: -- if [ ! -e uthash/src ]; then \ -- if [ -e uthash ] ; then rm -r uthash ; fi ; \ -- git clone https://github.com/troydhanson/uthash ; \ -- fi ; - - # We import a selection of targets from Frank's standard packaging Makefile. - diff --git a/fontforge-aarch64.patch b/fontforge-aarch64.patch deleted file mode 100644 index 1521528..0000000 --- a/fontforge-aarch64.patch +++ /dev/null @@ -1,1629 +0,0 @@ -diff -urN fontforge-20120731-b/config.guess fontforge-20120731-b-aarch64/config.guess ---- fontforge-20120731-b/config.guess 2012-08-02 10:09:08.000000000 -0500 -+++ fontforge-20120731-b-aarch64/config.guess 2013-03-03 04:42:30.844067956 -0600 -@@ -1,10 +1,10 @@ - #! /bin/sh - # Attempt to guess a canonical system name. - # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, --# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, --# Inc. -+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, -+# 2011, 2012 Free Software Foundation, Inc. - --timestamp='2007-07-22' -+timestamp='2012-09-25' - - # This file is free software; you can redistribute it and/or modify it - # under the terms of the GNU General Public License as published by -@@ -17,9 +17,7 @@ - # General Public License for more details. - # - # You should have received a copy of the GNU General Public License --# along with this program; if not, write to the Free Software --# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA --# 02110-1301, USA. -+# along with this program; if not, see . - # - # As a special exception to the GNU General Public License, if you - # distribute this file as part of a program that contains a -@@ -27,16 +25,16 @@ - # the same distribution terms that you use for the rest of that program. - - --# Originally written by Per Bothner . --# Please send patches to . Submit a context --# diff and a properly formatted ChangeLog entry. -+# Originally written by Per Bothner. Please send patches (context -+# diff format) to and include a ChangeLog -+# entry. - # - # This script attempts to guess a canonical system name similar to - # config.sub. If it succeeds, it prints the system name on stdout, and - # exits with 0. Otherwise, it exits with 1. - # --# The plan is that this can be called by configure scripts if you --# don't specify an explicit build system type. -+# You can get the latest version of this script from: -+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD - - me=`echo "$0" | sed -e 's,.*/,,'` - -@@ -56,7 +54,8 @@ - GNU config.guess ($timestamp) - - Originally written by Per Bothner. --Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 -+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 - Free Software Foundation, Inc. - - This is free software; see the source for copying conditions. There is NO -@@ -144,7 +143,7 @@ - case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in - *:NetBSD:*:*) - # NetBSD (nbsd) targets should (where applicable) match one or -- # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, -+ # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, - # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently - # switched to ELF, *-*-netbsd* would select the old - # object file format. This provides both forward -@@ -170,7 +169,7 @@ - arm*|i386|m68k|ns32k|sh3*|sparc|vax) - eval $set_cc_for_build - if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ -- | grep __ELF__ >/dev/null -+ | grep -q __ELF__ - then - # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). - # Return netbsd for either. FIX? -@@ -180,7 +179,7 @@ - fi - ;; - *) -- os=netbsd -+ os=netbsd - ;; - esac - # The OS release -@@ -201,6 +200,10 @@ - # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "${machine}-${os}${release}" - exit ;; -+ *:Bitrig:*:*) -+ UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` -+ echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} -+ exit ;; - *:OpenBSD:*:*) - UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` - echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} -@@ -223,7 +226,7 @@ - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` - ;; - *5.*) -- UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` -+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` - ;; - esac - # According to Compaq, /usr/sbin/psrinfo has been available on -@@ -269,7 +272,10 @@ - # A Xn.n version is an unreleased experimental baselevel. - # 1.2 uses "1.2" for uname -r. - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` -- exit ;; -+ # Reset EXIT trap before exiting to avoid spurious non-zero exit code. -+ exitcode=$? -+ trap '' 0 -+ exit $exitcode ;; - Alpha\ *:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # Should we change UNAME_MACHINE based on the output of uname instead -@@ -295,12 +301,12 @@ - echo s390-ibm-zvmoe - exit ;; - *:OS400:*:*) -- echo powerpc-ibm-os400 -+ echo powerpc-ibm-os400 - exit ;; - arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix${UNAME_RELEASE} - exit ;; -- arm:riscos:*:*|arm:RISCOS:*:*) -+ arm*:riscos:*:*|arm*:RISCOS:*:*) - echo arm-unknown-riscos - exit ;; - SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) -@@ -324,14 +330,33 @@ - case `/usr/bin/uname -p` in - sparc) echo sparc-icl-nx7; exit ;; - esac ;; -+ s390x:SunOS:*:*) -+ echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` -+ exit ;; - sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; -+ i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) -+ echo i386-pc-auroraux${UNAME_RELEASE} -+ exit ;; - i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) -- echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` -+ eval $set_cc_for_build -+ SUN_ARCH="i386" -+ # If there is a compiler, see if it is configured for 64-bit objects. -+ # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. -+ # This test works for both compilers. -+ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then -+ if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ -+ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ -+ grep IS_64BIT_ARCH >/dev/null -+ then -+ SUN_ARCH="x86_64" -+ fi -+ fi -+ echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:6*:*) - # According to config.sub, this is the proper way to canonicalize -@@ -375,23 +400,23 @@ - # MiNT. But MiNT is downward compatible to TOS, so this should - # be no problem. - atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) -- echo m68k-atari-mint${UNAME_RELEASE} -+ echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} -- exit ;; -+ exit ;; - *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) -- echo m68k-atari-mint${UNAME_RELEASE} -+ echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) -- echo m68k-milan-mint${UNAME_RELEASE} -- exit ;; -+ echo m68k-milan-mint${UNAME_RELEASE} -+ exit ;; - hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) -- echo m68k-hades-mint${UNAME_RELEASE} -- exit ;; -+ echo m68k-hades-mint${UNAME_RELEASE} -+ exit ;; - *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) -- echo m68k-unknown-mint${UNAME_RELEASE} -- exit ;; -+ echo m68k-unknown-mint${UNAME_RELEASE} -+ exit ;; - m68k:machten:*:*) - echo m68k-apple-machten${UNAME_RELEASE} - exit ;; -@@ -461,8 +486,8 @@ - echo m88k-motorola-sysv3 - exit ;; - AViiON:dgux:*:*) -- # DG/UX returns AViiON for all architectures -- UNAME_PROCESSOR=`/usr/bin/uname -p` -+ # DG/UX returns AViiON for all architectures -+ UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] - then - if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ -@@ -475,7 +500,7 @@ - else - echo i586-dg-dgux${UNAME_RELEASE} - fi -- exit ;; -+ exit ;; - M88*:DolphinOS:*:*) # DolphinOS (SVR3) - echo m88k-dolphin-sysv3 - exit ;; -@@ -532,7 +557,7 @@ - echo rs6000-ibm-aix3.2 - fi - exit ;; -- *:AIX:*:[45]) -+ *:AIX:*:[4567]) - IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` - if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then - IBM_ARCH=rs6000 -@@ -575,52 +600,52 @@ - 9000/[678][0-9][0-9]) - if [ -x /usr/bin/getconf ]; then - sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` -- sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` -- case "${sc_cpu_version}" in -- 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 -- 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 -- 532) # CPU_PA_RISC2_0 -- case "${sc_kernel_bits}" in -- 32) HP_ARCH="hppa2.0n" ;; -- 64) HP_ARCH="hppa2.0w" ;; -+ sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` -+ case "${sc_cpu_version}" in -+ 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 -+ 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 -+ 532) # CPU_PA_RISC2_0 -+ case "${sc_kernel_bits}" in -+ 32) HP_ARCH="hppa2.0n" ;; -+ 64) HP_ARCH="hppa2.0w" ;; - '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 -- esac ;; -- esac -+ esac ;; -+ esac - fi - if [ "${HP_ARCH}" = "" ]; then - eval $set_cc_for_build -- sed 's/^ //' << EOF >$dummy.c -+ sed 's/^ //' << EOF >$dummy.c - -- #define _HPUX_SOURCE -- #include -- #include -- -- int main () -- { -- #if defined(_SC_KERNEL_BITS) -- long bits = sysconf(_SC_KERNEL_BITS); -- #endif -- long cpu = sysconf (_SC_CPU_VERSION); -- -- switch (cpu) -- { -- case CPU_PA_RISC1_0: puts ("hppa1.0"); break; -- case CPU_PA_RISC1_1: puts ("hppa1.1"); break; -- case CPU_PA_RISC2_0: -- #if defined(_SC_KERNEL_BITS) -- switch (bits) -- { -- case 64: puts ("hppa2.0w"); break; -- case 32: puts ("hppa2.0n"); break; -- default: puts ("hppa2.0"); break; -- } break; -- #else /* !defined(_SC_KERNEL_BITS) */ -- puts ("hppa2.0"); break; -- #endif -- default: puts ("hppa1.0"); break; -- } -- exit (0); -- } -+ #define _HPUX_SOURCE -+ #include -+ #include -+ -+ int main () -+ { -+ #if defined(_SC_KERNEL_BITS) -+ long bits = sysconf(_SC_KERNEL_BITS); -+ #endif -+ long cpu = sysconf (_SC_CPU_VERSION); -+ -+ switch (cpu) -+ { -+ case CPU_PA_RISC1_0: puts ("hppa1.0"); break; -+ case CPU_PA_RISC1_1: puts ("hppa1.1"); break; -+ case CPU_PA_RISC2_0: -+ #if defined(_SC_KERNEL_BITS) -+ switch (bits) -+ { -+ case 64: puts ("hppa2.0w"); break; -+ case 32: puts ("hppa2.0n"); break; -+ default: puts ("hppa2.0"); break; -+ } break; -+ #else /* !defined(_SC_KERNEL_BITS) */ -+ puts ("hppa2.0"); break; -+ #endif -+ default: puts ("hppa1.0"); break; -+ } -+ exit (0); -+ } - EOF - (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` - test -z "$HP_ARCH" && HP_ARCH=hppa -@@ -640,7 +665,7 @@ - # => hppa64-hp-hpux11.23 - - if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | -- grep __LP64__ >/dev/null -+ grep -q __LP64__ - then - HP_ARCH="hppa2.0w" - else -@@ -711,22 +736,22 @@ - exit ;; - C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) - echo c1-convex-bsd -- exit ;; -+ exit ;; - C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi -- exit ;; -+ exit ;; - C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) - echo c34-convex-bsd -- exit ;; -+ exit ;; - C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) - echo c38-convex-bsd -- exit ;; -+ exit ;; - C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) - echo c4-convex-bsd -- exit ;; -+ exit ;; - CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; -@@ -750,14 +775,14 @@ - exit ;; - F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) - FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` -- FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` -- FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` -- echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" -- exit ;; -+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` -+ FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` -+ echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" -+ exit ;; - 5000:UNIX_System_V:4.*:*) -- FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` -- FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` -- echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" -+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` -+ FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` -+ echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; - i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} -@@ -769,40 +794,51 @@ - echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} - exit ;; - *:FreeBSD:*:*) -- case ${UNAME_MACHINE} in -- pc98) -- echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; -+ UNAME_PROCESSOR=`/usr/bin/uname -p` -+ case ${UNAME_PROCESSOR} in - amd64) - echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - *) -- echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; -+ echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - esac - exit ;; - i*:CYGWIN*:*) - echo ${UNAME_MACHINE}-pc-cygwin - exit ;; -+ *:MINGW64*:*) -+ echo ${UNAME_MACHINE}-pc-mingw64 -+ exit ;; - *:MINGW*:*) - echo ${UNAME_MACHINE}-pc-mingw32 - exit ;; -+ i*:MSYS*:*) -+ echo ${UNAME_MACHINE}-pc-msys -+ exit ;; - i*:windows32*:*) -- # uname -m includes "-pc" on this system. -- echo ${UNAME_MACHINE}-mingw32 -+ # uname -m includes "-pc" on this system. -+ echo ${UNAME_MACHINE}-mingw32 - exit ;; - i*:PW*:*) - echo ${UNAME_MACHINE}-pc-pw32 - exit ;; -- *:Interix*:[3456]*) -- case ${UNAME_MACHINE} in -+ *:Interix*:*) -+ case ${UNAME_MACHINE} in - x86) - echo i586-pc-interix${UNAME_RELEASE} - exit ;; -- EM64T | authenticamd) -+ authenticamd | genuineintel | EM64T) - echo x86_64-unknown-interix${UNAME_RELEASE} - exit ;; -+ IA64) -+ echo ia64-unknown-interix${UNAME_RELEASE} -+ exit ;; - esac ;; - [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) - echo i${UNAME_MACHINE}-pc-mks - exit ;; -+ 8664:Windows_NT:*) -+ echo x86_64-pc-mks -+ exit ;; - i*:Windows_NT*:* | Pentium*:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we -@@ -832,20 +868,68 @@ - i*86:Minix:*:*) - echo ${UNAME_MACHINE}-pc-minix - exit ;; -- arm*:Linux:*:*) -+ aarch64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; -+ aarch64_be:Linux:*:*) -+ UNAME_MACHINE=aarch64_be -+ echo ${UNAME_MACHINE}-unknown-linux-gnu -+ exit ;; -+ alpha:Linux:*:*) -+ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in -+ EV5) UNAME_MACHINE=alphaev5 ;; -+ EV56) UNAME_MACHINE=alphaev56 ;; -+ PCA56) UNAME_MACHINE=alphapca56 ;; -+ PCA57) UNAME_MACHINE=alphapca56 ;; -+ EV6) UNAME_MACHINE=alphaev6 ;; -+ EV67) UNAME_MACHINE=alphaev67 ;; -+ EV68*) UNAME_MACHINE=alphaev68 ;; -+ esac -+ objdump --private-headers /bin/sh | grep -q ld.so.1 -+ if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi -+ echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} -+ exit ;; -+ arm*:Linux:*:*) -+ eval $set_cc_for_build -+ if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ -+ | grep -q __ARM_EABI__ -+ then -+ echo ${UNAME_MACHINE}-unknown-linux-gnu -+ else -+ if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ -+ | grep -q __ARM_PCS_VFP -+ then -+ echo ${UNAME_MACHINE}-unknown-linux-gnueabi -+ else -+ echo ${UNAME_MACHINE}-unknown-linux-gnueabihf -+ fi -+ fi -+ exit ;; - avr32*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - cris:Linux:*:*) -- echo cris-axis-linux-gnu -+ echo ${UNAME_MACHINE}-axis-linux-gnu - exit ;; - crisv32:Linux:*:*) -- echo crisv32-axis-linux-gnu -+ echo ${UNAME_MACHINE}-axis-linux-gnu - exit ;; - frv:Linux:*:*) -- echo frv-unknown-linux-gnu -+ echo ${UNAME_MACHINE}-unknown-linux-gnu -+ exit ;; -+ hexagon:Linux:*:*) -+ echo ${UNAME_MACHINE}-unknown-linux-gnu -+ exit ;; -+ i*86:Linux:*:*) -+ LIBC=gnu -+ eval $set_cc_for_build -+ sed 's/^ //' << EOF >$dummy.c -+ #ifdef __dietlibc__ -+ LIBC=dietlibc -+ #endif -+EOF -+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` -+ echo "${UNAME_MACHINE}-pc-linux-${LIBC}" - exit ;; - ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu -@@ -856,74 +940,33 @@ - m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; -- mips:Linux:*:*) -+ mips:Linux:*:* | mips64:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU -- #undef mips -- #undef mipsel -+ #undef ${UNAME_MACHINE} -+ #undef ${UNAME_MACHINE}el - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) -- CPU=mipsel -+ CPU=${UNAME_MACHINE}el - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) -- CPU=mips -+ CPU=${UNAME_MACHINE} - #else - CPU= - #endif - #endif - EOF -- eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' -- /^CPU/{ -- s: ::g -- p -- }'`" -- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } -- ;; -- mips64:Linux:*:*) -- eval $set_cc_for_build -- sed 's/^ //' << EOF >$dummy.c -- #undef CPU -- #undef mips64 -- #undef mips64el -- #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) -- CPU=mips64el -- #else -- #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) -- CPU=mips64 -- #else -- CPU= -- #endif -- #endif --EOF -- eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' -- /^CPU/{ -- s: ::g -- p -- }'`" -+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } - ;; - or32:Linux:*:*) -- echo or32-unknown-linux-gnu -- exit ;; -- ppc:Linux:*:*) -- echo powerpc-unknown-linux-gnu -+ echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; -- ppc64:Linux:*:*) -- echo powerpc64-unknown-linux-gnu -+ padre:Linux:*:*) -+ echo sparc-unknown-linux-gnu - exit ;; -- alpha:Linux:*:*) -- case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in -- EV5) UNAME_MACHINE=alphaev5 ;; -- EV56) UNAME_MACHINE=alphaev56 ;; -- PCA56) UNAME_MACHINE=alphapca56 ;; -- PCA57) UNAME_MACHINE=alphapca56 ;; -- EV6) UNAME_MACHINE=alphaev6 ;; -- EV67) UNAME_MACHINE=alphaev67 ;; -- EV68*) UNAME_MACHINE=alphaev68 ;; -- esac -- objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null -- if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi -- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} -+ parisc64:Linux:*:* | hppa64:Linux:*:*) -+ echo hppa64-unknown-linux-gnu - exit ;; - parisc:Linux:*:* | hppa:Linux:*:*) - # Look for CPU level -@@ -933,14 +976,17 @@ - *) echo hppa-unknown-linux-gnu ;; - esac - exit ;; -- parisc64:Linux:*:* | hppa64:Linux:*:*) -- echo hppa64-unknown-linux-gnu -+ ppc64:Linux:*:*) -+ echo powerpc64-unknown-linux-gnu -+ exit ;; -+ ppc:Linux:*:*) -+ echo powerpc-unknown-linux-gnu - exit ;; - s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux - exit ;; - sh64*:Linux:*:*) -- echo ${UNAME_MACHINE}-unknown-linux-gnu -+ echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu -@@ -948,78 +994,18 @@ - sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; -+ tile*:Linux:*:*) -+ echo ${UNAME_MACHINE}-unknown-linux-gnu -+ exit ;; - vax:Linux:*:*) - echo ${UNAME_MACHINE}-dec-linux-gnu - exit ;; - x86_64:Linux:*:*) -- echo x86_64-unknown-linux-gnu -+ echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; -- xtensa:Linux:*:*) -- echo xtensa-unknown-linux-gnu -+ xtensa*:Linux:*:*) -+ echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; -- i*86:Linux:*:*) -- # The BFD linker knows what the default object file format is, so -- # first see if it will tell us. cd to the root directory to prevent -- # problems with other programs or directories called `ld' in the path. -- # Set LC_ALL=C to ensure ld outputs messages in English. -- ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ -- | sed -ne '/supported targets:/!d -- s/[ ][ ]*/ /g -- s/.*supported targets: *// -- s/ .*// -- p'` -- case "$ld_supported_targets" in -- elf32-i386) -- TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" -- ;; -- a.out-i386-linux) -- echo "${UNAME_MACHINE}-pc-linux-gnuaout" -- exit ;; -- coff-i386) -- echo "${UNAME_MACHINE}-pc-linux-gnucoff" -- exit ;; -- "") -- # Either a pre-BFD a.out linker (linux-gnuoldld) or -- # one that does not give us useful --help. -- echo "${UNAME_MACHINE}-pc-linux-gnuoldld" -- exit ;; -- esac -- # Determine whether the default compiler is a.out or elf -- eval $set_cc_for_build -- sed 's/^ //' << EOF >$dummy.c -- #include -- #ifdef __ELF__ -- # ifdef __GLIBC__ -- # if __GLIBC__ >= 2 -- LIBC=gnu -- # else -- LIBC=gnulibc1 -- # endif -- # else -- LIBC=gnulibc1 -- # endif -- #else -- #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) -- LIBC=gnu -- #else -- LIBC=gnuaout -- #endif -- #endif -- #ifdef __dietlibc__ -- LIBC=dietlibc -- #endif --EOF -- eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' -- /^LIBC/{ -- s: ::g -- p -- }'`" -- test x"${LIBC}" != x && { -- echo "${UNAME_MACHINE}-pc-linux-${LIBC}" -- exit -- } -- test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } -- ;; - i*86:DYNIX/ptx:4*:*) - # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. - # earlier versions are messed up and put the nodename in both -@@ -1027,11 +1013,11 @@ - echo i386-sequent-sysv4 - exit ;; - i*86:UNIX_SV:4.2MP:2.*) -- # Unixware is an offshoot of SVR4, but it has its own version -- # number series starting with 2... -- # I am not positive that other SVR4 systems won't match this, -+ # Unixware is an offshoot of SVR4, but it has its own version -+ # number series starting with 2... -+ # I am not positive that other SVR4 systems won't match this, - # I just have to hope. -- rms. -- # Use sysv4.2uw... so that sysv4* matches it. -+ # Use sysv4.2uw... so that sysv4* matches it. - echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} - exit ;; - i*86:OS/2:*:*) -@@ -1048,7 +1034,7 @@ - i*86:syllable:*:*) - echo ${UNAME_MACHINE}-pc-syllable - exit ;; -- i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) -+ i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) - echo i386-unknown-lynxos${UNAME_RELEASE} - exit ;; - i*86:*DOS:*:*) -@@ -1063,7 +1049,7 @@ - fi - exit ;; - i*86:*:5:[678]*) -- # UnixWare 7.x, OpenUNIX and OpenServer 6. -+ # UnixWare 7.x, OpenUNIX and OpenServer 6. - case `/bin/uname -X | grep "^Machine"` in - *486*) UNAME_MACHINE=i486 ;; - *Pentium) UNAME_MACHINE=i586 ;; -@@ -1091,10 +1077,13 @@ - exit ;; - pc:*:*:*) - # Left here for compatibility: -- # uname -m prints for DJGPP always 'pc', but it prints nothing about -- # the processor, so we play safe by assuming i386. -- echo i386-pc-msdosdjgpp -- exit ;; -+ # uname -m prints for DJGPP always 'pc', but it prints nothing about -+ # the processor, so we play safe by assuming i586. -+ # Note: whatever this is, it MUST be the same as what config.sub -+ # prints for the "djgpp" host, or else GDB configury will decide that -+ # this is a cross-build. -+ echo i586-pc-msdosdjgpp -+ exit ;; - Intel:Mach:3*:*) - echo i386-pc-mach3 - exit ;; -@@ -1129,8 +1118,18 @@ - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; - 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) -- /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ -- && { echo i486-ncr-sysv4; exit; } ;; -+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ -+ && { echo i486-ncr-sysv4; exit; } ;; -+ NCR*:*:4.2:* | MPRAS*:*:4.2:*) -+ OS_REL='.3' -+ test -r /etc/.relid \ -+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` -+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ -+ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } -+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ -+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } -+ /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ -+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; - m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - echo m68k-unknown-lynxos${UNAME_RELEASE} - exit ;; -@@ -1143,7 +1142,7 @@ - rs6000:LynxOS:2.*:*) - echo rs6000-unknown-lynxos${UNAME_RELEASE} - exit ;; -- PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) -+ PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) - echo powerpc-unknown-lynxos${UNAME_RELEASE} - exit ;; - SM[BE]S:UNIX_SV:*:*) -@@ -1163,10 +1162,10 @@ - echo ns32k-sni-sysv - fi - exit ;; -- PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort -- # says -- echo i586-unisys-sysv4 -- exit ;; -+ PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort -+ # says -+ echo i586-unisys-sysv4 -+ exit ;; - *:UNIX_System_V:4*:FTX*) - # From Gerald Hewes . - # How about differentiating between stratus architectures? -djm -@@ -1192,11 +1191,11 @@ - exit ;; - R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) - if [ -d /usr/nec ]; then -- echo mips-nec-sysv${UNAME_RELEASE} -+ echo mips-nec-sysv${UNAME_RELEASE} - else -- echo mips-unknown-sysv${UNAME_RELEASE} -+ echo mips-unknown-sysv${UNAME_RELEASE} - fi -- exit ;; -+ exit ;; - BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. - echo powerpc-be-beos - exit ;; -@@ -1206,6 +1205,12 @@ - BePC:BeOS:*:*) # BeOS running on Intel PC compatible. - echo i586-pc-beos - exit ;; -+ BePC:Haiku:*:*) # Haiku running on Intel PC compatible. -+ echo i586-pc-haiku -+ exit ;; -+ x86_64:Haiku:*:*) -+ echo x86_64-unknown-haiku -+ exit ;; - SX-4:SUPER-UX:*:*) - echo sx4-nec-superux${UNAME_RELEASE} - exit ;; -@@ -1233,6 +1238,16 @@ - *:Darwin:*:*) - UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - case $UNAME_PROCESSOR in -+ i386) -+ eval $set_cc_for_build -+ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then -+ if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ -+ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ -+ grep IS_64BIT_ARCH >/dev/null -+ then -+ UNAME_PROCESSOR="x86_64" -+ fi -+ fi ;; - unknown) UNAME_PROCESSOR=powerpc ;; - esac - echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} -@@ -1248,7 +1263,10 @@ - *:QNX:*:4*) - echo i386-pc-qnx - exit ;; -- NSE-?:NONSTOP_KERNEL:*:*) -+ NEO-?:NONSTOP_KERNEL:*:*) -+ echo neo-tandem-nsk${UNAME_RELEASE} -+ exit ;; -+ NSE-*:NONSTOP_KERNEL:*:*) - echo nse-tandem-nsk${UNAME_RELEASE} - exit ;; - NSR-?:NONSTOP_KERNEL:*:*) -@@ -1293,13 +1311,13 @@ - echo pdp10-unknown-its - exit ;; - SEI:*:*:SEIUX) -- echo mips-sei-seiux${UNAME_RELEASE} -+ echo mips-sei-seiux${UNAME_RELEASE} - exit ;; - *:DragonFly:*:*) - echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` - exit ;; - *:*VMS:*:*) -- UNAME_MACHINE=`(uname -p) 2>/dev/null` -+ UNAME_MACHINE=`(uname -p) 2>/dev/null` - case "${UNAME_MACHINE}" in - A*) echo alpha-dec-vms ; exit ;; - I*) echo ia64-dec-vms ; exit ;; -@@ -1314,11 +1332,14 @@ - i*86:rdos:*:*) - echo ${UNAME_MACHINE}-pc-rdos - exit ;; -+ i*86:AROS:*:*) -+ echo ${UNAME_MACHINE}-pc-aros -+ exit ;; -+ x86_64:VMkernel:*:*) -+ echo ${UNAME_MACHINE}-unknown-esx -+ exit ;; - esac - --#echo '(No uname command or uname output not recognized.)' 1>&2 --#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 -- - eval $set_cc_for_build - cat >$dummy.c < - printf ("m68k-sony-newsos%s\n", - #ifdef NEWSOS4 -- "4" -+ "4" - #else -- "" -+ "" - #endif -- ); exit (0); -+ ); exit (0); - #endif - #endif - -@@ -1474,9 +1495,9 @@ - the operating system you are using. It is advised that you - download the most up to date version of the config scripts from - -- http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess -+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD - and -- http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub -+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD - - If the version you run ($0) is already up to date, please - send the following data and any information you think might be -diff -urN fontforge-20120731-b/config.sub fontforge-20120731-b-aarch64/config.sub ---- fontforge-20120731-b/config.sub 2012-08-02 10:09:08.000000000 -0500 -+++ fontforge-20120731-b-aarch64/config.sub 2013-03-03 04:42:30.885063212 -0600 -@@ -1,10 +1,10 @@ - #! /bin/sh - # Configuration validation subroutine script. - # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, --# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, --# Inc. -+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, -+# 2011, 2012 Free Software Foundation, Inc. - --timestamp='2007-06-28' -+timestamp='2012-10-10' - - # This file is (in principle) common to ALL GNU software. - # The presence of a machine in this file suggests that SOME GNU software -@@ -21,9 +21,7 @@ - # GNU General Public License for more details. - # - # You should have received a copy of the GNU General Public License --# along with this program; if not, write to the Free Software --# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA --# 02110-1301, USA. -+# along with this program; if not, see . - # - # As a special exception to the GNU General Public License, if you - # distribute this file as part of a program that contains a -@@ -32,13 +30,16 @@ - - - # Please send patches to . Submit a context --# diff and a properly formatted ChangeLog entry. -+# diff and a properly formatted GNU ChangeLog entry. - # - # Configuration subroutine to validate and canonicalize a configuration type. - # Supply the specified configuration type as an argument. - # If it is invalid, we print an error message on stderr and exit with code 1. - # Otherwise, we print the canonical config type on stdout and succeed. - -+# You can get the latest version of this script from: -+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD -+ - # This file is supposed to be the same for all GNU packages - # and recognize all the CPU types, system types and aliases - # that are meaningful with *any* GNU software. -@@ -72,7 +73,8 @@ - version="\ - GNU config.sub ($timestamp) - --Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 -+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 - Free Software Foundation, Inc. - - This is free software; see the source for copying conditions. There is NO -@@ -120,12 +122,18 @@ - # Here we must recognize all the valid KERNEL-OS combinations. - maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` - case $maybe_os in -- nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ -- uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ -+ nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ -+ linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ -+ knetbsd*-gnu* | netbsd*-gnu* | \ -+ kopensolaris*-gnu* | \ - storm-chaos* | os2-emx* | rtmk-nova*) - os=-$maybe_os - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` - ;; -+ android-linux) -+ os=-linux-android -+ basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown -+ ;; - *) - basic_machine=`echo $1 | sed 's/-[^-]*$//'` - if [ $basic_machine != $1 ] -@@ -148,10 +156,13 @@ - -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ - -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -- -apple | -axis | -knuth | -cray) -+ -apple | -axis | -knuth | -cray | -microblaze*) - os= - basic_machine=$1 - ;; -+ -bluegene*) -+ os=-cnk -+ ;; - -sim | -cisco | -oki | -wec | -winbond) - os= - basic_machine=$1 -@@ -166,10 +177,10 @@ - os=-chorusos - basic_machine=$1 - ;; -- -chorusrdb) -- os=-chorusrdb -+ -chorusrdb) -+ os=-chorusrdb - basic_machine=$1 -- ;; -+ ;; - -hiux*) - os=-hiuxwe2 - ;; -@@ -214,6 +225,12 @@ - -isc*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; -+ -lynx*178) -+ os=-lynxos178 -+ ;; -+ -lynx*5) -+ os=-lynxos5 -+ ;; - -lynx*) - os=-lynxos - ;; -@@ -238,24 +255,32 @@ - # Some are omitted here because they have special meanings below. - 1750a | 580 \ - | a29k \ -+ | aarch64 | aarch64_be \ - | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ - | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ - | am33_2.0 \ - | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ -+ | be32 | be64 \ - | bfin \ - | c4x | clipper \ - | d10v | d30v | dlx | dsp16xx \ -+ | epiphany \ - | fido | fr30 | frv \ - | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ -+ | hexagon \ - | i370 | i860 | i960 | ia64 \ - | ip2k | iq2000 \ -+ | le32 | le64 \ -+ | lm32 \ - | m32c | m32r | m32rle | m68000 | m68k | m88k \ -- | maxq | mb | microblaze | mcore | mep \ -+ | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ - | mips | mipsbe | mipseb | mipsel | mipsle \ - | mips16 \ - | mips64 | mips64el \ -- | mips64vr | mips64vrel \ -+ | mips64octeon | mips64octeonel \ - | mips64orion | mips64orionel \ -+ | mips64r5900 | mips64r5900el \ -+ | mips64vr | mips64vrel \ - | mips64vr4100 | mips64vr4100el \ - | mips64vr4300 | mips64vr4300el \ - | mips64vr5000 | mips64vr5000el \ -@@ -268,29 +293,42 @@ - | mipsisa64sr71k | mipsisa64sr71kel \ - | mipstx39 | mipstx39el \ - | mn10200 | mn10300 \ -+ | moxie \ - | mt \ - | msp430 \ -+ | nds32 | nds32le | nds32be \ - | nios | nios2 \ - | ns16k | ns32k \ -+ | open8 \ - | or32 \ - | pdp10 | pdp11 | pj | pjl \ -- | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ -+ | powerpc | powerpc64 | powerpc64le | powerpcle \ - | pyramid \ -+ | rl78 | rx \ - | score \ -- | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ -+ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ - | sh64 | sh64le \ - | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ - | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ -- | spu | strongarm \ -- | tahoe | thumb | tic4x | tic80 | tron \ -- | v850 | v850e \ -+ | spu \ -+ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ -+ | ubicom32 \ -+ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ - | we32k \ -- | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ -- | z8k) -+ | x86 | xc16x | xstormy16 | xtensa \ -+ | z8k | z80) - basic_machine=$basic_machine-unknown - ;; -- m6811 | m68hc11 | m6812 | m68hc12) -- # Motorola 68HC11/12. -+ c54x) -+ basic_machine=tic54x-unknown -+ ;; -+ c55x) -+ basic_machine=tic55x-unknown -+ ;; -+ c6x) -+ basic_machine=tic6x-unknown -+ ;; -+ m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip) - basic_machine=$basic_machine-unknown - os=-none - ;; -@@ -300,6 +338,21 @@ - basic_machine=mt-unknown - ;; - -+ strongarm | thumb | xscale) -+ basic_machine=arm-unknown -+ ;; -+ xgate) -+ basic_machine=$basic_machine-unknown -+ os=-none -+ ;; -+ xscaleeb) -+ basic_machine=armeb-unknown -+ ;; -+ -+ xscaleel) -+ basic_machine=armel-unknown -+ ;; -+ - # We use `pc' rather than `unknown' - # because (1) that's what they normally are, and - # (2) the word "unknown" tends to confuse beginning users. -@@ -314,29 +367,37 @@ - # Recognize the basic CPU types with company name. - 580-* \ - | a29k-* \ -+ | aarch64-* | aarch64_be-* \ - | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ - | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ - | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ - | avr-* | avr32-* \ -+ | be32-* | be64-* \ - | bfin-* | bs2000-* \ -- | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ -+ | c[123]* | c30-* | [cjt]90-* | c4x-* \ - | clipper-* | craynv-* | cydra-* \ - | d10v-* | d30v-* | dlx-* \ - | elxsi-* \ - | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ - | h8300-* | h8500-* \ - | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ -+ | hexagon-* \ - | i*86-* | i860-* | i960-* | ia64-* \ - | ip2k-* | iq2000-* \ -+ | le32-* | le64-* \ -+ | lm32-* \ - | m32c-* | m32r-* | m32rle-* \ - | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ -- | m88110-* | m88k-* | maxq-* | mcore-* \ -+ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ -+ | microblaze-* | microblazeel-* \ - | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ - | mips16-* \ - | mips64-* | mips64el-* \ -- | mips64vr-* | mips64vrel-* \ -+ | mips64octeon-* | mips64octeonel-* \ - | mips64orion-* | mips64orionel-* \ -+ | mips64r5900-* | mips64r5900el-* \ -+ | mips64vr-* | mips64vrel-* \ - | mips64vr4100-* | mips64vr4100el-* \ - | mips64vr4300-* | mips64vr4300el-* \ - | mips64vr5000-* | mips64vr5000el-* \ -@@ -351,27 +412,36 @@ - | mmix-* \ - | mt-* \ - | msp430-* \ -+ | nds32-* | nds32le-* | nds32be-* \ - | nios-* | nios2-* \ - | none-* | np1-* | ns16k-* | ns32k-* \ -+ | open8-* \ - | orion-* \ - | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ -- | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ -+ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ - | pyramid-* \ -- | romp-* | rs6000-* \ -- | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ -+ | rl78-* | romp-* | rs6000-* | rx-* \ -+ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ - | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ - | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ - | sparclite-* \ -- | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ -- | tahoe-* | thumb-* \ -+ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ -+ | tahoe-* \ - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ -+ | tile*-* \ - | tron-* \ -- | v850-* | v850e-* | vax-* \ -+ | ubicom32-* \ -+ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ -+ | vax-* \ - | we32k-* \ -- | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ -- | xstormy16-* | xtensa-* \ -+ | x86-* | x86_64-* | xc16x-* | xps100-* \ -+ | xstormy16-* | xtensa*-* \ - | ymp-* \ -- | z8k-*) -+ | z8k-* | z80-*) -+ ;; -+ # Recognize the basic CPU types without company name, with glob match. -+ xtensa*) -+ basic_machine=$basic_machine-unknown - ;; - # Recognize the various machine names and aliases which stand - # for a CPU type and a company and sometimes even an OS. -@@ -389,7 +459,7 @@ - basic_machine=a29k-amd - os=-udi - ;; -- abacus) -+ abacus) - basic_machine=abacus-unknown - ;; - adobe68k) -@@ -435,6 +505,10 @@ - basic_machine=m68k-apollo - os=-bsd - ;; -+ aros) -+ basic_machine=i386-pc -+ os=-aros -+ ;; - aux) - basic_machine=m68k-apple - os=-aux -@@ -443,10 +517,35 @@ - basic_machine=ns32k-sequent - os=-dynix - ;; -+ blackfin) -+ basic_machine=bfin-unknown -+ os=-linux -+ ;; -+ blackfin-*) -+ basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` -+ os=-linux -+ ;; -+ bluegene*) -+ basic_machine=powerpc-ibm -+ os=-cnk -+ ;; -+ c54x-*) -+ basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` -+ ;; -+ c55x-*) -+ basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` -+ ;; -+ c6x-*) -+ basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` -+ ;; - c90) - basic_machine=c90-cray - os=-unicos - ;; -+ cegcc) -+ basic_machine=arm-unknown -+ os=-cegcc -+ ;; - convex-c1) - basic_machine=c1-convex - os=-bsd -@@ -475,7 +574,7 @@ - basic_machine=craynv-cray - os=-unicosmp - ;; -- cr16) -+ cr16 | cr16-*) - basic_machine=cr16-unknown - os=-elf - ;; -@@ -514,6 +613,10 @@ - basic_machine=m88k-motorola - os=-sysv3 - ;; -+ dicos) -+ basic_machine=i686-pc -+ os=-dicos -+ ;; - djgpp) - basic_machine=i586-pc - os=-msdosdjgpp -@@ -629,7 +732,6 @@ - i370-ibm* | ibm*) - basic_machine=i370-ibm - ;; --# I'm not sure what "Sysv32" means. Should this be sysv3.2? - i*86v32) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv32 -@@ -668,6 +770,14 @@ - basic_machine=m68k-isi - os=-sysv - ;; -+ m68knommu) -+ basic_machine=m68k-unknown -+ os=-linux -+ ;; -+ m68knommu-*) -+ basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` -+ os=-linux -+ ;; - m88k-omron*) - basic_machine=m88k-omron - ;; -@@ -679,6 +789,13 @@ - basic_machine=ns32k-utek - os=-sysv - ;; -+ microblaze*) -+ basic_machine=microblaze-xilinx -+ ;; -+ mingw64) -+ basic_machine=x86_64-pc -+ os=-mingw64 -+ ;; - mingw32) - basic_machine=i386-pc - os=-mingw32 -@@ -715,10 +832,18 @@ - ms1-*) - basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` - ;; -+ msys) -+ basic_machine=i386-pc -+ os=-msys -+ ;; - mvs) - basic_machine=i370-ibm - os=-mvs - ;; -+ nacl) -+ basic_machine=le32-unknown -+ os=-nacl -+ ;; - ncr3000) - basic_machine=i486-ncr - os=-sysv4 -@@ -783,6 +908,12 @@ - np1) - basic_machine=np1-gould - ;; -+ neo-tandem) -+ basic_machine=neo-tandem -+ ;; -+ nse-tandem) -+ basic_machine=nse-tandem -+ ;; - nsr-tandem) - basic_machine=nsr-tandem - ;; -@@ -813,6 +944,14 @@ - basic_machine=i860-intel - os=-osf - ;; -+ parisc) -+ basic_machine=hppa-unknown -+ os=-linux -+ ;; -+ parisc-*) -+ basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` -+ os=-linux -+ ;; - pbd) - basic_machine=sparc-tti - ;; -@@ -857,9 +996,10 @@ - ;; - power) basic_machine=power-ibm - ;; -- ppc) basic_machine=powerpc-unknown -+ ppc | ppcbe) basic_machine=powerpc-unknown - ;; -- ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` -+ ppc-* | ppcbe-*) -+ basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppcle | powerpclittle | ppc-le | powerpc-little) - basic_machine=powerpcle-unknown -@@ -953,6 +1093,9 @@ - basic_machine=i860-stratus - os=-sysv4 - ;; -+ strongarm-* | thumb-*) -+ basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` -+ ;; - sun2) - basic_machine=m68000-sun - ;; -@@ -1009,17 +1152,9 @@ - basic_machine=t90-cray - os=-unicos - ;; -- tic54x | c54x*) -- basic_machine=tic54x-unknown -- os=-coff -- ;; -- tic55x | c55x*) -- basic_machine=tic55x-unknown -- os=-coff -- ;; -- tic6x | c6x*) -- basic_machine=tic6x-unknown -- os=-coff -+ tile*) -+ basic_machine=$basic_machine-unknown -+ os=-linux-gnu - ;; - tx39) - basic_machine=mipstx39-unknown -@@ -1088,6 +1223,9 @@ - xps | xps100) - basic_machine=xps100-honeywell - ;; -+ xscale-* | xscalee[bl]-*) -+ basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` -+ ;; - ymp) - basic_machine=ymp-cray - os=-unicos -@@ -1096,6 +1234,10 @@ - basic_machine=z8k-unknown - os=-sim - ;; -+ z80-*-coff) -+ basic_machine=z80-unknown -+ os=-sim -+ ;; - none) - basic_machine=none-none - os=-none -@@ -1134,7 +1276,7 @@ - we32k) - basic_machine=we32k-att - ;; -- sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) -+ sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) - basic_machine=sh-unknown - ;; - sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) -@@ -1181,9 +1323,12 @@ - if [ x"$os" != x"" ] - then - case $os in -- # First match some system type aliases -- # that might get confused with valid system types. -+ # First match some system type aliases -+ # that might get confused with valid system types. - # -solaris* is a basic system type, with this one exception. -+ -auroraux) -+ os=-auroraux -+ ;; - -solaris1 | -solaris1.*) - os=`echo $os | sed -e 's|solaris1|sunos4|'` - ;; -@@ -1204,21 +1349,23 @@ - # Each alternative MUST END IN A *, to match a version number. - # -sysv* is not here because it comes later, after sysvr4. - -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ -- | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ -- | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ -+ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ -+ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ -+ | -sym* | -kopensolaris* \ - | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ -- | -aos* \ -+ | -aos* | -aros* \ - | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ - | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ -- | -openbsd* | -solidbsd* \ -+ | -bitrig* | -openbsd* | -solidbsd* \ - | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ - | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ - | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ -- | -chorusos* | -chorusrdb* \ -- | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ -- | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ -+ | -chorusos* | -chorusrdb* | -cegcc* \ -+ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ -+ | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ -+ | -linux-newlib* | -linux-musl* | -linux-uclibc* \ - | -uxpv* | -beos* | -mpeix* | -udk* \ - | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ - | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ -@@ -1226,7 +1373,7 @@ - | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ - | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ - | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ -- | -skyos* | -haiku* | -rdos* | -toppers* | -drops*) -+ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) - # Remember, each alternative MUST END IN *, to match a version number. - ;; - -qnx*) -@@ -1265,7 +1412,7 @@ - -opened*) - os=-openedition - ;; -- -os400*) -+ -os400*) - os=-os400 - ;; - -wince*) -@@ -1314,7 +1461,7 @@ - -sinix*) - os=-sysv4 - ;; -- -tpf*) -+ -tpf*) - os=-tpf - ;; - -triton*) -@@ -1356,6 +1503,11 @@ - -zvmoe) - os=-zvmoe - ;; -+ -dicos*) -+ os=-dicos -+ ;; -+ -nacl*) -+ ;; - -none) - ;; - *) -@@ -1378,10 +1530,10 @@ - # system, and we'll never get to this point. - - case $basic_machine in -- score-*) -+ score-*) - os=-elf - ;; -- spu-*) -+ spu-*) - os=-elf - ;; - *-acorn) -@@ -1393,8 +1545,20 @@ - arm*-semi) - os=-aout - ;; -- c4x-* | tic4x-*) -- os=-coff -+ c4x-* | tic4x-*) -+ os=-coff -+ ;; -+ hexagon-*) -+ os=-elf -+ ;; -+ tic54x-*) -+ os=-coff -+ ;; -+ tic55x-*) -+ os=-coff -+ ;; -+ tic6x-*) -+ os=-coff - ;; - # This must come before the *-dec entry. - pdp10-*) -@@ -1414,14 +1578,11 @@ - ;; - m68000-sun) - os=-sunos3 -- # This also exists in the configure program, but was not the -- # default. -- # os=-sunos4 - ;; - m68*-cisco) - os=-aout - ;; -- mep-*) -+ mep-*) - os=-elf - ;; - mips*-cisco) -@@ -1448,7 +1609,7 @@ - *-ibm) - os=-aix - ;; -- *-knuth) -+ *-knuth) - os=-mmixware - ;; - *-wec) -@@ -1553,7 +1714,7 @@ - -sunos*) - vendor=sun - ;; -- -aix*) -+ -cnk*|-aix*) - vendor=ibm - ;; - -beos*) diff --git a/fontforge.spec b/fontforge.spec index 2c4ec60..846dfdd 100644 --- a/fontforge.spec +++ b/fontforge.spec @@ -1,34 +1,27 @@ %global gettext_package FontForge -%global gnulib_githead 2bf7326 -%global gittag0 20160404 Name: fontforge -Version: 20160404 -Release: 4%{?dist} +Version: 20251009 +Release: 1%{?dist} Summary: Outline and bitmap font editor -License: GPLv3+ +License: GPL-3.0-or-later URL: http://fontforge.github.io/ -Source0: https://github.com/fontforge/%{name}/archive/%{gittag0}.tar.gz#/%{name}-%{version}.tar.gz -# https://github.com/fontforge/fontforge/issues/1725 -Source1: http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=snapshot;h=%{gnulib_githead};sf=tgz;name=gnulib-%{gnulib_githead}.tar.gz -# https://github.com/fontforge/fontforge/pull/1723 -Patch0: fontforge-20140813-use-system-uthash.patch -Patch1: Add-python3-support.patch +Source0: https://github.com/fontforge/%{name}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz Requires: xdg-utils -Requires: autotrace +Requires: (autotrace or potrace) Requires: hicolor-icon-theme -BuildRequires: gcc +BuildRequires: gcc-c++ +BuildRequires: cmake BuildRequires: libjpeg-devel BuildRequires: libtiff-devel BuildRequires: libpng-devel -BuildRequires: libungif-devel +BuildRequires: giflib-devel BuildRequires: libxml2-devel BuildRequires: freetype-devel BuildRequires: desktop-file-utils -BuildRequires: libuninameslist-devel BuildRequires: libXt-devel BuildRequires: xorg-x11-proto-devel BuildRequires: gettext @@ -36,16 +29,20 @@ BuildRequires: pango-devel BuildRequires: cairo-devel BuildRequires: libspiro-devel BuildRequires: python3-devel -BuildRequires: gnulib-devel -BuildRequires: libtool-ltdl-devel BuildRequires: readline-devel -# This is failing on aarch64 so drop it -#BuildRequires: python-ipython -BuildRequires: uthash-devel +BuildRequires: libappstream-glib +BuildRequires: woff2-devel # F25 build is failing add following to fix BuildRequires: shared-mime-info +# F33 onward need now +BuildRequires: gtk3-devel +BuildRequires: python3-sphinx +BuildRequires: make +# 20151009 version requires below +BuildRequires: gtkmm3.0-devel -Provides: bundled(gnulib) +%py_provides python3-fontforge +%py_provides python3-psMat %description FontForge (former PfaEdit) is a font editor for outline and bitmap @@ -54,14 +51,13 @@ fonts. It supports a range of font formats, including PostScript (Type2) and CID-keyed fonts. %package devel -Summary: Development tools for fontforge -Requires: %{name} = %{version}-%{release} +Summary: Development files for fontforge +Requires: %{name}%{?_isa} = %{version}-%{release} Requires: %{name}-doc = %{version}-%{release} -Requires: pkgconfig %description devel -This package includes the libraries and header files you will need -to compile applications against fontforge. +This package includes the library files you will need to compile +applications against fontforge. %package doc Summary: Documentation files for %{name} @@ -72,103 +68,279 @@ This package contains documentation files for %{name}. %prep -%setup -q -n %{name}-%{version} -tar xzf %{SOURCE1} - -%patch0 -p0 -%patch1 -p1 -sed -i -e '/^#!\//, 1d' pycontrib/webcollab.py - -mkdir htdocs -cp -pr doc/html/* htdocs -chmod 644 htdocs/nonBMP/index.html -# Fix bad line terminators -%{__sed} -i 's/\r//' htdocs/Big5.txt -%{__sed} -i 's/\r//' htdocs/corpchar.txt +%autosetup %build -./bootstrap --skip-git --gnulib-srcdir=gnulib-%{gnulib_githead} export CFLAGS="%{optflags} -fno-strict-aliasing" - -%configure PYTHON=python3 -make V=1 %{?_smp_mflags} +%cmake -DCMAKE_BUILD_TYPE=Release \ + -DENABLE_WOFF2=ON \ + -DPYHOOK_INSTALL_DIR=%{python3_sitearch} +%cmake_build %install -make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p" -rm -f $RPM_BUILD_ROOT%{_libdir}/libg{draw,unicode}.{la,so} +%cmake_install desktop-file-install \ --dir $RPM_BUILD_ROOT%{_datadir}/applications \ --add-category X-Fedora \ - desktop/fontforge.desktop - -# The fontforge makefiles install htdocs as well, but we -# prefer to have them under the standard RPM location, so -# remove the extra copy -rm -rf $RPM_BUILD_ROOT%{_datadir}/doc/fontforge + desktop/org.fontforge.FontForge.desktop # remove unneeded .la and .a files find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';' find $RPM_BUILD_ROOT -name '*.a' -exec rm -f {} ';' +rm -f %{buildroot}%{_datadir}/doc/fontforge/{.buildinfo,.nojekyll} +appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/*.appdata.xml + # Find translations %find_lang %{gettext_package} -mkdir -p $RPM_BUILD_ROOT%{_datadir}/appdata -install -m 644 -p desktop/fontforge.appdata.xml $RPM_BUILD_ROOT%{_datadir}/appdata - -mkdir -p $RPM_BUILD_ROOT%{_datadir}/mime/packages -install -m 644 -p desktop/fontforge.xml $RPM_BUILD_ROOT%{_datadir}/mime/packages/ - -#Makefile install rules are playing evil here. Let's correct the permission. -#chmod 644 $RPM_BUILD_ROOT%{_datadir}/fontforge/python/graphicore/__init__.py -chmod 644 $RPM_BUILD_ROOT%{_datadir}/fontforge/python/gdraw/_gdraw.py - -chmod 644 $RPM_BUILD_ROOT%{_datadir}/fontforge/nodejs/collabwebview/css/*.css -chmod 644 $RPM_BUILD_ROOT%{_datadir}/fontforge/nodejs/collabwebview/js/*.js -chmod 644 $RPM_BUILD_ROOT%{_datadir}/fontforge/nodejs/collabwebview/js/contentEditable/* - -%post -update-desktop-database &> /dev/null || : -/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : -/usr/bin/update-mime-database %{_datadir}/mime &> /dev/null || : -/sbin/ldconfig - -%postun -update-desktop-database &> /dev/null || : -if [ $1 -eq 0 ] ; then - /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null - /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : - /usr/bin/update-mime-database %{_datadir}/mime &> /dev/null || : -fi -/sbin/ldconfig - -%posttrans -/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : +%check +%ctest %files -f %{gettext_package}.lang %doc AUTHORS -%license LICENSE +%license LICENSE COPYING.gplv3 %{_bindir}/* %{_libdir}/lib*.so.* -%{_datadir}/applications/*fontforge.desktop +%{_datadir}/applications/*FontForge.desktop %{_datadir}/fontforge -%{_datadir}/icons/hicolor/*/apps/fontforge.* +%{_datadir}/icons/hicolor/*/apps/org.fontforge.FontForge* %{_mandir}/man1/*.1* %{_datadir}/mime/packages/fontforge.xml -%{_datadir}/appdata/fontforge.appdata.xml +%{_metainfodir}/org.fontforge.FontForge.appdata.xml %{python3_sitearch}/fontforge.so %{python3_sitearch}/psMat.so %files devel -%{_includedir}/fontforge/ %{_libdir}/lib*.so -%{_libdir}/pkgconfig/*.pc %files doc -%doc htdocs +%doc %{_pkgdocdir} %changelog +* Fri Oct 10 2025 Parag Nemade - 20251009-1 +- Update to 20251009 version (#2402960) +- Remove upstream released patches +- Add new BR: gtkmm3.0-devel + +* Wed Jul 23 2025 Fedora Release Engineering - 20230101-18 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + +* Thu Jul 17 2025 Parag Nemade - 20230101-17 +- Update for https://fedoraproject.org/wiki/Changes/CMake_ninja_default (rh#2381004) + +* Tue Jun 03 2025 Python Maint - 20230101-16 +- Rebuilt for Python 3.14 + +* Thu Jan 16 2025 Fedora Release Engineering - 20230101-15 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + +* Wed Jul 17 2024 Fedora Release Engineering - 20230101-14 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + +* Fri Jun 14 2024 Gwyn Ciesla - 20230101-13 +- Patch for Python 3.13 + +* Fri Jun 07 2024 Python Maint - 20230101-12 +- Rebuilt for Python 3.13 + +* Wed Feb 28 2024 Parag Nemade - 20230101-11 +- Resolves: CVE-2024-25081 and CVE-2024-25082 + +* Wed Jan 24 2024 Fedora Release Engineering - 20230101-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Fri Jan 19 2024 Fedora Release Engineering - 20230101-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Thu Aug 10 2023 Yaakov Selkowitz - 20230101-8 +- Drop unused libuninameslist dependency + +* Tue Aug 08 2023 Yaakov Selkowitz - 20230101-7 +- Allow potrace as an alternative to autotrace + +* Wed Jul 19 2023 Fedora Release Engineering - 20230101-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Fri Jul 07 2023 Parag Nemade - 20230101-5 +- Fix fr.po and it.po translations issue + +* Wed Jun 14 2023 Python Maint - 20230101-4 +- Rebuilt for Python 3.12 + +* Thu Jan 19 2023 Fedora Release Engineering - 20230101-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Mon Jan 02 2023 Parag Nemade - 20230101-2 +- Update license tag to SPDX format +- Fix test failure + +* Mon Jan 02 2023 Parag Nemade - 20230101-1 +- Update to 20230101 version (#2157290) + +* Thu Jul 21 2022 Fedora Release Engineering - 20220308-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Mon Jun 13 2022 Python Maint - 20220308-2 +- Rebuilt for Python 3.11 + +* Thu Mar 10 2022 Parag Nemade - 20220308-1 +- Update to 20220308 version (#2062047) + +* Thu Jan 20 2022 Fedora Release Engineering - 20201107-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Wed Jul 21 2021 Fedora Release Engineering - 20201107-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Fri Jun 04 2021 Python Maint - 20201107-4 +- Rebuilt for Python 3.10 + +* Mon Feb 01 2021 Parag Nemade - 20201107-3 +- The %%find_lang should run as part of %%install only + +* Tue Jan 26 2021 Fedora Release Engineering - 20201107-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Wed Nov 25 2020 Parag Nemade - 20201107-1 +- Update to 20201107 version (#1895648) +- removed %%gittag0 macro, as it cause problem to automated package update script + +* Sun Nov 22 2020 Benjamin A. Beasley - 20200314-10 +- Add py_provides macros to provide python3-fontforge, python3-psMat, etc. + +* Wed Aug 05 2020 Parag Nemade - 20200314-9 +- Fix FTBFS bug by fixing glossary.rst and using new CMake macros + +* Sat Aug 01 2020 Fedora Release Engineering - 20200314-8 +- Second attempt - Rebuilt for + https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Mon Jul 27 2020 Fedora Release Engineering - 20200314-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Tue May 26 2020 Miro Hrončok - 20200314-6 +- Rebuilt for Python 3.9 + +* Sat May 02 2020 Parag Nemade - 20200314-5 +- Resolves:rhbz#1830502 - Add missing WOFF2 support + +* Wed Apr 15 2020 Parag Nemade - 20200314-4 +- Resolves:rhbz#1823525 - fontforge fails to build with Sphinx 3.0.0 + +* Thu Apr 02 2020 Parag Nemade - 20200314-3 +- Fix the GDK backend UI issues +- Move back to using GDK backend + +* Fri Mar 27 2020 Parag Nemade - 20200314-2 +- Enabled X11 and 2012 theme + +* Wed Mar 25 2020 Parag Nemade - 20200314-1 +- Update to 20200314 version (#1813578) + +* Sun Feb 16 2020 Parag Nemade - 20190801-6 +- another fix for rh#1790042 - CVE-2020-5395:out-of-bounds write in sfd.c + +* Tue Jan 28 2020 Fedora Release Engineering - 20190801-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Thu Jan 16 2020 Parag Nemade - 20190801-4 +- Resolves:rh#1790042 - CVE-2020-5395:out-of-bounds write in sfd.c + +* Tue Aug 27 2019 Kevin Fenzi - 20190801-3 +- Rebuild for new libspiro + +* Mon Aug 19 2019 Miro Hrončok - 20190801-2 +- Rebuilt for Python 3.8 + +* Thu Aug 15 2019 Parag Nemade - 20190801-1 +- Update to 20190801 version (#1739819) +- Upstream moved to use Glib's GHashTable over uthash +- Upstream dropped requiring bundling copy of gnulib + +* Fri Aug 02 2019 Parag Nemade - 20190413-4 +- Fix the conditional for rh#1728058 + +* Thu Jul 25 2019 Fedora Release Engineering - 20190413-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Tue Jul 23 2019 Parag Nemade - 20190413-2 +- make the code compatible with python-3.8 (rh#1728058) + +* Sat Apr 13 2019 Parag Nemade - 20190413-1 +- Update to 20190413 version (#1689629) + +* Mon Mar 25 2019 Parag Nemade - 20190317-1 +- Update to 20190317 release (#1689629) + +* Sun Feb 17 2019 Igor Gnatenko - 20170731-12 +- Rebuild for readline 8.0 + +* Thu Jan 31 2019 Fedora Release Engineering - 20170731-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Mon Jul 23 2018 Miro Hrončok - 20170731-10 +- Rebuilt for #1595421 + +* Fri Jul 13 2018 Fedora Release Engineering - 20170731-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Wed Jul 04 2018 Kevin Fenzi - -8 +- Update bundled gnulib. Fixes bug #1596037 + +* Thu Jun 28 2018 Miro Hrončok - 20170731-7 +- Rebuilt for Python 3.7.0 final (#1595421) + +* Tue Jun 19 2018 Miro Hrončok - 20170731-6 +- Rebuilt for Python 3.7 + +* Sun Feb 11 2018 Sandro Mani - 20170731-5 +- Rebuild (giflib) + +* Wed Feb 07 2018 Fedora Release Engineering - 20170731-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Thu Jan 11 2018 Igor Gnatenko - 20170731-3 +- Remove obsolete scriptlets + +* Wed Aug 02 2017 Fedora Release Engineering - 20170731-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Mon Jul 31 2017 Parag Nemade - 20170731-1 +- Update to 20170731 + +* Wed Jul 26 2017 Fedora Release Engineering - 20161012-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Thu Mar 09 2017 Parag Nemade - 20161012-6 +- Resolves:rh#1429574 - [abrt] fontforge: PyFF_OpenFont(): fontforge killed by signal 6 +- Added patch to fix python module for python3.6 + +* Sat Feb 18 2017 Parag Nemade - 20161012-5 +- Add missing BR: git + +* Fri Feb 10 2017 Fedora Release Engineering - 20161012-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Thu Jan 12 2017 Igor Gnatenko - 20161012-3 +- Rebuild for readline 7.x + +* Mon Dec 19 2016 Miro Hrončok - 20161012-2 +- Rebuild for Python 3.6 + +* Thu Oct 13 2016 Parag Nemade - 20161012-1 +- Update to 20161012 + +* Thu Oct 06 2016 Parag Nemade - 20161005-1 +- Update to 20161005 + +* Wed Oct 05 2016 Parag Nemade - 20161004-1 +- Update to 20161004 + +* Mon Oct 03 2016 Parag Nemade - 20161001-1 +- Update to 20161001 + * Tue Jul 19 2016 Fedora Release Engineering - 20160404-4 - https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages diff --git a/plans/fontforge.fmf b/plans/fontforge.fmf new file mode 100644 index 0000000..c1627f9 --- /dev/null +++ b/plans/fontforge.fmf @@ -0,0 +1,5 @@ +summary: Basic smoke test +discover: + how: fmf +execute: + how: tmt diff --git a/pyconfig.patch b/pyconfig.patch new file mode 100644 index 0000000..cfd90f4 --- /dev/null +++ b/pyconfig.patch @@ -0,0 +1,24 @@ +--- pycontrib/FontCompare/setup.py~ 2022-12-31 23:25:21.000000000 -0600 ++++ pycontrib/FontCompare/setup.py 2024-06-14 15:14:14.119920623 -0500 +@@ -15,7 +15,6 @@ + along with this program. If not, see . + """ + #!/usr/bin/env python +-from distutils.core import setup + from setuptools import setup + setup(name='Font Compare', + version='1.0', +--- fontforge/python.c~ 2022-12-31 23:25:21.000000000 -0600 ++++ fontforge/python.c 2024-06-14 15:38:41.397897757 -0500 +@@ -19633,7 +19633,10 @@ + if ( saved_progname ) + free(saved_progname); + saved_progname = copy_to_wide_string(progname); +- Py_SetProgramName(saved_progname); ++ PyStatus status; ++ PyConfig config; ++ PyConfig_InitPythonConfig(&config); ++ status = PyConfig_SetString(&config, &config.program_name, saved_progname); + } + + static wchar_t ** copy_argv(char *arg0, int argc ,char **argv) { diff --git a/sources b/sources index bbc9e7b..3c609cb 100644 --- a/sources +++ b/sources @@ -1,2 +1 @@ -1daba85b251e00c614e4e857c67cae4c fontforge-20160404.tar.gz -149162d1d21a0dfc705a31916f4b0cd0 gnulib-2bf7326.tar.gz +SHA512 (fontforge-20251009.tar.gz) = 2923c54e10585551c93102d8b7a389c9de3c629c1676fc8c576c9b9c3f1f6fe28f7a1e39fd5a57ab7eeadf0b17d722bf439ca94f0a788ceab6993e1a93ea7d5f diff --git a/tests/generate-font.py b/tests/generate-font.py new file mode 100644 index 0000000..633001f --- /dev/null +++ b/tests/generate-font.py @@ -0,0 +1,14 @@ +import fontforge +import os + +myFont = fontforge.open("Cantarell-Regular.ttf") +myFont.generate("Cantarell-Regular.sfd") +myFont.close() + +myFont = fontforge.open("Cantarell-Regular.sfd") +myFont.generate("Cantarell-Regular.ttf") +myFont.close() + +os.remove("Cantarell-Regular.ttf") +os.remove("Cantarell-Regular.sfd") + diff --git a/tests/generate-sfd.pe b/tests/generate-sfd.pe new file mode 100755 index 0000000..4877fc8 --- /dev/null +++ b/tests/generate-sfd.pe @@ -0,0 +1,7 @@ +#!/usr/bin/fontforge +i=1 +Open($argv[i], 1) +#Use gen_flags=Defualt fmflags value as -1 +gen_flags = -1 +Generate("" + $fontname + ".sfd", "", gen_flags) + diff --git a/tests/generate-ttf.pe b/tests/generate-ttf.pe new file mode 100755 index 0000000..6ed2dda --- /dev/null +++ b/tests/generate-ttf.pe @@ -0,0 +1,10 @@ +#!/usr/bin/fontforge +i=1 +Open($argv[i], 1) +#Use gen_flags=Defualt fmflags value as -1 +gen_flags = -1 +Generate("" + $fontname + ".ttf", "", gen_flags) +Generate("" + $fontname + ".otf", "", gen_flags) +PrintSetup (5) +PrintFont (0, 0, "", $fontname + "-sample.pdf") + diff --git a/tests/get-font-metadata.py b/tests/get-font-metadata.py new file mode 100644 index 0000000..b28ad84 --- /dev/null +++ b/tests/get-font-metadata.py @@ -0,0 +1,31 @@ +#!/usr/bin/python3 + +import fontforge +import sys + +if len(sys.argv) > 1: + f = fontforge.open(sys.argv[1]) +else: + print("provide fontfile path as an argument") + sys.exit(1) + +if f.fullname: + print("Fontname is {0}".format(f.fullname)) +else: + print("fontname not set") +if f.weight: + print("Given font weight is {0}".format(f.weight)) +else: + print("Given font weight not set") +if f.version: + print("Given font version is {0}".format(f.version)) +else: + print("Given font version not set") +if f.copyright: + print("Given font Copyright text is => {0}".format(f.copyright)) +else: + print("Given font copyright information not set") + +ver = fontforge.UnicodeNamesListVersion() +print("Libuninameslist version is : %s" % ver) + diff --git a/tests/main.fmf b/tests/main.fmf new file mode 100644 index 0000000..542903b --- /dev/null +++ b/tests/main.fmf @@ -0,0 +1,5 @@ +require: +- fontforge +test: bash ./run_tests.sh +framework: shell + diff --git a/tests/run_tests.sh b/tests/run_tests.sh new file mode 100755 index 0000000..389d6f5 --- /dev/null +++ b/tests/run_tests.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +cp /usr/share/fontforge/pixmaps/Cantarell-Regular.ttf . + +echo "----------------------------------------------------------" +echo "Executing get-font-metadata.py on Cantarell-Regular.ttf =>" +/usr/bin/python3 get-font-metadata.py ./Cantarell-Regular.ttf + +echo "----------------------------------------------------------" +echo "Executing generate-font.py on Cantarell-Regular.ttf =>" +/usr/bin/python3 generate-font.py ./Cantarell-Regular.ttf + +echo "----------------------------------------------------------" +cp /usr/share/fontforge/pixmaps/Cantarell-Regular.ttf . +echo "Executing generate-sfd.pe on Cantarell-Regular.ttf =>" +/usr/bin/fontforge -script generate-sfd.pe ./Cantarell-Regular.ttf +rm Cantarell-Regular.ttf + +echo "----------------------------------------------------------" +echo "Executing generate-ttf.pe on Cantarell-Regular.sfd =>" +/usr/bin/fontforge -script generate-ttf.pe ./Cantarell-Regular.sfd +echo "----------------------------------------------------------" + diff --git a/tests/runtests.sh b/tests/runtests.sh new file mode 100755 index 0000000..a94d8f5 --- /dev/null +++ b/tests/runtests.sh @@ -0,0 +1,47 @@ +#!/bin/bash +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +NAME=fontforge + +rlJournalStart + rlPhaseStartSetup + rlAssertRpm ${NAME} + rlAssertRpm ${NAME}-devel + rlShowPackageVersion ${NAME} + rlRun -t -l "VERSION=$(rpm -q ${NAME} --queryformat='%{version}')" 0 "Get VERSION" + FEDORA_VERSION=$(rlGetDistroRelease) + rlLog "FEDORA_VERSION=${DISTRO_RELEASE}" + rlRun "tmp=\$(mktemp -d)" 0 "Create tmp directory" + rlRun "pushd $tmp" + rlFetchSrcForInstalled "${NAME}" + rlRun "rpm --define '_topdir $tmp' -i *src.rpm" + rlRun -t -l "mkdir BUILD" 0 "Creating BUILD directory" + rlRun -t -l "rpmbuild --noclean --nodeps --define '_topdir $tmp' -bp $tmp/SPECS/*spec" + if [ -d BUILD/${NAME}-${VERSION}-build ]; then + rlRun -t -l "pushd BUILD/${NAME}-${VERSION}-build/${NAME}-${VERSION}" + else + rlRun -t -l "pushd BUILD/${NAME}-${VERSION}" + fi + rlRun "set -o pipefail" + rlRun "NOCONFIGURE=1 ./autogen.sh" + rlRun "./configure --disable-static --with-graphite2 --with-gobject --enable-introspection" + rlRun "make check" + rlRun "retval=$?" + rlRun "echo $retval" + rlPhaseEnd + + rlPhaseStartTest + rlRun -t -l "INSTALLED_VERSION=$(hb-info --version|awk 'NR==1 {print $3}')" \ + 0 "Get installed version" + rlAssertEquals "versions should be equal" "${VERSION}" "${INSTALLED_VERSION}" + rlGetTestState + rlLog "Number of failed asserts so far: ${ECODE}" + rlRun "popd" 0 + rlPhaseEnd + + rlPhaseStartCleanup + rlRun "popd" + rlRun "rm -r $tmp" 0 "Remove tmp directory" + rlPhaseEnd +rlJournalEnd +