Bug 216459 - games/unknown-horizons: update to 2017.1
Summary: games/unknown-horizons: update to 2017.1
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: Piotr Kubaj
Depends on: 221090 242454 242455
  Show dependency treegraph
Reported: 2017-01-25 15:09 UTC by Piotr Kubaj
Modified: 2020-01-14 16:10 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (fiziologus)

patch (698.67 KB, patch)
2017-01-25 15:09 UTC, Piotr Kubaj
pkubaj: maintainer-approval? (fiziologus)
Details | Diff
new patch (571.20 KB, patch)
2017-04-12 19:10 UTC, fiziologus
no flags Details | Diff
patch with removed enet (571.92 KB, text/plain)
2017-07-18 23:38 UTC, fiziologus
no flags Details
update unknown-horizons to 2017.2 (3.22 KB, patch)
2017-07-30 10:34 UTC, Ilia Skalozubov
freebsd: maintainer-approval? (fiziologus)
Details | Diff
update to 2019.1 (473.28 KB, patch)
2019-12-06 12:16 UTC, Dmitry Marakasov
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Piotr Kubaj freebsd_committer 2017-01-25 15:09:16 UTC
Created attachment 179308 [details]

This patch updates the port to 2017.1.

It builds fine on Poudriere with 10.3.
Comment 1 fiziologus 2017-01-28 10:12:34 UTC
Hi all. Thanks for update and thanks for wake up me ;-)

Current I cannon check this update (technical trouble), but installation no change from 2013.1.

