/[gentoo-x86]/sys-apps/coreutils/coreutils-8.19.ebuild
Gentoo

Contents of /sys-apps/coreutils/coreutils-8.19.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Sat Jan 4 18:38:41 2014 UTC (11 months, 1 week ago) by polynomial-c
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
Removed old versions and files

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

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/coreutils/coreutils-8.19.ebuild,v 1.1 2012/08/20 17:57:39 vapier Exp $
4
5 EAPI="3"
6
7 inherit eutils flag-o-matic toolchain-funcs
8
9 PATCH_VER="1.1"
10 DESCRIPTION="Standard GNU file utilities (chmod, cp, dd, dir, ls...), text utilities (sort, tr, head, wc..), and shell utilities (whoami, who,...)"
11 HOMEPAGE="http://www.gnu.org/software/coreutils/"
12 SRC_URI="mirror://gnu-alpha/coreutils/${P}.tar.xz
13 mirror://gnu/${PN}/${P}.tar.xz
14 mirror://gentoo/${P}.tar.xz
15 mirror://gentoo/${P}-patches-${PATCH_VER}.tar.xz
16 http://dev.gentoo.org/~ryao/dist/${P}-patches-${PATCH_VER}.tar.xz"
17
18 LICENSE="GPL-3"
19 SLOT="0"
20 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd"
21 IUSE="acl caps gmp nls selinux static userland_BSD vanilla xattr"
22
23 LIB_DEPEND="acl? ( sys-apps/acl[static-libs] )
24 caps? ( sys-libs/libcap )
25 gmp? ( dev-libs/gmp[static-libs] )
26 xattr? ( !userland_BSD? ( sys-apps/attr[static-libs] ) )"
27 RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs]} )
28 selinux? ( sys-libs/libselinux )
29 nls? ( >=sys-devel/gettext-0.15 )
30 !app-misc/realpath
31 !<sys-apps/util-linux-2.13
32 !sys-apps/stat
33 !net-mail/base64
34 !sys-apps/mktemp
35 !<app-forensics/tct-1.18-r1
36 !<net-fs/netatalk-2.0.3-r4
37 !<sci-chemistry/ccp4-6.1.1"
38 DEPEND="${RDEPEND}
39 static? ( ${LIB_DEPEND} )
40 app-arch/xz-utils"
41
42 src_prepare() {
43 if ! use vanilla ; then
44 use_if_iuse unicode || rm -f "${WORKDIR}"/patch/000_all_coreutils-i18n.patch
45 EPATCH_SUFFIX="patch" \
46 PATCHDIR="${WORKDIR}/patch" \
47 EPATCH_EXCLUDE="001_all_coreutils-gen-progress-bar.patch" \
48 epatch
49 fi
50
51 # Since we've patched many .c files, the make process will try to
52 # re-build the manpages by running `./bin --help`. When doing a
53 # cross-compile, we can't do that since 'bin' isn't a native bin.
54 # Also, it's not like we changed the usage on any of these things,
55 # so let's just update the timestamps and skip the help2man step.
56 set -- man/*.x
57 tc-is-cross-compiler && touch ${@/%x/1}
58
59 # Avoid perl dep for compiled in dircolors default #348642
60 if ! has_version dev-lang/perl ; then
61 touch src/dircolors.h
62 touch ${@/%x/1}
63 fi
64 }
65
66 src_configure() {
67 local myconf=''
68 if tc-is-cross-compiler && [[ ${CHOST} == *linux* ]] ; then
69 export fu_cv_sys_stat_statfs2_bsize=yes #311569
70 export gl_cv_func_realpath_works=yes #416629
71 fi
72
73 export gl_cv_func_mknod_works=yes #409919
74 use static && append-ldflags -static && sed -i '/elf_sys=yes/s:yes:no:' configure #321821
75 use selinux || export ac_cv_{header_selinux_{context,flash,selinux}_h,search_setfilecon}=no #301782
76 use userland_BSD && myconf="${myconf} -program-prefix=g --program-transform-name=s/stat/nustat/"
77 # kill/uptime - procps
78 # groups/su - shadow
79 # hostname - net-tools
80 econf \
81 --with-packager="Gentoo" \
82 --with-packager-version="${PVR} (p${PATCH_VER:-0})" \
83 --with-packager-bug-reports="http://bugs.gentoo.org/" \
84 --enable-install-program="arch" \
85 --enable-no-install-program="groups,hostname,kill,su,uptime" \
86 --enable-largefile \
87 $(use caps || echo --disable-libcap) \
88 $(use_enable nls) \
89 $(use_enable acl) \
90 $(use_enable xattr) \
91 $(use_with gmp) \
92 ${myconf}
93 }
94
95 src_test() {
96 # Non-root tests will fail if the full path isnt
97 # accessible to non-root users
98 chmod -R go-w "${WORKDIR}"
99 chmod a+rx "${WORKDIR}"
100
101 # coreutils tests like to do `mount` and such with temp dirs
102 # so make sure /etc/mtab is writable #265725
103 # make sure /dev/loop* can be mounted #269758
104 mkdir -p "${T}"/mount-wrappers
105 mkwrap() {
106 local w ww
107 for w in "$@" ; do
108 ww="${T}/mount-wrappers/${w}"
109 cat <<-EOF > "${ww}"
110 #!/bin/sh
111 exec env SANDBOX_WRITE="\${SANDBOX_WRITE}:/etc/mtab:/dev/loop" $(type -P $w) "\$@"
112 EOF
113 chmod a+rx "${ww}"
114 done
115 }
116 mkwrap mount umount
117
118 addwrite /dev/full
119 #export RUN_EXPENSIVE_TESTS="yes"
120 #export FETISH_GROUPS="portage wheel"
121 env PATH="${T}/mount-wrappers:${PATH}" \
122 emake -j1 -k check || die "make check failed"
123 }
124
125 src_install() {
126 emake install DESTDIR="${D}" || die
127 dodoc AUTHORS ChangeLog* NEWS README* THANKS TODO
128
129 insinto /etc
130 newins src/dircolors.hin DIR_COLORS || die
131
132 if [[ ${USERLAND} == "GNU" ]] ; then
133 cd "${D}"/usr/bin
134 dodir /bin
135 # move critical binaries into /bin (required by FHS)
136 local fhs="cat chgrp chmod chown cp date dd df echo false ln ls
137 mkdir mknod mv pwd rm rmdir stty sync true uname"
138 mv ${fhs} ../../bin/ || die "could not move fhs bins"
139 # move critical binaries into /bin (common scripts)
140 local com="basename chroot cut dir dirname du env expr head mkfifo
141 mktemp readlink seq sleep sort tail touch tr tty vdir wc yes"
142 mv ${com} ../../bin/ || die "could not move common bins"
143 # create a symlink for uname in /usr/bin/ since autotools require it
144 local x
145 for x in ${com} uname ; do
146 dosym /bin/${x} /usr/bin/${x} || die
147 done
148 else
149 # For now, drop the man pages, collides with the ones of the system.
150 rm -rf "${D}"/usr/share/man
151 fi
152 }
153
154 pkg_postinst() {
155 ewarn "Make sure you run 'hash -r' in your active shells."
156 ewarn "You should also re-source your shell settings for LS_COLORS"
157 ewarn " changes, such as: source /etc/profile"
158
159 # /bin/dircolors sometimes sticks around #224823
160 if [ -e "${ROOT}/usr/bin/dircolors" ] && [ -e "${ROOT}/bin/dircolors" ] ; then
161 if strings "${ROOT}/bin/dircolors" | grep -qs "GNU coreutils" ; then
162 einfo "Deleting orphaned GNU /bin/dircolors for you"
163 rm -f "${ROOT}/bin/dircolors"
164 fi
165 fi
166
167 # Help out users using experimental filesystems
168 if grep -qs btrfs "${ROOT}"/etc/fstab /proc/mounts ; then
169 case $(uname -r) in
170 2.6.[12][0-9]|2.6.3[0-7]*)
171 ewarn "You are running a system with a buggy btrfs driver."
172 ewarn "Please upgrade your kernel to avoid silent corruption."
173 ewarn "See: https://bugs.gentoo.org/353907"
174 ;;
175 esac
176 fi
177 }

  ViewVC Help
Powered by ViewVC 1.1.20