summaryrefslogtreecommitdiff
path: root/x11-wm/openbox
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /x11-wm/openbox
reinit the tree, so we can have metadata
Diffstat (limited to 'x11-wm/openbox')
-rw-r--r--x11-wm/openbox/Manifest12
-rw-r--r--x11-wm/openbox/files/openbox-3.5.2-gnome-session.patch14
-rw-r--r--x11-wm/openbox/metadata.xml25
-rw-r--r--x11-wm/openbox/openbox-3.5.2-r1.ebuild104
-rw-r--r--x11-wm/openbox/openbox-3.6.1.ebuild104
-rw-r--r--x11-wm/openbox/openbox-3.6.ebuild104
-rw-r--r--x11-wm/openbox/openbox-9999.ebuild103
7 files changed, 466 insertions, 0 deletions
diff --git a/x11-wm/openbox/Manifest b/x11-wm/openbox/Manifest
new file mode 100644
index 000000000000..52029f2dd2bb
--- /dev/null
+++ b/x11-wm/openbox/Manifest
@@ -0,0 +1,12 @@
+AUX openbox-3.5.2-gnome-session.patch 574 SHA256 45e1c57d9134d7e370f9dfe1c057f998e516900255dcb71b709a6d035fb8a4d4 SHA512 35d36dd2ddef05e21491df75a1d14c3d26dd17a8da79577d06fb3b7ddf6a179c7e23bb777e4cbdaa4bb4ab745db023981645f3dbe4dcf75c7b4d5f46e18b96c8 WHIRLPOOL 25288c03e121bc619f20f1deb1462d7555a6880944c9ea82bd8129de06a4b6f3483c4d7fd5158931e5915e4f7fa0367fb337542c90d8a024e1805d551f31295a
+DIST openbox-3.5.2.tar.gz 972751 SHA256 128fb4ef11f83f6edb1685cfc04f44a16a5322082fc519f9d7cac84fc658af33 SHA512 89c58364bc482f2b098341e28b2bbab69a791430ff8924dc0dd6fe56aabadde916d42a4e7dfb47cab21afebd747698e106a19e852444d2ede05e72ef423df09d WHIRLPOOL 808109bc07c5c2a1f2444501c91f4d3f111290d034811d46f63f21001343f0a368a648d964e69a7264d4a5f447ce780ceba9d075e4d65d5b928075776a8274f2
+DIST openbox-3.6.1.tar.gz 962665 SHA256 8b4ac0760018c77c0044fab06a4f0c510ba87eae934d9983b10878483bde7ef7 SHA512 5e6f4a214005bea8b26bc8959fe5bb67356a387ddd317e014f43cb5b5bf263ec617a5973e2982eb76a08dc7d3ca5ec9e72e64c9b5efd751001a8999b420b1ad0 WHIRLPOOL 9fbfac65bc811f23f8e68af2f61d0271697ef0ebf3555de169d35afe91d0152a8379b717dc4f897c9c47c0332a4f2eb2d032f9459ab0d544cc3049c3917f3bd6
+DIST openbox-3.6.tar.gz 963207 SHA256 866c0ab8cb1cd15c7ae8022179cb6132a4c0f0476673bd3b834a1ef67a593ba8 SHA512 7f158a5236dcba5ec3c0e4fb5d1a5cabbd956d4125f19dfdb0594f5ded52545078d85ab645589ec3400a5306f63b43db5ee1ae26e3683141ee47f1b406d9788b WHIRLPOOL e6b4b0e73befe9a76ab4c4e388f7cea8b60874266c8ce8f2ce40b277a5b3744c99c10bde0bf3adc3650e10be46936352d9d758019288d9bbc24799f70de81ac8
+DIST surreal-gentoo.tar.gz 13410 SHA256 f478c58b2b6cd7a2a2ebe53fa261adb2d1fddf188f059d238b1b69ecc8701626 SHA512 dd43cb78e5e33345767edad22d0470765ac9eeae02bbad0acd8098bc096c15a166bf651493d12a5953bc043c9be92e9b160607eafb4723a6bcfc5d1d6fae235e WHIRLPOOL c9b406f4d822c8ce250bf8f30c9ad6bab75a0c1889a5b60061b83e44c06fd386f60c69ace176672d1a9658f4aa82fc82daaef205630c15c4711019cb48cca7ad
+EBUILD openbox-3.5.2-r1.ebuild 2716 SHA256 7550915e10d8b7c126e17a0b8b20880b918b8d8dd6dd4f7056eae802efb5c476 SHA512 b14911124572668c88dd4dc52728fcb186e68dfab27198025d65f5f0ac60bb95668526526e5a46548193b45eb30965133c48a004bec6c03e6bc36068431234f2 WHIRLPOOL 4c37b412e1261f40df323d3b6462a0d60d63d0bc222812f8654e1fa0036dd2c9c7dac55ffd332bea06ff67a15e02a0cb5077e4e51e6694f1c7e3d3992d8e56b0
+EBUILD openbox-3.6.1.ebuild 2750 SHA256 6875f6df2158ea42eda8fb603e62f9400d4a45518e03beebd5c2460059f6f76e SHA512 e0a5e23ab9323d4575ec93ee5fbf1491e6331676528c665859f97f170b69084d9f96b02febb58a240a436027462c8cc3e3f5e5681fc272a37466b589002aaa28 WHIRLPOOL 00e42148df165ca5a30f17ecd170c161bedfc55d771174657cac27729dca7c37dacf0508dc2a01e2c1dd9a596257b4927436ebf387f3640749231dce19e064b9
+EBUILD openbox-3.6.ebuild 2724 SHA256 d703ae8f9d9a3607569e668b08d044b3eeeb6160f937a3f74038f39861bac6c5 SHA512 7bb1da8b01675655a6d35585b8c4ab5b3c9e27923dc5a4ed58c1f5a47564318f4e97a3718b4332e1e7e8de1a8f43123030b134ce00c038f3093245aa518496e0 WHIRLPOOL b0e7bb347c4a636cd56536be3967f23ed4e44554e181748818bf0509252c4ebdce4b942ad5da33be8b2e394bb08ee4fbb417d07d66148fd80e5647ed3b42d633
+EBUILD openbox-9999.ebuild 2677 SHA256 b10fe7bbcbab14b9e60fc13dfad2925211ebc2fbb04129b4214092dc6eb018eb SHA512 8c5df980c5514f99497334841de5c3b382715990c34151ac6e48558f196603ebcfd3c78d46c20eeb1bb2e4c31783e9f3638e7096717a4170ea660bc21162dc4c WHIRLPOOL 77cd2786b0850961b950cd98c86572edbfda631c4111da80ef9f4d5d80734b1f612bee82846192ae002d13cd37690b401d5966d0477aa2fabb06dec0e85c97eb
+MISC ChangeLog 4322 SHA256 0c91bf578235694f1a1e1b5f6eefe545b1a4e90f11374613f6d53c7757b82cd8 SHA512 66db17c76061cd6c8246d5b18097306ceec4250abfda41bf0945c26c4bc5a18d80683114c4fe82449077a52ac4e36b767578c485a725af67baf48418c617a83a WHIRLPOOL 2be91ad53689c0342afb911b86e86d769cff666ea2fd68bc19e3c9453fc0198da80fadb17bf130981665f1aa9ba6b50cdb43cbd141ad200858ef31b316cc18ed
+MISC ChangeLog-2015 45110 SHA256 95aff620daa1c0ae608655358df3cfb47a6ab157903d924d039b068709f44682 SHA512 095f266632b53b5a7c4eec817031efa73e6286b26ff8d8238bc5d396df967a220ea8c7ffbd1ff095589693af8d8e0d4eb799a9af3b6a0ff2b5cbc213d19b55aa WHIRLPOOL f0572623da65792c42c9d6f17ab467cc410ee7af5d24ae0152f5fa476a53408030d88719423df2eaeb4ffe51042bb2901b84b6580d5e4baf26feea541674fe7f
+MISC metadata.xml 859 SHA256 886e9a281ad32428c3e42a5d2e2c14e7814560e5aa53b7ac81a38ce5b47bb470 SHA512 aef0f2f81315e0d07c4157d9503b9418aa8e1090913a63367e4230b681fb203caedf18bedcac9fa1cefda2bae9f05699ff5b251448fa75ce9c7f7f96510ed39e WHIRLPOOL 0f7aaa177d023ff46a74a5d3afcc129bbd2fcdf2b10b021ae65051eaa6e108d8ad7e475474fdb013e2e4a0ec583ffe49e93949d71a3ba9d75b6a8e9f9e16a847
diff --git a/x11-wm/openbox/files/openbox-3.5.2-gnome-session.patch b/x11-wm/openbox/files/openbox-3.5.2-gnome-session.patch
new file mode 100644
index 000000000000..10406af33c96
--- /dev/null
+++ b/x11-wm/openbox/files/openbox-3.5.2-gnome-session.patch
@@ -0,0 +1,14 @@
+Index: openbox-3.5.2/data/xsession/openbox-gnome-session.in
+===================================================================
+--- openbox-3.5.2.orig/data/xsession/openbox-gnome-session.in
++++ openbox-3.5.2/data/xsession/openbox-gnome-session.in
+@@ -18,6 +18,9 @@ VER=$(gnome-session --version 2>/dev/nul
+ MAJOR=$(echo $VER | cut -d . -f 1)
+ MINOR=$(echo $VER | cut -d . -f 2)
+
++# use gnome menus (gentoo bug #291965)
++export XDG_MENU_PREFIX=gnome-
++
+ # run GNOME with Openbox as its window manager
+
+ if test $MAJOR -lt 2 || (test $MAJOR = 2 && test $MINOR -le 22); then
diff --git a/x11-wm/openbox/metadata.xml b/x11-wm/openbox/metadata.xml
new file mode 100644
index 000000000000..03e0a0449e0d
--- /dev/null
+++ b/x11-wm/openbox/metadata.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>hwoarang@gentoo.org</email>
+ <name>Markos Chandras</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>lxde@gentoo.org</email>
+ <name>Gentoo LXDE Project</name>
+ </maintainer>
+ <use>
+ <flag name="session">Enables support for session managers</flag>
+ <flag name="xdg">Install the python xdg files for xdg autostart</flag>
+ </use>
+ <upstream>
+ <maintainer status="active">
+ <email>danakj@orodu.net</email>
+ <name>Dana Jansens</name>
+ </maintainer>
+ <changelog>http://openbox.org/wiki/Openbox:News</changelog>
+ <doc>http://openbox.org/wiki/Help:Contents</doc>
+ <bugs-to>http://openbox.org/wiki/Openbox:Contribute</bugs-to>
+ </upstream>
+</pkgmetadata>
diff --git a/x11-wm/openbox/openbox-3.5.2-r1.ebuild b/x11-wm/openbox/openbox-3.5.2-r1.ebuild
new file mode 100644
index 000000000000..3f45b41ad72c
--- /dev/null
+++ b/x11-wm/openbox/openbox-3.5.2-r1.ebuild
@@ -0,0 +1,104 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+PYTHON_COMPAT=( python2_7 )
+inherit multilib autotools python-r1 eutils
+
+DESCRIPTION="A standards compliant, fast, light-weight, extensible window manager"
+HOMEPAGE="http://openbox.org/"
+if [[ ${PV} == *9999* ]]; then
+ inherit git-2
+ EGIT_REPO_URI="git://git.openbox.org/dana/openbox"
+ SRC_URI="branding? (
+ https://dev.gentoo.org/~hwoarang/distfiles/surreal-gentoo.tar.gz )"
+ KEYWORDS=""
+
+else
+ SRC_URI="http://openbox.org/dist/openbox/${P}.tar.gz
+ branding? ( https://dev.gentoo.org/~hwoarang/distfiles/surreal-gentoo.tar.gz )"
+ KEYWORDS="alpha amd64 arm ~arm64 hppa ~mips ppc ppc64 sparc x86 ~x86-fbsd ~arm-linux ~x86-linux"
+fi
+
+LICENSE="GPL-2"
+SLOT="3"
+IUSE="branding debug imlib nls session startup-notification static-libs svg xdg"
+REQUIRED_USE="xdg? ( ${PYTHON_REQUIRED_USE} )"
+
+RDEPEND="dev-libs/glib:2
+ >=dev-libs/libxml2-2.0
+ >=media-libs/fontconfig-2
+ x11-libs/libXft
+ x11-libs/libXinerama
+ x11-libs/libXrandr
+ x11-libs/libXt
+ >=x11-libs/pango-1.8[X]
+ imlib? ( media-libs/imlib2 )
+ startup-notification? ( >=x11-libs/startup-notification-0.8 )
+ svg? ( gnome-base/librsvg:2 )
+ xdg? (
+ ${PYTHON_DEPS}
+ dev-python/pyxdg[${PYTHON_USEDEP}]
+ )
+ "
+DEPEND="${RDEPEND}
+ sys-devel/gettext
+ virtual/pkgconfig
+ x11-proto/xextproto
+ x11-proto/xf86vidmodeproto
+ x11-proto/xineramaproto"
+
+src_unpack() {
+ if [[ ${PV} == *9999* ]]; then
+ git-2_src_unpack
+ else
+ unpack ${A}
+ fi
+}
+
+src_prepare() {
+ use xdg && python_export_best
+ epatch "${FILESDIR}"/${PN}-3.5.2-gnome-session.patch
+ sed -i \
+ -e "s:-O0 -ggdb ::" \
+ -e 's/-fno-strict-aliasing//' \
+ "${S}"/m4/openbox.m4 || die
+ epatch_user
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --docdir="${EPREFIX}/usr/share/doc/${PF}" \
+ $(use_enable debug) \
+ $(use_enable static-libs static) \
+ $(use_enable nls) \
+ $(use_enable imlib imlib2) \
+ $(use_enable svg librsvg) \
+ $(use_enable startup-notification) \
+ $(use_enable session session-management) \
+ --with-x
+}
+
+src_install() {
+ dodir /etc/X11/Sessions
+ echo "/usr/bin/openbox-session" > "${ED}/etc/X11/Sessions/${PN}"
+ fperms a+x /etc/X11/Sessions/${PN}
+ emake DESTDIR="${D}" install
+ if use branding; then
+ insinto /usr/share/themes
+ doins -r "${WORKDIR}"/Surreal_Gentoo
+ # make it the default theme
+ sed -i \
+ -e "/<theme>/{n; s@<name>.*</name>@<name>Surreal_Gentoo</name>@}" \
+ "${D}"/etc/xdg/openbox/rc.xml \
+ || die "failed to set Surreal Gentoo as the default theme"
+ fi
+ use static-libs || prune_libtool_files --all
+ if use xdg ; then
+ python_replicate_script "${ED}"/usr/libexec/openbox-xdg-autostart
+ else
+ rm "${ED}"/usr/libexec/openbox-xdg-autostart || die
+ fi
+}
diff --git a/x11-wm/openbox/openbox-3.6.1.ebuild b/x11-wm/openbox/openbox-3.6.1.ebuild
new file mode 100644
index 000000000000..555caa92ec33
--- /dev/null
+++ b/x11-wm/openbox/openbox-3.6.1.ebuild
@@ -0,0 +1,104 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+PYTHON_COMPAT=( python2_7 )
+inherit multilib autotools python-r1 eutils
+
+DESCRIPTION="A standards compliant, fast, light-weight, extensible window manager"
+HOMEPAGE="http://openbox.org/"
+if [[ ${PV} == *9999* ]]; then
+ inherit git-2
+ EGIT_REPO_URI="git://git.openbox.org/dana/openbox"
+ SRC_URI="branding? (
+ https://dev.gentoo.org/~hwoarang/distfiles/surreal-gentoo.tar.gz )"
+ KEYWORDS="alpha arm hppa ppc ppc64 sparc x86"
+
+else
+ SRC_URI="http://openbox.org/dist/openbox/${P}.tar.gz
+ branding? ( https://dev.gentoo.org/~hwoarang/distfiles/surreal-gentoo.tar.gz )"
+ KEYWORDS="alpha amd64 arm ~arm64 hppa ~mips ppc ppc64 sparc x86 ~x86-fbsd ~arm-linux ~x86-linux"
+fi
+
+LICENSE="GPL-2"
+SLOT="3"
+IUSE="branding debug imlib nls session startup-notification static-libs svg xdg"
+REQUIRED_USE="xdg? ( ${PYTHON_REQUIRED_USE} )"
+
+RDEPEND="dev-libs/glib:2
+ >=dev-libs/libxml2-2.0
+ >=media-libs/fontconfig-2
+ x11-libs/libXft
+ x11-libs/libXinerama
+ x11-libs/libXrandr
+ x11-libs/libXt
+ >=x11-libs/pango-1.8[X]
+ imlib? ( media-libs/imlib2 )
+ startup-notification? ( >=x11-libs/startup-notification-0.8 )
+ svg? ( gnome-base/librsvg:2 )
+ xdg? (
+ ${PYTHON_DEPS}
+ dev-python/pyxdg[${PYTHON_USEDEP}]
+ )
+ "
+DEPEND="${RDEPEND}
+ sys-devel/gettext
+ virtual/pkgconfig
+ x11-proto/xextproto
+ x11-proto/xf86vidmodeproto
+ x11-proto/xineramaproto"
+
+src_unpack() {
+ if [[ ${PV} == *9999* ]]; then
+ git-2_src_unpack
+ else
+ unpack ${A}
+ fi
+}
+
+src_prepare() {
+ use xdg && python_export_best
+ epatch "${FILESDIR}"/${PN}-3.5.2-gnome-session.patch
+ sed -i \
+ -e "s:-O0 -ggdb ::" \
+ -e 's/-fno-strict-aliasing//' \
+ "${S}"/m4/openbox.m4 || die
+ epatch_user
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --docdir="${EPREFIX}/usr/share/doc/${PF}" \
+ $(use_enable debug) \
+ $(use_enable static-libs static) \
+ $(use_enable nls) \
+ $(use_enable imlib imlib2) \
+ $(use_enable svg librsvg) \
+ $(use_enable startup-notification) \
+ $(use_enable session session-management) \
+ --with-x
+}
+
+src_install() {
+ dodir /etc/X11/Sessions
+ echo "/usr/bin/openbox-session" > "${ED}/etc/X11/Sessions/${PN}"
+ fperms a+x /etc/X11/Sessions/${PN}
+ emake DESTDIR="${D}" install
+ if use branding; then
+ insinto /usr/share/themes
+ doins -r "${WORKDIR}"/Surreal_Gentoo
+ # make it the default theme
+ sed -i \
+ -e "/<theme>/{n; s@<name>.*</name>@<name>Surreal_Gentoo</name>@}" \
+ "${D}"/etc/xdg/openbox/rc.xml \
+ || die "failed to set Surreal Gentoo as the default theme"
+ fi
+ use static-libs || prune_libtool_files --all
+ if use xdg ; then
+ python_replicate_script "${ED}"/usr/libexec/openbox-xdg-autostart
+ else
+ rm "${ED}"/usr/libexec/openbox-xdg-autostart || die
+ fi
+}
diff --git a/x11-wm/openbox/openbox-3.6.ebuild b/x11-wm/openbox/openbox-3.6.ebuild
new file mode 100644
index 000000000000..1311371aa881
--- /dev/null
+++ b/x11-wm/openbox/openbox-3.6.ebuild
@@ -0,0 +1,104 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+PYTHON_COMPAT=( python2_7 )
+inherit multilib autotools python-r1 eutils
+
+DESCRIPTION="A standards compliant, fast, light-weight, extensible window manager"
+HOMEPAGE="http://openbox.org/"
+if [[ ${PV} == *9999* ]]; then
+ inherit git-2
+ EGIT_REPO_URI="git://git.openbox.org/dana/openbox"
+ SRC_URI="branding? (
+ https://dev.gentoo.org/~hwoarang/distfiles/surreal-gentoo.tar.gz )"
+ KEYWORDS=""
+
+else
+ SRC_URI="http://openbox.org/dist/openbox/${P}.tar.gz
+ branding? ( https://dev.gentoo.org/~hwoarang/distfiles/surreal-gentoo.tar.gz )"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~arm-linux ~x86-linux"
+fi
+
+LICENSE="GPL-2"
+SLOT="3"
+IUSE="branding debug imlib nls session startup-notification static-libs svg xdg"
+REQUIRED_USE="xdg? ( ${PYTHON_REQUIRED_USE} )"
+
+RDEPEND="dev-libs/glib:2
+ >=dev-libs/libxml2-2.0
+ >=media-libs/fontconfig-2
+ x11-libs/libXft
+ x11-libs/libXinerama
+ x11-libs/libXrandr
+ x11-libs/libXt
+ >=x11-libs/pango-1.8[X]
+ imlib? ( media-libs/imlib2 )
+ startup-notification? ( >=x11-libs/startup-notification-0.8 )
+ svg? ( gnome-base/librsvg:2 )
+ xdg? (
+ ${PYTHON_DEPS}
+ dev-python/pyxdg[${PYTHON_USEDEP}]
+ )
+ "
+DEPEND="${RDEPEND}
+ sys-devel/gettext
+ virtual/pkgconfig
+ x11-proto/xextproto
+ x11-proto/xf86vidmodeproto
+ x11-proto/xineramaproto"
+
+src_unpack() {
+ if [[ ${PV} == *9999* ]]; then
+ git-2_src_unpack
+ else
+ unpack ${A}
+ fi
+}
+
+src_prepare() {
+ use xdg && python_export_best
+ epatch "${FILESDIR}"/${PN}-3.5.2-gnome-session.patch
+ sed -i \
+ -e "s:-O0 -ggdb ::" \
+ -e 's/-fno-strict-aliasing//' \
+ "${S}"/m4/openbox.m4 || die
+ epatch_user
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --docdir="${EPREFIX}/usr/share/doc/${PF}" \
+ $(use_enable debug) \
+ $(use_enable static-libs static) \
+ $(use_enable nls) \
+ $(use_enable imlib imlib2) \
+ $(use_enable svg librsvg) \
+ $(use_enable startup-notification) \
+ $(use_enable session session-management) \
+ --with-x
+}
+
+src_install() {
+ dodir /etc/X11/Sessions
+ echo "/usr/bin/openbox-session" > "${ED}/etc/X11/Sessions/${PN}"
+ fperms a+x /etc/X11/Sessions/${PN}
+ emake DESTDIR="${D}" install
+ if use branding; then
+ insinto /usr/share/themes
+ doins -r "${WORKDIR}"/Surreal_Gentoo
+ # make it the default theme
+ sed -i \
+ -e "/<theme>/{n; s@<name>.*</name>@<name>Surreal_Gentoo</name>@}" \
+ "${D}"/etc/xdg/openbox/rc.xml \
+ || die "failed to set Surreal Gentoo as the default theme"
+ fi
+ use static-libs || prune_libtool_files --all
+ if use xdg ; then
+ python_replicate_script "${ED}"/usr/libexec/openbox-xdg-autostart
+ else
+ rm "${ED}"/usr/libexec/openbox-xdg-autostart || die
+ fi
+}
diff --git a/x11-wm/openbox/openbox-9999.ebuild b/x11-wm/openbox/openbox-9999.ebuild
new file mode 100644
index 000000000000..150b3ce0a56d
--- /dev/null
+++ b/x11-wm/openbox/openbox-9999.ebuild
@@ -0,0 +1,103 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+PYTHON_COMPAT=( python2_7 )
+inherit multilib autotools python-r1 eutils
+
+DESCRIPTION="A standards compliant, fast, light-weight, extensible window manager"
+HOMEPAGE="http://openbox.org/"
+if [[ ${PV} == *9999* ]]; then
+ inherit git-2
+ EGIT_REPO_URI="git://git.openbox.org/dana/openbox"
+ SRC_URI="branding? (
+ https://dev.gentoo.org/~hwoarang/distfiles/surreal-gentoo.tar.gz )"
+ KEYWORDS=""
+
+else
+ SRC_URI="http://openbox.org/dist/openbox/${P}.tar.gz
+ branding? ( https://dev.gentoo.org/~hwoarang/distfiles/surreal-gentoo.tar.gz )"
+ KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~arm-linux ~x86-linux"
+fi
+
+LICENSE="GPL-2"
+SLOT="3"
+IUSE="branding debug imlib nls session startup-notification static-libs svg xdg"
+REQUIRED_USE="xdg? ( ${PYTHON_REQUIRED_USE} )"
+
+RDEPEND="dev-libs/glib:2
+ >=dev-libs/libxml2-2.0
+ >=media-libs/fontconfig-2
+ x11-libs/libXft
+ x11-libs/libXinerama
+ x11-libs/libXrandr
+ x11-libs/libXt
+ >=x11-libs/pango-1.8[X]
+ imlib? ( media-libs/imlib2 )
+ startup-notification? ( >=x11-libs/startup-notification-0.8 )
+ svg? ( gnome-base/librsvg:2 )
+ xdg? (
+ ${PYTHON_DEPS}
+ dev-python/pyxdg[${PYTHON_USEDEP}]
+ )
+ "
+DEPEND="${RDEPEND}
+ sys-devel/gettext
+ virtual/pkgconfig
+ x11-proto/xextproto
+ x11-proto/xf86vidmodeproto
+ x11-proto/xineramaproto"
+
+src_unpack() {
+ if [[ ${PV} == *9999* ]]; then
+ git-2_src_unpack
+ else
+ unpack ${A}
+ fi
+}
+
+src_prepare() {
+ use xdg && python_export_best
+ epatch "${FILESDIR}"/${PN}-3.5.2-gnome-session.patch
+ sed -i \
+ -e "s:-O0 -ggdb ::" \
+ "${S}"/m4/openbox.m4 || die
+ epatch_user
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --docdir="${EPREFIX}/usr/share/doc/${PF}" \
+ $(use_enable debug) \
+ $(use_enable static-libs static) \
+ $(use_enable nls) \
+ $(use_enable imlib imlib2) \
+ $(use_enable svg librsvg) \
+ $(use_enable startup-notification) \
+ $(use_enable session session-management) \
+ --with-x
+}
+
+src_install() {
+ dodir /etc/X11/Sessions
+ echo "/usr/bin/openbox-session" > "${ED}/etc/X11/Sessions/${PN}"
+ fperms a+x /etc/X11/Sessions/${PN}
+ emake DESTDIR="${D}" install
+ if use branding; then
+ insinto /usr/share/themes
+ doins -r "${WORKDIR}"/Surreal_Gentoo
+ # make it the default theme
+ sed -i \
+ -e "/<theme>/{n; s@<name>.*</name>@<name>Surreal_Gentoo</name>@}" \
+ "${D}"/etc/xdg/openbox/rc.xml \
+ || die "failed to set Surreal Gentoo as the default theme"
+ fi
+ use static-libs || prune_libtool_files --all
+ if use xdg ; then
+ python_replicate_script "${ED}"/usr/libexec/openbox-xdg-autostart
+ else
+ rm "${ED}"/usr/libexec/openbox-xdg-autostart || die
+ fi
+}