Contents of /branches/magellan-next/core/readline/readline-6.2-r2.smage2
Parent Directory | Revision Log
Revision 7558 -
(show annotations)
(download)
Thu May 26 21:16:35 2011 UTC (13 years, 4 months ago) by niro
File size: 2228 byte(s)
Thu May 26 21:16:35 2011 UTC (13 years, 4 months ago) by niro
File size: 2228 byte(s)
auto added: ver bump to 6.2-r2
1 | # $Id$ |
2 | |
3 | PNAME="readline" |
4 | PVER="6.2" |
5 | PBUILD="r2" |
6 | |
7 | PATCH_LEVEL="1" |
8 | |
9 | PCATEGORIE="sys-libs" |
10 | STATE="unstable" |
11 | |
12 | DESCRIPTION="readline is a set of libraries that offers command-line editing and history capabilities." |
13 | HOMEPAGE="http://cnswww.cns.cwru.edu/php/chet/readline/rltop.html" |
14 | |
15 | DEPEND=">= sys-libs/ncurses-5.9 |
16 | >= app-shells/bash-4" |
17 | |
18 | SRCFILE="${PNAME}-${PVER}.tar.gz" |
19 | SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" |
20 | |
21 | sminclude mtools multilib |
22 | |
23 | SRC_URI=( |
24 | gnu://${PNAME}/${SRCFILE} |
25 | ftp://ftp.cwru.edu/pub/bash/${SRCFILE} |
26 | mirror://${PNAME}/${SRCFILE} |
27 | mirror://${PNAME}/${PNAME}-5.0-parallel.patch |
28 | $(for ((i=1;i <= PATCH_LEVEL; i++)) |
29 | do |
30 | ver=00${i} |
31 | [[ ${i} -ge 10 ]] && ver=0${i} |
32 | [[ ${i} -ge 100 ]] && ver=${i} |
33 | echo "gnu://${PNAME}/${PNAME}-${PVER}-patches/${PNAME}${PVER/./}-${ver}" |
34 | echo "ftp://ftp.cwru.edu/pub/bash/${PNAME}-${PVER}-patches/${PNAME}${PVER/./}-${ver}" |
35 | echo "mirror://${PNAME}/${PNAME}${PVER/./}-${ver}" |
36 | done) |
37 | ) |
38 | |
39 | [[ ! -z ${PATCH_LEVEL} ]] && UP2PVER="${PVER}.${PATCH_LEVEL}" |
40 | UP2DATE="updatecmd_gnu ${PNAME} gz" |
41 | |
42 | src_prepare() |
43 | { |
44 | munpack ${SRCFILE} || die |
45 | |
46 | # apply all upstream patches |
47 | local i |
48 | local ver |
49 | for ((i=1; i <= PATCH_LEVEL; i++)) |
50 | do |
51 | ver=00${i} |
52 | [[ ${i} -ge 10 ]] && ver=0${i} |
53 | [[ ${i} -ge 100 ]] && ver=${i} |
54 | |
55 | mpatch ${PNAME}${PVER/./}-${ver} || die |
56 | done |
57 | |
58 | # fix parallel build |
59 | mpatch ${PNAME}-5.0-parallel.patch || die |
60 | } |
61 | |
62 | src_compile() |
63 | { |
64 | mconfigure --libdir=/'$(mlibdir)' || die |
65 | |
66 | # enforce linking with ncurses |
67 | mmake SHLIB_XLDFLAGS=-lncursesw || die |
68 | } |
69 | |
70 | src_install() |
71 | { |
72 | # needed directories |
73 | all-abis minstalldir /usr/'$(mlibdir)' || die |
74 | |
75 | minstall_destdir || die |
76 | |
77 | # fix permissions |
78 | all-abis mchmod 0755 /'$(mlibdir)'/lib{readline,history}.so'\*' || die |
79 | |
80 | # move static libs to /usr/lib |
81 | all-abis mv ${BINDIR}/'$(mlibdir)'/lib{readline,history}.a ${BINDIR}/usr/'$(mlibdir)' || die |
82 | |
83 | # remove *.so from /lib and link them to /usr/lib |
84 | all-abis rm -v ${BINDIR}/'$(mlibdir)'/lib{readline,history}.so || die |
85 | all-abis mlink ../../'$(mlibdir)'/libreadline.so.${PVER%.*} /usr/'$(mlibdir)'/libreadline.so || die |
86 | all-abis mlink ../../'$(mlibdir)'/libhistory.so.${PVER%.*} /usr/'$(mlibdir)'/libhistory.so || die |
87 | |
88 | minstalldocs CHANGELOG CHANGES COPYING MANIFEST NEWS README USAGE || die |
89 | } |