[gentoo-commits] repo/gentoo:master commit in: media-gfx/fontforge/, media-gfx/fontforge/files/

2024-05-03 Thread Sam James
commit: 26a218c56917878f75b6fa995d3336de799462f1
Author: Christopher Fore  posteo  net>
AuthorDate: Wed Apr 24 13:21:02 2024 +
Commit: Sam James  gentoo  org>
CommitDate: Fri May  3 11:18:53 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=26a218c5

media-gfx/fontforge: Add security patch

- CVE-2024-25081, CVE-2024-25082
- Tests pass
- Revbump

Bug: https://bugs.gentoo.org/926521
Signed-off-by: Christopher Fore  posteo.net>
Closes: https://github.com/gentoo/gentoo/pull/36405
Signed-off-by: Sam James  gentoo.org>

 ...01-fix-splinefont-shell-command-injection.patch | 174 +
 media-gfx/fontforge/fontforge-20230101-r1.ebuild   | 111 +
 2 files changed, 285 insertions(+)

diff --git 
a/media-gfx/fontforge/files/fontforge-20230101-fix-splinefont-shell-command-injection.patch
 
b/media-gfx/fontforge/files/fontforge-20230101-fix-splinefont-shell-command-injection.patch
new file mode 100644
index ..e61f2b8d3633
--- /dev/null
+++ 
b/media-gfx/fontforge/files/fontforge-20230101-fix-splinefont-shell-command-injection.patch
@@ -0,0 +1,174 @@
+https://github.com/fontforge/fontforge/commit/216eb14b558df344b206bf82e2bdaf03a1f2f429
+
+From 216eb14b558df344b206bf82e2bdaf03a1f2f429 Mon Sep 17 00:00:00 2001
+From: Peter Kydas 
+Date: Tue, 6 Feb 2024 20:03:04 +1100
+Subject: [PATCH] fix splinefont shell command injection (#5367)
+
+--- 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
++  ) == F

[gentoo-commits] repo/gentoo:master commit in: media-gfx/fontforge/, media-gfx/fontforge/files/

2023-06-23 Thread Sam James
commit: 55202622636b05743e43da276e5a04f054c473e0
Author: Sam James  gentoo  org>
AuthorDate: Fri Jun 23 22:38:06 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Fri Jun 23 22:42:03 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=55202622

media-gfx/fontforge: workaround build failure w/ gettext-0.22

Closes: https://bugs.gentoo.org/908868
Thanks-to: James McGeehan IV  gmail.com>
Signed-off-by: Sam James  gentoo.org>

 ...e-20230101-workaround-broken-translations.patch | 159 +
 media-gfx/fontforge/fontforge-20230101.ebuild  |   1 +
 2 files changed, 160 insertions(+)

diff --git 
a/media-gfx/fontforge/files/fontforge-20230101-workaround-broken-translations.patch
 
b/media-gfx/fontforge/files/fontforge-20230101-workaround-broken-translations.patch
new file mode 100644
index ..e195e433be4e
--- /dev/null
+++ 
b/media-gfx/fontforge/files/fontforge-20230101-workaround-broken-translations.patch
@@ -0,0 +1,159 @@
+https://bugs.gentoo.org/908868
+https://savannah.gnu.org/bugs/index.php?64333
+https://github.com/fontforge/fontforge/issues/5251
+
+From f80f80871c6e3777f9974a44058f494eb5353c66 Mon Sep 17 00:00:00 2001
+From: blockiv 
+Date: Thu, 22 Jun 2023 04:39:16 +
+Subject: [PATCH] Mark breaking translations as fuzzy
+
+--- a/po/fr.po
 b/po/fr.po
+@@ -289,7 +289,7 @@ msgstr "chaîne %1$.30s pour %2$.30s"
+ #. GT: $2 is the glyph's encoding
+ #. GT: $3 is the font name
+ #. GT: $4 is the changed flag ('*' for the changed items)
+-#, c-format
++#, c-format, fuzzy
+ msgid "%1$.80s at %2$d from %3$.90s%4$s"
+ msgstr "%1$.80s à %2$d de %3$.90hs%4$s"
+ 
+@@ -300,7 +300,7 @@ msgstr "%1$.80s à %2$d de %3$.90hs%4$s"
+ #. GT: $2 is the glyph's encoding
+ #. GT: $3 is the pixel size of the bitmap font
+ #. GT: $4 is the font name
+-#, c-format
++#, c-format, fuzzy
+ msgid "%1$.80s at %2$d size %3$d from %4$.80s"
+ msgstr "%1$.80s (%2$d) taille %3$d de %4$.80hs"
+ 
+@@ -7427,7 +7427,7 @@ msgstr ""
+ "La fonte %1$.40s dans le fichier %2$.40s a été modifiée.\n"
+ "Voulez-vous l'enregistrer ?"
+ 
+-#, c-format
++#, c-format, fuzzy
+ msgid ""
+ "Font %1$.40s in file %2$.40s has been changed.\n"
+ "Reverting the file will lose those changes.\n"
+@@ -19920,7 +19920,7 @@ msgstr ""
+ "Le nom de la fonte commence avec une séquence d'ordre d'octet utf8.  Ceci "
+ "n'est pas permis.  %s"
+ 
+-#, c-format
++#, c-format, fuzzy
+ msgid ""
+ "The fonts %1$.30s and %2$.30s have a different number of glyphs or different 
"
+ "encodings"
+@@ -19928,7 +19928,7 @@ msgstr ""
+ "Les fontes %1$.30s et %2$.30hs n'ont pas le même nombre de glyphes ou des "
+ "codages différents"
+ 
+-#, c-format
++#, c-format, fuzzy
+ msgid ""
+ "The fonts %1$.30s and %2$.30s use different types of splines (one quadratic, 
"
+ "one cubic)"
+@@ -19963,7 +19963,7 @@ msgstr ""
+ "Le glyphe %1$.30s dans %2$.30s a à la fois des références et des contours. "
+ "Ceci n'est pas supporté dans une fonte MM"
+ 
+-#, c-format
++#, c-format, fuzzy
+ msgid ""
+ "The glyph %1$.30s in font %2$.30s has a different hint mask on its contours "
+ "than in %3$.30s"
+@@ -19979,7 +19979,7 @@ msgstr ""
+ "Le glyphe %1$.30s de la fonte %2$.30s a un nombre de points (ou de points de 
"
+ "contrôle) différent que dans %3$.30s"
+ 
+-#, c-format
++#, c-format, fuzzy
+ msgid ""
+ "The glyph %1$.30s in font %2$.30s has a different number of references than "
+ "in %3$.30s"
+@@ -20454,7 +20454,7 @@ msgstr ""
+ "individuellement. Cela peut être utile si vous vouliez\n"
+ "conserver les versions quadratiques et cubiques d'une fonte."
+ 
+-#, c-format
++#, c-format, fuzzy
+ 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"
+@@ -21040,7 +21040,7 @@ msgstr ""
+ msgid "There is already a subtable with that name, please pick another."
+ msgstr "Il y a déjà une sous-table avec ce nom, changez de nom SVP"
+ 
+-#, c-format
++#, c-format, fuzzy
+ 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."
+ 
+@@ -21435,7 +21435,7 @@ msgstr ""
+ "Cette fonte ne précise pas de 'unitsPerEm', alors nous assumons que c'est "
+ "1000."
+ 
+-#, c-format
++#, c-format, fuzzy
+ msgid ""
+ "This font is based on the charset %1$.20s-%2$.20s-%3$d, but the best I've "
+ "been able to find is %1$.20s-%2$.20s-%4$d.\n"
+@@ -21764,7 +21764,7 @@ msgstr ""
+ "Et sur в, г, д, е, ж, л, м, ц, щ, ъ, ђ\n"
+ "Et sur toutes les lettres grecques minuscules. Et peut être tout le reste."
+ 
+-#, c-format
++#, c-format, fuzzy
+ msgid ""
+ "This kerning pair (%.20s and %.20s) is currently part of a kerning class "
+ "with a 0 offset for this combination. Would you like to alter this kerning "
+@@ -24544,7 +24544,7 @@ msgstr ""
+ "Vous voulez effacer %.30s qui est référencé par un\n"
+ "autre glyphe. Êtes-vous sûr(e) de vouloir poursuivre ?"
+ 
+-#, c-format
++#, c-form

