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