Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved]Help with writing ebuild dependent on running qmake5
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
azp
Guru
Guru


Joined: 16 Nov 2003
Posts: 456
Location: Sweden

PostPosted: Sat Feb 17, 2018 6:45 pm    Post subject: [Solved]Help with writing ebuild dependent on running qmake5 Reply with quote

I'm trying to write an ebuild for renderdoc (including the Qt5 GUI) and it's working for the most part. The issue I have is that it uses the qmake that is set via qtchooser, that for me is qmake4. I need the ebuild to automatically choose qt5. RenderDoc is built using CMake, which makes it a bit confusing, I'm having trouble understand where to set what...

Code:
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI="6"

PYTHON_COMPAT=( python3_6 )

inherit qmake-utils cmake-multilib eutils python-single-r1 git-r3

DESCRIPTION="A tool for tracing, analyzing, and debugging graphics APIs"
HOMEPAGE="https://github.com/baldurk/renderdoc"
EGIT_REPO_URI="https://github.com/baldurk/renderdoc.git"
EGIT_BRANCH="v1.x"
CMAKE_BUILD_TYPE="Release"
CMAKE_BUILD_GENERATOR="Ninja"
QMAKE_QT5_COMMAND="/usr/lib/qt5/bin/qmake"

LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~arm ~x86"
IUSE="+cli +qt5 +python"

RDEPEND="${PYTHON_DEPS}
   x11-libs/libX11
   x11-libs/libxcb
   x11-libs/xcb-util-keysyms
   dev-util/cmake
   sys-devel/bison
   sys-devel/autoconf
   sys-devel/automake
   dev-libs/libpcre
   >=sys-devel/gcc-5.0:*
   python? (
      >=dev-lang/python-3.6
   )
   qt5? (
      dev-qt/qtcore:5
      dev-qt/qtgui:5
      dev-qt/qtwidgets:5
      dev-qt/qtsvg:5
      dev-qt/qtx11extras:5
   )"
DEPEND="${RDEPEND}"


The QRenderDoc CMakeLists.txt specifies the QMAKE_QT5_COMMAND variable to "qmake", and I've tried setting it specifically in the ebuild, but it doesn't work. You can see the file here:
https://github.com/baldurk/renderdoc/blob/v0.x/qrenderdoc/CMakeLists.txt

Do I need to patch the CMakeLists.txt, or is it possible to just set a smart variable somewhere, and it automatically solves the problem?
_________________
Weeks of coding can save you hours of planning.


Last edited by azp on Wed Mar 14, 2018 9:33 pm; edited 1 time in total
Back to top
View user's profile Send private message
azp
Guru
Guru


Joined: 16 Nov 2003
Posts: 456
Location: Sweden

PostPosted: Sat Feb 17, 2018 7:49 pm    Post subject: Reply with quote

I tried setting the QT_SELECT variable in the ebuild and that seems to do the trick. I don't know if that's an OK way of doing it, but there seems to be a bunch of official ebuilds doing it.

Code:
export QT_SELECT=5

_________________
Weeks of coding can save you hours of planning.
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30905
Location: here

PostPosted: Sat Feb 17, 2018 7:52 pm    Post subject: Reply with quote

export QT_SELECT=qt5? (example /usr/portage/media-video/vlc/vlc-2.2.6.ebuild)
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
azp
Guru
Guru


Joined: 16 Nov 2003
Posts: 456
Location: Sweden

PostPosted: Sun Feb 18, 2018 1:03 am    Post subject: Reply with quote

fedeliallalinea wrote:
export QT_SELECT=qt5? (example /usr/portage/media-video/vlc/vlc-2.2.6.ebuild)


Thanks, QT_SELECT did the trick!
_________________
Weeks of coding can save you hours of planning.
Back to top
View user's profile Send private message
Chiitoo
Administrator
Administrator


Joined: 28 Feb 2010
Posts: 2573
Location: Here and Away Again

PostPosted: Sun Feb 18, 2018 6:32 am    Post subject: ><)))°€ Reply with quote

Using QT_SELECT might not be the best of ideas:

Freenode #gentoo-qt wrote:
<@kensington> it's better to patch to use "$(qt5_get_bindir)"/qmake instead, QT_SELECT is some qtchooser implementation
detail and not guaranteed to be stable

_________________
Kindest of regardses.
Back to top
View user's profile Send private message
gargoylle_ltk
n00b
n00b


Joined: 28 Jun 2004
Posts: 33

PostPosted: Sat Mar 10, 2018 5:46 am    Post subject: Reply with quote

Code:
qmake -qt=qt5

This seems to work for me when building anything depending on Qt.
Back to top
View user's profile Send private message
azp
Guru
Guru


Joined: 16 Nov 2003
Posts: 456
Location: Sweden

PostPosted: Sat Mar 10, 2018 1:37 pm    Post subject: Reply with quote

gargoylle_ltk wrote:
Code:
qmake -qt=qt5
This seems to work for me when building anything depending on Qt.


I tried to make a patch that did that, but couldn't get it to work... Perhaps I should try again. I also thought about reporting a bug upstream, so they fixed it there instead.
_________________
Weeks of coding can save you hours of planning.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum