/[gentoo-alt]/trunk/prefix/sys-libs/readline/readline-5.1_p2.ebuild
Gentoo

Contents of /trunk/prefix/sys-libs/readline/readline-5.1_p2.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1140 - (show annotations) (download)
Sat Mar 11 10:23:40 2006 UTC (8 years, 5 months ago) by grobian
File size: 3177 byte(s)
Version bump from mainline tree


1 # Copyright 1999-2006 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/sys-libs/readline/readline-5.1_p2.ebuild,v 1.8 2006/03/10 20:38:19 nixnut Exp $
4
5 EAPI="prefix"
6
7 inherit eutils multilib toolchain-funcs
8
9 # Official patches
10 # See ftp://ftp.cwru.edu/pub/bash/readline-5.1-patches/
11 PLEVEL=${PV##*_p}
12 MY_PV=${PV/_p*}
13 MY_P=${PN}-${MY_PV}
14
15 DESCRIPTION="Another cute console display library"
16 HOMEPAGE="http://cnswww.cns.cwru.edu/php/chet/readline/rltop.html"
17 SRC_URI="mirror://gnu/readline/${MY_P}.tar.gz
18 $(for ((i=1; i<=PLEVEL; i++)); do
19 printf 'ftp://ftp.cwru.edu/pub/bash/readline-%s-patches/readline%s-%03d\n' \
20 ${MY_PV} ${MY_PV/\.} ${i}
21 printf 'mirror://gnu/bash/readline-%s-patches/readline%s-%03d\n' \
22 ${MY_PV} ${MY_PV/\.} ${i}
23 done)"
24
25 LICENSE="GPL-2"
26 SLOT="0"
27 KEYWORDS="~alpha amd64 arm ~hppa ia64 m68k ~mips ppc ppc-macos ppc64 s390 sh sparc x86"
28 IUSE=""
29
30 # We must be certain that we have a bash that is linked
31 # to its internal readline, else we may get problems.
32 RDEPEND=">=sys-libs/ncurses-5.2-r2"
33 DEPEND="${RDEPEND}
34 >=app-shells/bash-2.05b-r2"
35
36 S=${WORKDIR}/${MY_P}
37
38 src_unpack() {
39 unpack ${MY_P}.tar.gz
40
41 cd "${S}"
42 # Official patches
43 local i
44 for ((i=1; i<=PLEVEL; i++)); do
45 epatch "${DISTDIR}"/${PN}${MY_PV/\.}-$(printf '%03d' ${i})
46 done
47 epatch "${FILESDIR}"/bash-3.0-etc-inputrc.patch
48 epatch "${FILESDIR}"/${PN}-5.0-no_rpath.patch
49 epatch "${FILESDIR}"/${MY_P}-cleanups.patch
50 epatch "${FILESDIR}"/${MY_P}-rlfe-build.patch #116483
51 epatch "${FILESDIR}"/${MY_P}-rlfe-uclibc.patch
52 epatch "${FILESDIR}"/${MY_P}-rlfe-libutil.patch
53
54 ln -s ../.. examples/rlfe/readline
55
56 # force ncurses linking #71420
57 sed -i -e 's:^SHLIB_LIBS=:SHLIB_LIBS=-lncurses:' support/shobj-conf || die "sed"
58 }
59
60 src_compile() {
61 # the --libdir= is needed because if lib64 is a directory, it will default
62 # to using that... even if CONF_LIBDIR isnt set or we're using a version
63 # of portage without CONF_LIBDIR support.
64 econf --with-curses --libdir=${PREFIX}/usr/$(get_libdir) || die
65 emake || die
66
67 if ! tc-is-cross-compiler; then
68 cd examples/rlfe
69 econf || die
70 emake || die "make rlfe failed"
71 fi
72 }
73
74 src_install() {
75 make DESTDIR="${DEST}" install || die
76 dodir /$(get_libdir)
77
78 if ! use userland_Darwin ; then
79 mv "${D}"/usr/$(get_libdir)/*.so* "${D}"/$(get_libdir)
80 chmod a+rx "${D}"/$(get_libdir)/*.so*
81
82 # Bug #4411
83 gen_usr_ldscript libreadline.so
84 gen_usr_ldscript libhistory.so
85 fi
86
87 if ! tc-is-cross-compiler; then
88 dobin examples/rlfe/rlfe || die
89 fi
90
91 dodoc CHANGELOG CHANGES README USAGE NEWS
92 docinto ps
93 dodoc doc/*.ps
94 dohtml -r doc
95 }
96
97 pkg_preinst() {
98 # Backwards compatibility #29865
99 if [[ -e ${ROOT}/$(get_libdir)/libreadline.so.4 ]] ; then
100 cp -pPR "${ROOT}"/$(get_libdir)/libreadline.so.4* "${D}"/$(get_libdir)/
101 touch "${D}"/$(get_libdir)/libreadline.so.4*
102 fi
103 }
104
105 pkg_postinst() {
106 if [[ -e ${ROOT}/$(get_libdir)/libreadline.so.4 ]] ; then
107 ewarn "Your old readline libraries have been copied over."
108 ewarn "You should run 'revdep-rebuild --library libreadline.so.4' asap."
109 ewarn "Once you have, you can safely delete /$(get_libdir)/libreadline.so.4*"
110 fi
111 }

  ViewVC Help
Powered by ViewVC 1.1.20