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