Bug 258821 - [NEW PORT] games/wordsearch: Classic word search game that you can play in your terminal
Summary: [NEW PORT] games/wordsearch: Classic word search game that you can play in yo...
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: Nuno Teixeira
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-10-01 00:24 UTC by Pat Jensen
Modified: 2021-10-13 06:46 UTC (History)
2 users (show)

See Also:


Attachments
Unified diff from /usr/ports (3.69 KB, patch)
2021-10-01 00:24 UTC, Pat Jensen
no flags Details | Diff
Unified diff from /usr/ports (3.69 KB, patch)
2021-10-07 04:01 UTC, Pat Jensen
no flags Details | Diff
Unified diff from /usr/ports - Updated Github release MASTER_SITES (3.63 KB, patch)
2021-10-08 18:50 UTC, Pat Jensen
no flags Details | Diff
Unified patch: wordsearch - Removed Github vars, adopted MASTER_SITES (3.65 KB, patch)
2021-10-08 23:01 UTC, Pat Jensen
no flags Details | Diff
Unified diff: wordsearch - Clean up tab separators (3.63 KB, patch)
2021-10-09 05:23 UTC, Pat Jensen
no flags Details | Diff
Unified diff: wordsearch - Option and man page cleanups (3.70 KB, patch)
2021-10-12 03:00 UTC, Pat Jensen
no flags Details | Diff
Unified diff: wordsearch - Install path cleanup (3.65 KB, patch)
2021-10-12 14:21 UTC, Pat Jensen
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pat Jensen 2021-10-01 00:24:31 UTC
Created attachment 228299 [details]
Unified diff from /usr/ports

wordsearch is a classic word search game that you can play in your terminal. It
features curses full screen gameplay with an easy to customize puzzle directory
so you can share your creations with friends. 

WWW: https://github.com/jensenpat/wordsearch
Comment 1 Pat Jensen 2021-10-07 04:01:32 UTC
Created attachment 228490 [details]
Unified diff from /usr/ports
Comment 2 Nuno Teixeira freebsd_committer freebsd_triage 2021-10-08 18:36:12 UTC
Hello,

Why you using GH_TAGNAME since project have a release tarball were can be use with MASTER_SITES?

https://github.com/jensenpat/wordsearch/releases/download/2.0/wordsearch-2.0.tar.gz

From Porter's Handbook:
---
5.4.3. USE_GITHUB

If the distribution file comes from a specific commit or tag on GitHub for which there is no officially released file, there is an easy way to set the right DISTNAME and MASTER_SITES automatically.
---

Cheers
Comment 3 Pat Jensen 2021-10-08 18:50:16 UTC
Created attachment 228520 [details]
Unified diff from /usr/ports - Updated Github release MASTER_SITES

This includes the use of a Github 2.0 release, instead of a specific build ID per Nuno Teixeira's guidance.
Comment 4 Nuno Teixeira freebsd_committer freebsd_triage 2021-10-08 19:29:39 UTC
You still continue to use auto generated github tarball. When project have a released tarball we should use it instead.

In this port we should use:
---
PORTNAME=	wordsearch
DISTVERSION=	2.0
CATEGORIES=	games
MASTER_SITES=   https://github.com/jensenpat/wordsearch/releases/download/${DISTNAME}/${PORTNAME}

and remove USE_GITHUB and GH_ACCOUNT.

When project do not have a release tarball then we need to use USE_GITHUB, GH_ACCOUNT, GH_PROJECT and sometimes GH_TAGNAME.
Comment 5 Nuno Teixeira freebsd_committer freebsd_triage 2021-10-08 19:35:43 UTC
Please take a look at a archivers/makeself/ that project is hosted at github with a release tarball
Comment 6 Nuno Teixeira freebsd_committer freebsd_triage 2021-10-08 20:56:26 UTC
correction on MASTER_SITES:

https://github.com/jensenpat/wordsearch/releases/download/${DISTVERSION}/${PORTNAME}
Comment 7 Pat Jensen 2021-10-08 23:01:54 UTC
Created attachment 228529 [details]
Unified patch: wordsearch - Removed Github vars, adopted MASTER_SITES

