projects/guix·blob python-team · refs

155 lines · 5.5 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2018, 2025 宋文武 <[email protected]>
3;;; Copyright © 2019–2021 Tobias Geerinckx-Rice <[email protected]>
4;;; Copyright © 2020 Efraim Flashner <[email protected]>
5;;; Copyright © 2024 gemmaro <[email protected]>
6;;;
7;;; This file is part of GNU Guix.
8;;;
9;;; GNU Guix is free software; you can redistribute it and/or modify it
10;;; under the terms of the GNU General Public License as published by
11;;; the Free Software Foundation; either version 3 of the License, or (at
12;;; your option) any later version.
13;;;
14;;; GNU Guix is distributed in the hope that it will be useful, but
15;;; WITHOUT ANY WARRANTY; without even the implied warranty of
16;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17;;; GNU General Public License for more details.
18;;;
19;;; You should have received a copy of the GNU General Public License
20;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
21
22(define-module (gnu packages easyrpg)
23 #:use-module (guix gexp)
24 #:use-module (guix packages)
25 #:use-module ((guix licenses) #:prefix license:)
26 #:use-module (guix download)
27 #:use-module (guix git-download)
28 #:use-module (guix build-system cmake)
29 #:use-module (guix build-system gnu)
30 #:use-module (gnu packages audio)
31 #:use-module (gnu packages compression)
32 #:use-module (gnu packages fontutils)
33 #:use-module (gnu packages gtk)
34 #:use-module (gnu packages icu4c)
35 #:use-module (gnu packages image)
36 #:use-module (gnu packages linux)
37 #:use-module (gnu packages mp3)
38 #:use-module (gnu packages pkg-config)
39 #:use-module (gnu packages pretty-print)
40 #:use-module (gnu packages pulseaudio)
41 #:use-module (gnu packages sdl)
42 #:use-module (gnu packages xdisorg)
43 #:use-module (gnu packages xiph)
44 #:use-module (gnu packages xml))
45
46(define-public liblcf
47 (package
48 (name "liblcf")
49 (version "0.8.1")
50 (source (origin
51 (method url-fetch)
52 (uri (string-append
53 "https://easyrpg.org/downloads/player/" version
54 "/liblcf-" version ".tar.gz"))
55 (sha256
56 (base32
57 "1b68yhs14b4ql1wfbm0jzklyqyi3b2wm3pm9zhx0ij2a98c8cnli"))))
58 (build-system gnu-build-system)
59 (native-inputs
60 (list pkg-config))
61 (propagated-inputs
62 ;; Required by 'liblcf.pc'.
63 (list expat icu4c libinih))
64 (home-page "https://easyrpg.org/")
65 (synopsis "Library to handle RPG Maker 2000 and 2003 game data")
66 (description
67 "@code{liblcf} is a library to handle RPG Maker 2000 and 2003 game data.
68It can read and write LCF and XML files.")
69 ;; It includes a copy of span-lite (boost-1.0):
70 ;; src/lcf/third_party/span.h
71 (license license:expat)))
72
73(define-public easyrpg-player
74 (package
75 (name "easyrpg-player")
76 (version "0.8.1.1")
77 (source (origin
78 (method url-fetch)
79 (uri (string-append
80 "https://easyrpg.org/downloads/player/" version
81 "/easyrpg-player-" version ".tar.gz"))
82 (sha256
83 (base32
84 "0aa60568cvhxf93065wn2r6js7xh81vhsl2nw3bhs5g3l1smq28z"))))
85 (build-system gnu-build-system)
86 (arguments
87 '(#:configure-flags
88 (list "--enable-fmmidi"
89 (string-append "--with-bash-completion-dir="
90 %output "/etc/bash_completion.d/"))))
91 (native-inputs
92 (list pkg-config))
93 (inputs
94 (list fluidsynth
95 fmt
96 freetype
97 harfbuzz
98 liblcf
99 libpng
100 libsndfile
101 libvorbis
102 libxmp
103 libmpg123
104 opusfile
105 pixman
106 sdl2
107 speexdsp
108 wildmidi
109 zlib))
110 (home-page "https://easyrpg.org/")
111 (synopsis "Play RPG Maker 2000 and 2003 games")
112 (description
113 "EasyRPG Player is a game interpreter to play RPG Maker 2000, 2003 and
114EasyRPG games. It uses the LCF parser library (liblcf) to read RPG Maker game
115data.")
116 ;; It bundles FMMidi YM2608 FM synthesizer emulator (bsd-3):
117 ;; src/midisynth.h
118 ;; src/midisynth.cpp
119 ;; and WAV audio loader and writer (public-domain):
120 ;; src/external/dr_wav.h
121 (license license:gpl3+)))
122
123(define-public libretro-easyrpg
124 (let ((libretro-common
125 (origin
126 (method git-fetch)
127 (uri (git-reference
128 (url "https://github.com/libretro/libretro-common")
129 (commit "668749ae38a9e85744d1c15a652a1e8db8ab9e82")))
130 (file-name "libretro-common-checkout")
131 (sha256
132 (base32
133 "007hd1ys3ikyjx4zigkxl2h0172p7d9p9vj09739yqfkvxkwlbl2")))))
134 (package
135 (inherit easyrpg-player)
136 (name "libretro-easyrpg")
137 (source (origin
138 (inherit (package-source easyrpg-player))
139 (modules '((guix build utils)))
140 (snippet
141 #~(begin
142 (copy-recursively #$libretro-common
143 "builds/libretro/libretro-common")))))
144 (build-system cmake-build-system)
145 (arguments
146 (list #:tests? #f ;no tests
147 #:configure-flags #~'("-DPLAYER_TARGET_PLATFORM=libretro")
148 #:phases
149 #~(modify-phases %standard-phases
150 (replace 'install
151 (lambda _
152 (install-file
153 "easyrpg_libretro.so"
154 (string-append #$output "/lib/libretro/")))))))
155 (synopsis "Libretro core to play RPG Maker 2000 and 2003 games"))))