Package: guix-patches;
Reported by: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
Date: Thu, 31 May 2018 19:41:01 UTC
Severity: normal
Tags: patch
Done: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 31672 in the body.
You can then email your comments to 31672 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
View this report as an mbox folder, status mbox, maintainer mbox
guix-patches <at> gnu.org
:bug#31672
; Package guix-patches
.
(Thu, 31 May 2018 19:41:01 GMT) Full text and rfc822 format available.Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
:guix-patches <at> gnu.org
.
(Thu, 31 May 2018 19:41:01 GMT) Full text and rfc822 format available.Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
From: Nicolas Goaziou <mail <at> nicolasgoaziou.fr> To: guix-patches <at> gnu.org Cc: Nicolas Goaziou <mail <at> nicolasgoaziou.fr> Subject: [PATCH 0/2] Add Mame Date: Thu, 31 May 2018 21:39:23 +0200
Hello, The following patch set adds Mame. Feedback welcome. Regards, Nicolas Goaziou (2): gnu: asio: New variable. gnu: mame: New variable. gnu/packages/emulators.scm | 170 ++++++++++++++++++++++++++++++++++++ gnu/packages/networking.scm | 44 ++++++++++ 2 files changed, 214 insertions(+) -- 2.17.0
guix-patches <at> gnu.org
:bug#31672
; Package guix-patches
.
(Thu, 31 May 2018 19:45:01 GMT) Full text and rfc822 format available.Message #8 received at 31672 <at> debbugs.gnu.org (full text, mbox):
From: Nicolas Goaziou <mail <at> nicolasgoaziou.fr> To: 31672 <at> debbugs.gnu.org Cc: Nicolas Goaziou <mail <at> nicolasgoaziou.fr> Subject: [PATCH 1/2] gnu: asio: New variable. Date: Thu, 31 May 2018 21:44:12 +0200
* gnu/packages/networking.scm (asio): New variable. --- gnu/packages/networking.scm | 44 +++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm index d4cfffcc3..ba359b9a8 100644 --- a/gnu/packages/networking.scm +++ b/gnu/packages/networking.scm @@ -56,6 +56,7 @@ #:use-module (gnu packages autotools) #:use-module (gnu packages base) #:use-module (gnu packages bison) + #:use-module (gnu packages boost) #:use-module (gnu packages check) #:use-module (gnu packages code) #:use-module (gnu packages compression) @@ -1856,3 +1857,46 @@ eight bytes) tools @end itemize") ;; Either BSD-3 or GPL-2 can be used. (license (list license:bsd-3 license:gpl2)))) + +(define-public asio + (package + (name "asio") + (version "1.12.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/chriskohlhoff/asio.git") + (commit (string-join (cons name (string-split version #\.)) + "-")))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "04dg8kpgriay7q62mqcq2gl439k5y4mf761zghsd6wfl0farh3mx")))) + (build-system gnu-build-system) + (native-inputs + `(("autoconf" ,autoconf) + ("automake" ,automake) + ("libtool" ,libtool))) + (inputs + `(("boost" ,boost) + ("openssl" ,openssl))) + (arguments + `(#:configure-flags + (list + (string-append "--with-boost=" (assoc-ref %build-inputs "boost")) + (string-append "--with-openssl=" (assoc-ref %build-inputs "openssl"))) + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'chdir-to-asio + (lambda _ + (chdir "asio"))) + (add-before 'configure 'bootstrap + (lambda _ + (invoke "sh" "autogen.sh")))))) + (home-page "https://think-async.com/Asio") + (synopsis "C++ library for ASynchronous network I/O") + (description "Asio is a cross-platform C++ library for network and +low-level I/O programming that provides developers with a consistent +asynchronous model using a modern C++ approach.") + (license license:boost1.0))) -- 2.17.0
guix-patches <at> gnu.org
:bug#31672
; Package guix-patches
.
(Thu, 31 May 2018 19:45:01 GMT) Full text and rfc822 format available.Message #11 received at 31672 <at> debbugs.gnu.org (full text, mbox):
From: Nicolas Goaziou <mail <at> nicolasgoaziou.fr> To: 31672 <at> debbugs.gnu.org Cc: Nicolas Goaziou <mail <at> nicolasgoaziou.fr> Subject: [PATCH 2/2] gnu: mame: New variable. Date: Thu, 31 May 2018 21:44:13 +0200
* gnu/packages/emulators.scm (mame): New variable. --- gnu/packages/emulators.scm | 170 +++++++++++++++++++++++++++++++++++++ 1 file changed, 170 insertions(+) diff --git a/gnu/packages/emulators.scm b/gnu/packages/emulators.scm index c354386bd..19872b009 100644 --- a/gnu/packages/emulators.scm +++ b/gnu/packages/emulators.scm @@ -56,13 +56,19 @@ #:use-module (gnu packages libedit) #:use-module (gnu packages libusb) #:use-module (gnu packages linux) + #:use-module (gnu packages lua) + #:use-module (gnu packages maths) #:use-module (gnu packages mp3) + #:use-module (gnu packages music) #:use-module (gnu packages ncurses) + #:use-module (gnu packages networking) #:use-module (gnu packages pkg-config) #:use-module (gnu packages pulseaudio) #:use-module (gnu packages python) #:use-module (gnu packages qt) #:use-module (gnu packages sdl) + #:use-module (gnu packages texinfo) + #:use-module (gnu packages textutils) #:use-module (gnu packages tls) #:use-module (gnu packages upnp) #:use-module (gnu packages video) @@ -72,6 +78,7 @@ #:use-module (gnu packages xiph) #:use-module (gnu packages xml) #:use-module (gnu packages xorg) + #:use-module (gnu packages web) #:use-module (guix build-system cmake) #:use-module (guix build-system gnu)) @@ -1167,3 +1174,166 @@ already have their data files. The clever part about this: ScummVM just replaces the executables shipped with the games, allowing you to play them on systems for which they were never designed!") (license license:gpl2+))) + +(define-public mame + (package + (name "mame") + (version "0.198") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/mamedev/mame.git") + (commit (apply string-append "mame" (string-split version #\.))))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0kl7qll8d6xlx7bj5920ljs888a6nc1fj2kfw1fz0r8za3m7wiq9")) + (modules '((guix build utils))) + (snippet + ;; Remove bundled libraries. + '(begin + (with-directory-excursion "3rdparty" + (for-each delete-file-recursively + '("asio" "expat" "glm" "libflac" "libjpeg" "lua" + "portaudio" "portmidi" "pugixml" "rapidjson" "SDL2" + "SDL2-override" "sqlite3" "utf8proc" "zlib"))) + #t)))) + (build-system gnu-build-system) + (arguments + `(#:make-flags + (map (lambda (lib) + (string-append "USE_SYSTEM_LIB_" (string-upcase lib) "=1")) + '("asio" "expat" "flac" "glm" "jpeg" "lua" "portaudio" "portmidi" + "pugixml" "rapidjson" "sqlite3" "utf8proc" "zlib")) + #:tests? #f ;no test in regular release + #:phases + (modify-phases %standard-phases + (delete 'configure) + (add-after 'build 'build-documentation + (lambda _ (invoke "make" "-C" "docs" "man" "info"))) + (replace 'install + ;; Upstream does not provide an installation phase. + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (share (string-append out "/share/mame"))) + ;; Install data. + (for-each (lambda (dir) + (copy-recursively dir (string-append share "/" dir))) + '("artwork" "bgfx" "ctrlr" "hash" "ini" "language" + "plugins" "samples")) + (let ((keymaps (string-append share "/keymaps"))) + (for-each (lambda (file) (install-file file keymaps)) + (find-files "keymaps" ".*LINUX\\.map"))) + (let ((fonts (string-append share "/fonts"))) + (install-file "uismall.bdf" fonts)) + (install-file "mame64" share) + ;; Create "mame" executable. MAME expects to be called from + ;; the directory where the "mame64" directory lives. Since we + ;; cannot afford to do that, we start a sub-shell in the + ;; appropriate directory. + (let* ((bin (string-append out "/bin")) + (script (string-append bin "/mame"))) + (mkdir-p bin) + (with-output-to-file script + (lambda _ + (format #t + "#!~a\n(cd ~a && exec ./mame64 \"$@\")~%" + (which "sh") share))) + (chmod script #o555))) + #t)) + (add-after 'install 'install-documentation + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (man (string-append out "/share/man/man1")) + (info (string-append out "/share/info"))) + (install-file "docs/build/man/MAME.1" man) + (install-file "docs/build/texinfo/MAME.info" info)) + #t)) + (add-after 'install 'install-ini-file + ;; Generate an ini file so as to set some directories (e.g., roms) + ;; to a writable location, i.e., "$HOME/.mame/" and "$HOME/mame/". + ;; It must be located in the same directory as the executable + ;; "mame64", otherwise MAME cannot find it. + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (share (string-append out "/share/mame"))) + (with-output-to-file (string-append share "/mame.ini") + (lambda _ + (format #t + "inipath $HOME/.mame;.;ini~@ + homepath $HOME/mame~@ + rompath $HOME/mame/roms~@ + samplepath $HOME/mame/samples;samples~@ + cheatpath $HOME/mame/cheat~@ + artpath $HOME/mame/artwork;artwork~@ + crosshairpath $HOME/mame/crosshair~@ + hashpath hash~@ + fontpath fonts~@ + ctrlrpath ctrlr~@ + bgfx_path bgfx~@ + pluginspath plugins~@ + languagepath language~@ + cfg_directory $HOME/.mame/cfg~@ + nvram_directory $HOME/.mame/nvram~@ + input_directory $HOME/.mame/inp~@ + state_directory $HOME/.mame/sta~@ + snapshot_directory $HOME/.mame/snap~@ + diff_directory $HOME/.mame/diff~@ + comment_directory $HOME/.mame/comments~%"))) + #t))) + (add-after 'install 'install-desktop-file + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (desktop (string-append out "/share/applications")) + (executable (string-append out "/bin/mame"))) + (mkdir-p desktop) + (with-output-to-file (string-append desktop "/mame.desktop") + (lambda _ + (format #t + "[Desktop Entry]~@ + Name=~a~@ + Comment=Multi-purpose emulation framework~@ + Exec=~a~@ + TryExec=~@*~a~@ + Terminal=false~@ + Type=Application~@ + Categories=Game;Emulator;~@ + Keywords=Game;Emulator;Arcade;~%" + ,name executable))) + #t)))))) + (native-inputs + `(("pkg-config" ,pkg-config) + ("pugixml" ,pugixml) + ("python-sphinx" ,python-sphinx) + ("texinfo" ,texinfo))) + (inputs + `(("alsa-lib" ,alsa-lib) + ("asio" ,asio) + ("expat" ,expat) + ("flac" ,flac) + ("fontconfig" ,fontconfig) + ("glm" ,glm) + ("libjpeg" ,libjpeg-8) ;jpeg_read_header argument error in libjpeg-9 + ("libxinerama" ,libxinerama) + ("lua" ,lua) + ("portaudio" ,portaudio) + ("portmidi" ,portmidi) + ("python-wrapper" ,python-wrapper) + ("qtbase" ,qtbase) + ("rapidjson" ,rapidjson) + ("sdl" ,(sdl-union (list sdl2 sdl2-ttf))) + ("sqlite" ,sqlite) + ("utf8proc" ,utf8proc) + ("zlib" ,zlib))) + (home-page "http://mamedev.org/") + (synopsis "Multi-purpose emulation framework") + (description "MAME's purpose is to preserve decades of software +history. As electronic technology continues to rush forward, MAME +prevents this important @emph{vintage} software from being lost and +forgotten. This is achieved by documenting the hardware and how it +functions. The source code to MAME serves as this documentation.") + ;; The MAME project as a whole is distributed under the terms of GPL2+. + ;; However, over 90% of the files are under Expat license. Also, artwork, + ;; keymaps, languages and samples are under CC0. + (license (list license:gpl2+ license:expat license:cc0)))) -- 2.17.0
guix-patches <at> gnu.org
:bug#31672
; Package guix-patches
.
(Fri, 01 Jun 2018 03:11:01 GMT) Full text and rfc822 format available.Message #14 received at submit <at> debbugs.gnu.org (full text, mbox):
From: Eric Bavier <ericbavier <at> centurylink.net> To: guix-patches <at> gnu.org, Nicolas Goaziou <mail <at> nicolasgoaziou.fr>, 31672 <at> debbugs.gnu.org Subject: Re: [bug#31672] [PATCH 0/2] Add Mame Date: Thu, 31 May 2018 22:10:14 -0500
[Message part 1 (text/plain, inline)]
I haven't reviewed the patches properly, but just wondering whether/how these patches relate to those posted a while back to add MAME and the resulting discussion there. I will try to give these patches a try in the next few days. On May 31, 2018 2:39:23 PM CDT, Nicolas Goaziou <mail <at> nicolasgoaziou.fr> wrote: >Hello, > >The following patch set adds Mame. > >Feedback welcome. > >Regards, > >Nicolas Goaziou (2): > gnu: asio: New variable. > gnu: mame: New variable. > > gnu/packages/emulators.scm | 170 ++++++++++++++++++++++++++++++++++++ > gnu/packages/networking.scm | 44 ++++++++++ > 2 files changed, 214 insertions(+) > >-- >2.17.0 -- Sent from my Android device with K-9 Mail. Please excuse my brevity.
[Message part 2 (text/html, inline)]
guix-patches <at> gnu.org
:bug#31672
; Package guix-patches
.
(Fri, 01 Jun 2018 03:11:02 GMT) Full text and rfc822 format available.guix-patches <at> gnu.org
:bug#31672
; Package guix-patches
.
(Fri, 01 Jun 2018 11:28:01 GMT) Full text and rfc822 format available.Message #20 received at 31672 <at> debbugs.gnu.org (full text, mbox):
From: Rutger Helling <rhelling <at> mykolab.com> To: ericbavier <at> centurylink.net Cc: 31672 <at> debbugs.gnu.org, mail <at> nicolasgoaziou.fr Subject: [bug#31672] [PATCH 0/2] Add Mame Date: Fri, 1 Jun 2018 13:27:29 +0200
[Message part 1 (text/plain, inline)]
The patches LGTM and I've succesfully built MAME with them. Unless there's some specific reason why we can't I think it's fine to include it.
[Message part 2 (application/pgp-signature, inline)]
guix-patches <at> gnu.org
:bug#31672
; Package guix-patches
.
(Fri, 01 Jun 2018 22:07:01 GMT) Full text and rfc822 format available.Message #23 received at submit <at> debbugs.gnu.org (full text, mbox):
From: Nicolas Goaziou <mail <at> nicolasgoaziou.fr> To: Eric Bavier <ericbavier <at> centurylink.net> Cc: 31672 <at> debbugs.gnu.org, guix-patches <at> gnu.org Subject: Re: [bug#31672] [PATCH 0/2] Add Mame Date: Sat, 02 Jun 2018 00:05:59 +0200
Hello, Eric Bavier <ericbavier <at> centurylink.net> writes: > I haven't reviewed the patches properly, but just wondering > whether/how these patches relate to those posted a while back to add > MAME and the resulting discussion there. I'm not the author of the original MAME patch. They are also very different (you can compare the current patch with <https://notabug.org/rain1/pkgs/src/master/rain/mame.scm>) Regards, -- Nicolas Goaziou 0x80A93738
guix-patches <at> gnu.org
:bug#31672
; Package guix-patches
.
(Fri, 01 Jun 2018 22:07:02 GMT) Full text and rfc822 format available.guix-patches <at> gnu.org
:bug#31672
; Package guix-patches
.
(Sat, 02 Jun 2018 17:22:01 GMT) Full text and rfc822 format available.Message #29 received at 31672 <at> debbugs.gnu.org (full text, mbox):
From: Nicolas Goaziou <mail <at> nicolasgoaziou.fr> To: Rutger Helling <rhelling <at> mykolab.com> Cc: 31672 <at> debbugs.gnu.org, ericbavier <at> centurylink.net Subject: Re: [bug#31672] [PATCH 0/2] Add Mame Date: Sat, 02 Jun 2018 19:21:07 +0200
[Message part 1 (text/plain, inline)]
Hello, Rutger Helling <rhelling <at> mykolab.com> writes: > The patches LGTM and I've succesfully built MAME with them. Unless > there's some specific reason why we can't I think it's fine to include > it. Great. Thank you. I'm updating the package with more default settings while waiting for the "go". Regards, -- Nicolas Goaziou 0x80A93738
[0002-gnu-mame-New-variable.patch (text/x-diff, inline)]
From 8af50f9208db13ae9461ee73112a6505211518d0 Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou <mail <at> nicolasgoaziou.fr> Date: Thu, 31 May 2018 17:08:10 +0200 Subject: [PATCH 2/2] gnu: mame: New variable. * gnu/packages/emulators.scm (mame): New variable. --- gnu/packages/emulators.scm | 193 +++++++++++++++++++++++++++++++++++++ 1 file changed, 193 insertions(+) diff --git a/gnu/packages/emulators.scm b/gnu/packages/emulators.scm index c354386bd..e1a742426 100644 --- a/gnu/packages/emulators.scm +++ b/gnu/packages/emulators.scm @@ -56,13 +56,19 @@ #:use-module (gnu packages libedit) #:use-module (gnu packages libusb) #:use-module (gnu packages linux) + #:use-module (gnu packages lua) + #:use-module (gnu packages maths) #:use-module (gnu packages mp3) + #:use-module (gnu packages music) #:use-module (gnu packages ncurses) + #:use-module (gnu packages networking) #:use-module (gnu packages pkg-config) #:use-module (gnu packages pulseaudio) #:use-module (gnu packages python) #:use-module (gnu packages qt) #:use-module (gnu packages sdl) + #:use-module (gnu packages texinfo) + #:use-module (gnu packages textutils) #:use-module (gnu packages tls) #:use-module (gnu packages upnp) #:use-module (gnu packages video) @@ -72,6 +78,7 @@ #:use-module (gnu packages xiph) #:use-module (gnu packages xml) #:use-module (gnu packages xorg) + #:use-module (gnu packages web) #:use-module (guix build-system cmake) #:use-module (guix build-system gnu)) @@ -1167,3 +1174,189 @@ already have their data files. The clever part about this: ScummVM just replaces the executables shipped with the games, allowing you to play them on systems for which they were never designed!") (license license:gpl2+))) + +(define-public mame + (package + (name "mame") + (version "0.198") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/mamedev/mame.git") + (commit (apply string-append "mame" (string-split version #\.))))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0kl7qll8d6xlx7bj5920ljs888a6nc1fj2kfw1fz0r8za3m7wiq9")) + (modules '((guix build utils))) + (snippet + ;; Remove bundled libraries. + '(begin + (with-directory-excursion "3rdparty" + (for-each delete-file-recursively + '("asio" "expat" "glm" "libflac" "libjpeg" "lua" + "portaudio" "portmidi" "pugixml" "rapidjson" "SDL2" + "SDL2-override" "sqlite3" "utf8proc" "zlib"))) + #t)))) + (build-system gnu-build-system) + (arguments + `(#:make-flags + (map (lambda (lib) + (string-append "USE_SYSTEM_LIB_" (string-upcase lib) "=1")) + '("asio" "expat" "flac" "glm" "jpeg" "lua" "portaudio" "portmidi" + "pugixml" "rapidjson" "sqlite3" "utf8proc" "zlib")) + #:tests? #f ;no test in regular release + #:phases + (modify-phases %standard-phases + (delete 'configure) + (add-after 'build 'build-documentation + (lambda _ (invoke "make" "-C" "docs" "man" "info"))) + (replace 'install + ;; Upstream does not provide an installation phase. + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (share (string-append out "/share/mame"))) + ;; Install data. + (for-each (lambda (dir) + (copy-recursively dir (string-append share "/" dir))) + '("artwork" "bgfx" "ctrlr" "hash" "ini" "language" + "plugins" "samples")) + (let ((keymaps (string-append share "/keymaps"))) + (for-each (lambda (file) (install-file file keymaps)) + (find-files "keymaps" ".*LINUX\\.map"))) + (let ((fonts (string-append share "/fonts"))) + (install-file "uismall.bdf" fonts)) + (install-file "mame64" share) + ;; Create "mame" executable. MAME expects to be called from + ;; the directory where the "mame64" directory lives. Since we + ;; cannot afford to do that, we start a sub-shell in the + ;; appropriate directory. + (let* ((bin (string-append out "/bin")) + (script (string-append bin "/mame"))) + (mkdir-p bin) + (with-output-to-file script + (lambda _ + (format #t + "#!~a\n~a/mame64 -inipath ~a/mame \"$@\"~%" + (which "sh") share share))) + (chmod script #o555))) + #t)) + (add-after 'install 'install-documentation + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (man (string-append out "/share/man/man1")) + (info (string-append out "/share/info"))) + (install-file "docs/build/man/MAME.1" man) + (install-file "docs/build/texinfo/MAME.info" info)) + #t)) + (add-after 'install 'install-ini-file + ;; Generate an ini file so as to set some directories (e.g., roms) + ;; to a writable location, i.e., "$HOME/.mame/" and "$HOME/mame/". + ;; It must be located in the same directory as the executable + ;; "mame64", otherwise MAME cannot find it. + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (share (string-append out "/share/mame"))) + (with-output-to-file (string-append share "/mame.ini") + (lambda _ + (format #t + "inipath $HOME/.mame;.;ini~@ + homepath $HOME/mame~@ + rompath $HOME/mame/roms~@ + samplepath $HOME/mame/samples;samples~@ + cheatpath $HOME/mame/cheat~@ + artpath $HOME/mame/artwork;artwork~@ + crosshairpath $HOME/mame/crosshair~@ + snapshot_directory $HOME/mame/snapshots~@ + hashpath hash~@ + fontpath $HOME/mame/fonts;fonts~@ + ctrlrpath $HOME/mame/ctrlr;ctrlr~@ + bgfx_path bgfx~@ + pluginspath $HOME/mame/plugins;plugins~@ + languagepath language~@ + cfg_directory $HOME/.mame/cfg~@ + nvram_directory $HOME/.mame/nvram~@ + input_directory $HOME/.mame/inp~@ + state_directory $HOME/.mame/sta~@ + diff_directory $HOME/.mame/diff~@ + comment_directory $HOME/.mame/comments~%"))) + (with-output-to-file (string-append share "/ui.ini") + (lambda _ + (format #t + "historypath $HOME/mame/history~@ + categorypath $HOME/mame/folders~@ + cabinets_directory $HOME/mame/cabinets~@ + cpanels_directory $HOME/mame/cpanel~@ + pcbs_directory $HOME/mame/pcb~@ + flyers_directory $HOME/mame/flyers~@ + titles_directory $HOME/mame/titles~@ + ends_directory $HOME/mame/ends~@ + marquees_directory $HOME/mame/marquees~@ + artwork_preview_directory $HOME/mame/artpreview~@ + bosses_directory $HOME/mame/bosses~@ + logos_directory $HOME/mame/logo~@ + scores_directory $HOME/mame/scores~@ + versus_directory $HOME/mame/versus~@ + gameover_directory $HOME/mame/gameover~@ + howto_directory $HOME/mame/howto~@ + select_directory $HOME/mame/select~@ + icons_directory $HOME/mame/icons~@ + covers_directory $HOME/mame/covers~@ + ui_path $HOME/.mame/ui~%"))) + #t))) + (add-after 'install 'install-desktop-file + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (desktop (string-append out "/share/applications")) + (executable (string-append out "/bin/mame"))) + (mkdir-p desktop) + (with-output-to-file (string-append desktop "/mame.desktop") + (lambda _ + (format #t + "[Desktop Entry]~@ + Name=~a~@ + Comment=Multi-purpose emulation framework~@ + Exec=~a~@ + TryExec=~@*~a~@ + Terminal=false~@ + Type=Application~@ + Categories=Game;Emulator;~@ + Keywords=Game;Emulator;Arcade;~%" + ,name executable))) + #t)))))) + (native-inputs + `(("pkg-config" ,pkg-config) + ("pugixml" ,pugixml) + ("python-sphinx" ,python-sphinx) + ("texinfo" ,texinfo))) + (inputs + `(("alsa-lib" ,alsa-lib) + ("asio" ,asio) + ("expat" ,expat) + ("flac" ,flac) + ("fontconfig" ,fontconfig) + ("glm" ,glm) + ("libjpeg" ,libjpeg-8) ;jpeg_read_header argument error in libjpeg-9 + ("libxinerama" ,libxinerama) + ("lua" ,lua) + ("portaudio" ,portaudio) + ("portmidi" ,portmidi) + ("python-wrapper" ,python-wrapper) + ("qtbase" ,qtbase) + ("rapidjson" ,rapidjson) + ("sdl" ,(sdl-union (list sdl2 sdl2-ttf))) + ("sqlite" ,sqlite) + ("utf8proc" ,utf8proc) + ("zlib" ,zlib))) + (home-page "http://mamedev.org/") + (synopsis "Multi-purpose emulation framework") + (description "MAME's purpose is to preserve decades of software +history. As electronic technology continues to rush forward, MAME +prevents this important @emph{vintage} software from being lost and +forgotten. This is achieved by documenting the hardware and how it +functions. The source code to MAME serves as this documentation.") + ;; The MAME project as a whole is distributed under the terms of GPL2+. + ;; However, over 90% of the files are under Expat license. Also, artwork, + ;; keymaps, languages and samples are under CC0. + (license (list license:gpl2+ license:expat license:cc0)))) -- 2.17.0
guix-patches <at> gnu.org
:bug#31672
; Package guix-patches
.
(Sat, 02 Jun 2018 17:58:02 GMT) Full text and rfc822 format available.Message #32 received at 31672 <at> debbugs.gnu.org (full text, mbox):
From: Nicolas Goaziou <mail <at> nicolasgoaziou.fr> To: Rutger Helling <rhelling <at> mykolab.com> Cc: 31672 <at> debbugs.gnu.org Subject: Re: [bug#31672] [PATCH 0/2] Add Mame Date: Sat, 02 Jun 2018 19:57:41 +0200
Correcting myself, Nicolas Goaziou <mail <at> nicolasgoaziou.fr> writes: > + ;; Create "mame" executable. MAME expects to be called from > + ;; the directory where the "mame64" directory lives. Since we > + ;; cannot afford to do that, we start a sub-shell in the > + ;; appropriate directory. > + (let* ((bin (string-append out "/bin")) > + (script (string-append bin "/mame"))) > + (mkdir-p bin) > + (with-output-to-file script > + (lambda _ > + (format #t > + "#!~a\n~a/mame64 -inipath ~a/mame \"$@\"~%" > + (which "sh") share share))) Oops. Wrong patch. I meant: (with-output-to-file script (lambda _ (format #t "#!~a\n(cd ~a/share/mame && exec ./mame64 \"$@\"~%" (which "sh") share))) Anyway, this is not totally satisfactory because one cannot use, e.g., "mame -createconfig" and have ini files generated in current directory. I don't know how to fix that issue.
guix-patches <at> gnu.org
:bug#31672
; Package guix-patches
.
(Sun, 03 Jun 2018 22:23:01 GMT) Full text and rfc822 format available.Message #35 received at 31672 <at> debbugs.gnu.org (full text, mbox):
From: Nicolas Goaziou <mail <at> nicolasgoaziou.fr> To: Rutger Helling <rhelling <at> mykolab.com> Cc: 31672 <at> debbugs.gnu.org Subject: Re: [bug#31672] [PATCH 0/2] Add Mame Date: Mon, 04 Jun 2018 00:22:01 +0200
[Message part 1 (text/plain, inline)]
Nicolas Goaziou <mail <at> nicolasgoaziou.fr> writes: > Anyway, this is not totally satisfactory because one cannot use, e.g., > "mame -createconfig" and have ini files generated in current directory. > > I don't know how to fix that issue. The following may be an acceptable compromise.
[0002-gnu-mame-New-variable.patch (text/x-diff, inline)]
From c0c5ec4dcf374f13fc7928053f351f67353e3d6f Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou <mail <at> nicolasgoaziou.fr> Date: Thu, 31 May 2018 17:08:10 +0200 Subject: [PATCH 2/2] gnu: mame: New variable. * gnu/packages/emulators.scm (mame): New variable. --- gnu/packages/emulators.scm | 191 +++++++++++++++++++++++++++++++++++++ 1 file changed, 191 insertions(+) diff --git a/gnu/packages/emulators.scm b/gnu/packages/emulators.scm index c354386bd..7b20e2d0c 100644 --- a/gnu/packages/emulators.scm +++ b/gnu/packages/emulators.scm @@ -56,13 +56,19 @@ #:use-module (gnu packages libedit) #:use-module (gnu packages libusb) #:use-module (gnu packages linux) + #:use-module (gnu packages lua) + #:use-module (gnu packages maths) #:use-module (gnu packages mp3) + #:use-module (gnu packages music) #:use-module (gnu packages ncurses) + #:use-module (gnu packages networking) #:use-module (gnu packages pkg-config) #:use-module (gnu packages pulseaudio) #:use-module (gnu packages python) #:use-module (gnu packages qt) #:use-module (gnu packages sdl) + #:use-module (gnu packages texinfo) + #:use-module (gnu packages textutils) #:use-module (gnu packages tls) #:use-module (gnu packages upnp) #:use-module (gnu packages video) @@ -72,6 +78,7 @@ #:use-module (gnu packages xiph) #:use-module (gnu packages xml) #:use-module (gnu packages xorg) + #:use-module (gnu packages web) #:use-module (guix build-system cmake) #:use-module (guix build-system gnu)) @@ -1167,3 +1174,187 @@ already have their data files. The clever part about this: ScummVM just replaces the executables shipped with the games, allowing you to play them on systems for which they were never designed!") (license license:gpl2+))) + +(define-public mame + (package + (name "mame") + (version "0.198") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/mamedev/mame.git") + (commit (apply string-append "mame" (string-split version #\.))))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0kl7qll8d6xlx7bj5920ljs888a6nc1fj2kfw1fz0r8za3m7wiq9")) + (modules '((guix build utils))) + (snippet + ;; Remove bundled libraries. + '(begin + (with-directory-excursion "3rdparty" + (for-each delete-file-recursively + '("asio" "expat" "glm" "libflac" "libjpeg" "lua" + "portaudio" "portmidi" "pugixml" "rapidjson" "SDL2" + "SDL2-override" "sqlite3" "utf8proc" "zlib"))) + #t)))) + (build-system gnu-build-system) + (arguments + `(#:make-flags + (cons* + (string-append "QT_HOME=" (assoc-ref %build-inputs "qtbase")) + (string-append "SDL_INI_PATH=" + (assoc-ref %outputs "out") + "/share/mame/ini") + (map (lambda (lib) + (string-append "USE_SYSTEM_LIB_" (string-upcase lib) "=1")) + '("asio" "expat" "flac" "glm" "jpeg" "lua" "portaudio" "portmidi" + "pugixml" "rapidjson" "sqlite3" "utf8proc" "zlib"))) + #:tests? #f ;no test in regular release + #:phases + (modify-phases %standard-phases + (delete 'configure) + (add-after 'build 'build-documentation + (lambda _ (invoke "make" "-C" "docs" "man" "info"))) + (replace 'install + ;; Upstream does not provide an installation phase. + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (share (string-append out "/share/mame"))) + ;; Install data. + (for-each (lambda (dir) + (copy-recursively dir (string-append share "/" dir))) + '("artwork" "bgfx" "ctrlr" "hash" "ini" "language" + "plugins" "samples")) + (let ((keymaps (string-append share "/keymaps"))) + (for-each (lambda (file) (install-file file keymaps)) + (find-files "keymaps" ".*LINUX\\.map"))) + (let ((fonts (string-append share "/fonts"))) + (install-file "uismall.bdf" fonts)) + (rename-file "mame64" "mame") + (install-file "mame" (string-append out "/bin"))) + #t)) + (add-after 'install 'install-documentation + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (man (string-append out "/share/man/man1")) + (info (string-append out "/share/info"))) + (install-file "docs/build/man/MAME.1" man) + (install-file "docs/build/texinfo/MAME.info" info)) + #t)) + (add-after 'install 'install-ini-file + ;; Generate an ini file so as to set some directories (e.g., roms) + ;; to a writable location, i.e., "$HOME/.mame/" and "$HOME/mame/". + ;; + ;; XXX: We need to insert absolute references to the store. It can + ;; be an issue if they leak into user's home directory, e.g., with + ;; "mame -createconfig" and the package is later GC'ed. + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (share (string-append out "/share/mame")) + (ini (string-append share "/ini"))) + (with-output-to-file (string-append ini "/mame.ini") + (lambda _ + (format #t + "inipath $HOME/.mame;~a/ini~@ + homepath $HOME/mame~@ + rompath $HOME/mame/roms~@ + samplepath $HOME/mame/samples;~a/samples~@ + cheatpath $HOME/mame/cheat~@ + artpath $HOME/mame/artwork;~a/artwork~@ + crosshairpath $HOME/mame/crosshair~@ + snapshot_directory $HOME/mame/snapshots~@ + hashpath ~a/hash~@ + fontpath $HOME/mame/fonts;~a/fonts~@ + ctrlrpath $HOME/mame/ctrlr;~a/ctrlr~@ + bgfx_path ~a/bgfx~@ + pluginspath $HOME/mame/plugins;~a/plugins~@ + languagepath ~a/language~@ + cfg_directory $HOME/.mame/cfg~@ + nvram_directory $HOME/.mame/nvram~@ + input_directory $HOME/.mame/inp~@ + state_directory $HOME/.mame/sta~@ + diff_directory $HOME/.mame/diff~@ + comment_directory $HOME/.mame/comments~%" + share share share share share share share share + share))) + (with-output-to-file (string-append ini "/ui.ini") + (lambda _ + (format #t + "historypath $HOME/mame/history~@ + categorypath $HOME/mame/folders~@ + cabinets_directory $HOME/mame/cabinets~@ + cpanels_directory $HOME/mame/cpanel~@ + pcbs_directory $HOME/mame/pcb~@ + flyers_directory $HOME/mame/flyers~@ + titles_directory $HOME/mame/titles~@ + ends_directory $HOME/mame/ends~@ + marquees_directory $HOME/mame/marquees~@ + artwork_preview_directory $HOME/mame/artpreview~@ + bosses_directory $HOME/mame/bosses~@ + logos_directory $HOME/mame/logo~@ + scores_directory $HOME/mame/scores~@ + versus_directory $HOME/mame/versus~@ + gameover_directory $HOME/mame/gameover~@ + howto_directory $HOME/mame/howto~@ + select_directory $HOME/mame/select~@ + icons_directory $HOME/mame/icons~@ + covers_directory $HOME/mame/covers~@ + ui_path $HOME/.mame/ui~%"))) + #t))) + (add-after 'install 'install-desktop-file + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (desktop (string-append out "/share/applications")) + (executable (string-append out "/bin/mame"))) + (mkdir-p desktop) + (with-output-to-file (string-append desktop "/mame.desktop") + (lambda _ + (format #t + "[Desktop Entry]~@ + Name=mame~@ + Comment=Multi-purpose emulation framework~@ + Exec=~a~@ + TryExec=~@*~a~@ + Terminal=false~@ + Type=Application~@ + Categories=Game;Emulator;~@ + Keywords=Game;Emulator;Arcade;~%" + executable))) + #t)))))) + (native-inputs + `(("pkg-config" ,pkg-config) + ("pugixml" ,pugixml) + ("python-sphinx" ,python-sphinx) + ("texinfo" ,texinfo))) + (inputs + `(("alsa-lib" ,alsa-lib) + ("asio" ,asio) + ("expat" ,expat) + ("flac" ,flac) + ("fontconfig" ,fontconfig) + ("glm" ,glm) + ("libjpeg" ,libjpeg-8) ;jpeg_read_header argument error in libjpeg-9 + ("libxinerama" ,libxinerama) + ("lua" ,lua) + ("portaudio" ,portaudio) + ("portmidi" ,portmidi) + ("python-wrapper" ,python-wrapper) + ("qtbase" ,qtbase) + ("rapidjson" ,rapidjson) + ("sdl" ,(sdl-union (list sdl2 sdl2-ttf))) + ("sqlite" ,sqlite) + ("utf8proc" ,utf8proc) + ("zlib" ,zlib))) + (home-page "http://mamedev.org/") + (synopsis "Multi-purpose emulation framework") + (description "MAME's purpose is to preserve decades of software +history. As electronic technology continues to rush forward, MAME +prevents this important @emph{vintage} software from being lost and +forgotten. This is achieved by documenting the hardware and how it +functions. The source code to MAME serves as this documentation.") + ;; The MAME project as a whole is distributed under the terms of GPL2+. + ;; However, over 90% of the files are under Expat license. Also, artwork, + ;; keymaps, languages and samples are under CC0. + (license (list license:gpl2+ license:expat license:cc0)))) -- 2.17.0
guix-patches <at> gnu.org
:bug#31672
; Package guix-patches
.
(Mon, 04 Jun 2018 15:58:01 GMT) Full text and rfc822 format available.Message #38 received at 31672 <at> debbugs.gnu.org (full text, mbox):
From: Rutger Helling <rhelling <at> mykolab.com> To: Nicolas Goaziou <mail <at> nicolasgoaziou.fr> Cc: 31672 <at> debbugs.gnu.org Subject: Re: [bug#31672] [PATCH 0/2] Add Mame Date: Mon, 4 Jun 2018 17:56:34 +0200
[Message part 1 (text/plain, inline)]
I can confirm this new version builds fine as well. I think that this is an acceptable solution too. On Mon, 04 Jun 2018 00:22:01 +0200 Nicolas Goaziou <mail <at> nicolasgoaziou.fr> wrote: > Nicolas Goaziou <mail <at> nicolasgoaziou.fr> writes: > > > Anyway, this is not totally satisfactory because one cannot use, > > e.g., "mame -createconfig" and have ini files generated in current > > directory. > > > > I don't know how to fix that issue. > > The following may be an acceptable compromise. >
[Message part 2 (application/pgp-signature, inline)]
guix-patches <at> gnu.org
:bug#31672
; Package guix-patches
.
(Fri, 08 Jun 2018 13:33:02 GMT) Full text and rfc822 format available.Message #41 received at 31672 <at> debbugs.gnu.org (full text, mbox):
From: ludo <at> gnu.org (Ludovic Courtès) To: Nicolas Goaziou <mail <at> nicolasgoaziou.fr> Cc: Ricardo Wurmus <rekado <at> elephly.net>, 31672 <at> debbugs.gnu.org, Rutger Helling <rhelling <at> mykolab.com> Subject: Re: [bug#31672] [PATCH 0/2] Add Mame Date: Fri, 08 Jun 2018 15:32:19 +0200
Hi Nicolas, Nicolas Goaziou <mail <at> nicolasgoaziou.fr> skribis: >>From c0c5ec4dcf374f13fc7928053f351f67353e3d6f Mon Sep 17 00:00:00 2001 > From: Nicolas Goaziou <mail <at> nicolasgoaziou.fr> > Date: Thu, 31 May 2018 17:08:10 +0200 > Subject: [PATCH 2/2] gnu: mame: New variable. > > * gnu/packages/emulators.scm (mame): New variable. We had a lengthy and quite unproductive discussion a while back about MAME. As long as it follows the FSDG, it’s OK to include it. So please make sure it doesn’t include non-free software and does not download or point users at sites providing non-free software. If this is OK, and if it actually works ;-), then you can go ahead and push! Thank you, Ludo’.
Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
:Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
:Message #46 received at 31672-done <at> debbugs.gnu.org (full text, mbox):
From: Nicolas Goaziou <mail <at> nicolasgoaziou.fr> To: ludo <at> gnu.org (Ludovic Courtès) Cc: Ricardo Wurmus <rekado <at> elephly.net>, 31672-done <at> debbugs.gnu.org, Rutger Helling <rhelling <at> mykolab.com> Subject: Re: [bug#31672] [PATCH 0/2] Add Mame Date: Sat, 09 Jun 2018 00:28:01 +0200
Hello, ludo <at> gnu.org (Ludovic Courtès) writes: > We had a lengthy and quite unproductive discussion a while back about > MAME. As long as it follows the FSDG, it’s OK to include it. > > So please make sure it doesn’t include non-free software and does not > download or point users at sites providing non-free software. I think it is clean. > If this is OK, and if it actually works ;-), then you can go ahead > and push! Pushed as c8b2fd2866c0d68d62c4ce990e0b41a422bd7030. Thank you. Regards, -- Nicolas Goaziou 0x80A93738
Debbugs Internal Request <help-debbugs <at> gnu.org>
to internal_control <at> debbugs.gnu.org
.
(Sat, 07 Jul 2018 11:24:04 GMT) Full text and rfc822 format available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.