Bug 268895 - games/kanatest: Revive port: Japanese kana (Hiragana and Katakana) simple flashcard tool
Summary: games/kanatest: Revive port: Japanese kana (Hiragana and Katakana) simple fla...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Robert Clausecker
URL: https://kanatest.sourceforge.io/
Keywords:
Depends on:
Blocks:
 
Reported: 2023-01-11 20:35 UTC by Clockwork
Modified: 2023-02-14 20:28 UTC (History)
5 users (show)

See Also:


Attachments
port rescue https://www.freshports.org/games/kanatest/ (3.63 KB, text/plain)
2023-01-11 20:35 UTC, Clockwork
Clockwork6400: maintainer-approval-
Details
replace MAINTAINER field (3.63 KB, text/plain)
2023-01-12 07:49 UTC, Clockwork
no flags Details
my attachment is a patch. (4.02 KB, patch)
2023-01-24 19:38 UTC, Clockwork
Clockwork6400: maintainer-approval+
Details | Diff
kanatest-0.4.10_3v3.patch (4.03 KB, patch)
2023-01-30 17:12 UTC, Clockwork
Clockwork6400: maintainer-approval+
Details | Diff
kanatest-0.4.10_3v4.patch (4.32 KB, patch)
2023-01-31 19:54 UTC, Clockwork
Clockwork6400: maintainer-approval+
Details | Diff
kanatest-0.4.10_3v5.patch (4.13 KB, patch)
2023-02-01 20:10 UTC, Clockwork
Clockwork6400: maintainer-approval-
Details | Diff
games/kanatest: revive port (updated patch) (9.52 KB, patch)
2023-02-10 00:16 UTC, Robert Clausecker
Clockwork6400: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Clockwork 2023-01-11 20:35:58 UTC
Created attachment 239412 [details]
port rescue https://www.freshports.org/games/kanatest/

During test the Kanatest displays randomly selected kana char
(respecting mode and lesson) and waits for user answer expected as
romaji equivalent. This process continues until all questions will be
answered or all questions will be answered correctly (depends on
options). At the end of test a short info about drilling time and
correctness ratio is displayed. The results are stored and user can
review his performance in any time.
Comment 1 Li-Wen Hsu freebsd_committer freebsd_triage 2023-01-12 01:27:14 UTC
Do you mean to set Clockwork@FreeBSD.org in the MAINTAINER field?
Comment 2 Clockwork 2023-01-12 07:49:49 UTC
Created attachment 239416 [details]
replace MAINTAINER field

