unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Charles via Guix-patches via <guix-patches@gnu.org>
To: Julien Lepiller <julien@lepiller.eu>
Cc: "53704@debbugs.gnu.org" <53704@debbugs.gnu.org>
Subject: [bug#53704] Bump
Date: Sat, 12 Feb 2022 00:30:06 +0000	[thread overview]
Message-ID: <3c9dxjEeXYXD76uUQgjwTlqZOtOb7IFb8FX50AHQoH9bc-bapcr6kxnaouHjVYd3CaIPjKPiuUwZ6tx6VW-YRPKUMri5i_mLx4du5ux81a8=@protonmail.com> (raw)
In-Reply-To: <33CA9DF7-1E9D-410D-9775-61825B56A0DF@lepiller.eu>

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

Thanks for the review, Julien. Here is a new patch that includes your suggestions.

------- Original Message -------

On Friday, February 11th, 2022 at 1:05 AM, Julien Lepiller <julien@lepiller.eu> wrote:

> Your patch looks good, though I haven't tested yet. In your synopsis, it's "an emulator", not "a emulator". The patches should contain author information. Did you create them yourself? Did you get them from somewhere else?
>
> The gcc patch could be replaced with a phase that substitutes cc for gcc.
>
> You need to add the patches to gnu/local.mk.
>
> Thanks!
>
> On February 11, 2022 7:51:31 AM GMT+01:00, Charles via Guix-patches via <guix-patches@gnu.org> wrote:
>
> > Is there any chance this can get merged? If there is something wrong with the package, I am happy to fix it.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-emulators-Add-visualboyadvance-m.patch --]
[-- Type: text/x-patch; name=0001-gnu-emulators-Add-visualboyadvance-m.patch, Size: 4972 bytes --]

From 3b03ca688dd33091d4e43754eaf3c74ad00cbd10 Mon Sep 17 00:00:00 2001
From: Charles <charles.b.jackson@protonmail.com>
Date: Tue, 1 Feb 2022 10:36:06 -0600
Subject: [PATCH] gnu: emulators: Add visualboyadvance-m.

* gnu/packages/emulators.scm (visualboyadvance-m): New variable.
* gnu/packages/patches/visualboyadvance-m-fix-rpath.patch: New patch.
---
 gnu/local.mk                                  |  1 +
 gnu/packages/emulators.scm                    | 53 +++++++++++++++++++
 .../visualboyadvance-m-fix-rpath.patch        | 25 +++++++++
 3 files changed, 79 insertions(+)
 create mode 100644 gnu/packages/patches/visualboyadvance-m-fix-rpath.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 1b08b40b9c..5e6bceedfb 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1960,6 +1960,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/vinagre-newer-freerdp.patch             \
   %D%/packages/patches/vinagre-newer-rdp-parameters.patch      \
   %D%/packages/patches/virglrenderer-CVE-2017-6386.patch 	\
+  %D%/packages/patches/visualboyadvance-m-fix-rpath.patch       \
   %D%/packages/patches/vsearch-unbundle-cityhash.patch		\
   %D%/packages/patches/vte-CVE-2012-2738-pt1.patch			\
   %D%/packages/patches/vte-CVE-2012-2738-pt2.patch			\
diff --git a/gnu/packages/emulators.scm b/gnu/packages/emulators.scm
index 9ec73bc11f..ae4c395d78 100644
--- a/gnu/packages/emulators.scm
+++ b/gnu/packages/emulators.scm
@@ -17,6 +17,7 @@
 ;;; Copyright © 2021 Felix Gruber <felgru@posteo.net>
 ;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
 ;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
+;;; Copyright © 2022 Charles Jackson <charles.b.jackson@protonmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -814,6 +815,58 @@ (define-public sameboy
 from an emulator---from save states to scaling filters.")
     (license license:expat)))
 
