x11-misc/bumblebee: Add snapshot and live ebuild
authorNP-Hardass <NP-Hardass@gentoo.org>
Tue, 24 Jan 2017 01:28:39 +0000 (20:28 -0500)
committerNP-Hardass <NP-Hardass@gentoo.org>
Wed, 25 Jan 2017 23:02:47 +0000 (18:02 -0500)
Package-Manager: portage-2.3.0

x11-misc/bumblebee/Manifest
x11-misc/bumblebee/bumblebee-3.2.1_p20170123.ebuild [new file with mode: 0644]
x11-misc/bumblebee/bumblebee-9999.ebuild [new file with mode: 0644]

index eefc4b2817f5e8a244386ff6a927b4249b887b9e..01905de1e4209a7066e32c0c6064d043044a485b 100644 (file)
@@ -1 +1,2 @@
 DIST bumblebee-3.2.1.tar.gz 143110 SHA256 1018703b07e2f607a4641249d69478ce076ae5a1e9dd6cff5694d394fa7ee30e SHA512 6f016f75d199577215ff00c059e196829e9d3efeb0fb6eebe6c3fad6176e330332e1ef25875a22ac9892895683d95899ea44f1ec1f85d31300ad83cb1fe0310a WHIRLPOOL 0d59b205f3c57afbf3fa6c8a55964afed8684e57db045e4c333c8e94f0b5d91637963a0b9f386eb6fe655716b8854e82ae5724dacdc76a34de6eb1f99ffc4908
