orbital icon indicating copy to clipboard operation
orbital copied to clipboard

Draft Gentoo ebuild

Open Hertz642 opened this issue 10 years ago • 9 comments

Here are the ebuilds that I used to build Nuclear and Orbital. I plan to submit them once I finish working out the bugs:

dev-libs/nuclear/nuclear-9999.ebuild:

# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI=4
inherit cmake-utils

DESCRIPTION="Nuclear is a shell plugin for Weston with a custom protocol to talk to shell clients like Orbital."
HOMEPAGE="https://github.com/nuclide/nuclear"

inherit git-2
EGIT_REPO_URI="https://github.com/nuclide/nuclear.git"
EGIT_BRANCH="master"

LICENSE="LGPL-3"
SLOT="0"
KEYWORDS=""

RDEPEND="
    >=dev-libs/wayland-1.3.0
    >=dev-libs/weston-1.3.0
"
DEPEND="${RDEPEND}"

app-misc/orbital/orbital-9999.ebuild:

# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI=4
inherit cmake-utils

DESCRIPTION="Orbital is a Qt5 shell client for Wayland, using the Nuclear plugin for Weston."
HOMEPAGE="https://github.com/giucam/orbital"

inherit git-2
EGIT_REPO_URI="https://github.com/giucam/orbital.git"
EGIT_BRANCH="master"

LICENSE="LGPL-2"
SLOT="0"
KEYWORDS=""

IUSE="+alsa +kde-solid"

DEPEND_COMMON="
    >=dev-qt/qtwayland-5.2.0[qml]
    >=dev-qt/qtcore-5.2.0
    >=dev-qt/qtgui-5.2.0
    >=dev-qt/qtdeclarative-5.2.0[widgets]
    >=dev-qt/qtwidgets-5.2.0
    >=dev-qt/linguist-tools-5.2.0
    >=dev-qt/qtdbus-5.2.0
    alsa? ( media-libs/alsa-lib )
    kde-solid? ( =kde-frameworks/solid-9999 )
"
DEPEND="${DEPEND_COMMON}"
RDEPEND="${DEPEND_COMMON}
    >=dev-qt/qtgraphicaleffects-5.2.0
    >=dev-qt/qtquickcontrols-5.2.0
"

Hertz642 avatar Dec 28 '13 16:12 Hertz642

Updated orbital ebuild, with the Oxygen Qt theme as a runtime dependency:

# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI=4
inherit cmake-utils

DESCRIPTION="Orbital is a Qt5 shell client for Wayland, using the Nuclear plugin for Weston."
HOMEPAGE="https://github.com/giucam/orbital"

inherit git-2
EGIT_REPO_URI="https://github.com/giucam/orbital.git"
EGIT_BRANCH="master"

LICENSE="LGPL-2"
SLOT="0"
KEYWORDS=""

IUSE="+alsa +kde-solid"

DEPEND_COMMON="
    >=dev-qt/qtwayland-5.2.0[qml]
    >=dev-qt/qtcore-5.2.0
    >=dev-qt/qtgui-5.2.0
    >=dev-qt/qtdeclarative-5.2.0[widgets]
    >=dev-qt/qtwidgets-5.2.0
    >=dev-qt/linguist-tools-5.2.0
    >=dev-qt/qtdbus-5.2.0
    alsa? ( media-libs/alsa-lib )
    kde-solid? ( =kde-frameworks/solid-9999 )
"
DEPEND="${DEPEND_COMMON}"
RDEPEND="${DEPEND_COMMON}
    >=dev-qt/qtgraphicaleffects-5.2.0
    >=dev-qt/qtquickcontrols-5.2.0
    x11-themes/oxygen-molecule
"

Hertz642 avatar Dec 28 '13 21:12 Hertz642

I looked at the flags you added and I am trying to get the ebuild to set them. When I added them to the ebuild it runs cmake with these arguments: '-Dalsa=ON' and '-Dsolid=ON', when they are enabled (and OFF when disabled). Is this the correct way to set those flags?

Hertz642 avatar Dec 29 '13 06:12 Hertz642

no, it's -Duse_alsa/solid=0 or 1

giucam avatar Dec 29 '13 15:12 giucam

Okay, the ebuild below will use, e.g. '-Duse_alsa=ON' which looks like a synonym for '-Duse_alsa=1'. The documentation I was using for this is here: http://devmanual.gentoo.org/eclass-reference/cmake-utils.eclass/

I also updated the license string. I will do another test build of this and then submit it, unless there are more changes that need to be made.

# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI=4
inherit cmake-utils

DESCRIPTION="Orbital is a Qt5 shell client for Wayland, using the Nuclear plugin for Weston."
HOMEPAGE="https://github.com/giucam/orbital"

inherit git-2
EGIT_REPO_URI="https://github.com/giucam/orbital.git"
EGIT_BRANCH="master"

LICENSE="GPL-3"
SLOT="0"
KEYWORDS=""

