Opened 8 years ago

Closed 7 years ago

#51975 closed enhancement (fixed)

qjson @0.8.1_1 Please add +qt5 variant

Reported by: macports@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: Veence (Vincent), vaccari@…, aaschwanden (Andy Aschwanden), dmarteau (David Marteau)
Port: qjson

Description

Ticket #51770 (which at this writing is closed with an invalid resolution) involves compiling qgis with the +qt5 variant. Its maintainer requested that the latest version of qgis be compiled with the same reported variants to see if the problem in the reported version (2.14.3) is resolved in its latest version (2.16). One of the dependencies of qgis is qjson, and one of the dependencies of qjson is qt4-mac. I was trying to compile qgis with the +qt5 variant so that it would be completely independent of Qt 4; for that to be the case, qjson also needs to have a +qt5 variant, so that when that variant is specified, it too would depend upon qt5 rather than qt4-mac.

Attachments (2)

Portfile.diff (543 bytes) - added by dmarteau (David Marteau) 7 years ago.
Support qt5 variant in Portfile
Portfile-qjson-qt5 (884 bytes) - added by dmarteau (David Marteau) 7 years ago.
Portfile for qjson 0.9.0 qt5

Download all attachments as: .zip

Change History (20)

comment:1 Changed 8 years ago by vaccari@…

Cc: vaccari@… added

Cc Me!

comment:2 Changed 8 years ago by mf2k (Frank Schima)

Cc: vince@… added
Version: 2.3.4

comment:3 Changed 8 years ago by aaschwanden (Andy Aschwanden)

Cc: andy.aschwanden@… added

Cc Me!

comment:4 Changed 7 years ago by dmarteau (David Marteau)

Cc: dmarteau added

Changed 7 years ago by dmarteau (David Marteau)

Attachment: Portfile.diff added

Support qt5 variant in Portfile

comment:5 Changed 7 years ago by dmarteau (David Marteau)

Provided qt5 variant support but qjson does not seem to support qt5 build:

:info:configure CMake Error at /opt/local/share/cmake-3.8/Modules/FindQt4.cmake:1316 (message):
:info:configure   Found unsuitable Qt version "" from NOTFOUND, this code requires Qt 4.x
:info:configure Call Stack (most recent call first):
:info:configure   CMakeLists.txt:35 (FIND_PACKAGE)
:info:configure -- Configuring incomplete, errors occurred!
:info:configure See also "/opt/local/var/macports/build/_Users_david_MACPORT_PATCHES_devel_qjson/qjson/work/qjson-0.8.1/CMakeFiles/CMakeOutput.log".
:info:configure Command failed:  cd "/opt/local/var/macports/build/_Users_david_MACPORT_PATCHES_devel_qjson/qjson/work/qjson-0.8.1" && /opt/local/bin/cmake -DCMAKE_INSTALL_PREFIX='/opt/local' -DCMAKE_BUILD_TYPE=Release -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON -DCMAKE_C_COMPILER="$CC" -DCMAKE_COLOR_MAKEFILE=ON -DCMAKE_CXX_COMPILER="$CXX" -DCMAKE_FIND_FRAMEWORK=LAST -DCMAKE_INSTALL_NAME_DIR=/opt/local/lib -DCMAKE_INSTALL_RPATH=/opt/local/lib -DCMAKE_MODULE_PATH=/opt/local/share/cmake/Modules -DCMAKE_SYSTEM_PREFIX_PATH="/opt/local;/usr" -DCMAKE_VERBOSE_MAKEFILE=ON -Wno-dev -DCMAKE_C_FLAGS_RELEASE="-DNDEBUG" -DCMAKE_CXX_FLAGS_RELEASE="-DNDEBUG" -DCMAKE_OSX_ARCHITECTURES="x86_64" -DCMAKE_OSX_DEPLOYMENT_TARGET="10.11" -DCMAKE_OSX_SYSROOT="/" /opt/local/var/macports/build/_Users_david_MACPORT_PATCHES_devel_qjson/qjson/work/qjson-0.8.1
:info:configure Exit code: 1
:error:configure Failed to configure qjson: configure failure: command execution failed
:debug:configure Error code: NONE
:debug:configure Backtrace: configure failure: command execution failed
:debug:configure     while executing
:debug:configure "$procedure $targetname"

comment:6 Changed 7 years ago by dmarteau (David Marteau)

Apparently only the 0.9.0 version supports Qt5, see https://github.com/flavio/qjson/blob/0.9.0/CMakeLists.txt

Changed 7 years ago by dmarteau (David Marteau)

Attachment: Portfile-qjson-qt5 added

Portfile for qjson 0.9.0 qt5

comment:7 Changed 7 years ago by dmarteau (David Marteau)

Provided Portfile for qjson qt5

IMHO, the best way would be to provide a new port 'qjson-qt5' using version 0.9+ (as there is a qca-qt5 port).

Last edited 7 years ago by dmarteau (David Marteau) (previous) (diff)

comment:8 Changed 7 years ago by mf2k (Frank Schima)

Some notes about your Portfile:

  • Use the GitHub portgroup to simplify the Portfile
  • The revision line should be deleted because it starts at 0 and that is the default value.

I think this port should be incorporated into the existing qjson Portfile as a sub-port.

comment:9 Changed 7 years ago by kencu (Ken)

Why not just update this port to the 0.9.0 version, which can build with either qt4 or qt5 with a simple flag, and have a variant for each?

comment:10 Changed 7 years ago by mf2k (Frank Schima)

Yes, the question is whether to use variants or a sub-port. I prefer sub-ports because then both versions will be buildable and, license permitting, distributable from the buildbots.

comment:11 Changed 7 years ago by mf2k (Frank Schima)

Also variants don't work well for dependencies.

comment:12 Changed 7 years ago by dmarteau (David Marteau)

Also qt4 and qt5 versions should be allowed to install in a non-exclusive way (qt4 and qt5 can be installed simultaneously)

Last edited 7 years ago by dmarteau (David Marteau) (previous) (diff)

comment:13 Changed 7 years ago by kencu (Ken)

Ah - if the requirement is to have both the qt4 and the qt5 versions installed and functional at the same time, then you have a rather more complex situation, to be sure. I didn't realize at first that was needed.

comment:14 in reply to:  12 ; Changed 7 years ago by mf2k (Frank Schima)

Replying to dmarteau:

Also qt4 and qt5 versions should be allowed to install in a non-exclusive way (qt4 and qt5 can be installed simultaneously)

Are you going to submit an updated Portfile diff with all of the changes I mentioned? I will likely not have time until later today or this weekend to work on it myself.

comment:15 in reply to:  14 Changed 7 years ago by dmarteau (David Marteau)

Replying to mf2k:

Are you going to submit an updated Portfile diff with all of the changes I mentioned? I will likely not have time until later today or this weekend to work on it myself.

I will try do it asap (considering that if my skills on portfile are very limited).

comment:16 Changed 7 years ago by mf2k (Frank Schima)

I am looking at the port(s). We need to be able to tell the build system to use qt4 vs. qt5. Do you know the configure flags to switch it?

comment:17 Changed 7 years ago by dmarteau (David Marteau)

Here is:

QT4_BUILD "Force building with Qt4 even if Qt5 is found

comment:18 Changed 7 years ago by mf2k (Frank Schima)

Resolution: fixed
Status: newclosed

In 2378cdccadfbded8331e6c70f7107d5fa60c62ee/macports-ports:

qjson: Update to version 0.9.0. Add qjson-qt5 subport.

Closes: #51975

Note: See TracTickets for help on using tickets.