Bug 220045 - [NEW PORT] split part of www/qt5-websockets into new port www/qt5-websockets-qml
Summary: [NEW PORT] split part of www/qt5-websockets into new port www/qt5-websockets-qml
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: kde
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-06-16 12:37 UTC by groot
Modified: 2017-07-08 10:44 UTC (History)
5 users (show)

See Also:


Attachments
Split port (3.95 KB, patch)
2017-06-16 12:37 UTC, groot
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description groot 2017-06-16 12:37:25 UTC
Created attachment 183530 [details]
Split port

The attached patch splits qt5-websockets into a qt5-websockets port containing the core parts, and a qt5-websockets-qml port with the QML parts. The QML parts depend on Qt Quick, so on the GUI parts (and hence X11) while the core parts do not.

Patch also available in the KDE ports tree on github.

Requested by kenmoore; implementation groot@kde and tcberner.
Comment 1 groot 2017-06-16 12:42:19 UTC
(no exp-run -- there are no clients of this in the ports tree yet)
Comment 2 Raphael Kubo da Costa freebsd_committer 2017-06-16 15:35:14 UTC
Technically speaking the patch looks OK, but I seem to be lacking some context. Whenever we split a program into multiple ports we need to consider the pros and cons of doing (and maintaining) that work ourselves, so what's driving this change here?
Comment 3 Tobias C. Berner freebsd_committer 2017-06-16 15:39:17 UTC
I'm also not a fan of splitting it. But apparently TrueOS uses it for their (non-gui) tools.
Comment 4 groot 2017-06-17 09:28:20 UTC
I'll quote some things from kenmoore in IRC for context:

<kenmoore>: Quick Question: Why does the qt5-websocket port require the qt5-quick port? QtQuick is a graphical tool and brings in all the widgets/etc, but websocket is purely a CLI/core module: (reference: http://www.freshports.org/www/qt5-websockets/) I just noticed that our "server" utility was sucking in all of X11 and tracked it down to the Qt5-websocket port.

That's the question behind it: if you want to use qt5 websockets from a text-only, command-line, QtCoreApplication, the existing port pulls in the core bits for websockets, but also the QML bindings which add the whole QtGui stack. That's not-so-convenient for a text application, just in terms of what gets installed alongside.

Debian has packages that allow installing the core parts separately from the QML bindings (which pull in the GUI stack). So this split mirrors what Debian already do, and is convenient for those downstream consumers of Qt5 on FreeBSD that want websockets, without the GUI.
Comment 5 Iblis Lin 2017-06-17 10:52:16 UTC
(courous about why ask maintainer-feedback from me?
Comment 6 Mark Linimon freebsd_committer freebsd_triage 2017-06-17 14:45:40 UTC
(In reply to Iblis Lin from comment #5)

Because I grabbed the first output of the query for "websockets" (net/libwebsockets), sorry.
Comment 7 Raphael Kubo da Costa freebsd_committer 2017-07-06 08:42:30 UTC
Alright, with the extra context I guess it makes sense to move forward with this. A few questions and comments:
- Can you add some context to the new patches to the .pro files explaining why we're doing this?
- Have you checked if the ports currently depending on qt5-websockets need to have their dependencies updated and their PORTREVISIONs bumped?
Comment 8 Tobias C. Berner freebsd_committer 2017-07-06 15:21:07 UTC
You're right, the dependencies need to be doublechecked whether which webscocket component they need.
Comment 9 groot 2017-07-06 20:05:56 UTC
Shotcut, sysadm and sysadm-client (the three ports that use qt5-websockets) all build unchanged (on 10.3 amd64 at least) -- they do not use the QML bindings.
Comment 10 commit-hook freebsd_committer 2017-07-06 20:41:48 UTC
A commit references this bug:

Author: tcberner
Date: Thu Jul  6 20:40:52 UTC 2017
New revision: 445169
URL: https://svnweb.freebsd.org/changeset/ports/445169

Log:
  Split part of www/qt5-websockets into new port www/qt5-websockets-qml

  This splits qt5-websockets into a qt5-websockets port containing the core parts,
  and a qt5-websockets-qml port with the QML parts. The QML parts depend on Qt Quick,
  so on the GUI parts (and hence X11) while the core parts do not.

  PR:		220045
  Submitted by:	Adriaan de Groot <groot@kde.org>

Changes:
  head/Mk/bsd.qt.mk
  head/multimedia/shotcut/Makefile
  head/sysutils/sysadm/Makefile
  head/sysutils/sysadm-client/Makefile
  head/www/Makefile
  head/www/qt5-websockets/Makefile
  head/www/qt5-websockets/files/
  head/www/qt5-websockets/files/patch-src_src.pro
  head/www/qt5-websockets/pkg-plist
  head/www/qt5-websockets-qml/
  head/www/qt5-websockets-qml/Makefile
  head/www/qt5-websockets-qml/files/
  head/www/qt5-websockets-qml/files/patch-src_src.pro
  head/www/qt5-websockets-qml/pkg-plist
Comment 11 Tobias C. Berner freebsd_committer 2017-07-06 20:42:39 UTC
Committed, Thanks.
Comment 12 commit-hook freebsd_committer 2017-07-08 10:44:47 UTC
A commit references this bug:

Author: rakuco
Date: Sat Jul  8 10:44:13 UTC 2017
New revision: 445316
URL: https://svnweb.freebsd.org/changeset/ports/445316

Log:
  Fix qt5-websockets-qml's dependency path in bsd.qt.mk.

  libdeclarative_qmlwebsockets.so is not installed into ${QT_LIBDIR}, which
  causes the dependency logic in bsd.qt.mk to actually do something equivalent to
  this instead:

      BUILD_DEPENDS+=  ${QT_LIBDIR}/${QT_QMLDIR}/QtWebSockets/libdeclarative_qmlwebsockets.so:www/qt5-websockets-qml
      RUN_DEPENDS+=    ${QT_LIBDIR}/${QT_QMLDIR}/QtWebSockets/libdeclarative_qmlwebsockets.so:www/qt5-websockets-qml

  which translates into something like

      /usr/local/lib/qt5//usr/local/lib/qt5/qml/QtWebSockets/libdeclarative_qmlwebsockets.so:www/qt5-websockets-qml

  which obviously does not exist.

  Instead of settin websockets-qml_LIB, set websockets-qml_PATH like we do for
  other QML ports, so that our dependency logic does not needlessly prepend
  ${QT_LIBDIR} there. This fixes devel/qt5's build.

  PR:		220045

Changes:
  head/Mk/bsd.qt.mk