Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft Gentoo ebuild #2

Open
Hertz642 opened this issue Dec 28, 2013 · 9 comments
Open

Draft Gentoo ebuild #2

Hertz642 opened this issue Dec 28, 2013 · 9 comments

Comments

@Hertz642
Copy link

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
Copy link
Author

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
Copy link
Author

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?

@giucam
Copy link
Owner

giucam commented Dec 29, 2013

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

@Hertz642
Copy link
Author

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
}

@giucam
Copy link
Owner

giucam commented Dec 30, 2013

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

@Hertz642
Copy link
Author

Hertz642 commented Jan 1, 2014

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
Copy link
Author

Hertz642 commented Jan 2, 2014

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
Copy link
Author

Hertz642 commented Jan 8, 2014

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?

@giucam
Copy link
Owner

giucam commented Jan 8, 2014

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants