Subject: Re: [bug#73488] [PATCH games v3 4/7] gnu: Add jgrf.

From: Maxim Cournoyer <[email-masked]>
Date: Sat, 05 Oct 2024 21:57:30 +0900

Hi Liliana,

Liliana Marie Prikler <[email-masked]> writes:

> Am Donnerstag, dem 03.10.2024 um 16:25 +0900 schrieb Maxim Cournoyer:
>> * gnu/packages/emulators.scm (jgrf): New variable.
>> 
>> Change-Id: I0cf706e66977ceb96902dcd54f9175031e129445

[...]

>> +(define-public jgrf
>> +  ;; Unreleased work contains support for the JOLLYGOOD_*
>> environment
>> +  ;; variables used to locate cores and assets.
>> +  (let ((commit "7d5c2b8593020e92d5b9b051dfb94be7f17c04ce")
>> +        (revision "0"))
>> +    (package
>> +      (name "jgrf")
>> +      (version (git-version "1.1.0" revision commit))
>> +      (source (origin
>> +                (method git-fetch)
>> +                (uri (git-reference
>> +                      (url "https://gitlab.com/jgemu/jgrf")
>> +                      (commit commit)))
>> +                (file-name (git-file-name name version))
>> +                (snippet '(begin
>> +                            ;; TODO: Package md5.h and md5.c from
>> +                            ;;
>> http://openwall.info/wiki/people/solar/software
>> +                            ;; /public-domain-source-code/md5,
>> +                            ;; remove these bundled files and set
>> the
>> +                            ;; USE_EXTERNAL_MD5 Make flag to 1.
>> +                            ;; (delete-file "deps/md5.h")
>> +                            ;; (delete-file "deps/md5.c")
>> +                            (use-modules (guix build utils))
>> +                            (delete-file-recursively "deps/miniz")))
> Uhm… why not use (modules '((guix build utils))) tho?

I think the (guix build utils) is now implicitly added to the snippet
environment, but I can't find the commit/code that does so.  If that
wasn't the case the above would fail though.

>> +                (sha256
>> +                 (base32
>> +                 
>> "0gkmyyaxpj3szw6r1zm5850h5f362p0jdr5w70g2j0939rqn5db4"))))
>> +      (build-system gnu-build-system)
>> +      (arguments
>> +       (list #:tests? #f                ;no test suite
>> +             #:make-flags
>> +             #~(list (string-append "AR=" #$(ar-for-target))
>> +                     (string-append "CC=" #$(cc-for-target))
>> +                     (string-append "CXX=" #$(cxx-for-target))
>> +                     (string-append "PREFIX=" #$output))
>> +             #:phases #~(modify-phases %standard-phases
>> +                          (delete 'configure))))
>> +      (native-inputs (list jg-api pkg-config))
>> +      (inputs
>> +       (list flac
>> +             libepoxy
>> +             libsamplerate
>> +             lzo
>> +             miniz
>> +             sdl2
>> +             soxr
>> +             speexdsp
>> +             zlib
>> +             `(,zstd "lib")))
>> +      (native-search-paths
>> +       (list (search-path-specification
>> +              (variable "JOLLYGOOD_CORE_DIRS")
>> +              (files '("lib/jollygood")))
>> +             (search-path-specification
>> +              (variable "JOLLYGOOD_ASSET_DIRS")
>> +              (files '("share/jollygood")))))
>> +      (home-page "https://gitlab.com/jgemu/jgrf")
>> +      (synopsis "Jolly Good Reference Frontend")
>> +      (description "The Jolly Good Reference Frontend (accessible
>> via the
>> +@command{jollygood} command) is the simplest possible frontend to
> Are you sure about "simplest"?

I've adjusted to "aims to be the simplest possible frontend [...]".

>> The Jolly
>> +Good API.  It may be used to run emulators built as shared objects,
>> or as a
>> +\"white-label\" frontend for statically linked standalone
>> emulators.")
> This phrasing is somewhat confusing to me.  So it can run emulators
> both as shared objects and as statically linked executables?

That's my understanding too.  If you developed just an emulator and want
to distribute it in a more usable form, you could build the whole thing
as a static binary and distribute that, as I understand it.

Thanks for taking a look!

-- 
Thanks,
Maxim