Сравнение pcsx2-1.7.4940-r1 с pcsx2-1.7.5033

/usr/portage/games-emulation/pcsx2/pcsx2-1.7.5033.ebuild 2023-10-09 14:52:31.088368390 +0300
9 9
	inherit git-r3
10 10
	EGIT_REPO_URI="https://github.com/PCSX2/pcsx2.git"
11 11
else
12
	HASH_FASTFLOAT=32d21dcecb404514f94fb58660b8029a4673c2c1
13
	HASH_FMT=b6f4ceaed0a0a24ccf575fab6c56dd50ccf6f1a9
14
	HASH_RCHEEVOS=3af1e2fc5188d6e932ee379942f4049ea877e648
15
	HASH_GLSLANG=c9706bdda0ac22b9856f1aa8261e5b9e15cd20c5
16
	HASH_VULKAN=9f4c61a31435a7a90a314fc68aeb386c92a09c0f
17
	SRC_URI="
18
		https://github.com/PCSX2/pcsx2/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz
19
		https://github.com/fastfloat/fast_float/archive/${HASH_FASTFLOAT}.tar.gz
20
			-> ${PN}-fast_float-${HASH_FASTFLOAT::10}.tar.gz
21
		https://github.com/fmtlib/fmt/archive/${HASH_FMT}.tar.gz
22
			-> ${PN}-fmt-${HASH_FMT::10}.tar.gz
23
		https://github.com/RetroAchievements/rcheevos/archive/${HASH_RCHEEVOS}.tar.gz
24
			-> ${PN}-rcheevos-${HASH_RCHEEVOS::10}.tar.gz
25
		vulkan? (
26
			https://github.com/KhronosGroup/glslang/archive/${HASH_GLSLANG}.tar.gz
27
				-> ${PN}-glslang-${HASH_GLSLANG::10}.tar.gz
28
			https://github.com/KhronosGroup/Vulkan-Headers/archive/${HASH_VULKAN}.tar.gz
29
				-> ${PN}-vulkan-headers-${HASH_VULKAN::10}.tar.gz
30
		)
31
	"
12
	# formerly was attempting to unbundle most, but upstream dropped every
13
	# checks for alternatively using system's and keeping this up has become
14
	# unmaintainable, and to simplify now also using tarballs with submodules
15
	SRC_URI="https://dev.gentoo.org/~ionen/distfiles/${P}.tar.xz"
32 16
	KEYWORDS="-* ~amd64"
33 17
fi
34 18

  
......
40 24
	ISC LGPL-2.1+ LGPL-3+ MIT OFL-1.1 ZLIB public-domain
41 25
"
42 26
SLOT="0"
43
IUSE="alsa cpu_flags_x86_sse4_1 dbus jack pulseaudio sndio test vulkan wayland"
27
IUSE="alsa cpu_flags_x86_sse4_1 jack pulseaudio sndio test vulkan wayland"
44 28
REQUIRED_USE="cpu_flags_x86_sse4_1" # dies at runtime if no support
45 29
RESTRICT="!test? ( test )"
46 30

  
47 31
# dlopen: qtsvg, vulkan-loader, wayland
48 32
COMMON_DEPEND="
49 33
	app-arch/xz-utils
50
	app-arch/zstd:=
51
	dev-cpp/rapidyaml:=
52 34
	dev-libs/libaio
53
	dev-libs/libchdr
54
	dev-libs/libzip:=[zstd]
55 35
	dev-qt/qtbase:6[gui,network,widgets]
56 36
	dev-qt/qtsvg:6
57 37
	media-libs/libglvnd
58 38
	media-libs/libpng:=
59
	>=media-libs/libsdl2-2.0.22[haptic,joystick]
39
	>=media-libs/libsdl2-2.28.2[haptic,joystick]
60 40
	media-video/ffmpeg:=
61 41
	net-libs/libpcap
62 42
	net-misc/curl
43
	sys-apps/dbus
63 44
	sys-libs/zlib:=
64 45
	virtual/libudev:=
65 46
	x11-libs/libXrandr
66 47
	alsa? ( media-libs/alsa-lib )
67
	dbus? ( sys-apps/dbus )
68 48
	jack? ( virtual/jack )
69 49
	pulseaudio? ( media-libs/libpulse )
70 50
	sndio? ( media-sound/sndio:= )
......
75 55
# is missing and it is fairly small (installs a ~1.5MB patches.zip)
76 56
RDEPEND="
77 57
	${COMMON_DEPEND}
78
	<games-emulation/pcsx2_patches-0_p20230917
58
	>=games-emulation/pcsx2_patches-0_p20230917
79 59
"
80 60
DEPEND="
81 61
	${COMMON_DEPEND}
82 62
	x11-base/xorg-proto
83
	test? ( dev-cpp/gtest )
