diff --git a/net/toxextensionmessages/Portfile b/net/toxextensionmessages/Portfile new file mode 100644 index 0000000000000..2c5ebefa0f447 --- /dev/null +++ b/net/toxextensionmessages/Portfile @@ -0,0 +1,24 @@ +# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4 + +PortSystem 1.0 +PortGroup cmake 1.1 +PortGroup github 1.0 + +name toxextensionmessages +github.setup toxext tox_extension_messages 0.0.3 v +revision 0 +categories net security +license GPL-3 +maintainers nomaintainer +description Extensions for Tox +long_description {*}${description} +checksums rmd160 cafbc20031f9ec828da25c0b465590d8c413630e \ + sha256 e7a9a199a3257382a85a8e555b6c8c540b652a11ca9a471b9da2a25a660dfdc3 \ + size 21906 +github.tarball_from archive + +depends_build-append path:bin/pkg-config:pkgconfig + +depends_lib-append port:toxext + +compiler.c_standard 2011 diff --git a/net/toxextensionmessages/files/0001-Restore-Qt4-support.patch b/net/toxextensionmessages/files/0001-Restore-Qt4-support.patch new file mode 100644 index 0000000000000..7e081cb0df210 --- /dev/null +++ b/net/toxextensionmessages/files/0001-Restore-Qt4-support.patch @@ -0,0 +1,217 @@ +From ebd705d10f4c1fdda158bb2d4ca65e910027a668 Mon Sep 17 00:00:00 2001 +From: Sergey Fedorov +Date: Tue, 3 Dec 2024 18:21:55 +0800 +Subject: [PATCH] Restore Qt4 support + +--- + CMakeLists.txt | 76 ++++++++++++++++++++++------------------ + cmake/Dependencies.cmake | 66 +++++++++++++++++++++++----------- + 2 files changed, 88 insertions(+), 54 deletions(-) + +diff --git CMakeLists.txt CMakeLists.txt +index 1c95a24a..d200366f 100644 +--- CMakeLists.txt ++++ CMakeLists.txt +@@ -23,15 +23,16 @@ + cmake_minimum_required(VERSION 3.7.2) + set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake) + +-option(PLATFORM_EXTENSIONS "Enable platform specific extensions, requires extra dependencies" ON) +-option(UPDATE_CHECK "Enable automatic update check" ON) +-option(USE_CCACHE "Use ccache when available" ON) +-option(SPELL_CHECK "Enable spell cheching support" ON) +-option(SVGZ_ICON "Compress the SVG icon of qTox" ON) ++option(PLATFORM_EXTENSIONS "Enable platform specific extensions, requires extra dependencies" OFF) ++option(UPDATE_CHECK "Enable automatic update check" OFF) ++option(USE_CCACHE "Use ccache when available" OFF) ++option(SPELL_CHECK "Enable spell cheching support" OFF) ++option(SVGZ_ICON "Compress the SVG icon of qTox" OFF) + option(ASAN "Compile with AddressSanitizer" OFF) + option(TSAN "Compile with ThreadSanitizer" OFF) + option(DESKTOP_NOTIFICATIONS "Use snorenotify for desktop notifications" OFF) + option(STRICT_OPTIONS "Error on compile warning, used by CI" OFF) ++option(USE_QT4 "Build with Qt4" OFF) + + # process generated files if cmake >= 3.10 + if(POLICY CMP0071) +@@ -55,17 +56,6 @@ endif() + set(ENV{PKG_CONFIG_PATH} + ${CMAKE_SOURCE_DIR}/libs/lib/pkgconfig:/opt/ffmpeg/lib/pkgconfig:$ENV{PKG_CONFIG_PATH}) + +-# necessary to find openal-soft on mac os +-if(APPLE) +- set(ENV{PKG_CONFIG_PATH} +- /usr/local/opt/openal-soft/lib/pkgconfig:$ENV{PKG_CONFIG_PATH}) +-endif() +- +-execute_process( +- COMMAND brew --prefix qt@5 +- OUTPUT_VARIABLE QT_PREFIX_PATH +- OUTPUT_STRIP_TRAILING_WHITESPACE) +- + project(qtox) + + # Instruct CMake to run moc automatically when needed. +@@ -75,8 +65,7 @@ set(CMAKE_AUTORCC ON) + # Enable maximum compression + set(AUTORCC_OPTIONS -compress 9 -threshold 0) + +- +-if(NOT Qt5Widgets_VERSION VERSION_LESS "5.9") ++if(NOT USE_QT4 AND NOT Qt5Widgets_VERSION VERSION_LESS "5.9") + # Drop the file modification time of source files from generated files + # to help with reproducible builds. We do not use QFileInfo.lastModified + # so this has no unwanted side effects. This mtime started appearing in +@@ -134,22 +123,41 @@ include(Dependencies) + # + ################################################################################ + +-qt5_wrap_ui(${PROJECT_NAME}_FORMS +- src/chatlog/content/filetransferwidget.ui +- src/loginscreen.ui +- src/mainwindow.ui +- src/widget/about/aboutfriendform.ui +- src/widget/form/loadhistorydialog.ui +- src/widget/form/profileform.ui +- src/widget/form/removechatdialog.ui +- src/widget/form/searchsettingsform.ui +- src/widget/form/setpassworddialog.ui +- src/widget/form/settings/aboutsettings.ui +- src/widget/form/settings/advancedsettings.ui +- src/widget/form/settings/avform.ui +- src/widget/form/settings/generalsettings.ui +- src/widget/form/settings/privacysettings.ui +- src/widget/form/settings/userinterfacesettings.ui) ++if(USE_QT4) ++ qt4_wrap_ui(${PROJECT_NAME}_FORMS ++ src/chatlog/content/filetransferwidget.ui ++ src/loginscreen.ui ++ src/mainwindow.ui ++ src/widget/about/aboutfriendform.ui ++ src/widget/form/loadhistorydialog.ui ++ src/widget/form/profileform.ui ++ src/widget/form/removechatdialog.ui ++ src/widget/form/searchsettingsform.ui ++ src/widget/form/setpassworddialog.ui ++ src/widget/form/settings/aboutsettings.ui ++ src/widget/form/settings/advancedsettings.ui ++ src/widget/form/settings/avform.ui ++ src/widget/form/settings/generalsettings.ui ++ src/widget/form/settings/privacysettings.ui ++ src/widget/form/settings/userinterfacesettings.ui) ++else() ++ qt5_wrap_ui(${PROJECT_NAME}_FORMS ++ src/chatlog/content/filetransferwidget.ui ++ src/loginscreen.ui ++ src/mainwindow.ui ++ src/widget/about/aboutfriendform.ui ++ src/widget/form/loadhistorydialog.ui ++ src/widget/form/profileform.ui ++ src/widget/form/removechatdialog.ui ++ src/widget/form/searchsettingsform.ui ++ src/widget/form/setpassworddialog.ui ++ src/widget/form/settings/aboutsettings.ui ++ src/widget/form/settings/advancedsettings.ui ++ src/widget/form/settings/avform.ui ++ src/widget/form/settings/generalsettings.ui ++ src/widget/form/settings/privacysettings.ui ++ src/widget/form/settings/userinterfacesettings.ui) ++endif() + + set(${PROJECT_NAME}_RESOURCES + res.qrc +diff --git cmake/Dependencies.cmake cmake/Dependencies.cmake +index 2cc8c64a..e102ee59 100644 +--- cmake/Dependencies.cmake ++++ cmake/Dependencies.cmake +@@ -22,16 +22,28 @@ + + # This should go into subdirectories later. + find_package(PkgConfig REQUIRED) +-find_package(Qt5Concurrent REQUIRED) +-find_package(Qt5Core REQUIRED) +-find_package(Qt5Gui REQUIRED) +-find_package(Qt5LinguistTools REQUIRED) +-find_package(Qt5Network REQUIRED) +-find_package(Qt5OpenGL REQUIRED) +-find_package(Qt5Svg REQUIRED) +-find_package(Qt5Test REQUIRED) +-find_package(Qt5Widgets REQUIRED) +-find_package(Qt5Xml REQUIRED) ++ ++if(NOT USE_QT4) ++ find_package(Qt5Concurrent REQUIRED) ++ find_package(Qt5Core REQUIRED) ++ find_package(Qt5Gui REQUIRED) ++ find_package(Qt5LinguistTools REQUIRED) ++ find_package(Qt5Network REQUIRED) ++ find_package(Qt5OpenGL REQUIRED) ++ find_package(Qt5Svg REQUIRED) ++ find_package(Qt5Test REQUIRED) ++ find_package(Qt5Widgets REQUIRED) ++ find_package(Qt5Xml REQUIRED) ++else() ++ find_package(Qt4 4.8 REQUIRED ++ QtCore ++ QtGui ++ QtNetwork ++ QtOpenGL ++ QtSvg ++ QtXml ++ ) ++endif() + + find_package(ToxExt REQUIRED) + find_package(ToxExtensionMessages REQUIRED) +@@ -41,14 +53,24 @@ function(add_dependency) + endfunction() + + # Everything links to these Qt libraries. +-add_dependency( +- Qt5::Core +- Qt5::Gui +- Qt5::Network +- Qt5::OpenGL +- Qt5::Svg +- Qt5::Widgets +- Qt5::Xml) ++if(NOT USE_QT4) ++ add_dependency( ++ Qt5::Core ++ Qt5::Gui ++ Qt5::Network ++ Qt5::OpenGL ++ Qt5::Svg ++ Qt5::Widgets ++ Qt5::Xml) ++else() ++ add_dependency( ++ Qt4::Core ++ Qt4::Gui ++ Qt4::Network ++ Qt4::OpenGL ++ Qt4::Svg ++ Qt4::Xml) ++endif() + + add_dependency( + ToxExt::ToxExt +@@ -258,9 +280,13 @@ if (PLATFORM_EXTENSIONS) + endif() + + if (${DESKTOP_NOTIFICATIONS}) +- # snorenotify does only provide a cmake find module ++ # snorenotify does only provide a cmake find module ++ if(NOT USE_QT4) + find_package(LibsnoreQt5 0.7.0 REQUIRED) +- set(ALL_LIBRARIES ${ALL_LIBRARIES} Snore::Libsnore) ++ else() ++ find_package(LibsnoreQt4 0.7.0 REQUIRED) ++ endif() ++ set(ALL_LIBRARIES ${ALL_LIBRARIES} Snore::Libsnore) + endif() + + add_definitions( +-- +2.39.3 (Apple Git-146) +