Rafael Sadowski writes: > On Sun Dec 12, 2021 at 03:41:48PM +0100, Rafael Sadowski wrote: >> I'll fix calligra. >>
I propose an inline diff that does the following three things: 1.) Removes kcalendarcore and kcontacts from BUILD_DEPENDS and RUN_DEPENDS. These are listed as optional and only linked in if KF5Akondai is also found. I propose removing until KF5Akondai is added. CMakeFiles.txt lists purposes: KF5CalendarCore: PURPOSE "Optionally used by semantic item Event" KF5Contacts: PURPOSE "Optionally used by semantic item Contact" KF5AkonadiCore: PURPOSE "Optionally used by semantic items Event and Contact" plugins/semanticitems/event/CMakeLists.txt 19:if (KF5CalendarCore_FOUND AND KF5Akonadi_FOUND) plugins/semanticitems/contact/CMakeLists.txt 19:if (KF5Contacts_FOUND AND KF5Akonadi_FOUND) 2.) Add math/imath to LIB_DEPENDS. graphics/openexr split off the math/imath library. According to this commit, calligra only relies on imath and does not need to link to openexr. see: https://invent.kde.org/office/calligra/-/commit/c52eb33f20a66acb648b725e2eee3ed977eae896 3.) Set OpenEXR_FOUND in CMakeLists.txt patch. OpenEXR_FOUND is used for conditional linking in lcms2 and libs/pigment. It should be set by either extra-cmake-modules or ${WRKSRC}/cmake/modules/FindOpenEXR.cmake, but it does not utilize these files because it finds Imath directly: macro_optional_find_package(Imath 3.0 CONFIG QUIET) OPENEXR_FOUND (all caps) is set in FindOpenEXR.cmake but the other bits use OpenEXR_FOUND. $ ag OpenEXR_FOUND plugins/colorengines/lcms2/tests/CMakeLists.txt 15:if(OpenEXR_FOUND) plugins/colorengines/lcms2/CMakeLists.txt 34:if (HAVE_LCMS24 AND OpenEXR_FOUND) 44:if(OpenEXR_FOUND) 83:if (HAVE_LCMS24 AND OpenEXR_FOUND) libs/pigment/CMakeLists.txt 15:if(OpenEXR_FOUND) Testing ======= I could not really test runtime as I am not sure how to make use of the pigment and lcms2 color management system. #2 and #3 allow linking with Imath: -lImath-3_1 `make test' has a similar amounts of tests pass. before: 26% tests passed, 106 tests failed out of 143 after: 26% tests passed, 105 tests failed out of 142 Test #103: libs-pigment-TestKoColorSpaceMaths is the only test that uses half.h and imath, and that still passes. Index: Makefile =================================================================== RCS file: /cvs/ports/editors/calligra/Makefile,v retrieving revision 1.48 diff -u -p -u -p -r1.48 Makefile --- Makefile 13 Dec 2021 18:21:35 -0000 1.48 +++ Makefile 16 Dec 2021 00:55:10 -0000 @@ -5,7 +5,7 @@ HOMEPAGE = https://www.calligra.org VERSION = 3.2.1 DISTNAME = calligra-${VERSION} CATEGORIES = editors -REVISION = 4 +REVISION = 5 SHARED_LIBS = RtfReader 51.0 # 0.0 SHARED_LIBS += basicflakes 50.0 # 0.0 @@ -50,7 +50,8 @@ MAINTAINER = Rafael Sadowski <rsadowski@ PERMIT_PACKAGE = Yes DPB_PROPERTIES = parallel -WANTLIB += ${COMPILER_LIBCXX} ICE KChart KF5Activities KF5Archive +WANTLIB += ${COMPILER_LIBCXX} ICE Imath-3_1 +WANTLIB += KChart KF5Activities KF5Archive WANTLIB += KF5Auth KF5AuthCore KF5Bookmarks KF5Codecs KF5Completion WANTLIB += KF5ConfigCore KF5ConfigGui KF5ConfigWidgets KF5CoreAddons WANTLIB += KF5Crash KF5DBusAddons KF5GuiAddons KF5I18n KF5IconThemes @@ -73,8 +74,6 @@ COMPILER = base-clang ports-gcc BUILD_DEPENDS = devel/boost \ devel/gettext,-tools \ - devel/kf5/kcalendarcore \ - devel/kf5/kcontacts \ devel/kf5/kdoctools \ devel/kf5/kinit \ devel/kf5/kross \ @@ -84,8 +83,6 @@ BUILD_DEPENDS = devel/boost \ RUN_DEPENDS = devel/desktop-file-utils \ devel/gettext,-runtime \ - devel/kf5/kcalendarcore \ - devel/kf5/kcontacts \ devel/kf5/kinit \ devel/kf5/ktexteditor \ misc/shared-mime-info \ @@ -121,6 +118,7 @@ LIB_DEPENDS = converters/libiconv \ devel/kf5/sonnet \ graphics/kdiagram \ graphics/lcms2 \ + math/imath \ multimedia/phonon \ print/poppler,-qt5 \ security/qca-qt5 \ Index: patches/patch-CMakeLists_txt =================================================================== RCS file: /cvs/ports/editors/calligra/patches/patch-CMakeLists_txt,v retrieving revision 1.3 diff -u -p -u -p -r1.3 patch-CMakeLists_txt --- patches/patch-CMakeLists_txt 31 Aug 2021 07:31:43 -0000 1.3 +++ patches/patch-CMakeLists_txt 16 Dec 2021 00:55:10 -0000 @@ -13,7 +13,7 @@ From sthen@ Index: CMakeLists.txt --- CMakeLists.txt.orig +++ CMakeLists.txt -@@ -391,8 +391,13 @@ endif () +@@ -391,8 +391,14 @@ endif () ## Check for OpenEXR ## @@ -22,6 +22,7 @@ Index: CMakeLists.txt +macro_optional_find_package(Imath 3.0 CONFIG QUIET) +if(TARGET Imath::Imath) + set(OPENEXR_LIBRARIES Imath::Imath) ++ set(OpenEXR_FOUND TRUE) +else() + macro_optional_find_package(OpenEXR) +endif() @@ -29,7 +30,7 @@ Index: CMakeLists.txt ## ## Test for GNU Scientific Library -@@ -641,8 +646,8 @@ if(NOT WIN32 AND NOT APPLE) +@@ -641,8 +647,8 @@ if(NOT WIN32 AND NOT APPLE) ) endif() @@ -40,7 +41,7 @@ Index: CMakeLists.txt set(FREETYPE_INCLUDE_DIRS "") else() add_definitions( -DSHOULD_BUILD_FONT_CONVERSION ) -@@ -912,6 +917,9 @@ set(KOPAGEAPP_INCLUDES ${TEXTLAYOUT_INCLUDES} +@@ -912,6 +918,9 @@ set(KOPAGEAPP_INCLUDES ${TEXTLAYOUT_INCLUDES} ${CMAKE_SOURCE_DIR}/libs/pageapp ${CMAKE_SOURCE_DIR}/libs/pageapp/commands ${CMAKE_BINARY_DIR}/libs/pageapp )