1 |
commit: 3541cb30d8e99d81178a468f709f9f4f821e55d1 |
2 |
Author: Patrice Clement <monsieurp <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Jun 1 07:13:51 2016 +0000 |
4 |
Commit: Patrice Clement <monsieurp <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Jun 1 07:14:05 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3541cb30 |
7 |
|
8 |
dev-util/yacc: Housekeeping + EAPI 6 bump. |
9 |
|
10 |
Package-Manager: portage-2.2.28 |
11 |
|
12 |
dev-util/yacc/files/yacc-1.9.1-mkstemp.patch | 15 +++++++ |
13 |
dev-util/yacc/yacc-1.9.1-r6.ebuild | 66 ++++++++++++++++++++++++++++ |
14 |
2 files changed, 81 insertions(+) |
15 |
|
16 |
diff --git a/dev-util/yacc/files/yacc-1.9.1-mkstemp.patch b/dev-util/yacc/files/yacc-1.9.1-mkstemp.patch |
17 |
new file mode 100644 |
18 |
index 0000000..5c72a6e |
19 |
--- /dev/null |
20 |
+++ b/dev-util/yacc/files/yacc-1.9.1-mkstemp.patch |
21 |
@@ -0,0 +1,15 @@ |
22 |
+--- a/main.c.orig 2002-12-17 14:28:54.000000000 -0500 |
23 |
++++ b/main.c 2002-12-17 14:29:31.000000000 -0500 |
24 |
+@@ -264,9 +264,9 @@ |
25 |
+ text_file_name[len + 5] = 't'; |
26 |
+ union_file_name[len + 5] = 'u'; |
27 |
+ |
28 |
+- mktemp(action_file_name); |
29 |
+- mktemp(text_file_name); |
30 |
+- mktemp(union_file_name); |
31 |
++ mkstemp(action_file_name); |
32 |
++ mkstemp(text_file_name); |
33 |
++ mkstemp(union_file_name); |
34 |
+ |
35 |
+ len = strlen(file_prefix); |
36 |
+ |
37 |
|
38 |
diff --git a/dev-util/yacc/yacc-1.9.1-r6.ebuild b/dev-util/yacc/yacc-1.9.1-r6.ebuild |
39 |
new file mode 100644 |
40 |
index 0000000..a8e9e4d |
41 |
--- /dev/null |
42 |
+++ b/dev-util/yacc/yacc-1.9.1-r6.ebuild |
43 |
@@ -0,0 +1,66 @@ |
44 |
+# Copyright 1999-2016 Gentoo Foundation |
45 |
+# Distributed under the terms of the GNU General Public License v2 |
46 |
+# $Id$ |
47 |
+ |
48 |
+EAPI=6 |
49 |
+ |
50 |
+inherit eutils toolchain-funcs |
51 |
+ |
52 |
+DESCRIPTION="Yacc: Yet Another Compiler-Compiler" |
53 |
+HOMEPAGE="http://dinosaur.compilertools.net/#yacc" |
54 |
+SRC_URI="ftp://metalab.unc.edu/pub/Linux/devel/compiler-tools/${P}.tar.Z" |
55 |
+ |
56 |
+LICENSE="public-domain" |
57 |
+SLOT="0" |
58 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" |
59 |
+IUSE="" |
60 |
+ |
61 |
+DEPEND="" |
62 |
+RDEPEND="" |
63 |
+ |
64 |
+PATCHES=( |
65 |
+ # mkstemp patch from byacc ebuild |
66 |
+ "${FILESDIR}"/${P}-mkstemp.patch |
67 |
+ |
68 |
+ # The following patch fixes yacc to run correctly on ia64 (and |
69 |
+ # other 64-bit arches). See bug 46233 |
70 |
+ "${FILESDIR}"/${P}-ia64.patch |
71 |
+ |
72 |
+ # avoid stack access error, bug 232005 |
73 |
+ "${FILESDIR}"/${P}-CVE-2008-3196.patch |
74 |
+) |
75 |
+ |
76 |
+src_prepare() { |
77 |
+ default |
78 |
+ |
79 |
+ # Use our CFLAGS and LDFLAGS |
80 |
+ sed -i -e 's: -O : $(CFLAGS) $(LDFLAGS) :' Makefile || die 'sed failed' |
81 |
+} |
82 |
+ |
83 |
+src_compile() { |
84 |
+ emake clean |
85 |
+ emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" |
86 |
+} |
87 |
+ |
88 |
+src_install() { |
89 |
+ dobin "${PN}" |
90 |
+ doman "${PN}.1" |
91 |
+ dodoc 00README* ACKNOWLEDGEMENTS NEW_FEATURES NO_WARRANTY NOTES README* |
92 |
+} |
93 |
+ |
94 |
+pkg_preinst() { |
95 |
+ # bison installs a /usr/bin/yacc symlink ... |
96 |
+ # we need to remove it to avoid triggering |
97 |
+ # collision-protect errors #90089 |
98 |
+ if [[ -L ${ROOT}/usr/bin/yacc ]]; then |
99 |
+ rm -v "${ROOT}"/usr/bin/yacc || die |
100 |
+ fi |
101 |
+} |
102 |
+ |
103 |
+pkg_postrm() { |
104 |
+ # and if we uninstall yacc but keep bison, |
105 |
+ # lets restore the /usr/bin/yacc symlink |
106 |
+ if [[ ! -e ${ROOT}/usr/bin/yacc ]] && [[ -e ${ROOT}/usr/bin/yacc.bison ]]; then |
107 |
+ ln -s yacc.bison "${ROOT}"/usr/bin/yacc || die |
108 |
+ fi |
109 |
+} |