summaryrefslogtreecommitdiff
blob: 39e3236b0f35cd9c116f4e4b6cc1ff9811dee3a2 (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
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-misc/twin/twin-0.3.8-r1.ebuild,v 1.14 2003/09/05 12:10:36 msterret Exp $

IUSE="X ggi"

S=${WORKDIR}/${P}
DESCRIPTION="A text-mode window environment"
SRC_URI="mirror://sourceforge/twin/${P}.tar.gz
	http://linuz.sns.it/~max/twin/${P}.tar.gz"
HOMEPAGE="http://linuz.sns.it/~max/twin/"

SLOT="0"
LICENSE="GPL-2 LGPL-2"
KEYWORDS="x86 ppc"

DEPEND="X? ( virtual/x11 )
	ggi? ( >=media-libs/libggi-1.9 )
	>=sys-libs/gpm-1.19.3
	>=sys-libs/ncurses-5.2"

src_unpack() {
	unpack ${A}
	cd ${S}
	patch -p1 < ${FILESDIR}/${PF}-gentoo.diff || die
}

src_compile() {
	local conf
	conf="\n\n\n\n\n""\n\n\n\n\n""\n\ny\n\n\n""\n\n\n\n"

	use X \
	   && conf=${conf}"y\n" \
	   || conf=${conf}"n\n"

	conf=${conf}"\n\n"
	use ggi \
	   && conf=${conf}"y\n" \
	   || conf=${conf}"n\n"

	conf=${conf}"\n\n""\n\n\n\nn\n"
	echo -e "${conf}" > test
	cat test | make config
	rm test
	make clean || die
	make || die
}

src_install() {

	dodir /usr/lib /usr/bin /usr/lib/ /usr/include /usr/include/Tw \
		/usr/lib/twin/modules /usr/X11R6/lib/X11/fonts/misc

	DESTDIR=${D} make install || die

	use X && ( \
		insinto /usr/X11R6/lib/X11/fonts/misc
		doins fonts/vga.pcf.gz
	)

}

pkg_postinst() {
	use X && ( \
		/usr/X11R6/bin/mkfontdir /usr/X11R6/lib/X11/fonts/misc
		/usr/X11R6/bin/xset fp rehash
	)
}

pkg_postrm() {
	use X && ( \
		/usr/X11R6/bin/mkfontdir /usr/X11R6/lib/X11/fonts/misc
		/usr/X11R6/bin/xset fp rehash
	)
}