public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-util/confix/files/, dev-util/confix/
@ 2017-09-26 14:23 Michael Haubenwallner
  0 siblings, 0 replies; only message in thread
From: Michael Haubenwallner @ 2017-09-26 14:23 UTC (permalink / raw
  To: gentoo-commits

commit:     b36ddafe5565410654a534a7d7a6ef6a6b6f3ab3
Author:     Michael Haubenwallner <haubi <AT> gentoo <DOT> org>
AuthorDate: Tue Sep 26 13:37:43 2017 +0000
Commit:     Michael Haubenwallner <haubi <AT> gentoo <DOT> org>
CommitDate: Tue Sep 26 14:23:10 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b36ddafe

dev-util/confix: support -no-undefined ltflag, drop dist-shar amflag

Package-Manager: Portage-2.3.8, Repoman-2.3.1

 dev-util/confix/confix-2.3.5-r3.ebuild             |  70 +++++++
 .../confix/files/confix-2.3.5-nodist-shar.patch    |  44 +++++
 .../files/confix-2.3.5-support-no_undefined.patch  | 213 +++++++++++++++++++++
 3 files changed, 327 insertions(+)

diff --git a/dev-util/confix/confix-2.3.5-r3.ebuild b/dev-util/confix/confix-2.3.5-r3.ebuild
new file mode 100644
index 00000000000..11af017cd57
--- /dev/null
+++ b/dev-util/confix/confix-2.3.5-r3.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+DISTUTILS_SINGLE_IMPL=1
+
+inherit distutils-r1
+
+DESCRIPTION="Confix: A Build Tool on Top of GNU Automake"
+HOMEPAGE="http://confix.sourceforge.net"
+SRC_URI="mirror://sourceforge/confix/Confix-${PV}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="2"
+KEYWORDS="~amd64 ~x86 ~ppc-aix ~x64-cygwin ~amd64-linux ~x86-linux ~sparc-solaris ~x86-solaris"
+IUSE=""
+
+DEPEND=""
+RDEPEND="dev-util/confix-wrapper
+	sys-devel/autoconf-archive
+	sys-devel/automake
+	sys-devel/libtool"
+
+S="${WORKDIR}/Confix-${PV}"
+
+PATCHES=( # find jni-include dirs on hpux.
+	"${FILESDIR}"/2.1.0/jni-hpux.patch
+	# add .exe extension to TESTS
+	"${FILESDIR}"/2.3.0/exeext.patch
+	# use external autoconf archive
+	"${FILESDIR}"/2.3.0/ext-ac-archive.patch
+	# link local libraries first.
+	"${FILESDIR}"/2.3.0/local-libs-first.patch
+	# don't use automake 1.9, but any newer too...
+	"${FILESDIR}"/2.3.0/new-automake.patch
+	# support -no-undefined libtool flag
+	"${FILESDIR}"/${P}-support-no_undefined.patch
+	# drop deprecated 'dist-shar' automake flag
+	"${FILESDIR}"/${P}-nodist-shar.patch
+)
+
+pkg_setup() {
+	python-single-r1_pkg_setup
+}
+
+pkg_preinst() {
+	local RV=2.3.0
+
+	if has_version "<dev-util/confix-${RV}"; then
+		einfo "After merging ${P} you might have to remerge all packages built"
+		einfo "with <dev-util/confix-${RV} in your EPREFIX to get all the"
+		einfo "repo files useable with current ${PN}".
+		ewarn
+		ewarn "Use this command (copy&paste) to identify packages built with confix"
+		ewarn "needing a remerge in your particular instance of Gentoo Prefix:"
+		ewarn
+		# use 'echo' to get this command from here:
+		ewarn "( cd \$(portageq envvar EPREFIX)/var/db/pkg || exit 1;" \
+			  "pattern=\$(cd ../../.. && echo \$(ls -d" \
+			  "usr/share/confix*/repo | grep -v confix-${RV}) |" \
+			  "sed -e 's, ,|,g'); if [[ -z \${pattern} ]]; then echo" \
+			  "'No more packages were built with broken Confix.'; exit 0;" \
+			  "fi; emerge --ask --oneshot \$(grep -lE \"(\${pattern})\"" \
+			  "*/*/CONTENTS | sed -e 's,^,>=,;s,/CONTENTS,,')" \
+			  ")"
+		ewarn
+	fi
+}

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
new file mode 100644
index 00000000000..bccc437de44
--- /dev/null
+++ b/dev-util/confix/files/confix-2.3.5-nodist-shar.patch
@@ -0,0 +1,44 @@
+------------------------------------------------------------------------
+r961 | mhaubi | 2017-09-26 15:34:00 +0200 (Tue, 26 Sep 2017) | 1 line
+
+drop 'dist-shar', deprecated by newer automake
+
+Index: doc/confix.texi
+===================================================================
+#--- doc/confix.texi	(revision 960)
+#+++ doc/confix.texi	(working copy)
+#@@ -992,9 +992,6 @@
+ @code{dist-bzip2} creates a @file{.tar.bz2} distribution.
+ 
+ @item
+-@code{dist-shar} creates a shell archive distribution.
+-
+-@item
+ @code{dist-zip} create a zip file (popular on Windows).
+ 
+ @item
+Index: libconfix/plugins/automake/out_automake.py
+===================================================================
+--- libconfix/plugins/automake/out_automake.py	(revision 960)
++++ libconfix/plugins/automake/out_automake.py	(working copy)
+@@ -175,7 +175,6 @@
+ 
+         # enable dist'ing in the following formats
+         self.makefile_am().add_automake_options('dist-bzip2')
+-        self.makefile_am().add_automake_options('dist-shar')
+         self.makefile_am().add_automake_options('dist-zip')
+ 
+ 
+Index: libconfix/plugins/automake/tests/output.py
+===================================================================
+--- libconfix/plugins/automake/tests/output.py	(revision 960)
++++ libconfix/plugins/automake/tests/output.py	(working copy)
+@@ -146,7 +146,7 @@
+ 
+         self.failUnless('1.9' in rootdir_automake_builder.makefile_am().automake_options())
+         self.failUnless('dist-bzip2' in rootdir_automake_builder.makefile_am().automake_options())
+-        self.failUnless('dist-shar' in rootdir_automake_builder.makefile_am().automake_options())
++        self.failUnless('dist-shar' not in rootdir_automake_builder.makefile_am().automake_options())
+         self.failUnless('dist-zip' in rootdir_automake_builder.makefile_am().automake_options())
+         self.failUnless(const.CONFIX2_DIR in rootdir_automake_builder.makefile_am().extra_dist())
+         self.failUnless(const.CONFIX2_PKG in rootdir_automake_builder.makefile_am().extra_dist())

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
new file mode 100644
index 00000000000..a6ffaae89c9
--- /dev/null
+++ b/dev-util/confix/files/confix-2.3.5-support-no_undefined.patch
@@ -0,0 +1,213 @@
+------------------------------------------------------------------------
+r960 | mhaubi | 2017-09-26 14:51:18 +0200 (Tue, 26 Sep 2017) | 10 lines
+
+add 'has_undefined_symbols' property for libraries
+
+Windows does not support undefined symbols in shared libraries,
+so libtool refuses to create DLLs without the -no-undefined flag.
+
+Adding explicit HAS_UNDEFINED_SYMBOLS(False) api call per library,
+and the optional (has_undefined_symbols=False) argument to AutoC().
+
+For backwards compatibility, default is (has_undefined_symbols=True).
+
+------------------------------------------------------------------------
+Index: libconfix/plugins/automake/c/out_c.py
+===================================================================
+--- libconfix/plugins/automake/c/out_c.py	(revision 959)
++++ libconfix/plugins/automake/c/out_c.py	(revision 960)
+@@ -487,6 +487,9 @@
+                 elif b.default_version() is not None:
+                     automake_output_builder.makefile_am().add_compound_ldflags(automakelibname, '-release '+b.default_version())
+                     pass
++                if b.has_undefined_symbols() is False:
++                    automake_output_builder.makefile_am().add_compound_ldflags(automakelibname, '-no-undefined')
++                    pass
+                 pass
+             else:
+                 automake_output_builder.configure_ac().add_paragraph(
+Index: libconfix/plugins/c/clusterer.py
+===================================================================
+--- libconfix/plugins/c/clusterer.py	(revision 959)
++++ libconfix/plugins/c/clusterer.py	(revision 960)
+@@ -33,7 +33,7 @@
+ import types
+ 
+ class CClustererSetup(Setup):
+-    def __init__(self, linkednamefinder=None):
++    def __init__(self, linkednamefinder=None, has_undefined_symbols=True):
+         assert linkednamefinder is None or isinstance(linkednamefinder, NameFinder)
+         Setup.__init__(self)
+         if linkednamefinder is None:
+@@ -41,10 +41,11 @@
+         else:
+             self.__namefinder = linkednamefinder
+             pass
++        self.__has_undefined_symbols = has_undefined_symbols
+         pass
+ 
+     def setup(self, dirbuilder):
+-        clusterer = CClusterer(namefinder=self.__namefinder)
++        clusterer = CClusterer(namefinder=self.__namefinder, has_undefined_symbols=self.__has_undefined_symbols)
+         dirbuilder.add_builder(clusterer)
+         dirbuilder.add_interface(CClustererInterfaceProxy(clusterer=clusterer))
+         pass
+@@ -51,11 +52,12 @@
+     pass
+ 
+ class CClusterer(Builder):
+-    def __init__(self, namefinder):
++    def __init__(self, namefinder, has_undefined_symbols=True):
+         Builder.__init__(self)
+         self.__namefinder = namefinder
+         self.__libname = None
+         self.__libtool_version_info = None
++        self.__has_undefined_symbols = has_undefined_symbols
+         pass
+ 
+     def shortname(self):
+@@ -85,6 +87,15 @@
+             pass
+         pass
+ 
++    def set_has_undefined_symbols(self, has_undefined_symbols):
++        self.__has_undefined_symbols = has_undefined_symbols
++        for builder in self.parentbuilder().iter_builders():
++            if isinstance(builder, LibraryBuilder):
++                builder.set_has_undefined_symbols(has_undefined_symbols)
++                break
++            pass
++        pass
++
+     def enlarge(self):
+         super(CClusterer, self).enlarge()
+ 
+@@ -163,7 +174,8 @@
+             LibraryBuilder(
+                 basename=libname,
+                 version=self.__libtool_version_info,
+-                default_version=self.package().version()))
++                default_version=self.package().version(),
++                has_undefined_symbols=self.__has_undefined_symbols))
+         for b in itertools.chain(nomain_builders, header_builders):
+             library.add_member(b)
+             pass
+@@ -229,6 +241,13 @@
+             pass
+         self.__clusterer.set_libtool_version_info(version)
+         pass
++
++    def HAS_UNDEFINED_SYMBOLS(self, has_undefined_symbols):
++        if type(has_undefined_symbols) is not types.BooleanType:
++            raise Error("HAS_UNDEFINED_SYMBOLS(): 'has_undefined_symbols' argument must be a boolean")
++        self.__clusterer.set_has_undefined_symbols(has_undefined_symbols)
++        pass
++
+     pass
+ 
+ class NameFinder:
+Index: libconfix/plugins/c/explicit_iface.py
+===================================================================
+--- libconfix/plugins/c/explicit_iface.py	(revision 959)
++++ libconfix/plugins/c/explicit_iface.py	(revision 960)
+@@ -104,7 +104,7 @@
+         self.__dirbuilder.add_builder(yacc)
+         return yacc
+ 
+-    def LIBRARY(self, members, basename=None, version=None):
++    def LIBRARY(self, members, basename=None, version=None, undefined_symbols=True):
+         the_basename = basename
+         if the_basename is None:
+             the_basename=LongNameFinder().find_libname(
+@@ -113,7 +113,8 @@
+             pass
+         library = LibraryBuilder(basename=the_basename,
+                                  version=version,
+-                                 default_version=self.__dirbuilder.package().version())
++                                 default_version=self.__dirbuilder.package().version(),
++                                 has_undefined_symbols=undefined_symbols)
+         for m in members:
+             library.add_member(m)
+             pass
+Index: libconfix/plugins/c/library.py
+===================================================================
+--- libconfix/plugins/c/library.py	(revision 959)
++++ libconfix/plugins/c/library.py	(revision 960)
+@@ -25,7 +25,8 @@
+     def __init__(self,
+                  basename,
+                  version,
+-                 default_version):
++                 default_version,
++                 has_undefined_symbols):
+ 
+         # library version. passed to libtool as "-version-info
+         # <current>:<revision>:<age>", for example.
+@@ -40,6 +41,7 @@
+         self.__basename = basename
+         self.__version = version
+         self.__default_version = default_version
++        self.__has_undefined_symbols = has_undefined_symbols
+ 
+         self.__buildinfo_added = False
+         
+@@ -82,6 +84,10 @@
+         super(LibraryBuilder, self).force_enlarge()
+         pass
+ 
++    def set_has_undefined_symbols(self, has_undefined_symbols):
++        self.__has_undefined_symbols = has_undefined_symbols
++        pass
++
+     def version(self):
+         return self.__version
+ 
+@@ -88,4 +94,7 @@
+     def default_version(self):
+         return self.__default_version
+ 
++    def has_undefined_symbols(self):
++        return self.__has_undefined_symbols
++
+     pass
+Index: libconfix/plugins/c/setups/default_setup.py
+===================================================================
+--- libconfix/plugins/c/setups/default_setup.py	(revision 959)
++++ libconfix/plugins/c/setups/default_setup.py	(revision 960)
+@@ -25,8 +25,8 @@
+ 
+ from libconfix.core.machinery.setup import CompositeSetup
+ 
+-def make_core_setups(linkednamefinder):
+-    return [CClustererSetup(linkednamefinder=linkednamefinder),
++def make_core_setups(linkednamefinder, has_undefined_symbols):
++    return [CClustererSetup(linkednamefinder=linkednamefinder, has_undefined_symbols=has_undefined_symbols),
+             CCreatorSetup(),
+             CommonInterfaceSetup(),
+             RelocatedHeadersSetup(),
+@@ -34,8 +34,9 @@
+ 
+ class DefaultCSetup(CompositeSetup):
+     def __init__(self,
+-                 linkednamefinder=None):
+-        setups = make_core_setups(linkednamefinder=linkednamefinder)
++                 linkednamefinder=None,
++                 has_undefined_symbols=True):
++        setups = make_core_setups(linkednamefinder=linkednamefinder, has_undefined_symbols=has_undefined_symbols)
+         setups.append(ImplicitInterfaceSetup())
+         CompositeSetup.__init__(
+             self,
+Index: libconfix/setups/c.py
+===================================================================
+--- libconfix/setups/c.py	(revision 959)
++++ libconfix/setups/c.py	(revision 960)
+@@ -26,7 +26,7 @@
+     pass
+ 
+ class AutoC(CompositeSetup):
+-    def __init__(self, libnamefinder=None):
+-        CompositeSetup.__init__(self, [DefaultCSetup(libnamefinder)])
++    def __init__(self, libnamefinder=None, has_undefined_symbols=True):
++        CompositeSetup.__init__(self, [DefaultCSetup(libnamefinder, has_undefined_symbols=has_undefined_symbols)])
+         pass
+     pass


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2017-09-26 14:23 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-26 14:23 [gentoo-commits] repo/gentoo:master commit in: dev-util/confix/files/, dev-util/confix/ Michael Haubenwallner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox