unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] gnu: Add higan.
@ 2016-06-03 23:44 Taylan Ulrich Bayırlı/Kammer
  2016-06-07 15:28 ` Taylan Ulrich Bayırlı/Kammer
  2016-06-08 12:37 ` Ludovic Courtès
  0 siblings, 2 replies; 9+ messages in thread
From: Taylan Ulrich Bayırlı/Kammer @ 2016-06-03 23:44 UTC (permalink / raw)
  To: guix-devel

[-- Attachment #1: Type: text/plain, Size: 1249 bytes --]

Some things to note about this package & questions:

- There's no official VCS repo and the author doesn't want automated
  tools to download files from his homepage; there's an unofficial git
  repo at GitLab but I found it unsuitable so I'm hosting the sources
  specifically for Guix at GitHub now:

  https://github.com/TaylanUB/higan

  Is this OK, or is there a place we can upload the original source
  bundle for Guix to download from?

- I forgot if there's a guideline for this: the release versions are
  called 'v097', 'v098' etc. with always a 'v' in front.  Should that
  'v' appear in the version field of the package or should it be
  stripped?

- As seems to be tradition among emulator developers, the build system
  and the program's handling of the file system are a big pile of poo,
  so:

  * Is it principally OK to reuse the standard `build' and `install'
    phase procedures a second time, just with the CWD changed, as I do
    here?

  * The program insists on looking in ~/.local/share for some data files
    that are actually installed in $prefix/share; does my strategy here
    look OK, in that I wrap the executable to copy the data files into
    ~/.local/share every time the program is run?

Thank you!

Taylan


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-Add-higan.patch --]
[-- Type: text/x-diff, Size: 4883 bytes --]

From 707e8fc3c2ba1293693168b1d7a34e6000671158 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Taylan=20Ulrich=20Bay=C4=B1rl=C4=B1/Kammer?=
 <taylanbayirli@gmail.com>
Date: Sun, 1 Nov 2015 20:45:09 +0100
Subject: [PATCH] gnu: Add higan.

* gnu/packages/games.scm (higan): New variable.
---
 gnu/packages/games.scm | 92 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 92 insertions(+)

diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index e552d09..57f8907 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -2243,3 +2243,95 @@ Red Eclipse provides fast paced and accessible gameplay.")
                      license:cc-by-sa3.0
                      license:cc-by3.0
                      license:cc0)))))
+
+(define-public higan
+  (package
+    (name "higan")
+    (version "v098")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "https://github.com/TaylanUB/higan/archive/" version ".tar.gz"))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32 "12snxrk8wa94x3l69qcimgm0xc22zjgf7vzhckp2lzyfbf27950v"))))
+    (build-system gnu-build-system)
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
+    (inputs
+     `(("alsa-lib" ,alsa-lib)
+       ("ao" ,ao)
+       ("eudev" ,eudev)
+       ("gtk+" ,gtk+-2)
+       ("gtksourceview-2" ,gtksourceview-2)
+       ("libxv" ,libxv)
+       ("mesa" ,mesa)
+       ("openal" ,openal)
+       ("pulseaudio" ,pulseaudio)
+       ("sdl" ,sdl)))
+    (arguments
+     '(#:phases
+       (let ((build-phase (assoc-ref %standard-phases 'build))
+             (install-phase (assoc-ref %standard-phases 'install)))
+         (modify-phases %standard-phases
+           ;; The higan build system has no configure phase.
+           (delete 'configure)
+           (add-before 'build 'chdir-to-higan
+             (lambda _
+               (chdir "higan")))
+           (add-before 'install 'create-/share/applications
+             (lambda* (#:key outputs #:allow-other-keys)
+               (let ((out (assoc-ref outputs "out")))
+                 ;; It seems the author forgot to do this in the Makefile.
+                 (mkdir-p (string-append out "/share/applications")))))
+           (add-after 'install 'chdir-to-icarus
+             (lambda _
+               (chdir "../icarus")))
+           (add-after 'chdir-to-icarus 'build-icarus build-phase)
+           (add-after 'build-icarus 'install-icarus install-phase)
+           (add-after 'install-icarus 'wrap-higan-executable
+             (lambda* (#:key inputs outputs #:allow-other-keys)
+               (let* ((out (assoc-ref outputs "out"))
+                      (bin (string-append out "/bin"))
+                      (higan (string-append bin "/higan"))
+                      (higan-original (string-append higan "-original"))
+                      (bash (string-append (assoc-ref inputs "bash")
+                                           "/bin/bash"))
+                      (coreutils (assoc-ref inputs "coreutils"))
+                      (mkdir (string-append coreutils "/bin/mkdir"))
+                      (cp (string-append coreutils "/bin/cp")))
+                 ;; First, have the executable make sure ~/.local/share/higan
+                 ;; contains up to date files.  Higan insists on looking there
+                 ;; for these data files.
+                 (rename-file higan higan-original)
+                 (with-output-to-file higan
+                   (lambda ()
+                     (display
+                      (string-append
+                       "#!" bash "\n"
+                       ;; higan doesn't respect $XDG_DATA_HOME
+                       mkdir " -p ~/.local/share\n"
+                       cp " -r " out "/share/higan ~/.local/share\n"
+                       "exec " higan-original))))
+                 (chmod higan #o555)
+                 ;; Second, make sure higan will find icarus in PATH.
+                 (wrap-program higan
+                   `("PATH" ":" prefix (,bin))))))))
+       #:make-flags
+       (list "compiler=g++"
+             (string-append "prefix=" (assoc-ref %outputs "out")))
+       ;; There is no test suite.
+       #:tests? #f))
+    (home-page "http://byuu.org/emulation/higan/")
+    (synopsis "Nintendo multi-system emulator")
+    (description
+     "higan (formerly bsnes) is an emulator for multiple Nintendo video game
+consoles, including the Nintendo Entertainment System (NES/Famicom), Super
+Nintendo Entertainment System (SNES/Super Famicom), Game Boy, Game Boy
+Color (GBC), and Game Boy Advance (GBA).  It also supports the subsystems
+Super Game Boy, BS-X Satellaview, and Sufami Turbo.")
+    ;; As noted in these files among more:
+    ;; - icarus/icarus.cpp
+    ;; - higan/emulator/emulator.hpp
+    (license license:gpl3)))
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH] gnu: Add higan.
  2016-06-03 23:44 [PATCH] gnu: Add higan Taylan Ulrich Bayırlı/Kammer
@ 2016-06-07 15:28 ` Taylan Ulrich Bayırlı/Kammer
  2016-06-07 18:29   ` Efraim Flashner
  2016-06-08 12:37 ` Ludovic Courtès
  1 sibling, 1 reply; 9+ messages in thread
From: Taylan Ulrich Bayırlı/Kammer @ 2016-06-07 15:28 UTC (permalink / raw)
  To: guix-devel

If there are no comments, I'll just push this soon, and issues can be
fixed later; at least it builds and runs fine. :-)

Taylan


taylanbayirli@gmail.com (Taylan Ulrich "Bayırlı/Kammer") writes:

> Some things to note about this package & questions:
>
> - There's no official VCS repo and the author doesn't want automated
>   tools to download files from his homepage; there's an unofficial git
>   repo at GitLab but I found it unsuitable so I'm hosting the sources
>   specifically for Guix at GitHub now:
>
>   https://github.com/TaylanUB/higan
>
>   Is this OK, or is there a place we can upload the original source
>   bundle for Guix to download from?
>
> - I forgot if there's a guideline for this: the release versions are
>   called 'v097', 'v098' etc. with always a 'v' in front.  Should that
>   'v' appear in the version field of the package or should it be
>   stripped?
>
> - As seems to be tradition among emulator developers, the build system
>   and the program's handling of the file system are a big pile of poo,
>   so:
>
>   * Is it principally OK to reuse the standard `build' and `install'
>     phase procedures a second time, just with the CWD changed, as I do
>     here?
>
>   * The program insists on looking in ~/.local/share for some data files
>     that are actually installed in $prefix/share; does my strategy here
>     look OK, in that I wrap the executable to copy the data files into
>     ~/.local/share every time the program is run?
>
> Thank you!
>
> Taylan
>
>
> From 707e8fc3c2ba1293693168b1d7a34e6000671158 Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?Taylan=20Ulrich=20Bay=C4=B1rl=C4=B1/Kammer?=
>  <taylanbayirli@gmail.com>
> Date: Sun, 1 Nov 2015 20:45:09 +0100
> Subject: [PATCH] gnu: Add higan.
>
> * gnu/packages/games.scm (higan): New variable.
> ---
>  gnu/packages/games.scm | 92 ++++++++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 92 insertions(+)
>
> diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
> index e552d09..57f8907 100644
> --- a/gnu/packages/games.scm
> +++ b/gnu/packages/games.scm
> @@ -2243,3 +2243,95 @@ Red Eclipse provides fast paced and accessible gameplay.")
>                       license:cc-by-sa3.0
>                       license:cc-by3.0
>                       license:cc0)))))
> +
> +(define-public higan
> +  (package
> +    (name "higan")
> +    (version "v098")
> +    (source
> +     (origin
> +       (method url-fetch)
> +       (uri (string-append
> +             "https://github.com/TaylanUB/higan/archive/" version ".tar.gz"))
> +       (file-name (string-append name "-" version ".tar.gz"))
> +       (sha256
> +        (base32 "12snxrk8wa94x3l69qcimgm0xc22zjgf7vzhckp2lzyfbf27950v"))))
> +    (build-system gnu-build-system)
> +    (native-inputs
> +     `(("pkg-config" ,pkg-config)))
> +    (inputs
> +     `(("alsa-lib" ,alsa-lib)
> +       ("ao" ,ao)
> +       ("eudev" ,eudev)
> +       ("gtk+" ,gtk+-2)
> +       ("gtksourceview-2" ,gtksourceview-2)
> +       ("libxv" ,libxv)
> +       ("mesa" ,mesa)
> +       ("openal" ,openal)
> +       ("pulseaudio" ,pulseaudio)
> +       ("sdl" ,sdl)))
> +    (arguments
> +     '(#:phases
> +       (let ((build-phase (assoc-ref %standard-phases 'build))
> +             (install-phase (assoc-ref %standard-phases 'install)))
> +         (modify-phases %standard-phases
> +           ;; The higan build system has no configure phase.
> +           (delete 'configure)
> +           (add-before 'build 'chdir-to-higan
> +             (lambda _
> +               (chdir "higan")))
> +           (add-before 'install 'create-/share/applications
> +             (lambda* (#:key outputs #:allow-other-keys)
> +               (let ((out (assoc-ref outputs "out")))
> +                 ;; It seems the author forgot to do this in the Makefile.
> +                 (mkdir-p (string-append out "/share/applications")))))
> +           (add-after 'install 'chdir-to-icarus
> +             (lambda _
> +               (chdir "../icarus")))
> +           (add-after 'chdir-to-icarus 'build-icarus build-phase)
> +           (add-after 'build-icarus 'install-icarus install-phase)
> +           (add-after 'install-icarus 'wrap-higan-executable
> +             (lambda* (#:key inputs outputs #:allow-other-keys)
> +               (let* ((out (assoc-ref outputs "out"))
> +                      (bin (string-append out "/bin"))
> +                      (higan (string-append bin "/higan"))
> +                      (higan-original (string-append higan "-original"))
> +                      (bash (string-append (assoc-ref inputs "bash")
> +                                           "/bin/bash"))
> +                      (coreutils (assoc-ref inputs "coreutils"))
> +                      (mkdir (string-append coreutils "/bin/mkdir"))
> +                      (cp (string-append coreutils "/bin/cp")))
> +                 ;; First, have the executable make sure ~/.local/share/higan
> +                 ;; contains up to date files.  Higan insists on looking there
> +                 ;; for these data files.
> +                 (rename-file higan higan-original)
> +                 (with-output-to-file higan
> +                   (lambda ()
> +                     (display
> +                      (string-append
> +                       "#!" bash "\n"
> +                       ;; higan doesn't respect $XDG_DATA_HOME
> +                       mkdir " -p ~/.local/share\n"
> +                       cp " -r " out "/share/higan ~/.local/share\n"
> +                       "exec " higan-original))))
> +                 (chmod higan #o555)
> +                 ;; Second, make sure higan will find icarus in PATH.
> +                 (wrap-program higan
> +                   `("PATH" ":" prefix (,bin))))))))
> +       #:make-flags
> +       (list "compiler=g++"
> +             (string-append "prefix=" (assoc-ref %outputs "out")))
> +       ;; There is no test suite.
> +       #:tests? #f))
> +    (home-page "http://byuu.org/emulation/higan/")
> +    (synopsis "Nintendo multi-system emulator")
> +    (description
> +     "higan (formerly bsnes) is an emulator for multiple Nintendo video game
> +consoles, including the Nintendo Entertainment System (NES/Famicom), Super
> +Nintendo Entertainment System (SNES/Super Famicom), Game Boy, Game Boy
> +Color (GBC), and Game Boy Advance (GBA).  It also supports the subsystems
> +Super Game Boy, BS-X Satellaview, and Sufami Turbo.")
> +    ;; As noted in these files among more:
> +    ;; - icarus/icarus.cpp
> +    ;; - higan/emulator/emulator.hpp
> +    (license license:gpl3)))

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] gnu: Add higan.
  2016-06-07 15:28 ` Taylan Ulrich Bayırlı/Kammer
@ 2016-06-07 18:29   ` Efraim Flashner
  2016-06-07 19:08     ` Taylan Ulrich Bayırlı/Kammer
  0 siblings, 1 reply; 9+ messages in thread
From: Efraim Flashner @ 2016-06-07 18:29 UTC (permalink / raw)
  To: Taylan Ulrich Bayırlı/Kammer; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 7720 bytes --]

On Tue, Jun 07, 2016 at 06:28:59PM +0300, Taylan Ulrich Bayırlı/Kammer wrote:
> If there are no comments, I'll just push this soon, and issues can be
> fixed later; at least it builds and runs fine. :-)
> 
> Taylan
> 
> 
> taylanbayirli@gmail.com (Taylan Ulrich "Bayırlı/Kammer") writes:
> 
> > Some things to note about this package & questions:
> >
> > - There's no official VCS repo and the author doesn't want automated
> >   tools to download files from his homepage; there's an unofficial git
> >   repo at GitLab but I found it unsuitable so I'm hosting the sources
> >   specifically for Guix at GitHub now:
> >

it does list http://download.byuu.org/higan_v098-source.7z and it lists
the git repo at https://gitlab.com/higan/higan , which only there says
its the unofficial one.

> >   https://github.com/TaylanUB/higan
> >
> >   Is this OK, or is there a place we can upload the original source
> >   bundle for Guix to download from?
> >
> > - I forgot if there's a guideline for this: the release versions are
> >   called 'v097', 'v098' etc. with always a 'v' in front.  Should that
> >   'v' appear in the version field of the package or should it be
> >   stripped?

This one I have some insight for. Vapoursynth numbers all their versions
R28, R29, etc. Its version is 29, with the download as `... name "-R"
version ...'

> >
> > - As seems to be tradition among emulator developers, the build system
> >   and the program's handling of the file system are a big pile of poo,
> >   so:
> >
> >   * Is it principally OK to reuse the standard `build' and `install'
> >     phase procedures a second time, just with the CWD changed, as I do
> >     here?

that should be ok

> >
> >   * The program insists on looking in ~/.local/share for some data files
> >     that are actually installed in $prefix/share; does my strategy here
> >     look OK, in that I wrap the executable to copy the data files into
> >     ~/.local/share every time the program is run?
> >
> > Thank you!
> >
> > Taylan
> >
> >
> > From 707e8fc3c2ba1293693168b1d7a34e6000671158 Mon Sep 17 00:00:00 2001
> > From: =?UTF-8?q?Taylan=20Ulrich=20Bay=C4=B1rl=C4=B1/Kammer?=
> >  <taylanbayirli@gmail.com>
> > Date: Sun, 1 Nov 2015 20:45:09 +0100
> > Subject: [PATCH] gnu: Add higan.
> >
> > * gnu/packages/games.scm (higan): New variable.
> > ---
> >  gnu/packages/games.scm | 92 ++++++++++++++++++++++++++++++++++++++++++++++++++
> >  1 file changed, 92 insertions(+)
> >
> > diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
> > index e552d09..57f8907 100644
> > --- a/gnu/packages/games.scm
> > +++ b/gnu/packages/games.scm
> > @@ -2243,3 +2243,95 @@ Red Eclipse provides fast paced and accessible gameplay.")
> >                       license:cc-by-sa3.0
> >                       license:cc-by3.0
> >                       license:cc0)))))
> > +
> > +(define-public higan
> > +  (package
> > +    (name "higan")
> > +    (version "v098")
> > +    (source
> > +     (origin
> > +       (method url-fetch)
> > +       (uri (string-append
> > +             "https://github.com/TaylanUB/higan/archive/" version ".tar.gz"))
> > +       (file-name (string-append name "-" version ".tar.gz"))
> > +       (sha256
> > +        (base32 "12snxrk8wa94x3l69qcimgm0xc22zjgf7vzhckp2lzyfbf27950v"))))
> > +    (build-system gnu-build-system)
> > +    (native-inputs
> > +     `(("pkg-config" ,pkg-config)))
> > +    (inputs
> > +     `(("alsa-lib" ,alsa-lib)
> > +       ("ao" ,ao)
> > +       ("eudev" ,eudev)
> > +       ("gtk+" ,gtk+-2)
> > +       ("gtksourceview-2" ,gtksourceview-2)
> > +       ("libxv" ,libxv)
> > +       ("mesa" ,mesa)
> > +       ("openal" ,openal)
> > +       ("pulseaudio" ,pulseaudio)
> > +       ("sdl" ,sdl)))
> > +    (arguments
> > +     '(#:phases
> > +       (let ((build-phase (assoc-ref %standard-phases 'build))
> > +             (install-phase (assoc-ref %standard-phases 'install)))
> > +         (modify-phases %standard-phases
> > +           ;; The higan build system has no configure phase.
> > +           (delete 'configure)
> > +           (add-before 'build 'chdir-to-higan
> > +             (lambda _
> > +               (chdir "higan")))
> > +           (add-before 'install 'create-/share/applications
> > +             (lambda* (#:key outputs #:allow-other-keys)
> > +               (let ((out (assoc-ref outputs "out")))
> > +                 ;; It seems the author forgot to do this in the Makefile.
> > +                 (mkdir-p (string-append out "/share/applications")))))
> > +           (add-after 'install 'chdir-to-icarus
> > +             (lambda _
> > +               (chdir "../icarus")))
> > +           (add-after 'chdir-to-icarus 'build-icarus build-phase)
> > +           (add-after 'build-icarus 'install-icarus install-phase)
> > +           (add-after 'install-icarus 'wrap-higan-executable
> > +             (lambda* (#:key inputs outputs #:allow-other-keys)
> > +               (let* ((out (assoc-ref outputs "out"))
> > +                      (bin (string-append out "/bin"))
> > +                      (higan (string-append bin "/higan"))
> > +                      (higan-original (string-append higan "-original"))
> > +                      (bash (string-append (assoc-ref inputs "bash")
> > +                                           "/bin/bash"))
> > +                      (coreutils (assoc-ref inputs "coreutils"))
> > +                      (mkdir (string-append coreutils "/bin/mkdir"))
> > +                      (cp (string-append coreutils "/bin/cp")))
> > +                 ;; First, have the executable make sure ~/.local/share/higan
> > +                 ;; contains up to date files.  Higan insists on looking there
> > +                 ;; for these data files.
> > +                 (rename-file higan higan-original)
> > +                 (with-output-to-file higan
> > +                   (lambda ()
> > +                     (display
> > +                      (string-append
> > +                       "#!" bash "\n"
> > +                       ;; higan doesn't respect $XDG_DATA_HOME
> > +                       mkdir " -p ~/.local/share\n"
> > +                       cp " -r " out "/share/higan ~/.local/share\n"
> > +                       "exec " higan-original))))
> > +                 (chmod higan #o555)
> > +                 ;; Second, make sure higan will find icarus in PATH.
> > +                 (wrap-program higan
> > +                   `("PATH" ":" prefix (,bin))))))))
> > +       #:make-flags
> > +       (list "compiler=g++"
> > +             (string-append "prefix=" (assoc-ref %outputs "out")))
> > +       ;; There is no test suite.
> > +       #:tests? #f))
> > +    (home-page "http://byuu.org/emulation/higan/")
> > +    (synopsis "Nintendo multi-system emulator")
> > +    (description
> > +     "higan (formerly bsnes) is an emulator for multiple Nintendo video game
> > +consoles, including the Nintendo Entertainment System (NES/Famicom), Super
> > +Nintendo Entertainment System (SNES/Super Famicom), Game Boy, Game Boy
> > +Color (GBC), and Game Boy Advance (GBA).  It also supports the subsystems
> > +Super Game Boy, BS-X Satellaview, and Sufami Turbo.")
> > +    ;; As noted in these files among more:
> > +    ;; - icarus/icarus.cpp
> > +    ;; - higan/emulator/emulator.hpp
> > +    (license license:gpl3)))
> 

-- 
Efraim Flashner   <efraim@flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] gnu: Add higan.
  2016-06-07 18:29   ` Efraim Flashner
@ 2016-06-07 19:08     ` Taylan Ulrich Bayırlı/Kammer
  0 siblings, 0 replies; 9+ messages in thread
From: Taylan Ulrich Bayırlı/Kammer @ 2016-06-07 19:08 UTC (permalink / raw)
  To: Efraim Flashner; +Cc: guix-devel

Efraim Flashner <efraim@flashner.co.il> writes:

> On Tue, Jun 07, 2016 at 06:28:59PM +0300, Taylan Ulrich Bayırlı/Kammer wrote:
>> If there are no comments, I'll just push this soon, and issues can be
>> fixed later; at least it builds and runs fine. :-)
>> 
>> Taylan
>> 
>> 
>> taylanbayirli@gmail.com (Taylan Ulrich "Bayırlı/Kammer") writes:
>> 
>> > Some things to note about this package & questions:
>> >
>> > - There's no official VCS repo and the author doesn't want automated
>> >   tools to download files from his homepage; there's an unofficial git
>> >   repo at GitLab but I found it unsuitable so I'm hosting the sources
>> >   specifically for Guix at GitHub now:
>> >
>
> it does list http://download.byuu.org/higan_v098-source.7z and it lists
> the git repo at https://gitlab.com/higan/higan , which only there says
> its the unofficial one.

The author doesn't wish for build tools to download tarballs from the
site.  From a thread on the BBS forum:

| I don't want people writing build scripts that fetch the source from
| byuu.org. I change file names and directory structures all the time,
| and I don't want that breaking people's builds.

| I would rather distributions host their own repositories of build
| files. And for that, you're welcome to store higan in .tar.xz format
| instead of .7z format.

The linked GitLab repo could be said to be semi-official, but I noted
that it doesn't tag releases very consistently.  E.g. there's no tag for
the latest release.

>> >   https://github.com/TaylanUB/higan
>> >
>> >   Is this OK, or is there a place we can upload the original source
>> >   bundle for Guix to download from?
>> >
>> > - I forgot if there's a guideline for this: the release versions are
>> >   called 'v097', 'v098' etc. with always a 'v' in front.  Should that
>> >   'v' appear in the version field of the package or should it be
>> >   stripped?
>
> This one I have some insight for. Vapoursynth numbers all their versions
> R28, R29, etc. Its version is 29, with the download as `... name "-R"
> version ...'

Ah good, I'll strip the 'v' then.

>> > - As seems to be tradition among emulator developers, the build system
>> >   and the program's handling of the file system are a big pile of poo,
>> >   so:
>> >
>> >   * Is it principally OK to reuse the standard `build' and `install'
>> >     phase procedures a second time, just with the CWD changed, as I do
>> >     here?
>
> that should be ok

Thanks for the review. :-)

Taylan

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] gnu: Add higan.
  2016-06-03 23:44 [PATCH] gnu: Add higan Taylan Ulrich Bayırlı/Kammer
  2016-06-07 15:28 ` Taylan Ulrich Bayırlı/Kammer
@ 2016-06-08 12:37 ` Ludovic Courtès
  2016-06-08 13:21   ` Taylan Ulrich Bayırlı/Kammer
  1 sibling, 1 reply; 9+ messages in thread
From: Ludovic Courtès @ 2016-06-08 12:37 UTC (permalink / raw)
  To: Taylan Ulrich "Bayırlı/Kammer"; +Cc: guix-devel

taylanbayirli@gmail.com (Taylan Ulrich "Bayırlı/Kammer") skribis:

> Some things to note about this package & questions:
>
> - There's no official VCS repo and the author doesn't want automated
>   tools to download files from his homepage; there's an unofficial git
>   repo at GitLab but I found it unsuitable so I'm hosting the sources
>   specifically for Guix at GitHub now:
>
>   https://github.com/TaylanUB/higan

In what sense is it unsuitable?  It’s OK to have a couple of patches,
but it’s not quite OK to host a fork of the upstream package, IMO (at
the very least, it can create confusion and make it harder to see how it
differs from the “real” package.)

> - I forgot if there's a guideline for this: the release versions are
>   called 'v097', 'v098' etc. with always a 'v' in front.  Should that
>   'v' appear in the version field of the package or should it be
>   stripped?

I’d strip it.

> - As seems to be tradition among emulator developers, the build system
>   and the program's handling of the file system are a big pile of poo,
>   so:
>
>   * Is it principally OK to reuse the standard `build' and `install'
>     phase procedures a second time, just with the CWD changed, as I do
>     here?

It’s OK, though I often find it clearer to use
‘with-directory-excursion’ so that we can more easily reason about the
current directory.

>   * The program insists on looking in ~/.local/share for some data files
>     that are actually installed in $prefix/share; does my strategy here
>     look OK, in that I wrap the executable to copy the data files into
>     ~/.local/share every time the program is run?

Sounds like a sledgehammer no?  :-)

If those files are immutable, what about patching Higan to look for
those files in $datadir instead?

Thanks, and sorry for the delay!

Ludo’.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] gnu: Add higan.
  2016-06-08 12:37 ` Ludovic Courtès
@ 2016-06-08 13:21   ` Taylan Ulrich Bayırlı/Kammer
  2016-06-08 15:27     ` Ludovic Courtès
  0 siblings, 1 reply; 9+ messages in thread
From: Taylan Ulrich Bayırlı/Kammer @ 2016-06-08 13:21 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

ludo@gnu.org (Ludovic Courtès) writes:

> taylanbayirli@gmail.com (Taylan Ulrich "Bayırlı/Kammer") skribis:
>
>> Some things to note about this package & questions:
>>
>> - There's no official VCS repo and the author doesn't want automated
>>   tools to download files from his homepage; there's an unofficial git
>>   repo at GitLab but I found it unsuitable so I'm hosting the sources
>>   specifically for Guix at GitHub now:
>>
>>   https://github.com/TaylanUB/higan
>
> In what sense is it unsuitable?  It’s OK to have a couple of patches,
> but it’s not quite OK to host a fork of the upstream package, IMO (at
> the very least, it can create confusion and make it harder to see how it
> differs from the “real” package.)

The repo is just for having a consistent place from which the source can
be fetched, as the author doesn't want source bundles to be downloaded
from his website.  No changes to the code are made.

The repo at GitLab didn't seem to tag releases properly.  That being
said, now that I look at it, it seems more like an oversight for v098.
Other releases seem to be tagged quite consistently:

    https://gitlab.com/higan/higan/tags

Should we use that repo instead?  It's a bit more official than mine.

>>   * The program insists on looking in ~/.local/share for some data files
>>     that are actually installed in $prefix/share; does my strategy here
>>     look OK, in that I wrap the executable to copy the data files into
>>     ~/.local/share every time the program is run?
>
> Sounds like a sledgehammer no?  :-)
>
> If those files are immutable, what about patching Higan to look for
> those files in $datadir instead?

Apparently, the files that are part of the distribution are pure data
files, i.e. fine to be read-only.  However, the directory hierarchy of
which they're a part needs to be writable, as higan creates further
files there.  With that cp -r, the directory hierarchy is made sure to
be there, and the data files made sure to be up to date.

Although I didn't look too closely at the sources, patching higan to do
things differently would presumably be a nontrivial task, since it seems
bent on doing things in terms of this directory structure that contains
both pure data and read-write data files.

> Thanks, and sorry for the delay!

No problem, thanks for the review. :-)

> Ludo’.

Taylan


P.S.: I already pushed a patch yesterday, but can push fixes as desired.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] gnu: Add higan.
  2016-06-08 13:21   ` Taylan Ulrich Bayırlı/Kammer
@ 2016-06-08 15:27     ` Ludovic Courtès
  2016-06-09 20:43       ` Taylan Ulrich Bayırlı/Kammer
  0 siblings, 1 reply; 9+ messages in thread
From: Ludovic Courtès @ 2016-06-08 15:27 UTC (permalink / raw)
  To: Taylan Ulrich "Bayırlı/Kammer"; +Cc: guix-devel

taylanbayirli@gmail.com (Taylan Ulrich "Bayırlı/Kammer") skribis:

> ludo@gnu.org (Ludovic Courtès) writes:

[...]

>> In what sense is it unsuitable?  It’s OK to have a couple of patches,
>> but it’s not quite OK to host a fork of the upstream package, IMO (at
>> the very least, it can create confusion and make it harder to see how it
>> differs from the “real” package.)
>
> The repo is just for having a consistent place from which the source can
> be fetched, as the author doesn't want source bundles to be downloaded
> from his website.  No changes to the code are made.
>
> The repo at GitLab didn't seem to tag releases properly.  That being
> said, now that I look at it, it seems more like an oversight for v098.
> Other releases seem to be tagged quite consistently:
>
>     https://gitlab.com/higan/higan/tags
>
> Should we use that repo instead?  It's a bit more official than mine.

Yes, I think it would be more appropriate.

>>>   * The program insists on looking in ~/.local/share for some data files
>>>     that are actually installed in $prefix/share; does my strategy here
>>>     look OK, in that I wrap the executable to copy the data files into
>>>     ~/.local/share every time the program is run?
>>
>> Sounds like a sledgehammer no?  :-)
>>
>> If those files are immutable, what about patching Higan to look for
>> those files in $datadir instead?
>
> Apparently, the files that are part of the distribution are pure data
> files, i.e. fine to be read-only.  However, the directory hierarchy of
> which they're a part needs to be writable, as higan creates further
> files there.  With that cp -r, the directory hierarchy is made sure to
> be there, and the data files made sure to be up to date.
>
> Although I didn't look too closely at the sources, patching higan to do
> things differently would presumably be a nontrivial task, since it seems
> bent on doing things in terms of this directory structure that contains
> both pure data and read-write data files.

Hmm OK.  What do other distros do?

Thank you!

Ludo’.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] gnu: Add higan.
  2016-06-08 15:27     ` Ludovic Courtès
@ 2016-06-09 20:43       ` Taylan Ulrich Bayırlı/Kammer
  2016-06-10 12:56         ` Ludovic Courtès
  0 siblings, 1 reply; 9+ messages in thread
From: Taylan Ulrich Bayırlı/Kammer @ 2016-06-09 20:43 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 3457 bytes --]

ludo@gnu.org (Ludovic Courtès) writes:

> taylanbayirli@gmail.com (Taylan Ulrich "Bayırlı/Kammer") skribis:
>
>> ludo@gnu.org (Ludovic Courtès) writes:
>
> [...]
>
>>> In what sense is it unsuitable?  It’s OK to have a couple of patches,
>>> but it’s not quite OK to host a fork of the upstream package, IMO (at
>>> the very least, it can create confusion and make it harder to see how it
>>> differs from the “real” package.)
>>
>> The repo is just for having a consistent place from which the source can
>> be fetched, as the author doesn't want source bundles to be downloaded
>> from his website.  No changes to the code are made.
>>
>> The repo at GitLab didn't seem to tag releases properly.  That being
>> said, now that I look at it, it seems more like an oversight for v098.
>> Other releases seem to be tagged quite consistently:
>>
>>     https://gitlab.com/higan/higan/tags
>>
>> Should we use that repo instead?  It's a bit more official than mine.
>
> Yes, I think it would be more appropriate.

I contacted the maintainer of the repo and asked them to add a tag,
which is done now.

Note: apparently the author re-released 098 with a hotfix very soon
after releasing it, without making a version change.  In the repository,
this is tagged as 098b, which I use here.  I.e. this is not a true
version update; we were already using "this 098".

>>>>   * The program insists on looking in ~/.local/share for some data files
>>>>     that are actually installed in $prefix/share; does my strategy here
>>>>     look OK, in that I wrap the executable to copy the data files into
>>>>     ~/.local/share every time the program is run?
>>>
>>> Sounds like a sledgehammer no?  :-)
>>>
>>> If those files are immutable, what about patching Higan to look for
>>> those files in $datadir instead?
>>
>> Apparently, the files that are part of the distribution are pure data
>> files, i.e. fine to be read-only.  However, the directory hierarchy of
>> which they're a part needs to be writable, as higan creates further
>> files there.  With that cp -r, the directory hierarchy is made sure to
>> be there, and the data files made sure to be up to date.
>>
>> Although I didn't look too closely at the sources, patching higan to do
>> things differently would presumably be a nontrivial task, since it seems
>> bent on doing things in terms of this directory structure that contains
>> both pure data and read-write data files.
>
> Hmm OK.  What do other distros do?

More or less the same thing; it's sanctioned by the developers even
though it's acknowledged not to be a particularly good solution.  Here
we see Arch do the same:

https://git.archlinux.org/svntogit/community.git/tree/trunk/higan?h=packages/higan

(Though this one seems to have a bug because they copy things to
~/Emulation instead of the new ~/.local/share.  I'm confident that
~/.local/share is the right location in the latest release.  Also for
the cheats.bml file.)

Here's a patch that, in addition to switching the repo, adds a patch
removing a -march=native flag (which I assume would break
cross-compilation), and passes the make flag "profile=balanced" to make
higan less CPU intensive by emulating a bit less accurately (it was
running too slow on my i5, so this should be a better default).

I just saved a princess from an evil wizard with this so I can confirm
it runs smooth now.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-higan-Various-improvements.patch --]
[-- Type: text/x-diff, Size: 3529 bytes --]

From 93ccdf075caf462af742cf46cad35697001db124 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Taylan=20Ulrich=20Bay=C4=B1rl=C4=B1/Kammer?=
 <taylanbayirli@gmail.com>
Date: Thu, 9 Jun 2016 21:53:02 +0300
Subject: [PATCH] gnu: higan: Various improvements.

* gnu/packages/games.scm (higan): Use semi-official repository at GitLab
(using hotfix tag 098b which is equivalent to official release 098).
Add a patch to remove the build flag -march=native.  Set profile to
balanced.
* gnu/packages/patches/higan-remove-march-native-flag.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
---
 gnu/local.mk                                              |  1 +
 gnu/packages/games.scm                                    |  9 ++++++---
 gnu/packages/patches/higan-remove-march-native-flag.patch | 13 +++++++++++++
 3 files changed, 20 insertions(+), 3 deletions(-)
 create mode 100644 gnu/packages/patches/higan-remove-march-native-flag.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index d3e7262..210d3aa 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -542,6 +542,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/gtk3-respect-GUIX_GTK3_PATH.patch	\
   %D%/packages/patches/gtkglext-disable-disable-deprecated.patch \
   %D%/packages/patches/hdf5-config-date.patch			\
+  %D%/packages/patches/higan-remove-march-native-flag.patch	\
   %D%/packages/patches/hop-bigloo-4.0b.patch			\
   %D%/packages/patches/hop-linker-flags.patch			\
   %D%/packages/patches/hydra-automake-1.15.patch		\
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 4181ffb..2aa46e3 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -2248,15 +2248,17 @@ Red Eclipse provides fast paced and accessible gameplay.")
 (define-public higan
   (package
     (name "higan")
-    (version "098")
+    (version "098b")
     (source
      (origin
        (method url-fetch)
        (uri (string-append
-             "https://github.com/TaylanUB/higan/archive/v" version ".tar.gz"))
+             "https://gitlab.com/higan/higan/repository/archive.tar.gz?ref=v"
+             version))
        (file-name (string-append name "-" version ".tar.gz"))
        (sha256
-        (base32 "12snxrk8wa94x3l69qcimgm0xc22zjgf7vzhckp2lzyfbf27950v"))))
+        (base32 "05j0xzr01gsyia4gj6jmdzklll4iky1kwxgxw0mmfcgm10m0h3bf"))
+       (patches (search-patches "higan-remove-march-native-flag.patch"))))
     (build-system gnu-build-system)
     (native-inputs
      `(("pkg-config" ,pkg-config)))
@@ -2322,6 +2324,7 @@ Red Eclipse provides fast paced and accessible gameplay.")
                    `("PATH" ":" prefix (,bin))))))))
        #:make-flags
        (list "compiler=g++"
+             "profile=balanced"      ;default is accuracy; which is quite slow
              (string-append "prefix=" (assoc-ref %outputs "out")))
        ;; There is no test suite.
        #:tests? #f))
diff --git a/gnu/packages/patches/higan-remove-march-native-flag.patch b/gnu/packages/patches/higan-remove-march-native-flag.patch
new file mode 100644
index 0000000..8f4a36d
--- /dev/null
+++ b/gnu/packages/patches/higan-remove-march-native-flag.patch
@@ -0,0 +1,13 @@
+Remove -march=native from build flags.
+
+--- a/higan/GNUmakefile
++++ b/higan/GNUmakefile
+@@ -32,7 +32,7 @@ ifeq ($(platform),windows)
+ else ifeq ($(platform),macosx)
+   flags += -march=native
+ else ifneq ($(filter $(platform),linux bsd),)
+-  flags += -march=native -fopenmp
++  flags += -fopenmp
+   link += -fopenmp
+   link += -Wl,-export-dynamic
+   link += -lX11 -lXext
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH] gnu: Add higan.
  2016-06-09 20:43       ` Taylan Ulrich Bayırlı/Kammer
@ 2016-06-10 12:56         ` Ludovic Courtès
  0 siblings, 0 replies; 9+ messages in thread
From: Ludovic Courtès @ 2016-06-10 12:56 UTC (permalink / raw)
  To: Taylan Ulrich "Bayırlı/Kammer"; +Cc: guix-devel

taylanbayirli@gmail.com (Taylan Ulrich "Bayırlı/Kammer") skribis:

> I contacted the maintainer of the repo and asked them to add a tag,
> which is done now.

Great!

> Note: apparently the author re-released 098 with a hotfix very soon
> after releasing it, without making a version change.  In the repository,
> this is tagged as 098b, which I use here.  I.e. this is not a true
> version update; we were already using "this 098".

Not great.  ;-)

>>> Apparently, the files that are part of the distribution are pure data
>>> files, i.e. fine to be read-only.  However, the directory hierarchy of
>>> which they're a part needs to be writable, as higan creates further
>>> files there.  With that cp -r, the directory hierarchy is made sure to
>>> be there, and the data files made sure to be up to date.
>>>
>>> Although I didn't look too closely at the sources, patching higan to do
>>> things differently would presumably be a nontrivial task, since it seems
>>> bent on doing things in terms of this directory structure that contains
>>> both pure data and read-write data files.
>>
>> Hmm OK.  What do other distros do?
>
> More or less the same thing; it's sanctioned by the developers even
> though it's acknowledged not to be a particularly good solution.  Here
> we see Arch do the same:
>
> https://git.archlinux.org/svntogit/community.git/tree/trunk/higan?h=packages/higan
>
> (Though this one seems to have a bug because they copy things to
> ~/Emulation instead of the new ~/.local/share.  I'm confident that
> ~/.local/share is the right location in the latest release.  Also for
> the cheats.bml file.)

Hmmk.

> Here's a patch that, in addition to switching the repo, adds a patch
> removing a -march=native flag (which I assume would break
> cross-compilation),

‘-march=native’ breaks distribution of pre-built binaries since the
binary produced in the build farm may or may not run on the user’s
hardware, depending on the exact CPU being used.  So this patch is the
right thing to do!

> and passes the make flag "profile=balanced" to make higan less CPU
> intensive by emulating a bit less accurately (it was running too slow
> on my i5, so this should be a better default).

OK.

> I just saved a princess from an evil wizard with this so I can confirm
> it runs smooth now.

Wonderful.  :-)

> From 93ccdf075caf462af742cf46cad35697001db124 Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?Taylan=20Ulrich=20Bay=C4=B1rl=C4=B1/Kammer?=
>  <taylanbayirli@gmail.com>
> Date: Thu, 9 Jun 2016 21:53:02 +0300
> Subject: [PATCH] gnu: higan: Various improvements.
>
> * gnu/packages/games.scm (higan): Use semi-official repository at GitLab
> (using hotfix tag 098b which is equivalent to official release 098).
> Add a patch to remove the build flag -march=native.  Set profile to
> balanced.
> * gnu/packages/patches/higan-remove-march-native-flag.patch: New file.
> * gnu/local.mk (dist_patch_DATA): Add it.

OK!

Thanks,
Ludo’.

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2016-06-10 12:56 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-03 23:44 [PATCH] gnu: Add higan Taylan Ulrich Bayırlı/Kammer
2016-06-07 15:28 ` Taylan Ulrich Bayırlı/Kammer
2016-06-07 18:29   ` Efraim Flashner
2016-06-07 19:08     ` Taylan Ulrich Bayırlı/Kammer
2016-06-08 12:37 ` Ludovic Courtès
2016-06-08 13:21   ` Taylan Ulrich Bayırlı/Kammer
2016-06-08 15:27     ` Ludovic Courtès
2016-06-09 20:43       ` Taylan Ulrich Bayırlı/Kammer
2016-06-10 12:56         ` Ludovic Courtès

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).