diff options
author | Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com> | 2015-11-02 00:39:22 +0100 |
---|---|---|
committer | Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com> | 2015-11-10 22:14:44 +0100 |
commit | e6974eae1d5d4111c789cf7cb347ba0658802c29 (patch) | |
tree | f3ddb4afdcb68e5d8f2d2e9038429bcd1d6e3a77 | |
parent | 17e2bc8617abcca0a6ade6fe598dc72ef70ca47a (diff) | |
download | guix-e6974eae1d5d4111c789cf7cb347ba0658802c29.tar.gz |
gnu: Add mupen64plus-ui-console.
* gnu/packages/games.scm (mupen64plus-ui-console): New variable. * gnu/packages/patches/mupen64plus-ui-console-notice.patch: New file. * gnu-system.am (dist_patch_DATA): Add it.
-rw-r--r-- | gnu-system.am | 1 | ||||
-rw-r--r-- | gnu/packages/games.scm | 66 | ||||
-rw-r--r-- | gnu/packages/patches/mupen64plus-ui-console-notice.patch | 34 |
3 files changed, 101 insertions, 0 deletions
diff --git a/gnu-system.am b/gnu-system.am index f3ded69a78..cf99a9a008 100644 --- a/gnu-system.am +++ b/gnu-system.am @@ -587,6 +587,7 @@ dist_patch_DATA = \ gnu/packages/patches/mplayer2-theora-fix.patch \ gnu/packages/patches/module-init-tools-moduledir.patch \ gnu/packages/patches/mumps-build-parallelism.patch \ + gnu/packages/patches/mupen64plus-ui-console-notice.patch \ gnu/packages/patches/mupdf-buildsystem-fix.patch \ gnu/packages/patches/mutt-store-references.patch \ gnu/packages/patches/net-tools-bitrot.patch \ diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm index 732b9c6515..2b5d78d618 100644 --- a/gnu/packages/games.scm +++ b/gnu/packages/games.scm @@ -1688,6 +1688,72 @@ which is capable of accurately playing many games. This package contains the Z64 video plugin.") (license license:gpl2+))) +(define-public mupen64plus-ui-console + (package + (name "mupen64plus-ui-console") + (version "2.5") + (source + (origin + (method url-fetch) + (uri (string-append + "https://github.com/mupen64plus/mupen64plus-ui-console/archive/" + version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 "04qkpd8ic7xsgnqz7spl00wxdygf79m7d1k8rabbygjk5lg6p8z2")) + (patches + (list (search-patch "mupen64plus-ui-console-notice.patch"))))) + (build-system gnu-build-system) + (native-inputs + `(("pkg-config" ,pkg-config) + ("which" ,which))) + (inputs + `(("sdl2" ,sdl2))) + ;; Mupen64Plus supports a single data directory and a single plugin + ;; directory in its configuration, yet we need data and plugin files from + ;; a variety of packages. The best way to deal with this is to install + ;; all packages from which data and plugin files are needed into one's + ;; profile, and point the configuration there. Hence, propagate the most + ;; important packages here to save the user from the bother. The patch + ;; mupen64plus-ui-console-notice also gives users instructions on what + ;; they need to do in order to point the configuration to their profile. + (propagated-inputs + `(("mupen64plus-core" ,mupen64plus-core) + ("mupen64plus-audio-sdl" ,mupen64plus-audio-sdl) + ("mupen64plus-input-sdl" ,mupen64plus-input-sdl) + ("mupen64plus-rsp-hle" ,mupen64plus-rsp-hle) + ("mupen64plus-video-glide64" ,mupen64plus-video-glide64) + ("mupen64plus-video-glide64mk2" ,mupen64plus-video-glide64mk2) + ("mupen64plus-video-rice" ,mupen64plus-video-rice))) + (arguments + '(#:phases + (modify-phases %standard-phases + ;; The mupen64plus build system has no configure phase. + (delete 'configure) + ;; Makefile is in a subdirectory. + (add-before + 'build 'cd-to-project-dir + (lambda _ + (chdir "projects/unix")))) + #:make-flags + (let ((out (assoc-ref %outputs "out")) + (m64p (assoc-ref %build-inputs "mupen64plus-core"))) + (list "all" + (string-append "PREFIX=" out) + (string-append "APIDIR=" m64p "/include/mupen64plus") + ;; Trailing slash matters here. + (string-append "COREDIR=" m64p "/lib/"))) + ;; There are no tests. + #:tests? #f)) + (home-page "http://www.mupen64plus.org/") + (synopsis "Mupen64Plus SDL input plugin") + (description + "Mupen64Plus is a cross-platform plugin-based Nintendo 64 (N64) emulator +which is capable of accurately playing many games. This package contains the +command line user interface. Installing this package is the easiest way +towards a working Mupen64Plus for casual users.") + (license license:gpl2+))) + (define-public nestopia-ue (package (name "nestopia-ue") diff --git a/gnu/packages/patches/mupen64plus-ui-console-notice.patch b/gnu/packages/patches/mupen64plus-ui-console-notice.patch new file mode 100644 index 0000000000..1d0b4c46bb --- /dev/null +++ b/gnu/packages/patches/mupen64plus-ui-console-notice.patch @@ -0,0 +1,34 @@ +Mupen64Plus supports a single data directory and a single plugin directory in +its configuration, yet we need data and plugin files from a variety of +packages. The best way to deal with this is to install all packages from +which data and plugin files are needed into one's profile, and point the +configuration there. Hence, the ui-console package provides propagated inputs +for packages with the most important data and plugin files, and this patch +provides the user instructions on what needs to be done in order to have +Mupen64Plus find the relevant data and plugins. + +--- a/src/plugin.c ++++ b/src/plugin.c +@@ -122,6 +122,22 @@ m64p_error PluginSearchLoad(m64p_handle ConfigUI) + { + const char *plugindir = (*ConfigGetParamString)(ConfigUI, "PluginDir"); + lib_filelist = osal_library_search(plugindir); ++ /* Guix specific */ ++ if (lib_filelist == NULL) ++ { ++ DebugMessage(M64MSG_ERROR, "No plugins found in PluginDir path: %s", plugindir); ++ DebugMessage(M64MSG_ERROR, ++ "\n\n" ++ "*********************************\n" ++ "*** Notice for GNU Guix users ***\n" ++ "*********************************\n" ++ "\n" ++ "You might want to edit your mupen64plus.cfg (in $XDG_CONFIG_HOME by default)\n" ++ "and set SharedDataPath to /path/to/my_guix_profile/share/mupen64plus and\n" ++ "PluginDir to /path/to/my_guix_profile/lib/mupen64plus so that data and plugins\n" ++ "are found.\n" ++ "\n"); ++ } + } + + /* if still no plugins found, search some common system folders */ |