summaryrefslogtreecommitdiff
blob: 43dcc0de2bd45cd57487706463f91fda45ae415e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/x11-wm/ion-devel/ion-devel-20030814-r4.ebuild,v 1.1 2003/11/05 17:21:59 twp Exp $

MY_P=${PN}-${PV/_p/-}
DESCRIPTION="A tiling tabbed window manager designed with keyboard users in mind"
HOMEPAGE="http://www.iki.fi/tuomov/ion/"
SRC_URI="http://modeemi.fi/~tuomov/dl/${MY_P}.tar.gz"
LICENSE="Clarified-Artistic"
SLOT="0"
KEYWORDS="~alpha ~arm ~hppa ~mips ~ppc ~sparc ~x86"
IUSE="xinerama"
DEPEND="virtual/x11
	app-misc/run-mailcap
	>=dev-lang/lua-5"
S=${WORKDIR}/${MY_P}

inherit eutils

src_unpack() {

	unpack ${A}

	cd ${S}

	epatch ${FILESDIR}/system.mk-${PV}-no-utf8.patch
	epatch ${FILESDIR}/stripws-${PV}.patch
	epatch ${FILESDIR}/tabdrag-${PV}.patch
	epatch ${FILESDIR}/stacking-${PV}.patch

	sed -i system.mk \
		-e "s/@CFLAGS@/${CFLAGS}/g" \
		-e "s/@PF@/${PF}/g"
	if [ `use xinerama` ]; then
		einfo Enabling Xinerama support
		eend 0
	else
		einfo Disabling Xinerama support
		sed -i system.mk \
			-e 's/\(XINERAMA_LIBS=-lXinerama\)/#\1/' \
			-e 's/#\(DEFINES += -DCF_NO_XINERAMA\)/\1/'
		eend $?
	fi

	if has_version '<x11-base/xfree-4.3.0'; then
		einfo Enabling Xfree\<4.3.0/Opera/UTF-8 bug workaround
		eend 0
	else
		einfo Disabling Xfree\<4.3.0/Opera/UTF-8 bug workaround
		sed -i system.mk \
			-e 's/\(DEFINES += -DCF_XFREE86_TEXTPROP_BUG_WORKAROUND\)/#\1/'
		eend $?
	fi

}

src_compile() {
	emake || die
}

src_install() {

	make PREFIX=${D}/usr ETCDIR=${D}/etc/X11/ion-devel install || die
	dobin scripts/pwm

	echo -e "#!/bin/sh\n/usr/bin/ion" > ${T}/ion-devel
	echo -e "#!/bin/sh\n/usr/bin/pwm" > ${T}/pwm
	exeinto /etc/X11/Sessions
	doexe ${T}/ion-devel ${T}/pwm

}

pkg_postinst() {
	ewarn The configuration file format has changed. You may have to re-write your
	ewarn configuration files.
	ewarn To delete stale system-wide configuration files, run the command:
	ewarn "\trm -f ${R}/etc/X11/ion-devel/*.conf"
}