summaryrefslogtreecommitdiff
blob: 233c46cf0d6c793247c3f3d11adeabbb4306c98e (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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
# Copyright 1999-2002 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-libs/ncurses/ncurses-5.2.20020511-r3.ebuild,v 1.1 2002/10/26 09:45:02 azarah Exp $

inherit eutils flag-o-matic

filter-flags "-fno-exceptions"

MY_PV=${PV%.*}

S=${WORKDIR}/${PN}-${MY_PV}
DESCRIPTION="Linux console display libarary"
SRC_URI="ftp://ftp.gnu.org/pub/gnu/${PN}/${PN}-${MY_PV}.tar.gz
	http://www.ibiblio.org/gentoo/distfiles/${PN}-${PV}.diff.bz2"
	#ftp://dickey.his.com/${PN}/${PV}/patch-${MY_PV}-20020427.sh.gz
	#ftp://dickey.his.com/${PN}/${PV}/${PN}-${MY_PV}-20020429.patch.gz
	#ftp://dickey.his.com/${PN}/${PV}/${PN}-${MY_PV}-20020511.patch.gz"
HOMEPAGE="http://www.gnu.org/software/ncurses/ncurses.html"
# bzip2 is needed to apply the patch. added 20020609 danarmak.

LICENSE="MIT"
SLOT="5"
KEYWORDS="x86 ppc sparc sparc64 alpha"

DEPEND="virtual/glibc
	sys-apps/bzip2"

RDEPEND="virtual/glibc"


src_unpack() {

	unpack ${PN}-${MY_PV}.tar.gz
	
	#this is how the gentoo patch was created.  avoids a dependency
	#on sharutils for uudecode :/
	#( zcat ${DISTDIR}/patch-${MY_PV}-20020427.sh.gz | sh ) || die
	#( zcat ${DISTDIR}/${PN}-${MY_PV}-20020429.patch.gz | patch -p1 ) || die
	#( zcat ${DISTDIR}/${PN}-${MY_PV}-20020511.patch.gz | patch -p1 ) || die
	#this is the generated patch..
	# bzcat doesn't always exist (i.e. making stage1), bunzip2 is safer
	# Gerk - June 26 2002
	( cd ${S}; bunzip2 -c ${DISTDIR}/${PN}-${PV}.diff.bz2 | patch -p1 ) || die

	cd ${S}
	# Do not compile tests
	rm -rf test/*
	echo "all:" > test/Makefile.in
	echo "install:" >> test/Makefile.in
}

src_compile() {

	[ -z "$DEBUGBUILD" ] && myconf="${myconf} --without-debug"

	econf --libdir=/lib \
		--enable-symlinks \
		--disable-termcap \
		--with-shared \
		--with-rcs-ids \
		${myconf} || die

	# this patch is completely invalid.  whoever was responsible for
	# generating it for the previous snapshots, please investigate with
	# regards to this current snapshot.
	#	patch -p1 <${FILESDIR}/ncurses-5.2.20020511-gcc31.patch

	#emake still doesn't work circa 25 Mar 2002
	make || die
}

src_install() {

	dodir /usr/lib
	make DESTDIR=${D} install || die

	cd ${D}/lib
	dosym libncurses.a /lib/libcurses.a
	chmod 755 ${D}/lib/*.${MY_PV}
	mv libform* libmenu* libpanel* ../usr/lib
	mv *.a ../usr/lib
	# bug #4411
	gen_usr_ldscript libncurses.so

	#with this fix, the default xterm has color as it should
	cd ${D}/usr/share/terminfo/x
	mv xterm xterm.orig
	dosym xterm-color /usr/share/terminfo/x/xterm

	if [ -n "`use build`" ]
	then
		cd ${D}
		rm -rf usr/share/man
		cd usr/share/terminfo
		cp -a l/linux n/nxterm v/vt100 ${T}
		rm -rf *
		mkdir l x v
		cp -a ${T}/linux l
		cp -a ${T}/nxterm x/xterm
		cp -a ${T}/vt100 v
		cd ${D}/usr/lib
		#bash compilation requires static libncurses libraries, so
		#this breaks the "build a new build image" system.  We now
		#need to remove libncurses.a from the build image manually.
		#rm *.a
	else
		cd ${S}
		dodoc ANNOUNCE MANIFEST NEWS README* TO-DO
		dodoc doc/*.doc
		dohtml -r doc/html/
#		docinto html/ada
#		dodoc doc/html/ada/*.htm
#		docinto html/ada/files
#		dodoc doc/html/ada/files/*.htm
#		docinto html/ada/funcs
#		dodoc doc/html/ada/funcs/*.htm
#		docinto html/man
#		dodoc doc/html/man/*.html
	fi
}