summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAron Griffis <agriffis@gentoo.org>2004-04-05 04:03:23 +0000
committerAron Griffis <agriffis@gentoo.org>2004-04-05 04:03:23 +0000
commit66c323a0c53400837ddb993ea7877c4de210d84c (patch)
tree9bf537f9a6f7b1d044b5aa157c76fde95827b876 /dev-util/yacc
parentAdd patch from Jaime Alvaro Moreno in bug 46233 to make byacc work correctly ... (diff)
downloadgentoo-2-66c323a0c53400837ddb993ea7877c4de210d84c.tar.gz
gentoo-2-66c323a0c53400837ddb993ea7877c4de210d84c.tar.bz2
gentoo-2-66c323a0c53400837ddb993ea7877c4de210d84c.zip
Propogate CFLAGS to Makefile in a sed-safe way. Use 64-bit patch from bug 46233 (also applied to byacc)
Diffstat (limited to 'dev-util/yacc')
-rw-r--r--dev-util/yacc/ChangeLog7
-rw-r--r--dev-util/yacc/files/mkstemp.patch15
-rw-r--r--dev-util/yacc/files/yacc-1.9.1-ia64.patch24
-rw-r--r--dev-util/yacc/yacc-1.9.1-r1.ebuild21
4 files changed, 61 insertions, 6 deletions
diff --git a/dev-util/yacc/ChangeLog b/dev-util/yacc/ChangeLog
index d06066742f60..ca43f824e027 100644
--- a/dev-util/yacc/ChangeLog
+++ b/dev-util/yacc/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for dev-util/yacc
# Copyright 2002-2004 Gentoo Technologies, Inc.; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-util/yacc/ChangeLog,v 1.10 2004/03/05 14:18:14 tgall Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-util/yacc/ChangeLog,v 1.11 2004/04/05 04:03:23 agriffis Exp $
+
+ 05 Apr 2004; Aron Griffis <agriffis@gentoo.org> yacc-1.9.1-r1.ebuild,
+ files/mkstemp.patch, files/yacc-1.9.1-ia64.patch:
+ Propogate CFLAGS to Makefile in a sed-safe way. Use 64-bit patch from bug
+ 46233 (also applied to byacc)
05 Mar 2004; Tom Gall <tgall@gentoo.org> yacc-1.9.1-r1.ebuild:
Stable on ppc64
diff --git a/dev-util/yacc/files/mkstemp.patch b/dev-util/yacc/files/mkstemp.patch
new file mode 100644
index 000000000000..f037e331fb5b
--- /dev/null
+++ b/dev-util/yacc/files/mkstemp.patch
@@ -0,0 +1,15 @@
+--- main.c.orig 2002-12-17 14:28:54.000000000 -0500
++++ main.c 2002-12-17 14:29:31.000000000 -0500
+@@ -264,9 +264,9 @@
+ text_file_name[len + 5] = 't';
+ union_file_name[len + 5] = 'u';
+
+- mktemp(action_file_name);
+- mktemp(text_file_name);
+- mktemp(union_file_name);
++ mkstemp(action_file_name);
++ mkstemp(text_file_name);
++ mkstemp(union_file_name);
+
+ len = strlen(file_prefix);
+
diff --git a/dev-util/yacc/files/yacc-1.9.1-ia64.patch b/dev-util/yacc/files/yacc-1.9.1-ia64.patch
new file mode 100644
index 000000000000..c10e88541287
--- /dev/null
+++ b/dev-util/yacc/files/yacc-1.9.1-ia64.patch
@@ -0,0 +1,24 @@
+--- byacc-1.9/defs.h.busted Sat May 6 21:10:56 2000
++++ byacc-1.9/defs.h Sat May 6 21:11:22 2000
+@@ -1,7 +1,8 @@
+ #include <assert.h>
+ #include <ctype.h>
+ #include <stdio.h>
+-
++#include <string.h>
++#include <stdlib.h>
+
+ /* machine-dependent definitions */
+ /* the following definitions are for the Tahoe */
+@@ -280,10 +281,3 @@
+ extern int errno;
+
+
+-/* system functions */
+-
+-extern void free();
+-extern char *calloc();
+-extern char *malloc();
+-extern char *realloc();
+-extern char *strcpy();
+
diff --git a/dev-util/yacc/yacc-1.9.1-r1.ebuild b/dev-util/yacc/yacc-1.9.1-r1.ebuild
index d45e0df82fc6..b888ad88fa7d 100644
--- a/dev-util/yacc/yacc-1.9.1-r1.ebuild
+++ b/dev-util/yacc/yacc-1.9.1-r1.ebuild
@@ -1,6 +1,8 @@
# Copyright 1999-2004 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-util/yacc/yacc-1.9.1-r1.ebuild,v 1.24 2004/03/13 01:44:56 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-util/yacc/yacc-1.9.1-r1.ebuild,v 1.25 2004/04/05 04:03:23 agriffis Exp $
+
+inherit eutils
DESCRIPTION="Yacc"
HOMEPAGE="http://dinosaur.compilertools.net/#yacc"
@@ -10,18 +12,27 @@ LICENSE="as-is"
SLOT="0"
KEYWORDS="x86 ppc ppc64 sparc alpha mips hppa amd64 ia64 s390"
-DEPEND="virtual/glibc"
+RDEPEND="virtual/glibc"
+DEPEND="${RDEPEND} >=sys-apps/sed-4"
src_unpack () {
unpack ${A}
cd ${S}
- cp Makefile Makefile.orig
- sed -e "s:-O:${CFLAGS}:" Makefile.orig > Makefile
+
+ # Use our CFLAGS
+ sed -i -e 's: -O : $(CFLAGS) :' Makefile || die 'sed failed'
+
+ # mkstemp patch from byacc ebuild
+ epatch ${FILESDIR}/mkstemp.patch
+
+ # The following patch fixes yacc to run correctly on ia64 (and
+ # other 64-bit arches). See bug 46233
+ epatch ${FILESDIR}/yacc-1.9.1-ia64.patch
}
src_compile() {
make clean || die
- make || die
+ make CFLAGS="${CFLAGS}" || die
}
src_install() {