anvil-editor: init at 0.4
[NixPkgs.git] / pkgs / applications / networking / instant-messengers / linphone / do-not-build-linphone-sdk.patch
blobf93f031bf6906862436a42f42549e981f4ba3544
1 From e6a9992461f368d08d1ad63ffe454714ec0c59ce Mon Sep 17 00:00:00 2001
2 From: Lorenz Brun <lorenz@brun.one>
3 Date: Fri, 28 Jan 2022 02:36:01 +0100
4 Subject: [PATCH] Remove Linphone SDK build
6 ---
7 CMakeLists.txt | 100 +-----------------
8 .../cmake_builder/additional_steps.cmake | 9 --
9 2 files changed, 5 insertions(+), 104 deletions(-)
11 diff --git a/CMakeLists.txt b/CMakeLists.txt
12 index b5a4ab5..3afcd88 100644
13 --- a/CMakeLists.txt
14 +++ b/CMakeLists.txt
15 @@ -194,7 +194,6 @@ list(APPEND APP_OPTIONS "-DQTKEYCHAIN_TARGET_NAME=${QTKEYCHAIN_TARGET_NAME}")
17 list(APPEND APP_OPTIONS "-DENABLE_QT_GL=${ENABLE_VIDEO}")#Activate on video
19 -include(ExternalProject)
20 set(PROJECT_BUILD_COMMAND "")
21 if(CMAKE_BUILD_PARALLEL_LEVEL)
22 list(APPEND APP_OPTIONS "-DCMAKE_BUILD_PARALLEL_LEVEL=${CMAKE_BUILD_PARALLEL_LEVEL}")
23 @@ -237,41 +236,8 @@ if(ENABLE_BUILD_APP_PLUGINS)
24 endif()
25 endif()
27 -if(NOT LINPHONE_QT_ONLY)
28 -#add_subdirectory(external/qtkeychain)
29 - if(ENABLE_QT_KEYCHAIN)
30 - ExternalProject_Add(app-qtkeychain PREFIX "${CMAKE_BINARY_DIR}/qtkeychain"
31 - SOURCE_DIR "${CMAKE_SOURCE_DIR}/external/qtkeychain"
32 - INSTALL_DIR "${QTKEYCHAIN_OUTPUT_DIR}"
33 - BINARY_DIR "${SDK_BUILD_DIR}/qtkeychain"
34 - BUILD_COMMAND ${CMAKE_COMMAND} --build <BINARY_DIR> --config $<CONFIG> ${PROJECT_BUILD_COMMAND}
35 - LIST_SEPARATOR | # Use the alternate list separator
36 - CMAKE_ARGS ${APP_OPTIONS} ${QTKEYCHAIN_OPTIONS} ${USER_ARGS} -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR> -DCMAKE_PREFIX_PATH=${PREFIX_PATH} -DCMAKE_OSX_ARCHITECTURES=${LINPHONESDK_MACOS_ARCHS}
37 - BUILD_ALWAYS NO #${DO_BUILD}
38 - )
39 - endif()
40 - ExternalProject_Add(sdk PREFIX "${CMAKE_BINARY_DIR}/sdk"
41 - SOURCE_DIR "${CMAKE_SOURCE_DIR}/linphone-sdk"
42 - INSTALL_DIR "${LINPHONE_OUTPUT_DIR}"
43 - STAMP_DIR "${SDK_BUILD_DIR}/stamp"
44 - BINARY_DIR "${SDK_BUILD_DIR}"
45 - STEP_TARGETS build
46 - BUILD_COMMAND ${CMAKE_COMMAND} --build <BINARY_DIR> --config $<CONFIG> ${PROJECT_BUILD_COMMAND}
47 - INSTALL_COMMAND ${CMAKE_COMMAND} -E echo "Install step is already done at build time."
48 - LIST_SEPARATOR | # Use the alternate list separator
49 - CMAKE_ARGS ${APP_OPTIONS} ${USER_ARGS} -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR> -DCMAKE_PREFIX_PATH=${PREFIX_PATH} -DCMAKE_OSX_ARCHITECTURES=${LINPHONESDK_MACOS_ARCHS}
50 - BUILD_ALWAYS NO #${DO_BUILD}
51 - )
52 - ExternalProject_Add_Step(sdk force_build
53 - COMMENT "Forcing build for 'sdk'"
54 - DEPENDEES configure
55 - DEPENDERS build
56 - ALWAYS 1
57 - )
58 -endif()
59 include(FindPkgConfig)
61 -set(APP_DEPENDS sdk)# Used if NOT LINPHONE_QT_ONLY
62 if(ENABLE_QT_KEYCHAIN)
63 list(APPEND APP_DEPENDS app-qtkeychain)
64 endif()
65 @@ -289,65 +255,9 @@ find_package(Mediastreamer2 CONFIG QUIET)
66 find_package(ortp CONFIG QUIET)
67 find_package(${QTKEYCHAIN_TARGET_NAME} CONFIG QUIET)
69 -if(NOT (LinphoneCxx_FOUND) OR NOT (Linphone_FOUND) OR NOT (bctoolbox_FOUND) OR NOT (belcard_FOUND) OR NOT (Mediastreamer2_FOUND) OR NOT (ortp_FOUND)
70 - OR ( ENABLE_QT_KEYCHAIN AND NOT(${QTKEYCHAIN_TARGET_NAME}_FOUND) )
71 - OR FORCE_APP_EXTERNAL_PROJECTS
73 - message("Projects are set as External projects. You can start building them by using for example : cmake --build . --target install")
74 - ExternalProject_Add(linphone-qt PREFIX "${CMAKE_BINARY_DIR}/linphone-app"
75 - SOURCE_DIR "${CMAKE_SOURCE_DIR}/linphone-app"
76 - INSTALL_DIR "${APPLICATION_OUTPUT_DIR}"
77 - BINARY_DIR "${CMAKE_BINARY_DIR}/linphone-app"
78 - DEPENDS ${APP_DEPENDS}
79 - BUILD_COMMAND ${CMAKE_COMMAND} --build <BINARY_DIR> --config $<CONFIG> ${PROJECT_BUILD_COMMAND}
80 - INSTALL_COMMAND ${CMAKE_COMMAND} -E echo "Install step is already done at build time."
81 - LIST_SEPARATOR | # Use the alternate list separator
82 - CMAKE_ARGS ${APP_OPTIONS} ${USER_ARGS} -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR> -DCMAKE_PREFIX_PATH=${PREFIX_PATH} -DCMAKE_OSX_ARCHITECTURES=${LINPHONESDK_MACOS_ARCHS}
83 - # ${APP_OPTIONS}
84 - BUILD_ALWAYS ON
85 - )
86 - if( ENABLE_BUILD_APP_PLUGINS)
87 - ExternalProject_Add(app-plugins PREFIX "${CMAKE_BINARY_DIR}/plugins-app"
88 - SOURCE_DIR "${CMAKE_SOURCE_DIR}/plugins"
89 - INSTALL_DIR "${APPLICATION_OUTPUT_DIR}"
90 - BINARY_DIR "${CMAKE_BINARY_DIR}/plugins-app"
91 - DEPENDS linphone-qt
92 - BUILD_COMMAND ${CMAKE_COMMAND} --build <BINARY_DIR> --config $<CONFIG> ${PROJECT_BUILD_COMMAND}
93 - INSTALL_COMMAND ${CMAKE_COMMAND} -E echo "Install step is already done at build time."
94 - LIST_SEPARATOR | # Use the alternate list separator
95 - CMAKE_ARGS ${APP_OPTIONS} ${USER_ARGS} -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR> -DCMAKE_PREFIX_PATH=${PREFIX_PATH} -DCMAKE_OSX_ARCHITECTURES=${LINPHONESDK_MACOS_ARCHS}
96 - )
97 - endif()
98 - install(CODE "message(STATUS \"Running install\")")
99 - set(AUTO_REGENERATION auto_regeneration)
100 - if( ENABLE_BUILD_APP_PLUGINS)
101 - add_custom_target(${AUTO_REGENERATION} ALL
102 - COMMAND ${CMAKE_COMMAND} ${CMAKE_CURRENT_SOURCE_DIR}
103 - DEPENDS app-plugins)
104 - else()
105 - add_custom_target(${AUTO_REGENERATION} ALL
106 - COMMAND ${CMAKE_COMMAND} ${CMAKE_CURRENT_SOURCE_DIR}
107 - DEPENDS linphone-qt)
108 - endif()
109 -else()
110 - message("Adding Linphone Desktop in an IDE-friendly state")
111 - set(CMAKE_INSTALL_PREFIX "${APPLICATION_OUTPUT_DIR}")
112 - add_subdirectory(${CMAKE_SOURCE_DIR}/linphone-app)
113 - if(NOT LINPHONE_QT_ONLY)
114 - add_dependencies(app-library ${APP_DEPENDS})
115 - endif()
116 - if( ENABLE_BUILD_APP_PLUGINS)
117 - add_subdirectory(${CMAKE_SOURCE_DIR}/plugins "plugins-app")
118 - endif()
119 +message("Adding Linphone Desktop in an IDE-friendly state")
120 +set(CMAKE_INSTALL_PREFIX "${APPLICATION_OUTPUT_DIR}")
121 +add_subdirectory(${CMAKE_SOURCE_DIR}/linphone-app)
122 +if( ENABLE_BUILD_APP_PLUGINS)
123 + add_subdirectory(${CMAKE_SOURCE_DIR}/plugins "plugins-app")
124 endif()
125 -ExternalProject_Add(linphone-qt-only PREFIX "${CMAKE_BINARY_DIR}/linphone-app"
126 - SOURCE_DIR "${CMAKE_SOURCE_DIR}/linphone-app"
127 - INSTALL_DIR "${APPLICATION_OUTPUT_DIR}"
128 - BINARY_DIR "${CMAKE_BINARY_DIR}/linphone-app"
129 - BUILD_COMMAND ${CMAKE_COMMAND} --build <BINARY_DIR> --config $<CONFIG> ${PROJECT_BUILD_COMMAND}
130 -# INSTALL_COMMAND ${CMAKE_COMMAND} -E echo "Install step is already done at build time."
131 - LIST_SEPARATOR | # Use the alternate list separator
132 - CMAKE_ARGS ${APP_OPTIONS} ${USER_ARGS} -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR> -DCMAKE_PREFIX_PATH=${PREFIX_PATH} -DCMAKE_OSX_ARCHITECTURES=${LINPHONESDK_MACOS_ARCHS}
133 - EXCLUDE_FROM_ALL ON
134 - #BUILD_ALWAYS ON
136 diff --git a/linphone-app/cmake_builder/additional_steps.cmake b/linphone-app/cmake_builder/additional_steps.cmake
137 index 7f7fd57..a69a04e 100644
138 --- a/linphone-app/cmake_builder/additional_steps.cmake
139 +++ b/linphone-app/cmake_builder/additional_steps.cmake
140 @@ -54,14 +54,5 @@ if (ENABLE_PACKAGING)
141 linphone_builder_apply_flags()
142 linphone_builder_set_ep_directories(linphone_package)
143 linphone_builder_expand_external_project_vars()
144 - ExternalProject_Add(TARGET_linphone_package
145 - DEPENDS TARGET_linphone_builder
146 - TMP_DIR ${ep_tmp}
147 - BINARY_DIR ${ep_build}
148 - SOURCE_DIR "${CMAKE_CURRENT_LIST_DIR}/linphone_package"
149 - DOWNLOAD_COMMAND ""
150 - CMAKE_GENERATOR ${CMAKE_GENERATOR}
151 - CMAKE_ARGS ${LINPHONE_BUILDER_EP_ARGS} -DCMAKE_INSTALL_PREFIX=${LINPHONE_BUILDER_WORK_DIR}/PACKAGE -DTOOLS_DIR=${CMAKE_BINARY_DIR}/programs -DLINPHONE_OUTPUT_DIR=${CMAKE_INSTALL_PREFIX} -DLINPHONE_DESKTOP_DIR=${CMAKE_CURRENT_LIST_DIR}/.. -DLINPHONE_SOURCE_DIR=${EP_linphone_SOURCE_DIR} ${ENABLE_VARIABLES} -DLINPHONE_BUILDER_SIGNING_IDENTITY=${LINPHONE_BUILDER_SIGNING_IDENTITY}
153 endif ()
154 endif ()
156 2.39.3 (Apple Git-145)