Bug 297153 - japanese/ebview-gtk2: Fix crashes immediately after startup
Summary: japanese/ebview-gtk2: Fix crashes immediately after startup
Status: In Progress
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Some People
Assignee: Kousuke Kannagi
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2026-07-29 23:37 UTC by Yasue Takeshi
Modified: 2026-07-31 08:45 UTC (History)
3 users (show)

See Also:
mce: maintainer-feedback? (osa)
fluffy: maintainer-feedback+
mce: maintainer-feedback? (fluffy)
mce: merge-quarterly?


Attachments
ports patch (452 bytes, text/plain)
2026-07-29 23:37 UTC, Yasue Takeshi
no flags Details
Fix crashes immediately after startup (3.13 KB, patch)
2026-07-30 02:47 UTC, Kousuke Kannagi
no flags Details | Diff
Fix crashes immediately after startup (3.10 KB, patch)
2026-07-30 02:55 UTC, Kousuke Kannagi
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yasue Takeshi 2026-07-29 23:37:27 UTC
Created attachment 273300 [details]
ports patch

ja-ebview-gtk2-0.3.6_20 crashes immediately after startup on FreeBSD 14.4.
The crash is caused by the use of the obsolete PangoX API.
Replacing the following two lines in src/preference.c fixes the problem:

--- src/preference.c.orig
+++ src/preference.c
@@ -27,7 +27,7 @@
 #ifdef __WIN32__
 #include <pango/pangowin32.h>
 #else
-#include <pango/pangox.h>
+#include <pango/pangocairo.h>
 #endif
 
 #include "dictbar.h"
@@ -429,7 +429,7 @@
 		return;
 	}
 
-	fontmap = pango_x_font_map_for_display(display);
+	fontmap = pango_cairo_font_map_get_default();
 #endif
Comment 1 Kousuke Kannagi freebsd_committer freebsd_triage 2026-07-30 02:47:18 UTC
Created attachment 273301 [details]
Fix crashes immediately after startup

Since japanese/ebview was removed in 2014, remove CONFLICTS.
Switch from REINPLACE_CMD to patchfile.
Comment 2 Kousuke Kannagi freebsd_committer freebsd_triage 2026-07-30 02:55:08 UTC
Created attachment 273302 [details]
Fix crashes immediately after startup
Comment 3 Dima Panov freebsd_committer freebsd_triage 2026-07-31 06:08:54 UTC
Go forward
Comment 4 commit-hook freebsd_committer freebsd_triage 2026-07-31 08:18:44 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=e1c65a93e348dddf2ab5a5b099f4d2fae262d0b2

commit e1c65a93e348dddf2ab5a5b099f4d2fae262d0b2
Author:     Yasue Takeshi <yasue@meigaku.ac.jp>
AuthorDate: 2026-07-30 02:43:59 +0000
Commit:     Kousuke Kannagi <mce@FreeBSD.org>
CommitDate: 2026-07-31 08:15:26 +0000

    japanese/ebview-gtk2: Fix crashes immediately after startup

    Since japanese/ebview was removed in 2014, remove CONFLICTS.
    Switch from REINPLACE_CMD to patchfile.

    PR:             297153
    Approved by:    fluffy (mentor)
    Co-authored-by: mce

 japanese/ebview-gtk2/Makefile                        | 15 ++++++---------
 japanese/ebview-gtk2/files/patch-src_ebview.c (new)  | 11 +++++++++++
 .../ebview-gtk2/files/patch-src_preference.c (new)   | 20 ++++++++++++++++++++
 3 files changed, 37 insertions(+), 9 deletions(-)
Comment 5 Kousuke Kannagi freebsd_committer freebsd_triage 2026-07-31 08:45:22 UTC
(In reply to commit-hook from comment #4)
I forgot MFH: 2026Q3.