Per Nuno: Remove Github user variables and adopt MASTER_SITES for direct download of a release version from Github. Used py-pychess as working example. Changed option ordering and portlint is clean.
Comment 8 Nuno Teixeira freebsd_committer freebsd_triage 2021-10-09 05:10:09 UTC
Good so far!

Just a small adjustments and we ready to go:
---
FATAL: Makefile: [12]: use a tab (not space) after a variable name
FATAL: Makefile: [15]: use a tab (not space) after a variable name
---

:)
Comment 9 Pat Jensen 2021-10-09 05:23:00 UTC
Created attachment 228532 [details]
Unified diff: wordsearch - Clean up tab separators

Per Nuno: Ensure tab is consistently used as Makefile separator.  Now testing clean with portlint -A.
Comment 10 Nuno Teixeira freebsd_committer freebsd_triage 2021-10-11 06:44:53 UTC
Some more small fixes/changes:

1. portclippy Makefile: alphabetical order
---
# Standard bsd.port.mk variables
+NO_ARCH
NO_BUILD
-NO_ARCH
---

2. do-install: block:

- Use ${WRKSRC} instead of ${CONFIGURE_WRKSRC}

- install manpages in $[PREFIX}/share/man
See CHANGES:
---
20200115:
AUTHOR: bapt@FreeBSD.org

  ${PREFIX}/share/man is now a valid location for manpages ${PREFIX}/man being
  considered as deprecated.
---

3. Correct wordsearch path in manunal file:
man wordsearch:
---
NAME
       wordsearch - Classic word search game that you can play in your
       terminal

SYNOPSIS
       /usr/games/wordsearch
---
IMO I'd delete /usr/games path and use only the program name or use ${PREFIX}:
---
SYNOPSIS
       wordsearch
---
A simple {REINPLACE_CMD} will do the job

Cheers
Comment 11 Pat Jensen 2021-10-12 03:00:30 UTC
Created attachment 228608 [details]
Unified diff: wordsearch - Option and man page cleanups

Per Nuno - alphabetize options, fix WRKSRC paths, place man page in /usr/local/share and correct executable directory in man page. Tests clean with portlint -A.
Comment 12 Nuno Teixeira freebsd_committer freebsd_triage 2021-10-12 06:31:38 UTC
Hello Pat,

Ok, just need 2 changes to commit this new port:

1. remove custom variable INSTALL_DIRS because it's not being in use.

2. use INSTALL_MAN instead of INSTALL_DATA to install manpages.

Cheers
Comment 13 Pat Jensen 2021-10-12 14:21:54 UTC
Created attachment 228626 [details]
Unified diff: wordsearch - Install path cleanup

Per Nuno: remove INSTALL_DIRS and make sure to use INSTALL_MAN for wordsearch.6
Comment 14 commit-hook freebsd_committer freebsd_triage 2021-10-13 06:44:53 UTC
A commit in branch main references this bug:

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

commit 63362d760d68e56523fc44db0f948eb353fe5ced
Author:     Pat Jensen <patj@passpackets.com>
AuthorDate: 2021-10-13 06:32:54 +0000
Commit:     Nuno Teixeira <eduardo@FreeBSD.org>
CommitDate: 2021-10-13 06:42:51 +0000

    games/wordsearch: New port: Classic word search game

     - Submitter becomes maintainer

    wordsearch

    Relax with a classic word search game that you can play in your
    terminal.

    https://github.com/jensenpat/wordsearch

    PR:             258821

 games/Makefile                   |  1 +
 games/wordsearch/Makefile (new)  | 26 ++++++++++++++++
 games/wordsearch/distinfo (new)  |  3 ++
 games/wordsearch/pkg-descr (new) |  6 ++++
 games/wordsearch/pkg-plist (new) | 67 ++++++++++++++++++++++++++++++++++++++++
 5 files changed, 103 insertions(+)
Comment 15 Nuno Teixeira freebsd_committer freebsd_triage 2021-10-13 06:46:28 UTC
Committed thanks!