From: Leo Prikler <leo.prikler@student.tugraz.at>
To: 41778@debbugs.gnu.org
Subject: [bug#41778] [PATCH 2/2] gnu: Add ppsspp.
Date: Tue, 9 Jun 2020 23:47:20 +0200 [thread overview]
Message-ID: <20200609214720.19041-2-leo.prikler@student.tugraz.at> (raw)
In-Reply-To: <20200609214720.19041-1-leo.prikler@student.tugraz.at>
* gnu/packages/emulators.scm (ppsspp): New variable.
---
gnu/packages/emulators.scm | 115 +++++++++++++++++++++++++++++++++++++
1 file changed, 115 insertions(+)
diff --git a/gnu/packages/emulators.scm b/gnu/packages/emulators.scm
index 9798ac370e..2e11807325 100644
--- a/gnu/packages/emulators.scm
+++ b/gnu/packages/emulators.scm
@@ -1622,3 +1622,118 @@ derived from Gens. Project goals include clean source code, combined features
from various forks of Gens, and improved platform portability.")
(supported-systems '("i686-linux" "x86_64-linux"))
(license license:gpl2+)))
+
+(define-public ppsspp
+ (package
+ (name "ppsspp")
+ (version "1.9.4")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/hrydgard/ppsspp.git")
+ (commit (string-append "v" version))))
+ (sha256
+ (base32
+ "0cbxrm7i4xymlglb2aqyiiys3wm6zvnrn5n0cw4fcxdvh196ivwm"))
+ (file-name (git-file-name name version))))
+ (build-system cmake-build-system)
+ (native-inputs
+ `(("python" ,python)))
+ (inputs
+ `(;; TODO: find a way to add FFMPEG
+ ;; ("ffmpeg" ,ffmpeg)
+ ;; TODO: unbundle builds
+ ("armips-source" ,(package-source armips))
+ ("glslang-source" ,(package-source glslang))
+ ("spirv-cross-source" ,(package-source spirv-cross))
+
+ ("lang"
+ ,(origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/hrydgard/ppsspp-lang.git")
+ (commit "3a5eb3fcb4852cb28c9138e78492effa0c227253")))
+ (sha256
+ (base32
+ "0cnv9g5l75dmdb0hq7xxbxl06z18p1621j41bggfqj1015kvq7jk"))))
+ ("tests"
+ ,(origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/hrydgard/pspautotests.git")
+ (commit "2970fbcc23c258ebc03bba922926003fe37555e5")))
+ (sha256
+ (base32
+ "1c3lkjhknwmiyikrfjrghfxnkd2jp698c28s4kwv6qjwdj2nwc1i"))))
+
+ ("glew" ,glew)
+ ("libpng" ,libpng)
+ ("mesa" ,mesa)
+ ("sdl2" ,sdl2)
+ ("snappy" ,snappy)
+ ("zlib" ,zlib)))
+ (arguments
+ `(#:out-of-source? #f
+ #:configure-flags (list "-DUSE_FFMPEG=OFF" ; see TODO above
+ "-DUSE_DISCORD=OFF"
+ ;; for testing
+ "-DUNITTEST=ON" "-DHEADLESS=ON")
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'add-external-sources
+ (lambda* (#:key inputs #:allow-other-keys)
+ ;; TODO: unbundle builds
+ ;; not only should we not copy these sources in,
+ ;; we should also remove as much from ext/ as we can
+ (copy-recursively (assoc-ref inputs "armips-source")
+ "ext/armips")
+ (copy-recursively (assoc-ref inputs "glslang-source")
+ "ext/glslang")
+ (copy-recursively (assoc-ref inputs "spirv-cross-source")
+ "ext/SPIRV-Cross")
+ ;; some tests are externalised, so we add them here
+ (copy-recursively (assoc-ref inputs "tests")
+ "pspautotests")
+ ;; i18n is externalised, so we add it here
+ (copy-recursively (assoc-ref inputs "lang")
+ "assets/lang")
+ #t))
+ (replace 'check
+ (lambda _
+ (for-each
+ (lambda (t) (invoke "./unitTest" t))
+ '("Arm64Emitter" "ArmEmitter" "X64Emitter" "VertexJit" "Asin"
+ "SinCos" "VFPUSinCos" "MathUtil" "Parsers" "Jit"
+ "MatrixTranspose" "ParseLBN" "QuickTexHash" "CLZ" "MemMap"))
+ (invoke "python3" "test.py" "-g")
+ #t))
+ (replace 'install
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (bin/ppsspp (string-append out "/bin/ppsspp"))
+ (share (string-append out "/share/ppsspp")))
+ (copy-recursively "icons/hicolor"
+ (string-append out "/share/icons/hicolor"))
+ (install-file "PPSSPPSDL" share)
+ (copy-recursively "assets" (string-append share "/assets"))
+
+ (make-desktop-entry-file
+ (string-append out "/share/applications/ppsspp.desktop")
+ #:name "PPSSPP"
+ #:exec (string-append share "/PPSSPPSDL")
+ #:icon "ppsspp")
+
+ (mkdir-p (string-append out "/bin"))
+ (with-output-to-file bin/ppsspp
+ (lambda ()
+ (format #t "#!~a~%exec ~a/PPSSPPSDL \"$@\""
+ (which "sh") share)))
+ (chmod bin/ppsspp #o755)
+
+ #t))))))
+ (home-page "https://www.ppsspp.org/")
+ (synopsis "PSP emulator")
+ (description
+ "PPSSPP is a \"high-level\" emulator simulating the PSP operating system.")
+ (license license:gpl2+)))
--
2.26.2
next prev parent reply other threads:[~2020-06-09 21:48 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-09 21:40 [bug#41778] [PATCH WIP 0/2] Add ppsspp Leo Prikler
2020-06-09 21:47 ` [bug#41778] [PATCH 1/2] gnu: Add armips Leo Prikler
2020-06-09 21:47 ` Leo Prikler [this message]
2020-06-29 10:02 ` [bug#41778] [PATCH 0/3] Add ppsspp Leo Prikler
2020-06-29 10:06 ` [bug#41778] [PATCH 1/3] gnu: Add armips Leo Prikler
2020-06-29 10:06 ` [bug#41778] [PATCH 2/3] gnu: add spirv-cross Leo Prikler
2020-06-29 10:06 ` [bug#41778] [PATCH 3/3] gnu: Add ppsspp Leo Prikler
2020-06-29 22:02 ` [bug#41778] [PATCH 0/3] " Nicolas Goaziou
2020-06-29 23:33 ` Leo Prikler
2020-06-30 15:08 ` bug#41778: " Nicolas Goaziou
2020-06-30 21:31 ` [bug#41778] " Leo Prikler
2020-07-01 10:15 ` Nicolas Goaziou
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=20200609214720.19041-2-leo.prikler@student.tugraz.at \
--to=leo.prikler@student.tugraz.at \
--cc=41778@debbugs.gnu.org \
/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).