summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: b3b3bcdb832eb939d15cf41dd0ac3404225af81c (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: Sébastien TERRIER <ouinouin at ouinouin dot eu>
_pkgname=citron
_pkgver=v0.3-canary-refresh
pkgname=citron
pkgver=0.3
pkgrel=1
pkgdesc="Nintendo Switch emulator forked from yuzu."
arch=(x86_64)
url=https://citron-emu.org
license=(GPL-2.0-or-later)
provides=('citron')
depends=('qt6-base' 'qt6-webengine' 'qt6-multimedia' 'qt6-wayland' 'ffmpeg' 'sdl2' 'gamemode' 'hicolor-icon-theme' 'brotli' 'libusb')
makedepends=('curl' 'git' 'boost' 'catch2' 'cmake' 'clang' 'fmt' 'doxygen' 'python-pip' 'glslang' 'libzip' 'lz4' 'mbedtls' 'ninja' 'nlohmann-json' 'zip' 'unzip' 'libzip')
conflicts=('citron')
options=(!debug lto)
source=(
  citron::git+https://git.citron-emu.org/Citron/Citron.git#tag=$_pkgver
  #patch-arm-dynarmic::https://git.citron-emu.org/Citron/Citron/commit/d4d3061eb78fdba50201613271688a1dcd231ef4.patch
  git+https://github.com/lsalzman/enet.git
  git+https://github.com/mozilla/cubeb.git
  git+https://github.com/yuzu-mirror/dynarmic.git
  git+https://github.com/libusb/libusb.git
  git+https://github.com/yuzu-mirror/discord-rpc.git
  git+https://github.com/KhronosGroup/Vulkan-Headers.git
  git+https://github.com/yuzu-mirror/sirit.git
  git+https://github.com/yuzu-mirror/mbedtls.git
  git+https://github.com/herumi/xbyak.git
  git+https://github.com/xiph/opus.git
  git+https://github.com/libsdl-org/SDL.git
  git+https://github.com/yhirose/cpp-httplib.git
  ffmpeg::git+https://github.com/FFmpeg/FFmpeg.git
  git+https://github.com/microsoft/vcpkg.git
  git+https://github.com/arun11299/cpp-jwt.git
  git+https://github.com/bylaws/libadrenotools.git
  git+https://github.com/lat9nq/tzdb_to_nx.git
  git+https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator.git
  git+https://github.com/yuzu-mirror/breakpad.git
  git+https://github.com/brofield/simpleini.git
  git+https://github.com/yuzu-mirror/oaknut
  git+https://github.com/KhronosGroup/Vulkan-Utility-Libraries.git
  git+https://github.com/google/googletest.git
  git+https://github.com/arsenm/sanitizers-cmake.git
  git+https://github.com/eggert/tz.git
  git+https://github.com/KhronosGroup/SPIRV-Headers.git
)
b2sums=('SKIP'
        'SKIP'
        'SKIP'
        'SKIP'
        'SKIP'
        'SKIP'
        'SKIP'
        'SKIP'
        'SKIP'
        'SKIP'
        'SKIP'
        'SKIP'
        'SKIP'
        'SKIP'
        'SKIP'
        'SKIP'
        'SKIP'
        'SKIP'
        'SKIP'
        'SKIP'
        'SKIP'
        'SKIP'
        'SKIP'
	'SKIP'
	'SKIP'
	'SKIP'
	'SKIP')

prepare() {
  cd "$srcdir/$_pkgname"
  for submodule in {enet,cubeb,dynarmic,libusb,discord-rpc,Vulkan-Headers,sirit,mbedtls,xbyak,opus,SDL,cpp-httplib,ffmpeg,vcpkg,cpp-jwt,libadrenotools,tzdb_to_nx,VulkanMemoryAllocator,breakpad,simpleini,oaknut,Vulkan-Utility-Libraries};
  do
    git config --file=.gitmodules submodule.$submodule.url "${srcdir}"/$submodule
  done
  git -c protocol.file.allow=always submodule update --init

  pushd externals/cubeb
  for submodule in {sanitiers-cmake,googletest};
  do
  git config --file=.gitmodules submodule.$submodule.url "${srcdir}"/$submodule
  done
  git -c protocol.file.allow=always submodule update --init
  popd

  pushd externals/libadrenotools
  git config submodule.lib/linkersbypass.url "${srcdir}"/linkernsbypass
  git -c protocol.file.allow=always submodule update
  popd

  pushd externals/nx_tzdb/tzdb_to_nx
  git config submodule.externals/tz/tz.url "${srcdir}"/tz
  git -c protocol.file.allow=always submodule update
  popd
  
  pushd externals/sirit/externals
  git config submodule.externals/SPIRV-Headers.url "${srcdir}"/SPIRV-Headers
  git -c protocol.file.allow=always submodule update
  popd
}

build() {
  cd "$srcdir/$_pkgname"
  
  cmake -B build -GNinja \
    -DCITRON_USE_BUNDLED_VCPKG=ON \
    -DCITRON_USE_BUNDLED_QT=OFF \
    -DCITRON_USE_BUNDLED_FFMPEG=OFF \
    -DCITRON_TESTS=OFF \
    -DCITRON_USE_LLVM_DEMANGLE=OFF \
    -DCITRON_ENABLE_LTO=ON \
    -DCITRON_USE_QT_MULTIMEDIA=ON \
    -DCITRON_USE_QT_WEB_ENGINE=ON \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DCMAKE_C_FLAGS="-march=x86-64-v2" \
    -DCMAKE_CXX_FLAGS="-march=x86-64-v2"
  ninja -C build
} 

package() {
  DESTDIR="$pkgdir/" ninja -C "$srcdir/$_pkgname"/build install

}