Bug 235478 - games/opensonic: Prepare for Allegro 4.4.3, add wrapper script
Summary: games/opensonic: Prepare for Allegro 4.4.3, add wrapper script
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: Tobias Kortkamp
URL: https://people.freebsd.org/~tobik/log...
Keywords:
Depends on:
Blocks: 235477
  Show dependency treegraph
 
Reported: 2019-02-04 06:57 UTC by Tobias Kortkamp
Modified: 2019-02-18 11:39 UTC (History)
1 user (show)

See Also:
tobik: maintainer-feedback-


Attachments
opensonic.diff (461 bytes, patch)
2019-02-04 06:57 UTC, Tobias Kortkamp
no flags Details | Diff
opensonic.diff (4.98 KB, patch)
2019-02-06 16:56 UTC, Tobias Kortkamp
no flags Details | Diff
opensonic.diff (6.02 KB, patch)
2019-02-06 17:15 UTC, Tobias Kortkamp
tobik: maintainer-approval? (devel)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tobias Kortkamp freebsd_committer 2019-02-04 06:57:02 UTC
Created attachment 201706 [details]
opensonic.diff

src/core/audio.c:146:22: error: incomplete definition of type 'struct LOGG_Stream'
        music->stream->loop = (loop >= INFINITY); /* "gambiarra", because LOGG lacks features */
        ~~~~~~~~~~~~~^
/usr/local/include/logg.h:33:16: note: forward declaration of 'struct LOGG_Stream'
typedef struct LOGG_Stream LOGG_Stream;
               ^
src/core/audio.c:160:55: error: incomplete definition of type 'struct LOGG_Stream'
        char *filename = str_dup(current_music->stream->filename);
                                 ~~~~~~~~~~~~~~~~~~~~~^
/usr/local/include/logg.h:33:16: note: forward declaration of 'struct LOGG_Stream'
typedef struct LOGG_Stream LOGG_Stream;
               ^

Full log at: https://people.freebsd.org/~tobik/logs/opensonic-0.1.4_4.log

LOGG_Stream has been made opaque and Opensonic makes use of private
variables.  This blocks the Allegro 4.4.3 update. If there is no solution
I think we are going to have to mark it as broken.
Comment 1 Tobias Kortkamp freebsd_committer 2019-02-06 16:56:07 UTC
Created attachment 201791 [details]
opensonic.diff

I preserved Allegro 4.4.2's liblogg in a separate repository and we can
get the port to build that way.

However it does not run:

FATAL ERROR: no sprites have been found. Please reinstall the game.

Is the game functional or is this cause by the update to Allegro 4.4.3?
Comment 2 Tobias Kortkamp freebsd_committer 2019-02-06 17:01:10 UTC
(In reply to Tobias Kortkamp from comment #1)
> However it does not run:
> 
> FATAL ERROR: no sprites have been found. Please reinstall the game.
> 
> Is the game functional or is this cause by the update to Allegro 4.4.3?

No, it also does not work with Allegro 4.4.2.
Comment 3 Tobias Kortkamp freebsd_committer 2019-02-06 17:15:20 UTC
Created attachment 201792 [details]
opensonic.diff

It works if I go to /usr/local/share/opensonic first and then
./opensonic, so let's add a proper start script too.
Comment 4 commit-hook freebsd_committer 2019-02-18 11:39:13 UTC
A commit references this bug:

Author: tobik
Date: Mon Feb 18 11:39:09 UTC 2019
New revision: 493257
URL: https://svnweb.freebsd.org/changeset/ports/493257

Log:
  games/opensonic: Prepare for Allegro 4.4.3, add wrapper script

  - struct LOGG in liblogg from Allegro 4.4.3 was made opaque.  Opensonic
    directly manipulates it however.  Integrate liblogg from Allegro
    4.4.2 to preserve this port.
  - Add a wrapper script so that opensonic can find its data files when
    you run 'opensonic' or start it from your desktop

  PR:		235478
  Submitted by:	tobik
  Approved by:	devel@stasyan.com (maintainer timeout, 2 weeks)

Changes:
  head/games/opensonic/Makefile
  head/games/opensonic/distinfo
  head/games/opensonic/files/opensonic.in
  head/games/opensonic/files/patch-CMakeLists.txt
  head/games/opensonic/files/patch-src_core_audio.c