(In reply to Li-Wen Hsu from comment #1)

I do not yet have a FreeBSD.org mail. So I will replace it with the one listed in Bugzilla.
Comment 3 Clockwork 2023-01-24 19:38:37 UTC
Created attachment 239681 [details]
my attachment is a patch.
Comment 4 Clockwork 2023-01-30 17:12:26 UTC
Created attachment 239816 [details]
kanatest-0.4.10_3v3.patch
Comment 5 Nuno Teixeira freebsd_committer freebsd_triage 2023-01-31 11:15:45 UTC
- desktop-file-utils: use *only* if .desktop file includes MimeType entry
  https://docs.freebsd.org/en/books/porters-handbook/book/#updating-desktop-database

- NLS: port installs share/locale/* by default, is there a possibility of a NLS knob?
  https://docs.freebsd.org/en/books/porters-handbook/book/#using-gettext-optional
Comment 6 Clockwork 2023-01-31 19:54:57 UTC
Created attachment 239833 [details]
kanatest-0.4.10_3v4.patch
Comment 7 Nuno Teixeira freebsd_committer freebsd_triage 2023-02-01 11:05:55 UTC
NLS: configure --disable-nls doesn't exist so it's doing nothing and it not disable gettext dependency with NLS=OFF

If there is no possiblity of disabling gettext then we can go with %%NLS%% pkg-plist files that at least gives the option to install them or not.

I was searching configure, aclocal, etc but no success.
Let me know if you found a way of disabling gettext.

Other thing:
---
pre-configure:
      ${CHMOD} +x ${WRKSRC}/configure
---
Not needed since it is already executable.

Cheers
Comment 8 Clockwork 2023-02-01 20:10:28 UTC
Created attachment 239846 [details]
kanatest-0.4.10_3v5.patch

I tried the gettext fix, but I'm not sure it worked. It seems to look better. Please check it out.
Comment 9 Nuno Teixeira freebsd_committer freebsd_triage 2023-02-02 08:55:02 UTC
---
NLS_USES=		gettext
NLS_CONFIGURE_ENABLE=	nls
---
is the same as:
---
if ${PORT_OPTIONS:MNLS}
USES+=			gettext
PLIST_SUB+=		NLS=""
.else
CONFIGURE_ARGS+=	--disable-nls
PLIST_SUB+=		NLS="@comment "
.endif
---

Did you tried build with NLS=OFF?
Comment 10 Clockwork 2023-02-02 15:53:11 UTC
(In reply to Nuno Teixeira from comment #9)

>Have you tried building with NLS=OFF?

I tried building without the NLS option. I got an installed program with no language files.

I'm sorry if I misunderstood.

That configure file doesn't look like it supports --disable-nls and not sure if it supports building without gettext

That's where my credentials end.
Comment 11 Robert Clausecker freebsd_committer freebsd_triage 2023-02-10 00:16:51 UTC
Created attachment 240038 [details]
games/kanatest: revive port (updated patch)

The attached patch improves on attachment #239846 [details] in the following ways:

 - bases the port on the true Sourceforge upstream
 - removes patches that are no longer required
 - turns static REINPLACE_CMD uses into patches as per policy
 - NLS support is reduced to not shipping the localisation files
   (as recommended by eduardo@)

Patch has been tested on amd64 FreeBSD 13.1, program works without flaw.

Dear maintainer, please indicate if you are happy with this patch by setting the maintainer-approval flag to +.
Comment 12 Clockwork 2023-02-10 17:07:44 UTC
Comment on attachment 240038 [details]
games/kanatest: revive port (updated patch)

The patch looks good. Thanks a lot.
Comment 13 Daniel Engberg freebsd_committer freebsd_triage 2023-02-13 14:23:13 UTC
Please stop trying to do elaborative solutions regarding fetching distfiles as it will break in unexpected ways. In this case just use the GitHub repo or preferably host a snapshot of the sources somewhere.
Comment 14 Robert Clausecker freebsd_committer freebsd_triage 2023-02-13 15:16:30 UTC
(In reply to Daniel Engberg from comment #13)

If fetch breaks, I can always edit the port to unbreak it.  I have a copy of the snapshot stashed away and can host it locally if this happens.  Please note that fetching distfiles by non-standard means is not against policy.

Do you have prior examples of ports where using git-archive(1) to fetch/generate a distfile failed in unexpected ways?
Comment 15 Daniel Engberg freebsd_committer freebsd_triage 2023-02-13 17:14:57 UTC
(In reply to Robert Clausecker from comment #14)
There a reason why we have a framework for fetching and the mirrored repo Clockwork suggested is fine. We rely on fetch, for one it'll break as soon as someone is behind a proxy because such settings wont be forwarded to git and neither do we require a proxy to handle git (over http/https) since people can be behind very strict ones for fetching files or their poudriere instances.
Comment 16 Robert Clausecker freebsd_committer freebsd_triage 2023-02-13 23:43:35 UTC
(In reply to Daniel Engberg from comment #15)

Hi Daniel,

Fetching this way is currently not against policy and similar things are done in other ports.  If you believe this should not be done, I invite you to propose and subsequently establish a policy that it should not or must not be done.  Perhaps it could also be forbidden to override do-fetch or something.  But as long as no such policy exists I am inclined not to change this.

Sourceforge is a reputable hoster and unlikely to break.  If it would have provided a way to download the snapshot by HTTP I would have done so.  The repository originally proposed by the submitter has no connection to upstream, no git history, and unknown local changes.  It is therefore not a good upstream.
Comment 17 commit-hook freebsd_committer freebsd_triage 2023-02-14 20:24:19 UTC
A commit in branch main references this bug:

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

commit bb71c4161707a95f215dc5f24165310265cb6cf0
Author:     Clockwork6400 <Clockwork6400@protonmail.com>
AuthorDate: 2023-02-01 20:04:31 +0000
Commit:     Robert Clausecker <fuz@FreeBSD.org>
CommitDate: 2023-02-14 20:23:34 +0000

    games/kanatest: revive port

    During test the Kanatest displays randomly selected kana char
    (respecting mode and lesson) and waits for user answer expected as
    romaji equivalent. This process continues until all questions will be
    answered or all questions will be answered correctly (depends on
    options). At the end of test a short info about drilling time and
    correctness ratio is displayed. The results are stored and user can
    review his performance in any time.

    Submitter becomes maintainer.

    Changelog: https://sourceforge.net/p/kanatest/code/ci/master/tree/ChangeLog

    PR:             268895
    Approved by:    eduardo (mentor)
    Differential Revision: https://reviews.freebsd.org/D38519

 MOVED                                           |  1 -
 games/Makefile                                  |  1 +
 games/kanatest/Makefile (new)                   | 32 ++++++++++++++++
 games/kanatest/distinfo (new)                   |  3 ++
 games/kanatest/files/patch-po_Makefile.in (new) | 11 ++++++
 games/kanatest/files/patch-src_gui.c (new)      | 51 +++++++++++++++++++++++++
 games/kanatest/pkg-descr (new)                  |  7 ++++
 games/kanatest/pkg-plist (new)                  | 21 ++++++++++
 8 files changed, 126 insertions(+), 1 deletion(-)
Comment 18 Robert Clausecker freebsd_committer freebsd_triage 2023-02-14 20:28:44 UTC
Committed, thanks.