1 # Copyright 1999-2013 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/x11-wm/dwm/dwm-6.0.ebuild,v 1.12 2013/02/06 15:19:31 jer Exp $
7 inherit eutils git-r3 savedconfig toolchain-funcs
9 DESCRIPTION="a dynamic window manager for X11"
10 HOMEPAGE="http://dwm.suckless.org/"
11 EGIT_REPO_URI="https://github.com/Ferada/dwm.git"
22 xinerama? ( x11-libs/libXinerama )
25 xinerama? ( x11-proto/xineramaproto )
31 -e "s/CFLAGS = -std=c99 -pedantic -Wall -Os/CFLAGS += -std=c99 -pedantic -Wall/" \
32 -e "/^LDFLAGS/{s|=|+=|g;s|-s ||g}" \
33 -e "s/#XINERAMALIBS =/XINERAMALIBS ?=/" \
34 -e "s/#XINERAMAFLAGS =/XINERAMAFLAGS ?=/" \
35 -e "s@-I/usr/include/freetype2@$( $(tc-getPKG_CONFIG) --cflags freetype2 xft 2>/dev/null )@" \
36 -e "s@/usr/X11R6/include@${EPREFIX}/usr/include/X11@" \
37 -e "s@/usr/X11R6/lib@${EPREFIX}/usr/lib/X11@" \
38 -e "s@-lXft@$( $(tc-getPKG_CONFIG) --libs freetype2 xft 2>/dev/null )@" \
43 -e 's|@${CC}|$(CC)|g' \
46 restore_config config.def.h
56 emake CC=$(tc-getCC) dwm
58 emake CC=$(tc-getCC) XINERAMAFLAGS="" XINERAMALIBS="" dwm
63 emake DESTDIR="${D}" PREFIX="${EPREFIX}/usr" install
65 exeinto /etc/X11/Sessions
66 newexe "${FILESDIR}"/dwm-session2 dwm
68 insinto /usr/share/xsessions
69 doins "${FILESDIR}"/dwm.desktop
73 save_config config.def.h
77 einfo "This ebuild has support for user defined configs"
78 einfo "Please read this ebuild for more details and re-emerge as needed"
79 einfo "if you want to add or remove functionality for ${PN}"
80 if ! has_version x11-misc/dmenu; then
81 elog "Installing ${PN} without x11-misc/dmenu"
82 einfo "To have a menu you can install x11-misc/dmenu"
84 einfo "You can custom status bar with a script in HOME/.dwm/dwmrc"
85 einfo "the ouput is redirected to the standard input of dwm"
86 einfo "Since dwm-5.4, status info in the bar must be set like this:"
87 einfo "xsetroot -name \"\`date\` \`uptime | sed 's/.*,//'\`\""