[gentoo-commits] repo/gentoo:master commit in: media-gfx/fontforge/, media-gfx/fontforge/files/

2021-04-06 Thread Andreas Sturmlechner
commit: db4025b7f2be0a24443b8753fa37b5e4f1f0727e
Author: Andreas Sturmlechner  gentoo  org>
AuthorDate: Tue Apr  6 10:50:41 2021 +
Commit: Andreas Sturmlechner  gentoo  org>
CommitDate: Tue Apr  6 11:06:48 2021 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=db4025b7

media-gfx/fontforge: Drop 20200314

Package-Manager: Portage-3.0.18, Repoman-3.0.3
Signed-off-by: Andreas Sturmlechner  gentoo.org>

 media-gfx/fontforge/Manifest   |   1 -
 .../files/20200314-MacServiceReadFDs.patch |  38 ---
 .../fontforge/files/20200314-big-endian.patch  | 298 -
 media-gfx/fontforge/files/20200314-stylemap.patch  |  30 ---
 media-gfx/fontforge/files/20200314-tilepath.patch  |  31 ---
 .../files/fontforge-20200314-freetype-2.10.3.patch |  60 -
 media-gfx/fontforge/fontforge-20200314.ebuild  | 117 
 7 files changed, 575 deletions(-)

diff --git a/media-gfx/fontforge/Manifest b/media-gfx/fontforge/Manifest
index 74c0099dc36..11eaed59173 100644
--- a/media-gfx/fontforge/Manifest
+++ b/media-gfx/fontforge/Manifest
@@ -1,2 +1 @@
-DIST fontforge-20200314.tar.xz 13850076 BLAKE2B 
5e6ae3b7940a5b3b08811abdfc9d151f231e6d457b219eb0c666e1b831db815b696f345eda0d4d423b7e340f56fca67205734ae19903b3815381080d34b5e95c
 SHA512 
09f5dc93f87ca63668d72d108690604489d6b3cec7eedff1c07ad6d1ce5eae442ab60e79e71ae8b99e9808f3551011788025a86ffc3a9738518d99761d849975
 DIST fontforge-20201107.tar.xz 14163424 BLAKE2B 
8ce9148eef6e5b7206ab5c70310ff36fac67c392117e3c0b28060803a54306bf21c179b62b98734e11253739eac29e2ea8bcf3014c09432bb3a0b2b0f3ec631a
 SHA512 
cf9666395405ab02943f0160959f04251bd2a80e279a8f60431089ad19a4c5a232efd42097050ed9f6c1fb39d01488176262949fd81f5f0960fe853b497437dc

diff --git a/media-gfx/fontforge/files/20200314-MacServiceReadFDs.patch 
b/media-gfx/fontforge/files/20200314-MacServiceReadFDs.patch
deleted file mode 100644
index d6beff7984c..000
--- a/media-gfx/fontforge/files/20200314-MacServiceReadFDs.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From 5a3d2ce60aeefd706c36a8325721b0c8c818c742 Mon Sep 17 00:00:00 2001
-From: Mike Gilbert 
-Date: Fri, 1 May 2020 05:06:07 -0400
-Subject: [PATCH] Stub-out MacServiceReadFDs() on non-Mac platforms (#4246)
-
-This should fix a build failure on Linux with musl libc due to the
-missing sys/select.h include.
-
-MacServiceReadFDs seems to only be called in startui.c, also behind the
-__Mac macro.
-
-Bug: https://bugs.gentoo.org/706792

- gdraw/gdraw.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/gdraw/gdraw.c b/gdraw/gdraw.c
-index 1fb3354b1d..6bac57b92a 100644
 a/gdraw/gdraw.c
-+++ b/gdraw/gdraw.c
-@@ -32,7 +32,7 @@
- #include "gkeysym.h"
- #include "ustring.h"
- 
--#if __Mac || __FreeBSD__ || __NetBSD__ || __OpenBSD__ || __DragonFly__
-+#if __Mac
- #  include 
- #endif
- 
-@@ -1076,7 +1076,7 @@ GDrawRemoveReadFD( GDisplay *gdisp,
- 
- void MacServiceReadFDs()
- {
--#if (!defined(__MINGW32__))&&(!defined(__CYGWIN__))
-+#if __Mac
- int ret = 0;
- 
- GDisplay *gdisp = GDrawGetDisplayOfWindow(0);

diff --git a/media-gfx/fontforge/files/20200314-big-endian.patch 
b/media-gfx/fontforge/files/20200314-big-endian.patch
deleted file mode 100644
index f9581ad35f4..000
--- a/media-gfx/fontforge/files/20200314-big-endian.patch
+++ /dev/null
@@ -1,298 +0,0 @@
-From 65619185a42bd52bb4a4894c1714d78d96ed4175 Mon Sep 17 00:00:00 2001
-From: Jeremy Tan 
-Date: Sun, 26 Apr 2020 18:57:58 +1000
-Subject: [PATCH 1/2] tottfgpos.c: fix incorrect sizing of the scripts array
-
-latn contains 58 entries (29 pairs), meaning the size was too small
-to fit the 0 marker at the end of the array

- fontforge/tottfgpos.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/fontforge/tottfgpos.c b/fontforge/tottfgpos.c
-index 5de5164ed1..e12a0b8a79 100644
 a/fontforge/tottfgpos.c
-+++ b/fontforge/tottfgpos.c
-@@ -60,7 +60,7 @@ int use_second_indic_scripts = false;
- /* scripts (for opentype) that I understand */
- /* see also list in lookups.c mapping script tags to friendly names */
- 
--static uint32 scripts[][59] = {
-+static uint32 scripts[][61] = {
- /* Adlam */   { CHR('a','d','l','m'), 0x1e900, 0x1e95f },
- /* Ahom */{ CHR('a','h','o','m'), 0x11700, 0x1173f },
- /* Anatolian */   { CHR('h','l','u','w'), 0x14400, 0x1467f },
-
-From fde85b13382595cb3ab889e38570b4944edad808 Mon Sep 17 00:00:00 2001
-From: Jeremy Tan 
-Date: Sun, 26 Apr 2020 19:00:04 +1000
-Subject: [PATCH 2/2] python.c: fix type specifier on long input/return values
-
-int is guaranteed to be at least 16 bits, while long is at least
-32 bits. So for uint32/int32 values, parse longs with the "l"/"k"
-specifier and cast return values to long.
-
-The cast is necessary as on amd64 a long is 64 bits

- fontforge/python.c | 68 +++---
- 1 file changed, 34 insertions(+), 34 deletions(-)
-
-diff --git a/fontforge/python.c b/fontforg

[gentoo-commits] repo/gentoo:master commit in: media-gfx/fontforge/, media-gfx/fontforge/files/

2020-05-13 Thread Mike Gilbert
commit: 4318cd69b4e540d455464cf0681431b1c5c7cf47
Author: Mike Gilbert  gentoo  org>
AuthorDate: Wed May 13 23:53:32 2020 +
Commit: Mike Gilbert  gentoo  org>
CommitDate: Wed May 13 23:53:32 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4318cd69

media-gfx/fontforge: fix build on musl

Closes: https://bugs.gentoo.org/706792
Signed-off-by: Mike Gilbert  gentoo.org>

 .../files/20200314-MacServiceReadFDs.patch | 38 ++
 media-gfx/fontforge/fontforge-20200314.ebuild  |  1 +
 2 files changed, 39 insertions(+)

diff --git a/media-gfx/fontforge/files/20200314-MacServiceReadFDs.patch 
b/media-gfx/fontforge/files/20200314-MacServiceReadFDs.patch
new file mode 100644
index 000..d6beff7984c
--- /dev/null
+++ b/media-gfx/fontforge/files/20200314-MacServiceReadFDs.patch
@@ -0,0 +1,38 @@
+From 5a3d2ce60aeefd706c36a8325721b0c8c818c742 Mon Sep 17 00:00:00 2001
+From: Mike Gilbert 
+Date: Fri, 1 May 2020 05:06:07 -0400
+Subject: [PATCH] Stub-out MacServiceReadFDs() on non-Mac platforms (#4246)
+
+This should fix a build failure on Linux with musl libc due to the
+missing sys/select.h include.
+
+MacServiceReadFDs seems to only be called in startui.c, also behind the
+__Mac macro.
+
+Bug: https://bugs.gentoo.org/706792
+---
+ gdraw/gdraw.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/gdraw/gdraw.c b/gdraw/gdraw.c
+index 1fb3354b1d..6bac57b92a 100644
+--- a/gdraw/gdraw.c
 b/gdraw/gdraw.c
+@@ -32,7 +32,7 @@
+ #include "gkeysym.h"
+ #include "ustring.h"
+ 
+-#if __Mac || __FreeBSD__ || __NetBSD__ || __OpenBSD__ || __DragonFly__
++#if __Mac
+ #  include 
+ #endif
+ 
+@@ -1076,7 +1076,7 @@ GDrawRemoveReadFD( GDisplay *gdisp,
+ 
+ void MacServiceReadFDs()
+ {
+-#if (!defined(__MINGW32__))&&(!defined(__CYGWIN__))
++#if __Mac
+ int ret = 0;
+ 
+ GDisplay *gdisp = GDrawGetDisplayOfWindow(0);

diff --git a/media-gfx/fontforge/fontforge-20200314.ebuild 
b/media-gfx/fontforge/fontforge-20200314.ebuild
index a6b9c7400db..3379e2f1b63 100644
--- a/media-gfx/fontforge/fontforge-20200314.ebuild
+++ b/media-gfx/fontforge/fontforge-20200314.ebuild
@@ -57,6 +57,7 @@ PATCHES=(
"${FILESDIR}"/20200314-tilepath.patch
"${FILESDIR}"/20200314-big-endian.patch
"${FILESDIR}"/fontforge-doc-no-warn-error.patch
+   "${FILESDIR}"/20200314-MacServiceReadFDs.patch
 )
 
 pkg_setup() {



[gentoo-commits] repo/gentoo:master commit in: media-gfx/fontforge/, media-gfx/fontforge/files/

2020-05-13 Thread Mike Gilbert
commit: e4daed4fe031fd865aff115e76de58e411985273
Author: Mike Gilbert  gentoo  org>
AuthorDate: Wed May 13 23:37:17 2020 +
Commit: Mike Gilbert  gentoo  org>
CommitDate: Wed May 13 23:50:21 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e4daed4f

media-gfx/fontforge: remove old

Signed-off-by: Mike Gilbert  gentoo.org>

 media-gfx/fontforge/Manifest   |   2 -
 .../fontforge/files/20170731-PyMem_Free.patch  | 197 -
 .../files/20170731-gethex-unaligned.patch  |  22 ---
 .../20170731-startnoui-FindOrMakeEncoding.patch|  22 ---
 media-gfx/fontforge/files/20170731-tilepath.patch  |  16 --
 media-gfx/fontforge/fontforge-20170731-r5.ebuild   | 122 -
 media-gfx/fontforge/fontforge-20190801.ebuild  | 104 ---
 7 files changed, 485 deletions(-)

diff --git a/media-gfx/fontforge/Manifest b/media-gfx/fontforge/Manifest
index 663096d134c..d5e98998867 100644
--- a/media-gfx/fontforge/Manifest
+++ b/media-gfx/fontforge/Manifest
@@ -1,3 +1 @@
-DIST fontforge-20190801.tar.gz 20766334 BLAKE2B 
c3206e77da4a966b9e513c41c90e19522f3d1aad990cd3035d7c8a8cc009239811743c12c02df3b02fd91fa5a7738913dba43df14523a738a2232cd2d1a91700
 SHA512 
78f3e1e94e38e26dcf52c6a0e038753033dc47052b7492f0ac0aaf1b8962e4e4bbf07c2550ef6014ea7290a6429bf669acb0691735efe0aee368480b4b7e6236
 DIST fontforge-20200314.tar.xz 13850076 BLAKE2B 
5e6ae3b7940a5b3b08811abdfc9d151f231e6d457b219eb0c666e1b831db815b696f345eda0d4d423b7e340f56fca67205734ae19903b3815381080d34b5e95c
 SHA512 
09f5dc93f87ca63668d72d108690604489d6b3cec7eedff1c07ad6d1ce5eae442ab60e79e71ae8b99e9808f3551011788025a86ffc3a9738518d99761d849975
-DIST fontforge-dist-20170731.tar.xz 13985256 BLAKE2B 
7bc49a3b7747de419e4fafb445062873cf9bf56aa73fd7499509b787a1c0fd6c47b0b5d7bfeb2a69d9237f9f66f989af968b0d00e9d5e57030906394f042f29c
 SHA512 
26f7a40714460716a24dd0229fdb027f3766bcc48db64b8993436ddcb6277898f9f3b67ad4fc0be515b2b38e01370d1c7d9ee3c6ece1be862b7d8c9882411f11

diff --git a/media-gfx/fontforge/files/20170731-PyMem_Free.patch 
b/media-gfx/fontforge/files/20170731-PyMem_Free.patch
deleted file mode 100644
index 48301dabb2f..000
--- a/media-gfx/fontforge/files/20170731-PyMem_Free.patch
+++ /dev/null
@@ -1,197 +0,0 @@
-From b6089f11bd7534c9aa38b875ef1e830fc3b898b4 Mon Sep 17 00:00:00 2001
-From: Jeremy Tan 
-Date: Wed, 13 Sep 2017 17:22:18 +0800
-Subject: [PATCH] python: Use PyMem_Free wherever PyArg_ParseTuple+es is used
-
-https://docs.python.org/2.0/ext/parseTuple.html
-
-diff --git a/fontforge/python.c b/fontforge/python.c
-index 5d6820c40..c6d7aca2b 100644
 a/fontforge/python.c
-+++ b/fontforge/python.c
-@@ -607,7 +607,13 @@ return( NULL );
-   }
- }
- 
--if ( !SetPrefs((char *) prefname,&val,NULL)) {
-+bool succeeded = SetPrefs((char *) prefname,&val,NULL);
-+if (val.type == v_str && val.u.sval) {
-+PyMem_Free(val.u.sval);
-+val.u.sval = NULL;
-+}
-+
-+if (!succeeded) {
-   PyErr_Format(PyExc_NameError, "Unknown preference item in SetPrefs: 
%s", prefname );
- return( NULL );
- }
-@@ -728,7 +734,7 @@ static PyObject *PyFF_UnicodeFromName(PyObject 
*UNUSED(self), PyObject *args) {
- return( NULL );
- 
- ret = Py_BuildValue("i", UniFromName((char *) name, ui_none,&custom));
--free(name);
-+PyMem_Free(name);
- return( ret );
- }
- 
-@@ -1361,12 +1367,14 @@ Py_RETURN_NONE;/* Well, that 
was pointless */
- if ( import==Py_None )
-   import=NULL;
- else if ( !PyCallable_Check(import) ) {
-+  PyMem_Free(name);
-   PyErr_Format(PyExc_TypeError, "First argument is not callable" );
- return( NULL );
- }
- if ( export==Py_None )
-   export=NULL;
- else if ( !PyCallable_Check(export) ) {
-+  PyMem_Free(name);
-   PyErr_Format(PyExc_TypeError, "Second argument is not callable" );
- return( NULL );
- }
-@@ -1472,7 +1480,7 @@ static PyObject *PyFF_logError(PyObject *UNUSED(self), 
PyObject *args) {
- if ( !PyArg_ParseTuple(args,"es","UTF-8", &msg) )
- return( NULL );
- LogError(msg);
--free(msg);
-+PyMem_Free(msg);
- Py_RETURN_NONE;
- }
- 
-@@ -1486,6 +1494,8 @@ static PyObject *PyFF_postError(PyObject *UNUSED(self), 
PyObject *args) {
- return( NULL );
- if( showPythonErrors )
- ff_post_error(title,msg); /* Prints to stderr if no ui */
-+PyMem_Free(title);
-+PyMem_Free(msg);
- Py_RETURN_NONE;
- }
- 
-@@ -1494,6 +1504,8 @@ static PyObject *PyFF_postNotice(PyObject *UNUSED(self), 
PyObject *args) {
- if ( !PyArg_ParseTuple(args,"eses","UTF-8", &title, "UTF-8", &msg) )
- return( NULL );
- ff_post_notice(title,msg);/* Prints to stderr if no ui */
-+PyMem_Free(title);
-+PyMem_Free(msg);
- Py_RETURN_NONE;
- }
- 
-@@ -1511,8 +1523,8 @@ return( NULL );
- return( NULL );
- 
- ret = ff_open_filename(title,def,filter);
--free(title);
--free(def);
-+PyMem_Free(titl

[gentoo-commits] repo/gentoo:master commit in: media-gfx/fontforge/, media-gfx/fontforge/files/

2020-04-27 Thread Mike Gilbert
commit: ef3571af4382749823339ddf49fdad1ae5b789b5
Author: Mike Gilbert  gentoo  org>
AuthorDate: Tue Apr 28 00:04:39 2020 +
Commit: Mike Gilbert  gentoo  org>
CommitDate: Tue Apr 28 00:04:39 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ef3571af

media-gfx/fontforge: fix docs build

Closes: https://bugs.gentoo.org/716504
Signed-off-by: Mike Gilbert  gentoo.org>

 .../files/fontforge-doc-no-warn-error.patch| 25 ++
 media-gfx/fontforge/fontforge-20200314.ebuild  |  1 +
 2 files changed, 26 insertions(+)

diff --git a/media-gfx/fontforge/files/fontforge-doc-no-warn-error.patch 
b/media-gfx/fontforge/files/fontforge-doc-no-warn-error.patch
new file mode 100644
index 000..ed1526b62e2
--- /dev/null
+++ b/media-gfx/fontforge/files/fontforge-doc-no-warn-error.patch
@@ -0,0 +1,25 @@
+From e8164ed0fa747bfc8e7e80e6ff6b9a34b7c1a33f Mon Sep 17 00:00:00 2001
+From: Mike Gilbert 
+Date: Mon, 27 Apr 2020 20:00:54 -0400
+Subject: [PATCH] doc: do not treat warnings as errors
+
+---
+ doc/CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
+index 6c4601a05..e5aeaed4f 100644
+--- a/doc/CMakeLists.txt
 b/doc/CMakeLists.txt
+@@ -21,7 +21,7 @@ file(STRINGS manifest.txt _manifest)
+ configure_file(manifest.txt manifest.txt COPYONLY)
+ 
+ add_custom_command(OUTPUT sphinx-docs
+-  COMMAND "${Sphinx_BUILD_BINARY}" -q -n -W -b html -d doctrees 
"${CMAKE_CURRENT_SOURCE_DIR}/sphinx" sphinx-docs
++  COMMAND "${Sphinx_BUILD_BINARY}" -q -n -b html -d doctrees 
"${CMAKE_CURRENT_SOURCE_DIR}/sphinx" sphinx-docs
+   DEPENDS ${_manifest}
+ )
+ 
+-- 
+2.26.2
+

diff --git a/media-gfx/fontforge/fontforge-20200314.ebuild 
b/media-gfx/fontforge/fontforge-20200314.ebuild
index bc30b97aa32..e3313e06dd2 100644
--- a/media-gfx/fontforge/fontforge-20200314.ebuild
+++ b/media-gfx/fontforge/fontforge-20200314.ebuild
@@ -56,6 +56,7 @@ PATCHES=(
"${FILESDIR}"/20200314-stylemap.patch
"${FILESDIR}"/20200314-tilepath.patch
"${FILESDIR}"/20200314-big-endian.patch
+   "${FILESDIR}"/fontforge-doc-no-warn-error.patch
 )
 
 pkg_setup() {



[gentoo-commits] repo/gentoo:master commit in: media-gfx/fontforge/, media-gfx/fontforge/files/

2020-03-29 Thread Mike Gilbert
commit: 3496905e28d0656a662d0d19f605f65d56838867
Author: Mike Gilbert  gentoo  org>
AuthorDate: Sun Mar 29 18:13:19 2020 +
Commit: Mike Gilbert  gentoo  org>
CommitDate: Sun Mar 29 18:13:19 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3496905e

media-gfx/fontforge: remove old

Package-Manager: Portage-2.3.96_p4, Repoman-2.3.22_p1
Signed-off-by: Mike Gilbert  gentoo.org>

 media-gfx/fontforge/Manifest  |   1 -
 media-gfx/fontforge/files/20190317-gdk_init.patch |  39 
 media-gfx/fontforge/fontforge-20190317-r3.ebuild  | 116 --
 3 files changed, 156 deletions(-)

diff --git a/media-gfx/fontforge/Manifest b/media-gfx/fontforge/Manifest
index eab92735ad6..663096d134c 100644
--- a/media-gfx/fontforge/Manifest
+++ b/media-gfx/fontforge/Manifest
@@ -1,4 +1,3 @@
-DIST fontforge-20190317.tar.gz 22762120 BLAKE2B 
5cb85d2fb9a2a08fe64548f2667c026e916dd0239d17d8f8d7d2fe8ecb51f2106cf3dc6e6298014c0deadffbfe91925327b483ed4750a171fb621aea8bdee60b
 SHA512 
55f9b0f7cafb1aa5a1461dbf39b52ca6b69a2baa6b761c8c28f86a0bb99e090d9ecc981294f51dadd9297b5ebd3036f01cb4f17b9a97a737eb567b4ae6522f20
 DIST fontforge-20190801.tar.gz 20766334 BLAKE2B 
c3206e77da4a966b9e513c41c90e19522f3d1aad990cd3035d7c8a8cc009239811743c12c02df3b02fd91fa5a7738913dba43df14523a738a2232cd2d1a91700
 SHA512 
78f3e1e94e38e26dcf52c6a0e038753033dc47052b7492f0ac0aaf1b8962e4e4bbf07c2550ef6014ea7290a6429bf669acb0691735efe0aee368480b4b7e6236
 DIST fontforge-20200314.tar.xz 13850076 BLAKE2B 
5e6ae3b7940a5b3b08811abdfc9d151f231e6d457b219eb0c666e1b831db815b696f345eda0d4d423b7e340f56fca67205734ae19903b3815381080d34b5e95c
 SHA512 
09f5dc93f87ca63668d72d108690604489d6b3cec7eedff1c07ad6d1ce5eae442ab60e79e71ae8b99e9808f3551011788025a86ffc3a9738518d99761d849975
 DIST fontforge-dist-20170731.tar.xz 13985256 BLAKE2B 
7bc49a3b7747de419e4fafb445062873cf9bf56aa73fd7499509b787a1c0fd6c47b0b5d7bfeb2a69d9237f9f66f989af968b0d00e9d5e57030906394f042f29c
 SHA512 
26f7a40714460716a24dd0229fdb027f3766bcc48db64b8993436ddcb6277898f9f3b67ad4fc0be515b2b38e01370d1c7d9ee3c6ece1be862b7d8c9882411f11

diff --git a/media-gfx/fontforge/files/20190317-gdk_init.patch 
b/media-gfx/fontforge/files/20190317-gdk_init.patch
deleted file mode 100644
index 060e6957748..000
--- a/media-gfx/fontforge/files/20190317-gdk_init.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From 4577ad7205c600c6c8e809e10d51eb2118cb66b5 Mon Sep 17 00:00:00 2001
-From: Mike Gilbert 
-Date: Sun, 24 Mar 2019 18:12:21 -0400
-Subject: [PATCH] Defer gdk_init() until after CheckIsScript()
-
-This allows fontforge to run without an X server available.
-
-Fixes: https://github.com/fontforge/fontforge/issues/3582

- fontforgeexe/startui.c | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/fontforgeexe/startui.c b/fontforgeexe/startui.c
-index 1bb5fd8ca..ae15afbf2 100644
 a/fontforgeexe/startui.c
-+++ b/fontforgeexe/startui.c
-@@ -900,9 +900,6 @@ int fontforge_main( int argc, char **argv ) {
- #if !(GLIB_CHECK_VERSION(2, 35, 0))
- g_type_init();
- #endif
--#ifdef FONTFORGE_CAN_USE_GDK
--gdk_init(&argc, &argv);
--#endif
- 
- /* Must be done before we cache the current directory */
- /* Change to HOME dir if specified on the commandline */
-@@ -1093,6 +1090,9 @@ int fontforge_main( int argc, char **argv ) {
- CheckIsScript(argc,argv); /* Will run the script and exit if it is a 
script */
-   /* If there is no UI, there is always a 
script */
-   /*  and we will never return from the 
above */
-+#ifdef FONTFORGE_CAN_USE_GDK
-+gdk_init(&argc, &argv);
-+#endif
- if ( load_prefs==NULL ||
-   (strcasecmp(load_prefs,"Always")!=0 &&  /* Already loaded */
-strcasecmp(load_prefs,"Never")!=0 ))
--- 
-2.21.0
-

diff --git a/media-gfx/fontforge/fontforge-20190317-r3.ebuild 
b/media-gfx/fontforge/fontforge-20190317-r3.ebuild
deleted file mode 100644
index 3116cb1b793..000
--- a/media-gfx/fontforge/fontforge-20190317-r3.ebuild
+++ /dev/null
@@ -1,116 +0,0 @@
-# Copyright 2004-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{6,7} )
-
-inherit python-single-r1 xdg
-
-DESCRIPTION="postscript font editor and converter"
-HOMEPAGE="http://fontforge.github.io/";
-SRC_URI="https://github.com/fontforge/fontforge/releases/download/${PV}/fontforge-${PV}.tar.gz";
-
-LICENSE="BSD GPL-3+"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc 
~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
-IUSE="cairo truetype-debugger gif gtk jpeg png +python readline test tiff svg 
unicode X"
-
-RESTRICT="!test? ( test )"
-
-REQUIRED_USE="
-   cairo? ( png )
-   gtk? ( cairo )
-   python? ( ${PYTHON_REQUIRED_USE} )
-   test? ( png python )
-"
-
-RDEPEND="
-   dev-libs/glib
-   dev-libs/libltdl:0
-   

[gentoo-commits] repo/gentoo:master commit in: media-gfx/fontforge/, media-gfx/fontforge/files/

2020-01-27 Thread Mike Gilbert
commit: 6c1824fd0b6c245566175dfcc56b61b03471d510
Author: Mike Gilbert  gentoo  org>
AuthorDate: Mon Jan 27 21:52:40 2020 +
Commit: Mike Gilbert  gentoo  org>
CommitDate: Mon Jan 27 21:52:40 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6c1824fd

media-gfx/fontforge: bump to 20190801

Package-Manager: Portage-2.3.85_p2, Repoman-2.3.20_p36
Signed-off-by: Mike Gilbert  gentoo.org>

 media-gfx/fontforge/Manifest  |   1 +
 media-gfx/fontforge/files/CVE-2020-5395.patch |  78 +++
 media-gfx/fontforge/fontforge-20190801.ebuild | 106 ++
 3 files changed, 185 insertions(+)

diff --git a/media-gfx/fontforge/Manifest b/media-gfx/fontforge/Manifest
index 6a5907bce02..50996083639 100644
--- a/media-gfx/fontforge/Manifest
+++ b/media-gfx/fontforge/Manifest
@@ -1,2 +1,3 @@
 DIST fontforge-20190317.tar.gz 22762120 BLAKE2B 
5cb85d2fb9a2a08fe64548f2667c026e916dd0239d17d8f8d7d2fe8ecb51f2106cf3dc6e6298014c0deadffbfe91925327b483ed4750a171fb621aea8bdee60b
 SHA512 
55f9b0f7cafb1aa5a1461dbf39b52ca6b69a2baa6b761c8c28f86a0bb99e090d9ecc981294f51dadd9297b5ebd3036f01cb4f17b9a97a737eb567b4ae6522f20
+DIST fontforge-20190801.tar.gz 20766334 BLAKE2B 
c3206e77da4a966b9e513c41c90e19522f3d1aad990cd3035d7c8a8cc009239811743c12c02df3b02fd91fa5a7738913dba43df14523a738a2232cd2d1a91700
 SHA512 
78f3e1e94e38e26dcf52c6a0e038753033dc47052b7492f0ac0aaf1b8962e4e4bbf07c2550ef6014ea7290a6429bf669acb0691735efe0aee368480b4b7e6236
 DIST fontforge-dist-20170731.tar.xz 13985256 BLAKE2B 
7bc49a3b7747de419e4fafb445062873cf9bf56aa73fd7499509b787a1c0fd6c47b0b5d7bfeb2a69d9237f9f66f989af968b0d00e9d5e57030906394f042f29c
 SHA512 
26f7a40714460716a24dd0229fdb027f3766bcc48db64b8993436ddcb6277898f9f3b67ad4fc0be515b2b38e01370d1c7d9ee3c6ece1be862b7d8c9882411f11

diff --git a/media-gfx/fontforge/files/CVE-2020-5395.patch 
b/media-gfx/fontforge/files/CVE-2020-5395.patch
new file mode 100644
index 000..51b52450376
--- /dev/null
+++ b/media-gfx/fontforge/files/CVE-2020-5395.patch
@@ -0,0 +1,78 @@
+From 048a91e2682c1a8936ae34dbc7bd70291ec05410 Mon Sep 17 00:00:00 2001
+From: Skef Iterum 
+Date: Mon, 6 Jan 2020 03:05:06 -0800
+Subject: [PATCH] Fix for #4084 Use-after-free (heap) in the
+ SFD_GetFontMetaData() function Fix for #4086 NULL pointer dereference in the
+ SFDGetSpiros() function Fix for #4088 NULL pointer dereference in the
+ SFD_AssignLookups() function Add empty sf->fontname string if it isn't set,
+ fixing #4089 #4090 and many   other potential issues (many downstream calls
+ to strlen() on the value).
+
+---
+ fontforge/sfd.c  | 19 ++-
+ fontforge/sfd1.c |  2 +-
+ 2 files changed, 15 insertions(+), 6 deletions(-)
+
+diff --git a/fontforge/sfd.c b/fontforge/sfd.c
+index 731be201e0..e8ca39ba83 100644
+--- a/fontforge/sfd.c
 b/fontforge/sfd.c
+@@ -4032,13 +4032,16 @@ static void SFDGetSpiros(FILE *sfd,SplineSet *cur) {
+ while ( fscanf(sfd,"%lg %lg %c", &cp.x, &cp.y, &cp.ty )==3 ) {
+   if ( cur!=NULL ) {
+   if ( cur->spiro_cnt>=cur->spiro_max )
+-  cur->spiros = 
realloc(cur->spiros,(cur->spiro_max+=10)*sizeof(spiro_cp));
++  cur->spiros = realloc(cur->spiros,
++(cur->spiro_max+=10)*sizeof(spiro_cp));
+   cur->spiros[cur->spiro_cnt++] = cp;
+   }
+ }
+-if ( cur!=NULL && (cur->spiros[cur->spiro_cnt-1].ty&0x7f)!=SPIRO_END ) {
++if (cur!=NULL && cur->spiro_cnt>0
++ && (cur->spiros[cur->spiro_cnt-1].ty&0x7f)!=SPIRO_END ) {
+   if ( cur->spiro_cnt>=cur->spiro_max )
+-  cur->spiros = 
realloc(cur->spiros,(cur->spiro_max+=1)*sizeof(spiro_cp));
++  cur->spiros = realloc(cur->spiros,
++(cur->spiro_max+=1)*sizeof(spiro_cp));
+   memset(&cur->spiros[cur->spiro_cnt],0,sizeof(spiro_cp));
+   cur->spiros[cur->spiro_cnt++].ty = SPIRO_END;
+ }
+@@ -7992,10 +7995,12 @@ bool SFD_GetFontMetaData( FILE *sfd,
+ else if ( strmatch(tok,"LayerCount:")==0 )
+ {
+   d->had_layer_cnt = true;
+-  getint(sfd,&sf->layer_cnt);
+-  if ( sf->layer_cnt>2 ) {
++  int layer_cnt_tmp;
++  getint(sfd,&layer_cnt_tmp);
++  if ( layer_cnt_tmp>2 ) {
+   sf->layers = realloc(sf->layers,sf->layer_cnt*sizeof(LayerInfo));
+   memset(sf->layers+2,0,(sf->layer_cnt-2)*sizeof(LayerInfo));
++  sf->layer_cnt = layer_cnt_tmp;
+   }
+ }
+ else if ( strmatch(tok,"Layer:")==0 )
+@@ -8948,6 +8953,10 @@ exit( 1 );
+   }
+ }
+ 
++// Many downstream functions assume this isn't NULL (use strlen, etc.)
++if ( sf->fontname==NULL)
++  sf->fontname = copy("");
++
+ if ( fromdir )
+   sf = SFD_FigureDirType(sf,tok,dirname,enc,remap,had_layer_cnt);
+ else if ( sf->subfontcnt!=0 ) {
+diff --git a/fontforge/sfd1.c b/fontforge/sfd1.c
+index cf931059d0..b42f832678 100644
+--- a/fontforge/sfd1.c
 b/fontforge/sfd1.c
+@@ -674,7 +674,7 @@

[gentoo-commits] repo/gentoo:master commit in: media-gfx/fontforge/, media-gfx/fontforge/files/

2019-03-24 Thread Mike Gilbert
commit: 2fceba22ca27794f7c955b32734baf7d8755
Author: Mike Gilbert  gentoo  org>
AuthorDate: Sun Mar 24 22:25:15 2019 +
Commit: Mike Gilbert  gentoo  org>
CommitDate: Sun Mar 24 22:25:46 2019 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2fceba22

media-gfx/fontforge: skip gdk_init if running a script

Closes: https://bugs.gentoo.org/681650
Package-Manager: Portage-2.3.62_p4, Repoman-2.3.12_p87
Signed-off-by: Mike Gilbert  gentoo.org>

 media-gfx/fontforge/files/20190317-gdk_init.patch  | 39 ++
 ...0190317.ebuild => fontforge-20190317-r1.ebuild} | 13 ++--
 2 files changed, 41 insertions(+), 11 deletions(-)

diff --git a/media-gfx/fontforge/files/20190317-gdk_init.patch 
b/media-gfx/fontforge/files/20190317-gdk_init.patch
new file mode 100644
index 000..060e6957748
--- /dev/null
+++ b/media-gfx/fontforge/files/20190317-gdk_init.patch
@@ -0,0 +1,39 @@
+From 4577ad7205c600c6c8e809e10d51eb2118cb66b5 Mon Sep 17 00:00:00 2001
+From: Mike Gilbert 
+Date: Sun, 24 Mar 2019 18:12:21 -0400
+Subject: [PATCH] Defer gdk_init() until after CheckIsScript()
+
+This allows fontforge to run without an X server available.
+
+Fixes: https://github.com/fontforge/fontforge/issues/3582
+---
+ fontforgeexe/startui.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/fontforgeexe/startui.c b/fontforgeexe/startui.c
+index 1bb5fd8ca..ae15afbf2 100644
+--- a/fontforgeexe/startui.c
 b/fontforgeexe/startui.c
+@@ -900,9 +900,6 @@ int fontforge_main( int argc, char **argv ) {
+ #if !(GLIB_CHECK_VERSION(2, 35, 0))
+ g_type_init();
+ #endif
+-#ifdef FONTFORGE_CAN_USE_GDK
+-gdk_init(&argc, &argv);
+-#endif
+ 
+ /* Must be done before we cache the current directory */
+ /* Change to HOME dir if specified on the commandline */
+@@ -1093,6 +1090,9 @@ int fontforge_main( int argc, char **argv ) {
+ CheckIsScript(argc,argv); /* Will run the script and exit if it is a 
script */
+   /* If there is no UI, there is always a 
script */
+   /*  and we will never return from the 
above */
++#ifdef FONTFORGE_CAN_USE_GDK
++gdk_init(&argc, &argv);
++#endif
+ if ( load_prefs==NULL ||
+   (strcasecmp(load_prefs,"Always")!=0 &&  /* Already loaded */
+strcasecmp(load_prefs,"Never")!=0 ))
+-- 
+2.21.0
+

diff --git a/media-gfx/fontforge/fontforge-20190317.ebuild 
b/media-gfx/fontforge/fontforge-20190317-r1.ebuild
similarity index 93%
rename from media-gfx/fontforge/fontforge-20190317.ebuild
rename to media-gfx/fontforge/fontforge-20190317-r1.ebuild
index 3e2be07fecd..faf3deb43fb 100644
--- a/media-gfx/fontforge/fontforge-20190317.ebuild
+++ b/media-gfx/fontforge/fontforge-20190317-r1.ebuild
@@ -4,9 +4,8 @@
 EAPI=7
 
 PYTHON_COMPAT=( python{2_7,3_{5,6,7}} )
-VIRTUALX_REQUIRED="manual"
 
-inherit python-single-r1 virtualx xdg
+inherit python-single-r1 xdg
 
 DESCRIPTION="postscript font editor and converter"
 HOMEPAGE="http://fontforge.github.io/";
@@ -57,7 +56,6 @@ DEPEND="${RDEPEND}
 BDEPEND="
sys-devel/gettext
virtual/pkgconfig
-   test? ( gtk? ( ${VIRTUALX_DEPEND} ) )
 "
 
 # Needs keywording on many arches.
@@ -68,6 +66,7 @@ BDEPEND="
 
 PATCHES=(
"${FILESDIR}"/20170731-gethex-unaligned.patch
+   "${FILESDIR}"/20190317-gdk_init.patch
 )
 
 pkg_setup() {
@@ -108,14 +107,6 @@ src_compile() {
emake
 }
 
-src_test() {
-   if use gtk; then
-   virtx emake check
-   else
-   emake check
-   fi
-}
-
 src_install() {
default
find "${ED}" -name '*.la' -type f -delete || die



[gentoo-commits] repo/gentoo:master commit in: media-gfx/fontforge/, media-gfx/fontforge/files/

2017-12-30 Thread Mike Gilbert
commit: 521efc21ffc6e32dd4b14c15f3386d837817610d
Author: Mike Gilbert  gentoo  org>
AuthorDate: Sat Dec 30 22:45:38 2017 +
Commit: Mike Gilbert  gentoo  org>
CommitDate: Sat Dec 30 22:46:03 2017 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=521efc21

media-gfx/fontforge: fix misaligned memory access

Patch by Rolf Eike Beer.

Closes: https://bugs.gentoo.org/642756
Package-Manager: Portage-2.3.19_p3, Repoman-2.3.6_p37

 .../files/20170731-gethex-unaligned.patch  | 22 ++
 ...0731-r2.ebuild => fontforge-20170731-r3.ebuild} |  1 +
 2 files changed, 23 insertions(+)

diff --git a/media-gfx/fontforge/files/20170731-gethex-unaligned.patch 
b/media-gfx/fontforge/files/20170731-gethex-unaligned.patch
new file mode 100644
index 000..812f7a44472
--- /dev/null
+++ b/media-gfx/fontforge/files/20170731-gethex-unaligned.patch
@@ -0,0 +1,22 @@
+fix unaligned access in gethex()
+
+--- a/fontforge/sfd.c
 b/fontforge/sfd.c
+@@ -3393,6 +3393,7 @@
+ static int gethex(FILE *sfd, uint32 *val) {
+ char tokbuf[100]; int ch;
+ char *pt=tokbuf, *end = tokbuf+100-2;
++uint32 u;
+ 
+ while ( isspace(ch = nlgetc(sfd)));
+ if ( ch=='#' )
+@@ -3416,7 +3417,8 @@
+ }
+ *pt='\0';
+ ungetc(ch,sfd);
+-*val = strtoul(tokbuf,NULL,16);
++u = strtoul(tokbuf,NULL,16);
++memcpy(val, &u, sizeof(u));
+ return( pt!=tokbuf?1:ch==EOF?-1: 0 );
+ }
+ 

diff --git a/media-gfx/fontforge/fontforge-20170731-r2.ebuild 
b/media-gfx/fontforge/fontforge-20170731-r3.ebuild
similarity index 98%
rename from media-gfx/fontforge/fontforge-20170731-r2.ebuild
rename to media-gfx/fontforge/fontforge-20170731-r3.ebuild
index c8ad245b14d..ae146eb0647 100644
--- a/media-gfx/fontforge/fontforge-20170731-r2.ebuild
+++ b/media-gfx/fontforge/fontforge-20170731-r3.ebuild
@@ -65,6 +65,7 @@ S="${WORKDIR}/fontforge-2.0.${PV}"
 PATCHES=(
"${FILESDIR}"/20170731-startnoui-FindOrMakeEncoding.patch
"${FILESDIR}"/20170731-tilepath.patch
+   "${FILESDIR}"/20170731-gethex-unaligned.patch
 )
 
 pkg_setup() {