Gentoo Archives: gentoo-commits

From: "Mike Frysinger (vapier)" <vapier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-apps/file: file-9999.ebuild file-5.18-r1.ebuild ChangeLog
Date: Thu, 27 Mar 2014 03:30:19
Message-Id: 20140327033014.C86DB2004F@flycatcher.gentoo.org
1 vapier 14/03/27 03:30:14
2
3 Modified: file-9999.ebuild ChangeLog
4 Added: file-5.18-r1.ebuild
5 Log:
6 Add multilib support.
7
8 (Portage version: 2.2.8-r1/cvs/Linux x86_64, signed Manifest commit with key D2E96200)
9
10 Revision Changes Path
11 1.6 sys-apps/file/file-9999.ebuild
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/file/file-9999.ebuild?rev=1.6&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/file/file-9999.ebuild?rev=1.6&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/file/file-9999.ebuild?r1=1.5&r2=1.6
16
17 Index: file-9999.ebuild
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/sys-apps/file/file-9999.ebuild,v
20 retrieving revision 1.5
21 retrieving revision 1.6
22 diff -u -r1.5 -r1.6
23 --- file-9999.ebuild 18 Jan 2014 03:06:30 -0000 1.5
24 +++ file-9999.ebuild 27 Mar 2014 03:30:14 -0000 1.6
25 @@ -1,12 +1,12 @@
26 # Copyright 1999-2014 Gentoo Foundation
27 # Distributed under the terms of the GNU General Public License v2
28 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/file/file-9999.ebuild,v 1.5 2014/01/18 03:06:30 vapier Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/file/file-9999.ebuild,v 1.6 2014/03/27 03:30:14 vapier Exp $
30
31 EAPI="4"
32 PYTHON_COMPAT=( python{2_6,2_7,3_2,3_3} pypy2_0 )
33 DISTUTILS_OPTIONAL=1
34
35 -inherit eutils distutils-r1 libtool toolchain-funcs
36 +inherit eutils distutils-r1 libtool toolchain-funcs multilib-minimal
37
38 if [[ ${PV} == "9999" ]] ; then
39 EGIT_REPO_URI="git://github.com/glensc/file.git"
40 @@ -37,17 +37,12 @@
41 mv python/README{,.python}
42 }
43
44 -wd() { echo "${WORKDIR}"/build-${CHOST}; }
45 -
46 -do_configure() {
47 - ECONF_SOURCE=${S}
48 -
49 - mkdir "$(wd)"
50 - pushd "$(wd)" >/dev/null
51 -
52 - econf "$@"
53 -
54 - popd >/dev/null
55 +multilib_src_configure() {
56 + ECONF_SOURCE=${S} \
57 + ac_cv_header_zlib_h=$(usex zlib) \
58 + ac_cv_lib_z_gzopen=$(usex zlib)
59 + econf \
60 + $(use_enable static-libs static)
61 }
62
63 src_configure() {
64 @@ -55,7 +50,10 @@
65 # because people often don't keep matching host/target
66 # file versions #362941
67 if tc-is-cross-compiler && ! ROOT=/ has_version ~${CATEGORY}/${P} ; then
68 + mkdir -p "${WORKDIR}"/build
69 + cd "${WORKDIR}"/build
70 tc-export_build_env BUILD_C{C,XX}
71 + ECONF_SOURCE=${S} \
72 ac_cv_header_zlib_h=no \
73 ac_cv_lib_z_gzopen=no \
74 CHOST=${CBUILD} \
75 @@ -65,29 +63,39 @@
76 LDFLAGS="${BUILD_LDFLAGS} -static" \
77 CC=${BUILD_CC} \
78 CXX=${BUILD_CXX} \
79 - do_configure --disable-shared
80 + econf --disable-shared
81 fi
82
83 - export ac_cv_header_zlib_h=$(usex zlib) ac_cv_lib_z_gzopen=$(usex zlib)
84 - do_configure $(use_enable static-libs static)
85 + multilib-minimal_src_configure
86 }
87
88 -do_make() {
89 - emake -C "$(wd)" "$@"
90 +multilib_src_compile() {
91 + if multilib_build_binaries ; then
92 + emake
93 + else
94 + emake -C src libmagic.la
95 + fi
96 }
97
98 src_compile() {
99 if tc-is-cross-compiler && ! ROOT=/ has_version ~${CATEGORY}/${P} ; then
100 - CHOST=${CBUILD} do_make -C src file
101 - PATH=$(CHOST=${CBUILD} wd)/src:${PATH}
102 + emake -C "${WORKDIR}"/build/src file
103 + PATH="${WORKDIR}/build/src:${PATH}"
104 fi
105 - do_make
106 + multilib-minimal_src_compile
107
108 use python && cd python && distutils-r1_src_compile
109 }
110
111 -src_install() {
112 - do_make DESTDIR="${D}" install
113 +multilib_src_install() {
114 + if multilib_build_binaries ; then
115 + default
116 + else
117 + emake -C src install-{includeHEADERS,libLTLIBRARIES} DESTDIR="${D}"
118 + fi
119 +}
120 +
121 +multilib_src_install_all() {
122 dodoc ChangeLog MAINT README
123
124 use python && cd python && distutils-r1_src_install
125
126
127
128 1.272 sys-apps/file/ChangeLog
129
130 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/file/ChangeLog?rev=1.272&view=markup
131 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/file/ChangeLog?rev=1.272&content-type=text/plain
132 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/file/ChangeLog?r1=1.271&r2=1.272
133
134 Index: ChangeLog
135 ===================================================================
136 RCS file: /var/cvsroot/gentoo-x86/sys-apps/file/ChangeLog,v
137 retrieving revision 1.271
138 retrieving revision 1.272
139 diff -u -r1.271 -r1.272
140 --- ChangeLog 26 Mar 2014 16:10:39 -0000 1.271
141 +++ ChangeLog 27 Mar 2014 03:30:14 -0000 1.272
142 @@ -1,6 +1,12 @@
143 # ChangeLog for sys-apps/file
144 # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
145 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/file/ChangeLog,v 1.271 2014/03/26 16:10:39 vapier Exp $
146 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/file/ChangeLog,v 1.272 2014/03/27 03:30:14 vapier Exp $
147 +
148 +*file-5.18-r1 (27 Mar 2014)
149 +
150 + 27 Mar 2014; Mike Frysinger <vapier@g.o> +file-5.18-r1.ebuild,
151 + file-9999.ebuild:
152 + Add multilib support.
153
154 *file-5.18 (26 Mar 2014)
155
156
157
158
159 1.1 sys-apps/file/file-5.18-r1.ebuild
160
161 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/file/file-5.18-r1.ebuild?rev=1.1&view=markup
162 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/file/file-5.18-r1.ebuild?rev=1.1&content-type=text/plain
163
164 Index: file-5.18-r1.ebuild
165 ===================================================================
166 # Copyright 1999-2014 Gentoo Foundation
167 # Distributed under the terms of the GNU General Public License v2
168 # $Header: /var/cvsroot/gentoo-x86/sys-apps/file/file-5.18-r1.ebuild,v 1.1 2014/03/27 03:30:14 vapier Exp $
169
170 EAPI="4"
171 PYTHON_COMPAT=( python{2_6,2_7,3_2,3_3} pypy2_0 )
172 DISTUTILS_OPTIONAL=1
173
174 inherit eutils distutils-r1 libtool toolchain-funcs multilib-minimal
175
176 if [[ ${PV} == "9999" ]] ; then
177 EGIT_REPO_URI="git://github.com/glensc/file.git"
178 inherit autotools git-r3
179 else
180 SRC_URI="ftp://ftp.astron.com/pub/file/${P}.tar.gz
181 ftp://ftp.gw.com/mirrors/pub/unix/file/${P}.tar.gz"
182 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
183 fi
184
185 DESCRIPTION="identify a file's format by scanning binary data for patterns"
186 HOMEPAGE="http://www.darwinsys.com/file/"
187
188 LICENSE="BSD-2"
189 SLOT="0"
190 IUSE="python static-libs zlib"
191
192 DEPEND="python? ( ${PYTHON_DEPS} )
193 zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] )"
194 RDEPEND="${DEPEND}
195 python? ( !dev-python/python-magic )"
196
197 src_prepare() {
198 [[ ${PV} == "9999" ]] && eautoreconf
199 elibtoolize
200
201 # don't let python README kill main README #60043
202 mv python/README{,.python}
203 }
204
205 multilib_src_configure() {
206 ECONF_SOURCE=${S} \
207 ac_cv_header_zlib_h=$(usex zlib) \
208 ac_cv_lib_z_gzopen=$(usex zlib)
209 econf \
210 $(use_enable static-libs static)
211 }
212
213 src_configure() {
214 # when cross-compiling, we need to build up our own file
215 # because people often don't keep matching host/target
216 # file versions #362941
217 if tc-is-cross-compiler && ! ROOT=/ has_version ~${CATEGORY}/${P} ; then
218 mkdir -p "${WORKDIR}"/build
219 cd "${WORKDIR}"/build
220 tc-export_build_env BUILD_C{C,XX}
221 ECONF_SOURCE=${S} \
222 ac_cv_header_zlib_h=no \
223 ac_cv_lib_z_gzopen=no \
224 CHOST=${CBUILD} \
225 CFLAGS=${BUILD_CFLAGS} \
226 CXXFLAGS=${BUILD_CXXFLAGS} \
227 CPPFLAGS=${BUILD_CPPFLAGS} \
228 LDFLAGS="${BUILD_LDFLAGS} -static" \
229 CC=${BUILD_CC} \
230 CXX=${BUILD_CXX} \
231 econf --disable-shared
232 fi
233
234 multilib-minimal_src_configure
235 }
236
237 multilib_src_compile() {
238 if multilib_build_binaries ; then
239 emake
240 else
241 emake -C src libmagic.la
242 fi
243 }
244
245 src_compile() {
246 if tc-is-cross-compiler && ! ROOT=/ has_version ~${CATEGORY}/${P} ; then
247 emake -C "${WORKDIR}"/build/src file
248 PATH="${WORKDIR}/build/src:${PATH}"
249 fi
250 multilib-minimal_src_compile
251
252 use python && cd python && distutils-r1_src_compile
253 }
254
255 multilib_src_install() {
256 if multilib_build_binaries ; then
257 default
258 else
259 emake -C src install-{includeHEADERS,libLTLIBRARIES} DESTDIR="${D}"
260 fi
261 }
262
263 multilib_src_install_all() {
264 dodoc ChangeLog MAINT README
265
266 use python && cd python && distutils-r1_src_install
267 prune_libtool_files
268 }