Bug 205485

Summary: games/megaglest: Update to 3.12.0, Take MAINTAINER'ship
Product: Ports & Packages Reporter: Thibault Payet <monwarez>
Component: Individual Port(s)Assignee: Dmitry Marakasov <amdmi3>
Status: Closed FIXED    
Severity: Affects Only Me CC: bapt, rnejdl
Priority: --- Keywords: easy, needs-qa, patch
Version: Latest   
Hardware: Any   
OS: Any   
Bug Depends on: 205581    
Bug Blocks:    
Attachments:
Description Flags
Makefile
none
The distinfo
none
The diff of Makefile
none
svn diff of the port
none
Is the final diff to get it build entirely
none
the shar file of the port
none
megaglest.shar
none
megaglest.shar
koobs: maintainer-approval+
megaglest.shar
none
megaglest.shar
none
megaglest diff
none
megaglest diff
none
megaglest diff
none
megaglest-3.12.0 svn diff
none
megaglest-3.12.0 svn diff
none
megaglest testport log
none
megaglest.diff updated
none
the poudriere testport log
none
megaglest diff
none
megaglest diff
none
megaglest diff
none
megaglest diff
none
megaglest diff
none
megaglest poudriere testport log none

Description Thibault Payet 2015-12-21 10:11:32 UTC
here a links to get distfile for megaglest source 3.9.0.4
https://drive.google.com/file/d/0BxPSydeboyzDNThoeVNLLTVZaTQ/view?usp=sharing
I don't know if it could be fetch able on GitHub
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2015-12-21 10:16:16 UTC
Thank you for your submission.

FreeBSD Ports can indeed obtain distribution files via github with:

USE_GITHUB=yes 

For more information, see: http://www2.au.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/book.html#makefile-master_sites-github-description

CC'ing committer that marked BROKEN
Comment 2 Thibault Payet 2015-12-21 10:46:55 UTC
Actually removing MASTER_SITES=SF/... and BROKEN=... , fix the port and download from distcache.FreeBSD.org
Comment 3 Baptiste Daroussin freebsd_committer freebsd_triage 2015-12-21 10:49:58 UTC
distcache is not supposed to be a source, it is there as a fallback in case of outage on upstreams.

The ports needs a proper upstream (and no issue with using github)
Comment 4 Thibault Payet 2015-12-21 12:07:52 UTC
Created attachment 164451 [details]
Makefile
Comment 5 Thibault Payet 2015-12-21 12:08:22 UTC
Created attachment 164452 [details]
The distinfo
Comment 6 Thibault Payet 2015-12-21 12:08:50 UTC
Created attachment 164453 [details]
The diff of Makefile
Comment 7 Kubilay Kocak freebsd_committer freebsd_triage 2015-12-21 12:13:51 UTC
Nice work :)

Some tips:

* You can provide a single (unified) diff for both files (Makefile/distinfo), using svn diff or diff -u in the port directory.
* GH_TAGNAME defaults to PORTVERSION, so that line shouldn't be necessary
* WRKSRC overriding shouldn't be necessary with USE_GITHUB=yes
* The official upstream Github account/repository should be used: https://github.com/MegaGlest/megaglest-source

Note: they don't seem to have a tag for 3.9.0.4 yet. Create an issue on github for them to create one
Comment 8 rnejdl 2015-12-21 16:47:14 UTC
Current version of MegaGlest is 3.11.1.  Shouldn't we upgrade to that version instead of trying to make 3.9.0.4 work?

Rusty
Comment 9 Thibault Payet 2015-12-21 18:55:51 UTC
It could be a great idea, we need some patch I think (in the past I never get to build 3.11.1). Maybe check the dependency too
I post an issue on Github , it appears that the version 3.9.0.4 was produced on request of a Gentoo developer/packager.
https://github.com/MegaGlest/megaglest-source/issues/96#issuecomment-166306055
Comment 10 Thibault Payet 2015-12-24 14:26:22 UTC
Created attachment 164599 [details]
svn diff of the port

I succed to build the port but failed in the generating temporary packaging list
megaglest-source-3.11.1/glest.ini No such file or directory
Comment 11 Thibault Payet 2015-12-24 14:50:01 UTC
Created attachment 164600 [details]
Is the final diff to get it build entirely

