Bug 260233 - games/freesweep: patch and unbreak with -fno-common
Summary: games/freesweep: patch and unbreak with -fno-common
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: Juraj Lutter
URL: https://github.com/rwestlund/freeswee...
Keywords:
Depends on:
Blocks:
 
Reported: 2021-12-05 11:00 UTC by Robert Clausecker
Modified: 2021-12-08 08:24 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (rwestlun)
fuz: merge-quarterly?


Attachments
games/freesweep: patch and unbreak with -fno-common (3.96 KB, patch)
2021-12-05 11:00 UTC, Robert Clausecker
no flags Details | Diff
games/freesweep: update to 1.0.2 (3.63 KB, patch)
2021-12-07 23:37 UTC, Robert Clausecker
fuz: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Clausecker 2021-12-05 11:00:54 UTC
Created attachment 229918 [details]
games/freesweep: patch and unbreak with -fno-common

See URL for a github issue describing the problem:

> When compiling with a sufficiently modern C compiler (one where -fno-common
> is the default), linking fails due to a duplicate symbol CharSet. This is
> because the global variable CharSet is defined in sweep.h.in which is included
> in all sorts of files.

While we are at it:

 - make portlint happy
 - move scores file to hier(7) directory
 - fix plist issues and move plist to a plist file
 - remove --disable-debug-log which had the opposite effect

Tested with Poudriere on armv7 arm64 FreeBSD 13.
Comment 1 Juraj Lutter freebsd_committer 2021-12-07 22:50:05 UTC
Waiting for maintainer approval.
Comment 2 Randy Westlund 2021-12-07 23:21:11 UTC
Sorry, I had notifications turned off on the upstream repo. I merged this fix upstream and made a new tag v1.0.2 so we don't have to carry the patch here.

While you're at it, go ahead and drop me as maintainer here; I don't have time for it anymore and don't want to hold you guys up :(
Comment 3 Robert Clausecker 2021-12-07 23:24:40 UTC
Cool.  Will prepare an updated patch in a minute.
Comment 4 Robert Clausecker 2021-12-07 23:37:14 UTC
Created attachment 229967 [details]
games/freesweep: update to 1.0.2

games/freesweep: update to 1.0.2

While we are at it:

 - make portlint happy
 - move scores file to hier(7) directory
 - fix plist issues and move plist to a plist file
 - remove --disable-debug-log which had the opposite effect
 - take over maintainership as requested by previos maintainer

Upstream fixes:

 - always use "%s"-style format for printf()-style functions
 - fix build with gcc 10

Tested with on armv7 arm64 FreeBSD 13.
Comment 5 commit-hook freebsd_committer 2021-12-08 08:21:37 UTC
A commit in branch main references this bug:

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

commit f98f36ad53e5fc2ae72f609f192c957e76dd8071
Author:     Robert Clausecker <fuz@fuz.su>
AuthorDate: 2021-12-08 08:19:15 +0000
Commit:     Juraj Lutter <otis@FreeBSD.org>
CommitDate: 2021-12-08 08:19:15 +0000

    games/freesweep: update to 1.0.2

    Update to 1.0.2 and while we are here:
    - make portlint happy
    - move scores file to hier(7) directory
    - fix plist issues and move plist to a plist file
    - remove --disable-debug-log which had the opposite effect
    - pass maintainership to fuz@fuz.su as requested by previous maintainer

    Upstream fixes:
    - always use "%s"-style format for printf()-style functions
    - fix build with gcc 10

    PR:             260233

 games/freesweep/Makefile                | 21 ++++++++-------------
 games/freesweep/distinfo                |  5 +++--
 games/freesweep/files/patch-config.h.in |  4 ++--
 games/freesweep/pkg-plist (new)         |  4 ++++
 4 files changed, 17 insertions(+), 17 deletions(-)
Comment 6 Juraj Lutter freebsd_committer 2021-12-08 08:24:32 UTC
Committed, thanks.