/[gentoo-x86]/app-shells/bash/bash-3.2_p51.ebuild
Gentoo

Contents of /app-shells/bash/bash-3.2_p51.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.7 - (hide annotations) (download)
Sat Jan 18 02:25:19 2014 UTC (7 months, 2 weeks ago) by vapier
Branch: MAIN
CVS Tags: HEAD
Changes since 1.6: +3 -3 lines
Add arm64 love.

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

1 vapier 1.7 # Copyright 1999-2014 Gentoo Foundation
2 vapier 1.1 # Distributed under the terms of the GNU General Public License v2
3 vapier 1.7 # $Header: /var/cvsroot/gentoo-x86/app-shells/bash/bash-3.2_p51.ebuild,v 1.6 2013/12/22 13:42:06 vapier Exp $
4 vapier 1.1
5 vapier 1.6 EAPI="4"
6 vapier 1.1
7 vapier 1.6 inherit eutils flag-o-matic toolchain-funcs
8 vapier 1.1
9     # Official patchlevel
10     # See ftp://ftp.cwru.edu/pub/bash/bash-3.2-patches/
11     PLEVEL=${PV##*_p}
12     MY_PV=${PV/_p*}
13 vapier 1.6 MY_PV=${MY_PV/_/-}
14 vapier 1.1 MY_P=${PN}-${MY_PV}
15 vapier 1.6 [[ ${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 vapier 1.1
31     DESCRIPTION="The standard GNU Bourne again shell"
32     HOMEPAGE="http://tiswww.case.edu/php/chet/bash/bashtop.html"
33 vapier 1.6 SRC_URI="mirror://gnu/bash/${MY_P}.tar.gz $(patches)"
34 vapier 1.1
35     LICENSE="GPL-2"
36 vapier 1.6 SLOT="${MY_PV}"
37 vapier 1.7 KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~sparc-fbsd ~x86-fbsd"
38 vapier 1.6 IUSE="afs +net nls +readline"
39 vapier 1.1
40     DEPEND=">=sys-libs/ncurses-5.2-r2
41 vapier 1.6 readline? ( >=sys-libs/readline-6.2 )
42 vapier 1.1 nls? ( virtual/libintl )"
43 vapier 1.6 RDEPEND="${DEPEND}"
44 vapier 1.1
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 vapier 1.6 }
58 vapier 1.1
59 vapier 1.6 src_prepare() {
60 vapier 1.1 # Include official patches
61 vapier 1.6 [[ ${PLEVEL} -gt 0 ]] && epatch $(patches -s)
62 vapier 1.1
63 vapier 1.6 # 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}"/autoconf-mktime-2.59.patch #220040
69     epatch "${FILESDIR}"/${PN}-3.1-gentoo.patch
70     epatch "${FILESDIR}"/${PN}-3.2-loadables.patch
71     epatch "${FILESDIR}"/${PN}-3.2-protos.patch
72     epatch "${FILESDIR}"/${PN}-3.2-session-leader.patch #231775
73     epatch "${FILESDIR}"/${PN}-3.2-parallel-build.patch #189671
74     epatch "${FILESDIR}"/${PN}-3.2-ldflags-for-build.patch #211947
75     epatch "${FILESDIR}"/${PN}-3.2-process-subst.patch
76     epatch "${FILESDIR}"/${PN}-3.2-ulimit.patch
77     epatch "${FILESDIR}"/${PN}-3.0-trap-fg-signals.patch
78     epatch "${FILESDIR}"/${PN}-3.2-dev-fd-test-as-user.patch #131875
79    
80     epatch_user
81     }
82    
83     src_configure() {
84     local myconf=()
85    
86     # Force pgrp synchronization
87     # https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=81653
88     export bash_cv_pgrp_pipe=yes
89    
90     # For descriptions of these, see config-top.h
91     # bashrc/#26952 bash_logout/#90488 ssh/#24762
92     append-cppflags \
93     -DDEFAULT_PATH_VALUE=\'\"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\"\' \
94     -DSTANDARD_UTILS_PATH=\'\"/bin:/usr/bin:/sbin:/usr/sbin\"\' \
95     -DSYS_BASHRC=\'\"/etc/bash/bashrc\"\' \
96     -DSYS_BASH_LOGOUT=\'\"/etc/bash/bash_logout\"\' \
97     -DNON_INTERACTIVE_LOGIN_SHELLS \
98     -DSSH_SOURCE_BASHRC
99 vapier 1.1
100     # Don't even think about building this statically without
101     # reading Bug 7714 first. If you still build it statically,
102 vapier 1.6 # don't come crying to us with bugs ;).
103 vapier 1.1 #use static && export LDFLAGS="${LDFLAGS} -static"
104 vapier 1.6 use nls || myconf+=( --disable-nls )
105    
106     # Historically, we always used the builtin readline, but since
107     # our handling of SONAME upgrades has gotten much more stable
108     # in the PM (and the readline ebuild itself preserves the old
109     # libs during upgrades), linking against the system copy should
110     # be safe.
111     # Exact cached version here doesn't really matter as long as it
112     # is at least what's in the DEPEND up above.
113     export ac_cv_rl_version=6.2
114 vapier 1.1
115     # Force linking with system curses ... the bundled termcap lib
116 vapier 1.6 # sucks bad compared to ncurses. For the most part, ncurses
117     # is here because readline needs it. But bash itself calls
118     # ncurses in one or two small places :(.
119 vapier 1.1
120 vapier 1.6 tc-export AR #444070
121 vapier 1.1 econf \
122 vapier 1.6 --with-installed-readline=. \
123     --with-curses \
124 vapier 1.1 $(use_with afs) \
125     $(use_enable net net-redirections) \
126     --disable-profiling \
127     --without-gnu-malloc \
128 vapier 1.6 $(use_enable readline) \
129     $(use_enable readline history) \
130     $(use_enable readline bang-history) \
131     "${myconf[@]}"
132 vapier 1.1 }
133    
134     src_install() {
135 vapier 1.6 into /
136     newbin bash bash-${SLOT}
137 vapier 1.1
138 vapier 1.6 newman doc/bash.1 bash-${SLOT}.1
139     newman doc/builtins.1 builtins-${SLOT}.1
140    
141     insinto /usr/share/info
142     newins doc/bashref.info bash-${SLOT}.info
143     dosym bash-${SLOT}.info /usr/share/info/bashref-${SLOT}.info
144 vapier 1.1
145     dodoc README NEWS AUTHORS CHANGES COMPAT Y2K doc/FAQ doc/INTRO
146     }

  ViewVC Help
Powered by ViewVC 1.1.20