+DIST bumblebee-3.2.1_p20170123.tar.gz 63376 SHA256 bf98d902045f3fa95633816ee34babb76fd1e537090618c632f123d28372c751 SHA512 398101927211a8d09f19d519fd0537c94b942bd7fc11d10d394a3a520f2afa6abe174db78b60bb134caf78ffda4cdd50d0ef424134acd07ff4ce93998881e31b WHIRLPOOL 8bf5367fcd9e4c90d104d97fe767197c9d65cc26f4eb8ca01cb4f18d678df101dad36dc10cfe7be75fc65fd129a171a6d034a96313c86c17085ed6ec81bdddc7
diff --git a/x11-misc/bumblebee/bumblebee-3.2.1_p20170123.ebuild b/x11-misc/bumblebee/bumblebee-3.2.1_p20170123.ebuild
new file mode 100644 (file)
index 0000000..ef99702
--- /dev/null
@@ -0,0 +1,101 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+inherit autotools readme.gentoo-r1 multilib systemd user
+
+if [[ ${PV} == 9999 ]]; then
+       EGIT_REPO_URI="git://github.com/Bumblebee-Project/Bumblebee.git"
+       EGIT_BRANCH="develop"
+else
+       COMMIT="c322bd849aabe6e48b4304b8d13cc4aadc36a30d"
+       SRC_URI="https://github.com/Bumblebee-Project/Bumblebee/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
+       KEYWORDS="~amd64 ~x86"
+
+       S="${WORKDIR}/Bumblebee-${COMMIT}"
+fi
+
+DESCRIPTION="Service providing elegant and stable means of managing Optimus graphics chipsets"
+HOMEPAGE="http://bumblebee-project.org https://github.com/Bumblebee-Project/Bumblebee"
+
+SLOT="0"
+LICENSE="GPL-3"
+
+IUSE="+bbswitch video_cards_nouveau video_cards_nvidia"
+
+COMMON_DEPEND="
+       dev-libs/glib:2
+       dev-libs/libbsd
+       sys-apps/kmod
+       x11-libs/libX11
+"
+
+RDEPEND="${COMMON_DEPEND}
+       virtual/opengl
+       x11-base/xorg-drivers[video_cards_nvidia?,video_cards_nouveau?]
+       bbswitch? ( sys-power/bbswitch )
+"
+
+DEPEND="${COMMON_DEPEND}
+       sys-apps/help2man
+       virtual/pkgconfig
+"
+
+PDEPEND="
+       || (
+               x11-misc/primus
+               x11-misc/virtualgl
+       )
+"
+
+REQUIRED_USE="|| ( video_cards_nouveau video_cards_nvidia )"
+
+pkg_setup() {
+       enewgroup bumblebee
+}
+
+src_prepare() {
+       default
+       eautoreconf
+}
+
+src_configure() {
+       DOC_CONTENTS="In order to use Bumblebee, add your user to 'bumblebee' group.
+               You may need to setup your /etc/bumblebee/bumblebee.conf"
+
+       if use video_cards_nvidia ; then
+               # Get paths to GL libs for all ABIs
+               local nvlib=""
+               for i in  $(get_all_libdirs) ; do
+                       nvlib="${nvlib}:/usr/${i}/opengl/nvidia/lib"
+               done
+
+               local nvpref="/usr/$(get_libdir)/opengl/nvidia"
+               local xorgpref="/usr/$(get_libdir)/xorg/modules"
+               ECONF_PARAMS="CONF_DRIVER=nvidia CONF_DRIVER_MODULE_NVIDIA=nvidia \
+                       CONF_LDPATH_NVIDIA=${nvlib#:} \
+                       CONF_MODPATH_NVIDIA=${nvpref}/lib,${nvpref}/extensions,${xorgpref}/drivers,${xorgpref}"
+       fi
+
+       econf \
+               --docdir=/usr/share/doc/"${PF}" \
+               ${ECONF_PARAMS}
+}
+
+src_install() {
+       newconfd "${FILESDIR}"/${PN}.confd ${PN}
+       newinitd "${FILESDIR}"/${PN}.initd ${PN}
+       newenvd "${FILESDIR}"/${PN}.envd 99${PN}
+       systemd_dounit scripts/systemd/bumblebeed.service
+
+       readme.gentoo_create_doc
+
+       default
+}
+#
+#pkg_preinst() {
+#      use video_cards_nvidia || rm "${ED}"/etc/bumblebee/xorg.conf.nvidia
+#      use video_cards_nouveau || rm "${ED}"/etc/bumblebee/xorg.conf.nouveau
+#}
diff --git a/x11-misc/bumblebee/bumblebee-9999.ebuild b/x11-misc/bumblebee/bumblebee-9999.ebuild
new file mode 100644 (file)
index 0000000..ef99702
--- /dev/null
@@ -0,0 +1,101 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+inherit autotools readme.gentoo-r1 multilib systemd user
+
+if [[ ${PV} == 9999 ]]; then
+       EGIT_REPO_URI="git://github.com/Bumblebee-Project/Bumblebee.git"
+       EGIT_BRANCH="develop"
+else
+       COMMIT="c322bd849aabe6e48b4304b8d13cc4aadc36a30d"
+       SRC_URI="https://github.com/Bumblebee-Project/Bumblebee/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
+       KEYWORDS="~amd64 ~x86"
+
+       S="${WORKDIR}/Bumblebee-${COMMIT}"
+fi
+
+DESCRIPTION="Service providing elegant and stable means of managing Optimus graphics chipsets"
+HOMEPAGE="http://bumblebee-project.org https://github.com/Bumblebee-Project/Bumblebee"
+
+SLOT="0"
+LICENSE="GPL-3"
+
+IUSE="+bbswitch video_cards_nouveau video_cards_nvidia"
+
+COMMON_DEPEND="
+       dev-libs/glib:2
+       dev-libs/libbsd
+       sys-apps/kmod
+       x11-libs/libX11
+"
+
+RDEPEND="${COMMON_DEPEND}
+       virtual/opengl
+       x11-base/xorg-drivers[video_cards_nvidia?,video_cards_nouveau?]
+       bbswitch? ( sys-power/bbswitch )
+"
+
+DEPEND="${COMMON_DEPEND}
+       sys-apps/help2man
+       virtual/pkgconfig
+"
+
+PDEPEND="
+       || (
+               x11-misc/primus
+               x11-misc/virtualgl
+       )
+"
+
+REQUIRED_USE="|| ( video_cards_nouveau video_cards_nvidia )"
+
+pkg_setup() {
+       enewgroup bumblebee
+}
+
+src_prepare() {
+       default
+       eautoreconf
+}
+
+src_configure() {
+       DOC_CONTENTS="In order to use Bumblebee, add your user to 'bumblebee' group.
+               You may need to setup your /etc/bumblebee/bumblebee.conf"
+
+       if use video_cards_nvidia ; then
+               # Get paths to GL libs for all ABIs
+               local nvlib=""
+               for i in  $(get_all_libdirs) ; do
+                       nvlib="${nvlib}:/usr/${i}/opengl/nvidia/lib"
+               done
+
+               local nvpref="/usr/$(get_libdir)/opengl/nvidia"
+               local xorgpref="/usr/$(get_libdir)/xorg/modules"
+               ECONF_PARAMS="CONF_DRIVER=nvidia CONF_DRIVER_MODULE_NVIDIA=nvidia \
+                       CONF_LDPATH_NVIDIA=${nvlib#:} \
+                       CONF_MODPATH_NVIDIA=${nvpref}/lib,${nvpref}/extensions,${xorgpref}/drivers,${xorgpref}"
+       fi
+
+       econf \
+               --docdir=/usr/share/doc/"${PF}" \
+               ${ECONF_PARAMS}
+}
+
+src_install() {
+       newconfd "${FILESDIR}"/${PN}.confd ${PN}
+       newinitd "${FILESDIR}"/${PN}.initd ${PN}
+       newenvd "${FILESDIR}"/${PN}.envd 99${PN}
+       systemd_dounit scripts/systemd/bumblebeed.service
+
+       readme.gentoo_create_doc
+
+       default
+}
+#
+#pkg_preinst() {
+#      use video_cards_nvidia || rm "${ED}"/etc/bumblebee/xorg.conf.nvidia
+#      use video_cards_nouveau || rm "${ED}"/etc/bumblebee/xorg.conf.nouveau
+#}