/[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.7 - (hide annotations) (download)
Sat Jan 18 02:25:19 2014 UTC (5 months, 3 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-4.0_p38.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 vapier 1.6 # See ftp://ftp.cwru.edu/pub/bash/bash-4.0-patches/
11 vapier 1.1 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     [[ ${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 vapier 1.6 SRC_URI="mirror://gnu/bash/${MY_P}.tar.gz $(patches)"
34 vapier 1.1
35     LICENSE="GPL-3"
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 mem-scramble +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     [[ ${PLEVEL} -gt 0 ]] && epatch $(patches -s)
62 vapier 1.6
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 vapier 1.1
68     epatch "${FILESDIR}"/${PN}-4.0-configure.patch #304901
69     epatch "${FILESDIR}"/${PN}-4.x-deferred-heredocs.patch
70 vapier 1.6 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 vapier 1.1
77 vapier 1.6 epatch_user
78 vapier 1.1 }
79    
80 vapier 1.6 src_configure() {
81     local myconf=()
82 vapier 1.1
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 vapier 1.6 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 vapier 1.1
108     # Force linking with system curses ... the bundled termcap lib
109 vapier 1.6 # 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 vapier 1.1
113 vapier 1.6 tc-export AR #444070
114 vapier 1.1 econf \
115 vapier 1.6 --with-installed-readline=. \
116     --with-curses \
117 vapier 1.1 $(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 vapier 1.6 $(use_enable readline) \
123     $(use_enable readline history) \
124     $(use_enable readline bang-history) \
125     "${myconf[@]}"
126 vapier 1.1 }
127    
128     src_install() {
129 vapier 1.6 into /
130     newbin bash bash-${SLOT}
131 vapier 1.1
132 vapier 1.6 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 vapier 1.1
139     dodoc README NEWS AUTHORS CHANGES COMPAT Y2K doc/FAQ doc/INTRO
140     }

  ViewVC Help
Powered by ViewVC 1.1.20