Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-embedded/gputils/, dev-embedded/gputils/files/
Date: Sun, 07 Nov 2021 07:09:10
Message-Id: 1636268928.21ea66b26eea2572564d1de7ab047ab573c57d69.sam@gentoo
1 commit: 21ea66b26eea2572564d1de7ab047ab573c57d69
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Sun Nov 7 07:08:06 2021 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Sun Nov 7 07:08:48 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=21ea66b2
7
8 dev-embedded/gputils: update EAPI 6 -> 8, respect *FLAGS (really disable gold)
9
10 Closes: https://bugs.gentoo.org/722648
11 Closes: https://bugs.gentoo.org/818802
12 Fixes: 3b63fda8bb810ac60d85ed7f7649c61906f72f98
13 Thanks-to: Ionen Wolkens <ionen <AT> gentoo.org> (noticing bonehead change previously)
14 Signed-off-by: Sam James <sam <AT> gentoo.org>
15
16 .../files/gputils-1.5.0-respect-flags.patch | 123 +++++++++++++++++++++
17 dev-embedded/gputils/gputils-1.5.0.ebuild | 26 +++--
18 2 files changed, 141 insertions(+), 8 deletions(-)
19
20 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
21 new file mode 100644
22 index 00000000000..01d13dedab0
23 --- /dev/null
24 +++ b/dev-embedded/gputils/files/gputils-1.5.0-respect-flags.patch
25 @@ -0,0 +1,123 @@
26 +https://sourceforge.net/p/gputils/code/1288
27 +https://bugs.gentoo.org/722648
28 +
29 +--- a/configure.ac
30 ++++ b/configure.ac
31 +@@ -160,29 +160,41 @@
32 + AC_CHECK_FUNCS(strndup, , [IBERTYOBJS="$IBERTYOBJS strndup.o"])
33 + AC_CHECK_FUNCS(strverscmp, , [IBERTYOBJS="$IBERTYOBJS strverscmp.o"])
34 +
35 +-AM_CFLAGS=
36 ++VERSION_MAJOR=`echo $PACKAGE_VERSION | $AWK 'BEGIN {FS="."} {print $1}'`
37 ++VERSION_MINOR=`echo $PACKAGE_VERSION | $AWK 'BEGIN {FS="."} {print $2}'`
38 ++VERSION_MICRO=`echo $PACKAGE_VERSION | $AWK 'BEGIN {FS="."} {print $3}'`
39 ++
40 ++AC_DEFINE_UNQUOTED(GPUTILS_VERSION_MAJOR, $VERSION_MAJOR, [gputils major version number])
41 ++AC_DEFINE_UNQUOTED(GPUTILS_VERSION_MINOR, $VERSION_MINOR, [gputils minor version number])
42 ++AC_DEFINE_UNQUOTED(GPUTILS_VERSION_MICRO, $VERSION_MICRO, [gputils micro version number])
43 ++AC_DEFINE_UNQUOTED(GPUTILS_VERSION_STR, "$PACKAGE_VERSION", [gputils version string])
44 ++
45 ++AM_GPUTILS_SVN_VERSION="\$(shell \$(top_srcdir)/get_cl_revision.sh \$(top_srcdir)/ChangeLog)"
46 ++AM_PACKAGE_SVN_VERSION=`./get_cl_revision.sh ChangeLog`
47 ++
48 ++AM_CFLAGS="-DGPUTILS_SVN_VERSION=\$(AM_GPUTILS_SVN_VERSION)"
49 + AM_LDFLAGS=
50 +
51 + # Options for the system on which the package will run.
52 + case "${host}" in
53 + *cygwin* )
54 + if test "x$GCC" = "xyes"; then
55 +- AM_CFLAGS="-Wall -pedantic"
56 ++ AM_CFLAGS="$AM_CFLAGS -Wall -pedantic"
57 + AM_LDFLAGS="-Wl,-warn-common -Wl,-warn-once"
58 + fi
59 + ;;
60 + *darwin* )
61 + if test "x$CC" = "xclang"; then
62 +- AM_CFLAGS="-Wall -pedantic -Wformat -Wtautological-compare -Wimplicit-function-declaration -Wformat-security"
63 ++ AM_CFLAGS="$AM_CFLAGS -Wall -pedantic -Wformat -Wtautological-compare -Wimplicit-function-declaration -Wformat-security"
64 + fi
65 + ;;
66 + *linux* )
67 + if test "x$CC" = "xclang"; then
68 +- AM_CFLAGS="-Wall -pedantic -Wformat -Wtautological-compare -Wimplicit-function-declaration -Wformat-security"
69 ++ AM_CFLAGS="$AM_CFLAGS -Wall -pedantic -Wformat -Wtautological-compare -Wimplicit-function-declaration -Wformat-security"
70 + AM_LDFLAGS="-Wl,-warn-common -Wl,-warn-once"
71 + else
72 + if test "x$GCC" = "xyes"; then
73 +- AM_CFLAGS="-Wall -pedantic -Wformat -Wimplicit-function-declaration -Wformat-security"
74 ++ AM_CFLAGS="$AM_CFLAGS -Wall -pedantic -Wformat -Wimplicit-function-declaration -Wformat-security"
75 + AM_LDFLAGS="-Wl,-warn-common -Wl,-warn-once"
76 + fi
77 + fi
78 +@@ -192,33 +204,20 @@
79 + *-pc-os2_emx | *-pc-os2-emx )
80 + EXEEXT=".exe"
81 + if test "x$GCC" = "xyes"; then
82 +- AM_CFLAGS="-Zcrtdll"
83 ++ AM_CFLAGS="$AM_CFLAGS -Zcrtdll"
84 + fi
85 + ;;
86 + *sun* )
87 + # sunos cc needs the -xCC flag for // comments
88 + if test "x$GCC" != "xyes"; then
89 +- AM_CFLAGS="-xCC"
90 ++ AM_CFLAGS="$AM_CFLAGS -xCC"
91 + fi
92 + ;;
93 + esac
94 +-
95 +-VERSION_MAJOR=`echo $PACKAGE_VERSION | $AWK 'BEGIN {FS="."} {print $1}'`
96 +-VERSION_MINOR=`echo $PACKAGE_VERSION | $AWK 'BEGIN {FS="."} {print $2}'`
97 +-VERSION_MICRO=`echo $PACKAGE_VERSION | $AWK 'BEGIN {FS="."} {print $3}'`
98 +-
99 +-AC_DEFINE_UNQUOTED(GPUTILS_VERSION_MAJOR, $VERSION_MAJOR, [gputils major version number])
100 +-AC_DEFINE_UNQUOTED(GPUTILS_VERSION_MINOR, $VERSION_MINOR, [gputils minor version number])
101 +-AC_DEFINE_UNQUOTED(GPUTILS_VERSION_MICRO, $VERSION_MICRO, [gputils micro version number])
102 +-AC_DEFINE_UNQUOTED(GPUTILS_VERSION_STR, "$PACKAGE_VERSION", [gputils version string])
103 +-
104 +-AM_GPUTILS_SVN_VERSION="\$(shell \$(top_srcdir)/get_cl_revision.sh \$(top_srcdir)/ChangeLog)"
105 +-AM_PACKAGE_SVN_VERSION=`./get_cl_revision.sh ChangeLog`
106 +-CFLAGS="-DGPUTILS_SVN_VERSION=\$(AM_GPUTILS_SVN_VERSION)"
107 +
108 + # Host filesystem options.
109 + case "${host}" in
110 +- *mingw* | *-pc-os2_emx | *-pc-os2-emx | *djgpp*)
111 ++ *mingw* | *-pc-os2_emx | *-pc-os2-emx | *djgpp* )
112 + AC_DEFINE(HAVE_DOS_BASED_FILE_SYSTEM, 1,
113 + [Define if your host uses a DOS based file system.])
114 + ;;
115 +@@ -231,15 +230,13 @@
116 + fi
117 +
118 + if test x$enable_gdb_debuginfo = xyes; then
119 +- CFLAGS="$CFLAGS -ggdb"
120 ++ AM_CFLAGS="$AM_CFLAGS -ggdb"
121 + fi
122 +
123 + if test x$enable_gputils_path = xyes; then
124 + AC_DEFINE(USE_DEFAULT_PATHS, 1,
125 + [Define if you want to add default search paths.])
126 + fi
127 +-
128 +-LDFLAGS=
129 +
130 + # Substitute configuration variables.
131 + AC_SUBST(ENABLE_HTML_DOC)
132 +@@ -248,8 +245,6 @@
133 + AC_SUBST(AM_PACKAGE_SVN_VERSION)
134 + AC_SUBST(AM_CFLAGS)
135 + AC_SUBST(AM_LDFLAGS)
136 +-AC_SUBST(CFLAGS)
137 +-AC_SUBST(LDFLAGS)
138 + AC_SUBST(GPUTILS_HEADER_PATH)
139 + AC_SUBST(GPUTILS_LKR_PATH)
140 + AC_SUBST(GPUTILS_LIB_PATH)
141 +@@ -301,6 +296,7 @@
142 + Source directory: $srcdir
143 + Installation prefix: $prefix
144 + C compiler: $CC $AM_CFLAGS $CFLAGS
145 ++ C linker: $CC $AM_LDFLAGS
146 + Location of MPLAB-X: $DEFAULT_MPLABX_PATH
147 +
148 + ])
149
150 diff --git a/dev-embedded/gputils/gputils-1.5.0.ebuild b/dev-embedded/gputils/gputils-1.5.0.ebuild
151 index 54b186ff608..651af5d9d70 100644
152 --- a/dev-embedded/gputils/gputils-1.5.0.ebuild
153 +++ b/dev-embedded/gputils/gputils-1.5.0.ebuild
154 @@ -1,9 +1,9 @@
155 # Copyright 1999-2021 Gentoo Authors
156 # Distributed under the terms of the GNU General Public License v2
157
158 -EAPI=6
159 +EAPI=8
160
161 -inherit toolchain-funcs
162 +inherit autotools toolchain-funcs
163
164 DESCRIPTION="Tools including assembler, linker and librarian for PIC microcontrollers"
165 HOMEPAGE="https://gputils.sourceforge.io"
166 @@ -12,20 +12,30 @@ SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
167 LICENSE="GPL-2"
168 SLOT="0"
169 KEYWORDS="amd64 ppc ppc64 x86"
170 -IUSE=""
171
172 -src_configure() {
173 - # bug #818802
174 - tc-ld-is-gold && tc-ld-force-bfd
175 - #tc-ld-disable-gold #369291
176 +PATCHES=(
177 + "${FILESDIR}/flags.patch"
178 +)
179 +
180 +src_prepare() {
181 + default
182 +
183 + eautoreconf
184 +}
185 +
186 +src_compile() {
187 + # bug #369291, bug #818802
188 + tc-ld-disable-gold
189
190 # Their configure script tries to do funky things with default
191 # compiler selection. Force our own defaults instead.
192 tc-export CC
193 - default
194 +
195 + econf
196 }
197
198 src_install() {
199 default
200 +
201 dodoc doc/gputils.pdf
202 }