Bug 271303 - games/brutalchess: Art and font files are corrupted by dos2unix
Summary: games/brutalchess: Art and font files are corrupted by dos2unix
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Fernando Apesteguía
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-05-07 23:35 UTC by Nathan
Modified: 2023-05-22 07:07 UTC (History)
3 users (show)

See Also:
bugzilla: maintainer-feedback? (gustau.perez)
fernape: merge-quarterly+


Attachments
Patch with several fixes (5.03 KB, patch)
2023-05-08 11:27 UTC, Fernando Apesteguía
fernape: maintainer-approval? (gustau.perez)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nathan 2023-05-07 23:35:40 UTC
This port's Makefile includes the USES macro dos2unix, but doesn't set any of the variables DOS2UNIX_FILES, DOS2UNIX_GLOB, or DOS2UNIX_REGEX to limit the files to be converted. This results in corrupted binary files, including the PNG art and TTF font files.
This is why many graphics fail to load, and the squares of the chessboard don't show.
I see the following error messages:
Failed to load pawn.
Failed to load pawn.
Failed to load pawn.
libpng error: PNG file corrupted by ASCII conversion
Failed to load marblehugeblack.png texture
Comment 1 Mina Galić freebsd_triage 2023-05-08 07:37:40 UTC
would you like to provide a patch?
Comment 2 Fernando Apesteguía freebsd_committer freebsd_triage 2023-05-08 11:27:22 UTC
Created attachment 242057 [details]
Patch with several fixes

This fixes the problem for me. No warnings and everything is displayed correctly.

Would you try it?
Comment 3 Nathan 2023-05-15 15:24:27 UTC
(In reply to Fernando Apesteguía from comment #2)
Yes, that seems to work. Thanks!
Comment 4 commit-hook freebsd_committer freebsd_triage 2023-05-22 06:59:59 UTC
A commit in branch main references this bug:

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

commit 4f3963f7db891c62a573f85f8becbfba49b6a7a6
Author:     Fernando Apesteguía <fernape@FreeBSD.org>
AuthorDate: 2023-05-08 10:44:01 +0000
Commit:     Fernando Apesteguía <fernape@FreeBSD.org>
CommitDate: 2023-05-22 06:54:14 +0000

    games/brutalchess: Fix correupted files by dos2unix

    Some files will not load properly due to ASCII conversion corruption.

    While here, fix other issues including patch format, USES_GL and general
    formatting.

    PR:             271303
    Reported by:    ntspam2@netscape.net
    Approved by:    gustau.perez@gmail.com (maintainer, timeout > 2 weeks)
    MFH:            2023Q2 (runtime fix)

 games/brutalchess/Makefile                         | 26 +++++++++++++++++-----
 games/brutalchess/files/patch-aclocal.m4           |  6 ++---
 .../files/{patch-install.sh => patch-install-sh}   |  4 ++--
 games/brutalchess/files/patch-src-md3view.cpp      |  8 +++----
 games/brutalchess/files/patch-src-objview.cpp      | 10 ++++-----
 games/brutalchess/files/patch-src_board.h          |  2 +-
 games/brutalchess/files/patch-src_fontloader.h     |  4 ++--
 7 files changed, 37 insertions(+), 23 deletions(-)
Comment 5 commit-hook freebsd_committer freebsd_triage 2023-05-22 07:07:01 UTC
A commit in branch 2023Q2 references this bug:

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

commit e4570cbbfecd8cb30db25eb3d8daa7d25a7fc182
Author:     Fernando Apesteguía <fernape@FreeBSD.org>
AuthorDate: 2023-05-08 10:44:01 +0000
Commit:     Fernando Apesteguía <fernape@FreeBSD.org>
CommitDate: 2023-05-22 07:01:15 +0000

    games/brutalchess: Fix correupted files by dos2unix

    Some files will not load properly due to ASCII conversion corruption.

    While here, fix other issues including patch format, USES_GL and general
    formatting.

    PR:             271303
    Reported by:    ntspam2@netscape.net
    Approved by:    gustau.perez@gmail.com (maintainer, timeout > 2 weeks)
    MFH:            2023Q2 (runtime fix)

    (cherry picked from commit 4f3963f7db891c62a573f85f8becbfba49b6a7a6)

 games/brutalchess/Makefile                         | 26 +++++++++++++++++-----
 games/brutalchess/files/patch-aclocal.m4           |  6 ++---
 .../files/{patch-install.sh => patch-install-sh}   |  4 ++--
 games/brutalchess/files/patch-src-md3view.cpp      |  8 +++----
 games/brutalchess/files/patch-src-objview.cpp      | 10 ++++-----
 games/brutalchess/files/patch-src_board.h          |  2 +-
 games/brutalchess/files/patch-src_fontloader.h     |  4 ++--
 7 files changed, 37 insertions(+), 23 deletions(-)
Comment 6 Fernando Apesteguía freebsd_committer freebsd_triage 2023-05-22 07:07:44 UTC
Committed and merged to 2023Q2,

Thanks!