1 # Copyright 1999-2006 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
5 inherit eutils toolchain-funcs
7 DESCRIPTION="a dynamic window manager for X11"
8 HOMEPAGE="http://www.shortest.de/view/dynamic+window+manager"
9 SRC_URI="http://www.shortest.de/download/${P}.tar.gz"
16 DEPEND="x11-libs/libX11"
23 epatch "${FILESDIR}/${P}-makefile.patch"
25 if use savedconfig; then
27 [[ -r config.h ]] && rm config.h
28 for conf in ${PF} ${P} ${PN}; do
29 for root in "${PORTAGE_CONFIGROOT}" "${ROOT}" /; do
30 configfile=${root}etc/portage/savedconfig/${conf}.config.h
31 if [[ -r ${configfile} ]]; then
32 elog "Found your ${configfile} and using it."
33 cp ${configfile} "${S}"/config.h
38 ewarn "Could not locate user configfile, so we will save a default one."
44 use savedconfig && msg=", please check the configfile"
45 emake CC=$(tc-getCC) || die "emake failed${msg}"
49 emake DESTDIR="${D}" PREFIX="/usr" install || die "emake install failed"
51 insinto /usr/share/${PN}
52 newins config.h ${PF}.config.h
58 mv "${D}"/usr/share/${PN}/${PF}.config.h "${T}"/
62 if use savedconfig; then
63 local config_dir="${PORTAGE_CONFIGROOT:-${ROOT}}/etc/portage/savedconfig"
64 elog "Saving this build config to ${config_dir}/${PF}.config.h"
65 einfo "Read this ebuild for more info on how to take advantage of this option."
66 mkdir -p "${config_dir}"
67 cp "${T}"/${PF}.config.h "${config_dir}"/${PF}.config.h
69 einfo "This ebuild has support for user defined configs"
70 einfo "Please read this ebuild for more details and re-emerge as needed"
71 einfo "if you want to add or remove functionality for ${PN}"
72 if ! has_version x11-misc/dmenu; then
73 elog "Installing ${PN} without x11-misc/dmenu"
74 einfo "To have a menu you can install x11-misc/dmenu"