1 |
commit: a5cf550afea6ecddf56e36bd6003a94d0fc69bdd |
2 |
Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Mar 1 13:44:38 2014 +0000 |
4 |
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Mar 1 14:02:33 2014 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/hardened-dev.git;a=commit;h=a5cf550a |
7 |
|
8 |
sys-apps/findutils: bump 4.5.12 for mips |
9 |
|
10 |
--- |
11 |
.../files/findutils-4.5.12-gnulib-musl.patch | 132 +++++++++++++++++++++ |
12 |
sys-apps/findutils/findutils-4.5.12-r99.ebuild | 51 ++++++++ |
13 |
2 files changed, 183 insertions(+) |
14 |
|
15 |
diff --git a/sys-apps/findutils/files/findutils-4.5.12-gnulib-musl.patch b/sys-apps/findutils/files/findutils-4.5.12-gnulib-musl.patch |
16 |
new file mode 100644 |
17 |
index 0000000..b553801 |
18 |
--- /dev/null |
19 |
+++ b/sys-apps/findutils/files/findutils-4.5.12-gnulib-musl.patch |
20 |
@@ -0,0 +1,132 @@ |
21 |
+diff -Naur findutils-4.5.12.orig/gl/lib/fseeko.c findutils-4.5.12/gl/lib/fseeko.c |
22 |
+--- findutils-4.5.12.orig/gl/lib/fseeko.c 2013-09-22 15:27:42.000000000 +0000 |
23 |
++++ findutils-4.5.12/gl/lib/fseeko.c 2014-03-01 13:35:14.718973449 +0000 |
24 |
+@@ -26,128 +26,6 @@ |
25 |
+ |
26 |
+ int |
27 |
+ fseeko (FILE *fp, off_t offset, int whence) |
28 |
+-#undef fseeko |
29 |
+-#if !HAVE_FSEEKO |
30 |
+-# undef fseek |
31 |
+-# define fseeko fseek |
32 |
+-#endif |
33 |
+-#if _GL_WINDOWS_64_BIT_OFF_T |
34 |
+-# undef fseeko |
35 |
+-# if HAVE__FSEEKI64 /* msvc, mingw64 */ |
36 |
+-# define fseeko _fseeki64 |
37 |
+-# else /* mingw */ |
38 |
+-# define fseeko fseeko64 |
39 |
+-# endif |
40 |
+-#endif |
41 |
+ { |
42 |
+-#if LSEEK_PIPE_BROKEN |
43 |
+- /* mingw gives bogus answers rather than failure on non-seekable files. */ |
44 |
+- if (lseek (fileno (fp), 0, SEEK_CUR) == -1) |
45 |
+- return EOF; |
46 |
+-#endif |
47 |
+- |
48 |
+- /* These tests are based on fpurge.c. */ |
49 |
+-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ |
50 |
+- if (fp->_IO_read_end == fp->_IO_read_ptr |
51 |
+- && fp->_IO_write_ptr == fp->_IO_write_base |
52 |
+- && fp->_IO_save_base == NULL) |
53 |
+-#elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin */ |
54 |
+-# if defined __SL64 && defined __SCLE /* Cygwin */ |
55 |
+- if ((fp->_flags & __SL64) == 0) |
56 |
+- { |
57 |
+- /* Cygwin 1.5.0 through 1.5.24 failed to open stdin in 64-bit |
58 |
+- mode; but has an fseeko that requires 64-bit mode. */ |
59 |
+- FILE *tmp = fopen ("/dev/null", "r"); |
60 |
+- if (!tmp) |
61 |
+- return -1; |
62 |
+- fp->_flags |= __SL64; |
63 |
+- fp->_seek64 = tmp->_seek64; |
64 |
+- fclose (tmp); |
65 |
+- } |
66 |
+-# endif |
67 |
+- if (fp_->_p == fp_->_bf._base |
68 |
+- && fp_->_r == 0 |
69 |
+- && fp_->_w == ((fp_->_flags & (__SLBF | __SNBF | __SRD)) == 0 /* fully buffered and not currently reading? */ |
70 |
+- ? fp_->_bf._size |
71 |
+- : 0) |
72 |
+- && fp_ub._base == NULL) |
73 |
+-#elif defined __EMX__ /* emx+gcc */ |
74 |
+- if (fp->_ptr == fp->_buffer |
75 |
+- && fp->_rcount == 0 |
76 |
+- && fp->_wcount == 0 |
77 |
+- && fp->_ungetc_count == 0) |
78 |
+-#elif defined __minix /* Minix */ |
79 |
+- if (fp_->_ptr == fp_->_buf |
80 |
+- && (fp_->_ptr == NULL || fp_->_count == 0)) |
81 |
+-#elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, NonStop Kernel */ |
82 |
+- if (fp_->_ptr == fp_->_base |
83 |
+- && (fp_->_ptr == NULL || fp_->_cnt == 0)) |
84 |
+-#elif defined __UCLIBC__ /* uClibc */ |
85 |
+- if (((fp->__modeflags & __FLAG_WRITING) == 0 |
86 |
+- || fp->__bufpos == fp->__bufstart) |
87 |
+- && ((fp->__modeflags & (__FLAG_READONLY | __FLAG_READING)) == 0 |
88 |
+- || fp->__bufpos == fp->__bufread)) |
89 |
+-#elif defined __QNX__ /* QNX */ |
90 |
+- if ((fp->_Mode & 0x2000 /* _MWRITE */ ? fp->_Next == fp->_Buf : fp->_Next == fp->_Rend) |
91 |
+- && fp->_Rback == fp->_Back + sizeof (fp->_Back) |
92 |
+- && fp->_Rsave == NULL) |
93 |
+-#elif defined __MINT__ /* Atari FreeMiNT */ |
94 |
+- if (fp->__bufp == fp->__buffer |
95 |
+- && fp->__get_limit == fp->__bufp |
96 |
+- && fp->__put_limit == fp->__bufp |
97 |
+- && !fp->__pushed_back) |
98 |
+-#elif defined EPLAN9 /* Plan9 */ |
99 |
+- if (fp->rp == fp->buf |
100 |
+- && fp->wp == fp->buf) |
101 |
+-#else |
102 |
+- #error "Please port gnulib fseeko.c to your platform! Look at the code in fpurge.c, then report this to bug-gnulib." |
103 |
+-#endif |
104 |
+- { |
105 |
+- /* We get here when an fflush() call immediately preceded this one (or |
106 |
+- if ftell() has created buffers but no I/O has occurred on a |
107 |
+- newly-opened stream). We know there are no buffers. */ |
108 |
+- off_t pos = lseek (fileno (fp), offset, whence); |
109 |
+- if (pos == -1) |
110 |
+- { |
111 |
+-#if defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin */ |
112 |
+- fp_->_flags &= ~__SOFF; |
113 |
+-#endif |
114 |
+- return -1; |
115 |
+- } |
116 |
+- |
117 |
+-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ |
118 |
+- fp->_flags &= ~_IO_EOF_SEEN; |
119 |
+- fp->_offset = pos; |
120 |
+-#elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin */ |
121 |
+-# if defined __CYGWIN__ |
122 |
+- /* fp_->_offset is typed as an integer. */ |
123 |
+- fp_->_offset = pos; |
124 |
+-# else |
125 |
+- /* fp_->_offset is an fpos_t. */ |
126 |
+- { |
127 |
+- /* Use a union, since on NetBSD, the compilation flags |
128 |
+- determine whether fpos_t is typedef'd to off_t or a struct |
129 |
+- containing a single off_t member. */ |
130 |
+- union |
131 |
+- { |
132 |
+- fpos_t f; |
133 |
+- off_t o; |
134 |
+- } u; |
135 |
+- u.o = pos; |
136 |
+- fp_->_offset = u.f; |
137 |
+- } |
138 |
+-# endif |
139 |
+- fp_->_flags |= __SOFF; |
140 |
+- fp_->_flags &= ~__SEOF; |
141 |
+-#elif defined __EMX__ /* emx+gcc */ |
142 |
+- fp->_flags &= ~_IOEOF; |
143 |
+-#elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, NonStop Kernel */ |
144 |
+- fp->_flag &= ~_IOEOF; |
145 |
+-#elif defined __MINT__ /* Atari FreeMiNT */ |
146 |
+- fp->__offset = pos; |
147 |
+- fp->__eof = 0; |
148 |
+-#endif |
149 |
+- return 0; |
150 |
+- } |
151 |
+ return fseeko (fp, offset, whence); |
152 |
+ } |
153 |
|
154 |
diff --git a/sys-apps/findutils/findutils-4.5.12-r99.ebuild b/sys-apps/findutils/findutils-4.5.12-r99.ebuild |
155 |
new file mode 100644 |
156 |
index 0000000..b275400 |
157 |
--- /dev/null |
158 |
+++ b/sys-apps/findutils/findutils-4.5.12-r99.ebuild |
159 |
@@ -0,0 +1,51 @@ |
160 |
+# Copyright 1999-2014 Gentoo Foundation |
161 |
+# Distributed under the terms of the GNU General Public License v2 |
162 |
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/findutils/findutils-4.5.12.ebuild,v 1.4 2014/01/18 03:28:44 vapier Exp $ |
163 |
+ |
164 |
+EAPI="5" |
165 |
+ |
166 |
+inherit eutils flag-o-matic toolchain-funcs multilib |
167 |
+ |
168 |
+DESCRIPTION="GNU utilities for finding files" |
169 |
+HOMEPAGE="http://www.gnu.org/software/findutils/" |
170 |
+SRC_URI="mirror://gnu-alpha/${PN}/${P}.tar.gz" |
171 |
+ |
172 |
+LICENSE="GPL-3+" |
173 |
+SLOT="0" |
174 |
+KEYWORDS="~amd64 ~arm ~mips ~x86" |
175 |
+IUSE="nls selinux static" |
176 |
+ |
177 |
+RDEPEND="selinux? ( sys-libs/libselinux ) |
178 |
+ nls? ( virtual/libintl )" |
179 |
+DEPEND="${RDEPEND} |
180 |
+ nls? ( sys-devel/gettext )" |
181 |
+ |
182 |
+src_prepare() { |
183 |
+ epatch "${FILESDIR}"/${P}-gnulib-musl.patch |
184 |
+ # Don't build or install locate because it conflicts with slocate, |
185 |
+ # which is a secure version of locate. See bug 18729 |
186 |
+ sed -i '/^SUBDIRS/s/locate//' Makefile.in |
187 |
+} |
188 |
+ |
189 |
+src_configure() { |
190 |
+ use static && append-ldflags -static |
191 |
+ |
192 |
+ program_prefix=$(usex userland_GNU '' g) |
193 |
+ econf \ |
194 |
+ --with-packager="Gentoo" \ |
195 |
+ --with-packager-version="${PVR}" \ |
196 |
+ --with-packager-bug-reports="http://bugs.gentoo.org/" \ |
197 |
+ --program-prefix=${program_prefix} \ |
198 |
+ $(use_enable nls) \ |
199 |
+ $(use_with selinux) \ |
200 |
+ --libexecdir='$(libdir)'/find |
201 |
+} |
202 |
+ |
203 |
+src_install() { |
204 |
+ emake DESTDIR="${D}" install |
205 |
+ dodoc NEWS README TODO ChangeLog |
206 |
+ |
207 |
+ # We don't need this, so punt it. |
208 |
+ rm "${ED}"/usr/bin/${program_prefix}oldfind \ |
209 |
+ "${ED}"/usr/share/man/man1/${program_prefix}oldfind.1 || die |
210 |
+} |