Magellan Linux

Contents of /smage/branches/alx08x-unstable/core/readline/readline-8.2-r3.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 18205 - (show annotations) (download)
Fri Apr 12 09:57:22 2024 UTC (7 weeks, 3 days ago) by niro
File size: 1653 byte(s)
-release branches/alx08x-unstable
1 # $Id$
2
3 PNAME="readline"
4 PVER="8.2"
5 PBUILD="r3"
6
7 PATCH_LEVEL="10"
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-6.4
15 >= app-shells/bash-5"
16
17 SRCFILE="${PNAME}-${PVER}.tar.gz"
18 SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"
19
20 ALX_PKG_KEEP="usr/$(MABI=m64 mlibdir)/*.so.*"
21 ALX_LIB32_PKG_KEEP="usr/$(MABI=m32 mlibdir)/*.so.*"
22 sminclude mtools multilib lib32-split alx-split
23
24 SRC_URI=(
25 gnu://${PNAME}/${SRCFILE}
26 mirror://${PNAME}/${SRCFILE}
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 "mirror://${PNAME}/${PNAME}${PVER/./}-${ver}"
34 done)
35 )
36
37 [[ ! -z ${PATCH_LEVEL} ]] && UP2PVER="${PVER}.${PATCH_LEVEL}"
38 UP2DATE="updatecmd_gnu ${PNAME} gz"
39
40 src_prepare()
41 {
42 munpack ${SRCFILE} || die
43
44 # apply all upstream patches
45 local i
46 local ver
47 for ((i=1; i <= PATCH_LEVEL; i++))
48 do
49 ver=00${i}
50 [[ ${i} -ge 10 ]] && ver=0${i}
51 [[ ${i} -ge 100 ]] && ver=${i}
52
53 mpatch ${PNAME}${PVER/./}-${ver} || die
54 done
55
56 # remove rpath from shared objects
57 all-abis 'sed -i "s|-Wl,-rpath,\$(libdir) ||g" support/shobj-conf || die'
58 }
59
60 src_compile()
61 {
62 # enforce -fpic
63 [[ ${ARCH} = x86_64 ]] && CFLAGS="${CFLAGS} -fPIC"
64
65 mconfigure || die
66 # enforce linking with ncurses
67 mmake SHLIB_LIBS=-lncursesw || die
68 }
69
70 alx_generic_src_install()
71 {
72 mmake DESTDIR=${BINDIR} install || die
73 minstalldocs CHANGELOG CHANGES COPYING MANIFEST NEWS README USAGE || die
74 }