1 |
commit: bea8fec3227ce48cadb09e2393fec003e88188e2 |
2 |
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Mar 31 08:01:17 2021 +0000 |
4 |
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Mar 31 08:03:09 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bea8fec3 |
7 |
|
8 |
sys-apps/file: Bump to version 5.40 |
9 |
|
10 |
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org> |
11 |
|
12 |
sys-apps/file/Manifest | 1 + |
13 |
sys-apps/file/file-5.40.ebuild | 144 +++++++++++++++++++++++++++++++++++++++++ |
14 |
2 files changed, 145 insertions(+) |
15 |
|
16 |
diff --git a/sys-apps/file/Manifest b/sys-apps/file/Manifest |
17 |
index 42c17cea294..ec875e6062a 100644 |
18 |
--- a/sys-apps/file/Manifest |
19 |
+++ b/sys-apps/file/Manifest |
20 |
@@ -1,3 +1,4 @@ |
21 |
DIST file-5.37.tar.gz 887682 BLAKE2B c5635e5de879af31cbef1c988275ab8620133909d146769b27a2f8eefa90871fad5fa75e66b9e1d77a6261e5d6dec315fb5a8ad587d8c214eaa0bc2e5a929fe7 SHA512 bf153c15aebdd00329806231d20f295077b8b99efd0181d01279bcf3734a1718567df38cf75bc929eb8015ac98d29bb4bf1228d7ece8bfdfe14dd976391dd06d |
22 |
DIST file-5.38.tar.gz 932528 BLAKE2B 08d8d56e2e1b6a0c9fb0caed89ca6145bf683ecc52a639c036ded01b913e7eea75d9235851a2fbd410cbc9b929c26579b06fe1d54fb73817c951bef3544bc345 SHA512 9eeeba69cbc9f0c00a0bdf9eaf60c73a4a709e797068f109d85c1ef2a19c8b0e012ecd73714f03cbb1770dfa717e8a661ad746b644cc030cafbfb1f7aac35a40 |
23 |
DIST file-5.39.tar.gz 954266 BLAKE2B 4d6d9a6317961e0a2aa391f502b0be8bbb40ede57c3470230d91aaf9ce5d35bcaceb32d551ca5a391fc8c40b64517fdb996833a8b1ca47ced7e92e9e545d2682 SHA512 9cf1a7b769c56eb6f5b25c66ce85fa1300128396e445b2e53dbbd8951e5da973a7a07c4ef9f7ebd1fe945d47bdaf2cd9ef09bd2be6c217a0bcb907d9449835e6 |
24 |
+DIST file-5.40.tar.gz 1004214 BLAKE2B 4e15a1ca62fe7c03c90b0e509dc899b87f4474f758ad3d08172b3d838dc3f7c2954ba1074eeeeb3da8c04b8df84eff2b8cdf3177da334a926914429df67f60bf SHA512 3b70df75fa4c9050d55b1ffdc28e5f3c8b8ef7d4efd1a06bf53f113b676d81114a85aae56e0897d32b53716662d64ad18ab251ca8c92c6405c69eb758bb99afb |
25 |
|
26 |
diff --git a/sys-apps/file/file-5.40.ebuild b/sys-apps/file/file-5.40.ebuild |
27 |
new file mode 100644 |
28 |
index 00000000000..76a8c3e996e |
29 |
--- /dev/null |
30 |
+++ b/sys-apps/file/file-5.40.ebuild |
31 |
@@ -0,0 +1,144 @@ |
32 |
+# Copyright 1999-2021 Gentoo Authors |
33 |
+# Distributed under the terms of the GNU General Public License v2 |
34 |
+ |
35 |
+EAPI=7 |
36 |
+ |
37 |
+PYTHON_COMPAT=( python3_{7..9} ) |
38 |
+DISTUTILS_OPTIONAL=1 |
39 |
+ |
40 |
+inherit distutils-r1 libtool toolchain-funcs multilib-minimal |
41 |
+ |
42 |
+if [[ ${PV} == "9999" ]] ; then |
43 |
+ EGIT_REPO_URI="https://github.com/glensc/file.git" |
44 |
+ inherit autotools git-r3 |
45 |
+else |
46 |
+ SRC_URI="ftp://ftp.astron.com/pub/file/${P}.tar.gz" |
47 |
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" |
48 |
+fi |
49 |
+ |
50 |
+DESCRIPTION="identify a file's format by scanning binary data for patterns" |
51 |
+HOMEPAGE="https://www.darwinsys.com/file/" |
52 |
+ |
53 |
+LICENSE="BSD-2" |
54 |
+SLOT="0" |
55 |
+IUSE="bzip2 lzma python seccomp static-libs zlib" |
56 |
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" |
57 |
+ |
58 |
+DEPEND=" |
59 |
+ bzip2? ( app-arch/bzip2[${MULTILIB_USEDEP}] ) |
60 |
+ lzma? ( app-arch/xz-utils[${MULTILIB_USEDEP}] ) |
61 |
+ python? ( |
62 |
+ ${PYTHON_DEPS} |
63 |
+ dev-python/setuptools[${PYTHON_USEDEP}] |
64 |
+ ) |
65 |
+ zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )" |
66 |
+RDEPEND="${DEPEND} |
67 |
+ python? ( !dev-python/python-magic ) |
68 |
+ seccomp? ( sys-libs/libseccomp[${MULTILIB_USEDEP}] )" |
69 |
+ |
70 |
+PATCHES=( |
71 |
+ "${FILESDIR}/file-5.39-portage-sandbox.patch" #713710 #728978 |
72 |
+) |
73 |
+ |
74 |
+src_prepare() { |
75 |
+ default |
76 |
+ |
77 |
+ if [[ ${PV} == 9999 ]] ; then |
78 |
+ eautoreconf |
79 |
+ fi |
80 |
+ |
81 |
+ elibtoolize |
82 |
+ |
83 |
+ # don't let python README kill main README #60043 |
84 |
+ mv python/README.md python/README.python.md || die |
85 |
+ sed 's@××××××.md@README.python.md@' -i python/setup.py || die #662090 |
86 |
+} |
87 |
+ |
88 |
+multilib_src_configure() { |
89 |
+ local myeconfargs=( |
90 |
+ --enable-fsect-man5 |
91 |
+ $(use_enable bzip2 bzlib) |
92 |
+ $(use_enable lzma xzlib) |
93 |
+ $(use_enable seccomp libseccomp) |
94 |
+ $(use_enable static-libs static) |
95 |
+ $(use_enable zlib) |
96 |
+ ) |
97 |
+ econf "${myeconfargs[@]}" |
98 |
+} |
99 |
+ |
100 |
+build_src_configure() { |
101 |
+ local myeconfargs=( |
102 |
+ --disable-shared |
103 |
+ --disable-libseccomp |
104 |
+ --disable-bzlib |
105 |
+ --disable-xzlib |
106 |
+ --disable-zlib |
107 |
+ ) |
108 |
+ tc-env_build econf "${myeconfargs[@]}" |
109 |
+} |
110 |
+ |
111 |
+need_build_file() { |
112 |
+ # when cross-compiling, we need to build up our own file |
113 |
+ # because people often don't keep matching host/target |
114 |
+ # file versions #362941 |
115 |
+ tc-is-cross-compiler && ! has_version -b "~${CATEGORY}/${P}" |
116 |
+} |
117 |
+ |
118 |
+src_configure() { |
119 |
+ local ECONF_SOURCE="${S}" |
120 |
+ |
121 |
+ if need_build_file ; then |
122 |
+ mkdir -p "${WORKDIR}"/build || die |
123 |
+ cd "${WORKDIR}"/build || die |
124 |
+ build_src_configure |
125 |
+ fi |
126 |
+ |
127 |
+ multilib-minimal_src_configure |
128 |
+} |
129 |
+ |
130 |
+multilib_src_compile() { |
131 |
+ if multilib_is_native_abi ; then |
132 |
+ emake |
133 |
+ else |
134 |
+ cd src || die |
135 |
+ emake magic.h #586444 |
136 |
+ emake libmagic.la |
137 |
+ fi |
138 |
+} |
139 |
+ |
140 |
+src_compile() { |
141 |
+ if need_build_file ; then |
142 |
+ emake -C "${WORKDIR}"/build/src magic.h #586444 |
143 |
+ emake -C "${WORKDIR}"/build/src file |
144 |
+ local -x PATH="${WORKDIR}/build/src:${PATH}" |
145 |
+ fi |
146 |
+ multilib-minimal_src_compile |
147 |
+ |
148 |
+ if use python ; then |
149 |
+ cd python || die |
150 |
+ distutils-r1_src_compile |
151 |
+ fi |
152 |
+} |
153 |
+ |
154 |
+multilib_src_install() { |
155 |
+ if multilib_is_native_abi ; then |
156 |
+ default |
157 |
+ else |
158 |
+ emake -C src install-{nodist_includeHEADERS,libLTLIBRARIES} DESTDIR="${D}" |
159 |
+ fi |
160 |
+} |
161 |
+ |
162 |
+multilib_src_install_all() { |
163 |
+ dodoc ChangeLog MAINT README |
164 |
+ |
165 |
+ # Required for `file -C` |
166 |
+ dodir /usr/share/misc/magic |
167 |
+ insinto /usr/share/misc/magic |
168 |
+ doins -r magic/Magdir/* |
169 |
+ |
170 |
+ if use python ; then |
171 |
+ cd python || die |
172 |
+ distutils-r1_src_install |
173 |
+ fi |
174 |
+ find "${ED}" -type f -name "*.la" -delete || die |
175 |
+} |