With this diff you can build 3.11.1
Comment 12 Thibault Payet 2015-12-24 15:00:56 UTC
Created attachment 164601 [details]
the shar file of the port
Comment 13 Thibault Payet 2015-12-25 16:22:51 UTC
Created attachment 164625 [details]
megaglest.shar

I forget to remove PORTREVISION
Comment 14 Thibault Payet 2015-12-26 09:59:29 UTC
Created attachment 164662 [details]
megaglest.shar

Add me to maintainer
Comment 15 Kubilay Kocak freebsd_committer freebsd_triage 2015-12-26 10:12:56 UTC
@monwarez, can you confirm this passes QA (portlint, poudriere) please?
Comment 16 Kubilay Kocak freebsd_committer freebsd_triage 2015-12-26 10:13:15 UTC
Comment on attachment 164662 [details]
megaglest.shar

Post is unmaintained, implicit approval
Comment 17 Thibault Payet 2015-12-26 10:34:13 UTC
It's not passed yet , I have placed USE_GITHUB ... in the wrong section
Comment 18 Thibault Payet 2015-12-26 10:45:07 UTC
Created attachment 164669 [details]
megaglest.shar

Pass the portlint test
Comment 19 Thibault Payet 2015-12-26 17:33:35 UTC
Created attachment 164696 [details]
megaglest.shar

Pass the poudriere testport
Comment 20 Thibault Payet 2015-12-26 19:21:23 UTC
Created attachment 164699 [details]
megaglest diff

here is the svn diff, It pass  QA (portlint , poudriere) test
Comment 21 Thibault Payet 2015-12-28 12:54:18 UTC
Created attachment 164759 [details]
megaglest diff

I forget to do svn rm to an old patch
Comment 22 Dmitry Marakasov freebsd_committer freebsd_triage 2015-12-29 13:14:22 UTC
Does not patch:

===>  Applying FreeBSD patches for megaglest-3.11.1
2 out of 2 hunks failed--saving rejects to source/shared_lib/sources/miniz/miniz.c.rej
=> Patch patch-source_shared__lib_sources_miniz_miniz.c failed to apply cleanly.
=> Patch(es) patch-source-shared_lib-sources-platform-posix-ircclient.cpp patch-source__shared_lib__CMakeLists.txt applied cleanly.
Comment 23 Thibault Payet 2015-12-29 16:21:40 UTC
normally I remove this patch in the diff
Comment 24 Thibault Payet 2015-12-29 16:28:57 UTC
Nevermind the diff is not the correct one
Comment 25 Thibault Payet 2015-12-29 16:34:14 UTC
Created attachment 164824 [details]
megaglest diff

It should be good now , I deleted the wrong patch
Comment 26 Thibault Payet 2015-12-29 16:42:18 UTC
We have to do manually: svn remove files/patch-source_shared__lib_sources_miniz_miniz.c
Comment 27 Thibault Payet 2015-12-29 17:11:03 UTC
In the files directory they should have only this :
megaglest/files/patch-source__shared_lib__CMakeLists.txt
megaglest/files/patch-source-shared_lib-sources-platform-posix-ircclient.cpp	megaglest/files/pkg-message.in
megaglest/files/patch-source_shared__lib_sources_platform_posix_socket.cpp
Comment 28 Thibault Payet 2015-12-29 17:24:41 UTC
Normally with svn diff it should be build
Comment 29 Dmitry Marakasov freebsd_committer freebsd_triage 2015-12-29 18:09:20 UTC
Now good. Will test and commit it along with 205581
Comment 30 Thibault Payet 2016-03-26 15:47:45 UTC
Created attachment 168653 [details]
megaglest-3.12.0 svn diff

Notice: The patch was done with megaglest-3.9.0.4_8 base. I will post a poudriere testport log when I finished to build in poudriere
Comment 31 Thibault Payet 2016-03-26 23:18:21 UTC
Created attachment 168665 [details]
megaglest-3.12.0 svn diff

I am sorry, I forget to change the SDL version, now MegaGlest use SDL2
Comment 32 Thibault Payet 2016-03-26 23:22:42 UTC
Created attachment 168666 [details]
megaglest testport log
Comment 33 Thibault Payet 2016-03-27 01:01:33 UTC
For the moment the game will not launch because apparently Megaglest need to have force feedback (HAPTIC) which is not working. I really doubt that Megaglest really need the HAPTIC support.
Comment 34 Dmitry Marakasov freebsd_committer freebsd_triage 2016-03-27 01:11:00 UTC
Sorry for delay - I've jsut committed 3.11.1 patch, please resubmit the update against it.
Comment 35 commit-hook freebsd_committer freebsd_triage 2016-03-27 01:11:12 UTC
A commit references this bug:

