mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-09 15:13:31 -04:00
games-emulation/flycast: build system, gitmodules
Signed-off-by: Samuel Bauer <samuel.bauer@yahoo.fr>
This commit is contained in:
@@ -10,7 +10,9 @@ inherit cmake flag-o-matic git-r3 lua-single xdg
|
||||
DESCRIPTION="Sega Dreamcast, Naomi and Atomiswave emulator"
|
||||
HOMEPAGE="https://github.com/flyinghead/flycast"
|
||||
EGIT_REPO_URI="https://github.com/flyinghead/flycast"
|
||||
EGIT_SUBMODULES=( 'core/deps/breakpad' 'core/deps/luabridge' 'core/deps/rcheevos' 'core/deps/volk' 'core/deps/VulkanMemoryAllocator' )
|
||||
EGIT_SUBMODULES=( 'core/deps/asio' 'core/deps/breakpad' 'core/deps/libjuice' 'core/deps/libusb-cmake'
|
||||
'core/deps/luabridge' 'core/deps/DreamPicoPort-API' 'core/deps/rcheevos' 'core/deps/volk'
|
||||
'core/deps/xbyak' 'core/deps/VulkanMemoryAllocator' )
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
@@ -19,6 +21,7 @@ IUSE="alsa ao lua opengl +openmp pulseaudio vulkan"
|
||||
|
||||
DEPEND="
|
||||
dev-cpp/asio
|
||||
dev-cpp/websocketpp
|
||||
dev-libs/libchdr
|
||||
dev-libs/libzip
|
||||
dev-libs/xxhash
|
||||
@@ -69,12 +72,8 @@ src_prepare() {
|
||||
sed -i -e '/XXHASH_BUILD_XXHSUM/{N;N;s/.*/target_link_libraries(${PROJECT_NAME} PRIVATE xxhash)/}' \
|
||||
CMakeLists.txt || die
|
||||
|
||||
# Unbundle chdr
|
||||
sed -i -e '/add_subdirectory.*chdr/d' -e 's/chdr-static/chdr/' \
|
||||
-e 's:core/deps/chdr/include:/usr/include/chdr:' CMakeLists.txt || die
|
||||
|
||||
# Do not use ccache
|
||||
sed -i -e '/find_program(CCACHE_FOUND/d' CMakeLists.txt
|
||||
sed -i -e '/find_program(CCACHE_PROGRAM/d' CMakeLists.txt
|
||||
|
||||
# Vulkan-header
|
||||
sed -i -e '/add_subdirectory(core.*Vulkan-Headers)$/,/Vulkan::Headers/d' \
|
||||
@@ -83,18 +82,14 @@ src_prepare() {
|
||||
core/rend/vulkan/compiler.cpp
|
||||
if use vulkan; then
|
||||
sed -i -e '$atarget_link_libraries(${PROJECT_NAME} PRIVATE glslang glslang-default-resource-limits)' CMakeLists.txt
|
||||
if has_version >=dev-util/glslang-1.3.261; then
|
||||
sed -i -e 's/throwResultException/detail::throwResultException/' core/rend/vulkan/vmallocator.{h,cpp}
|
||||
fi
|
||||
sed -i -e 's/throwResultException/detail::throwResultException/' core/rend/vulkan/vmallocator.{h,cpp}
|
||||
grep -rl 'vk::resultCheck' | xargs sed -i -e 's/vk::resultCheck/vk::detail::resultCheck/g'
|
||||
grep -rl 'vk::DynamicLoader' | xargs sed -i -e 's/vk::DynamicLoader/vk::detail::DynamicLoader/g'
|
||||
sed -i -e '/end\/transform_matrix.h/a#include <set>' core/rend/vulkan/vulkan_context.cpp || die
|
||||
fi
|
||||
|
||||
# Do not use ccache
|
||||
sed -i -e '/find_program(CCACHE_PROGRAM ccache)/d' CMakeLists.txt
|
||||
|
||||
# Unbundle SDL under linux: (revert crazy commit: #4408aa7)
|
||||
sed -i -e '/if(NOT APPLE AND (/s/.*/if( NOT APPLE )/' CMakeLists.txt
|
||||
sed -i -e '/USE_HOST_SDL_DEFAULT/s/OFF/ON/' CMakeLists.txt
|
||||
|
||||
# Fix cmake version
|
||||
sed -i -e '/cmake_minimum_required/s/2.6.*$/3.20)/' core/deps/xbyak/CMakeLists.txt || die
|
||||
@@ -108,6 +103,7 @@ src_prepare() {
|
||||
src_configure() {
|
||||
local mycmakeargs=(
|
||||
-DBUILD_SHARED_LIBS=OFF
|
||||
-DUSE_HOST_LIBCHDR=ON
|
||||
-DUSE_OPENGL=$(usex opengl)
|
||||
-DUSE_OPENMP=$(usex openmp)
|
||||
-DUSE_VULKAN=$(usex vulkan)
|
||||
@@ -118,3 +114,8 @@ src_configure() {
|
||||
)
|
||||
cmake_src_configure
|
||||
}
|
||||
|
||||
src_install() {
|
||||
cmake_src_install
|
||||
rm -rf "${D}"/usr/$(get_libdir) "${D}"/usr/include
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user