Two notes.
First, 'git' unneeded for this ports: archive download via fetch, and install run via python.
Two, TIMESTAMP in distinfo, and I use alphabetical order in plist (lowering patch size)
Comment 2 Piotr Kubaj freebsd_committer 2017-02-21 19:48:18 UTC
(In reply to fiziologus from comment #1)
Do you mean that TIMESTAMP is unnecessary? It's automagically added by make makesum.

Also, I don't want to change the generated plist in the patch, since it may differ from the one in the port.
Comment 3 fiziologus 2017-02-21 21:44:56 UTC
(In reply to Piotr Kubaj from comment #2)
I say TIMESTAMP unneeded? Or my language skill is so bad? Or you read skill?
Unneeded git.
Comment 4 Piotr Kubaj freebsd_committer 2017-02-21 23:50:10 UTC
(In reply to fiziologus from comment #3)
Nope, you need git to build the port:
===>  Configuring for unknown-horizons-2017.1
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "setup.py", line 34, in <module>
    from horizons.constants import VERSION
  File "horizons/constants.py", line 85, in <module>
    class VERSION:
  File "horizons/constants.py", line 87, in VERSION
    RELEASE_VERSION = get_git_version()
  File "horizons/constants.py", line 57, in get_git_version
    return subprocess.check_output(describe, cwd=uh_path)
  File "/usr/local/lib/python2.7/subprocess.py", line 212, in check_output
    process = Popen(stdout=PIPE, *popenargs, **kwargs)
  File "/usr/local/lib/python2.7/subprocess.py", line 390, in __init__
    errread, errwrite)
  File "/usr/local/lib/python2.7/subprocess.py", line 1024, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory
*** Error code 1

And your language skill is quite bad, to be honest :)
Comment 5 fiziologus 2017-02-22 00:36:37 UTC
(In reply to Piotr Kubaj from comment #4)
in sources dir edit horizons/constants.py (patch or sed command in Makefile): comment line 87 (RELEASE_VERSION = get_git_version()) and uncomment line 90 (RELEASE_VERSION = u'2017.1'), plus edit "IS_DEV_VERSION = True" to "False" (Linux user (dev) is Linux user).
But anyway for 2017.* need fife-0.4.x, but port content 0.3.x (I try update (need only build testing and plist creation) fife in next week).
Comment 6 fiziologus 2017-02-24 17:41:12 UTC
(In reply to fiziologus from comment #5)
Done: bug 217322 and bug 217328
Comment 7 fiziologus 2017-04-12 19:10:51 UTC
Created attachment 181738 [details]
new patch

Update to 2017.2 and little clean-up in Makefile.

I hope this final patch (tested only 'make stage' and plist). Thanks all.
Comment 8 Dmitry Marakasov freebsd_committer 2017-06-01 17:08:35 UTC
Please don't remove LICENSE. It should list all licenses listed in docs/LICENSE, with corresponding LICENSE_FILES.

I also cannot accept bundled binary libraries from horizons/network/libs/freebsd*. These should be compiled from source.

I also suggest to trim ~1MB pkg-plist by switching to PORTDATA=*
Comment 9 fiziologus 2017-06-04 08:41:11 UTC
(In reply to Dmitry Marakasov from comment #8)
License. Exist in source (no need install from port's license base), but I just comment this line, no remove. If it (LICENSE variable) is so important, I edit diff.

.so in network folder no have public source (py-enet library, native or modified I no know). This files include in UH source from 2014.x (initial for this port) version.

plist. Less trouble, and less remain after deinstall files I hope.
Comment 10 Ilia Skalozubov 2017-07-11 11:59:12 UTC
(In reply to fiziologus from comment #9)

About py-enet library... I created a port of py-enet about six months ago, when I tried to upgrade unknown-horizons to version 2014.1. Network support looked workable, but I didn't have enough time to solve the problem with Atlas generation.

I think, I can merge our experience on this issue, and I will make a patch within a few days.

(In reply to Dmitry Marakasov from comment #8)

We can trim pkg-plist, but I think it's not a good practice and the chapter "7.4. Dynamic Versus Static Package List" of the FreeBSD Porter's Handbook confirms my suspicions.
Comment 11 fiziologus 2017-07-18 23:38:17 UTC
Created attachment 184485 [details]
patch with removed enet

Add new patch. Temporally remove enet (https://github.com/unknown-horizons/unknown-horizons/issues/2609), and wait native port. Plist remain static. UH install as python package (executable+python_package_files+data_files), not as commmon games (executable+data_files), and static plist allow check changes more easy.
Comment 12 Ilia Skalozubov 2017-07-30 10:34:27 UTC
Created attachment 184844 [details]
update unknown-horizons to 2017.2

I apologize for the wait, but I finished the patch.

* Update port to 2017.2
* Fix license to GPLv2 (according to information from official site and github repo)
* Update dependencies (and from py-pyenet too)
* Add NLS option
* Trim pkg-plist (I think autoplist option takes precedence and does not violate the chapter "7.4. Dynamic Versus Static Package List" of the FreeBSD Porter's Handbook)
* Sort Makefile according to the chapter "13.1. Order of Variables in Port Makefiles" of the FreeBSD Porter's Handbook

How to use:
1. change dir to ${PORTSDIR}/games/unknown-horizons
2. remove pkg-plist
3. apply this patch
NOTE: this patch depends on bug #221090

portlint: OK (looks fine.)
Comment 13 fiziologus 2017-07-31 10:13:31 UTC
(In reply to Ilia Skalozubov from comment #12)
Approve, except one note:

# Install license files

Some files (generaly art) use own licences (see doc/LICENCE in UH archive). No delete this section.

PS: with Cyphon need work, fetch from freebsd MASTER_SITE only (or MASTER_SITES gone or rot port itself).
Comment 14 Dmitry Marakasov freebsd_committer 2019-12-06 12:16:56 UTC
Created attachment 209757 [details]
update to 2019.1

Here's patch to update it to the latest 2019.1, how does it look?
Comment 15 commit-hook freebsd_committer 2020-01-14 16:10:28 UTC
A commit references this bug:

Author: pkubaj
Date: Tue Jan 14 16:09:47 UTC 2020
New revision: 523026
URL: https://svnweb.freebsd.org/changeset/ports/523026

  games/unknown-horizons: update to 2019.1

  PR:             216459
  Submitted by:   amdmi3
  Approved by:    fiziologus@gmail.com (maintainer timeout)