Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 519052
Collapse All | Expand All

(-)/usr/portage/sys-libs/ncurses/ncurses-5.9-r3.ebuild (-9 / +72 lines)
Lines 3-9 Link Here
3
# $Header: /var/cvsroot/gentoo-x86/sys-libs/ncurses/ncurses-5.9-r3.ebuild,v 1.16 2014/07/13 19:30:57 zlogene Exp $
3
# $Header: /var/cvsroot/gentoo-x86/sys-libs/ncurses/ncurses-5.9-r3.ebuild,v 1.16 2014/07/13 19:30:57 zlogene Exp $
4
4
5
EAPI="4"
5
EAPI="4"
6
inherit eutils flag-o-matic toolchain-funcs multilib-minimal
6
inherit eutils flag-o-matic toolchain-funcs multilib-minimal libtool
7
7
8
MY_PV=${PV:0:3}
8
MY_PV=${PV:0:3}
9
PV_SNAP=${PV:4}
9
PV_SNAP=${PV:4}
Lines 12-20 Link Here
12
HOMEPAGE="http://www.gnu.org/software/ncurses/ http://dickey.his.com/ncurses/"
12
HOMEPAGE="http://www.gnu.org/software/ncurses/ http://dickey.his.com/ncurses/"
13
SRC_URI="mirror://gnu/ncurses/${MY_P}.tar.gz"
13
SRC_URI="mirror://gnu/ncurses/${MY_P}.tar.gz"
14
14
15
HOSTLTV="0.1.0"
16
HOSTLT="host-libtool-${HOSTLTV}"
17
HOSTLT_URI="http://github.com/haubi/host-libtool/releases/download/v${HOSTLTV}/${HOSTLT}.tar.gz"
18
SRC_URI="${SRC_URI}
19
	kernel_AIX? ( ${HOSTLT_URI} )
20
	kernel_HPUX? ( ${HOSTLT_URI} )
