summaryrefslogtreecommitdiff
path: root/gnu/packages/patches
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r--gnu/packages/patches/dolphin-emu-unbundle-tinygltf.patch67
-rw-r--r--gnu/packages/patches/dolphin-emu-unbundle-watcher.patch56
2 files changed, 46 insertions, 77 deletions
diff --git a/gnu/packages/patches/dolphin-emu-unbundle-tinygltf.patch b/gnu/packages/patches/dolphin-emu-unbundle-tinygltf.patch
index 1c91823785..8c6e954926 100644
--- a/gnu/packages/patches/dolphin-emu-unbundle-tinygltf.patch
+++ b/gnu/packages/patches/dolphin-emu-unbundle-tinygltf.patch
@@ -1,46 +1,9 @@
Upstream-status: https://github.com/dolphin-emu/dolphin/pull/13824
-diff --git a/CMake/DolphinLibraryTools.cmake b/CMake/DolphinLibraryTools.cmake
-index 4c395a8ef9..efa0d6a9e2 100644
---- a/CMake/DolphinLibraryTools.cmake
-+++ b/CMake/DolphinLibraryTools.cmake
-@@ -1,14 +1,3 @@
--# like add_library(new ALIAS old) but avoids add_library cannot create ALIAS target "new" because target "old" is imported but not globally visible. on older cmake
--# This can be replaced with a direct alias call once our minimum is cmake 3.18
--function(dolphin_alias_library new old)
-- string(REPLACE "::" "" library_no_namespace ${old})
-- if (NOT TARGET _alias_${library_no_namespace})
-- add_library(_alias_${library_no_namespace} INTERFACE)
-- target_link_libraries(_alias_${library_no_namespace} INTERFACE ${old})
-- endif()
-- add_library(${new} ALIAS _alias_${library_no_namespace})
--endfunction()
--
- # Makes an imported target if it doesn't exist. Useful for when find scripts from older versions of cmake don't make the targets you need
- function(dolphin_make_imported_target_if_missing target lib)
- if(${lib}_FOUND AND NOT TARGET ${target})
-@@ -85,7 +74,7 @@ function(dolphin_find_optional_system_library_pkgconfig library search alias bun
- endif()
- if(${library}_FOUND)
- message(STATUS "Using system ${library}")
-- dolphin_alias_library(${alias} PkgConfig::${library})
-+ add_library(${alias} ALIAS PkgConfig::${library})
- set(${library}_TYPE "System" PARENT_SCOPE)
- else()
- dolphin_add_bundled_library(${library} ${use_system} ${bundled_path})
diff --git a/CMakeLists.txt b/CMakeLists.txt
-index c277e2a10a..67b72179f3 100644
+index 964a33ac13..7779cf2eac 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
-@@ -1,7 +1,7 @@
- ########################################
- # General setup
- #
--cmake_minimum_required(VERSION 3.13)
-+cmake_minimum_required(VERSION 3.18)
-
- cmake_policy(SET CMP0079 NEW) # let target_link_libraries() link to a target defined in a different directory
- cmake_policy(SET CMP0080 OLD) # allow using BundleUtilities at configure time
@@ -657,7 +657,11 @@ add_subdirectory(Externals/glslang)
if(WIN32 OR APPLE)
add_subdirectory(Externals/spirv_cross)
@@ -48,7 +11,7 @@ index c277e2a10a..67b72179f3 100644
-add_subdirectory(Externals/tinygltf)
+
+dolphin_find_optional_system_library(TinyGLTF Externals/tinygltf)
-+if(NOT DEFINED tinygltf)
++if(NOT TARGET tinygltf)
+ add_library(tinygltf ALIAS tinygltf::tinygltf) # using system library
+endif()
@@ -65,6 +28,32 @@ index 0d86268bbe..9e6a99c6f8 100644
-target_include_directories(tinygltf INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})
+target_include_directories(tinygltf INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/tinygltf)
dolphin_disable_warnings(tinygltf)
+diff --git a/Externals/tinygltf/exports.props b/Externals/tinygltf/exports.props
+index 7e2fde81cf..09f43c1bae 100644
+--- a/Externals/tinygltf/exports.props
++++ b/Externals/tinygltf/exports.props
+@@ -2,7 +2,7 @@
+ <Project>
+ <ItemDefinitionGroup>
+ <ClCompile>
+- <AdditionalIncludeDirectories>$(ExternalsDir)tinygltf;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
++ <AdditionalIncludeDirectories>$(ExternalsDir)tinygltf\tinygltf;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>TINYGLTF_NOEXCEPTION;TINYGLTF_NO_EXTERNAL_IMAGE;TINYGLTF_USE_CPP14;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ </ItemDefinitionGroup>
+diff --git a/Externals/tinygltf/tinygltf.vcxproj b/Externals/tinygltf/tinygltf.vcxproj
+index e33d949e56..4995626f22 100644
+--- a/Externals/tinygltf/tinygltf.vcxproj
++++ b/Externals/tinygltf/tinygltf.vcxproj
+@@ -17,7 +17,7 @@
+ <PropertyGroup Label="UserMacros" />
+ <ItemDefinitionGroup>
+ <ClCompile>
+- <AdditionalIncludeDirectories>tinygltf;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
++ <AdditionalIncludeDirectories>tinygltf\tinygltf;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ </ItemDefinitionGroup>
+ <ItemGroup>
diff --git a/Source/Core/VideoCommon/Assets/MeshAsset.cpp b/Source/Core/VideoCommon/Assets/MeshAsset.cpp
index bde8c8aab6..13eb2b4448 100644
--- a/Source/Core/VideoCommon/Assets/MeshAsset.cpp
diff --git a/gnu/packages/patches/dolphin-emu-unbundle-watcher.patch b/gnu/packages/patches/dolphin-emu-unbundle-watcher.patch
index c18a6c2ec4..d6046d440c 100644
--- a/gnu/packages/patches/dolphin-emu-unbundle-watcher.patch
+++ b/gnu/packages/patches/dolphin-emu-unbundle-watcher.patch
@@ -1,50 +1,30 @@
Upstream-status: https://github.com/dolphin-emu/dolphin/pull/13823
-diff --git a/CMake/DolphinLibraryTools.cmake b/CMake/DolphinLibraryTools.cmake
-index 4c395a8ef9..fb806b1b90 100644
---- a/CMake/DolphinLibraryTools.cmake
-+++ b/CMake/DolphinLibraryTools.cmake
-@@ -92,3 +92,30 @@ function(dolphin_find_optional_system_library_pkgconfig library search alias bun
- set(${library}_TYPE "Bundled" PARENT_SCOPE)
- endif()
- endfunction()
-+
-+# This can be used for header-only libraries that doesn't offer a
-+# pkg-config or CMake file. It uses CMake's find_file. LIBRARY is the
-+# name of the library providing it, INCLUDE is the header file name
-+# without its installation prefix (e.g. "wtr/watcher.hpp") while
-+# BUNDLED_PATH is the root directory of the bundled library.
-+function(dolphin_find_optional_system_include library include bundled_path)
-+ dolphin_optional_system_library(use_system ${library})
-+ string(TOUPPER ${library} upperlib)
-+ if(use_system)
-+ find_file(${library}_INCLUDE ${include})
-+ if((NOT ${library}_INCLUDE) AND (NOT ${use_system} STREQUAL "AUTO"))
-+ message(FATAL_ERROR "No system ${library} headers found. \
-+Please install it or set USE_SYSTEM_${upperlib} to AUTO or OFF.")
-+ endif()
-+ endif()
-+ if(${library}_INCLUDE)
-+ message(STATUS "Using system ${library} headers")
-+ set(${library}_TYPE "System" PARENT_SCOPE)
-+ add_library(${library} INTERFACE IMPORTED GLOBAL)
-+ set_target_properties(${library} PROPERTIES
-+ INTERFACE_INCLUDE_DIRECTORIES ${${library}_INCLUDE})
-+ else()
-+ dolphin_add_bundled_library(${library} ${use_system} ${bundled_path})
-+ set(${library}_TYPE "Bundled" PARENT_SCOPE)
-+ endif()
-+endfunction()
diff --git a/CMakeLists.txt b/CMakeLists.txt
-index c277e2a10a..12b1c36ef0 100644
+index c277e2a10a..9b9ec00f91 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
-@@ -786,7 +786,7 @@ if (USE_RETRO_ACHIEVEMENTS)
+@@ -786,7 +786,9 @@ if (USE_RETRO_ACHIEVEMENTS)
add_subdirectory(Externals/rcheevos)
endif()
-add_subdirectory(Externals/watcher)
-+dolphin_find_optional_system_include(watcher wtr/watcher.hpp Externals/watcher)
++dolphin_find_optional_system_library_pkgconfig(
++ WATCHER watcher watcher::watcher Externals/watcher
++)
########################################
# Pre-build events: Define configuration variables and write SCM info header
+diff --git a/Source/Core/Common/CMakeLists.txt b/Source/Core/Common/CMakeLists.txt
+index ee738ba4e3..629c739c8d 100644
+--- a/Source/Core/Common/CMakeLists.txt
++++ b/Source/Core/Common/CMakeLists.txt
+@@ -186,7 +186,7 @@ PRIVATE
+ FatFs
+ Iconv::Iconv
+ spng::spng
+- watcher
++ watcher::watcher
+ ${VTUNE_LIBRARIES}
+ )
+