summaryrefslogtreecommitdiff
blob: ae7915ecaf56d1916b5d8f87280c62515b6be41a (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
# Copyright 1999-2001 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2 or later
# Maintainer: System Team <system@gentoo.org>
# Author: Daniel Robbins <drobbins@gentoo.org>
# $Header: /var/cvsroot/gentoo-x86/sys-libs/gpm/gpm-1.19.3-r5.ebuild,v 1.2 2001/09/30 00:55:57 drobbins Exp $

S=${WORKDIR}/${P}
DESCRIPTION="Console-based mouse driver"
SRC_URI="ftp://metalab.unc.edu/pub/Linux/system/mouse/${P}.tar.gz ftp://ftp.prosa.it/pub/gpm/patches/devfs.patch"
DEPEND="virtual/glibc >=sys-libs/ncurses-5.2 sys-devel/autoconf"
RDEPEND="virtual/glibc"

src_unpack() {
  	unpack ${P}.tar.gz
	cd ${S}
	cp ${FILESDIR}/gpmInt.h .
	patch -p1 < ${DISTDIR}/devfs.patch
	#this little hack turns of EMACS byte compilation.  Really don't want this thing auto-detecting emacs
	cp configure.in configure.in.orig
	sed -e '45i\' -e 'EMACS=:\' -e 'ELISP=' configure.in.orig > configure.in || die
	autoconf || die
}

src_compile() {
	./configure --prefix=/usr --sysconfdir=/etc/gpm || die
	# without-curses is required to avoid cyclic dependencies to ncurses

	cp Makefile Makefile.orig
	#The emacs stuff turns off auto byte-"complication"
	sed -e "s/doc//" Makefile.orig > Makefile
	#-e '/$(EMACS)/c\' -e '	echo' 

	emake || die
}

src_install() {
	make prefix=${D}/usr install || die
	chmod 755 ${D}/usr/lib/libgpm.so.1.18.0
	dodoc Announce COPYING ChangeLog FAQ MANIFEST README*
	doman doc/gpm.8 doc/mev.1 doc/gpm-root.1 doc/gpm-types.7 doc/mouse-test.1
	doinfo doc/gpm.info
	docinto txt
	dodoc doc/gpmdoc.txt

	insinto /etc/gpm
	doins gpm-root.conf

	exeinto /etc/init.d
	newexe ${FILESDIR}/gpm.rc6 gpm
}