Bug 189829 - New Port: games/tesseract
Summary: New Port: games/tesseract
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Jan Beich
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-15 07:50 UTC by Daniel C. Dowse
Modified: 2016-03-26 15:51 UTC (History)
5 users (show)

See Also:


Attachments
file.shar (5.06 KB, text/plain)
2014-05-15 07:50 UTC, Daniel C. Dowse
no flags Details
shar, improved (3.67 KB, text/plain)
2015-02-06 20:36 UTC, Jan Beich
no flags Details
improved log for 8.4R amd64 (44.38 KB, text/plain)
2015-02-06 20:38 UTC, Jan Beich
no flags Details
improved log for 10.1R i386 (44.13 KB, text/plain)
2015-02-06 20:46 UTC, Jan Beich
no flags Details
shar, improved (3.71 KB, text/plain)
2015-02-06 20:56 UTC, Jan Beich
no flags Details
shar, improved, v1.1 (4.13 KB, text/plain)
2015-02-12 18:39 UTC, Jan Beich
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel C. Dowse 2014-05-15 07:50:00 UTC
Tesseract First Person Shooter with in-game map editing feature. 
Based on Sauerbraten. http://tesseract.gg

I made this port because of the smooth build after fetching and installing the software yesterday. The Tesseract Site did not provide any information on their FrontPage about FreeBSD build.

I don't if the name must be changed since graphics/tesseract and graphics/tesseract-data exists. I hope I did everything correct this is my first try.

ports-mgmt/portlint echos:

WARN: Makefile: only one MASTER_SITE configured.  Consider adding additional mirrors. 1 fatal error and 1 warning found.

I have currently no information about mirrors. But i will be added when available.

Thanks

Fix: Patch attached with submission follows:
Comment 1 John Marino freebsd_committer freebsd_triage 2014-08-05 11:17:54 UTC
this is not a good name for the port, there is already graphics/tesseract.  Maybe "games/tesseract-fps" ?  Without a change there is probably a PKGNAME clash too.

1) NOPORTDATA is probably deprecated (I'm not sure why the data just isn't installed unconditionally)

2) don't have both do-install and post-install targets, just combine them

3) I don't get a one element loop in post-install.  Just remove the loop and replace ${f} with {STAGEDIR}${TESS_BIN} 


4) we'd like to see poudriere testlogs (testport or bulk -t), or at least redports, tinderbox, or "make check-plist ; make stage-qa"
Comment 2 Jan Beich freebsd_committer freebsd_triage 2015-02-06 20:36:12 UTC
Created attachment 152637 [details]
shar, improved

I wanted to only review the port but...

- unbundle net/libenet
- respect CXXFLAGS
- depend on SDL2 deps, not SDL 1.2.x
- rewrite conditionals to use option helpers
- compress wrapper scripts into one
- actually write to ~/.tesseract
- provide .desktop file
- replace NOPORTDATA with DATA option
- use DISTVERSION like games/cube
- fix portlint warnings/errors
- drop libGLU and add libX11 dep per |readelf -d|
- drop implicit USE_SDL=sdl
- drop pointless pkg-message and patch-src__Makefile
- reword COMMENT, probably not better
- style: wrap lines, add parens, s/BUILD/FLAVOR/
Comment 3 Jan Beich freebsd_committer freebsd_triage 2015-02-06 20:38:42 UTC
Created attachment 152638 [details]
improved log for 8.4R amd64
Comment 4 Jan Beich freebsd_committer freebsd_triage 2015-02-06 20:46:13 UTC
Created attachment 152639 [details]
improved log for 10.1R i386
Comment 5 Jan Beich freebsd_committer freebsd_triage 2015-02-06 20:56:18 UTC
Created attachment 152640 [details]
shar, improved

Oops, forgot the icon for .desktop file.

