Gentoo Archives: gentoo-commits

From: Michael Haubenwallner <haubi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/confix/files/, dev-util/confix/
Date: Tue, 26 Sep 2017 14:23:34
Message-Id: 1506435790.b36ddafe5565410654a534a7d7a6ef6a6b6f3ab3.haubi@gentoo
1 commit: b36ddafe5565410654a534a7d7a6ef6a6b6f3ab3
2 Author: Michael Haubenwallner <haubi <AT> gentoo <DOT> org>
3 AuthorDate: Tue Sep 26 13:37:43 2017 +0000
4 Commit: Michael Haubenwallner <haubi <AT> gentoo <DOT> org>
5 CommitDate: Tue Sep 26 14:23:10 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b36ddafe
7
8 dev-util/confix: support -no-undefined ltflag, drop dist-shar amflag
9
10 Package-Manager: Portage-2.3.8, Repoman-2.3.1
11
12 dev-util/confix/confix-2.3.5-r3.ebuild | 70 +++++++
13 .../confix/files/confix-2.3.5-nodist-shar.patch | 44 +++++
14 .../files/confix-2.3.5-support-no_undefined.patch | 213 +++++++++++++++++++++
15 3 files changed, 327 insertions(+)
16
17 diff --git a/dev-util/confix/confix-2.3.5-r3.ebuild b/dev-util/confix/confix-2.3.5-r3.ebuild
18 new file mode 100644
19 index 00000000000..11af017cd57
20 --- /dev/null
21 +++ b/dev-util/confix/confix-2.3.5-r3.ebuild
22 @@ -0,0 +1,70 @@
23 +# Copyright 1999-2017 Gentoo Foundation
24 +# Distributed under the terms of the GNU General Public License v2
25 +
26 +EAPI=5
27 +
28 +PYTHON_COMPAT=( python2_7 )
29 +DISTUTILS_SINGLE_IMPL=1
30 +
31 +inherit distutils-r1
32 +
33 +DESCRIPTION="Confix: A Build Tool on Top of GNU Automake"
34 +HOMEPAGE="http://confix.sourceforge.net"
35 +SRC_URI="mirror://sourceforge/confix/Confix-${PV}.tar.bz2"
36 +
37 +LICENSE="GPL-2"
38 +SLOT="2"
39 +KEYWORDS="~amd64 ~x86 ~ppc-aix ~x64-cygwin ~amd64-linux ~x86-linux ~sparc-solaris ~x86-solaris"
40 +IUSE=""
41 +
42 +DEPEND=""
43 +RDEPEND="dev-util/confix-wrapper
44 + sys-devel/autoconf-archive
45 + sys-devel/automake
46 + sys-devel/libtool"
47 +
48 +S="${WORKDIR}/Confix-${PV}"
49 +
50 +PATCHES=( # find jni-include dirs on hpux.
51 + "${FILESDIR}"/2.1.0/jni-hpux.patch
52 + # add .exe extension to TESTS
53 + "${FILESDIR}"/2.3.0/exeext.patch
54 + # use external autoconf archive
55 + "${FILESDIR}"/2.3.0/ext-ac-archive.patch
56 + # link local libraries first.
57 + "${FILESDIR}"/2.3.0/local-libs-first.patch
58 + # don't use automake 1.9, but any newer too...
59 + "${FILESDIR}"/2.3.0/new-automake.patch
60 + # support -no-undefined libtool flag
61 + "${FILESDIR}"/${P}-support-no_undefined.patch
62 + # drop deprecated 'dist-shar' automake flag
63 + "${FILESDIR}"/${P}-nodist-shar.patch
64 +)
65 +
66 +pkg_setup() {
67 + python-single-r1_pkg_setup
68 +}
69 +
70 +pkg_preinst() {
71 + local RV=2.3.0
72 +
73 + if has_version "<dev-util/confix-${RV}"; then
74 + einfo "After merging ${P} you might have to remerge all packages built"
75 + einfo "with <dev-util/confix-${RV} in your EPREFIX to get all the"
76 + einfo "repo files useable with current ${PN}".
77 + ewarn
78 + ewarn "Use this command (copy&paste) to identify packages built with confix"
79 + ewarn "needing a remerge in your particular instance of Gentoo Prefix:"
80 + ewarn
81 + # use 'echo' to get this command from here:
82 + ewarn "( cd \$(portageq envvar EPREFIX)/var/db/pkg || exit 1;" \
83 + "pattern=\$(cd ../../.. && echo \$(ls -d" \
84 + "usr/share/confix*/repo | grep -v confix-${RV}) |" \
85 + "sed -e 's, ,|,g'); if [[ -z \${pattern} ]]; then echo" \
86 + "'No more packages were built with broken Confix.'; exit 0;" \
87 + "fi; emerge --ask --oneshot \$(grep -lE \"(\${pattern})\"" \
88 + "*/*/CONTENTS | sed -e 's,^,>=,;s,/CONTENTS,,')" \
89 + ")"
90 + ewarn
91 + fi
92 +}
93
94 diff --git a/dev-util/confix/files/confix-2.3.5-nodist-shar.patch b/dev-util/confix/files/confix-2.3.5-nodist-shar.patch
95 new file mode 100644
96 index 00000000000..bccc437de44
97 --- /dev/null
98 +++ b/dev-util/confix/files/confix-2.3.5-nodist-shar.patch
99 @@ -0,0 +1,44 @@
100 +------------------------------------------------------------------------
101 +r961 | mhaubi | 2017-09-26 15:34:00 +0200 (Tue, 26 Sep 2017) | 1 line
102 +
103 +drop 'dist-shar', deprecated by newer automake
104 +
105 +Index: doc/confix.texi
106 +===================================================================
107 +#--- doc/confix.texi (revision 960)
108 +#+++ doc/confix.texi (working copy)
109 +#@@ -992,9 +992,6 @@
110 + @code{dist-bzip2} creates a @file{.tar.bz2} distribution.
111 +
112 + @item
113 +-@code{dist-shar} creates a shell archive distribution.
114 +-
115 +-@item
116 + @code{dist-zip} create a zip file (popular on Windows).
117 +
118 + @item
119 +Index: libconfix/plugins/automake/out_automake.py
120 +===================================================================
121 +--- libconfix/plugins/automake/out_automake.py (revision 960)
122 ++++ libconfix/plugins/automake/out_automake.py (working copy)
123 +@@ -175,7 +175,6 @@
124 +
125 + # enable dist'ing in the following formats
126 + self.makefile_am().add_automake_options('dist-bzip2')
127 +- self.makefile_am().add_automake_options('dist-shar')
128 + self.makefile_am().add_automake_options('dist-zip')
129 +
130 +
131 +Index: libconfix/plugins/automake/tests/output.py
132 +===================================================================
133 +--- libconfix/plugins/automake/tests/output.py (revision 960)
134 ++++ libconfix/plugins/automake/tests/output.py (working copy)
135 +@@ -146,7 +146,7 @@
136 +
137 + self.failUnless('1.9' in rootdir_automake_builder.makefile_am().automake_options())
138 + self.failUnless('dist-bzip2' in rootdir_automake_builder.makefile_am().automake_options())
139 +- self.failUnless('dist-shar' in rootdir_automake_builder.makefile_am().automake_options())
140 ++ self.failUnless('dist-shar' not in rootdir_automake_builder.makefile_am().automake_options())
141 + self.failUnless('dist-zip' in rootdir_automake_builder.makefile_am().automake_options())
142 + self.failUnless(const.CONFIX2_DIR in rootdir_automake_builder.makefile_am().extra_dist())
143 + self.failUnless(const.CONFIX2_PKG in rootdir_automake_builder.makefile_am().extra_dist())
144
145 diff --git a/dev-util/confix/files/confix-2.3.5-support-no_undefined.patch b/dev-util/confix/files/confix-2.3.5-support-no_undefined.patch
146 new file mode 100644
147 index 00000000000..a6ffaae89c9
148 --- /dev/null
149 +++ b/dev-util/confix/files/confix-2.3.5-support-no_undefined.patch
150 @@ -0,0 +1,213 @@
151 +------------------------------------------------------------------------
152 +r960 | mhaubi | 2017-09-26 14:51:18 +0200 (Tue, 26 Sep 2017) | 10 lines
153 +
154 +add 'has_undefined_symbols' property for libraries
155 +
156 +Windows does not support undefined symbols in shared libraries,
157 +so libtool refuses to create DLLs without the -no-undefined flag.
158 +
159 +Adding explicit HAS_UNDEFINED_SYMBOLS(False) api call per library,
160 +and the optional (has_undefined_symbols=False) argument to AutoC().
161 +
162 +For backwards compatibility, default is (has_undefined_symbols=True).
163 +
164 +------------------------------------------------------------------------
165 +Index: libconfix/plugins/automake/c/out_c.py
166 +===================================================================
167 +--- libconfix/plugins/automake/c/out_c.py (revision 959)
168 ++++ libconfix/plugins/automake/c/out_c.py (revision 960)
169 +@@ -487,6 +487,9 @@
170 + elif b.default_version() is not None:
171 + automake_output_builder.makefile_am().add_compound_ldflags(automakelibname, '-release '+b.default_version())
172 + pass
173 ++ if b.has_undefined_symbols() is False:
174 ++ automake_output_builder.makefile_am().add_compound_ldflags(automakelibname, '-no-undefined')
175 ++ pass
176 + pass
177 + else:
178 + automake_output_builder.configure_ac().add_paragraph(
179 +Index: libconfix/plugins/c/clusterer.py
180 +===================================================================
181 +--- libconfix/plugins/c/clusterer.py (revision 959)
182 ++++ libconfix/plugins/c/clusterer.py (revision 960)
183 +@@ -33,7 +33,7 @@
184 + import types
185 +
186 + class CClustererSetup(Setup):
187 +- def __init__(self, linkednamefinder=None):
188 ++ def __init__(self, linkednamefinder=None, has_undefined_symbols=True):
189 + assert linkednamefinder is None or isinstance(linkednamefinder, NameFinder)
190 + Setup.__init__(self)
191 + if linkednamefinder is None:
192 +@@ -41,10 +41,11 @@
193 + else:
194 + self.__namefinder = linkednamefinder
195 + pass
196 ++ self.__has_undefined_symbols = has_undefined_symbols
197 + pass
198 +
199 + def setup(self, dirbuilder):
200 +- clusterer = CClusterer(namefinder=self.__namefinder)
201 ++ clusterer = CClusterer(namefinder=self.__namefinder, has_undefined_symbols=self.__has_undefined_symbols)
202 + dirbuilder.add_builder(clusterer)
203 + dirbuilder.add_interface(CClustererInterfaceProxy(clusterer=clusterer))
204 + pass
205 +@@ -51,11 +52,12 @@
206 + pass
207 +
208 + class CClusterer(Builder):
209 +- def __init__(self, namefinder):
210 ++ def __init__(self, namefinder, has_undefined_symbols=True):
211 + Builder.__init__(self)
212 + self.__namefinder = namefinder
213 + self.__libname = None
214 + self.__libtool_version_info = None
215 ++ self.__has_undefined_symbols = has_undefined_symbols
216 + pass
217 +
218 + def shortname(self):
219 +@@ -85,6 +87,15 @@
220 + pass
221 + pass
222 +
223 ++ def set_has_undefined_symbols(self, has_undefined_symbols):
224 ++ self.__has_undefined_symbols = has_undefined_symbols
225 ++ for builder in self.parentbuilder().iter_builders():
226 ++ if isinstance(builder, LibraryBuilder):
227 ++ builder.set_has_undefined_symbols(has_undefined_symbols)
228 ++ break
229 ++ pass
230 ++ pass
231 ++
232 + def enlarge(self):
233 + super(CClusterer, self).enlarge()
234 +
235 +@@ -163,7 +174,8 @@
236 + LibraryBuilder(
237 + basename=libname,
238 + version=self.__libtool_version_info,
239 +- default_version=self.package().version()))
240 ++ default_version=self.package().version(),
241 ++ has_undefined_symbols=self.__has_undefined_symbols))
242 + for b in itertools.chain(nomain_builders, header_builders):
243 + library.add_member(b)
244 + pass
245 +@@ -229,6 +241,13 @@
246 + pass
247 + self.__clusterer.set_libtool_version_info(version)
248 + pass
249 ++
250 ++ def HAS_UNDEFINED_SYMBOLS(self, has_undefined_symbols):
251 ++ if type(has_undefined_symbols) is not types.BooleanType:
252 ++ raise Error("HAS_UNDEFINED_SYMBOLS(): 'has_undefined_symbols' argument must be a boolean")
253 ++ self.__clusterer.set_has_undefined_symbols(has_undefined_symbols)
254 ++ pass
255 ++
256 + pass
257 +
258 + class NameFinder:
259 +Index: libconfix/plugins/c/explicit_iface.py
260 +===================================================================
261 +--- libconfix/plugins/c/explicit_iface.py (revision 959)
262 ++++ libconfix/plugins/c/explicit_iface.py (revision 960)
263 +@@ -104,7 +104,7 @@
264 + self.__dirbuilder.add_builder(yacc)
265 + return yacc
266 +
267 +- def LIBRARY(self, members, basename=None, version=None):
268 ++ def LIBRARY(self, members, basename=None, version=None, undefined_symbols=True):
269 + the_basename = basename
270 + if the_basename is None:
271 + the_basename=LongNameFinder().find_libname(
272 +@@ -113,7 +113,8 @@
273 + pass
274 + library = LibraryBuilder(basename=the_basename,
275 + version=version,
276 +- default_version=self.__dirbuilder.package().version())
277 ++ default_version=self.__dirbuilder.package().version(),
278 ++ has_undefined_symbols=undefined_symbols)
279 + for m in members:
280 + library.add_member(m)
281 + pass
282 +Index: libconfix/plugins/c/library.py
283 +===================================================================
284 +--- libconfix/plugins/c/library.py (revision 959)
285 ++++ libconfix/plugins/c/library.py (revision 960)
286 +@@ -25,7 +25,8 @@
287 + def __init__(self,
288 + basename,
289 + version,
290 +- default_version):
291 ++ default_version,
292 ++ has_undefined_symbols):
293 +
294 + # library version. passed to libtool as "-version-info
295 + # <current>:<revision>:<age>", for example.
296 +@@ -40,6 +41,7 @@
297 + self.__basename = basename
298 + self.__version = version
299 + self.__default_version = default_version
300 ++ self.__has_undefined_symbols = has_undefined_symbols
301 +
302 + self.__buildinfo_added = False
303 +
304 +@@ -82,6 +84,10 @@
305 + super(LibraryBuilder, self).force_enlarge()
306 + pass
307 +
308 ++ def set_has_undefined_symbols(self, has_undefined_symbols):
309 ++ self.__has_undefined_symbols = has_undefined_symbols
310 ++ pass
311 ++
312 + def version(self):
313 + return self.__version
314 +
315 +@@ -88,4 +94,7 @@
316 + def default_version(self):
317 + return self.__default_version
318 +
319 ++ def has_undefined_symbols(self):
320 ++ return self.__has_undefined_symbols
321 ++
322 + pass
323 +Index: libconfix/plugins/c/setups/default_setup.py
324 +===================================================================
325 +--- libconfix/plugins/c/setups/default_setup.py (revision 959)
326 ++++ libconfix/plugins/c/setups/default_setup.py (revision 960)
327 +@@ -25,8 +25,8 @@
328 +
329 + from libconfix.core.machinery.setup import CompositeSetup
330 +
331 +-def make_core_setups(linkednamefinder):
332 +- return [CClustererSetup(linkednamefinder=linkednamefinder),
333 ++def make_core_setups(linkednamefinder, has_undefined_symbols):
334 ++ return [CClustererSetup(linkednamefinder=linkednamefinder, has_undefined_symbols=has_undefined_symbols),
335 + CCreatorSetup(),
336 + CommonInterfaceSetup(),
337 + RelocatedHeadersSetup(),
338 +@@ -34,8 +34,9 @@
339 +
340 + class DefaultCSetup(CompositeSetup):
341 + def __init__(self,
342 +- linkednamefinder=None):
343 +- setups = make_core_setups(linkednamefinder=linkednamefinder)
344 ++ linkednamefinder=None,
345 ++ has_undefined_symbols=True):
346 ++ setups = make_core_setups(linkednamefinder=linkednamefinder, has_undefined_symbols=has_undefined_symbols)
347 + setups.append(ImplicitInterfaceSetup())
348 + CompositeSetup.__init__(
349 + self,
350 +Index: libconfix/setups/c.py
351 +===================================================================
352 +--- libconfix/setups/c.py (revision 959)
353 ++++ libconfix/setups/c.py (revision 960)
354 +@@ -26,7 +26,7 @@
355 + pass
356 +
357 + class AutoC(CompositeSetup):
358 +- def __init__(self, libnamefinder=None):
359 +- CompositeSetup.__init__(self, [DefaultCSetup(libnamefinder)])
360 ++ def __init__(self, libnamefinder=None, has_undefined_symbols=True):
361 ++ CompositeSetup.__init__(self, [DefaultCSetup(libnamefinder, has_undefined_symbols=has_undefined_symbols)])
362 + pass
363 + pass