From patchwork Tue Feb 1 17:36:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Charles X-Patchwork-Id: 36922 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 53F5A27BBEA; Tue, 1 Feb 2022 21:07:28 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FREEMAIL_FROM,HTML_MESSAGE,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id B4D3D27BBE9 for ; Tue, 1 Feb 2022 21:07:27 +0000 (GMT) Received: from localhost ([::1]:50290 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nF0N4-00010p-Nh for patchwork@mira.cbaines.net; Tue, 01 Feb 2022 16:07:26 -0500 Received: from eggs.gnu.org ([209.51.188.92]:60854) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nEx6V-0008TQ-Lv for guix-patches@gnu.org; Tue, 01 Feb 2022 12:38:09 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:51086) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nEx6Q-00025G-Ag for guix-patches@gnu.org; Tue, 01 Feb 2022 12:38:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nEx6Q-0003dQ-19 for guix-patches@gnu.org; Tue, 01 Feb 2022 12:38:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53704] Add Visualboyadvance-m Resent-From: Charles Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 01 Feb 2022 17:38:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 53704 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: 53704@debbugs.gnu.org X-Debbugs-Original-To: "guix-patches@gnu.org" Received: via spool by submit@debbugs.gnu.org id=B.164373702813899 (code B ref -1); Tue, 01 Feb 2022 17:38:01 +0000 Received: (at submit) by debbugs.gnu.org; 1 Feb 2022 17:37:08 +0000 Received: from localhost ([127.0.0.1]:43989 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nEx5Y-0003c7-6c for submit@debbugs.gnu.org; Tue, 01 Feb 2022 12:37:08 -0500 Received: from lists.gnu.org ([209.51.188.17]:40010) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nEx5W-0003bx-79 for submit@debbugs.gnu.org; Tue, 01 Feb 2022 12:37:07 -0500 Received: from eggs.gnu.org ([209.51.188.92]:60382) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nEx5V-0006Wi-UR for guix-patches@gnu.org; Tue, 01 Feb 2022 12:37:05 -0500 Received: from mail-4325.protonmail.ch ([185.70.43.25]:35501) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nEx5R-0001ld-Oo for guix-patches@gnu.org; Tue, 01 Feb 2022 12:37:05 -0500 Date: Tue, 01 Feb 2022 17:36:34 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail2; t=1643736998; bh=KRhx9UfPVLnOB23DXG9siW9MCsrJs+pmmqhrOxd5k+M=; h=Date:To:From:Reply-To:Subject:Message-ID:From:To:Cc; b=gfoiBcogcWQPZVK7+PkkNxC93dlyFcaTgITnTx+EA2SsC2g9jJfo4taBm+P2oM/tJ 2HHa2DpSSpsUGleD6fQAW0M+tsiaC64Ny3vonwIY+IKnIKHiV29w7kTusFW1Q4Gox1 g9GvqbkFs5RK8KrL+Qgz15mi8CR2qNrfeISUEJG5q59Ml9QSvcZogAhQI+CHBxb1Ml OED+c4NDCA4bF5dg6dXCJP4QOgLokpbtogbSkoa2QuOUzCTgtJa+WVOhXGvyi3FB/Q KTDB4mrZY157mHCw9/q1ANReTLlHnTsG9Fcy0YIhAEAIBuMglpb/eVlHqylfuhLlN7 Qj1riqKqXgIXw== Message-ID: <_jHX_rdAkHOB9IqHIQfXfggyuZwAL-8cC92ZuWnlLfjZtXdqUHY5XBLRjD32CGrxNx7uBzHJgAtN_YdHoifX1Y4Vhaayg_gWJX6wqPZDhx4=@protonmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=185.70.43.25; envelope-from=charles.b.jackson@protonmail.com; helo=mail-4325.protonmail.ch X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" Reply-to: Charles X-ACL-Warn: , Charles via Guix-patches X-Patchwork-Original-From: Charles via Guix-patches via From: Charles X-getmail-retrieved-from-mailbox: Patches Please review the way that I did the patch files because I am not sure if they are linline with guix standards. From a7c9af1f2e6f0b027c2d77e1163545732aeff8be Mon Sep 17 00:00:00 2001 From: Charles 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/packages/patches/visualboyadvance-m-use-gcc.patch: New patch. --- gnu/packages/emulators.scm | 50 +++++++++++++++++++ .../visualboyadvance-m-fix-rpath.patch | 20 ++++++++ .../patches/visualboyadvance-m-use-gcc.patch | 17 +++++++ 3 files changed, 87 insertions(+) create mode 100644 gnu/packages/patches/visualboyadvance-m-fix-rpath.patch create mode 100644 gnu/packages/patches/visualboyadvance-m-use-gcc.patch diff --git a/gnu/packages/emulators.scm b/gnu/packages/emulators.scm index b260ca38f7..7649cec662 100644 --- a/gnu/packages/emulators.scm +++ b/gnu/packages/emulators.scm @@ -17,6 +17,7 @@ ;;; Copyright © 2021 Felix Gruber ;;; Copyright © 2021 Maxim Cournoyer ;;; Copyright © 2021 Guillaume Le Vaillant +;;; Copyright © 2022 Charles Jackson ;;; ;;; This file is part of GNU Guix. ;;; @@ -814,6 +815,55 @@ (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-use-gcc.patch" + "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-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 a 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..c464f4b9d7 --- /dev/null +++ b/gnu/packages/patches/visualboyadvance-m-fix-rpath.patch @@ -0,0 +1,20 @@ +--- + 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 diff --git a/gnu/packages/patches/visualboyadvance-m-use-gcc.patch b/gnu/packages/patches/visualboyadvance-m-use-gcc.patch new file mode 100644 index 0000000000..449ee75697 --- /dev/null +++ b/gnu/packages/patches/visualboyadvance-m-use-gcc.patch @@ -0,0 +1,17 @@ +--- + cmake/HostCompile.cmake | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/cmake/HostCompile.cmake b/cmake/HostCompile.cmake +index 8fea28be..23a1b0c2 100644 +--- a/cmake/HostCompile.cmake ++++ b/cmake/HostCompile.cmake +@@ -15,7 +15,7 @@ function(host_compile src dst_cmd) + + if(NOT MSVC) + # assume cc foo.c -o foo # will work on most hosts +- set(compile_command cc ${src} -o ${dst} ${link_flags}) ++ set(compile_command gcc ${src} -o ${dst} ${link_flags}) + else() + # special case for Visual Studio + set(compile_command ${CMAKE_C_COMPILER} ${src} /link "/out:${dst}") \ No newline at end of file -- 2.34.0