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

See Also:
bugzilla: maintainer-feedback? (kde)


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 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 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 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 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.