$ portlint -AC
looks fine.
Comment 6 Jan Beich freebsd_committer freebsd_triage 2015-02-06 21:17:28 UTC
(In reply to John Marino from comment #1)
> this is not a good name for the port, there is already
> graphics/tesseract.  Maybe "games/tesseract-fps" ?  Without a
> change there is probably a PKGNAME clash too.

Maybe graphics/tesseract should be renamed to match its distfile.
Keeping vendor-given name intact is more consistent with how other
ports behave in general. Debian/Ubuntu also use "tesseract-ocr" but
otherwise "tesseract" is more popular.

Brendan, what do you think?
Comment 7 Jan Beich freebsd_committer freebsd_triage 2015-02-12 18:39:42 UTC
Created attachment 152913 [details]
shar, improved, v1.1

Brendan Fabeny <bf1783@gmail.com> writes:

>  I can't log on to bugzilla at the moment, so I'm replying directly.
> If it would make adding this port easier, I've no objection to
> changing graphics/tesseract to graphics/tesseract-ocr.
>
> Regards,
>                b.

Adding PKGNAMESUFFIX here is probably easier.
Comment 8 Jan Beich freebsd_committer freebsd_triage 2016-03-09 04:02:20 UTC
Too early to abandon given the engine is still maintained upstream but no new release yet. The shar(s) here need to be rebased according to ports' latest style.
Comment 9 Jan Beich freebsd_committer freebsd_triage 2016-03-09 04:05:23 UTC
Reset assignee that failed to provide feedback for the past year.
Comment 10 commit-hook freebsd_committer freebsd_triage 2016-03-15 16:27:59 UTC
A commit references this bug:

Author: jbeich
Date: Tue Mar 15 16:27:43 UTC 2016
New revision: 411185
URL: https://svnweb.freebsd.org/changeset/ports/411185

Log:
  games/tesseract{,-data}: add new port

  PR:		189829 (based on)
  Submitted by:	operator@myrechenzentrum.net
  Reviewed by:	marino (partially, earlier version)

  Tesseract is a first-person shooter game focused on instagib deathmatch
  and capture-the-flag gameplay as well as cooperative in-game map editing.

  http://www.tesseract.gg

Changes:
  head/games/Makefile
  head/games/tesseract/
  head/games/tesseract/Makefile
  head/games/tesseract/distinfo
  head/games/tesseract/files/
  head/games/tesseract/files/tess_wrapper.in
  head/games/tesseract/pkg-descr
  head/games/tesseract-data/
  head/games/tesseract-data/Makefile
  head/games/tesseract-data/distinfo
  head/games/tesseract-data/pkg-descr
Comment 11 Jan Beich freebsd_committer freebsd_triage 2016-03-15 16:31:07 UTC
Thanks. Committed after fixing PCH issue and turning DATA option into a separate port.
Comment 12 John Marino freebsd_committer freebsd_triage 2016-03-26 12:22:20 UTC
Jan, I'm getting this in DragonFly's poudriere for tesseract-data port:

===========================================================================
====> Running Q/A tests (stage-qa)
====> Checking for pkg-plist issues (check-plist)
===> Parsing plist
===> Checking for items in STAGEDIR missing from pkg-plist
Error: Orphaned: @dir %%DATADIR%%/media/prefab
Error: Orphaned: @dir %%DATADIR%%/screenshot
===> Checking for items in pkg-plist which are not in STAGEDIR
===> Error: Plist issues found.
*** Error code 1

Stop.
make: stopped in /usr/ports/games/tesseract-data
=> Error: check-plist failures detected
=> Cleaning up wrkdir


Can you confirm the same on FreeBSD?
Comment 13 Jan Beich freebsd_committer freebsd_triage 2016-03-26 12:55:45 UTC
While splitting attachment 152637 [details] into 2 ports the following lines were lost

  XDATA_PLIST_FILES="@dir %%DATADIR%%/media/prefab" \
  X		"@dir %%DATADIR%%/screenshot"

Before commit I've accidentally tested with |poudriere testport| which builds dependencies *without* QA checks unlike |poudriere bulk -t|.
Comment 14 commit-hook freebsd_committer freebsd_triage 2016-03-26 13:54:06 UTC
A commit references this bug:

Author: jbeich
Date: Sat Mar 26 13:53:47 UTC 2016
New revision: 411926
URL: https://svnweb.freebsd.org/changeset/ports/411926

Log:
  games/tesseract-data: pacify check-plist

  ===> Checking for items in STAGEDIR missing from pkg-plist
  Error: Orphaned: @dir %%DATADIR%%/media/prefab
  Error: Orphaned: @dir %%DATADIR%%/screenshot

  PR:		189829
  Pointy hat:	jbeich (last minute regression)
  Reported by:	marino

Changes:
  head/games/tesseract-data/Makefile
Comment 15 Jan Beich freebsd_committer freebsd_triage 2016-03-26 13:54:33 UTC
PORTDATA is (arguably) broken with empty dirs in hierarchy as it forces ports either to list them via PLIST_DIRS or manipulate TMPPLIST directly. Very few ports actually require empty directories under maybe read-only locations. games/tesseract-data isn't one of such but @dir lines are unlikely to change on updates.

Also, PORTTESTING_FATAL="no" in poudriere.conf may help to avoid blocking *package* build due to harmless plist errors scattered in the tree.
Comment 16 John Marino freebsd_committer freebsd_triage 2016-03-26 13:58:04 UTC
There's a wide belief that PORTDATA is evil and should be removed from the ports tree completely.

I'm sure it's used correctly here but in general it's abused.

Couldn't empty directories be purged beforehand though to workaround the issue?  I've used this technique myself on a couple of ports where I rolled-my-own plist generator.
Comment 17 Jan Beich freebsd_committer freebsd_triage 2016-03-26 14:49:52 UTC
(In reply to John Marino from comment #16)
> There's a wide belief that PORTDATA is evil...

>1 Mb plists or ugly TMPPLIST expressions work better a strawman. PORTDATA is no worse than PORTDOCS or PORTEXAMPLES - each behaves as a limited automatic plist. However, PORTDATA can be used in a more generic way by redefining DATADIR.

> Couldn't empty directories be purged beforehand though to workaround the issue?

If everyone invents their own workaround we have a mess which may scare away new contributors. gecko@ ports are an example to avoid. ;)

I've filed bug 208307 just in case.
Comment 18 John Marino freebsd_committer freebsd_triage 2016-03-26 15:51:40 UTC
if the left hand represents the good that PORTSDATA does, and the right hand represents the abuse, the contents of the right hand far outweigh the left.

Count me among those that would vote to remove it.  It's essentially an auto-plist generator so if anything, one of those should be introduced (and used in a *very* limited capacity).

or better yet, define a mechanism to skip a PLIST completely, b/c that's the same thing really.