summaryrefslogtreecommitdiff
path: root/app-office/calligraplan/files/calligraplan-3.3.0-no-kinit.patch
diff options
context:
space:
mode:
Diffstat (limited to 'app-office/calligraplan/files/calligraplan-3.3.0-no-kinit.patch')
-rw-r--r--app-office/calligraplan/files/calligraplan-3.3.0-no-kinit.patch134
1 files changed, 134 insertions, 0 deletions
diff --git a/app-office/calligraplan/files/calligraplan-3.3.0-no-kinit.patch b/app-office/calligraplan/files/calligraplan-3.3.0-no-kinit.patch
new file mode 100644
index 000000000000..16ee6b1e09a4
--- /dev/null
+++ b/app-office/calligraplan/files/calligraplan-3.3.0-no-kinit.patch
@@ -0,0 +1,134 @@
+From 1883014daa5ae1dedf4d9356dbdaafd4d9d3014f Mon Sep 17 00:00:00 2001
+From: Nicolas Fella <nicolas.fella@gmx.de>
+Date: Sat, 17 Sep 2022 17:11:05 +0200
+Subject: [PATCH] Port away from deprecated kinit
+
+(cherry picked from commit d0c9c05bfb1d1eae6b1d92ac7d5a22ed5238329f)
+---
+ CMakeLists.txt | 1 -
+ src/CMakeLists.txt | 11 ++++-------
+ src/main.cpp | 2 +-
+ src/workpackage/CMakeLists.txt | 10 +++-------
+ src/workpackage/main.cpp | 2 +-
+ 5 files changed, 9 insertions(+), 17 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 70025827..a354e4a0 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -112,7 +112,6 @@ set(REQUIRED_KF5_VERSION "5.45.0")
+
+ find_package(KF5 ${REQUIRED_KF5_VERSION} REQUIRED
+ COMPONENTS
+- Init
+ Archive
+ # Codecs
+ # Completion
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 3c77e9f4..755863a2 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -207,7 +207,7 @@ install(TARGETS calligraplanpart DESTINATION ${PLUGIN_INSTALL_DIR}/calligraplan/
+
+ ########### KPlato executable ###############
+
+-set(calligraplan_KDEINIT_SRCS main.cpp )
++set(calligraplan_SRCS main.cpp )
+
+ file(GLOB ICONS_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/pics/*-apps-calligraplan.png")
+ ecm_add_app_icon(kdeinit_app_ICONS_SRCS ICONS ${ICONS_SRCS})
+@@ -215,20 +215,17 @@ if(WIN32)
+ set(_resourcefile "${CMAKE_CURRENT_BINARY_DIR}/kdeinit_app_ICONS_SRCS.rc")
+ endif()
+
+-kf5_add_kdeinit_executable( calligraplan ${calligraplan_KDEINIT_SRCS})
++add_executable( calligraplan ${calligraplan_SRCS})
+
+ if (APPLE)
+ set_target_properties(calligraplan PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist.template)
+ set_target_properties(calligraplan PROPERTIES MACOSX_BUNDLE_GUI_IDENTIFIER "org.calligra.plan")
+ set_target_properties(calligraplan PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME "Plan")
+- install( FILES ${CMAKE_CURRENT_BINARY_DIR}/calligraplan_KDEINIT_SRCS.icns DESTINATION ${BUNDLE_INSTALL_DIR}/calligraplan.app/Contents/Resources)
++ install( FILES ${CMAKE_CURRENT_BINARY_DIR}/calligraplan_SRCS.icns DESTINATION ${BUNDLE_INSTALL_DIR}/calligraplan.app/Contents/Resources)
+ endif ()
+
+-target_link_libraries(kdeinit_calligraplan planmain)
++target_link_libraries(calligraplan planmain)
+
+-install(TARGETS kdeinit_calligraplan ${INSTALL_TARGETS_DEFAULT_ARGS})
+-
+-target_link_libraries(calligraplan kdeinit_calligraplan planmain)
+ install(TARGETS calligraplan ${INSTALL_TARGETS_DEFAULT_ARGS})
+
+ ########### install files ###############
+diff --git a/src/main.cpp b/src/main.cpp
+index 3b807381..64ae2e8f 100644
+--- a/src/main.cpp
++++ b/src/main.cpp
+@@ -27,7 +27,7 @@
+ #include <QApplication>
+ #include <QLoggingCategory>
+
+-extern "C" Q_DECL_EXPORT int kdemain(int argc, char **argv)
++int main(int argc, char **argv)
+ {
+ /**
+ * Disable debug output by default, only log warnings.
+diff --git a/src/workpackage/CMakeLists.txt b/src/workpackage/CMakeLists.txt
+index 9072ebad..808646d9 100644
+--- a/src/workpackage/CMakeLists.txt
++++ b/src/workpackage/CMakeLists.txt
+@@ -77,7 +77,7 @@ install(TARGETS calligraplanworkpart DESTINATION ${PLUGIN_INSTALL_DIR})
+
+ ########### Calligra PlanWork executable ###############
+
+-set(calligraplanwork_KDEINIT_SRCS main.cpp commandlineparser.cpp)
++set(calligraplanwork_SRCS main.cpp commandlineparser.cpp)
+
+ file(GLOB ICONS_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/pics/*-apps-calligraplanwork.png")
+ ecm_add_app_icon(kdeinit_app_ICONS_SRCS ICONS ${ICONS_SRCS})
+@@ -85,7 +85,7 @@ if(WIN32)
+ set(_resourcefile "${CMAKE_CURRENT_BINARY_DIR}/kdeinit_app_ICONS_SRCS.rc")
+ endif()
+
+-kf5_add_kdeinit_executable(calligraplanwork ${calligraplanwork_KDEINIT_SRCS})
++add_executable(calligraplanwork ${calligraplanwork_SRCS})
+
+ if (APPLE)
+ set_target_properties(calligraplanwork PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist.template)
+@@ -94,7 +94,7 @@ if (APPLE)
+ endif ()
+
+ target_link_libraries(
+- kdeinit_calligraplanwork
++ calligraplanwork
+
+ planworkfactory
+ plankernel
+@@ -105,10 +105,6 @@ target_link_libraries(
+ KF5::DBusAddons
+ )
+
+-install(TARGETS kdeinit_calligraplanwork ${INSTALL_TARGETS_DEFAULT_ARGS})
+-
+-target_link_libraries( calligraplanwork kdeinit_calligraplanwork )
+-
+ install(TARGETS calligraplanwork ${INSTALL_TARGETS_DEFAULT_ARGS})
+
+ ########### install files ###############
+diff --git a/src/workpackage/main.cpp b/src/workpackage/main.cpp
+index 12af06e1..56c0be4f 100644
+--- a/src/workpackage/main.cpp
++++ b/src/workpackage/main.cpp
+@@ -29,7 +29,7 @@
+
+ #include <Calligra2Migration.h>
+
+-extern "C" Q_DECL_EXPORT int kdemain(int argc, char **argv)
++int main(int argc, char **argv)
+ {
+ QApplication app(argc, argv);
+ #ifdef Q_OS_MACOS
+--
+2.43.0
+