/[gentoo-x86]/app-shells/bash/bash-4.0_p38.ebuild
Gentoo

Contents of /app-shells/bash/bash-4.0_p38.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.6 - (show annotations) (download)
Sun Dec 22 13:42:06 2013 UTC (10 months ago) by vapier
Branch: MAIN
Changes since 1.5: +56 -97 lines
Move older versions into SLOTs for easier testing #479574 by Michał Górny.

(Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key FB7C4156)

1 # Copyright 1999-2013 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/app-shells/bash/bash-4.0_p38.ebuild,v 1.5 2012/11/19 22:26:11 vapier Exp $
4
5 EAPI="4"
6
7 inherit eutils flag-o-matic toolchain-funcs
8
9 # Official patchlevel
10 # See ftp://ftp.cwru.edu/pub/bash/bash-4.0-patches/
11 PLEVEL=${PV##*_p}
12 MY_PV=${PV/_p*}
13 MY_PV=${MY_PV/_/-}
14 MY_P=${PN}-${MY_PV}
15 [[ ${PV} != *_p* ]] && PLEVEL=0
16 patches() {
17 local opt=$1 plevel=${2:-${PLEVEL}} pn=${3:-${PN}} pv=${4:-${MY_PV}}
18 [[ ${plevel} -eq 0 ]] && return 1
19 eval set -- {1..${plevel}}
20 set -- $(printf "${pn}${pv/\.}-%03d " "$@")
21 if [[ ${opt} == -s ]] ; then
22 echo "${@/#/${DISTDIR}/}"
23 else
24 local u
25 for u in ftp://ftp.cwru.edu/pub/bash mirror://gnu/${pn} ; do
26 printf "${u}/${pn}-${pv}-patches/%s " "$@"
27 done
28 fi
29 }
30
31 DESCRIPTION="The standard GNU Bourne again shell"
32 HOMEPAGE="http://tiswww.case.edu/php/chet/bash/bashtop.html"
33 SRC_URI="mirror://gnu/bash/${MY_P}.tar.gz $(patches)"
34
35 LICENSE="GPL-3"
36 SLOT="${MY_PV}"
37 KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~sparc-fbsd ~x86-fbsd"
38 IUSE="afs mem-scramble +net nls +readline"
39
40 DEPEND=">=sys-libs/ncurses-5.2-r2
41 readline? ( >=sys-libs/readline-6.2 )
42 nls? ( virtual/libintl )"
43 RDEPEND="${DEPEND}"
44
45 S=${WORKDIR}/${MY_P}
46
47 pkg_setup() {
48 if is-flag -malign-double ; then #7332
49 eerror "Detected bad CFLAGS '-malign-double'. Do not use this"
50 eerror "as it breaks LFS (struct stat64) on x86."
51 die "remove -malign-double from your CFLAGS mr ricer"
52 fi
53 }
54
55 src_unpack() {
56 unpack ${MY_P}.tar.gz
57 }
58
59 src_prepare() {
60 # Include official patches
61 [[ ${PLEVEL} -gt 0 ]] && epatch $(patches -s)
62
63 # Clean out local libs so we know we use system ones
64 rm -rf lib/{readline,termcap}/*
65 touch lib/{readline,termcap}/Makefile.in # for config.status
66 sed -ri -e 's:\$[(](RL|HIST)_LIBSRC[)]/[[:alpha:]]*.h::g' Makefile.in || die
67
68 epatch "${FILESDIR}"/${PN}-4.0-configure.patch #304901
69 epatch "${FILESDIR}"/${PN}-4.x-deferred-heredocs.patch
70 sed -i '1i#define NEED_FPURGE_DECL' execute_cmd.c # needs fpurge() decl
71 epatch "${FILESDIR}"/${PN}-3.2-parallel-build.patch #189671
72 epatch "${FILESDIR}"/${PN}-4.0-ldflags-for-build.patch #211947
73 epatch "${FILESDIR}"/${PN}-4.0-negative-return.patch
74 epatch "${FILESDIR}"/${PN}-4.0-parallel-build.patch #267613
75 sed -i '/\.o: .*shell\.h/s:$: pathnames.h:' Makefile.in #267613
76
77 epatch_user
78 }
79
80 src_configure() {
81 local myconf=()
82
83 # For descriptions of these, see config-top.h
84 # bashrc/#26952 bash_logout/#90488 ssh/#24762
85 append-cppflags \
86 -DDEFAULT_PATH_VALUE=\'\"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\"\' \
87 -DSTANDARD_UTILS_PATH=\'\"/bin:/usr/bin:/sbin:/usr/sbin\"\' \
88 -DSYS_BASHRC=\'\"/etc/bash/bashrc\"\' \
89 -DSYS_BASH_LOGOUT=\'\"/etc/bash/bash_logout\"\' \
90 -DNON_INTERACTIVE_LOGIN_SHELLS \
91 -DSSH_SOURCE_BASHRC
92
93 # Don't even think about building this statically without
94 # reading Bug 7714 first. If you still build it statically,
95 # don't come crying to us with bugs ;).
96 #use static && export LDFLAGS="${LDFLAGS} -static"
97 use nls || myconf+=( --disable-nls )
98
99 # Historically, we always used the builtin readline, but since
100 # our handling of SONAME upgrades has gotten much more stable
101 # in the PM (and the readline ebuild itself preserves the old
102 # libs during upgrades), linking against the system copy should
103 # be safe.
104 # Exact cached version here doesn't really matter as long as it
105 # is at least what's in the DEPEND up above.
106 export ac_cv_rl_version=6.2
107
108 # Force linking with system curses ... the bundled termcap lib
109 # sucks bad compared to ncurses. For the most part, ncurses
110 # is here because readline needs it. But bash itself calls
111 # ncurses in one or two small places :(.
112
113 tc-export AR #444070
114 econf \
115 --with-installed-readline=. \
116 --with-curses \
117 $(use_with afs) \
118 $(use_enable net net-redirections) \
119 --disable-profiling \
120 $(use_enable mem-scramble) \
121 $(use_with mem-scramble bash-malloc) \
122 $(use_enable readline) \
123 $(use_enable readline history) \
124 $(use_enable readline bang-history) \
125 "${myconf[@]}"
126 }
127
128 src_install() {
129 into /
130 newbin bash bash-${SLOT}
131
132 newman doc/bash.1 bash-${SLOT}.1
133 newman doc/builtins.1 builtins-${SLOT}.1
134
135 insinto /usr/share/info
136 newins doc/bashref.info bash-${SLOT}.info
137 dosym bash-${SLOT}.info /usr/share/info/bashref-${SLOT}.info
138
139 dodoc README NEWS AUTHORS CHANGES COMPAT Y2K doc/FAQ doc/INTRO
140 }

  ViewVC Help
Powered by ViewVC 1.1.20