summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2021-11-07 07:08:06 +0000
committerSam James <sam@gentoo.org>2021-11-07 07:08:48 +0000
commit21ea66b26eea2572564d1de7ab047ab573c57d69 (patch)
tree8314d702b52afbcd340d8b9e0725e45dac7f72d7 /dev-embedded
parentdev-ml/labltk: backport warnings patch to 8.06.10 (diff)
downloadgentoo-21ea66b26eea2572564d1de7ab047ab573c57d69.tar.gz
gentoo-21ea66b26eea2572564d1de7ab047ab573c57d69.tar.bz2
gentoo-21ea66b26eea2572564d1de7ab047ab573c57d69.zip
dev-embedded/gputils: update EAPI 6 -> 8, respect *FLAGS (really disable gold)
Closes: https://bugs.gentoo.org/722648 Closes: https://bugs.gentoo.org/818802 Fixes: 3b63fda8bb810ac60d85ed7f7649c61906f72f98 Thanks-to: Ionen Wolkens <ionen@gentoo.org> (noticing bonehead change previously) Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-embedded')
-rw-r--r--dev-embedded/gputils/files/gputils-1.5.0-respect-flags.patch123
-rw-r--r--dev-embedded/gputils/gputils-1.5.0.ebuild26
2 files changed, 141 insertions, 8 deletions
diff --git a/dev-embedded/gputils/files/gputils-1.5.0-respect-flags.patch b/dev-embedded/gputils/files/gputils-1.5.0-respect-flags.patch
new file mode 100644
index 000000000000..01d13dedab0f
--- /dev/null
+++ b/dev-embedded/gputils/files/gputils-1.5.0-respect-flags.patch
@@ -0,0 +1,123 @@
+https://sourceforge.net/p/gputils/code/1288
+https://bugs.gentoo.org/722648
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -160,29 +160,41 @@
+ AC_CHECK_FUNCS(strndup, , [IBERTYOBJS="$IBERTYOBJS strndup.o"])
+ AC_CHECK_FUNCS(strverscmp, , [IBERTYOBJS="$IBERTYOBJS strverscmp.o"])
+
+-AM_CFLAGS=
++VERSION_MAJOR=`echo $PACKAGE_VERSION | $AWK 'BEGIN {FS="."} {print $1}'`
++VERSION_MINOR=`echo $PACKAGE_VERSION | $AWK 'BEGIN {FS="."} {print $2}'`
++VERSION_MICRO=`echo $PACKAGE_VERSION | $AWK 'BEGIN {FS="."} {print $3}'`
++
++AC_DEFINE_UNQUOTED(GPUTILS_VERSION_MAJOR, $VERSION_MAJOR, [gputils major version number])
++AC_DEFINE_UNQUOTED(GPUTILS_VERSION_MINOR, $VERSION_MINOR, [gputils minor version number])
++AC_DEFINE_UNQUOTED(GPUTILS_VERSION_MICRO, $VERSION_MICRO, [gputils micro version number])
++AC_DEFINE_UNQUOTED(GPUTILS_VERSION_STR, "$PACKAGE_VERSION", [gputils version string])
++
++AM_GPUTILS_SVN_VERSION="\$(shell \$(top_srcdir)/get_cl_revision.sh \$(top_srcdir)/ChangeLog)"
++AM_PACKAGE_SVN_VERSION=`./get_cl_revision.sh ChangeLog`
++
++AM_CFLAGS="-DGPUTILS_SVN_VERSION=\$(AM_GPUTILS_SVN_VERSION)"
+ AM_LDFLAGS=
+
+ # Options for the system on which the package will run.
+ case "${host}" in
+ *cygwin* )
+ if test "x$GCC" = "xyes"; then
+- AM_CFLAGS="-Wall -pedantic"
++ AM_CFLAGS="$AM_CFLAGS -Wall -pedantic"
+ AM_LDFLAGS="-Wl,-warn-common -Wl,-warn-once"
+ fi
+ ;;
+ *darwin* )
+ if test "x$CC" = "xclang"; then
+- AM_CFLAGS="-Wall -pedantic -Wformat -Wtautological-compare -Wimplicit-function-declaration -Wformat-security"
++ AM_CFLAGS="$AM_CFLAGS -Wall -pedantic -Wformat -Wtautological-compare -Wimplicit-function-declaration -Wformat-security"
+ fi
+ ;;
+ *linux* )
+ if test "x$CC" = "xclang"; then
+- AM_CFLAGS="-Wall -pedantic -Wformat -Wtautological-compare -Wimplicit-function-declaration -Wformat-security"
++ AM_CFLAGS="$AM_CFLAGS -Wall -pedantic -Wformat -Wtautological-compare -Wimplicit-function-declaration -Wformat-security"
+ AM_LDFLAGS="-Wl,-warn-common -Wl,-warn-once"
+ else
+ if test "x$GCC" = "xyes"; then
+- AM_CFLAGS="-Wall -pedantic -Wformat -Wimplicit-function-declaration -Wformat-security"
++ AM_CFLAGS="$AM_CFLAGS -Wall -pedantic -Wformat -Wimplicit-function-declaration -Wformat-security"
+ AM_LDFLAGS="-Wl,-warn-common -Wl,-warn-once"
+ fi
+ fi
+@@ -192,33 +204,20 @@
+ *-pc-os2_emx | *-pc-os2-emx )
+ EXEEXT=".exe"
+ if test "x$GCC" = "xyes"; then
+- AM_CFLAGS="-Zcrtdll"
++ AM_CFLAGS="$AM_CFLAGS -Zcrtdll"
+ fi
+ ;;
+ *sun* )
+ # sunos cc needs the -xCC flag for // comments
+ if test "x$GCC" != "xyes"; then
+- AM_CFLAGS="-xCC"
++ AM_CFLAGS="$AM_CFLAGS -xCC"
+ fi
+ ;;
+ esac
+-
+-VERSION_MAJOR=`echo $PACKAGE_VERSION | $AWK 'BEGIN {FS="."} {print $1}'`
+-VERSION_MINOR=`echo $PACKAGE_VERSION | $AWK 'BEGIN {FS="."} {print $2}'`
+-VERSION_MICRO=`echo $PACKAGE_VERSION | $AWK 'BEGIN {FS="."} {print $3}'`
+-
+-AC_DEFINE_UNQUOTED(GPUTILS_VERSION_MAJOR, $VERSION_MAJOR, [gputils major version number])
+-AC_DEFINE_UNQUOTED(GPUTILS_VERSION_MINOR, $VERSION_MINOR, [gputils minor version number])
+-AC_DEFINE_UNQUOTED(GPUTILS_VERSION_MICRO, $VERSION_MICRO, [gputils micro version number])
+-AC_DEFINE_UNQUOTED(GPUTILS_VERSION_STR, "$PACKAGE_VERSION", [gputils version string])
+-
+-AM_GPUTILS_SVN_VERSION="\$(shell \$(top_srcdir)/get_cl_revision.sh \$(top_srcdir)/ChangeLog)"
+-AM_PACKAGE_SVN_VERSION=`./get_cl_revision.sh ChangeLog`
+-CFLAGS="-DGPUTILS_SVN_VERSION=\$(AM_GPUTILS_SVN_VERSION)"
+
+ # Host filesystem options.
+ case "${host}" in
+- *mingw* | *-pc-os2_emx | *-pc-os2-emx | *djgpp*)
++ *mingw* | *-pc-os2_emx | *-pc-os2-emx | *djgpp* )
+ AC_DEFINE(HAVE_DOS_BASED_FILE_SYSTEM, 1,
+ [Define if your host uses a DOS based file system.])
+ ;;
+@@ -231,15 +230,13 @@
+ fi
+
+ if test x$enable_gdb_debuginfo = xyes; then
+- CFLAGS="$CFLAGS -ggdb"
++ AM_CFLAGS="$AM_CFLAGS -ggdb"
+ fi
+
+ if test x$enable_gputils_path = xyes; then
+ AC_DEFINE(USE_DEFAULT_PATHS, 1,
+ [Define if you want to add default search paths.])
+ fi
+-
+-LDFLAGS=
+
+ # Substitute configuration variables.
+ AC_SUBST(ENABLE_HTML_DOC)
+@@ -248,8 +245,6 @@
+ AC_SUBST(AM_PACKAGE_SVN_VERSION)
+ AC_SUBST(AM_CFLAGS)
+ AC_SUBST(AM_LDFLAGS)
+-AC_SUBST(CFLAGS)
+-AC_SUBST(LDFLAGS)
+ AC_SUBST(GPUTILS_HEADER_PATH)
+ AC_SUBST(GPUTILS_LKR_PATH)
+ AC_SUBST(GPUTILS_LIB_PATH)
+@@ -301,6 +296,7 @@
+ Source directory: $srcdir
+ Installation prefix: $prefix
+ C compiler: $CC $AM_CFLAGS $CFLAGS
++ C linker: $CC $AM_LDFLAGS
+ Location of MPLAB-X: $DEFAULT_MPLABX_PATH
+
+ ])
diff --git a/dev-embedded/gputils/gputils-1.5.0.ebuild b/dev-embedded/gputils/gputils-1.5.0.ebuild
index 54b186ff608a..651af5d9d704 100644
--- a/dev-embedded/gputils/gputils-1.5.0.ebuild
+++ b/dev-embedded/gputils/gputils-1.5.0.ebuild
@@ -1,9 +1,9 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
+EAPI=8
-inherit toolchain-funcs
+inherit autotools toolchain-funcs
DESCRIPTION="Tools including assembler, linker and librarian for PIC microcontrollers"
HOMEPAGE="https://gputils.sourceforge.io"
@@ -12,20 +12,30 @@ SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64 ppc ppc64 x86"
-IUSE=""
-src_configure() {
- # bug #818802
- tc-ld-is-gold && tc-ld-force-bfd
- #tc-ld-disable-gold #369291
+PATCHES=(
+ "${FILESDIR}/flags.patch"
+)
+
+src_prepare() {
+ default
+
+ eautoreconf
+}
+
+src_compile() {
+ # bug #369291, bug #818802
+ tc-ld-disable-gold
# Their configure script tries to do funky things with default
# compiler selection. Force our own defaults instead.
tc-export CC
- default
+
+ econf
}
src_install() {
default
+
dodoc doc/gputils.pdf
}