summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 86be535ba2f54f3a2d5bdcbe4f12af39c81f1940 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
# Maintainer: Mark Wagie <mark dot wagie at proton dot me>
# Contributor: Igor Dyatlov <dyatlov.igor@protonmail.com>
# Contributor: Balló György <ballogyor+arch at gmail dot com>
# Contributor: Tom Richards <tom@tomrichards.net>
pkgname=highscore
pkgver=40.0
pkgrel=6
pkgdesc="A retro gaming application for the GNOME desktop"
arch=('x86_64' 'aarch64')
url="https://wiki.gnome.org/Apps/Games"
license=('GPL-3.0-or-later')
depends=(
  'cairo'
  'dconf'
  'gdk-pixbuf2'
  'glib2'
  'glibc'
  'grilo'
  'gtk3'
  'hicolor-icon-theme'
  'libarchive'
  'libhandy'
  'libmanette'
  'librsvg'
  'libsoup3'
  'libxml2'
  'retro-gtk'
  'sqlite'
  'tracker3'
)
makedepends=('git' 'meson' 'vala')
checkdepends=('appstream-glib')
optdepends=(
  'libretro-beetle-ngp: Support for Neo Geo Pocket and Neo Geo Pocket Color games'
  'libretro-beetle-pce-fast: NEC PC Engine/CD core'
  'libretro-beetle-pce: NEC PC Engine/SuperGrafx/CD core'
  'libretro-beetle-psx-hw: Sony PlayStation core'
  'libretro-beetle-psx: Sony PlayStation core'
#  'libretro-beetle-vb: Support for Virtual Boy games'
#  'libretro-beetle-wswan: Support for WonderSwan and WonderSwan Color games'
  'libretro-beetle-supergrafx: NEC SuperGrafx core'
  'libretro-blastem: Sega Mega Drive core'
  'libretro-bsnes-hd: Super Nintendo Entertainment System core'
#  'libretro-bsnes-mercury-balanced: Support for Super Nintendo Entertainment System games'
  'libretro-bsnes2014: Super Nintendo Entertainment System cores'
  'libretro-bsnes: Super Nintendo Entertainment System cores'
  'libretro-citra: Nintendo 3DS core'
  'libretro-core-info: Libretro core info files'
  'libretro-desmume: Nintendo DS core'
#  'libretro-desmume2015: Support for Nintendo DS games'
  'libretro-dolphin: Nintendo GC/Wii core'
#  'libretro-duckstation: Sony PlayStation core'
  'libretro-flycast: Sega Dreamcast core'
  'libretro-gambatte: Nintendo Game Boy/Game Boy Color core'
#  'libretro-gearsystem: Support for Game Gear, Master System and SG-1000 games'
  'libretro-genesis-plus-gx: Sega MS/GG/MD/CD core'
#  'libretro-handy: Support for Atari Lynx games'
  'libretro-kronos: Sega Saturn core'
  'libretro-melonds: Nintendo DS core'
  'libretro-mesen-s: Super Nintendo Entertainment System core'
  'libretro-mesen: Nintendo Entertainment System core'
  'libretro-mgba: Nintendo Game Boy Advance core'
  'libretro-mupen64plus-next: Nintendo 64 core'
  'libretro-nestopia: Nintendo Entertainment System core'
  'libretro-overlays: Collection of overlays for libretro'
  'libretro-parallel-n64: Nintendo 64 core'
  'libretro-pcsx2: Sony PlayStation 2 core'
  'libretro-picodrive: Sega MS/MD/CD/32X core'
  'libretro-play: Sony PlayStation 2 core'
  'libretro-ppsspp: Sony PlayStation Portable core'
#  'libretro-prosystem: Support for Atari 7800 games'
  'libretro-retrodream: Sega Dreamcast core'
  'libretro-sameboy: Nintendo Game Boy/Game Boy Color core'
  'libretro-scummvm: ScummVM core'
  'libretro-shaders-slang: Collection of shaders for libretro'
  'libretro-snes9x: Super Nintendo Entertainment System core'
#  'libretro-stella2014: Support for Atari 2600 games'
  'libretro-yabause: Sega Saturn core'
  'retroarch: Reference frontend for the libretro API'
)
provides=('gnome-games')
conflicts=('gnome-games')
source=("https://gitlab.gnome.org/World/highscore/-/archive/$pkgver/$pkgname-$pkgver.tar.gz"
        'tracker3.patch'
        'meson-0.60.patch'
        'libsoup3.patch')
sha512sums=('39e1abfe4dae8a349449d8a42070a5f1eb9e7556c5857477ef24213710aff09faebffd0e77ce1aaf22f65ea3e7d057c6f8b590810dcab97324f8772dd22a31fa'
            'b7e60604171b3189cd38cbfdb165d29d524a9f08c807fef7dccf251b52a745d60cfadafc86e305634c2313f04989664e26d0483cd86fb51ea176ecff47e38967'
            '714e7cabbb45b63eddccfe295976a29bc85b577c2040a55903b84a2270fa7b63621cbed50c0bfecf1f17a8a8eb28d98e0a3f7c611ba30a97b62a44ffd6566340'
            'd02a285893435d741569df8a4f9ecc5416212e239393784d3b69ec50ad8f7f13448a8478be7ac8cad17cd8692f796001b05d60eaa384d24ca40cbbaa662bbea9')

prepare() {
  cd "$pkgname-$pkgver"

  # Port to Tracker 3
  patch -Np1 -i ../tracker3.patch

  # Fix build with meson 0.60 (Alpine)
  patch -p1 -i ../meson-0.60.patch

  # Port to libsoup3 (Alpine)
  patch -p1 -i ../libsoup3.patch

  # Replace pcsx_rearmed with mednafen_psx
  mv flatpak/libretro-cores/{pcsx_rearmed,mednafen_psx}.libretro
  sed -i 's/^Name=.*/Name=Beetle PSX/
          s/^Module=.*/Module=mednafen_psx_libretro.so/
          s/^Authors=.*/Authors=Mednafen Team;/' \
    flatpak/libretro-cores/mednafen_psx.libretro
}

build() {
  arch-meson "$pkgname-$pkgver" build
  meson compile -C build
}

check() {
  meson test -C build --print-errorlogs
}

package() {
  meson install -C build --destdir "$pkgdir"

  # Install *.libretro files
  cd "$pkgname-$pkgver"
  install -Dm644 flatpak/libretro-cores/*.libretro -t "$pkgdir/usr/lib/libretro/"
}