From d19a7f9d9ba8362f9e12a28805957bf17c0b6cb2 Mon Sep 17 00:00:00 2001 From: Sam James Date: Sun, 10 Oct 2021 23:57:25 +0100 Subject: dev-libs/isl: respect CFLAGS Drop the fun (and aggressive) AX_CC_MAXOPT macro call which was causing us to not respect the user's CFLAGS. Note that 0.24 seemed to be triggering maintainer mode; have chucked eautoreconf into the ebuild for 0.24-r1 given it seemingly wasn't doing any harm to be doing it informally in 0.24 anyway, but will keep an eye on it. Revbump because of the aforementioned churn in a critical dependency. Bug: https://bugs.gentoo.org/815700 Signed-off-by: Sam James --- dev-libs/isl/files/isl-0.24-gdb-autoload-dir.patch | 35 ++++++++++ dev-libs/isl/files/isl-0.24-respect-flags.patch | 14 ++++ dev-libs/isl/isl-0.24-r1.ebuild | 80 ++++++++++++++++++++++ dev-libs/isl/isl-0.24.ebuild | 6 +- 4 files changed, 133 insertions(+), 2 deletions(-) create mode 100644 dev-libs/isl/files/isl-0.24-gdb-autoload-dir.patch create mode 100644 dev-libs/isl/files/isl-0.24-respect-flags.patch create mode 100644 dev-libs/isl/isl-0.24-r1.ebuild (limited to 'dev-libs') diff --git a/dev-libs/isl/files/isl-0.24-gdb-autoload-dir.patch b/dev-libs/isl/files/isl-0.24-gdb-autoload-dir.patch new file mode 100644 index 000000000000..6751d5755fbe --- /dev/null +++ b/dev-libs/isl/files/isl-0.24-gdb-autoload-dir.patch @@ -0,0 +1,35 @@ +diff -Naur isl-0.19.orig/Makefile.in isl-0.19/Makefile.in +--- isl-0.19.orig/Makefile.in 2018-03-03 11:32:15.000000000 -0500 ++++ isl-0.19/Makefile.in 2018-03-10 17:29:30.039182728 -0500 +@@ -2269,10 +2269,10 @@ + case $$libisl in \ + '') echo Cannot find isl library name. GDB bindings not installed.;; \ + *) echo $(INSTALL_DATA) $(srcdir)/libisl-gdb.py \ +- $(DESTDIR)$(libdir)/$$libisl-gdb.py; \ +- test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"; \ ++ $(DESTDIR)$(prefix)/share/gdb/auto-load$(libdir)/$$libisl-gdb.py; \ ++ test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(prefix)/share/gdb/auto-load$(libdir)"; \ + $(INSTALL_DATA) $(srcdir)/libisl-gdb.py \ +- $(DESTDIR)$(libdir)/$$libisl-gdb.py; \ ++ $(DESTDIR)$(prefix)/share/gdb/auto-load$(libdir)/$$libisl-gdb.py; \ + esac + + uninstall-local: +diff --git a/Makefile.am b/Makefile.am +index 96cac65..8bb6aa2 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -639,10 +639,10 @@ install-data-local: $(srcdir)/libisl-gdb.py + case $$libisl in \ + '') echo Cannot find isl library name. GDB bindings not installed.;; \ + *) echo $(INSTALL_DATA) $(srcdir)/libisl-gdb.py \ +- $(DESTDIR)$(libdir)/$$libisl-gdb.py; \ +- test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"; \ ++ $(DESTDIR)$(prefix)/share/gdb/auto-load$(libdir)/$$libisl-gdb.py; \ ++ test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(prefix)/share/gdb/auto-load$(libdir)"; \ + $(INSTALL_DATA) $(srcdir)/libisl-gdb.py \ +- $(DESTDIR)$(libdir)/$$libisl-gdb.py; \ ++ $(DESTDIR)$(prefix)/share/gdb/auto-load$(libdir)/$$libisl-gdb.py; \ + esac + + uninstall-local: diff --git a/dev-libs/isl/files/isl-0.24-respect-flags.patch b/dev-libs/isl/files/isl-0.24-respect-flags.patch new file mode 100644 index 000000000000..e00748b24330 --- /dev/null +++ b/dev-libs/isl/files/isl-0.24-respect-flags.patch @@ -0,0 +1,14 @@ +https://bugs.gentoo.org/815700 + +--- a/configure.ac ++++ b/configure.ac +@@ -22,7 +22,6 @@ AC_PROG_CC + AC_PROG_CXX + AX_PROG_CC_FOR_BUILD + +-AX_CC_MAXOPT + AX_GCC_WARN_UNUSED_RESULT + AX_C___ATTRIBUTE__ + +-- + diff --git a/dev-libs/isl/isl-0.24-r1.ebuild b/dev-libs/isl/isl-0.24-r1.ebuild new file mode 100644 index 000000000000..17e0ea9fca57 --- /dev/null +++ b/dev-libs/isl/isl-0.24-r1.ebuild @@ -0,0 +1,80 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit autotools multilib-minimal preserve-libs toolchain-funcs + +DESCRIPTION="A library for manipulating integer points bounded by linear constraints" +HOMEPAGE="http://isl.gforge.inria.fr/" +SRC_URI="http://isl.gforge.inria.fr/${P}.tar.xz" + +LICENSE="LGPL-2.1" +SLOT="0/23" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="static-libs" + +RDEPEND=">=dev-libs/gmp-5.1.3-r1[${MULTILIB_USEDEP}]" +DEPEND="${RDEPEND}" +BDEPEND=" + app-arch/xz-utils + virtual/pkgconfig" + +DOCS=( ChangeLog AUTHORS doc/manual.pdf ) + +PATCHES=( + "${FILESDIR}"/${PN}-0.24-gdb-autoload-dir.patch + "${FILESDIR}"/${PN}-0.24-nobash.patch + "${FILESDIR}"/${PN}-0.24-respect-flags.patch +) + +src_prepare() { + default + + eautoreconf +} + +multilib_src_configure() { + local econf_opts=( + $(use_enable static-libs static) + + # AX_PROG_CC_FOR_BUILD deficiency: + # https://wiki.gentoo.org/wiki/Project:Toolchain/use_native_symlinks + CC_FOR_BUILD="$(tc-getBUILD_CC)" + ) + + if ! tc-is-cross-compiler; then + # Incorrect CFLAGS handling as CFLAGS_FOR_BUILD + # even for native builds. As a result -O3 is being used + # regardless of user's CFLAGS. + econf_opts+=( + CFLAGS_FOR_BUILD="${CFLAGS}" + ) + fi + + ECONF_SOURCE="${S}" econf "${econf_opts[@]}" +} + +multilib_src_install_all() { + einstalldocs + + find "${ED}" -type f -name '*.la' -delete || die +} + +pkg_preinst() { + preserve_old_lib \ + /usr/$(get_libdir)/libisl$(get_libname 14) \ + /usr/$(get_libdir)/libisl$(get_libname 15) \ + /usr/$(get_libdir)/libisl$(get_libname 19) \ + /usr/$(get_libdir)/libisl$(get_libname 21) \ + /usr/$(get_libdir)/libisl$(get_libname 22) +} + +pkg_postinst() { + preserve_old_lib_notify \ + /usr/$(get_libdir)/libisl$(get_libname 14) \ + /usr/$(get_libdir)/libisl$(get_libname 15) \ + /usr/$(get_libdir)/libisl$(get_libname 19) \ + /usr/$(get_libdir)/libisl$(get_libname 21) \ + /usr/$(get_libdir)/libisl$(get_libname 22) +} diff --git a/dev-libs/isl/isl-0.24.ebuild b/dev-libs/isl/isl-0.24.ebuild index 9b5ae94248d8..ad2782f9d7ce 100644 --- a/dev-libs/isl/isl-0.24.ebuild +++ b/dev-libs/isl/isl-0.24.ebuild @@ -1,7 +1,7 @@ # Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI="7" +EAPI=7 inherit multilib-minimal preserve-libs toolchain-funcs @@ -35,6 +35,7 @@ multilib_src_configure() { # https://wiki.gentoo.org/wiki/Project:Toolchain/use_native_symlinks CC_FOR_BUILD="$(tc-getBUILD_CC)" ) + if ! tc-is-cross-compiler; then # Incorrect CFLAGS handling as CFLAGS_FOR_BUILD # even for native builds. As a result -O3 is being used @@ -49,7 +50,8 @@ multilib_src_configure() { multilib_src_install_all() { einstalldocs - find "${ED}" -type f -name '*.la' -delete + + find "${ED}" -type f -name '*.la' -delete || die } pkg_preinst() { -- cgit v1.2.3-65-gdbad