IUSE="+alsa +kde-solid"

DEPEND_COMMON="
    >=dev-qt/qtwayland-5.2.0[qml]
    >=dev-qt/qtcore-5.2.0
    >=dev-qt/qtgui-5.2.0
    >=dev-qt/qtdeclarative-5.2.0[widgets]
    >=dev-qt/qtwidgets-5.2.0
    >=dev-qt/linguist-tools-5.2.0
    >=dev-qt/qtdbus-5.2.0
    alsa? ( media-libs/alsa-lib )
    kde-solid? ( =kde-frameworks/solid-9999 )
"
DEPEND="${DEPEND_COMMON}"
RDEPEND="${DEPEND_COMMON}
    >=dev-qt/qtgraphicaleffects-5.2.0
    >=dev-qt/qtquickcontrols-5.2.0
    x11-themes/oxygen-molecule
"

src_configure() {
    export PATH="/usr/lib/qt5/bin:$PATH"
    local mycmakeargs=(
        $(cmake-utils_use alsa use_alsa)
        $(cmake-utils_use kde-solid use_solid)
    )
    cmake-utils_src_configure
}

Hertz642 avatar Dec 29 '13 17:12 Hertz642

From my nonexistent knoweledge of ebuilds and gentoo these look good to me :).

giucam avatar Dec 30 '13 14:12 giucam

Okay. I am basically waiting on this: https://bugs.gentoo.org/show_bug.cgi?id=496344 before I finalize the ebuilds, so that you can actually build it from Qt 5.2.0 instead of the live 5.2.* branch. Well, and I need to find a solution to the Qtdbus compilation problem I have been having with loginservice.cpp.

Also, people might have a problem with the ebuilds if they have to upgrade GCC to fix the bug that makes the Nuclear compilation fail. I can list the upgraded GCC as a dependency, but it can be installed alongside the previous version and I don't know how to tell it to select the newer version automatically. And the ebuild might be postponed for addition into the distributed set of ebuilds (portage) until the new version of GCC is marked as the stable one. This is my first ebuild, so I don't really know what Gentoo's policies are. If there is an easy workaround that either you could do in the code, or I could do in the ebuild, it might improve the odds of getting it into portage.

I have been tweaking the required dependencies. I looked through the code and I think I got all of them, but maybe you could double check? It would also be helpful to know what the minimum required versions are (I just guessed).

Nuclear dependencies (DEPEND is build dependencies, RDEPEND is runtime dependencies):

DEPEND_COMMON="
    >=dev-libs/wayland-1.3
    >=dev-libs/weston-1.3
"
DEPEND="${DEPEND_COMMON}
    >=dev-util/pkgconfig-0.22
"
RDEPEND="${DEPEND_COMMON}"

Orbital dependencies:

DEPEND_COMMON="
    =dev-qt/qtwayland-5.2*[qml]
    >=dev-qt/qtcore-5.2
    >=dev-qt/qtgui-5.2
    >=dev-qt/qtdeclarative-5.2[widgets]
    >=dev-qt/qtwidgets-5.2
    >=dev-qt/qtdbus-5.2
    >=dev-qt/linguist-tools-5.2[qml]
    alsa? ( media-libs/alsa-lib )
    kde-solid? ( kde-frameworks/solid )
"
DEPEND="${DEPEND_COMMON}
    >=dev-util/pkgconfig-0.22
"
RDEPEND="${DEPEND_COMMON}
    >=dev-qt/qtgraphicaleffects-5.2
    >=dev-qt/qtquickcontrols-5.2
    x11-themes/oxygen-molecule
"

Hertz642 avatar Jan 01 '14 04:01 Hertz642

The mixer and device explorer are still being built when the flag to turn them off is passed to cmake, they just complain on the log that their backends are missing. Maybe it would be better to remove the applets completely with the flags turned off, and then handle their absence in the UI/config files?

I am having problems building Solid on Gentoo. I thought I had it working before but it broke again. The ebuild for it uses the bleeding edge development version and it hasn't been added to portage yet, so I have turned the "kde-solid" flag off by default.

Hertz642 avatar Jan 02 '14 00:01 Hertz642

After looking at the source code, it looks like dbus can be dropped entirely if the user is going to be using the CLI backend. I need to figure out the exact list of dependencies for the logout/shutdown so that I can add a USE flag for that, and if that flag and kde-solid are disabled, then a USE flag for dbus could be disabled.

Also, is linguist-tools needed if translations are not used? Would the untranslated language then be English, or would it be Italian?

Hertz642 avatar Jan 08 '14 17:01 Hertz642

That's right, dbus is used only for logind and solid indirectly. Using -Duse_logind=OFF and -Duse_solid=OFF should remove any dependency on it.

Also, is linguist-tools needed if translations are not used?

No, but there is no way to disable the translations for now. The untranslated language is English.

giucam avatar Jan 08 '14 20:01 giucam