* [gentoo-commits] repo/gentoo:master commit in: media-gfx/fontforge/, media-gfx/fontforge/files/
@ 2017-12-30 22:46 Mike Gilbert
0 siblings, 0 replies; 10+ messages in thread
From: Mike Gilbert @ 2017-12-30 22:46 UTC (permalink / raw
To: gentoo-commits
commit: 521efc21ffc6e32dd4b14c15f3386d837817610d
Author: Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Sat Dec 30 22:45:38 2017 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Sat Dec 30 22:46:03 2017 +0000
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 00000000000..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() {
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-gfx/fontforge/, media-gfx/fontforge/files/
@ 2019-03-24 22:25 Mike Gilbert
0 siblings, 0 replies; 10+ messages in thread
From: Mike Gilbert @ 2019-03-24 22:25 UTC (permalink / raw
To: gentoo-commits
commit: 2fceba22ca27794f7c955b327000034baf7d8755
Author: Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Sun Mar 24 22:25:15 2019 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Sun Mar 24 22:25:46 2019 +0000
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 <floppym <AT> 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 00000000000..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 <floppym@gentoo.org>
+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
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-gfx/fontforge/, media-gfx/fontforge/files/
@ 2020-01-27 22:02 Mike Gilbert
0 siblings, 0 replies; 10+ messages in thread
From: Mike Gilbert @ 2020-01-27 22:02 UTC (permalink / raw
To: gentoo-commits
commit: 6c1824fd0b6c245566175dfcc56b61b03471d510
Author: Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Mon Jan 27 21:52:40 2020 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Mon Jan 27 21:52:40 2020 +0000
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 <floppym <AT> 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 00000000000..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 <unknown>
+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 @@ void SFD_AssignLookups(SplineFont1 *sf) {
+
+ /* Fix up some gunk from really old versions of the sfd format */
+ SFDCleanupAnchorClasses(&sf->sf);
+- if ( sf->sf.uni_interp==ui_unset )
++ if ( sf->sf.uni_interp==ui_unset && sf->sf.map!=NULL )
+ sf->sf.uni_interp = interp_from_encoding(sf->sf.map->enc,ui_none);
+
+ /* Fixup for an old bug */
diff --git a/media-gfx/fontforge/fontforge-20190801.ebuild b/media-gfx/fontforge/fontforge-20190801.ebuild
new file mode 100644
index 00000000000..31b62099c78
--- /dev/null
+++ b/media-gfx/fontforge/fontforge-20190801.ebuild
@@ -0,0 +1,106 @@
+# Copyright 2004-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python{2_7,3_{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 ~sh ~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
+ dev-libs/libxml2:2=
+ >=media-libs/freetype-2.3.7:2=
+ cairo? (
+ >=x11-libs/cairo-1.6:0=
+ x11-libs/pango:0=
+ )
+ gif? ( media-libs/giflib:0= )
+ jpeg? ( virtual/jpeg:0 )
+ png? ( media-libs/libpng:0= )
+ tiff? ( media-libs/tiff:0= )
+ truetype-debugger? ( >=media-libs/freetype-2.3.8:2[fontforge,-bindist(-)] )
+ gtk? ( >=x11-libs/gtk+-3.10:3 )
+ python? ( ${PYTHON_DEPS} )
+ readline? ( sys-libs/readline:0= )
+ unicode? ( media-libs/libuninameslist:0= )
+ X? (
+ x11-libs/libX11:0=
+ x11-libs/libXi:0=
+ >=x11-libs/pango-1.10:0=[X]
+ )
+ !media-gfx/pfaedit
+"
+DEPEND="${RDEPEND}
+ X? ( x11-base/xorg-proto )
+"
+BDEPEND="
+ sys-devel/gettext
+ virtual/pkgconfig
+"
+
+# Needs keywording on many arches.
+# zeromq? (
+# >=net-libs/czmq-2.2.0:0=
+# >=net-libs/zeromq-4.0.4:0=
+# )
+
+PATCHES=(
+ "${FILESDIR}"/20170731-gethex-unaligned.patch
+ "${FILESDIR}"/CVE-2020-5395.patch
+)
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+}
+
+src_configure() {
+ local myeconfargs=(
+ --disable-static
+ $(use_enable truetype-debugger freetype-debugger "${EPREFIX}/usr/include/freetype2/internal4fontforge")
+ $(use_enable python python-extension)
+ $(use_enable python python-scripting)
+ --enable-tile-path
+ $(use_with cairo)
+ $(use_with gif giflib)
+ $(use_with jpeg libjpeg)
+ $(use_with png libpng)
+ $(use_with readline libreadline)
+ --without-libspiro
+ $(use_with tiff libtiff)
+ $(use_with unicode libuninameslist)
+ $(use_with X x)
+ )
+ if use gtk; then
+ # broken AC_ARG_ENABLE usage
+ # https://bugs.gentoo.org/681550
+ myeconfargs+=( --enable-gdk=gdk3 )
+ fi
+ econf "${myeconfargs[@]}"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ docompress -x /usr/share/doc/${PF}/html
+ einstalldocs
+ find "${ED}" -name '*.la' -type f -delete || die
+}
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-gfx/fontforge/, media-gfx/fontforge/files/
@ 2020-03-29 18:15 Mike Gilbert
0 siblings, 0 replies; 10+ messages in thread
From: Mike Gilbert @ 2020-03-29 18:15 UTC (permalink / raw
To: gentoo-commits
commit: 3496905e28d0656a662d0d19f605f65d56838867
Author: Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Sun Mar 29 18:13:19 2020 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Sun Mar 29 18:13:19 2020 +0000
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 <floppym <AT> 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..00000000000
--- 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 <floppym@gentoo.org>
-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..00000000000
--- 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
- dev-libs/libxml2:2=
- >=media-libs/freetype-2.3.7:2=
- cairo? (
- >=x11-libs/cairo-1.6:0=
- x11-libs/pango:0=
- )
- gif? ( media-libs/giflib:0= )
- jpeg? ( virtual/jpeg:0 )
- png? ( media-libs/libpng:0= )
- tiff? ( media-libs/tiff:0= )
- truetype-debugger? ( >=media-libs/freetype-2.3.8:2[fontforge,-bindist(-)] )
- gtk? ( >=x11-libs/gtk+-3.10:3 )
- python? ( ${PYTHON_DEPS} )
- readline? ( sys-libs/readline:0= )
- unicode? ( media-libs/libuninameslist:0= )
- X? (
- x11-libs/libX11:0=
- x11-libs/libXi:0=
- >=x11-libs/pango-1.10:0=[X]
- )
- !media-gfx/pfaedit
-"
-DEPEND="${RDEPEND}
- X? ( x11-base/xorg-proto )
-"
-BDEPEND="
- sys-devel/gettext
- virtual/pkgconfig
-"
-
-# Needs keywording on many arches.
-# zeromq? (
-# >=net-libs/czmq-2.2.0:0=
-# >=net-libs/zeromq-4.0.4:0=
-# )
-
-PATCHES=(
- "${FILESDIR}"/20170731-gethex-unaligned.patch
- "${FILESDIR}"/20190317-gdk_init.patch
- "${FILESDIR}"/CVE-2020-5395.patch
-)
-
-pkg_setup() {
- use python && python-single-r1_pkg_setup
-}
-
-src_configure() {
- local myeconfargs=(
- --disable-static
- $(use_enable truetype-debugger freetype-debugger "${EPREFIX}/usr/include/freetype2/internal4fontforge")
- $(use_enable python python-extension)
- $(use_enable python python-scripting)
- --enable-tile-path
- --enable-gb12345
- $(use_with cairo)
- $(use_with gif giflib)
- $(use_with jpeg libjpeg)
- $(use_with png libpng)
- $(use_with readline libreadline)
- --without-libspiro
- $(use_with tiff libtiff)
- $(use_with unicode libuninameslist)
- #$(use_with zeromq libzmq)
- --without-libzmq
- $(use_with X x)
- )
- if use gtk; then
- # broken AC_ARG_ENABLE usage
- # https://bugs.gentoo.org/681550
- myeconfargs+=( --enable-gdk=gdk3 )
- fi
- econf "${myeconfargs[@]}"
-}
-
-src_compile() {
- # Build system deps are broken
- emake -C plugins HTDOCS_SUBDIR=/html
- emake HTDOCS_SUBDIR=/html
-}
-
-src_install() {
- emake DESTDIR="${D}" HTDOCS_SUBDIR=/html install
- docompress -x /usr/share/doc/${PF}/html
- einstalldocs
- find "${ED}" -name '*.la' -type f -delete || die
-}
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-gfx/fontforge/, media-gfx/fontforge/files/
@ 2020-04-28 0:05 Mike Gilbert
0 siblings, 0 replies; 10+ messages in thread
From: Mike Gilbert @ 2020-04-28 0:05 UTC (permalink / raw
To: gentoo-commits
commit: ef3571af4382749823339ddf49fdad1ae5b789b5
Author: Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Tue Apr 28 00:04:39 2020 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Tue Apr 28 00:04:39 2020 +0000
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 <floppym <AT> 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 00000000000..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 <floppym@gentoo.org>
+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() {
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-gfx/fontforge/, media-gfx/fontforge/files/
@ 2020-05-13 23:50 Mike Gilbert
0 siblings, 0 replies; 10+ messages in thread
From: Mike Gilbert @ 2020-05-13 23:50 UTC (permalink / raw
To: gentoo-commits
commit: e4daed4fe031fd865aff115e76de58e411985273
Author: Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Wed May 13 23:37:17 2020 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Wed May 13 23:50:21 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e4daed4f
media-gfx/fontforge: remove old
Signed-off-by: Mike Gilbert <floppym <AT> 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..00000000000
--- 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 <jtanx@outlook.com>
-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(title);
-+ PyMem_Free(def);
- if ( ret==NULL )
- Py_RETURN_NONE;
- reto = DECODE_UTF8(ret,strlen(ret),NULL);
-@@ -1534,8 +1546,8 @@ return( NULL );
- return( NULL );
-
- ret = ff_save_filename(title,def,filter);
-- free(title);
-- free(def);
-+ PyMem_Free(title);
-+ PyMem_Free(def);
- if ( ret==NULL )
- Py_RETURN_NONE;
- reto = DECODE_UTF8(ret,strlen(ret),NULL);
-@@ -1558,8 +1570,8 @@ return( NULL );
- return( NULL );
- if ( !PySequence_Check(answero) || STRING_CHECK(answero)) {
- PyErr_Format(PyExc_TypeError, "Expected a tuple of strings for the third argument");
-- free(title);
-- free(quest);
-+ PyMem_Free(title);
-+ PyMem_Free(quest);
- return( NULL );
- }
- cnt = PySequence_Size(answero);
-@@ -1568,16 +1580,16 @@ return( NULL );
- cancel = cnt-1;
- if ( cancel<0 || cancel>=cnt || def<0 || def>=cnt ) {
- PyErr_Format(PyExc_ValueError, "Value out of bounds for 4th or 5th argument");
-- free(title);
-- free(quest);
-+ PyMem_Free(title);
-+ PyMem_Free(quest);
- free(answers);
- return( NULL );
- }
- for ( i=0; i<cnt; ++i ) {
- PyObject *utf8_name = PYBYTES_UTF8(PySequence_GetItem(answero,i));
- if ( utf8_name==NULL ) {
-- free(title);
-- free(quest);
-+ PyMem_Free(title);
-+ PyMem_Free(quest);
- FreeStringArray( i, answers );
- return( NULL );
- }
-@@ -1587,8 +1599,8 @@ return( NULL );
- answers[cnt] = NULL;
-
- ret = ff_ask(title,(const char **) answers,def,cancel,quest);
-- free(title);
-- free(quest);
-+ PyMem_Free(title);
-+ PyMem_Free(quest);
- FreeStringArray( cnt, answers );
- return( Py_BuildValue("i",ret));
- }
-@@ -1608,23 +1620,23 @@ return( NULL );
- return( NULL );
- if ( !PySequence_Check(answero) || STRING_CHECK(answero)) {
- PyErr_Format(PyExc_TypeError, "Expected a tuple of strings for the third argument");
-- free(title);
-- free(quest);
-+ PyMem_Free(title);
-+ PyMem_Free(quest);
- return( NULL );
- }
- cnt = PySequence_Size(answero);
- answers = calloc(cnt+1, sizeof(char *));
- if ( def<0 || def>=cnt ) {
- PyErr_Format(PyExc_ValueError, "Value out of bounds for 4th argument");
-- free(title);
-- free(quest);
-+ PyMem_Free(title);
-+ PyMem_Free(quest);
- return( NULL );
- }
- for ( i=0; i<cnt; ++i ) {
- PyObject *utf8_name = PYBYTES_UTF8(PySequence_GetItem(answero,i));
- if ( utf8_name==NULL ) {
-- free(title);
-- free(quest);
-+ PyMem_Free(title);
-+ PyMem_Free(quest);
- FreeStringArray( i, answers );
- return( NULL );
- }
-@@ -1634,8 +1646,8 @@ return( NULL );
- answers[cnt] = NULL;
-
- ret = ff_choose(title,(const char **) answers,cnt,def,quest);
-- free(title);
-- free(quest);
-+ PyMem_Free(title);
-+ PyMem_Free(quest);
- FreeStringArray( cnt, answers );
- return( Py_BuildValue("i",ret));
- }
-@@ -1654,8 +1666,8 @@ return( NULL );
- return( NULL );
-
- ret = ff_ask_string(title,def,quest);
-- free(title);
-- free(quest);
-+ PyMem_Free(title);
-+ PyMem_Free(quest);
- free(def);
- if ( ret==NULL )
- Py_RETURN_NONE;
---
-2.17.0
-
diff --git a/media-gfx/fontforge/files/20170731-gethex-unaligned.patch b/media-gfx/fontforge/files/20170731-gethex-unaligned.patch
deleted file mode 100644
index 812f7a44472..00000000000
--- a/media-gfx/fontforge/files/20170731-gethex-unaligned.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-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/files/20170731-startnoui-FindOrMakeEncoding.patch b/media-gfx/fontforge/files/20170731-startnoui-FindOrMakeEncoding.patch
deleted file mode 100644
index 30731b904f2..00000000000
--- a/media-gfx/fontforge/files/20170731-startnoui-FindOrMakeEncoding.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-From 72572a68d306712c040ca741f0655b190326a509 Mon Sep 17 00:00:00 2001
-From: Jeremy Tan <jtanx@outlook.com>
-Date: Sat, 9 Sep 2017 08:03:57 +0800
-Subject: [PATCH] startnoui.c: Include header that defines FindOrMakeEncoding
-
-Failure to include this was causing an implicit pointer to int conversion
-which results in an invalid pointer address on 64-bit builds.
-
-Fixes #3145.
-
-diff --git a/fontforgeexe/startnoui.c b/fontforgeexe/startnoui.c
-index ab8388539..7a188b7a2 100644
---- a/fontforgeexe/startnoui.c
-+++ b/fontforgeexe/startnoui.c
-@@ -27,6 +27,7 @@
- #include "fontforgevw.h"
- #include "scripting.h"
- #include "start.h"
-+#include "encoding.h"
-
- #ifndef _NO_LIBUNICODENAMES
- #include <libunicodenames.h> /* need to open a database when we start */
diff --git a/media-gfx/fontforge/files/20170731-tilepath.patch b/media-gfx/fontforge/files/20170731-tilepath.patch
deleted file mode 100644
index c14d81dc430..00000000000
--- a/media-gfx/fontforge/files/20170731-tilepath.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-Fix implicit declarations
-
-Fixed upstream in a larger refactor.
-
---- a/fontforgeexe/tilepath.c
-+++ b/fontforgeexe/tilepath.c
-@@ -24,7 +24,9 @@
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-+#include "cvundoes.h"
- #include "fontforgeui.h"
-+#include "fvfonts.h"
- #include "splineutil.h"
- #include "splineutil2.h"
- #include <math.h>
diff --git a/media-gfx/fontforge/fontforge-20170731-r5.ebuild b/media-gfx/fontforge/fontforge-20170731-r5.ebuild
deleted file mode 100644
index 3717888256a..00000000000
--- a/media-gfx/fontforge/fontforge-20170731-r5.ebuild
+++ /dev/null
@@ -1,122 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-PYTHON_COMPAT=( python3_6 )
-
-inherit gnome2-utils python-single-r1 xdg-utils
-
-DESCRIPTION="postscript font editor and converter"
-HOMEPAGE="http://fontforge.github.io/"
-SRC_URI="https://github.com/fontforge/fontforge/releases/download/${PV}/fontforge-dist-${PV}.tar.xz"
-
-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 )
- python? ( ${PYTHON_REQUIRED_USE} )
- test? ( png python )
-"
-
-RDEPEND="
- dev-libs/glib
- dev-libs/libltdl:0
- dev-libs/libxml2:2=
- >=media-libs/freetype-2.3.7:2=
- cairo? (
- >=x11-libs/cairo-1.6:0=
- x11-libs/pango:0=
- )
- gif? ( media-libs/giflib:0= )
- jpeg? ( virtual/jpeg:0 )
- png? ( media-libs/libpng:0= )
- tiff? ( media-libs/tiff:0= )
- truetype-debugger? ( >=media-libs/freetype-2.3.8:2[fontforge,-bindist(-)] )
- gtk? ( x11-libs/gtk+:2= )
- python? ( ${PYTHON_DEPS} )
- readline? ( sys-libs/readline:0= )
- unicode? ( media-libs/libuninameslist:0= )
- X? (
- x11-libs/libX11:0=
- x11-libs/libXi:0=
- >=x11-libs/pango-1.10:0=[X]
- )
-"
-DEPEND="${RDEPEND}
- sys-devel/gettext
- virtual/pkgconfig
- X? ( x11-base/xorg-proto )
-"
-
-# Needs keywording on many arches.
-# zeromq? (
-# >=net-libs/czmq-2.2.0:0=
-# >=net-libs/zeromq-4.0.4:0=
-# )
-
-S="${WORKDIR}/fontforge-2.0.${PV}"
-
-PATCHES=(
- "${FILESDIR}"/20170731-startnoui-FindOrMakeEncoding.patch
- "${FILESDIR}"/20170731-tilepath.patch
- "${FILESDIR}"/20170731-gethex-unaligned.patch
- "${FILESDIR}"/20170731-PyMem_Free.patch
- "${FILESDIR}"/CVE-2020-5395.patch
-)
-
-pkg_setup() {
- use python && python-single-r1_pkg_setup
-}
-
-src_configure() {
- local myeconfargs=(
- --disable-static
- $(use_enable truetype-debugger freetype-debugger "${EPREFIX}/usr/include/freetype2/internal4fontforge")
- $(use_enable gtk gtk2-use)
- $(use_enable python python-extension)
- $(use_enable python python-scripting)
- --enable-tile-path
- --enable-gb12345
- $(use_with cairo)
- $(use_with gif giflib)
- $(use_with jpeg libjpeg)
- $(use_with png libpng)
- $(use_with readline libreadline)
- --without-libspiro
- $(use_with tiff libtiff)
- $(use_with unicode libuninameslist)
- #$(use_with zeromq libzmq)
- --without-libzmq
- $(use_with X x)
- )
- econf "${myeconfargs[@]}"
-}
-
-src_compile() {
- # Build system deps are broken
- emake -C plugins
- emake
-}
-
-src_install() {
- default
- find "${D}" -name '*.la' -delete || die
-}
-
-pkg_postrm() {
- gnome2_icon_cache_update
- xdg_desktop_database_update
- xdg_mimeinfo_database_update
-}
-
-pkg_postinst() {
- gnome2_icon_cache_update
- xdg_desktop_database_update
- xdg_mimeinfo_database_update
-}
diff --git a/media-gfx/fontforge/fontforge-20190801.ebuild b/media-gfx/fontforge/fontforge-20190801.ebuild
deleted file mode 100644
index 74590785e86..00000000000
--- a/media-gfx/fontforge/fontforge-20190801.ebuild
+++ /dev/null
@@ -1,104 +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} )
-"
-
-RDEPEND="
- dev-libs/glib
- dev-libs/libltdl:0
- dev-libs/libxml2:2=
- >=media-libs/freetype-2.3.7:2=
- cairo? (
- >=x11-libs/cairo-1.6:0=
- x11-libs/pango:0=
- )
- gif? ( media-libs/giflib:0= )
- jpeg? ( virtual/jpeg:0 )
- png? ( media-libs/libpng:0= )
- tiff? ( media-libs/tiff:0= )
- truetype-debugger? ( >=media-libs/freetype-2.3.8:2[fontforge,-bindist(-)] )
- gtk? ( >=x11-libs/gtk+-3.10:3 )
- python? ( ${PYTHON_DEPS} )
- readline? ( sys-libs/readline:0= )
- unicode? ( media-libs/libuninameslist:0= )
- X? (
- x11-libs/libX11:0=
- x11-libs/libXi:0=
- >=x11-libs/pango-1.10:0=[X]
- )
-"
-DEPEND="${RDEPEND}
- X? ( x11-base/xorg-proto )
-"
-BDEPEND="
- sys-devel/gettext
- virtual/pkgconfig
-"
-
-# Needs keywording on many arches.
-# zeromq? (
-# >=net-libs/czmq-2.2.0:0=
-# >=net-libs/zeromq-4.0.4:0=
-# )
-
-PATCHES=(
- "${FILESDIR}"/20170731-gethex-unaligned.patch
- "${FILESDIR}"/CVE-2020-5395.patch
-)
-
-pkg_setup() {
- use python && python-single-r1_pkg_setup
-}
-
-src_configure() {
- local myeconfargs=(
- --disable-static
- $(use_enable truetype-debugger freetype-debugger "${EPREFIX}/usr/include/freetype2/internal4fontforge")
- $(use_enable python python-extension)
- $(use_enable python python-scripting)
- --enable-tile-path
- $(use_with cairo)
- $(use_with gif giflib)
- $(use_with jpeg libjpeg)
- $(use_with png libpng)
- $(use_with readline libreadline)
- --without-libspiro
- $(use_with tiff libtiff)
- $(use_with unicode libuninameslist)
- $(use_with X x)
- )
- if use gtk; then
- # broken AC_ARG_ENABLE usage
- # https://bugs.gentoo.org/681550
- myeconfargs+=( --enable-gdk=gdk3 )
- fi
- econf "${myeconfargs[@]}"
-}
-
-src_install() {
- emake DESTDIR="${D}" install
- docompress -x /usr/share/doc/${PF}/html
- einstalldocs
- find "${ED}" -name '*.la' -type f -delete || die
-}
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-gfx/fontforge/, media-gfx/fontforge/files/
@ 2020-05-13 23:53 Mike Gilbert
0 siblings, 0 replies; 10+ messages in thread
From: Mike Gilbert @ 2020-05-13 23:53 UTC (permalink / raw
To: gentoo-commits
commit: 4318cd69b4e540d455464cf0681431b1c5c7cf47
Author: Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Wed May 13 23:53:32 2020 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Wed May 13 23:53:32 2020 +0000
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 <floppym <AT> 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 00000000000..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 <floppym@gentoo.org>
+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 <sys/select.h>
+ #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() {
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-gfx/fontforge/, media-gfx/fontforge/files/
@ 2021-04-06 11:07 Andreas Sturmlechner
0 siblings, 0 replies; 10+ messages in thread
From: Andreas Sturmlechner @ 2021-04-06 11:07 UTC (permalink / raw
To: gentoo-commits
commit: db4025b7f2be0a24443b8753fa37b5e4f1f0727e
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Tue Apr 6 10:50:41 2021 +0000
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Tue Apr 6 11:06:48 2021 +0000
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 <asturm <AT> 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..00000000000
--- 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 <floppym@gentoo.org>
-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 <sys/select.h>
- #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..00000000000
--- 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 <jtanx@outlook.com>
-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 <jtanx@outlook.com>
-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/fontforge/python.c
-index 5344b0f60f..6c9675fa4e 100644
---- a/fontforge/python.c
-+++ b/fontforge/python.c
-@@ -760,7 +760,7 @@ static PyObject *PyFF_UnicodeAnnotationFromLib(PyObject *UNUSED(self), PyObject
- char *temp;
- long val;
-
-- if ( !PyArg_ParseTuple(args,"|i",&val) )
-+ if ( !PyArg_ParseTuple(args,"|l",&val) )
- return( NULL );
-
- if ( (temp=unicode_annot(val))==NULL ) {
-@@ -777,7 +777,7 @@ static PyObject *PyFF_UnicodeNameFromLib(PyObject *UNUSED(self), PyObject *args)
- char *temp;
- long val;
-
-- if ( !PyArg_ParseTuple(args,"|i",&val) )
-+ if ( !PyArg_ParseTuple(args,"|l",&val) )
- return( NULL );
-
- if ( (temp=unicode_name(val))==NULL ) {
-@@ -798,10 +798,10 @@ static PyObject *PyFF_UnicodeBlockStartFromLib(PyObject *UNUSED(self), PyObject
- /* Use this function with UnicodeBlockNameFromLib(n) & UnicodeBlockEndFromLib(n). */
- long val;
-
-- if ( !PyArg_ParseTuple(args,"|i",&val) )
-+ if ( !PyArg_ParseTuple(args,"|l",&val) )
- return( NULL );
-
-- return( Py_BuildValue("i", unicode_block_start(val)) );
-+ return( Py_BuildValue("l", (long)unicode_block_start(val)) );
- }
-
- static PyObject *PyFF_UnicodeBlockEndFromLib(PyObject *UNUSED(self), PyObject *args) {
-@@ -809,10 +809,10 @@ static PyObject *PyFF_UnicodeBlockEndFromLib(PyObject *UNUSED(self), PyObject *a
- /* Use this function with UnicodeBlockStartFromLib(n), UnicodeBlockNameFromLib(n) */
- long val;
-
-- if ( !PyArg_ParseTuple(args,"|i",&val) )
-+ if ( !PyArg_ParseTuple(args,"|l",&val) )
- return( NULL );
-
-- return( Py_BuildValue("i", unicode_block_end(val)) );
-+ return( Py_BuildValue("l", (long)unicode_block_end(val)) );
- }
-
- static PyObject *PyFF_UnicodeBlockNameFromLib(PyObject *UNUSED(self), PyObject *args) {
-@@ -822,7 +822,7 @@ static PyObject *PyFF_UnicodeBlockNameFromLib(PyObject *UNUSED(self), PyObject *
- char *temp;
- long val;
-
-- if ( !PyArg_ParseTuple(args,"|i",&val) )
-+ if ( !PyArg_ParseTuple(args,"|l",&val) )
- return( NULL );
-
- if ( (temp=unicode_block_name(val))==NULL ) {
-@@ -853,24 +853,24 @@ static PyObject *PyFF_UnicodeNames2GetCntFromLib(PyObject *UNUSED(self), PyObjec
- static PyObject *PyFF_UnicodeNames2GetNxtFromLib(PyObject *UNUSED(self), PyObject *args) {
- long val;
-
-- if ( !PyArg_ParseTuple(args,"|i",&val) )
-+ if ( !PyArg_ParseTuple(args,"|l",&val) )
- return( NULL );
-- return( Py_BuildValue("i", unicode_names2getUtabLoc(val)) );
-+ return( Py_BuildValue("l", (long)unicode_names2getUtabLoc(val)) );
- }
-
- static PyObject *PyFF_UnicodeNames2NxtUniFromLib(PyObject *UNUSED(self), PyObject *args) {
- long val;
-
-- if ( !PyArg_ParseTuple(args,"|i",&val) )
-+ if ( !PyArg_ParseTuple(args,"|l",&val) )
- return( NULL );
-- return( Py_BuildValue("i", unicode_names2valFrmTab(val)) );
-+ return( Py_BuildValue("l", (long)unicode_names2valFrmTab(val)) );
- }
-
- static PyObject *PyFF_UnicodeNames2FrmTabFromLib(PyObject *UNUSED(self), PyObject *args) {
- long val;
- char *temp;
-
-- if ( !PyArg_ParseTuple(args,"|i",&val) )
-+ if ( !PyArg_ParseTuple(args,"|l",&val) )
- return( NULL );
- if ( (temp=unicode_name2FrmTab(val))==NULL ) {
- return Py_BuildValue("s", "");
-@@ -883,7 +883,7 @@ static PyObject *PyFF_UnicodeNames2FromLib(PyObject *UNUSED(self), PyObject *arg
- long val;
- char *temp;
-
-- if ( !PyArg_ParseTuple(args,"|i",&val) )
-+ if ( !PyArg_ParseTuple(args,"|l",&val) )
- return( NULL );
- if ( (temp=unicode_name2(val))==NULL ) {
- return Py_BuildValue("s", "");
-@@ -899,7 +899,7 @@ static PyObject *PyFF_UnicodeNames2FromLib(PyObject *UNUSED(self), PyObject *arg
- static PyObject *PyFF_isligature(PyObject *UNUSED(self), PyObject *args) {
- long codepoint;
-
-- if ( !PyArg_ParseTuple(args,"|i",&codepoint) )
-+ if ( !PyArg_ParseTuple(args,"|l",&codepoint) )
- return( NULL );
-
- return( Py_BuildValue("i", is_LIGATURE(codepoint)==0?1:0) );
-@@ -908,7 +908,7 @@ static PyObject *PyFF_isligature(PyObject *UNUSED(self), PyObject *args) {
- static PyObject *PyFF_isvulgarfraction(PyObject *UNUSED(self), PyObject *args) {
- long codepoint;
-
-- if ( !PyArg_ParseTuple(args,"|i",&codepoint) )
-+ if ( !PyArg_ParseTuple(args,"|l",&codepoint) )
- return( NULL );
-
- return( Py_BuildValue("i", is_VULGAR_FRACTION(codepoint)==0?1:0) );
-@@ -917,7 +917,7 @@ static PyObject *PyFF_isvulgarfraction(PyObject *UNUSED(self), PyObject *args) {
- static PyObject *PyFF_isotherfraction(PyObject *UNUSED(self), PyObject *args) {
- long codepoint;
-
-- if ( !PyArg_ParseTuple(args,"|i",&codepoint) )
-+ if ( !PyArg_ParseTuple(args,"|l",&codepoint) )
- return( NULL );
-
- return( Py_BuildValue("i", is_OTHER_FRACTION(codepoint)==0?1:0) );
-@@ -926,7 +926,7 @@ static PyObject *PyFF_isotherfraction(PyObject *UNUSED(self), PyObject *args) {
- static PyObject *PyFF_isfraction(PyObject *UNUSED(self), PyObject *args) {
- long codepoint;
-
-- if ( !PyArg_ParseTuple(args,"|i",&codepoint) )
-+ if ( !PyArg_ParseTuple(args,"|l",&codepoint) )
- return( NULL );
-
- return( Py_BuildValue("i", (is_VULGAR_FRACTION(codepoint)==0 || \
-@@ -957,28 +957,28 @@ static PyObject *PyFF_FracChartGetCnt(PyObject *UNUSED(self), PyObject *UNUSED(a
- static PyObject *PyFF_LigChartGetNxt(PyObject *UNUSED(self), PyObject *args) {
- long val;
-
-- if ( !PyArg_ParseTuple(args,"|i",&val) )
-+ if ( !PyArg_ParseTuple(args,"|l",&val) )
- return( NULL );
-
-- return( Py_BuildValue("i", Ligature_get_U(val)) );
-+ return( Py_BuildValue("l", (long)Ligature_get_U(val)) );
- }
-
- static PyObject *PyFF_VulChartGetNxt(PyObject *UNUSED(self), PyObject *args) {
- long val;
-
-- if ( !PyArg_ParseTuple(args,"|i",&val) )
-+ if ( !PyArg_ParseTuple(args,"|l",&val) )
- return( NULL );
-
-- return( Py_BuildValue("i", VulgFrac_get_U(val)) );
-+ return( Py_BuildValue("l", (long)VulgFrac_get_U(val)) );
- }
-
- static PyObject *PyFF_OFracChartGetNxt(PyObject *UNUSED(self), PyObject *args) {
- long val;
-
-- if ( !PyArg_ParseTuple(args,"|i",&val) )
-+ if ( !PyArg_ParseTuple(args,"|l",&val) )
- return( NULL );
-
-- return( Py_BuildValue("i", Fraction_get_U(val)) );
-+ return( Py_BuildValue("l", (long)Fraction_get_U(val)) );
- }
-
- /* If you have a unicode ligature, or fraction, these routines return loc n. */
-@@ -987,7 +987,7 @@ static PyObject *PyFF_OFracChartGetNxt(PyObject *UNUSED(self), PyObject *args) {
- static PyObject *PyFF_LigChartGetLoc(PyObject *UNUSED(self), PyObject *args) {
- long codepoint;
-
-- if ( !PyArg_ParseTuple(args,"|i",&codepoint) )
-+ if ( !PyArg_ParseTuple(args,"|l",&codepoint) )
- return( NULL );
-
- return( Py_BuildValue("i", Ligature_find_N(codepoint)) );
-@@ -996,7 +996,7 @@ static PyObject *PyFF_LigChartGetLoc(PyObject *UNUSED(self), PyObject *args) {
- static PyObject *PyFF_VulChartGetLoc(PyObject *UNUSED(self), PyObject *args) {
- long codepoint;
-
-- if ( !PyArg_ParseTuple(args,"|i",&codepoint) )
-+ if ( !PyArg_ParseTuple(args,"|l",&codepoint) )
- return( NULL );
-
- return( Py_BuildValue("i", VulgFrac_find_N(codepoint)) );
-@@ -1005,7 +1005,7 @@ static PyObject *PyFF_VulChartGetLoc(PyObject *UNUSED(self), PyObject *args) {
- static PyObject *PyFF_OFracChartGetLoc(PyObject *UNUSED(self), PyObject *args) {
- long codepoint;
-
-- if ( !PyArg_ParseTuple(args,"|i",&codepoint) )
-+ if ( !PyArg_ParseTuple(args,"|l",&codepoint) )
- return( NULL );
-
- return( Py_BuildValue("i", Fraction_find_N(codepoint)) );
-@@ -1066,7 +1066,7 @@ static PyObject *PyFF_LigChartGetAltVal(PyObject *UNUSED(self), PyObject *args)
-
- if ( !PyArg_ParseTuple(args,"ll",&nthCode, &altN) )
- return( NULL );
-- return( Py_BuildValue("i", Ligature_alt_getV(nthCode,altN)) );
-+ return( Py_BuildValue("l", (long)Ligature_alt_getV(nthCode,altN)) );
- }
-
- static PyObject *PyFF_LigChartUGetAltVal(PyObject *UNUSED(self), PyObject *args) {
-@@ -1074,7 +1074,7 @@ static PyObject *PyFF_LigChartUGetAltVal(PyObject *UNUSED(self), PyObject *args)
-
- if ( !PyArg_ParseTuple(args,"ll",&nthCode, &altN) )
- return( NULL );
-- return( Py_BuildValue("i", LigatureU_alt_getV(nthCode,altN)) );
-+ return( Py_BuildValue("l", (long)LigatureU_alt_getV(nthCode,altN)) );
- }
-
- static PyObject *PyFF_VulChartGetAltVal(PyObject *UNUSED(self), PyObject *args) {
-@@ -1082,7 +1082,7 @@ static PyObject *PyFF_VulChartGetAltVal(PyObject *UNUSED(self), PyObject *args)
-
- if ( !PyArg_ParseTuple(args,"ll",&nthCode, &altN) )
- return( NULL );
-- return( Py_BuildValue("i", VulgFrac_alt_getV(nthCode,altN)) );
-+ return( Py_BuildValue("l", (long)VulgFrac_alt_getV(nthCode,altN)) );
- }
-
- static PyObject *PyFF_VulChartUGetAltVal(PyObject *UNUSED(self), PyObject *args) {
-@@ -1090,7 +1090,7 @@ static PyObject *PyFF_VulChartUGetAltVal(PyObject *UNUSED(self), PyObject *args)
-
- if ( !PyArg_ParseTuple(args,"ll",&nthCode, &altN) )
- return( NULL );
-- return( Py_BuildValue("i", VulgFracU_alt_getV(nthCode,altN)) );
-+ return( Py_BuildValue("l", (long)VulgFracU_alt_getV(nthCode,altN)) );
- }
-
- static PyObject *PyFF_OFracChartGetAltVal(PyObject *UNUSED(self), PyObject *args) {
-@@ -1098,7 +1098,7 @@ static PyObject *PyFF_OFracChartGetAltVal(PyObject *UNUSED(self), PyObject *args
-
- if ( !PyArg_ParseTuple(args,"ll",&nthCode, &altN) )
- return( NULL );
-- return( Py_BuildValue("i", Fraction_alt_getV(nthCode,altN)) );
-+ return( Py_BuildValue("l", (long)Fraction_alt_getV(nthCode,altN)) );
- }
-
- static PyObject *PyFF_OFracChartUGetAltVal(PyObject *UNUSED(self), PyObject *args) {
-@@ -1106,7 +1106,7 @@ static PyObject *PyFF_OFracChartUGetAltVal(PyObject *UNUSED(self), PyObject *arg
-
- if ( !PyArg_ParseTuple(args,"ll",&nthCode, &altN) )
- return( NULL );
-- return( Py_BuildValue("i", FractionU_alt_getV(nthCode,altN)) );
-+ return( Py_BuildValue("l", (long)FractionU_alt_getV(nthCode,altN)) );
- }
-
- static PyObject *PyFF_Version(PyObject *UNUSED(self), PyObject *UNUSED(args)) {
-@@ -1542,8 +1542,8 @@ return( ret );
- }
-
- static PyObject *PyFF_scriptFromUnicode(PyObject *UNUSED(self), PyObject *args) {
-- long u;
-- if ( !PyArg_ParseTuple(args,"i",&u) )
-+ unsigned long u;
-+ if ( !PyArg_ParseTuple(args,"k",&u) )
- return( NULL );
-
- uint32 script = ScriptFromUnicode(u, NULL);
diff --git a/media-gfx/fontforge/files/20200314-stylemap.patch b/media-gfx/fontforge/files/20200314-stylemap.patch
deleted file mode 100644
index d3311cab02d..00000000000
--- a/media-gfx/fontforge/files/20200314-stylemap.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 3b83adc89771000eb95fcd87bb675f771ba85aaf Mon Sep 17 00:00:00 2001
-From: Mike Gilbert <floppym@gentoo.org>
-Date: Sun, 29 Mar 2020 16:36:14 -0400
-Subject: [PATCH] Avoid integer size conflict when setting stylemap
-
-stylemap is a 16-bit integer, but hexmap writes 32-bits.
-
-Bug: https://bugs.gentoo.org/642756
----
- fontforge/sfd.c | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/fontforge/sfd.c b/fontforge/sfd.c
-index 9517d8cb1..b638fe447 100644
---- a/fontforge/sfd.c
-+++ b/fontforge/sfd.c
-@@ -8104,7 +8104,9 @@ bool SFD_GetFontMetaData( FILE *sfd,
- }
- else if ( strmatch(tok,"StyleMap:")==0 )
- {
-- gethex(sfd,(uint32 *)&sf->pfminfo.stylemap);
-+ uint32 u;
-+ gethex(sfd,&u);
-+ sf->pfminfo.stylemap = u;
- }
- /* Legacy attribute for StyleMap. Deprecated. */
- else if ( strmatch(tok,"OS2StyleName:")==0 )
---
-2.26.0.rc2
-
diff --git a/media-gfx/fontforge/files/20200314-tilepath.patch b/media-gfx/fontforge/files/20200314-tilepath.patch
deleted file mode 100644
index 1e0d077532a..00000000000
--- a/media-gfx/fontforge/files/20200314-tilepath.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 43e6087ec9bdbb23b8bb61c07efe6490fab23d73 Mon Sep 17 00:00:00 2001
-From: skef <6175836+skef@users.noreply.github.com>
-Date: Thu, 19 Mar 2020 17:16:20 -0700
-Subject: [PATCH] Tilepath fix (#4231)
-
----
- fontforgeexe/tilepath.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/fontforgeexe/tilepath.c b/fontforgeexe/tilepath.c
-index b329b54098..2575058eb4 100644
---- a/fontforgeexe/tilepath.c
-+++ b/fontforgeexe/tilepath.c
-@@ -571,7 +571,7 @@ static void AdjustPoint(TD *td,Spline *spline,bigreal t, FitPoint *to) {
- } else {
- bigreal s=(dy1*dx2/dy2-dx1);
- if ( s>-.00001 && s<.00001 ) { /* essentially parallel */
-- to->p.x = x1; to->y = y1;
-+ to->p.x = x1; to->p.y = y1;
- } else {
- bigreal t1 = (x1-x2- dx2/dy2*(y1-y2))/s;
- to->p.x = x1 + dx1*t1;
-@@ -610,7 +610,7 @@ static SplinePoint *TDMakePoint(TD *td,Spline *old,real t) {
-
- AdjustPoint(td,old,t,&fp);
- new = chunkalloc(sizeof(SplinePoint));
-- new->me.x = tp.p.x; new->me.y = tp.p.y;
-+ new->me.x = fp.p.x; new->me.y = fp.p.y;
- new->nextcp = new->me;
- new->prevcp = new->me;
- new->nonextcp = new->noprevcp = true;
diff --git a/media-gfx/fontforge/files/fontforge-20200314-freetype-2.10.3.patch b/media-gfx/fontforge/files/fontforge-20200314-freetype-2.10.3.patch
deleted file mode 100644
index 0a07423ab62..00000000000
--- a/media-gfx/fontforge/files/fontforge-20200314-freetype-2.10.3.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-https://bugs.gentoo.org/753788
-https://github.com/fontforge/fontforge/commit/7837530190a3b666109ba4eb9b3b76f09799057c
-----
-From 7837530190a3b666109ba4eb9b3b76f09799057c Mon Sep 17 00:00:00 2001
-From: Jeremy Tan <jtanx@outlook.com>
-Date: Tue, 3 Nov 2020 21:27:26 +1100
-Subject: [PATCH] Fix FreeType debugger compilation with FreeType >= 2.10.3
-
-Fixes #4477
----
- fontforge/fffreetype.h | 4 +++-
- fontforgeexe/cvdebug.c | 4 +++-
- fontforgeexe/cvdgloss.c | 4 +++-
- 3 files changed, 9 insertions(+), 3 deletions(-)
-
-diff --git a/fontforge/fffreetype.h b/fontforge/fffreetype.h
-index 7757b7bf3b..11070fc916 100644
---- a/fontforge/fffreetype.h
-+++ b/fontforge/fffreetype.h
-@@ -39,7 +39,9 @@
- #endif
-
- #if defined(FREETYPE_HAS_DEBUGGER)
--# include <internal/internal.h>
-+#if FREETYPE_MAJOR == 2 && (FREETYPE_MINOR < 10 || (FREETYPE_MINOR == 10 && FREETYPE_PATCH < 3))
-+# include <internal/internal.h>
-+# endif
- # include <ttdriver.h>
- # include <ttinterp.h>
- # include <ttobjs.h>
-diff --git a/fontforgeexe/cvdebug.c b/fontforgeexe/cvdebug.c
-index 9fb7db6112..a891902a06 100644
---- a/fontforgeexe/cvdebug.c
-+++ b/fontforgeexe/cvdebug.c
-@@ -59,7 +59,9 @@ void CVDebugPointPopup(CharView *cv) {
- #include <ft2build.h>
- #include FT_FREETYPE_H
-
--#include <internal/internal.h>
-+#if FREETYPE_MAJOR == 2 && (FREETYPE_MINOR < 10 || (FREETYPE_MINOR == 10 && FREETYPE_PATCH < 3))
-+# include <internal/internal.h>
-+#endif
- #include <ttinterp.h>
-
- # define PPEMX(exc) ((exc)->size->root.metrics.x_ppem)
-diff --git a/fontforgeexe/cvdgloss.c b/fontforgeexe/cvdgloss.c
-index 33cc5c71e1..c1ad97790b 100644
---- a/fontforgeexe/cvdgloss.c
-+++ b/fontforgeexe/cvdgloss.c
-@@ -42,7 +42,9 @@ extern GBox _ggadget_Default_Box;
- #include <ft2build.h>
- #include FT_FREETYPE_H
-
--#include <internal/internal.h>
-+#if FREETYPE_MAJOR == 2 && (FREETYPE_MINOR < 10 || (FREETYPE_MINOR == 10 && FREETYPE_PATCH < 3))
-+# include <internal/internal.h>
-+#endif
- #include <ttinterp.h>
-
- #define PPEMX(exc) ((exc)->size->root.metrics.x_ppem)
diff --git a/media-gfx/fontforge/fontforge-20200314.ebuild b/media-gfx/fontforge/fontforge-20200314.ebuild
deleted file mode 100644
index 8136d074c60..00000000000
--- a/media-gfx/fontforge/fontforge-20200314.ebuild
+++ /dev/null
@@ -1,117 +0,0 @@
-# Copyright 2004-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-PYTHON_COMPAT=( python3_{7,8,9} )
-
-inherit python-single-r1 xdg cmake
-
-DESCRIPTION="postscript font editor and converter"
-HOMEPAGE="https://fontforge.org/"
-SRC_URI="https://github.com/fontforge/fontforge/releases/download/${PV}/fontforge-${PV}.tar.xz"
-
-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"
-IUSE="doc truetype-debugger gif gtk jpeg png +python readline test tiff svg unicode woff2 X"
-RESTRICT="!test? ( test )"
-
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-
-RDEPEND="
- dev-libs/glib:2
- dev-libs/libltdl:0
- dev-libs/libxml2:2=
- >=media-libs/freetype-2.3.7:2=
- gif? ( media-libs/giflib:0= )
- jpeg? ( virtual/jpeg:0 )
- png? ( media-libs/libpng:0= )
- tiff? ( media-libs/tiff:0= )
- truetype-debugger? ( >=media-libs/freetype-2.3.8:2[fontforge,-bindist(-)] )
- gtk? ( >=x11-libs/gtk+-3.10:3 )
- !gtk? (
- X? (
- >=x11-libs/cairo-1.6:0=
- >=x11-libs/pango-1.10:0=[X]
- x11-libs/libX11:0=
- x11-libs/libXi:0=
- )
- )
- python? ( ${PYTHON_DEPS} )
- readline? ( sys-libs/readline:0= )
- unicode? ( media-libs/libuninameslist:0= )
- woff2? ( media-libs/woff2:0= )
-"
-DEPEND="${RDEPEND}
- !gtk? ( X? ( x11-base/xorg-proto ) )
-"
-BDEPEND="
- sys-devel/gettext
- doc? ( >=dev-python/sphinx-2 )
- python? ( ${PYTHON_DEPS} )
- test? ( ${RDEPEND} )
-"
-
-PATCHES=(
- "${FILESDIR}"/20200314-stylemap.patch
- "${FILESDIR}"/20200314-tilepath.patch
- "${FILESDIR}"/20200314-big-endian.patch
- "${FILESDIR}"/fontforge-doc-no-warn-error.patch
- "${FILESDIR}"/20200314-MacServiceReadFDs.patch
- "${FILESDIR}"/${P}-freetype-2.10.3.patch
-)
-
-pkg_setup() {
- :
-}
-
-src_configure() {
- local mycmakeargs=(
- -DENABLE_DOCS=$(usex doc ON OFF)
- -DENABLE_LIBGIF=$(usex gif ON OFF)
- -DENABLE_LIBJPEG=$(usex jpeg ON OFF)
- -DENABLE_LIBPNG=$(usex png ON OFF)
- -DENABLE_LIBREADLINE=$(usex readline ON OFF)
- -DENABLE_LIBSPIRO=OFF # No package in Gentoo
- -DENABLE_LIBTIFF=$(usex tiff ON OFF)
- -DENABLE_LIBUNINAMESLIST=$(usex unicode ON OFF)
- -DENABLE_MAINTAINER_TOOLS=OFF
- -DENABLE_PYTHON_EXTENSION=$(usex python ON OFF)
- -DENABLE_PYTHON_SCRIPTING=$(usex python ON OFF)
- -DENABLE_TILE_PATH=ON
- -DENABLE_WOFF2=$(usex woff2 ON OFF)
- )
-
- if use gtk || use X; then
- mycmakeargs+=(
- -DENABLE_GUI=ON
- # Prefer GTK over X11 if both USE flage are enabled
- -DENABLE_X11=$(usex gtk OFF ON)
- )
- else
- mycmakeargs+=( -DENABLE_GUI=OFF )
- fi
-
- if use python; then
- python_setup
- mycmakeargs+=( -DPython3_EXECUTABLE="${PYTHON}" )
- fi
-
- if use truetype-debugger ; then
- local ft2="${ESYSROOT}/usr/include/freetype2"
- local ft2i="${ft2}/internal4fontforge"
- mycmakeargs+=(
- -DENABLE_FREETYPE_DEBUGGER="${ft2}"
- -DFreeTypeSource_INCLUDE_DIRS="${ft2};${ft2i}/include;${ft2i}/include/freetype;${ft2i}/src/truetype"
- )
- fi
-
- cmake_src_configure
-}
-
-src_install() {
- cmake_src_install
- docompress -x /usr/share/doc/${PF}/html
- einstalldocs
- find "${ED}" -name '*.la' -type f -delete || die
-}
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-gfx/fontforge/, media-gfx/fontforge/files/
@ 2023-06-23 22:42 Sam James
0 siblings, 0 replies; 10+ messages in thread
From: Sam James @ 2023-06-23 22:42 UTC (permalink / raw
To: gentoo-commits
commit: 55202622636b05743e43da276e5a04f054c473e0
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Jun 23 22:38:06 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Jun 23 22:42:03 2023 +0000
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 <jfmfour22 <AT> gmail.com>
Signed-off-by: Sam James <sam <AT> 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 000000000000..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 <blockiv@tuta.io>
+Date: Thu, 22 Jun 2023 04:39:16 +0000
+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-format, fuzzy
+ msgid ""
+ "You are attempting to paste a reference to %1$s into %2$s.\n"
+ "But %1$s does not exist in this font, nor can I find the original character "
+@@ -24556,7 +24556,7 @@ msgstr ""
+ "glyphe auquel il se référait.\n"
+ "Le glyphe ne sera pas copié."
+
+-#, c-format
++#, c-format, fuzzy
+ msgid ""
+ "You are attempting to paste a reference to %1$s into %2$s.\n"
+ "But %1$s does not exist in this font.\n"
+--- a/po/it.po
++++ b/po/it.po
+@@ -2297,7 +2297,7 @@ msgstr "Riferimento invertito"
+ msgid "Flipping"
+ msgstr "Ribaltamento"
+
+-#, 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"
+@@ -5830,7 +5830,7 @@ msgstr ""
+ msgid "The font does not contain a glyph named %s."
+ msgstr "Questo font non contiene un glifo chiamato %s."
+
+-#, c-format
++#, c-format, fuzzy
+ msgid ""
+ "The glyph %1$.30s has a different number of contours in font %2$.30s than in "
+ "%3$.30s"
+@@ -6229,7 +6229,7 @@ msgstr ""
+ msgid "This font does not specify font-face\n"
+ msgstr "Questo font non specifica il font-face\n"
+
+-#, 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"
+--
+2.41.0
diff --git a/media-gfx/fontforge/fontforge-20230101.ebuild b/media-gfx/fontforge/fontforge-20230101.ebuild
index c8d28d29388a..001bb06fc921 100644
--- a/media-gfx/fontforge/fontforge-20230101.ebuild
+++ b/media-gfx/fontforge/fontforge-20230101.ebuild
@@ -52,6 +52,7 @@ BDEPEND="
PATCHES=(
"${FILESDIR}"/fontforge-doc-no-warn-error.patch
+ "${FILESDIR}"/${PN}-20230101-workaround-broken-translations.patch
)
pkg_setup() {
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-gfx/fontforge/, media-gfx/fontforge/files/
@ 2024-05-03 11:20 Sam James
0 siblings, 0 replies; 10+ messages in thread
From: Sam James @ 2024-05-03 11:20 UTC (permalink / raw
To: gentoo-commits
commit: 26a218c56917878f75b6fa995d3336de799462f1
Author: Christopher Fore <csfore <AT> posteo <DOT> net>
AuthorDate: Wed Apr 24 13:21:02 2024 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri May 3 11:18:53 2024 +0000
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 <csfore <AT> posteo.net>
Closes: https://github.com/gentoo/gentoo/pull/36405
Signed-off-by: Sam James <sam <AT> 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 000000000000..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 <pk@canva.com>
+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
++ ) == 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/media-gfx/fontforge/fontforge-20230101-r1.ebuild b/media-gfx/fontforge/fontforge-20230101-r1.ebuild
new file mode 100644
index 000000000000..acbd7a1c4708
--- /dev/null
+++ b/media-gfx/fontforge/fontforge-20230101-r1.ebuild
@@ -0,0 +1,111 @@
+# Copyright 2004-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{9..11} )
+inherit python-single-r1 xdg cmake
+
+DESCRIPTION="postscript font editor and converter"
+HOMEPAGE="https://fontforge.org/"
+SRC_URI="https://github.com/fontforge/fontforge/releases/download/${PV}/${P}.tar.xz"
+
+LICENSE="BSD GPL-3+"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos"
+IUSE="doc truetype-debugger gif gtk jpeg png +python readline test tiff svg woff2 X"
+RESTRICT="!test? ( test )"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+RDEPEND="
+ >=dev-libs/glib-2.67:2
+ dev-libs/libltdl:0
+ dev-libs/libxml2:2=
+ >=media-libs/freetype-2.3.7:2=
+ gif? ( media-libs/giflib:= )
+ jpeg? ( media-libs/libjpeg-turbo:= )
+ png? ( media-libs/libpng:= )
+ tiff? ( media-libs/tiff:= )
+ truetype-debugger? ( >=media-libs/freetype-2.3.8:2[fontforge,-bindist(-)] )
+ gtk? ( >=x11-libs/gtk+-3.10:3 )
+ !gtk? (
+ X? (
+ >=x11-libs/cairo-1.6:0=
+ >=x11-libs/pango-1.10:0=[X]
+ x11-libs/libX11:=
+ x11-libs/libXi:=
+ )
+ )
+ python? ( ${PYTHON_DEPS} )
+ readline? ( sys-libs/readline:0= )
+ woff2? ( media-libs/woff2:0= )
+"
+DEPEND="${RDEPEND}
+ !gtk? ( X? ( x11-base/xorg-proto ) )
+"
+BDEPEND="
+ sys-devel/gettext
+ doc? ( >=dev-python/sphinx-2 )
+ python? ( ${PYTHON_DEPS} )
+ test? ( ${RDEPEND} )
+"
+
+PATCHES=(
+ "${FILESDIR}"/fontforge-doc-no-warn-error.patch
+ "${FILESDIR}"/${PN}-20230101-workaround-broken-translations.patch
+ "${FILESDIR}"/${PN}-20230101-fix-splinefont-shell-command-injection.patch
+)
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DENABLE_DOCS=$(usex doc ON OFF)
+ -DENABLE_LIBGIF=$(usex gif ON OFF)
+ -DENABLE_LIBJPEG=$(usex jpeg ON OFF)
+ -DENABLE_LIBPNG=$(usex png ON OFF)
+ -DENABLE_LIBREADLINE=$(usex readline ON OFF)
+ -DENABLE_LIBSPIRO=OFF # No package in Gentoo
+ -DENABLE_LIBTIFF=$(usex tiff ON OFF)
+ -DENABLE_MAINTAINER_TOOLS=OFF
+ -DENABLE_PYTHON_EXTENSION=$(usex python ON OFF)
+ -DENABLE_PYTHON_SCRIPTING=$(usex python ON OFF)
+ -DENABLE_TILE_PATH=ON
+ -DENABLE_WOFF2=$(usex woff2 ON OFF)
+ )
+
+ if use gtk || use X; then
+ mycmakeargs+=(
+ -DENABLE_GUI=ON
+ # Prefer GTK over X11 if both USE flage are enabled
+ -DENABLE_X11=$(usex gtk OFF ON)
+ )
+ else
+ mycmakeargs+=( -DENABLE_GUI=OFF )
+ fi
+
+ if use python; then
+ python_setup
+ mycmakeargs+=( -DPython3_EXECUTABLE="${PYTHON}" )
+ fi
+
+ if use truetype-debugger ; then
+ local ft2="${ESYSROOT}/usr/include/freetype2"
+ local ft2i="${ft2}/internal4fontforge"
+ mycmakeargs+=(
+ -DENABLE_FREETYPE_DEBUGGER="${ft2}"
+ -DFreeTypeSource_INCLUDE_DIRS="${ft2};${ft2i}/include;${ft2i}/include/freetype;${ft2i}/src/truetype"
+ )
+ fi
+
+ cmake_src_configure
+}
+
+src_install() {
+ cmake_src_install
+ docompress -x /usr/share/doc/${PF}/html
+ einstalldocs
+ find "${ED}" -name '*.la' -type f -delete || die
+}
^ permalink raw reply related [flat|nested] 10+ messages in thread
end of thread, other threads:[~2024-05-03 11:20 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-28 0:05 [gentoo-commits] repo/gentoo:master commit in: media-gfx/fontforge/, media-gfx/fontforge/files/ Mike Gilbert
-- strict thread matches above, loose matches on Subject: below --
2024-05-03 11:20 Sam James
2023-06-23 22:42 Sam James
2021-04-06 11:07 Andreas Sturmlechner
2020-05-13 23:53 Mike Gilbert
2020-05-13 23:50 Mike Gilbert
2020-03-29 18:15 Mike Gilbert
2020-01-27 22:02 Mike Gilbert
2019-03-24 22:25 Mike Gilbert
2017-12-30 22:46 Mike Gilbert
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox