Bug 234692 - www/falkon: Make KDE5 integration optional
Summary: www/falkon: Make KDE5 integration optional
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-kde (group)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-01-07 16:20 UTC by Ken Moore
Modified: 2019-02-27 21:48 UTC (History)
3 users (show)

See Also:
rakuco: maintainer-feedback+


Attachments
Patch file for www/falkon Makefile (835 bytes, text/plain)
2019-01-07 16:20 UTC, Ken Moore
no flags Details
Patch file for www/falkon pkg-plist (485 bytes, patch)
2019-01-07 16:21 UTC, Ken Moore
no flags Details | Diff
www/falkon Makefile patch (with KWALLET option enabled by default) (861 bytes, patch)
2019-01-07 17:51 UTC, Ken Moore
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ken Moore 2019-01-07 16:20:21 UTC
Created attachment 200868 [details]
Patch file for www/falkon Makefile

Patches attached to move the KWALLET integration to an optional alongside the current GNOME-Keyring integration option.
This also catches/fixes some unlisted build dependencies that the KWALLET integration was silently pulling in.

Summary of Changes:
* USE_KDE = ecm_build (enhanced cmake modules - required for build)
* USE_QT += linguist_build (Qt linguist support - required for generating translation files)
* USE_KDE += kwallet moves to new "KWALLET" option.

Notes:
This will change the default behavior to NOT building with KWALLET integrations. If continuity is desired with the previous port version, then the following line should also be added to the Makefile:

```
OPTIONS_DEFAULT+= KWALLET
```

Simple Text of patch files (in case attaching them does not work)
---------

patch-Makefile.txt
```
--- Makefile	2019-01-07 10:44:17.400370000 -0500
+++ Makefile.new	2019-01-07 10:50:40.739012000 -0500
@@ -2,7 +2,7 @@
 
 PORTNAME=	falkon
 DISTVERSION=	3.0.0
-PORTREVISION=	4
+PORTREVISION=	5
 CATEGORIES=	www
 MASTER_SITES=	KDE/stable/falkon/${DISTVERSION:R}/src/
 
@@ -13,16 +13,18 @@
 LICENSE_FILE=	${WRKSRC}/COPYING
 
 USES=		cmake desktop-file-utils kde:5 qt:5 ssl tar:xz
-USE_KDE=	wallet
+USE_KDE=	ecm_build
 USE_QT=		core dbus declarative gui location network printsupport \
 		sql webchannel webengine widgets x11extras \
-		buildtools_build qmake_build
+		buildtools_build qmake_build linguist_build
 USE_XORG=	xcb
 
 USE_LDCONFIG=	yes
 
-OPTIONS_DEFINE=	GNOMEKEYRING
+OPTIONS_DEFINE=	GNOMEKEYRING KWALLET
 OPTIONS_SUB=	YES
+
+KWALLET_USE=	KDE+=wallet
 
 GNOMEKEYRING_CMAKE_BOOL=	BUILD_KEYRING
 GNOMEKEYRING_USE=		GNOME=glib20
```

patch-pkg-plist.txt
```
--- pkg-plist	2019-01-07 10:44:17.400923000 -0500
+++ pkg-plist.new	2019-01-07 10:52:08.714227000 -0500
@@ -6,7 +6,7 @@
 %%GNOMEKEYRING%%%%QT_PLUGINDIR%%/falkon/GnomeKeyringPasswords.so
 %%QT_PLUGINDIR%%/falkon/GreaseMonkey.so
 %%QT_PLUGINDIR%%/falkon/ImageFinder.so
-%%QT_PLUGINDIR%%/falkon/KWalletPasswords.so
+%%KWALLET%%%%QT_PLUGINDIR%%/falkon/KWalletPasswords.so
 %%QT_PLUGINDIR%%/falkon/MouseGestures.so
 %%QT_PLUGINDIR%%/falkon/PIM.so
 %%QT_PLUGINDIR%%/falkon/StatusBarIcons.so
```
Comment 1 Ken Moore 2019-01-07 16:21:01 UTC
Created attachment 200869 [details]
Patch file for www/falkon pkg-plist
Comment 2 Lorenzo Salvadore freebsd_committer freebsd_triage 2019-01-07 16:23:56 UTC
Thanks for this patch Ken. As a falkon user but not a kde user I appreciate it.
Comment 3 Tobias C. Berner freebsd_committer freebsd_triage 2019-01-07 17:15:10 UTC
The default needs to be kwallet on. This is the defacto KDE browser after all :)


