1 |
commit: b94d129b68ecd2f75e51ab39a687e766e6c803e4 |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Sep 12 00:23:17 2021 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Sep 12 00:34:05 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b94d129b |
7 |
|
8 |
sys-devel/bison: add 3.8.1 (unkeyworded) |
9 |
|
10 |
This notably drops all patches. |
11 |
|
12 |
- We drop the conditional examples patch because Perl |
13 |
is not needed for building Bison. This was discussed |
14 |
upstream in the past [0] and upstream concluded that |
15 |
if it were needed, they would treat this as a bug. |
16 |
|
17 |
Fortunately, it's not - at least not anymore! |
18 |
|
19 |
Note that Perl _is_ still partially used for tests, |
20 |
but it falls back gracefully and skips the relevant |
21 |
tests if it's missing, and this isn't a problem for |
22 |
bootstrapping anyway. Just noting for completeness. |
23 |
|
24 |
My own testing confirms that Bison builds and installs |
25 |
(and as mentioned, even passes the tests it decides to run) |
26 |
when Perl is missing. |
27 |
|
28 |
To allow full coverage, we keep Perl as a conditional |
29 |
test dependency. Upstream refined the check further too [1] |
30 |
(I couldn't see the commit in the git history, but the change |
31 |
is applied to the final configure.ac, so that's fine.) |
32 |
|
33 |
- We still conditionally (for now?) install examples as they're ~200K |
34 |
and my aim was to just reduce the patches we're using, not completely |
35 |
alter our packaging of Bison right now. |
36 |
|
37 |
- We no longer apply a parallel build patch which has also been applied |
38 |
upstream [2]. It seemed to appply anyway, not checked if it was |
39 |
in the last release, but I think it was. |
40 |
|
41 |
Upstream had some fun (not their fault) with POSIX, so I'm not |
42 |
keywording this yet for more testing, but it should be fine because |
43 |
they ultimately decided to guard the new behaviour with POSIXLY_CORRECT=1 [3]. |
44 |
|
45 |
(This is why we didn't package 3.8.) |
46 |
|
47 |
[0] https://www.mail-archive.com/bug-bison <AT> gnu.org/msg03979.html |
48 |
[1] https://lists.gnu.org/archive/html/bison-patches/2019-10/msg00027.html |
49 |
[2] https://lists.gnu.org/archive/html/bug-bison/2020-09/msg00016.html |
50 |
[3] https://lists.gnu.org/archive/html/bug-automake/2021-09/msg00004.html |
51 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
52 |
|
53 |
sys-devel/bison/Manifest | 1 + |
54 |
sys-devel/bison/bison-3.8.1.ebuild | 96 ++++++++++++++++++++++++++++++++++++++ |
55 |
2 files changed, 97 insertions(+) |
56 |
|
57 |
diff --git a/sys-devel/bison/Manifest b/sys-devel/bison/Manifest |
58 |
index c3776521dd5..609f9ec5f9e 100644 |
59 |
--- a/sys-devel/bison/Manifest |
60 |
+++ b/sys-devel/bison/Manifest |
61 |
@@ -1,2 +1,3 @@ |
62 |
DIST bison-3.7.6-patches-01.tar.xz 10600 BLAKE2B c7907a327c2bbb82a2e575a864e71400f91cd4349a84f95b187ecaadefc1bfd595a91bce6c8c47e42423cace9cf78a4041fde3fdc489a4824aa3c10ca73be7cb SHA512 8f2ddee79b9678b9fd9a7a34f26d44f7c4472d0fc55c9fef8b418d27949b6a27309b7aa5ac3f4a5ad27c90ad7d92d824ffe767c77b0ed81de6b2897c91cd7560 |
63 |
DIST bison-3.7.6.tar.xz 2627180 BLAKE2B 2f1015b517e46ff0870378b4d0dd489c8c737f31b2b69146bd7fbbae1e3adcdff0e4837cfdf1d238e8660ecc2b310ce87ec8940ed4989278b3df6cbb2d464e54 SHA512 6c1c9b825fbd2c94b8903f03a7e68e6832599f7bbd8d3c49864537c11b038c45a15de02fd36128d662af314334c83515bbc132df84e9acc6c651e98649c65bad |
64 |
+DIST bison-3.8.1.tar.xz 2800372 BLAKE2B 0b70ee1b3ab8075540d9254cffdc1dfc9a9fb354d8b9b79dd3b097bf9a2235f892e120736e4195ad21ce8fbf3831c63b2d1a267a20a7abf85f0d72cdcdac1820 SHA512 f87978c41eca4db22de4f64feb3be92e44862d412f75dd84980045faf0f9e7f5a41b25bef8d4acd90743638eab61a7ac111444969d958fef5fe3535bac416921 |
65 |
|
66 |
diff --git a/sys-devel/bison/bison-3.8.1.ebuild b/sys-devel/bison/bison-3.8.1.ebuild |
67 |
new file mode 100644 |
68 |
index 00000000000..329c77559b3 |
69 |
--- /dev/null |
70 |
+++ b/sys-devel/bison/bison-3.8.1.ebuild |
71 |
@@ -0,0 +1,96 @@ |
72 |
+# Copyright 1999-2021 Gentoo Authors |
73 |
+# Distributed under the terms of the GNU General Public License v2 |
74 |
+ |
75 |
+EAPI=7 |
76 |
+ |
77 |
+inherit flag-o-matic |
78 |
+ |
79 |
+DESCRIPTION="A general-purpose (yacc-compatible) parser generator" |
80 |
+HOMEPAGE="https://www.gnu.org/software/bison/" |
81 |
+SRC_URI="mirror://gnu/${PN}/${P}.tar.xz" |
82 |
+ |
83 |
+LICENSE="GPL-2" |
84 |
+SLOT="0" |
85 |
+#KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" |
86 |
+IUSE="examples nls static test" |
87 |
+RESTRICT="!test? ( test )" |
88 |
+ |
89 |
+# gettext _IS_ required in RDEPEND because >=bison-3.7 links against |
90 |
+# libtextstyle.so!!! (see bug #740754) |
91 |
+DEPEND=" |
92 |
+ >=sys-devel/m4-1.4.16 |
93 |
+ >=sys-devel/gettext-0.21 |
94 |
+" |
95 |
+RDEPEND="${DEPEND}" |
96 |
+BDEPEND=" |
97 |
+ sys-devel/flex |
98 |
+ test? ( dev-lang/perl ) |
99 |
+" |
100 |
+ |
101 |
+DOCS=( AUTHORS ChangeLog NEWS README THANKS TODO ) # ChangeLog-2012 ChangeLog-1998 PACKAGING README-alpha README-release |
102 |
+ |
103 |
+src_prepare() { |
104 |
+ # Old logic when we needed to patch configure.ac |
105 |
+ # Keeping in case it's useful for future |
106 |
+ |
107 |
+ # Record date to avoid 'config.status --recheck' & regen of 'tests/package.m4' |
108 |
+ #touch -r configure.ac old.configure.ac || die |
109 |
+ #touch -r configure old.configure || die |
110 |
+ |
111 |
+ #eapply "${WORKDIR}"/patches |
112 |
+ #default |
113 |
+ |
114 |
+ # Restore date after patching |
115 |
+ #touch -r old.configure.ac configure.ac || die |
116 |
+ #touch -r old.configure configure || die |
117 |
+ |
118 |
+ # The makefiles make the man page depend on the configure script |
119 |
+ # which we patched above. Touch it to prevent regeneration. |
120 |
+ #touch doc/bison.1 || die #548778 #538300#9 |
121 |
+ |
122 |
+ default |
123 |
+ |
124 |
+ # Avoid regenerating the info page when the timezone is diff. #574492 |
125 |
+ sed -i '2iexport TZ=UTC' build-aux/mdate-sh || die |
126 |
+} |
127 |
+ |
128 |
+src_configure() { |
129 |
+ use static && append-ldflags -static |
130 |
+ |
131 |
+ local myeconfargs=( |
132 |
+ $(use_enable nls) |
133 |
+ ) |
134 |
+ |
135 |
+ econf "${myeconfargs[@]}" |
136 |
+} |
137 |
+ |
138 |
+src_install() { |
139 |
+ default |
140 |
+ |
141 |
+ # This one is installed by dev-util/yacc |
142 |
+ mv "${ED}"/usr/bin/yacc{,.bison} || die |
143 |
+ mv "${ED}"/usr/share/man/man1/yacc{,.bison}.1 || die |
144 |
+ |
145 |
+ # We do not need liby.a |
146 |
+ rm -r "${ED}"/usr/lib* || die |
147 |
+ |
148 |
+ # Examples are about 200K, so let's make them optional still for now. |
149 |
+ if ! use examples ; then |
150 |
+ rm -r "${ED}"/usr/share/doc/${PF}/examples/ || die |
151 |
+ fi |
152 |
+} |
153 |
+ |
154 |
+pkg_postinst() { |
155 |
+ local f="${EROOT}/usr/bin/yacc" |
156 |
+ if [[ ! -e ${f} ]] ; then |
157 |
+ ln -s yacc.bison "${f}" |
158 |
+ fi |
159 |
+} |
160 |
+ |
161 |
+pkg_postrm() { |
162 |
+ # clean up the dead symlink when we get unmerged #377469 |
163 |
+ local f="${EROOT}/usr/bin/yacc" |
164 |
+ if [[ -L ${f} && ! -e ${f} ]] ; then |
165 |
+ rm -f "${f}" |
166 |
+ fi |
167 |
+} |