Annotation of /smage/trunk/core/ncurses/ncurses-5.9-r1.smage2
Parent Directory | Revision Log
Revision 1736 -
(hide annotations)
(download)
Mon Sep 19 08:25:14 2011 UTC (12 years, 7 months ago) by niro
File size: 4854 byte(s)
Mon Sep 19 08:25:14 2011 UTC (12 years, 7 months ago) by niro
File size: 4854 byte(s)
auto added: ver bump to 5.9-r1
1 | niro | 1736 | # $Id$ |
2 | |||
3 | PNAME="ncurses" | ||
4 | PVER="5.9" | ||
5 | PBUILD="r1" | ||
6 | |||
7 | PCATEGORIE="sys-libs" | ||
8 | |||
9 | DESCRIPTION="Linux console display library." | ||
10 | HOMEPAGE="http://www.gnu.org/software/ncurses/ncurses.html" | ||
11 | |||
12 | DEPEND=">= virtual/glibc" | ||
13 | |||
14 | SRCFILE="${PNAME}-${PVER}.tar.gz" | ||
15 | SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" | ||
16 | |||
17 | MCORE_ONLY_KEEP="$(mlibdir)/*.so | ||
18 | $(mlibdir)/*.so.* | ||
19 | usr/$(mlibdir)/*.so | ||
20 | usr/$(mlibdir)/*.so.* | ||
21 | usr/$(mlibdir)/terminfo | ||
22 | usr/share/tabset | ||
23 | usr/share/terminfo/l/linux | ||
24 | usr/share/terminfo/r/rxvt | ||
25 | usr/share/terminfo/v/vt100 | ||
26 | usr/share/terminfo/x/xterm | ||
27 | usr/share/terminfo/x/xterm-color" | ||
28 | |||
29 | sminclude mtools multilib mcore-split | ||
30 | |||
31 | SRC_URI=( | ||
32 | gnu://${PNAME}/${SRCFILE} | ||
33 | mirror://${PNAME}/${SRCFILE} | ||
34 | ) | ||
35 | |||
36 | UP2DATE="updatecmd_gnu ${PNAME} gz" | ||
37 | |||
38 | src_prepare() | ||
39 | { | ||
40 | # non widec | ||
41 | munpack ${SRCFILE} || die | ||
42 | for abi in ${MULTILIB_ABIS} | ||
43 | do | ||
44 | mv ${SRCDIR}{,-non-widec}-${abi} || die | ||
45 | done | ||
46 | |||
47 | # widec | ||
48 | munpack ${SRCFILE} || die | ||
49 | } | ||
50 | |||
51 | src_compile() | ||
52 | { | ||
53 | # fixes build issues on multilib; do not export any ABI_LDFLAGS | ||
54 | EXPORT_ABI_LDFLAGS=false | ||
55 | |||
56 | # widec | ||
57 | # -hashed-db needs Berkeley DB | ||
58 | mconfigure --with-shared --without-debug --without-hashed-db --enable-widec || die | ||
59 | # fix parallel make builds | ||
60 | mmake -j1 sources || die | ||
61 | mmake || die | ||
62 | |||
63 | # non-widec | ||
64 | # -hashed-db needs Berkeley DB | ||
65 | SRCDIR="${SRCDIR}-non-widec" mconfigure --with-shared --without-debug --without-hashed-db || die | ||
66 | # fix parallel make builds | ||
67 | SRCDIR="${SRCDIR}-non-widec" mmake -j1 sources || die | ||
68 | SRCDIR="${SRCDIR}-non-widec" mmake || die | ||
69 | } | ||
70 | |||
71 | mcore_generic_src_install() | ||
72 | { | ||
73 | # needed directories | ||
74 | minstalldir /$(mlibdir) || die | ||
75 | |||
76 | minstall_destdir || die | ||
77 | |||
78 | mchmod 755 /usr/$(mlibdir)/\*.${PVER} || die | ||
79 | mchmod 644 /usr/$(mlibdir)/libncurses++w.a || die | ||
80 | mv ${BINDIR}/usr/$(mlibdir)/libncursesw.so.5* ${BINDIR}/$(mlibdir) || die | ||
81 | mlink ../../$(mlibdir)/libncursesw.so.5 /usr/$(mlibdir)/libncursesw.so || die | ||
82 | mlink libncursesw.so /usr/$(mlibdir)/libcursesw.so || die | ||
83 | |||
84 | # non-widec compat | ||
85 | for lib in curses ncurses form panel menu | ||
86 | do | ||
87 | echo "INPUT(-l${lib}w)" > ${BINDIR}/usr/$(mlibdir)/lib${lib}.so || die | ||
88 | mlink lib${lib}w.a /usr/$(mlibdir)/lib${lib}.a || die | ||
89 | done | ||
90 | mlink libcurses.so /usr/$(mlibdir)/libcursesw.so || die | ||
91 | mlink libncurses.so /usr/$(mlibdir)/libcurses.so || die | ||
92 | mlink libncursesw.a /usr/$(mlibdir)/libcursesw.a || die | ||
93 | mlink libncurses.a /usr/$(mlibdir)/libcurses.a || die | ||
94 | mlink libncurses++w.a /usr/$(mlibdir)/libncurses++.a || die | ||
95 | # curses-config too | ||
96 | mlink ncursesw5-config /usr/bin/ncurses5-config || die | ||
97 | |||
98 | # move the -m32 libs also to the right place (multilib) | ||
99 | if [[ $(mlibdir) != lib ]] | ||
100 | then | ||
101 | minstalldir /lib || die | ||
102 | mchmod 755 /usr/lib/\*.${PVER} || die | ||
103 | mchmod 644 /usr/lib/libncurses++w.a || die | ||
104 | mv ${BINDIR}/usr/lib/libncursesw.so.5* ${BINDIR}/lib || die | ||
105 | mlink ../../lib/libncursesw.so.5 /usr/lib/libncursesw.so || die | ||
106 | mlink libncursesw.so /usr/lib/libcursesw.so || die | ||
107 | |||
108 | # non-widec compat | ||
109 | for lib in curses ncurses form panel menu | ||
110 | do | ||
111 | echo "INPUT(-l${lib}w)" > ${BINDIR}/usr/lib/lib${lib}.so || die | ||
112 | mlink lib${lib}w.a /usr/lib/lib${lib}.a || die | ||
113 | done | ||
114 | mlink libcurses.so /usr/lib/libcursesw.so || die | ||
115 | mlink libncurses.so /usr/lib/libcurses.so || die | ||
116 | mlink libncursesw.a /usr/lib/libcursesw.a || die | ||
117 | mlink libncurses.a /usr/lib/libcurses.a || die | ||
118 | mlink libncurses++w.a /usr/lib/libncurses++.a || die | ||
119 | fi | ||
120 | |||
121 | # install non-widec runtime compat library (do not use minstalllib, | ||
122 | # we need libcnurses.so with loader hint for libncursesw and not a plain symlink! | ||
123 | all-abis minstallexec ${SRCDIR}-non-widec-'$abi'/lib/libncurses.so.${PVER} /usr/'$(mlibdir)' || die | ||
124 | all-abis mlink libncurses.so.${PVER} /usr/'$(mlibdir)'/libncurses.so.${PVER%%.*} || die | ||
125 | |||
126 | # fixes a small man issue | ||
127 | if [ -e ${BINDIR}/usr/share/man/tack.1 ] | ||
128 | then | ||
129 | mv ${BINDIR}/usr/share/man/tack.1 \ | ||
130 | ${BINDIR}/usr/share/man/man1 || die | ||
131 | fi | ||
132 | |||
133 | # fix to enable colors in the default xterm | ||
134 | mv ${BINDIR}/usr/share/terminfo/x/xterm \ | ||
135 | ${BINDIR}/usr/share/terminfo/x/xterm.orig || die | ||
136 | mlink xterm-color /usr/share/terminfo/x/xterm || die | ||
137 | |||
138 | minstalldocs ANNOUNCE MANIFEST NEWS README* TO-DO || die | ||
139 | } | ||
140 | |||
141 | preinstall() | ||
142 | { | ||
143 | if [ -L ${MROOT}/usr/$(mlibdir)/libncurses.so ] | ||
144 | then | ||
145 | rm ${MROOT}/usr/$(mlibdir)/libncurses.so || die | ||
146 | fi | ||
147 | |||
148 | if [ -L ${MROOT}/usr/$(mlibdir)/libncurses.so.5 ] | ||
149 | then | ||
150 | rm ${MROOT}/usr/$(mlibdir)/libncurses.so.5 || die | ||
151 | fi | ||
152 | |||
153 | if [ -L ${MROOT}/usr/$(mlibdir)/libcurses.so.5 ] | ||
154 | then | ||
155 | rm ${MROOT}/usr/$(mlibdir)/libcurses.so.5 || die | ||
156 | fi | ||
157 | |||
158 | if [[ $(mlibdir) != lib ]] | ||
159 | then | ||
160 | if [ -L ${MROOT}/usr/lib/libncurses.so ] | ||
161 | then | ||
162 | rm ${MROOT}/usr/lib/libncurses.so || die | ||
163 | fi | ||
164 | |||
165 | if [ -L ${MROOT}/usr/lib/libncurses.so.5 ] | ||
166 | then | ||
167 | rm ${MROOT}/usr/lib/libncurses.so.5 || die | ||
168 | fi | ||
169 | |||
170 | if [ -L ${MROOT}/usr/lib/libcurses.so.5 ] | ||
171 | then | ||
172 | rm ${MROOT}/usr/lib/libcurses.so.5 || die | ||
173 | fi | ||
174 | fi | ||
175 | } | ||
176 | |||
177 | postinstall() | ||
178 | { | ||
179 | # force ldconfig here | ||
180 | if [[ -z ${MROOT} ]] || [[ ${MROOT} = / ]] | ||
181 | then | ||
182 | /sbin/ldconfig | ||
183 | fi | ||
184 | } |