21
"
22
15
LICENSE="MIT"
23
LICENSE="MIT"
16
SLOT="5"
24
SLOT="5"
17
KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~m68k ~mips ppc ppc64 s390 ~sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
25
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"
26
IUSE="ada +cxx debug doc gpm minimal profile static-libs tinfo trace unicode"
19
27
20
DEPEND="gpm? ( sys-libs/gpm )"
28
DEPEND="gpm? ( sys-libs/gpm )"
Lines 33-38 Link Here
33
S=${WORKDIR}/${MY_P}
41
S=${WORKDIR}/${MY_P}
34
HOSTTIC_DIR=${WORKDIR}/${P}-host
42
HOSTTIC_DIR=${WORKDIR}/${P}-host
35
43
44
need-libtool() {
45
	# need libtool to build aix-style shared objects inside archive libs, but
46
	# cannot depend on libtool, as this would create circular dependencies...
47
	# And libtool-1.5.26 needs (a similar) patch for AIX (DESTDIR) as found in
48
	# http://lists.gnu.org/archive/html/bug-libtool/2008-03/msg00124.html
49
	# Use libtool on hpux too to get some soname.
50
	[[ ${CHOST} == *'-aix'* || ${CHOST} == *'-hpux'* ]]
51
}
52
36
src_prepare() {
53
src_prepare() {
37
	[[ -n ${PV_SNAP} ]] && epatch "${WORKDIR}"/${MY_P}-${PV_SNAP}-patch.sh
54
	[[ -n ${PV_SNAP} ]] && epatch "${WORKDIR}"/${MY_P}-${PV_SNAP}-patch.sh
38
	epatch "${FILESDIR}"/${PN}-5.8-gfbsd.patch
55
	epatch "${FILESDIR}"/${PN}-5.8-gfbsd.patch
Lines 40-48 Link Here
40
	epatch "${FILESDIR}"/${PN}-5.9-rxvt-unicode-9.15.patch #192083 #383871
57
	epatch "${FILESDIR}"/${PN}-5.9-rxvt-unicode-9.15.patch #192083 #383871
41
	epatch "${FILESDIR}"/${PN}-5.9-fix-clang-build.patch #417763
58
	epatch "${FILESDIR}"/${PN}-5.9-fix-clang-build.patch #417763
42
	epatch "${FILESDIR}"/${PN}-5.9-pkg-config.patch
59
	epatch "${FILESDIR}"/${PN}-5.9-pkg-config.patch
60
61
	# /bin/sh is not always good enough
62
	find . -name "*.sh" | xargs sed -i -e '1c\#!/usr/bin/env sh'
63
64
	if need-libtool; then
65
		S="${WORKDIR}"/${HOSTLT} elibtoolize
66
67
		# Don't need local libraries (-L../lib) for libncurses,
68
		# ends up as insecure runpath in libncurses.so[shr.o] on AIX
69
		sed -i -e '/^SHLIB_LIST[ \t]*=/s/\$(SHLIB_DIRS)//' ncurses/Makefile.in || die
70
	fi
71
72
	# Don't mess with _XOPEN_SOURCE for C++ on (Open)Solaris.  The compiler
73
	# defines a value for it, and depending on version, a different definition
74
	# is used.  Defining this variable on these systems is dangerous any time,
75
	# since the system headers do strict checks on compatability of flags and
76
	# standards.
77
	# Defining _XOPEN_SOURCE_EXTENDED together with _XOPEN_SOURCE leads to
78
	# pre-_XOPEN_SOURCE=500 stuff, so only do it for non-C++ code.
79
	# See also bug #431352
80
	if [[ ${CHOST} == *-solaris* ]] ; then
81
		sed -i \
82
			-e '/-D__EXTENSIONS__/ s/-D_XOPEN_SOURCE=\$cf_XOPEN_SOURCE//' \
83
			-e '/CPPFLAGS="$CPPFLAGS/s/ -D_XOPEN_SOURCE_EXTENDED//' \
84
			configure || die
85
		# ONLY in C-mode, NOT C++
86
		append-cflags -D_XOPEN_SOURCE_EXTENDED
87
	fi
43
}
88
}
44
89
45
src_configure() {
90
src_configure() {
91
	if need-libtool; then
92
		cd "${WORKDIR}"/${HOSTLT} || die
93
		econf
94
		export PATH="${WORKDIR}"/${HOSTLT}:${PATH}
95
		cd "${S}" || die
96
	fi
97
46
	unset TERMINFO #115036
98
	unset TERMINFO #115036
47
	tc-export_build_env BUILD_{CC,CPP}
99
	tc-export_build_env BUILD_{CC,CPP}
48
	BUILD_CPPFLAGS+=" -D_GNU_SOURCE" #214642
100
	BUILD_CPPFLAGS+=" -D_GNU_SOURCE" #214642
Lines 63-69 Link Here
63
115
64
multilib_src_configure() {
116
multilib_src_configure() {
65
	do_configure narrowc
117
	do_configure narrowc
66
	use unicode && do_configure widec --enable-widec --includedir=/usr/include/ncursesw
118
	use unicode && do_configure widec --enable-widec --includedir="${EPREFIX}"/usr/include/ncursesw
67
}
119
}
68
120
69
do_configure() {
121
do_configure() {
Lines 77-83 Link Here
77
		# We need the basic terminfo files in /etc, bug #37026.  We will
129
		# We need the basic terminfo files in /etc, bug #37026.  We will
78
		# add '--with-terminfo-dirs' and then populate /etc/terminfo in
130
		# add '--with-terminfo-dirs' and then populate /etc/terminfo in
79
		# src_install() ...
131
		# src_install() ...
80
		--with-terminfo-dirs="/etc/terminfo:/usr/share/terminfo"
132
		--with-terminfo-dirs="${EPREFIX}/etc/terminfo:${EPREFIX}/usr/share/terminfo"
81
133
82
		# Disabled until #245417 is sorted out.
134
		# Disabled until #245417 is sorted out.
83
		#$(use_with berkdb hashed-db)
135
		#$(use_with berkdb hashed-db)
Lines 88-97 Link Here
88
		--enable-pc-files
140
		--enable-pc-files
89
		--with-pkg-config="$(tc-getPKG_CONFIG)"
141
		--with-pkg-config="$(tc-getPKG_CONFIG)"
90
		# This path is used to control where the .pc files are installed.
142
		# This path is used to control where the .pc files are installed.
91
		PKG_CONFIG_LIBDIR="/usr/$(get_libdir)/pkgconfig"
143
		PKG_CONFIG_LIBDIR="${EPREFIX}/usr/$(get_libdir)/pkgconfig"
92
144
93
		# Now the rest of the various standard flags.
145
		# Now the rest of the various standard flags.
94
		--with-shared
146
		--$(
147
			if need-libtool ; then
148
				echo with-libtool
149
			elif [[ ${CHOST} == *-mint* ]] ; then
150
				echo without-shared
151
			else
152
				echo with-shared
153
			fi
154
		)
155
		--enable-overwrite
95
		--without-hashed-db
156
		--without-hashed-db
96
		$(use_with ada)
157
		$(use_with ada)
97
		$(use_with cxx)
158
		$(use_with cxx)
Lines 183-189 Link Here
183
		$(usex unicode 'ncursesw' '') \
244
		$(usex unicode 'ncursesw' '') \
184
		$(use tinfo && usex unicode 'tinfow' '') \
245
		$(use tinfo && usex unicode 'tinfow' '') \
185
		$(usev tinfo)
246
		$(usev tinfo)
186
	ln -sf libncurses.so "${D}"/usr/$(get_libdir)/libcurses.so || die
247
	if ! tc-is-static-only ; then
248
		ln -sf libncurses$(get_libname) "${ED}"/usr/$(get_libdir)/libcurses$(get_libname) || die
249
	fi
187
	use static-libs || find "${D}"/usr/ -name '*.a' -a '!' -name '*curses++*.a' -delete
250
	use static-libs || find "${D}"/usr/ -name '*.a' -a '!' -name '*curses++*.a' -delete
188
251
189
	# Build fails to create this ...
252
	# Build fails to create this ...
Lines 197-208 Link Here
197
		for x in ansi console dumb linux rxvt rxvt-unicode screen sun vt{52,100,102,200,220} \
260
		for x in ansi console dumb linux rxvt rxvt-unicode screen sun vt{52,100,102,200,220} \
198
				 xterm xterm-color xterm-xfree86
261
				 xterm xterm-color xterm-xfree86
199
		do
262
		do
200
			local termfile=$(find "${D}"/usr/share/terminfo/ -name "${x}" 2>/dev/null)
263
			local termfile=$(find "${ED}"/usr/share/terminfo/ -name "${x}" 2>/dev/null)
201
			local basedir=$(basename $(dirname "${termfile}"))
264
			local basedir=$(basename $(dirname "${termfile}"))
202
265
203
			if [[ -n ${termfile} ]] ; then
266
			if [[ -n ${termfile} ]] ; then
204
				dodir /etc/terminfo/${basedir}
267
				dodir /etc/terminfo/${basedir}
205
				mv ${termfile} "${D}"/etc/terminfo/${basedir}/
268
				mv ${termfile} "${ED}"/etc/terminfo/${basedir}/
206
				dosym ../../../../etc/terminfo/${basedir}/${x} \
269
				dosym ../../../../etc/terminfo/${basedir}/${x} \
207
					/usr/share/terminfo/${basedir}/${x}
270
					/usr/share/terminfo/${basedir}/${x}
208
			fi
271
			fi
Lines 212-218 Link Here
212
	echo "CONFIG_PROTECT_MASK=\"/etc/terminfo\"" > "${T}"/50ncurses
275
	echo "CONFIG_PROTECT_MASK=\"/etc/terminfo\"" > "${T}"/50ncurses
213
	doenvd "${T}"/50ncurses
276
	doenvd "${T}"/50ncurses
214
277
215
	use minimal && rm -r "${D}"/usr/share/terminfo*
278
	use minimal && rm -r "${ED}"/usr/share/terminfo*
216
	# Because ncurses5-config --terminfo returns the directory we keep it
279
	# Because ncurses5-config --terminfo returns the directory we keep it
217
	keepdir /usr/share/terminfo #245374
280
	keepdir /usr/share/terminfo #245374
218
281

Return to bug 519052