Hey there, the current ebuild for dev-libs/qjson, qjson-0.8.1-r1.ebuild, has a strong dependency on qt4: RDEPEND="dev-qt/qtcore:4[${MULTILIB_USEDEP}]" DEPEND="${RDEPEND} doc? ( app-doc/doxygen ) test? ( dev-qt/qttest:4[${MULTILIB_USEDEP}] )" DOCS=( ChangeLog README.md ) multilib_src_configure() { local mycmakeargs=( $(cmake-utils_use test QJSON_BUILD_TESTS) -DQT_QMAKE_EXECUTABLE=/usr/$(get_libdir)/qt4/bin/qmake ) cmake-utils_src_configure } This is not strictly required, as qjson would use qt5 if available, see https://github.com/flavio/qjson/blob/master/CMakeLists.txt ~ 43 - 67 option(QT4_BUILD "Force building with Qt4 even if Qt5 is found") IF (NOT QT4_BUILD) FIND_PACKAGE( Qt5Core QUIET ) ENDIF() IF (Qt5Core_FOUND) MESSAGE ("Qt5 found") INCLUDE_DIRECTORIES(${Qt5Core_INCLUDE_DIRS}) ADD_DEFINITIONS(${Qt5Core_DEFINITIONS}) SET(PC_Requires "Qt5Core") # Tell CMake to run moc when necessary: set(CMAKE_AUTOMOC ON) # As moc files are generated in the binary dir, tell CMake # to always look for includes there: set(CMAKE_INCLUDE_CURRENT_DIR ON) ELSE() MESSAGE ("Qt5 not found, searching for Qt4") # Find Qt4 FIND_PACKAGE( Qt4 REQUIRED ) # Include the cmake file needed to use qt4 INCLUDE( ${QT_USE_FILE} ) SET(PC_Requires "QtCore") ENDIF() I have no idea how to update the .ebuild, can you please add the check for either qt4 or qt5? :) Kind regards, Dean De Leo
Note that we can't do this until upstream makes some naming/versioning changes otherwise Qt4 consumers will break.
What's the point of this? Qt5 has JSON support out of the box[1]. All packages I've seen so far rely on the built-in support when building against Qt5, and fallback to the qjson library only when building against Qt4. [1] http://doc.qt.io/qt-5/json.html