summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2024-01-21 21:15:41 +0100
committerAndreas Sturmlechner <asturm@gentoo.org>2024-01-21 21:49:21 +0100
commitfb559bc84696eab050dbfa1849fc13183921d16c (patch)
tree5805eb77dee98930134f145ab3daa0f0b101b20c /app-office/calligraplan
parentdev-python/ytmusicapi: bump to 1.5.0 (diff)
downloadgentoo-fb559bc84696eab050dbfa1849fc13183921d16c.tar.gz
gentoo-fb559bc84696eab050dbfa1849fc13183921d16c.tar.bz2
gentoo-fb559bc84696eab050dbfa1849fc13183921d16c.zip
app-office/calligraplan: Port away from deprecated kinit
Closes: https://bugs.gentoo.org/922506 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'app-office/calligraplan')
-rw-r--r--app-office/calligraplan/calligraplan-3.3.0-r1.ebuild91
-rw-r--r--app-office/calligraplan/files/calligraplan-3.3.0-no-kinit.patch134
2 files changed, 225 insertions, 0 deletions
diff --git a/app-office/calligraplan/calligraplan-3.3.0-r1.ebuild b/app-office/calligraplan/calligraplan-3.3.0-r1.ebuild
new file mode 100644
index 000000000000..79b9a52b5fff
--- /dev/null
+++ b/app-office/calligraplan/calligraplan-3.3.0-r1.ebuild
@@ -0,0 +1,91 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+ECM_HANDBOOK="forceoptional"
+ECM_TEST="forceoptional"
+KFMIN=5.106.0
+QTMIN=5.15.9
+inherit ecm kde.org
+
+DESCRIPTION="Project management application"
+HOMEPAGE="https://calligra.org/plan/"
+
+if [[ ${KDE_BUILD_TYPE} == release ]]; then
+ SRC_URI="mirror://kde/stable/calligra/${PV}/${PN}-${PV}.tar.xz"
+ KEYWORDS="amd64 ~arm64 ~riscv x86"
+fi
+
+LICENSE="GPL-2"
+SLOT="5"
+IUSE="activities +holidays kwallet X"
+
+RESTRICT="test"
+
+# FIXME: Disabled by upstream for good reason
+# Crashes (https://bugs.kde.org/show_bug.cgi?id=311940)
+# $(add_kdeapps_dep akonadi)
+# $(add_kdeapps_dep akonadi-contacts)
+# Currently upstream-disabled:
+# =dev-libs/kproperty-3.0*:5
+# =dev-libs/kreport-3.0*:5
+DEPEND="
+ dev-lang/perl
+ >=dev-libs/kdiagram-2.8.0:5
+ >=dev-qt/designer-${QTMIN}:5
+ >=dev-qt/qtdbus-${QTMIN}:5
+ >=dev-qt/qtgui-${QTMIN}:5
+ >=dev-qt/qtprintsupport-${QTMIN}:5
+ >=dev-qt/qtwidgets-${QTMIN}:5
+ >=dev-qt/qtxml-${QTMIN}:5
+ >=kde-frameworks/karchive-${KFMIN}:5
+ >=kde-frameworks/kcalendarcore-${KFMIN}:5
+ >=kde-frameworks/kconfig-${KFMIN}:5
+ >=kde-frameworks/kconfigwidgets-${KFMIN}:5
+ >=kde-frameworks/kcoreaddons-${KFMIN}:5
+ >=kde-frameworks/kdbusaddons-${KFMIN}:5
+ >=kde-frameworks/kglobalaccel-${KFMIN}:5
+ >=kde-frameworks/kguiaddons-${KFMIN}:5
+ >=kde-frameworks/ki18n-${KFMIN}:5
+ >=kde-frameworks/kiconthemes-${KFMIN}:5
+ >=kde-frameworks/kio-${KFMIN}:5
+ >=kde-frameworks/kitemmodels-${KFMIN}:5
+ >=kde-frameworks/kitemviews-${KFMIN}:5
+ >=kde-frameworks/kjobwidgets-${KFMIN}:5
+ >=kde-frameworks/knotifications-${KFMIN}:5
+ >=kde-frameworks/kparts-${KFMIN}:5
+ >=kde-frameworks/kservice-${KFMIN}:5
+ >=kde-frameworks/ktextwidgets-${KFMIN}:5
+ >=kde-frameworks/kwidgetsaddons-${KFMIN}:5
+ >=kde-frameworks/kwindowsystem-${KFMIN}:5
+ >=kde-frameworks/kxmlgui-${KFMIN}:5
+ activities? ( >=kde-plasma/plasma-activities-${KFMIN}:5 )
+ holidays? ( >=kde-frameworks/kholidays-${KFMIN}:5 )
+ kwallet? (
+ >=app-crypt/qca-2.3.0:2[qt5(+)]
+ >=kde-frameworks/kwallet-${KFMIN}:5
+ )
+ X? (
+ >=dev-qt/qtx11extras-${QTMIN}:5
+ x11-libs/libX11
+ )
+"
+RDEPEND="${DEPEND}
+ !app-office/calligra[calligra_features_plan(-)]
+ >=dev-qt/qtsvg-${QTMIN}:5
+"
+
+PATCHES=( "${FILESDIR}/${P}-no-kinit.patch" ) # bug 922506
+
+src_configure() {
+ local mycmakeargs=(
+ $(cmake_use_find_package activities KF5Activities)
+ $(cmake_use_find_package holidays KF5Holidays)
+ $(cmake_use_find_package kwallet Qca-qt5)
+ $(cmake_use_find_package kwallet KF5Wallet)
+ )
+ # Qt5DBus can't be disabled because of KF5DBusAddons dependency
+
+ ecm_src_configure
+}
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
+