Mfg Tobias
Comment 4 Tobias C. Berner freebsd_committer freebsd_triage 2019-01-07 17:17:17 UTC
Could you also add an explicit toggle on kwallet. Otherwise it will still link against it when built in an unclean environment where it is present.
Comment 5 Ken Moore 2019-01-07 17:50:22 UTC
(In reply to Tobias C. Berner from comment #3)
I will update the Makefile patch with this change in just a moment
Comment 6 Ken Moore 2019-01-07 17:51:17 UTC
Created attachment 200874 [details]
www/falkon Makefile patch (with KWALLET option enabled by default)
Comment 7 Ken Moore 2019-01-07 18:02:17 UTC
(In reply to Tobias C. Berner from comment #4)
Because Falkon does some dynamic linking at [build/run]time to determine if the kwallet libraries are installed, I am unsure how we would even go about fixing this in a "dirty" build environment without modification of the falkon source code itself. 

I would recommend making that a later enhancement to the port and not hold up this update because of it.
Comment 8 Tobias C. Berner freebsd_committer freebsd_triage 2019-01-07 19:04:10 UTC
(In reply to Ken Moore from comment #7)
find_package(KF5Wallet ${KF5_MIN_VERSION} CONFIG) <-- 
Find calls to Foo can be ignored with CMAKE_DISABLE_FIND_PACKAGE_Foo [1]

And thereby
 18 if (KF5Wallet_FOUND)
 19     add_subdirectory(KWalletPasswords)
 20 endif()
should be skipped, as it is not _FOUND :-)


[1] https://cmake.org/cmake/help/v3.13/variable/CMAKE_DISABLE_FIND_PACKAGE_PackageName.html#variable:CMAKE_DISABLE_FIND_PACKAGE_%3CPackageName%3E
Comment 9 Ken Moore 2019-01-07 20:46:43 UTC
(In reply to Tobias C. Berner from comment #8)

That is outside my area of expertise with ports.
Feel free to update the patch as you see fit.
Comment 10 commit-hook freebsd_committer freebsd_triage 2019-02-17 21:22:35 UTC
A commit references this bug:

Author: adridg
Date: Sun Feb 17 21:22:17 UTC 2019
New revision: 493225
URL: https://svnweb.freebsd.org/changeset/ports/493225

Log:
  Update www/falkon to the latest release.

  Release notes https://www.falkon.org/2018/05/08/falkon-301-released/

  There's one bit of trickery here, which handles QtWebEngine < 5.10 mixed
  with newer Qt -- just the situation the ports tree is in today.

  Thanks to Ken Moore for providing partial patches for OPTION KWALLET.

  PR:		235681 235680 234692
  Reported by:	Nuno Teixeira, Ken Moore

Changes:
  head/www/falkon/Makefile
  head/www/falkon/distinfo
  head/www/falkon/files/patch-src_lib_webengine_webview.cpp
  head/www/falkon/pkg-descr
  head/www/falkon/pkg-plist
Comment 11 Adriaan de Groot freebsd_committer freebsd_triage 2019-02-17 21:29:40 UTC
Massaged a bit, and updated with _DESC and other bits (er .. those were superfluous and I'll remove them again). This got crossed with an update to Falkon which is why it took a little while. Thanks for reporting.
Comment 12 commit-hook freebsd_committer freebsd_triage 2019-02-17 21:30:45 UTC
A commit references this bug:

Author: adridg
Date: Sun Feb 17 21:30:10 UTC 2019
New revision: 493226
URL: https://svnweb.freebsd.org/changeset/ports/493226

Log:
  Remove superfluous _DESC in www/falkon.

  PR:		234692

Changes:
  head/www/falkon/Makefile
Comment 13 Ken Moore 2019-02-20 14:14:23 UTC
It looks like you missed a line in the update:
The "wallet" item needs to be removed from line 15:
`USE_KDE=        ecm_build i18n wallet`
needs to become
`USE_KDE=        ecm_build i18n`
since the "wallet" items get added via the option now. Otherwise the KWALLET option will not matter and all the KDE wallet dependencies are still going to get included as runtime dependencies anyway even if Falkon will not use them because the linking with cmake was disabled.
Comment 14 commit-hook freebsd_committer freebsd_triage 2019-02-21 12:39:05 UTC
A commit references this bug:

Author: adridg
Date: Thu Feb 21 12:38:54 UTC 2019
New revision: 493500
URL: https://svnweb.freebsd.org/changeset/ports/493500

Log:
  Fix misplaced OPTION.

  The intent in a previous commit was to make KDE=wallet optional,
  but I forgot to remove the non-optional part. Bump PORTREVISION
  because the options might change for consumers.

  PR:		234692
  Reported by:	Ken Moore

Changes:
  head/www/falkon/Makefile
Comment 15 Raphael Kubo da Costa freebsd_committer freebsd_triage 2019-02-27 21:48:36 UTC
Closing again after ports r493500.