--- file_not_specified_in_diff
+++ file_not_specified_in_diff
@@ -, +, @@
--- a/games-emulation/pcsx2/pcsx2-9999.ebuild
+++ b/games-emulation/pcsx2/pcsx2-9999.ebuild
@@ -1,7 +1,7 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
WX_GTK_VER="3.0-gtk3"
inherit cmake fcaps flag-o-matic git-r3 toolchain-funcs wxwidgets
@@ -10,9 +10,7 @@ DESCRIPTION="A PlayStation 2 emulator"
HOMEPAGE="https://pcsx2.net/"
EGIT_REPO_URI="https://github.com/PCSX2/${PN}.git"
EGIT_SUBMODULES=(
- 3rdparty/glslang/glslang # needs StandAlone/ResourceLimits.h
3rdparty/imgui/imgui # not made to be system-wide
- 3rdparty/vulkan-headers # to keep in sync with glslang
)
LICENSE="GPL-3 Apache-2.0 OFL-1.1" # TODO: needs review for a full list
@@ -30,6 +28,7 @@ RDEPEND="
dev-libs/libchdr
>=dev-libs/libfmt-7.1.3:=
dev-libs/libxml2:2
+ dev-util/glslang
media-libs/alsa-lib
media-libs/cubeb
media-libs/freetype
@@ -80,6 +79,18 @@ src_prepare() {
# pulseaudio is only used for usb-mic, not audio output
use pulseaudio || > cmake/FindPulseAudio.cmake || die
+
+ # unbundle glslang
+ sed -i -e '/#include "StandAlone/{s:"StandAlone:/}' \
+ -e '/#include "SPIRV/{s:"SPIRV:/}' \
+ -e '/#include "glslang/{s:":<:;s/"/>/;s:$:\n#include "common/Vulkan/DefaultTBuiltInResource.h":}' \
+ -e 's/glslang::DefaultTBuiltInResource/DefaultTBuiltInResource/' \
+ common/Vulkan/ShaderCompiler.cpp || die
+ sed -i '/USE_VULKAN/,/endif()/d' cmake/SearchForStuff.cmake || die
+ cp "${FILESDIR}"/DefaultTBuiltInResource.h common/Vulkan/ || die
+ sed -i -e '/USE_VULKAN)/afind_library(GLSLANG libglslang.so)\nfind_library(SPIRV libSPIRV.so)' \
+ -e 's/Vulkan-Headers glslang/${GLSLANG} ${SPIRV}/' \
+ common/CMakeLists.txt || die
}
src_configure() {