/[gentoo-x86]/sys-apps/util-linux/util-linux-2.20.1.ebuild
Gentoo

Contents of /sys-apps/util-linux/util-linux-2.20.1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Fri May 25 16:14:22 2012 UTC (2 years, 2 months ago) by vapier
Branch: MAIN
Changes since 1.3: +2 -2 lines
Inherit multilib for get_libdir.

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/sys-apps/util-linux/util-linux-2.20.1.ebuild,v 1.3 2012/05/24 02:52:39 vapier Exp $
4
5 EAPI="3"
6
7 EGIT_REPO_URI="git://git.kernel.org/pub/scm/utils/util-linux/util-linux.git"
8 inherit eutils toolchain-funcs libtool flag-o-matic multilib
9 if [[ ${PV} == "9999" ]] ; then
10 inherit git-2 autotools
11 #KEYWORDS=""
12 else
13 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-linux"
14 fi
15
16 MY_PV=${PV/_/-}
17 MY_P=${PN}-${MY_PV}
18 S=${WORKDIR}/${MY_P}
19
20 DESCRIPTION="Various useful Linux utilities"
21 HOMEPAGE="http://www.kernel.org/pub/linux/utils/util-linux/"
22 if [[ ${PV} == "9999" ]] ; then
23 SRC_URI=""
24 else
25 SRC_URI="mirror://kernel/linux/utils/util-linux/v${PV:0:4}/${MY_P}.tar.bz2
26 loop-aes? ( http://loop-aes.sourceforge.net/updates/util-linux-2.20-20110905.diff.bz2 )"
27 fi
28
29 LICENSE="GPL-2 GPL-3 LGPL-2.1 BSD-4 MIT public-domain"
30 SLOT="0"
31 IUSE="+cramfs crypt ddate loop-aes ncurses nls old-linux perl selinux slang static-libs uclibc unicode"
32
33 RDEPEND="!sys-process/schedutils
34 !sys-apps/setarch
35 !<sys-apps/sysvinit-2.88-r3
36 !<sys-libs/e2fsprogs-libs-1.41.8
37 !<sys-fs/e2fsprogs-1.41.8
38 cramfs? ( sys-libs/zlib )
39 ncurses? ( >=sys-libs/ncurses-5.2-r2 )
40 perl? ( dev-lang/perl )
41 selinux? ( sys-libs/libselinux )
42 slang? ( sys-libs/slang )"
43 DEPEND="${RDEPEND}
44 nls? ( sys-devel/gettext )
45 virtual/os-headers"
46
47 src_prepare() {
48 if [[ ${PV} == "9999" ]] ; then
49 po/update-potfiles
50 autopoint --force
51 eautoreconf
52 else
53 use loop-aes && epatch "${WORKDIR}"/util-linux-*.diff
54 fi
55 use uclibc && sed -i -e s/versionsort/alphasort/g -e s/strverscmp.h/dirent.h/g mount/lomount.c
56 elibtoolize
57 }
58
59 lfs_fallocate_test() {
60 # Make sure we can use fallocate with LFS #300307
61 cat <<-EOF > "${T}"/fallocate.c
62 #define _GNU_SOURCE
63 #include <fcntl.h>
64 main() { return fallocate(0, 0, 0, 0); }
65 EOF
66 append-lfs-flags
67 $(tc-getCC) ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} "${T}"/fallocate.c -o /dev/null >/dev/null 2>&1 \
68 || export ac_cv_func_fallocate=no
69 rm -f "${T}"/fallocate.c
70 }
71
72 usex() { use $1 && echo ${2:-yes} || echo ${3:-no} ; }
73 src_configure() {
74 lfs_fallocate_test
75 econf \
76 --enable-fs-paths-extra=/usr/sbin \
77 $(use_enable nls) \
78 --enable-agetty \
79 $(use_enable cramfs) \
80 $(use_enable ddate) \
81 $(use_enable old-linux elvtune) \
82 --with-ncurses=$(usex ncurses $(usex unicode auto yes) no) \
83 --disable-kill \
84 --disable-last \
85 --disable-mesg \
86 --enable-partx \
87 --enable-raw \
88 --enable-rename \
89 --disable-reset \
90 --disable-login-utils \
91 --enable-schedutils \
92 --disable-wall \
93 --enable-write \
94 --without-pam \
95 $(use_with selinux) \
96 $(use_with slang) \
97 $(use_enable static-libs static) \
98 $(tc-has-tls || echo --disable-tls)
99 }
100
101 src_install() {
102 emake install DESTDIR="${D}" || die "install failed"
103 dodoc AUTHORS NEWS README* TODO docs/*
104 use ddate || find "${ED}"/usr/share/man -name 'ddate.1*' -delete
105
106 if ! use perl ; then #284093
107 rm "${ED}"/usr/bin/chkdupexe || die
108 rm "${ED}"/usr/share/man/man1/chkdupexe.1 || die
109 fi
110
111 # need the libs in /
112 gen_usr_ldscript -a blkid uuid
113 # e2fsprogs-libs didnt install .la files, and .pc work fine
114 rm -f "${ED}"/usr/$(get_libdir)/*.la
115
116 if use crypt ; then
117 newinitd "${FILESDIR}"/crypto-loop.initd crypto-loop || die
118 newconfd "${FILESDIR}"/crypto-loop.confd crypto-loop || die
119 fi
120 }
121
122 pkg_postinst() {
123 elog "The agetty util now clears the terminal by default. You"
124 elog "might want to add --noclear to your /etc/inittab lines."
125 }

  ViewVC Help
Powered by ViewVC 1.1.20