Use https by default
[gentoo.git] / dev-libs / dietlibc / dietlibc-0.30-r2.ebuild
1 # Copyright 1999-2014 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 inherit eutils flag-o-matic
6
7 DESCRIPTION="A minimal libc"
8 HOMEPAGE="http://www.fefe.de/dietlibc/"
9 SRC_URI="mirror://gentoo/${P}.tar.bz2
10         https://dev.gentoo.org/~phreak/distfiles/${PN}-patches-${PVR}.tar.bz2
11         https://dev.gentoo.org/~hollow/distfiles/${PN}-patches-${PVR}.tar.bz2"
12
13 LICENSE="GPL-2"
14 SLOT="0"
15 KEYWORDS="alpha amd64 arm ~mips sparc x86"
16 IUSE="debug"
17
18 DEPEND=""
19
20 pkg_setup() {
21         # Replace sparc64 related C[XX]FLAGS (see bug #45716)
22         use sparc && replace-sparc64-flags
23
24         # gcc-hppa suffers support for SSP, compilation will fail
25         # (do we still need this? SSP is disabled, see below)
26         use hppa && strip-unsupported-flags
27
28         # we use dietlibs STACKGAP in favor of the broken SSP implementation
29         filter-flags -fstack-protector -fstack-protector-all
30
31         # debug flags
32         use debug && append-flags -g
33 }
34
35 src_unpack() {
36         unpack ${A}
37         cd "${S}"
38         epatch "${WORKDIR}"/patches/*.patch
39 }
40
41 src_compile() {
42         # parallel make is b0rked
43         emake -j1 CFLAGS="${CFLAGS}" || die "make failed"
44 }
45
46 src_install() {
47         emake DESTDIR="${D}" install || die "make install failed"
48         dobin "${D}"/usr/diet/bin/* || die "dobin failed"
49         doman "${D}"/usr/diet/man/*/* || die "doman failed"
50         rm -r "${D}"/usr/diet/{man,bin}
51         dodoc AUTHOR BUGS CAVEAT CHANGES README THANKS TODO PORTING
52 }