From e482c8ae48b47e9b3fba2799c52f0ea18ae21df2 Mon Sep 17 00:00:00 2001 From: Olof-Joachim Frahm Date: Tue, 22 Jul 2014 21:08:24 +0100 Subject: [PATCH] Add dwm from git. --- x11-wm/dwm/Manifest | 3 ++ x11-wm/dwm/dwm-9999.ebuild | 88 +++++++++++++++++++++++++++++++++++++++++ x11-wm/dwm/files/dwm-session2 | 11 ++++++ x11-wm/dwm/files/dwm.desktop | 8 ++++ 4 files changed, 110 insertions(+) create mode 100644 x11-wm/dwm/Manifest create mode 100644 x11-wm/dwm/dwm-9999.ebuild create mode 100644 x11-wm/dwm/files/dwm-session2 create mode 100644 x11-wm/dwm/files/dwm.desktop diff --git a/x11-wm/dwm/Manifest b/x11-wm/dwm/Manifest new file mode 100644 index 0000000..1bc2600 --- /dev/null +++ b/x11-wm/dwm/Manifest @@ -0,0 +1,3 @@ +AUX dwm-session2 170 SHA256 b25088c71daa7ec759bf1ae758b8ef528dcced6cfb642ccdcb69ffa8644dc5ab SHA512 e882c447824ec430862f9af968aad0f2276b7ab28cf60b8f8e49551e3b9cc2a249429987f4a7d6577eb18182b7709fb4d7c5c4651192a04dc2394ba9afa89f08 WHIRLPOOL 73a201f8e4385bc62fbf1aeb3c54918ef6ec0eeefbf8c100a694d88b5f036b520633f1957b2f3f3b70c95f8e374e90327f306afb0766c8f0dfe715084a02d079 +AUX dwm.desktop 133 SHA256 1a1ae9d1d5eb4747a1241798969c5b151ec66901a62af683304c6f23e4ccc30e SHA512 23ccd0a41c20713c1d6a5eff9a4560b30886afc26fe83100ec23298a675a71d9957d2dd85c0ee2c2e2210022e6035a9a3de30eff7692f01f1b80ed6c95bf731b WHIRLPOOL 24d29359829deeeecb9b4d010243c81e22be41207c7528a6ebcc6108aa1a0c1bb0b8242f6b20f83b67a0340a5d1178f077989469b30ed71fb952d820743b9c62 +EBUILD dwm-9999.ebuild 2374 SHA256 a47ccc1fbbfce85e2c92bd9f392b93ac1d42ed0b6e968b469673e377566c03c8 SHA512 34f77c04b4cb23b74a0c66843cc5029cba6710709b2ec3f11eae98711671e1b7cd15ce628a89774a7c145bb21c3ef816eacc54df55d52d35b484c9d12259ddd9 WHIRLPOOL 8044ce95cf9648a040c996958c9a430d9d985d5f71d36bf8e8d0e6141ddd98bb33b2491d2b28676f48719702f269660322b56cfd91aa18758f9c8ed80bcde753 diff --git a/x11-wm/dwm/dwm-9999.ebuild b/x11-wm/dwm/dwm-9999.ebuild new file mode 100644 index 0000000..5b3e8ec --- /dev/null +++ b/x11-wm/dwm/dwm-9999.ebuild @@ -0,0 +1,88 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/x11-wm/dwm/dwm-6.0.ebuild,v 1.12 2013/02/06 15:19:31 jer Exp $ + +EAPI=5 + +inherit eutils git-r3 savedconfig toolchain-funcs + +DESCRIPTION="a dynamic window manager for X11" +HOMEPAGE="http://dwm.suckless.org/" +EGIT_REPO_URI="https://github.com/Ferada/dwm.git" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="" +IUSE="xinerama" + +RDEPEND=" + x11-libs/libX11 + x11-libs/libXft + media-libs/freetype:2 + xinerama? ( x11-libs/libXinerama ) +" +DEPEND="${RDEPEND} + xinerama? ( x11-proto/xineramaproto ) + virtual/pkgconfig +" + +src_prepare() { + sed -i \ + -e "s/CFLAGS = -std=c99 -pedantic -Wall -Os/CFLAGS += -std=c99 -pedantic -Wall/" \ + -e "/^LDFLAGS/{s|=|+=|g;s|-s ||g}" \ + -e "s/#XINERAMALIBS =/XINERAMALIBS ?=/" \ + -e "s/#XINERAMAFLAGS =/XINERAMAFLAGS ?=/" \ + -e "s@-I/usr/include/freetype2@$( $(tc-getPKG_CONFIG) --cflags freetype2 xft 2>/dev/null )@" \ + -e "s@/usr/X11R6/include@${EPREFIX}/usr/include/X11@" \ + -e "s@/usr/X11R6/lib@${EPREFIX}/usr/lib/X11@" \ + -e "s@-lXft@$( $(tc-getPKG_CONFIG) --libs freetype2 xft 2>/dev/null )@" \ + -e "s@-L/usr/lib@@" \ + config.mk || die + sed -i \ + -e '/@echo CC/d' \ + -e 's|@${CC}|$(CC)|g' \ + Makefile || die + + restore_config config.def.h + epatch_user +} + +src_configure() { + tc-export PKG_CONFIG +} + +src_compile() { + if use xinerama; then + emake CC=$(tc-getCC) dwm + else + emake CC=$(tc-getCC) XINERAMAFLAGS="" XINERAMALIBS="" dwm + fi +} + +src_install() { + emake DESTDIR="${D}" PREFIX="${EPREFIX}/usr" install + + exeinto /etc/X11/Sessions + newexe "${FILESDIR}"/dwm-session2 dwm + + insinto /usr/share/xsessions + doins "${FILESDIR}"/dwm.desktop + + dodoc README + + save_config config.def.h +} + +pkg_postinst() { + einfo "This ebuild has support for user defined configs" + einfo "Please read this ebuild for more details and re-emerge as needed" + einfo "if you want to add or remove functionality for ${PN}" + if ! has_version x11-misc/dmenu; then + elog "Installing ${PN} without x11-misc/dmenu" + einfo "To have a menu you can install x11-misc/dmenu" + fi + einfo "You can custom status bar with a script in HOME/.dwm/dwmrc" + einfo "the ouput is redirected to the standard input of dwm" + einfo "Since dwm-5.4, status info in the bar must be set like this:" + einfo "xsetroot -name \"\`date\` \`uptime | sed 's/.*,//'\`\"" +} diff --git a/x11-wm/dwm/files/dwm-session2 b/x11-wm/dwm/files/dwm-session2 new file mode 100644 index 0000000..f886ce9 --- /dev/null +++ b/x11-wm/dwm/files/dwm-session2 @@ -0,0 +1,11 @@ +#!/bin/sh +DIR=${HOME}/.dwm +if [ -f "${DIR}"/dwmrc ]; then + /bin/sh "${DIR}"/dwmrc & +else + while true; do + xsetroot -name "`date`" + sleep 1 + done & +fi +exec /usr/bin/dwm diff --git a/x11-wm/dwm/files/dwm.desktop b/x11-wm/dwm/files/dwm.desktop new file mode 100644 index 0000000..d6131b5 --- /dev/null +++ b/x11-wm/dwm/files/dwm.desktop @@ -0,0 +1,8 @@ +[Desktop Entry] +Encoding=UTF-8 +Name=dwm +Comment=dynamic window manager +Exec=/etc/X11/Sessions/dwm +TryExec=dwm +Icon= +Type=Application -- 1.7.10.4