Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 698434 - games-engines/frotz-2.45_pre20190903 should depend on media-libs/libsamplerate and other media libraries - ux_audio.c:54:10: fatal error: samplerate.h: No such file or directory
Summary: games-engines/frotz-2.45_pre20190903 should depend on media-libs/libsamplerat...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Games
URL:
Whiteboard:
Keywords: EBUILD
Depends on:
Blocks:
 
Reported: 2019-10-24 03:25 UTC by Cecil Curry
Modified: 2019-10-26 13:30 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
"emerge --info" output. (emerge.info,21.85 KB, text/plain)
2019-10-24 03:25 UTC, Cecil Curry
Details
build.log.gz (build.log.gz,2.47 KB, application/gzip)
2019-10-24 03:29 UTC, Cecil Curry
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Cecil Curry 2019-10-24 03:25:34 UTC
Created attachment 593740 [details]
"emerge --info" output.

=games-engines/frotz-2.45_pre20190903 fails to specify all mandatory dependencies in ${DEPEND}, provoking build failure when one or more of these dependencies are missing from the target system. For example, when "media-libs/libsamplerate" is missing, frotz-2.45_pre20190903 fails with the following compile-time error:

    $ emerge frotz
    ...
    make -C src/curses
    make[1]: Entering directory '/var/tmp/portage/games-engines/frotz-2.45_pre20190903/work/frotz-57e915b5f5b8997d1e4a1e0dac4ace2e62b7f6e9/src/curses'
    x86_64-pc-linux-gnu-gcc -march=native -O2 -pipe -Wall -std=c99  -D_POSIX_C_SOURCE=200809L -g -pthread  -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 -I/usr/include/ncursesw  -fPIC -fpic -o ux_audio.o -c ux_audio.c
    ux_audio.c:53:10: fatal error: samplerate.h: No such file or directory
     #include <samplerate.h>
              ^~~~~~~~~~~~~~
    compilation terminated.

However, "media-libs/libsamplerate" is hardly the only missing dependency. At least four dependencies remain unlisted. Those that are listed lack version constraints listed in upstream documentation at:

    https://gitlab.com/DavidGriffith/frotz/blob/master/INSTALL

Specifically, the current ebuild:

* Defines only one unversioned compile-time dependency (i.e., "media-libs/libao") when enabling both the "ncurses" and "sound" USE flags. In fact, four versioned compile-time dependencies are required: ">=media-libs/libmodplug-0.8.8.4", ">=media-libs/libsamplerate-0.1.8[sndfile]", ">=media-libs/libsndfile-1.0.25",
and ">=media-libs/libvorbis-1.3.2".
* Defines five unversioned compile-time dependencies when enabling the "sdl" USE flag. In fact, versioned variants of these dependencies are required: ">=media-libs/freetype-2.6.0:2", ">=media-libs/libjpeg-turbo-1.5.0:0=", ">=media-libs/libpng-1.6.0:0=", ">=media-libs/libsdl2-2.0.9[sound,threads,video]", ">=media-libs/sdl2-mixer-2.0.4", and ">=sys-libs/zlib-1.2.0".
* Defines an unversioned compile-time dependency on "virtual/jpeg". Due to versioning differences between "media-libs/libjpeg-turbo" and "media-libs/jpeg", however, upstream suggests that they explicitly require ">=media-libs/libjpeg-turbo-1.5.0:0=" rather than the equivalent "media-libs/jpeg" version (whatever that might be).

To locally rectify these issues, I've published a working "games-engines/frotz-2.50_beta2" ebuild at my third-party overlay:

    https://github.com/leycec/raiagent/tree/master/games-engines/frotz

The dependency list, which is the only substantive change, resembles:

    DEPEND="
        ncurses? (
            sys-libs/ncurses:0=[unicode?]
            sound? (
                >=media-libs/libao-1.1.0
                >=media-libs/libmodplug-0.8.8.4
                >=media-libs/libsamplerate-0.1.8[sndfile]
                >=media-libs/libsndfile-1.0.25
                >=media-libs/libvorbis-1.3.2
            )
        )
        sdl? (
            >=media-libs/freetype-2.6.0:2
            >=media-libs/libjpeg-turbo-1.5.0:0=
            >=media-libs/libpng-1.6.0:0=
            >=media-libs/libsdl2-2.0.9[sound,threads,video]
            >=media-libs/sdl2-mixer-2.0.4
            >=sys-libs/zlib-1.2.0
        )
    "

Thanks for all the interactive fiction, friendly frotz maintainer(s)!
Comment 1 Cecil Curry 2019-10-24 03:29:41 UTC
Created attachment 593742 [details]
build.log.gz
Comment 2 Larry the Git Cow gentoo-dev 2019-10-26 13:29:24 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6b6198cf83601088066cac51751ba046820236c3

commit 6b6198cf83601088066cac51751ba046820236c3
Author:     James Le Cuirot <chewi@gentoo.org>
AuthorDate: 2019-10-26 13:26:28 +0000
Commit:     James Le Cuirot <chewi@gentoo.org>
CommitDate: 2019-10-26 13:26:28 +0000

    games-engines/frotz: Add missing sound dependencies
    
    libvorbis isn't actually used directly, apart from in the Makefile,
    where it's included in the link, presumably for static
    linking. Support in libsndfile or libsdl2 is expected to be present
    though so I have included it anyway.
    
    I haven't included minimum versions as stated in INSTALL because it
    admits that older versions may work and we generally don't bother
    unless older versions are still in the tree or were until recently.
    
    Closes: https://bugs.gentoo.org/698434
    Package-Manager: Portage-2.3.78, Repoman-2.3.17
    Signed-off-by: James Le Cuirot <chewi@gentoo.org>

 games-engines/frotz/frotz-2.50_beta2.ebuild | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
Comment 3 James Le Cuirot gentoo-dev 2019-10-26 13:30:52 UTC
Regarding media-libs/jpeg, I'd be extremely surprised if it didn't work. If you can prove that it doesn't then I'll make that adjustment.