diff --git a/srcpkgs/linphone-desktop/patches/0001-System-rootca.patch b/srcpkgs/linphone-desktop/patches/0001-System-rootca.patch new file mode 100644 index 00000000000..73ca491a24d --- /dev/null +++ b/srcpkgs/linphone-desktop/patches/0001-System-rootca.patch @@ -0,0 +1,39 @@ +From 1c7033359af10cdc29b5f665884090a113e35f18 Mon Sep 17 00:00:00 2001 +From: John Zimmermann +Date: Sat, 3 Aug 2024 17:39:20 +0200 +Subject: [PATCH 1/3] System rootca + +--- + linphone-app/src/app/paths/Paths.cpp | 2 +- + linphone-app/src/utils/Constants.hpp | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/linphone-app/src/app/paths/Paths.cpp b/linphone-app/src/app/paths/Paths.cpp +index 47abe5c8..320a2409 100644 +--- a/linphone-app/src/app/paths/Paths.cpp ++++ b/linphone-app/src/app/paths/Paths.cpp +@@ -163,7 +163,7 @@ static inline QString getAppFactoryConfigFilePath () { + } + + static inline QString getAppRootCaFilePath () { +- QString rootca = getAppPackageDataDirPath() + Constants::PathRootCa; ++ QString rootca = Constants::PathRootCa; + if(Paths::filePathExists(rootca.toStdString())){// Packaged + return rootca; + } +diff --git a/linphone-app/src/utils/Constants.hpp b/linphone-app/src/utils/Constants.hpp +index d955de93..fc033d46 100644 +--- a/linphone-app/src/utils/Constants.hpp ++++ b/linphone-app/src/utils/Constants.hpp +@@ -144,7 +144,7 @@ public: + static constexpr char PathConfig[] = "/linphonerc"; + static constexpr char PathDatabase[] = "/linphone.db"; + static constexpr char PathFactoryConfig[] = "/" EXECUTABLE_NAME "/linphonerc-factory"; +- static constexpr char PathRootCa[] = "/linphone/rootca.pem"; ++ static constexpr char PathRootCa[] = "/etc/ssl/certs.pem"; + static constexpr char PathFriendsList[] = "/friends.db"; + static constexpr char PathLimeDatabase[] = "/x3dh.c25519.sqlite3"; + static constexpr char PathMessageHistoryList[] = "/message-history.db"; +-- +2.46.0 + diff --git a/srcpkgs/linphone-desktop/patches/0002-cmake-cleanup.patch b/srcpkgs/linphone-desktop/patches/0002-cmake-cleanup.patch new file mode 100644 index 00000000000..06b286e5c65 --- /dev/null +++ b/srcpkgs/linphone-desktop/patches/0002-cmake-cleanup.patch @@ -0,0 +1,61 @@ +From 18731d05b0fa59d393ca6eceb31c8161eefba5f8 Mon Sep 17 00:00:00 2001 +From: John Zimmermann +Date: Sat, 3 Aug 2024 17:41:09 +0200 +Subject: [PATCH 2/3] cmake cleanup + +--- + linphone-app/CMakeLists.txt | 15 ++++++++------- + 1 file changed, 8 insertions(+), 7 deletions(-) + +diff --git a/linphone-app/CMakeLists.txt b/linphone-app/CMakeLists.txt +index cab2cc25..d2b5dcde 100644 +--- a/linphone-app/CMakeLists.txt ++++ b/linphone-app/CMakeLists.txt +@@ -105,10 +105,10 @@ foreach(PACKAGE ${LINPHONE_PACKAGES}) + endforeach() + + set(PLUGIN_TARGETS ${LinphoneCxx_TARGET}) +-set(APP_TARGETS ${LinphoneCxx_TARGET} ++set(APP_TARGETS liblinphone++ + ${BCToolbox_TARGET}#Logger/App + ${Mediastreamer2_TARGET}#MediastreamerUtils +- ${Belcard_TARGET}#VCard Model ++ ${BelCard_TARGET}#VCard Model + ${LibLinphone_TARGET})#MediastreamerUtils + + #################################### +@@ -721,6 +721,7 @@ include_directories("${LINPHONE_OUTPUT_DIR}/include/OpenGL") + include_directories("${LINPHONE_OUTPUT_DIR}/include/") + include_directories("${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}/") + include_directories("${QTKEYCHAIN_OUTPUT_DIR}/include/") ++include_directories("${CMAKE_CURRENT_SOURCE_DIR}/include/") + if(NOT APPLE AND NOT WIN32) + include_directories("${ISpell_BINARY_DIR}/include") + endif () +@@ -830,10 +831,10 @@ add_dependencies(${APP_LIBRARY} update_translations ${APP_PLUGIN}) + set(TOOLS_DIR "${CMAKE_BINARY_DIR}/programs") + set(LINPHONE_BUILDER_SIGNING_IDENTITY ${LINPHONE_BUILDER_SIGNING_IDENTITY}) + +-add_custom_command(TARGET ${APP_PLUGIN} POST_BUILD COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/") +-add_custom_command(TARGET ${APP_PLUGIN} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_directory "${CMAKE_CURRENT_SOURCE_DIR}/include/" "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}/") +-add_custom_command(TARGET ${APP_PLUGIN} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy $ "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/") +-add_custom_command(TARGET ${APP_PLUGIN} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy $ "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/") ++#add_custom_command(TARGET ${APP_PLUGIN} POST_BUILD COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/") ++#add_custom_command(TARGET ${APP_PLUGIN} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_directory "${CMAKE_CURRENT_SOURCE_DIR}/include/" "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}/") ++#add_custom_command(TARGET ${APP_PLUGIN} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy $ "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/") ++#add_custom_command(TARGET ${APP_PLUGIN} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy $ "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/") + #add_custom_command(TARGET ${TARGET_NAME} PRE_BUILD COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/include/LinphoneApp/*" "${CMAKE_INSTALL_PREFIX}/include/LinphoneApp/") + + #configure_file("${CMAKE_CURRENT_SOURCE_DIR}/include/*" "${CMAKE_INSTALL_PREFIX}/include/LinphoneApp/" COPYONLY) +@@ -843,7 +844,7 @@ install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/include" DESTINATION "${CMAKE_INS + add_subdirectory(build) + add_subdirectory(cmake_builder/linphone_package) + +-deployqt_hack(${TARGET_NAME} ${LINPHONE_QML_DIR}) ++#deployqt_hack(${TARGET_NAME} ${LINPHONE_QML_DIR}) + + + # ------------------------------------------------------------------------------ +-- +2.46.0 + diff --git a/srcpkgs/linphone-desktop/patches/0003-Replace-ispell-with-Sonnet.patch b/srcpkgs/linphone-desktop/patches/0003-Replace-ispell-with-Sonnet.patch new file mode 100644 index 00000000000..1a36c572cdc --- /dev/null +++ b/srcpkgs/linphone-desktop/patches/0003-Replace-ispell-with-Sonnet.patch @@ -0,0 +1,333 @@ +From 2caec486443ea86fc735be993f1eff457570e3f6 Mon Sep 17 00:00:00 2001 +From: John Zimmermann +Date: Sat, 3 Aug 2024 17:47:00 +0200 +Subject: [PATCH 3/3] Replace ispell with Sonnet + +--- + linphone-app/CMakeLists.txt | 12 +- + .../other/spell-checker/SpellChecker.hpp | 34 ++-- + .../other/spell-checker/SpellCheckerLinux.cpp | 186 ++---------------- + 3 files changed, 26 insertions(+), 206 deletions(-) + +diff --git a/linphone-app/CMakeLists.txt b/linphone-app/CMakeLists.txt +index d2b5dcde..770234db 100644 +--- a/linphone-app/CMakeLists.txt ++++ b/linphone-app/CMakeLists.txt +@@ -126,13 +126,7 @@ if(ENABLE_QT_KEYCHAIN) + endif() + + if(NOT APPLE AND NOT WIN32) +- if(NOT ISPELL_TARGET_NAME) +- set(ISPELL_TARGET_NAME "ISpell") +- endif() +- find_package(${ISPELL_TARGET_NAME}) +- if(NOT ISpell_FOUND) +- find_package(${ISPELL_TARGET_NAME} CONFIG REQUIRED) +- endif() ++ find_package(KF5Sonnet REQUIRED) + endif() + + if(ENABLE_BUILD_VERBOSE) +@@ -198,7 +192,7 @@ if( ENABLE_QT_KEYCHAIN) + list(APPEND APP_TARGETS ${QTKEYCHAIN_TARGET_NAME}) + endif() + if(NOT APPLE AND NOT WIN32) +- list(APPEND APP_TARGETS ${ISPELL_TARGET_NAME}) ++ list(APPEND APP_TARGETS KF5::SonnetCore) + endif() + if (UNIX AND NOT APPLE) + list(APPEND QT5_PACKAGES DBus) +diff --git a/linphone-app/src/components/other/spell-checker/SpellChecker.hpp b/linphone-app/src/components/other/spell-checker/SpellChecker.hpp +index 84d9abdf..37a1dd8b 100644 +--- a/linphone-app/src/components/other/spell-checker/SpellChecker.hpp ++++ b/linphone-app/src/components/other/spell-checker/SpellChecker.hpp +@@ -39,7 +39,7 @@ + #include "components/settings/SettingsModel.hpp" + + #ifdef __linux__ +-#include ++#include + #endif + + #define SUGGESTIONS_LIMIT 10 +@@ -57,7 +57,7 @@ class SpellChecker : public QSyntaxHighlighter { + public: + SpellChecker(QObject* parent = nullptr); + ~SpellChecker(); +- ++ + // Common + static QString currentLanguage() { + QString overrideLocale = CoreManager::getInstance()->getSettingsModel()->getSpellCheckerOverrideLocale(); +@@ -72,21 +72,21 @@ public: + Q_INVOKABLE void ignoreAll(QString word); + Q_INVOKABLE void replace(QString word, QString byWord, int cursorPosition); + Q_PROPERTY(QStringList redLines MEMBER redLines NOTIFY redLinesChanged); +- ++ + // Native (Mac/Windows) or ISpell + Q_INVOKABLE void learn(QString word); + Q_INVOKABLE QStringList suggestionsForWord(QString word); + bool isValid(QString word); +- ++ + protected: + void highlightBlock(const QString &text) override; +- ++ + public slots: + void highlightAfterGracePeriod(); +- ++ + signals: + void redLinesChanged(); +- ++ + private: + QTextCharFormat errorFormater; + QTimer *graceTimer; +@@ -111,24 +111,12 @@ private: + #ifdef _WIN32 + ISpellChecker* mNativeSpellChecker = nullptr; + #endif +- +-// ISpell linux ++ ++// nuspell linux + #ifdef __linux__ +- static int gISpell_sc_read_fd; +- static int gISpell_sc_write_fd; +- static int gISpell_app_read_fd; +- static int gISpell_app_write_fd; +- static std::thread *gISpellCheckerThread; +- static QHash gISpellSuggestions; +- static std::string gISpellCheckeCurrentLanguage; +- static std::string gIspellDictionariesFolder; +- void stopISpellChecker(); +- static std::shared_ptr gISpellSelfDictionary; +- bool isLearnt(QString word); +- bool wordValidWithFrVariants(QString word); +- bool validSplittedOn(QString pattern, QString word); ++ Sonnet::Speller dict; + #endif +- ++ + }; + + +diff --git a/linphone-app/src/components/other/spell-checker/SpellCheckerLinux.cpp b/linphone-app/src/components/other/spell-checker/SpellCheckerLinux.cpp +index a9a56a48..4cb586dd 100644 +--- a/linphone-app/src/components/other/spell-checker/SpellCheckerLinux.cpp ++++ b/linphone-app/src/components/other/spell-checker/SpellCheckerLinux.cpp +@@ -18,196 +18,34 @@ + * along with this program. If not, see . + */ + +- + #include "SpellChecker.hpp" +-#include +-#include "app/paths/Paths.hpp" +-#include +-#include +-#include ++#include + #include +-#include "utils/Utils.hpp" +-#include +- +-int SpellChecker::gISpell_sc_read_fd = 0; +-int SpellChecker::gISpell_sc_write_fd = 0; +-int SpellChecker::gISpell_app_read_fd = 0; +-int SpellChecker::gISpell_app_write_fd = 0; +-std::thread *SpellChecker::gISpellCheckerThread = nullptr; +-QHash SpellChecker::gISpellSuggestions; +-std::string SpellChecker::gISpellCheckeCurrentLanguage; +-std::shared_ptr SpellChecker::gISpellSelfDictionary = linphone::Factory::get()->createConfig(Paths::getISpellOwnDictsDirPath()); +-std::string SpellChecker::gIspellDictionariesFolder; +- +- +-bool open_channel(int& read_fd, int& write_fd) { +- int vals[2]; +- int errc = pipe(vals); +- if(errc) { +- return false; +- } else { +- read_fd = vals[0]; +- write_fd = vals[1]; +- return true; +- } +-} +- +-void SpellChecker::stopISpellChecker() { +- QString stop("__spellchecker_stop__"); +- auto message = stop.toStdString(); +- ssize_t amnt_written = write(gISpell_sc_write_fd, message.data(), message.size()); +- if(amnt_written != message.size()) { +- qWarning() << LOG_TAG << "Linux ispell unable to stop spell checker"; +- } +- gISpellCheckerThread->join(); +- gISpellCheckerThread = nullptr; +- mAvailable = false; +-} + + void SpellChecker::setLanguage() { +- +- QString locale = SpellChecker::currentLanguage().toLower().mid(0,2); +- +- if (gISpellCheckeCurrentLanguage == locale.toStdString() && gISpellCheckerThread != nullptr) { +- mAvailable = true; +- return; +- } +- +- if (gISpellCheckerThread != nullptr) // Language change +- stopISpellChecker(); +- +- QString dict = Paths::getISpellDictsDirPath()+locale+".hash"; +- gIspellDictionariesFolder = Paths::getISpellDictsDirPath().toStdString(); +- +- if (!QFile::exists(dict)) { +- qWarning() << LOG_TAG << "Linux ispell language not supported " << SpellChecker::currentLanguage() << dict; +- mAvailable = false; +- return; +- } +- +- if (!open_channel(gISpell_sc_read_fd, gISpell_sc_write_fd) || +- !open_channel(gISpell_app_read_fd, gISpell_app_write_fd)) { +- qWarning() << LOG_TAG << "Linux ispell language unable to open channels"; +- mAvailable = false; +- return; +- } +- +- gISpellCheckeCurrentLanguage = locale.toStdString(); +- gISpellCheckerThread = new std::thread(bc_spell_checker, +- gIspellDictionariesFolder.data(), +- gISpellCheckeCurrentLanguage.data(), +- gISpell_sc_read_fd, +- gISpell_app_write_fd); +- +- mAvailable = true; +- qDebug() << LOG_TAG << "Linux ispell language loaded from " << dict; +-} +- +-// Few special situation in French language not detected by the fr.hash. +- +-bool SpellChecker::wordValidWithFrVariants(QString word) { +- if (word.toLower().contains("qu'")) { +- QString replace = word.toLower().replace("qu'","que "); +- if (isValid(replace)||validSplittedOn(" ",replace)) +- return true; +- } +- if (word.toLower().contains("s'")) { +- QString replace = word.toLower().replace("s'","se "); +- if (isValid(replace)||validSplittedOn(" ",replace)) +- return true; +- } +- return false; +-} + +-bool SpellChecker::validSplittedOn(QString pattern, QString word) { +- if (!word.contains(pattern)) +- return false; +- auto split = word.split(pattern); +- return isValid(split[0]) && isValid(split[1]); ++ dict = Sonnet::Speller(SpellChecker::currentLanguage()); ++ mAvailable = dict.isValid(); ++ qDebug() << LOG_TAG << "Linux ispell language loaded: " << SpellChecker::currentLanguage(); + } + + bool SpellChecker::isValid(QString word) { +- +- if (!mAvailable || word.length() == 1 || isLearnt(word)) +- return true; +- +- // no letters in word -> valid +- QString wordCopy = word; +- auto iterator = std::remove_if(wordCopy.begin(), wordCopy.end(), [](const QChar& c){ return !c.isLetter();}); +- wordCopy.chop(std::distance(iterator, wordCopy.end())); +- if (wordCopy.isEmpty()) +- return true; +- +- // Some preformating +- +- word = word.replace("’","'"); +- word = word.replace("(",""); +- word = word.replace(")",""); +- word = word.replace("‘","'"); +- +- while (word.endsWith(".") || word.endsWith("!") || word.endsWith(",") || word.endsWith(",")) +- word.chop(1); +- +- while (word.startsWith(".") || word.startsWith("!") || word.startsWith(",") || word.startsWith(",")) { +- word = word.mid(1); +- } +- +- // submit word to ispell +- auto message = word.toStdString(); +- ssize_t amnt_written = write(gISpell_sc_write_fd, message.data(), message.size()); +- if(amnt_written != message.size()) { +- qWarning() << LOG_TAG << "Linux ispell unable to communicate with spell checker thread"; ++ ++ if (!mAvailable || word.length() == 1) + return true; +- } +- +- // wait and read ispell result +- constexpr int buffer_size = 1024; +- char buffer[buffer_size] = {0}; +- ssize_t amnt_read = read(gISpell_app_read_fd, &buffer[0], buffer_size); +- QString returned = QString::fromUtf8(buffer); +- if (returned == "1") { ++ ++ if(dict.isCorrect(word)) { + return true; +- } else { +- if (!gISpellSuggestions.contains(word)) { // Record returned suggestions if any +- QStringList returnedUggestions = returned.split(", "); +- returnedUggestions.removeFirst(); +- gISpellSuggestions.insert(word,returnedUggestions); +- } +- return (gISpellCheckeCurrentLanguage == "fr" && wordValidWithFrVariants(word)) || +- validSplittedOn("'",word) || +- validSplittedOn("-",word); +- } + ++ } ++ return false; + } + + void SpellChecker::learn(QString word){ +- QCryptographicHash hash( QCryptographicHash::Sha1 ); // Hash to avoid fancy character conflict with config format. +- hash.addData(word.toUtf8()); +- auto hashString = Utils::appStringToCoreString(hash.result().toHex()); +- gISpellSelfDictionary->setInt("words",hashString,1); +- gISpellSelfDictionary->sync(); ++ dict.addToPersonal(word); + highlightDocument(); + } + +-bool SpellChecker::isLearnt(QString word){ +- QCryptographicHash hash( QCryptographicHash::Sha1 ); // Hash to avoid fancy character conflict with config format. +- hash.addData(word.toUtf8()); +- auto hashString = Utils::appStringToCoreString(hash.result().toHex()); +- return gISpellSelfDictionary->getInt("words",hashString,0) == 1; +-} +- + QStringList SpellChecker::suggestionsForWord(QString word) { +- QStringList suggestions; +- if (!gISpellSuggestions.contains(word)) +- return suggestions; +- QListIterator itr (gISpellSuggestions.value(word)); +- while (itr.hasNext()) { +- QString suggestion = itr.next(); +- if (!suggestion.contains("+")) +- suggestions << suggestion; +- if (suggestions.length() >= SUGGESTIONS_LIMIT) { +- return suggestions; +- } +- } +- return suggestions; ++ return dict.suggest(word); + } +-- +2.46.0 + diff --git a/srcpkgs/linphone-desktop/patches/cmake.patch b/srcpkgs/linphone-desktop/patches/cmake.patch index cb80d1c6396..7031d808e6a 100644 --- a/srcpkgs/linphone-desktop/patches/cmake.patch +++ b/srcpkgs/linphone-desktop/patches/cmake.patch @@ -1,6 +1,35 @@ ---- linphone-desktop-5.1.2/linphone-app/CMakeLists.txt 2023-10-19 21:30:01.079378121 +0200 -+++ - 2023-10-19 21:33:10.349584407 +0200 -@@ -48,13 +48,6 @@ +--- a/linphone-app/CMakeLists.txt 2024-07-22 11:08:44.000000000 +0200 ++++ - 2024-08-04 20:12:29.115331824 +0200 +@@ -24,26 +24,18 @@ + + + #Linphone targets +-set(LINPHONE_PACKAGES LinphoneCxx Mediastreamer2 Belcard LibLinphone) ++set(LINPHONE_PACKAGES LinphoneCxx Mediastreamer2 BelCard LibLinphone) + + list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") + +-find_package(BCToolbox) +-if(NOT BCToolbox_FOUND) +- find_package(bctoolbox CONFIG REQUIRED) +-endif() +-if(NOT LINPHONEAPP_VERSION) +- bc_compute_full_version(LINPHONEAPP_VERSION) +-endif() + set(version_major) + set(version_minor) + set(version_patch) + set(identifiers ) + set(metadata ) +-bc_parse_full_version("${LINPHONEAPP_VERSION}" version_major version_minor version_patch identifiers metadata) +- + + project(linphoneqt VERSION "${version_major}.${version_minor}.${version_patch}") ++find_package(bctoolbox CONFIG) + + if(ENABLE_BUILD_VERBOSE) + #message("CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH}") +@@ -61,13 +53,6 @@ if(UNIX AND NOT APPLE) set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) endif() @@ -9,8 +38,16 @@ -list(APPEND CMAKE_MODULE_PATH "${LINPHONE_OUTPUT_DIR}/lib64/cmake") -list(APPEND CMAKE_MODULE_PATH "${LINPHONE_OUTPUT_DIR}/lib/cmake") - --list(APPEND CMAKE_PREFIX_PATH "${QTKEYCHAIN_OUTPUT_DIR}/lib64/cmake") -list(APPEND CMAKE_PREFIX_PATH "${QTKEYCHAIN_OUTPUT_DIR}/lib/cmake") +-list(APPEND CMAKE_PREFIX_PATH "${ISPELL_OUTPUT_DIR}/lib/cmake") - set(APP_LIBRARY app-library) - set(APP_PLUGIN app-plugin) + if(APPLE) + list(APPEND CMAKE_FRAMEWORK_PATH "${LINPHONE_OUTPUT_DIR}/Frameworks") +@@ -847,7 +832,6 @@ + install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/include" DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}") + + +-add_subdirectory(build) + add_subdirectory(cmake_builder/linphone_package) + + deployqt_hack(${TARGET_NAME} ${LINPHONE_QML_DIR}) diff --git a/srcpkgs/linphone-desktop/template b/srcpkgs/linphone-desktop/template index 2062e7a7ec0..ffe3de33129 100644 --- a/srcpkgs/linphone-desktop/template +++ b/srcpkgs/linphone-desktop/template @@ -1,33 +1,36 @@ # Template file for 'linphone-desktop' pkgname=linphone-desktop -version=5.1.2 +version=5.2.6 revision=1 build_wrksrc="linphone-app" # The root cmake is glue code for their vendored libs build_style=cmake +cmake_builddir="build-cmake" +configure_args="-DLINPHONEAPP_VERSION=${version}" hostmakedepends="qt5-qmake qt5-host-tools qt5-declarative" makedepends="bctoolbox-devel belcard-devel belle-sip-devel linphone-devel mediastreamer-devel qt5-declarative-devel qt5-quickcontrols2-devel qt5-svg-devel qt5-tools-devel qt5-webview-devel qt5-speech-devel - qt5-multimedia-devel" + qt5-multimedia-devel sonnet-devel" depends="qt5>=5.9_1 qt5-quickcontrols qt5-quickcontrols2 qt5-graphicaleffects" short_desc="Linphone qt desktop" maintainer="John " license="GPL-3.0-or-later" homepage="https://www.linphone.org/" distfiles="https://gitlab.linphone.org/BC/public/linphone-desktop/-/archive/${version}/linphone-desktop-${version}.tar.gz" -checksum=3d4757fa6a6e2d866ab768cffc6495ab6b73da3c38dabc561cae127155a6f72b +checksum=7e7953f8b7da86b7b39a6a3dcf7aea1bae40b0c43f5715d20278fc0876012341 replaces="linphone-gui>=0" pre_configure() { IFS=. read _major _minor _patch <<<"$version" - vsed -e "s/set(FULL_VERSION )/set(FULL_VERSION $version)/g" -i CMakeLists.txt - vsed -e "s/set(version_major )/set(version_major $_major)/g" -i CMakeLists.txt - vsed -e "s/set(version_minor )/set(version_minor $_minor)/g" -i CMakeLists.txt - vsed -e "s/set(version_patch )/set(version_patch $_patch)/g" -i CMakeLists.txt - vsed -e "/bc_compute_full_version/d" -i CMakeLists.txt - vsed -e "/bc_parse_full_version/d" -i CMakeLists.txt - vsed -e "/find_package(bctoolbox CONFIG)/d" -i CMakeLists.txt - vsed -e "/project(/ a find_package(bctoolbox CONFIG)" -i CMakeLists.txt + vsed -e "s/set(version_major)/set(version_major $_major)/g" -i CMakeLists.txt + vsed -e "s/set(version_minor)/set(version_minor $_minor)/g" -i CMakeLists.txt + vsed -e "s/set(version_patch)/set(version_patch $_patch)/g" -i CMakeLists.txt + + rm -vf ${wrksrc}/linphone-app/cmake/FindLibLinphone.cmake \ + ${wrksrc}/linphone-app/cmake/FindBCToolbox.cmake \ + ${wrksrc}/linphone-app/cmake/FindBelcard.cmake \ + ${wrksrc}/linphone-app/cmake/FindMediastreamer2.cmake \ + ${wrksrc}/linphone-app/cmake/FindLinphoneCxx.cmake } linphone-gui_package() { @@ -38,9 +41,9 @@ linphone-gui_package() { # XXX: The cmake install does all kinds of stuff we don't want do_install() { - vbin build/linphone - vinstall build/libapp-plugin.so 644 usr/lib - vinstall build/linphone.desktop 644 usr/share/applications/ + vbin ${cmake_builddir}/linphone + vinstall ${cmake_builddir}/libapp-plugin.so 644 usr/lib + vinstall ${cmake_builddir}/linphone.desktop 644 usr/share/applications/ vinstall assets/images/linphone_logo.svg 644 usr/share/icons/hicolor/scalable/apps/ linphone.svg vinstall assets/linphonerc-factory 644 usr/share/linphone/ vinstall assets/assistant/create-app-sip-account.rc 644 usr/share/linphone/assistant