/[gentoo-x86]/sys-libs/ncurses/ncurses-5.9-r2.ebuild
Gentoo

Contents of /sys-libs/ncurses/ncurses-5.9-r2.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.18 - (show annotations) (download)
Sat Jan 18 02:22:37 2014 UTC (7 months ago) by vapier
Branch: MAIN
CVS Tags: HEAD
Changes since 1.17: +3 -3 lines
Add arm64 love.

(Portage version: 2.2.8/cvs/Linux x86_64, signed Manifest commit with key D2E96200)

1 # Copyright 1999-2014 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/sys-libs/ncurses/ncurses-5.9-r2.ebuild,v 1.17 2013/01/17 04:19:21 vapier Exp $
4
5 EAPI="1"
6 inherit eutils flag-o-matic toolchain-funcs
7
8 MY_PV=${PV:0:3}
9 PV_SNAP=${PV:4}
10 MY_P=${PN}-${MY_PV}
11 DESCRIPTION="console display library"
12 HOMEPAGE="http://www.gnu.org/software/ncurses/ http://dickey.his.com/ncurses/"
13 SRC_URI="mirror://gnu/ncurses/${MY_P}.tar.gz"
14
15 LICENSE="MIT"
16 SLOT="5"
17 KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
18 IUSE="ada +cxx debug doc gpm minimal profile static-libs tinfo trace unicode"
19
20 DEPEND="gpm? ( sys-libs/gpm )"
21 # berkdb? ( sys-libs/db )"
22 RDEPEND="${DEPEND}
23 !<x11-terms/rxvt-unicode-9.06-r3"
24
25 S=${WORKDIR}/${MY_P}
26
27 src_unpack() {
28 unpack ${A}
29 cd "${S}"
30 [[ -n ${PV_SNAP} ]] && epatch "${WORKDIR}"/${MY_P}-${PV_SNAP}-patch.sh
31 epatch "${FILESDIR}"/${PN}-5.8-gfbsd.patch
32 epatch "${FILESDIR}"/${PN}-5.7-nongnu.patch
33 epatch "${FILESDIR}"/${PN}-5.9-rxvt-unicode-9.15.patch #192083 #383871
34 epatch "${FILESDIR}"/${PN}-5.9-fix-clang-build.patch #417763
35 }
36
37 src_compile() {
38 unset TERMINFO #115036
39 tc-export_build_env BUILD_{CC,CPP}
40 BUILD_CPPFLAGS+=" -D_GNU_SOURCE" #214642
41
42 # when cross-compiling, we need to build up our own tic
43 # because people often don't keep matching host/target
44 # ncurses versions #249363
45 if tc-is-cross-compiler && ! ROOT=/ has_version ~sys-libs/${P} ; then
46 make_flags="-C progs tic"
47 CHOST=${CBUILD} \
48 CFLAGS=${BUILD_CFLAGS} \
49 CXXFLAGS=${BUILD_CXXFLAGS} \
50 CPPFLAGS=${BUILD_CPPFLAGS} \
51 LDFLAGS="${BUILD_LDFLAGS} -static" \
52 do_compile cross --without-shared --with-normal
53 fi
54
55 make_flags=""
56 do_compile narrowc
57 use unicode && do_compile widec --enable-widec --includedir=/usr/include/ncursesw
58 }
59 do_compile() {
60 ECONF_SOURCE=${S}
61
62 mkdir "${WORKDIR}"/$1
63 cd "${WORKDIR}"/$1
64 shift
65
66 # ncurses is dumb and doesn't install .pc files unless pkg-config
67 # is also installed. Force the tests to go our way. Note that it
68 # doesn't actually use pkg-config ... it just looks for set vars.
69 tc-export PKG_CONFIG
70 export PKG_CONFIG_LIBDIR="/usr/$(get_libdir)/pkgconfig"
71
72 # The chtype/mmask-t settings below are to retain ABI compat
73 # with ncurses-5.4 so dont change em !
74 local conf_abi="
75 --with-chtype=long \
76 --with-mmask-t=long \
77 --disable-ext-colors \
78 --disable-ext-mouse \
79 --without-pthread \
80 --without-reentrant \
81 "
82 # We need the basic terminfo files in /etc, bug #37026. We will
83 # add '--with-terminfo-dirs' and then populate /etc/terminfo in
84 # src_install() ...
85 # $(use_with berkdb hashed-db)
86 econf \
87 --with-terminfo-dirs="/etc/terminfo:/usr/share/terminfo" \
88 --with-shared \
89 --without-hashed-db \
90 $(use_with ada) \
91 $(use_with cxx) \
92 $(use_with cxx cxx-binding) \
93 $(use_with debug) \
94 $(use_with profile) \
95 $(use_with gpm) \
96 --disable-termcap \
97 --enable-symlinks \
98 --with-rcs-ids \
99 --with-manpage-format=normal \
100 --enable-const \
101 --enable-colorfgbg \
102 --enable-echo \
103 --enable-pc-files \
104 $(use_enable !ada warnings) \
105 $(use_with debug assertions) \
106 $(use_enable debug leaks) \
107 $(use_with debug expanded) \
108 $(use_with !debug macros) \
109 $(use_with trace) \
110 $(use_with tinfo termlib) \
111 ${conf_abi} \
112 "$@"
113
114 # A little hack to fix parallel builds ... they break when
115 # generating sources so if we generate the sources first (in
116 # non-parallel), we can then build the rest of the package
117 # in parallel. This is not really a perf hit since the source
118 # generation is quite small.
119 emake -j1 sources || die
120 # For some reason, sources depends on pc-files which depends on
121 # compiled libraries which depends on sources which ...
122 # Manually delete the pc-files file so the install step will
123 # create the .pc files we want.
124 rm -f misc/pc-files
125 emake ${make_flags} || die
126 }
127
128 src_install() {
129 # use the cross-compiled tic (if need be) #249363
130 export PATH=${WORKDIR}/cross/progs:${PATH}
131
132 # install unicode version second so that the binaries in /usr/bin
133 # support both wide and narrow
134 cd "${WORKDIR}"/narrowc
135 emake DESTDIR="${D}" install || die
136 if use unicode ; then
137 cd "${WORKDIR}"/widec
138 emake DESTDIR="${D}" install || die
139 fi
140
141 # Move libncurses{,w} into /lib
142 gen_usr_ldscript -a \
143 ncurses \
144 $(usex unicode 'ncursesw' '') \
145 $(use tinfo && usex unicode 'tinfow' '') \
146 $(usev tinfo)
147 ln -sf libncurses.so "${D}"/usr/$(get_libdir)/libcurses.so || die
148 use static-libs || find "${D}"/usr/ -name '*.a' -a '!' -name '*curses++*.a' -delete
149
150 # if ! use berkdb ; then
151 # We need the basic terminfo files in /etc, bug #37026
152 einfo "Installing basic terminfo files in /etc..."
153 for x in ansi console dumb linux rxvt rxvt-unicode screen sun vt{52,100,102,200,220} \
154 xterm xterm-color xterm-xfree86
155 do
156 local termfile=$(find "${D}"/usr/share/terminfo/ -name "${x}" 2>/dev/null)
157 local basedir=$(basename $(dirname "${termfile}"))
158
159 if [[ -n ${termfile} ]] ; then
160 dodir /etc/terminfo/${basedir}
161 mv ${termfile} "${D}"/etc/terminfo/${basedir}/
162 dosym ../../../../etc/terminfo/${basedir}/${x} \
163 /usr/share/terminfo/${basedir}/${x}
164 fi
165 done
166
167 # Build fails to create this ...
168 dosym ../share/terminfo /usr/$(get_libdir)/terminfo
169 # fi
170
171 echo "CONFIG_PROTECT_MASK=\"/etc/terminfo\"" > "${T}"/50ncurses
172 doenvd "${T}"/50ncurses
173
174 use minimal && rm -r "${D}"/usr/share/terminfo*
175 # Because ncurses5-config --terminfo returns the directory we keep it
176 keepdir /usr/share/terminfo #245374
177
178 cd "${S}"
179 dodoc ANNOUNCE MANIFEST NEWS README* TO-DO doc/*.doc
180 use doc && dohtml -r doc/html/
181 }

  ViewVC Help
Powered by ViewVC 1.1.20