unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#73488] [PATCH 1/7] gnu: bsnes: Remove input labels and use gexps.
       [not found] <cover.1727320201.git.maxim.cournoyer@gmail.com>
@ 2024-09-26  3:09 ` Maxim Cournoyer
  2024-09-26  3:09 ` [bug#73488] [PATCH 2/7] gnu: Add jg-api Maxim Cournoyer
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Maxim Cournoyer @ 2024-09-26  3:09 UTC (permalink / raw)
  To: 73488; +Cc: Maxim Cournoyer

* gnu/packages/emulators.scm (bsnes) [arguments]: Use gexps.
[inputs]: Remove labels.
[home-page]: Update URL.

Change-Id: I69046d977c4647f46c1359d62b762149b8f70160
---

 gnu/packages/emulators.scm | 43 +++++++++++++++++++-------------------
 1 file changed, 21 insertions(+), 22 deletions(-)

diff --git a/gnu/packages/emulators.scm b/gnu/packages/emulators.scm
index 4dc61bdbff..50a7b67121 100644
--- a/gnu/packages/emulators.scm
+++ b/gnu/packages/emulators.scm
@@ -2230,31 +2230,30 @@ (define-public bsnes
              (commit (string-append "v" version))))
        (file-name (git-file-name name version))
        (sha256
-        (base32
-         "0j054x38fwai61vj36sc04r3zkzay5acq2cgd9zqv5hs51s36g5b"))))
+        (base32 "0j054x38fwai61vj36sc04r3zkzay5acq2cgd9zqv5hs51s36g5b"))))
     (build-system gnu-build-system)
     (arguments
-     `(#:make-flags (list "-C" "bsnes"
-                          ;; Remove march=native
-                          "local=false"
-                          (string-append "prefix=" (assoc-ref %outputs "out")))
-       #:tests? #f                      ; No tests.
-       #:phases (modify-phases %standard-phases
-                  (delete 'configure))))
-    (native-inputs
-     (list pkg-config))
+     (list
+      #:make-flags #~(list "-C" "bsnes"
+                           ;; Remove march=native
+                           "local=false"
+                           (string-append "prefix=" #$output))
+      #:tests? #f                       ;No tests.
+      #:phases #~(modify-phases %standard-phases
+                   (delete 'configure))))
+    (native-inputs (list pkg-config))
     (inputs
-     `(("alsa-lib" ,alsa-lib)
-       ("ao" ,ao)
-       ("cairo" ,cairo)
-       ("eudev" ,eudev)
-       ("gtksourceview-2" ,gtksourceview-2)
-       ("libxrandr" ,libxrandr)
-       ("libxv" ,libxv)
-       ("openal" ,openal)
-       ("pulseaudio" ,pulseaudio)
-       ("sdl2" ,sdl2)))
-    (home-page "https://bsnes.dev/")
+     (list alsa-lib
+           ao
+           cairo
+           eudev
+           gtksourceview-2
+           libxrandr
+           libxv
+           openal
+           pulseaudio
+           sdl2))
+    (home-page "https://github.com/bsnes-emu/bsnes")
     (synopsis "Emulator for the Super Nintendo / Super Famicom systems")
     (description
      "bsnes is a Super Nintendo / Super Famicom emulator that focuses on
-- 
2.46.0





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

* [bug#73488] [PATCH 2/7] gnu: Add jg-api.
       [not found] <cover.1727320201.git.maxim.cournoyer@gmail.com>
  2024-09-26  3:09 ` [bug#73488] [PATCH 1/7] gnu: bsnes: Remove input labels and use gexps Maxim Cournoyer
@ 2024-09-26  3:09 ` Maxim Cournoyer
  2024-09-26  3:09 ` [bug#73488] [PATCH 3/7] gnu: Add jgrf Maxim Cournoyer
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Maxim Cournoyer @ 2024-09-26  3:09 UTC (permalink / raw)
  To: 73488; +Cc: Maxim Cournoyer

* gnu/packages/emulators.scm (jg-api): New variable.

Change-Id: I2cd2086560f8353f8260209c4ee0f117c3615917
---

 gnu/packages/emulators.scm | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/gnu/packages/emulators.scm b/gnu/packages/emulators.scm
index 50a7b67121..09e722b4f4 100644
--- a/gnu/packages/emulators.scm
+++ b/gnu/packages/emulators.scm
@@ -2260,6 +2260,32 @@ (define-public bsnes
 performance, features, and ease of use.")
     (license license:gpl3)))
 
+(define-public jg-api
+  (package
+    (name "jg-api")
+    (version "1.0.0")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://gitlab.com/jgemu/jg")
+                    (commit version)))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "0117cvfvzhrm9fxnryhbnf9r0f8ij4ahhfqiqp5yv11bz2wcyhqh"))))
+    (build-system gnu-build-system)
+    (arguments
+     (list #:tests? #f
+           #:make-flags #~(list (string-append "PREFIX=" #$output))
+           #:phases #~(modify-phases %standard-phases
+                        (delete 'configure)))) ;no configure phase
+    (home-page "https://gitlab.com/jgemu/jg")
+    (synopsis "Emulators Plugin API")
+    (description "This package provides the Jolly Good API C and C++ headers.
+The Jolly Good API is a shared object or plugin @acronym{API, Application
+Programming Interface} for emulators.")
+    (license license:zlib)))
+
 (define-public zsnes
   (package
     (name "zsnes")
-- 
2.46.0





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

* [bug#73488] [PATCH 3/7] gnu: Add jgrf.
       [not found] <cover.1727320201.git.maxim.cournoyer@gmail.com>
  2024-09-26  3:09 ` [bug#73488] [PATCH 1/7] gnu: bsnes: Remove input labels and use gexps Maxim Cournoyer
  2024-09-26  3:09 ` [bug#73488] [PATCH 2/7] gnu: Add jg-api Maxim Cournoyer
@ 2024-09-26  3:09 ` Maxim Cournoyer
  2024-09-26  3:31   ` Maxim Cournoyer
  2024-09-26  3:09 ` [bug#73488] [PATCH 4/7] gnu: jgrf: Add search path mechanism Maxim Cournoyer
                   ` (3 subsequent siblings)
  6 siblings, 1 reply; 8+ messages in thread
From: Maxim Cournoyer @ 2024-09-26  3:09 UTC (permalink / raw)
  To: 73488; +Cc: Maxim Cournoyer

* gnu/packages/emulators.scm (jgrf): New variable.

Change-Id: I0cf706e66977ceb96902dcd54f9175031e129445
---

 gnu/packages/emulators.scm | 59 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 59 insertions(+)

diff --git a/gnu/packages/emulators.scm b/gnu/packages/emulators.scm
index 09e722b4f4..6a5ff6cc19 100644
--- a/gnu/packages/emulators.scm
+++ b/gnu/packages/emulators.scm
@@ -2286,6 +2286,65 @@ (define-public jg-api
 Programming Interface} for emulators.")
     (license license:zlib)))
 
+(define-public jgrf
+  (package
+    (name "jgrf")
+    (version "1.1.0")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://gitlab.com/jgemu/jgrf")
+                    (commit version)))
+              (file-name (git-file-name name version))
+              (modules '((guix build utils)))
+              (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")
+                          (delete-file-recursively "deps/miniz")))
+              (sha256
+               (base32
+                "19n6h8l3vy5g2bqvxhxwqxlg070hjz22384yisadzwl3gjkkgpxk"))))
+    (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 libepoxy
+           libsamplerate
+           miniz
+           soxr
+           speexdsp
+           flac
+           lzo
+           sdl2
+           zlib
+           `(,zstd "lib")))
+    (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 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.")
+    ;; The main license is BSD-3; the bundled source licenses are also listed
+    ;; below.
+    (license (list license:bsd-3 ;this software, gltext.h, lodepng.c, lodepng.h
+                   license:expat ;ezmenu.h source, musl_memmem.c,
+                                        ;parson.h, parson.c, tconfig.h, tconfig.c
+                   license:public-domain ;md5.h, md5.c, parg.h, parg.c
+                   license:cc0))))
+
 (define-public zsnes
   (package
     (name "zsnes")
-- 
2.46.0





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

* [bug#73488] [PATCH 4/7] gnu: jgrf: Add search path mechanism.
       [not found] <cover.1727320201.git.maxim.cournoyer@gmail.com>
                   ` (2 preceding siblings ...)
  2024-09-26  3:09 ` [bug#73488] [PATCH 3/7] gnu: Add jgrf Maxim Cournoyer
@ 2024-09-26  3:09 ` Maxim Cournoyer
  2024-09-26  3:09 ` [bug#73488] [PATCH 5/7] gnu: Add jg-bsnes Maxim Cournoyer
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Maxim Cournoyer @ 2024-09-26  3:09 UTC (permalink / raw)
  To: 73488; +Cc: Maxim Cournoyer

This makes it possible to automatically find core files in a profile.

* gnu/packages/patches/jgrf-implement-search-paths.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it.
* gnu/packages/emulators.scm (jgrf) [source]: Apply patch.
[native-search-paths]: New field.

Change-Id: Ibd78d44dcdf23f4310b2f838d73b8e57d7f31b2a
---

 gnu/local.mk                                  |   1 +
 gnu/packages/emulators.scm                    |  10 +-
 .../patches/jgrf-implement-search-paths.patch | 302 ++++++++++++++++++
 3 files changed, 312 insertions(+), 1 deletion(-)
 create mode 100644 gnu/packages/patches/jgrf-implement-search-paths.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 507cbfebca..1e85ab5352 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1589,6 +1589,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/jfsutils-add-sysmacros.patch		\
   %D%/packages/patches/jfsutils-gcc-compat.patch		\
   %D%/packages/patches/jfsutils-include-systypes.patch		\
+  %D%/packages/patches/jgrf-implement-search-paths.patch	\
   %D%/packages/patches/john-the-ripper-jumbo-with-gcc-11.patch	\
   %D%/packages/patches/json-c-0.13-CVE-2020-12762.patch		\
   %D%/packages/patches/json-c-0.12-CVE-2020-12762.patch		\
diff --git a/gnu/packages/emulators.scm b/gnu/packages/emulators.scm
index 6a5ff6cc19..49208f302d 100644
--- a/gnu/packages/emulators.scm
+++ b/gnu/packages/emulators.scm
@@ -2308,7 +2308,8 @@ (define-public jgrf
                           (delete-file-recursively "deps/miniz")))
               (sha256
                (base32
-                "19n6h8l3vy5g2bqvxhxwqxlg070hjz22384yisadzwl3gjkkgpxk"))))
+                "19n6h8l3vy5g2bqvxhxwqxlg070hjz22384yisadzwl3gjkkgpxk"))
+              (patches (search-patches "jgrf-implement-search-paths.patch"))))
     (build-system gnu-build-system)
     (arguments
      (list #:tests? #f                  ;no test suite
@@ -2331,6 +2332,13 @@ (define-public jgrf
            sdl2
            zlib
            `(,zstd "lib")))
+    (native-search-paths
+     (list (search-path-specification
+            (variable "JOLLYGOOD_CORE_DIRS")
+            (files '("lib/jollygood")))
+           (search-path-specification
+            (variable "JOLLYGOOD_ASSETS_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
diff --git a/gnu/packages/patches/jgrf-implement-search-paths.patch b/gnu/packages/patches/jgrf-implement-search-paths.patch
new file mode 100644
index 0000000000..f4c6f20568
--- /dev/null
+++ b/gnu/packages/patches/jgrf-implement-search-paths.patch
@@ -0,0 +1,302 @@
+Upstream status: https://gitlab.com/jgemu/jgrf/-/merge_requests/61
+
+Add support for searching core files and core files assets via the
+JOLLYGOOD_CORE_DIRS and JOLLYGOOD_ASSETS_DIRS environment variables.
+
+diff --git a/Makefile b/Makefile
+index ed6eb1c..fb0709c 100644
+--- a/Makefile
++++ b/Makefile
+@@ -20,7 +20,9 @@ INCLUDES = -I$(DEPDIR) $(CFLAGS_JG) $(CFLAGS_EPOXY) $(CFLAGS_MINIZ) \
+ 
+ LIBS = -lm
+ 
+-DEFINES :=
++# Define the '_GNU_SOURCE' macro to make the `strdup' function
++# available on GNU systems.
++DEFINES := -D_GNU_SOURCE
+ 
+ # Conditions for DEFINES
+ ifneq ($(OS), Windows_NT)
+diff --git a/deps/ezmenu.h b/deps/ezmenu.h
+index 8400a02..6c8e14b 100644
+--- a/deps/ezmenu.h
++++ b/deps/ezmenu.h
+@@ -66,10 +66,10 @@ enum ezmenu_input {
+ 
+ static void ezmenu_init(struct ezmenu *m, int hres, int vres,
+ 	int fontw, int fonth) {
+-	memset(m, 0, sizeof *m);
++	memset(m, 0, sizeof(*m));
+ 	m->w = hres/fontw;
+ 	m->h = vres/fonth;
+-	m->vislines = calloc(sizeof(char*), m->h);
++	m->vislines = calloc(m->h, sizeof(char*));
+ }
+ 
+ static void ezmenu_setlines(struct ezmenu *m, char**lines, unsigned linecount) {
+diff --git a/jollygood.6 b/jollygood.6
+index 9f36407..17fef9c 100644
+--- a/jollygood.6
++++ b/jollygood.6
+@@ -336,6 +336,14 @@ The directory for user-specific data files.
+ This path is used to find data files used by the cores.
+ Set by default to
+ .Pa $HOME/.local/share/jollygood/ .
++.It JOLLYGOOD_CORE_DIRS
++Colon-separated (or semicolon, on Windows) directories containing core
++files. If set, these core files directories take precedence over the
++default ones.
++.It JOLLYGOOD_ASSETS_DIRS
++Colon-separated (or semicolon, on Windows) directories containing core
++assets files. If set, these core assets directories take precedence
++over the default ones.
+ .El
+ .Sh EXAMPLES
+ .Bl -tag -width indent
+diff --git a/src/jgrf.c b/src/jgrf.c
+index 3a40d2d..12eede3 100644
+--- a/src/jgrf.c
++++ b/src/jgrf.c
+@@ -161,6 +161,12 @@ static void mkdirr(const char *dir) {
+     #endif
+ }
+ 
++#if defined(__MINGW32__) || defined(__MINGW64__)
++// Avoid a deprecation warning on Windows, where strdup exists but is
++// deprecated in favor of _strdup.
++#define strdup _strdup
++#endif
++
+ // Create user directories
+ static void jgrf_mkdirs(void) {
+     mkdirr(gdata.configpath);
+@@ -1096,6 +1102,88 @@ void jgrf_frametime(double frametime) {
+     corefps = frametime + 0.5;
+ }
+ 
++// Wrapper that logs and errors in case of realloc problems.
++static void* jgrf_realloc(void* array, const size_t size) {
++    void* new_array;
++    if (size > 0 && !(new_array = realloc(array, size)))
++        jgrf_log(JG_LOG_ERR, "Realloc failure\n");
++    return new_array;
++}
++
++static void jgrf_strip_trailing_sep(char* word) {
++    int end = strlen(word) - 1;
++    while (word[end] == SEP) {
++        word[end] = '\0';
++        end -= 1;
++    }
++}
++
++// Tokenize PATH based on the platform path separator and return an
++// array of strings, or NULL if there nothing could be tokenized.  The
++// count of the number of items is written at the location pointed by
++// the COUNT pointer.  The returned array is dynamically allocated and
++// should be freed when no longer needed, along its inner strings.
++// `transform' can be provided to manipulate the recovered path items;
++// it must be the pointer of a procedure accepting a single string
++// (char*) path item as argument or NULL.
++static char** tokenize_path(int* count, const char* path,
++                            void (*transform) (char*)) {
++    int length = 10;
++    int index = 0;
++    char* save_ptr;
++    char** items = jgrf_realloc(NULL, sizeof(char*) * length);
++    char* item;
++    char pathsep_str[2] = {PATHSEP, '\0'};
++    char* wr_path = strdup(path);
++    if (!wr_path)
++        jgrf_log(JG_LOG_ERR, "strdup memory allocation failure\n");
++
++    item = strtok_r(wr_path, pathsep_str, &save_ptr);
++    while (item) {
++        if (transform)
++            transform(item);
++
++        // Resize the array if needed.
++        if (index >= length) {
++            length += 10;
++            items = jgrf_realloc(items, sizeof(char*) * length);
++        }
++
++	// Assign the component.
++ 	items[index] = strdup(item);
++	if (!items[index])
++	    jgrf_log(JG_LOG_ERR, "stdup memory allocation failure\n");
++
++        index += 1;
++        item = strtok_r(NULL, pathsep_str, &save_ptr);
++    }
++    free(wr_path);
++    jgrf_realloc(items, sizeof(char*) * index);
++
++    *count = index;
++    return items;
++}
++
++// Look if a core named NAME exists under the directory CORE_DIR. Set
++// CORE_FILE as a side-effect. Return 1 if found, 0 otherwise.
++static int search_core_file(char* core_file, size_t max_length,
++                             const char* core_dir, const char* name) {
++    struct stat fbuf;
++    snprintf(core_file, max_length, "%s%c%s.%s",
++             core_dir, SEP, name, SOEXT);
++    return !stat(core_file, &fbuf);
++}
++
++// Look if an core assets directory for core named NAME exists under
++// the directory ASSETS_DIR. Set CORE_ASSETS as a side-effect. Return
++// 1 if found, 0 otherwise.
++static int search_core_assets(char* core_assets, size_t max_length,
++                              const char* assets_dir, const char* name) {
++    struct stat fbuf;
++    snprintf(core_assets, max_length, "%s%c%s", assets_dir, SEP, name);
++    return !stat(core_assets, &fbuf);
++}
++
+ int main(int argc, char *argv[]) {
+     if (argc < 2) {
+         jgrf_cli_usage(argv[0]);
+@@ -1188,7 +1276,7 @@ int main(int argc, char *argv[]) {
+         jg_get_coreinfo("")->name);
+ 
+ #if defined(LIBDIR) && defined(DATADIR) // Check for core assets system-wide
+-    char coreassets[256];
++    char coreassets[384];
+     snprintf(coreassets, sizeof(coreassets),
+         "%s%cjollygood%c%s", DATADIR, SEP, SEP, gdata.corename);
+ 
+@@ -1204,7 +1292,7 @@ int main(int argc, char *argv[]) {
+     }
+     else if (!jgrf_core_default())
+         jgrf_log(JG_LOG_ERR,
+-            "Cannot detect default core, or invalid file. Exiting...\n");
++                 "Cannot detect default core, or invalid file. Exiting...\n");
+ 
+     // Set the core path to the local core path
+     char corepath[384];
+@@ -1222,20 +1310,85 @@ int main(int argc, char *argv[]) {
+     }
+ #if defined(LIBDIR) && defined(DATADIR) // Check for the core system-wide
+     else {
+-        snprintf(corepath, sizeof(corepath), "%s%cjollygood%c%s.%s",
+-            LIBDIR, SEP, SEP, gdata.corename, SOEXT);
+-
+-        // If it was found, set the core assets path
+-        if (stat(corepath, &fbuf) == 0) {
+-            snprintf(gdata.coreassets, sizeof(gdata.coreassets),
+-                "%s%cjollygood%c%s", DATADIR, SEP, SEP, gdata.corename);
+-            corefound = 1;
++        int core_assets_found = 0;
++        int count = 0;
++
++        // Look for the core file in the JOLLYGOOD_CORE_DIRS search
++        // path.
++        const char* core_dirs_env = getenv("JOLLYGOOD_CORE_DIRS");
++        if (core_dirs_env) {
++            char** core_dirs = tokenize_path(&count, core_dirs_env,
++                                             jgrf_strip_trailing_sep);
++            for (int i=0; i < count; ++i) {
++                const char* dir = core_dirs[i];
++                if (search_core_file(corepath, sizeof corepath,
++                                     dir, gdata.corename)) {
++                    corefound = 1;
++                    break;
++                }
++            }
++            // Free all the allocated strings.
++            for (int i=0; i < count; ++i)
++                free(core_dirs[i]);
++            free(core_dirs);
++        }
++
++        // Look in the configured LIBDIR as a fallback.
++        if (!corefound) {
++            char internal_core_dir[256];
++            snprintf(internal_core_dir, sizeof internal_core_dir, "%s%c%s",
++                     LIBDIR, SEP, "jollygood");
++            if (search_core_file(corepath, sizeof corepath,
++                                 internal_core_dir, gdata.corename)) {
++                corefound = 1;
++            } else {
++                jgrf_log(JG_LOG_ERR,
++                         "Could not locate core file. Exiting...\n");
++            }
+         }
+-    }
+ 
+-    // If no core was found, there is no reason to keep the program running
+-    if (!corefound)
+-        jgrf_log(JG_LOG_ERR, "Failed to locate core. Exiting...\n");
++        // If it was found, set the core assets path. First consider
++        // the JOLLYGOOD_ASSETS_DIRS search path.
++        if (corefound) {
++            const char* assets_dirs_env = getenv("JOLLYGOOD_ASSETS_DIRS");
++            if (assets_dirs_env) {
++                char** assets_dirs = tokenize_path(&count, assets_dirs_env,
++                                                   jgrf_strip_trailing_sep);
++                for (int i=0; i < count; ++i) {
++                    const char* dir = assets_dirs[i];
++                    if (search_core_assets(gdata.coreassets,
++                                           sizeof gdata.coreassets,
++                                           dir, gdata.corename)) {
++                        core_assets_found = 1;
++                        break;
++                    }
++                }
++                for (int i=0; i < count; ++i)
++                    free(assets_dirs[i]);
++                free(assets_dirs);
++            }
++
++            // Look in the configured DATADIR as a fallback.
++            if (!core_assets_found) {
++                char internal_core_assets_dir[256];
++                snprintf(internal_core_assets_dir,
++                         sizeof internal_core_assets_dir,
++                         "%s%c%s", DATADIR, SEP, "jollygood");
++                if (search_core_assets(gdata.coreassets,
++                                       sizeof gdata.coreassets,
++                                       internal_core_assets_dir,
++                                       gdata.corename)) {
++                    core_assets_found = 1;
++                } else {
++                    // Not all emulators have core assets,
++                    // e.g. 'cega', so this is not a critical
++                    // condition.
++                    jgrf_log(JG_LOG_INF, "No assets directory for core %s\n",
++                        gdata.corename);
++                }
++            }
++        }
++    }
+ #endif // defined(LIBDIR) && defined(DATADIR)
+ 
+ #endif // JGRF_STATIC
+diff --git a/src/jgrf.h b/src/jgrf.h
+index b3f4627..57bba0e 100644
+--- a/src/jgrf.h
++++ b/src/jgrf.h
+@@ -45,8 +45,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ 
+ #if defined(_WIN32) || defined(__MINGW32__) || defined(__MINGW64__)
+     #define SEP '\\'
++    #define PATHSEP ';'
+ #else
+     #define SEP '/'
++    #define PATHSEP ':'
+ #endif
+ 
+ typedef struct jgrf_gdata_t { // Global Data
+@@ -59,7 +61,7 @@ typedef struct jgrf_gdata_t { // Global Data
+     char coreversion[32]; // Core Version
+     char gamename[128]; // Internally used game name
+     char gamefname[128]; // Internally used game name with extension
+-    char coreassets[256]; // Core asset path
++    char coreassets[384]; // Core asset path
+     char userassets[128]; // User asset path
+     char biospath[128]; // BIOS path
+     char cheatpath[128]; // Cheat path
-- 
2.46.0





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

* [bug#73488] [PATCH 5/7] gnu: Add jg-bsnes.
       [not found] <cover.1727320201.git.maxim.cournoyer@gmail.com>
                   ` (3 preceding siblings ...)
  2024-09-26  3:09 ` [bug#73488] [PATCH 4/7] gnu: jgrf: Add search path mechanism Maxim Cournoyer
@ 2024-09-26  3:09 ` Maxim Cournoyer
  2024-09-26  3:10 ` [bug#73488] [PATCH 6/7] gnu: Add jg-nestopia Maxim Cournoyer
  2024-09-26  3:10 ` [bug#73488] [PATCH 7/7] gnu: Add jg-cega Maxim Cournoyer
  6 siblings, 0 replies; 8+ messages in thread
From: Maxim Cournoyer @ 2024-09-26  3:09 UTC (permalink / raw)
  To: 73488; +Cc: Maxim Cournoyer

* gnu/packages/emulators.scm (jg-bsnes): New variable.

Change-Id: If88a7bea0c87c8af8fce051f8bec891ff249449f
---

 gnu/packages/emulators.scm | 72 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 72 insertions(+)

diff --git a/gnu/packages/emulators.scm b/gnu/packages/emulators.scm
index 49208f302d..068349867f 100644
--- a/gnu/packages/emulators.scm
+++ b/gnu/packages/emulators.scm
@@ -2353,6 +2353,78 @@ (define-public jgrf
                    license:public-domain ;md5.h, md5.c, parg.h, parg.c
                    license:cc0))))
 
+(define-public jg-bsnes
+  (package
+    (name "jg-bsnes")
+    (version "2.0.0")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://gitlab.com/jgemu/bsnes")
+                    (commit version)))
+              (file-name (git-file-name name version))
+              ;; XXX: Some source dependencies are bundled and are not easy to
+              ;; unbundle due to the build system building an object combining
+              ;; their sources directly:
+              ;;  - byuuML
+              ;;  - gb
+              ;;  - libcoco
+              ;;  - snes_spc
+              (modules '((guix build utils)))
+              (snippet '(delete-file-recursively "deps/libsamplerate"))
+              (sha256
+               (base32
+                "0z1ka4si8vcb0j6ih087cni18vpgfd3qnaw24awycxz23xc0jkdv"))))
+    (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)))) ;no configure script
+    (native-inputs (list jg-api pkg-config))
+    (inputs (list libsamplerate))
+    (home-page "https://gitlab.com/jgemu/bsnes")
+    (synopsis "Jolly Good Fork of bsnes")
+    (description "@code{bsnes-jg} is a cycle accurate emulator for the Super
+Famicom/Super Nintendo Entertainment System, including support for the Super
+Game Boy, BS-X Satellaview, and Sufami Turbo.  @code{bsnes-jg} is a fork of
+@code{bsnes} v115, Many changes have been made post-fork:
+@itemize
+@item Higher quality resampler with settings
+@item Improved performance without loss of accuracy
+@item Portability improvements
+@item Removal of accuracy-reducing hacks and unnecessary code
+@item Significant increase in standards compliance
+@item Translation to the C++ Standard Library (ISO C++11)
+@end itemize
+
+In particular, it uses much less @acronym{CPU, Central Processing Unit}
+compared to the original @code{bsnes} (though not as little as @code{zsnes}).
+
+The supported file formats are:
+@itemize @file
+@item .sfc
+@item .smc
+@item .bs
+@item .st
+@item .fig
+@item .swc
+@end itemize
+
+This is intended to be used with the Jolly Good Reference Frontend
+@command{jollygood} command from the @code{jgrf} package.")
+    ;; The project license is GPL3+.  The bundled source licenses are also
+    ;; listed below.
+    (license (list license:gpl3+
+                   license:bsd-3        ;byuuML
+                   license:expat        ;gb
+                   license:isc          ;libco
+                   license:lgpl2.1+))))
+
 (define-public zsnes
   (package
     (name "zsnes")
-- 
2.46.0





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

* [bug#73488] [PATCH 6/7] gnu: Add jg-nestopia.
       [not found] <cover.1727320201.git.maxim.cournoyer@gmail.com>
                   ` (4 preceding siblings ...)
  2024-09-26  3:09 ` [bug#73488] [PATCH 5/7] gnu: Add jg-bsnes Maxim Cournoyer
@ 2024-09-26  3:10 ` Maxim Cournoyer
  2024-09-26  3:10 ` [bug#73488] [PATCH 7/7] gnu: Add jg-cega Maxim Cournoyer
  6 siblings, 0 replies; 8+ messages in thread
From: Maxim Cournoyer @ 2024-09-26  3:10 UTC (permalink / raw)
  To: 73488; +Cc: Maxim Cournoyer

* gnu/packages/emulators.scm (jg-nestopia): New variable.

Change-Id: I2f686f43a8339a124b9ef9640638ab182ecf7079
---

 gnu/packages/emulators.scm | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)

diff --git a/gnu/packages/emulators.scm b/gnu/packages/emulators.scm
index 068349867f..909602acb3 100644
--- a/gnu/packages/emulators.scm
+++ b/gnu/packages/emulators.scm
@@ -2425,6 +2425,39 @@ (define-public jg-bsnes
                    license:isc          ;libco
                    license:lgpl2.1+))))
 
+(define-public jg-nestopia
+  (package
+    (name "jg-nestopia")
+    (version "1.52.1")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://gitlab.com/jgemu/nestopia")
+                    (commit version)))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "19qg9hgh25aaym7b81v5g7165v4fyymas6dmzc4z867mzaphbn6s"))))
+    (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)))) ;no configure script
+    (native-inputs (list jg-api pkg-config))
+    (home-page "https://gitlab.com/jgemu/nestopia")
+    (synopsis "Jolly Good Fork of Nestopia")
+    (description "Nestopia JG is an emulator for the Nintendo Entertainment
+System/Famicom, including support for the Famicom Disk System and VS. System.
+Though originally a fork, Nestopia JG has become the de facto upstream branch
+of the Nestopia emulator.")
+    (license (list license:gpl2+        ;this project
+                   license:lgpl2.1+)))) ;nes_ntsc source files
+
 (define-public zsnes
   (package
     (name "zsnes")
-- 
2.46.0





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

* [bug#73488] [PATCH 7/7] gnu: Add jg-cega.
       [not found] <cover.1727320201.git.maxim.cournoyer@gmail.com>
                   ` (5 preceding siblings ...)
  2024-09-26  3:10 ` [bug#73488] [PATCH 6/7] gnu: Add jg-nestopia Maxim Cournoyer
@ 2024-09-26  3:10 ` Maxim Cournoyer
  6 siblings, 0 replies; 8+ messages in thread
From: Maxim Cournoyer @ 2024-09-26  3:10 UTC (permalink / raw)
  To: 73488; +Cc: Maxim Cournoyer

* gnu/packages/emulators.scm (jg-cega): New variable.

Change-Id: Ice3799d9aa4600006ac386fa40e80fb97b3018c8
---

 gnu/packages/emulators.scm | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

diff --git a/gnu/packages/emulators.scm b/gnu/packages/emulators.scm
index 909602acb3..9e05d59f5c 100644
--- a/gnu/packages/emulators.scm
+++ b/gnu/packages/emulators.scm
@@ -2458,6 +2458,42 @@ (define-public jg-nestopia
     (license (list license:gpl2+        ;this project
                    license:lgpl2.1+)))) ;nes_ntsc source files
 
+(define-public jg-cega
+  (package
+    (name "jg-cega")
+    (version "0.6.0")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://gitlab.com/jgemu/cega")
+                    (commit version)))
+              (modules '((guix build utils)))
+              (snippet '(delete-file-recursively "deps/"))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "10qxfch08850zivxf4s1mhh0clx4h1cfn440acm6d7glb6wbv822"))))
+    (build-system gnu-build-system)
+    (arguments
+     (list #:tests? #f                  ;no test suite
+           #:make-flags
+           #~(list (string-append "CC=" #$(cc-for-target))
+                   (string-append "PREFIX=" #$output))
+           #:phases #~(modify-phases %standard-phases
+                        (delete 'configure))))
+    (native-inputs (list jg-api pkg-config))
+    (inputs (list speexdsp))
+    (home-page "https://gitlab.com/jgemu/cega")
+    (synopsis "Jolly Good SG-1000, SMS, Game Gear, and Mega Drive/Genesis \
+emulator")
+    (description "Cega is a cycle accurate emulator for the Sega SG-1000,
+Master System, and Game Gear written specifically for The Jolly Good API.
+Mega Drive emulation is in an experimental state.")
+    (license (list license:mpl2.0
+                   license:expat        ;src/emu2413, src/m68k
+                   license:bsd-3        ;src/ymfm
+                   license:zlib))))     ;src/z80.h
+
 (define-public zsnes
   (package
     (name "zsnes")
-- 
2.46.0





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

* [bug#73488] [PATCH 3/7] gnu: Add jgrf.
  2024-09-26  3:09 ` [bug#73488] [PATCH 3/7] gnu: Add jgrf Maxim Cournoyer
@ 2024-09-26  3:31   ` Maxim Cournoyer
  0 siblings, 0 replies; 8+ messages in thread
From: Maxim Cournoyer @ 2024-09-26  3:31 UTC (permalink / raw)
  To: 73488

Hi,

Maxim Cournoyer <maxim.cournoyer@gmail.com> writes:

[...]

> +    (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 libepoxy
> +           libsamplerate
> +           miniz
> +           soxr
> +           speexdsp
> +           flac
> +           lzo
> +           sdl2
> +           zlib
> +           `(,zstd "lib")))

I've noticed these inputs were not sorted; now fixed in a v2 that I'll
keep locally in case there are other things to fix.

-- 
Thanks,
Maxim




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

end of thread, other threads:[~2024-09-26  3:33 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <cover.1727320201.git.maxim.cournoyer@gmail.com>
2024-09-26  3:09 ` [bug#73488] [PATCH 1/7] gnu: bsnes: Remove input labels and use gexps Maxim Cournoyer
2024-09-26  3:09 ` [bug#73488] [PATCH 2/7] gnu: Add jg-api Maxim Cournoyer
2024-09-26  3:09 ` [bug#73488] [PATCH 3/7] gnu: Add jgrf Maxim Cournoyer
2024-09-26  3:31   ` Maxim Cournoyer
2024-09-26  3:09 ` [bug#73488] [PATCH 4/7] gnu: jgrf: Add search path mechanism Maxim Cournoyer
2024-09-26  3:09 ` [bug#73488] [PATCH 5/7] gnu: Add jg-bsnes Maxim Cournoyer
2024-09-26  3:10 ` [bug#73488] [PATCH 6/7] gnu: Add jg-nestopia Maxim Cournoyer
2024-09-26  3:10 ` [bug#73488] [PATCH 7/7] gnu: Add jg-cega Maxim Cournoyer

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).