You've already forked macports-ports
mirror of
https://github.com/macports/macports-ports.git
synced 2026-07-12 18:20:25 -07:00
5a59f45ca3
Fix path to Applications folder so it does not start with two slashes. This fixes destroot failure of phonon-qt5: CMake Error at settings/cmake_install.cmake:49 (file): file called with network path DESTINATION. This does not make sense when using DESTDIR. Specify local absolute path or remove DESTDIR environment variable. DESTINATION= //Applications/MacPorts/KF5 Call Stack (most recent call first): cmake_install.cmake:294 (include) Also, use separate patchfiles for the two subports so that the patches apply without offset for both subports. Previously, when a patch applied with offset, a .orig file would be created, and this would be installed. This also prevents potential future patch failure if one of the subports is updated but not the other one, as has happened before.
46 lines
2.5 KiB
Diff
46 lines
2.5 KiB
Diff
diff --git a/kde-modules/KDECompilerSettings.cmake b/kde-modules/KDECompilerSettings.cmake
|
|
index c42fd55..6e5193e 100644
|
|
--- a/kde-modules/KDECompilerSettings.cmake
|
|
+++ b/kde-modules/KDECompilerSettings.cmake
|
|
@@ -295,9 +295,9 @@ endif()
|
|
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-exceptions")
|
|
elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
|
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-exceptions")
|
|
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-exceptions -DQT_NO_EXCEPTIONS")
|
|
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Intel" AND NOT WIN32)
|
|
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-exceptions")
|
|
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-exceptions -DQT_NO_EXCEPTIONS")
|
|
#elseif (MSVC OR (WIN32 AND CMAKE_CXX_COMPILER_ID STREQUAL "Intel"))
|
|
# Exceptions appear to be disabled by default for MSVC
|
|
# http://msdn.microsoft.com/en-us/library/1deeycx5.aspx
|
|
@@ -315,9 +315,13 @@ macro(_kdecompilersettings_append_exception_flag VAR)
|
|
set(${VAR} "${${VAR}} -fexceptions")
|
|
endif()
|
|
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
|
- set(${VAR} "${${VAR}} -fexceptions")
|
|
+ string(REPLACE " -DQT_NO_EXCEPTIONS " " " ${VAR} " ${${VAR}} ")
|
|
+ # it's likely that -DQT_NO_EXCEPTIONS from CMAKE_CXX_FLAGS never made it to the COMPILE_OPTIONS
|
|
+ # so we override/undo that global setting for this file
|
|
+ set(${VAR} "${${VAR}} -fexceptions -UQT_NO_EXCEPTIONS")
|
|
elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
|
- set(${VAR} "${${VAR}} -fexceptions")
|
|
+ string(REPLACE " -DQT_NO_EXCEPTIONS " " " ${VAR} " ${${VAR}} ")
|
|
+ set(${VAR} "${${VAR}} -fexceptions -UQT_NO_EXCEPTIONS")
|
|
endif()
|
|
string(STRIP "${${VAR}}" ${VAR})
|
|
endmacro()
|
|
@@ -342,10 +346,10 @@ function(KDE_TARGET_ENABLE_EXCEPTIONS target mode)
|
|
if (WIN32)
|
|
target_compile_options(${target} ${mode} "$<$<CXX_COMPILER_ID:Intel>:-EHsc>")
|
|
else()
|
|
- target_compile_options(${target} ${mode} "$<$<CXX_COMPILER_ID:Intel>:-fexceptions>")
|
|
+ target_compile_options(${target} ${mode} "$<$<CXX_COMPILER_ID:Intel>:-fexceptions;-UQT_NO_EXCEPTIONS>")
|
|
endif()
|
|
target_compile_options(${target} ${mode}
|
|
- "$<$<OR:$<CXX_COMPILER_ID:GNU>,$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:AppleClang>>:-fexceptions>")
|
|
+ "$<$<OR:$<CXX_COMPILER_ID:GNU>,$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:AppleClang>>:-fexceptions;-UQT_NO_EXCEPTIONS>")
|
|
endfunction()
|
|
|
|
function(KDE_ENABLE_EXCEPTIONS)
|