Bug 223389 - games/oolite: Update to 1.86
Summary: games/oolite: Update to 1.86
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: Guido Falsi
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2017-11-02 23:45 UTC by lightside
Modified: 2017-12-30 09:44 UTC (History)
1 user (show)

See Also:


Attachments
Proposed patch (since 452037 revision) (47.23 KB, patch)
2017-11-02 23:45 UTC, lightside
no flags Details | Diff
Proposed patch (since 452037 revision) (53.02 KB, patch)
2017-11-02 23:46 UTC, lightside
no flags Details | Diff
Proposed patch (since 452037 revision) (53.81 KB, patch)
2017-11-02 23:48 UTC, lightside
no flags Details | Diff
Proposed patch (since 452037 revision) (54.15 KB, patch)
2017-11-03 01:30 UTC, lightside
no flags Details | Diff
Proposed patch (since 455167 revision) (54.27 KB, patch)
2017-11-30 13:56 UTC, lightside
no flags Details | Diff
Proposed patch (since 455401 revision) (54.27 KB, patch)
2017-12-03 17:17 UTC, lightside
no flags Details | Diff
Proposed patch (since 455401 revision) (1.62 KB, patch)
2017-12-08 13:30 UTC, lightside
no flags Details | Diff
The poudriere testport log (FreeBSD 10.3 amd64) (78.50 KB, application/x-bzip)
2017-12-15 03:36 UTC, lightside
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description lightside 2017-11-02 23:45:17 UTC
Created attachment 187671 [details]
Proposed patch (since 452037 revision)

Patch to update games/oolite port from 1.84 to 1.86 version.

Look following links for changes:
https://github.com/OoliteProject/oolite/releases/tag/1.86
https://github.com/OoliteProject/oolite/blob/1.86/Doc/CHANGELOG.TXT
http://aegidian.org/bb/viewtopic.php?f=1&t=19137

- Replace bsd.port.pre.mk and bsd.port.post.mk with bsd.port.mk include after ports r452037 changes
- Remove some patches from files/patch-deps_mozilla-bug771281

The build was tested on FreeBSD 10.3 amd64.
Comment 1 lightside 2017-11-02 23:46:21 UTC
Created attachment 187672 [details]
Proposed patch (since 452037 revision)

- Add adapted patches from lang/spidermonkey185 port (based on ports r442611 changes) to fix the build on armv6

I didn't test this for armv6.
Comment 2 lightside 2017-11-02 23:48:36 UTC
Created attachment 187673 [details]
Proposed patch (since 452037 revision)

- Add OPTIMIZED_JS port's option, which enables usage of extra compiler optimizations for building of JavaScript library (was enabled by default)
- Fix default value for MOZ_OPTIMIZE_FLAGS, which invalidates BROKEN_aarch64 description

I didn't test overall build for aarch64, in case if new BROKEN_aarch64 description needed.
Comment 3 lightside 2017-11-03 01:30:21 UTC
Created attachment 187675 [details]
Proposed patch (since 452037 revision)

Moved sed changes for deps/mozilla/js/src/configure file to files/patch-deps_mozilla_js_src_configure[.in].
Comment 4 lightside 2017-11-30 13:56:17 UTC
Created attachment 188428 [details]
Proposed patch (since 455167 revision)

Updated patch after ports r455167 changes.
Comment 5 lightside 2017-12-03 17:17:24 UTC
Created attachment 188494 [details]
Proposed patch (since 455401 revision)