+(define-public visualboyadvance-m
+  (package
+    (name "visualboyadvance-m")
+    (version "2.1.4")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/visualboyadvance-m/visualboyadvance-m/")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1kgpbvng3c12ws0dy92zc0azd94h0i3j4vm7b67zc8mi3pqsppdg"))
+       (patches (search-patches "visualboyadvance-m-fix-rpath.patch"))))
+    (build-system cmake-build-system)
+    (arguments
+     '(#:build-type "Release"
+       #:tests? #f
+       #:configure-flags
+       (list "-DENABLE_SSP=ON"
+             "-DENABLE_ONLINEUPDATES=OFF"
+             (string-append "-DCMAKE_PREFIX_PATH="
+                            (assoc-ref %build-inputs "wxwidgets")))
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'set-c-compiler
+           (lambda _
+             (substitute* "cmake/HostCompile.cmake"
+               ((" cc ") " gcc "))))
+         (add-before 'configure 'set-home
+           (lambda _ (setenv "HOME" (getcwd)))))))
+    (native-inputs (list
+                    gettext-minimal
+                    nasm
+                    pkg-config
+                    zip))
+    (inputs (list
+             ffmpeg
+             gtk+
+             libpng
+             mesa
+             openal
+             sdl2
+             sfml
+             wxwidgets
+             zlib))
+    (home-page "https://vba-m.com/")
+    (synopsis "Performant Nintendo Gameboy emulator")
+    (description "Visual Boy Advance M is an emulator of the Game Boy, Game Boy
+Color, and Game Boy Advance handheld game consoles.")
+    (license license:gpl2+)))
+
 (define-public mupen64plus-core
   (package
     (name "mupen64plus-core")
diff --git a/gnu/packages/patches/visualboyadvance-m-fix-rpath.patch b/gnu/packages/patches/visualboyadvance-m-fix-rpath.patch
new file mode 100644
index 0000000000..9116f35b2a
--- /dev/null
+++ b/gnu/packages/patches/visualboyadvance-m-fix-rpath.patch
@@ -0,0 +1,25 @@
+From 6ec4f4224aa360d5c233941148465ad1c8c77f33 Mon Sep 17 00:00:00 2001
+From: Charles Jackson <charles.b.jackson@protonmail.com>
+Date: Mon, 31 Jan 2022 23:24:17 -0600
+Subject: [PATCH] Fix rpath
+
+---
+ CMakeLists.txt | 5 +----
+ 1 file changed, 1 insertion(+), 4 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 010c9b0e..3a959b59 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -610,9 +610,6 @@ if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID STREQUAL Clang)
+ 
+         set(MY_C_LINKER_FLAGS ${MY_C_LINKER_FLAGS} -Wl,-allow-multiple-definition)
+ 
+-        if(CMAKE_PREFIX_PATH)
+-            list(GET CMAKE_PREFIX_PATH 0 prefix_path_first)
+-            set(MY_C_LINKER_FLAGS ${MY_C_LINKER_FLAGS} "-Wl,-rpath-link=${prefix_path_first}/lib")
+-        endif()
++        set(MY_C_LINKER_FLAGS ${MY_C_LINKER_FLAGS} "-Wl,-rpath,$ENV{LIBRARY_PATH}")
+     endif()
+ 
+     # set linker flags
\ No newline at end of file
-- 
2.34.0


  reply	other threads:[~2022-02-12  1:19 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-01 17:36 [bug#53704] Add Visualboyadvance-m Charles via Guix-patches via
2022-02-11  6:51 ` [bug#53704] Bump Charles via Guix-patches via
2022-02-11  7:05   ` Julien Lepiller
2022-02-12  0:30     ` Charles via Guix-patches via [this message]
2022-02-12  9:54       ` Maxime Devos
2022-02-12 10:11       ` Maxime Devos
2022-02-12 11:35       ` Maxime Devos
2022-02-12 12:17         ` Maxime Devos
2022-02-12 13:31       ` Maxime Devos
2022-02-12 23:45         ` Charles via Guix-patches via
2022-02-27  0:19           ` Charles via Guix-patches via
2022-02-27 10:52           ` Maxime Devos

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='3c9dxjEeXYXD76uUQgjwTlqZOtOb7IFb8FX50AHQoH9bc-bapcr6kxnaouHjVYd3CaIPjKPiuUwZ6tx6VW-YRPKUMri5i_mLx4du5ux81a8=@protonmail.com' \
    --to=guix-patches@gnu.org \
    --cc=53704@debbugs.gnu.org \
    --cc=charles.b.jackson@protonmail.com \
    --cc=julien@lepiller.eu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).