Author: amdmi3
Date: Sun Mar 27 01:10:18 UTC 2016
New revision: 411969
URL: https://svnweb.freebsd.org/changeset/ports/411969

Log:
  - Update to 3.11.1
  - Cleanup the port
  - Pass maintainership to submitter

  PR:		205485
  Submitted by:	monwarez@mailoo.org

Changes:
  head/games/megaglest/Makefile
  head/games/megaglest/distinfo
  head/games/megaglest/files/patch-source_shared__lib_sources_miniz_miniz.c
  head/games/megaglest/pkg-plist
Comment 36 Thibault Payet 2016-03-27 12:34:09 UTC
Created attachment 168681 [details]
megaglest.diff updated

This is update diff, I add an extra patch to disable HAPTIC support in Megaglest(since SDL2 does not support it on FreeBSD). Poudriere testport will come ASAP.
Comment 37 Thibault Payet 2016-03-27 19:43:13 UTC
Created attachment 168704 [details]
the poudriere testport log
Comment 38 Dmitry Marakasov freebsd_committer freebsd_triage 2016-04-01 19:35:17 UTC
- The patch may be simplified, just calling 

SDL_Init(SDL_INIT_AUDIO|SDL_INIT_VIDEO|...)

- Removing the desktop file and icons is a pessimization. What's the reason for it? Though icon should be installed to ${PREFIX}/share/pixmaps instead.
Comment 39 Thibault Payet 2016-04-02 11:54:28 UTC
(In reply to Dmitry Marakasov from comment #38)
Yes you right , I don't know why I separated the calling of SDL_Init.
For the desktop file , apparently they need to be generated. I will change the patch
Comment 40 Thibault Payet 2016-04-02 13:17:38 UTC
For the desktop file, they are in megaglest-data, for now I think I will just install the 3 of them (megaglest.desktop, megaglest_editor.desktop, and megaglest_g3dviewer.desktop). I don't know if it is possible to have OPTIONS synchronized with 2 ports.
Comment 41 Thibault Payet 2016-04-02 14:28:30 UTC
Created attachment 168890 [details]
megaglest diff

So I changed the patch, re-adding ico, and adding g3dviewer option.
Testport log will come ASAP.
Comment 42 Thibault Payet 2016-04-02 14:38:21 UTC
Created attachment 168892 [details]
megaglest diff
Comment 43 Thibault Payet 2016-04-02 14:51:36 UTC
Created attachment 168893 [details]
megaglest diff
Comment 44 Thibault Payet 2016-04-02 17:11:27 UTC
Created attachment 168901 [details]
megaglest diff
Comment 45 Thibault Payet 2016-04-03 07:59:45 UTC
Created attachment 168918 [details]
megaglest diff

Now it should work
Comment 46 Thibault Payet 2016-04-03 08:00:46 UTC
Created attachment 168919 [details]
megaglest poudriere testport log
Comment 47 Dmitry Marakasov freebsd_committer freebsd_triage 2016-04-23 00:19:43 UTC
Note that you don't neet to STRIP binaries as they are already stripped by INSTALL_PROGRAM.
Comment 48 commit-hook freebsd_committer freebsd_triage 2016-04-23 00:20:03 UTC
A commit references this bug:

Author: amdmi3
Date: Sat Apr 23 00:19:27 UTC 2016
New revision: 413798
URL: https://svnweb.freebsd.org/changeset/ports/413798

Log:
  - Update to 3.12.0
  - While here, convert to options helpers

  PR:		205485
  Submitted by:	monwarez@mailoo.org (maintainer)

Changes:
  head/games/megaglest/Makefile
  head/games/megaglest/distinfo
  head/games/megaglest/files/patch-source-shared_lib-sources-platform-posix-ircclient.cpp
  head/games/megaglest/files/patch-source__shared_lib__CMakeLists.txt
  head/games/megaglest/files/patch-source_shared__lib_include_platform_sdl_platform__main.h
  head/games/megaglest/files/patch-source_shared__lib_sources_platform_common_platform__common.cpp
  head/games/megaglest/files/patch-source_shared__lib_sources_platform_posix_socket.cpp
  head/games/megaglest/pkg-plist