Updated patch after ports r455401 changes.
Comment 6 Dmitry Marakasov freebsd_committer freebsd_triage 2017-12-08 11:41:39 UTC
The project seem to be alive, do we really have to accumulate patches belonging to upstream in the tree?
Comment 7 lightside 2017-12-08 12:49:34 UTC
(In reply to comment #6)
> The project seem to be alive, do we really have to accumulate patches
> belonging to upstream in the tree?
And how this relates to this PR? Do you suggest to propose these patches upstream? Feel free to do this, if you want.
For example, the patches for deps/mozilla/js were proposed for 1.80 version (about three years ago; ports r371389) and worked without changes.

The most patches are from lang/spidermonkey185 port, with some cleanup (e.g. removed changes for not existent jsworkers.cpp.rej file and unused jsworkers.h file, because of changes for js.cpp). This is why the increased size of the current patch.

Otherwise, thanks for working on this PR.
Comment 8 Dmitry Marakasov freebsd_committer freebsd_triage 2017-12-08 13:05:51 UTC
(In reply to lightside from comment #7)
> (In reply to comment #6)
> > The project seem to be alive, do we really have to accumulate patches
> > belonging to upstream in the tree?
> And how this relates to this PR?

In a way that we should avoid piling up rotten and duplicate patches not even belonging to oolite code in the port.

> Do you suggest to propose these patches upstream?

Absolutely. 

> Feel free to do this, if you want.

It's submitter's work to do the update properly.
Comment 9 lightside 2017-12-08 13:29:53 UTC
(In reply to comment #8)
> In a way that we should avoid piling up rotten and duplicate patches not even
> belonging to oolite code in the port.
Did you test proposed patch on your FreeBSD version? It works on FreeBSD 10.3 amd64, at least.

(In reply to comment #8)
> Absolutely.
Even if somebody will try to propose some of the patches, the time between 1.86 and 1.84 releases was about 1 year.
Comment 10 lightside 2017-12-08 13:30:41 UTC
Created attachment 188627 [details]
Proposed patch (since 455401 revision)

(In reply to comment #8)
> It's submitter's work to do the update properly.
Ok, I removed changes to not upstreamed patches (and adapted changes, which was done by other submitter(s)/committer(s) for lang/spidermonkey185 in ports r442611).
Comment 11 lightside 2017-12-09 18:17:42 UTC
Comment on attachment 188627 [details]
Proposed patch (since 455401 revision)

New description:

Patch to update games/oolite port from 1.84 to 1.86 version.

Look following links for changes:
https://github.com/OoliteProject/oolite/releases/tag/1.86
https://github.com/OoliteProject/oolite/blob/1.86/Doc/CHANGELOG.TXT
http://aegidian.org/bb/viewtopic.php?f=1&t=19137

- Replace bsd.port.pre.mk and bsd.port.post.mk with bsd.port.mk include after ports r452037 changes

The build was tested on FreeBSD 10.3 amd64.
Comment 12 lightside 2017-12-11 07:41:05 UTC
Probably, there is some misunderstanding here.
In my opinion, the comment #8 (as well as comment #6 and related answers) are out of scope of this PR.
I guess, this is obvious, that submitted patches doesn't give (automatic) rights to someone to demand inclusion of them to other places (from submitter). The patches in "Ports & Packages" section of FreeBSD Bugzilla are intended for FreeBSD ports/packages, after all. These patches maybe useful for other places, of course, but this may have different issue(s) (and solution(s)).

Nevertheless, I tried to find a constructive meaning of what was said. So, I tried to review some of the patches, which were added in ports r371389. At that time, there were some efforts to build software with using available Clang compiler on FreeBSD. Some of the issues were related to files in deps/mozilla/js/src. It was found, that deps/mozilla contained (modified or some version of) source code of SpiderMonkey 1.8.5 for Oolite:
https://github.com/OoliteProject/oolite/tree/1.80b/deps
https://github.com/OoliteProject/spidermonkey-ff4/blob/ca2fb5423fab4d72a3dc5fec911ce20bda01f223/README.txt

At the same time, there was available lang/spidermonkey185 port, which had patches to fix Clang build issues in ports r320274.
First try was to use mozjs185 instead of js_static for LIBJS variable in GNUmakefile, for example, by adding following changes to sed patch:
-8<--
		s|js_static|mozjs185| ; \
		s|$$(LIBJS_ROOT)/dist/include|$$(LOCALBASE)/include/js| ; \
		s|$$(LIBJS_ROOT)/dist|$$(LOCALBASE)| ; \
-->8-

But this produced following errors (current output was for Oolite 1.86 version):
-8<--
src/Core/Scripting/OOJSScript.m:(.text+0x52b): undefined reference to `JS_DestroyScript'
src/Core/Scripting/OOJSScript.m:(.text+0x920): undefined reference to `JS_XDRScript'
src/Core/Scripting/OOJSScript.m:(.text+0xa9e): undefined reference to `JS_NewScriptObject'
src/Core/Scripting/OOJSScript.m:(.text+0xacf): undefined reference to `JS_XDRScript'
-->8-

Maybe possible to fix them, but it was decided to backport/adapt (some of the) patches from lang/spidermonkey185 to games/oolite port. This worked at that time.

After some review, I guess, that possible to remove files/patch-deps_mozilla-bug771281, which was related to following bug report:
https://bugzilla.mozilla.org/show_bug.cgi?id=771281
mainly because of different js.cpp and jsworkers.cpp files in deps/mozilla/js/src/shell directory, compared to source code from lang/spidermonkey185 port. But not sure about relation of following bug report (i.e., whether Oolite affected or not):
https://bugzilla.mozilla.org/show_bug.cgi?id=705091

As I already said, I didn't (or can't) test patches for armv6 (or armv7). But it was obvious to replace "-O" with "-O2" (for example) in case of aarch64.
Comment 13 lightside 2017-12-12 23:44:32 UTC
(In reply to comment #12)
> But this produced following errors (current output was for Oolite 1.86
> version):
> -8<--
> src/Core/Scripting/OOJSScript.m:(.text+0x52b): undefined reference to
> `JS_DestroyScript'
> src/Core/Scripting/OOJSScript.m:(.text+0x920): undefined reference to
> `JS_XDRScript'
> src/Core/Scripting/OOJSScript.m:(.text+0xa9e): undefined reference to
> `JS_NewScriptObject'
> src/Core/Scripting/OOJSScript.m:(.text+0xacf): undefined reference to
> `JS_XDRScript'
> -->8-
Looks like, (current) Oolite depends on some (previous) version of SpiderMonkey 1.8.5, while (current) lang/spidermonkey185 port uses js185-1.0.0.tar.gz distfile with applied patch(es), which includes changes to public API (e.g. removal of JS_DestroyScript and JS_NewScriptObject from jsapi.h; renaming of JS_XDRScript to JS_XDRScriptObject with different function arguments in jsxdrapi.h (and implementation in jsxdrapi.cpp)):
js-1.8.5/patches/bug-630209.patch
https://bugzilla.mozilla.org/show_bug.cgi?id=630209
Comment 14 lightside 2017-12-15 03:36:11 UTC
Created attachment 188853 [details]
The poudriere testport log (FreeBSD 10.3 amd64)

Attached archive with poudriere testport log for FreeBSD 10.3 amd64, just in case.
Comment 15 lightside 2017-12-16 02:43:11 UTC
The (mentioned) patches for armv6 (armv7, aarch64) architecture(s) was proposed in bug 224372.
Comment 16 Guido Falsi freebsd_committer freebsd_triage 2017-12-29 23:03:50 UTC
Hi,

The update works fine.

I noticed this port is unmaintained. Would you be interested in taking maintainership?
Comment 17 lightside 2017-12-30 01:50:47 UTC
Hello Guido Falsi.

(In reply to comment #16)
> The update works fine.
Thanks for testing and possible commit.

(In reply to comment #16)
> I noticed this port is unmaintained. Would you be interested in taking
> maintainership?
No, thanks. I just interested in concrete update, in this case.
Comment 18 commit-hook freebsd_committer freebsd_triage 2017-12-30 09:44:21 UTC
A commit references this bug:

Author: madpilot
Date: Sat Dec 30 09:43:39 UTC 2017
New revision: 457594
URL: https://svnweb.freebsd.org/changeset/ports/457594

Log:
  - Update games/oolite to 1.86
  - Removed unneeded bsd.port.pre/post separation

  PR:		223389
  Submitted by:	lightside@gmx.com

Changes:
  head/games/oolite/Makefile
  head/games/oolite/distinfo
Comment 19 Guido Falsi freebsd_committer freebsd_triage 2017-12-30 09:44:56 UTC
Committed. Thanks!