84 63
"
85 64
BDEPEND="
86 65
	dev-qt/qttools:6[linguist]
......
90 69
	)
91 70
"
92 71

  
93
FILECAPS=(
94
	-m 0755 "CAP_NET_RAW+eip CAP_NET_ADMIN+eip" usr/bin/pcsx2
95
)
96

  
97 72
PATCHES=(
98 73
	"${FILESDIR}"/${PN}-1.7.3468-cubeb-automagic.patch
99 74
	"${FILESDIR}"/${PN}-1.7.3773-lto.patch
100 75
	"${FILESDIR}"/${PN}-1.7.4667-flags.patch
101
	"${FILESDIR}"/${PN}-1.7.4667-system-chdr.patch
102
	"${FILESDIR}"/${PN}-1.7.4667-system-gtest.patch
103
	"${FILESDIR}"/${PN}-1.7.4667-system-zstd.patch
104
	"${FILESDIR}"/${PN}-1.7.4795-rapidyaml-0.5.patch
105 76
)
106 77

  
107
src_unpack() {
108
	if [[ ${PV} == 9999 ]]; then
109
		local EGIT_SUBMODULES=(
110
			# libfmt is volatile and upstream is unlikely to make fixes for
111
			# latest system copy punctually (may revisit this eventually)
112
			3rdparty/fmt/fmt
113

  
114
			# has no build system and is not really setup for unbundling
115
			3rdparty/rcheevos/rcheevos
116

  
117
			# system rapidyaml is still used, but this uses another part
118
			# of the source directly (fast_float) and so allow the submodule
119
			# https://github.com/PCSX2/pcsx2/commit/af646e449
120
			3rdparty/rapidyaml/rapidyaml
121
			3rdparty/rapidyaml/rapidyaml/extern/c4core
122
			3rdparty/rapidyaml/rapidyaml/ext/c4core/src/c4/ext/fast_float
123

  
124
			# glslang can be troublesome to unbundle (bug #831217),
125
			# also keep vulkan-headers to stay in sync
126
			$(usev vulkan '
127
				3rdparty/glslang/glslang
128
				3rdparty/vulkan-headers
129
			')
130
		)
131

  
132
		git-r3_src_unpack
133
	else
134
		default
135

  
136
		mkdir -p "${S}"/3rdparty/rapidyaml/rapidyaml/ext/c4core/src/c4/ext || die
137
		mv fast_float-${HASH_FASTFLOAT} \
138
			"${S}"/3rdparty/rapidyaml/rapidyaml/ext/c4core/src/c4/ext/fast_float || die
139

  
140
		rmdir "${S}"/3rdparty/fmt/fmt || die
141
		mv fmt-${HASH_FMT} "${S}"/3rdparty/fmt/fmt || die
142

  
143
		rmdir "${S}"/3rdparty/rcheevos/rcheevos || die
144
		mv rcheevos-${HASH_RCHEEVOS} "${S}"/3rdparty/rcheevos/rcheevos || die
145

  
146
		if use vulkan; then
147
			rmdir "${S}"/3rdparty/{glslang/glslang,vulkan-headers} || die
148
			mv glslang-${HASH_GLSLANG} "${S}"/3rdparty/glslang/glslang || die
149
			mv Vulkan-Headers-${HASH_VULKAN} "${S}"/3rdparty/vulkan-headers || die
150
		fi
151
	fi
152
}
153

  
154 78
src_prepare() {
155 79
	cmake_src_prepare
156 80

  
157
	sed -e "/AppRoot =/s|=.*|= \"${EPREFIX}/usr/share/${PN}\";|" \
158
		-i pcsx2/Pcsx2Config.cpp || die
159

  
160 81
	if [[ ${PV} != 9999 ]]; then
161 82
		sed -e '/set(PCSX2_GIT_TAG "")/s/""/"v'${PV}-gentoo'"/' \
162 83
			-i cmake/Pcsx2Utils.cmake || die
163

  
164
		# delete all 3rdparty/* except known-used ones in non-live
165
		local keep=(
166
			# TODO?: rapidjson and xbyak are packaged and could be unbundlable
167
			# w/ patch, and discord-rpc be optional w/ dependency on rapidjson
168
			cpuinfo cubeb demangler discord-rpc fmt glad imgui include jpgd
169
			lzma rapidjson rapidyaml rcheevos simpleini soundtouch xbyak zydis
170
			$(usev vulkan 'glslang vulkan-headers')
171
		)
172
		find 3rdparty -mindepth 1 -maxdepth 1 -type d \
173
			-not \( -false ${keep[*]/#/-o -name } \) -exec rm -r {} + || die
174 84
	fi
175 85
}
176 86

  
......
180 90
		append-flags -fno-strict-aliasing
181 91

  
182 92
		# odr violations in pcsx2's vulkan code, disabling as a safety for now
183
		# (vulkan support tend to receive major changes, is more on WIP side)
184 93
		filter-lto
185 94
	fi
186 95

  
187 96
	local mycmakeargs=(
188 97
		-DBUILD_SHARED_LIBS=no
189
		-DDBUS_API=$(usex dbus)
190 98
		-DDISABLE_BUILD_DATE=yes
191 99
		-DENABLE_TESTS=$(usex test)
192 100
		-DUSE_LINKED_FFMPEG=yes
193 101
		-DUSE_VTUNE=no
194 102
		-DUSE_VULKAN=$(usex vulkan)
195 103
		-DWAYLAND_API=$(usex wayland)
196
		-DX11_API=yes # fails if X libs are missing even if disabled
197

  
198
		# note that the current upstream is somewhat hostile to using system
199
		# libs, system installs, or any modifications and may disregard any
200
		# bugs that is not reproducible with the appimage using bundled libs
201
		-DUSE_SYSTEM_LIBS=yes
202
		-DUSE_SYSTEM_FMT=no # volatile, keep bundled at least "for now"
104
		-DX11_API=yes # X libs are currently hard-required either way
203 105

  
204 106
		# sse4.1 is the bare minimum required, -m is required at build time
205 107
		# (see PCSX2Base.h) and it dies if no support at runtime (AppInit.cpp)
......
225 127
}
226 128

  
227 129
src_install() {
228
	newbin "${BUILD_DIR}"/bin/pcsx2-qt ${PN}
130
	insinto /usr/lib/${PN}
131
	doins -r "${BUILD_DIR}"/bin/.
229 132

  
230
	insinto /usr/share/${PN}
231
	doins -r "${BUILD_DIR}"/bin/resources
232

  
233
	dodoc README.md bin/docs/{Debugger.pdf,GameIndex.pdf,debugger.txt}
133
	fperms +x /usr/lib/${PN}/pcsx2-qt
134
	dosym -r /usr/lib/${PN}/pcsx2-qt /usr/bin/${PN}
234 135

  
235 136
	newicon bin/resources/icons/AppIconLarge.png ${PN}.png
236 137
	make_desktop_entry ${PN} ${PN^^}
138

  
139
	dodoc README.md bin/docs/{Debugger.pdf,GameIndex.pdf,debugger.txt}
140

  
141
	use !test || rm "${ED}"/usr/lib/${PN}/*_test || die
237 142
}
238 143

  
239 144
pkg_postinst() {
240
	fcaps_pkg_postinst
145
	fcaps -m 0755 cap_net_admin,cap_net_raw=eip usr/lib/${PN}/pcsx2-qt
241 146

  
242
	local replacing=
243
	if [[ ${REPLACING_VERSIONS##* } ]]; then
244
		if ver_test ${REPLACING_VERSIONS##* } -lt 1.6.1; then
245
			replacing=old
246
		elif ver_test ${REPLACING_VERSIONS##* } -lt 1.7.3773; then
247
			replacing=wx
248
		else
249
			replacing=any
250
		fi
251
	fi
252

  
253
	if [[ ${replacing} == old ]]; then
147
	if [[ ${REPLACING_VERSIONS##* } ]] &&
148
		ver_test ${REPLACING_VERSIONS##* } -lt 1.7; then
149
		elog ">=${PN}-1.7 has received several changes since <=${PN}-1.6.0, and is"
150
		elog "notably now a 64bit build using Qt6. Just-in-case it is recommended"
151
		elog "to backup configs, save states, and memory cards before using."
254 152
		elog
255
		elog ">=${PN}-1.7 has received several changes since <=${PN}-1.6.0, notably"
256
		elog "it is now a 64bit build using Qt6. Just-in-case it is recommended to"
257
		elog "backup your configs, save states, and memory cards before use."
258 153
		elog "The executable was also renamed from 'PCSX2' to 'pcsx2'."
259 154
	fi
260

  
261
	if [[ ${replacing} == @(|old) && ${PV} != 9999 ]]; then
262
		elog
263
		elog "${PN}-1.7.x is a development branch where .x increments every changes."
264
		elog "Stable 1.6.0 is getting old and lacks many notable features (e.g. native"
265
		elog "64bit builds). Given it may be a long time before there is a new stable,"
266
		elog "Gentoo will carry and update 1.7.x roughly every months."
267
		elog
268
		elog "Please report an issue if feel a picked version needs to be updated ahead"
269
		elog "of time or masked (notably for handling regressions)."
270
	fi
271

  
272
	if [[ ${replacing} == wx ]]; then
273
		ewarn
274
		ewarn "Note that wxGTK support been dropped upstream since >=${PN}-1.7.3773,"
275
		ewarn "and so USE=qt6 is gone and Qt6 is now always used."
276
	fi
277 155
}
Спасибо!