commit:     284d5a25df8d884fe6f71f5019ccaa21f0d677eb
Author:     Nicholas Vinson <nvinson234 <AT> gmail <DOT> com>
AuthorDate: Thu Jan  5 03:31:17 2017 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Thu Jan  5 06:49:55 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=284d5a25

x11-wm/amiwm: patch to add flex 2.6.3 support

Package-Manager: Portage-2.3.3, Repoman-2.3.1
Closes: https://github.com/gentoo/gentoo/pull/3333

 x11-wm/amiwm/amiwm-0.21_p2.ebuild                  |  5 ++--
 .../amiwm/files/amiwm-0.21_p2-flex-2.6.3-fix.patch | 31 ++++++++++++++++++++++
 2 files changed, 34 insertions(+), 2 deletions(-)

diff --git a/x11-wm/amiwm/amiwm-0.21_p2.ebuild 
b/x11-wm/amiwm/amiwm-0.21_p2.ebuild
index 466c8be..462fed4 100644
--- a/x11-wm/amiwm/amiwm-0.21_p2.ebuild
+++ b/x11-wm/amiwm/amiwm-0.21_p2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2011 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
@@ -37,7 +37,8 @@ pkg_setup() {
 
 src_prepare() {
        epatch "${FILESDIR}"/${P}-gentoo.diff \
-               "${FILESDIR}"/${P}-implicts.patch
+               "${FILESDIR}"/${P}-implicts.patch \
+               "${FILESDIR}"/${P}-flex-2.6.3-fix.patch
        sed -i -e "s:\$(exec_prefix)/lib:\$(exec_prefix)/$(get_libdir):" \
                Makefile.in || die
        sed -i -e "s:/bin/ksh:/bin/sh:g" Xsession{,2}.in || die

diff --git a/x11-wm/amiwm/files/amiwm-0.21_p2-flex-2.6.3-fix.patch 
b/x11-wm/amiwm/files/amiwm-0.21_p2-flex-2.6.3-fix.patch
new file mode 100644
index 00000000..ae89aaf
--- /dev/null
+++ b/x11-wm/amiwm/files/amiwm-0.21_p2-flex-2.6.3-fix.patch
@@ -0,0 +1,31 @@
+--- amiwm0.21pl2/lex.l
++++ amiwm0.21pl2/lex.l
+@@ -1,5 +1,6 @@
++%option noyywrap
+ %{
+ #include <stdio.h>
+ #include "gram.h"
+ extern char *progname;
+ extern int ParseError;
+--- amiwm0.21pl2/kbdlexer.l
++++ amiwm0.21pl2/kbdlexer.l
+@@ -1,5 +1,6 @@
++%option noyywrap
+ %{
+ #include <X11/Xmu/CharSet.h>
+ #include <string.h>
+ 
+ #include "libami.h"
+@@ -134,12 +135,9 @@ int parse_keyword(char *str, YYSTYPE *va
+ 
+ .               { fprintf(stderr, "%s: illegal character \"%s\" ignored\n",
+                           progname, yytext); }
+ %%
+ 
+-#ifndef yywrap
+-int yywrap() { return 1; }
+-#endif
+ #undef input
+ #define input() ((*inptr)?(*inptr++):0)
+ #undef unput
+ #define unput(c) (*--inptr=c)

Reply via email to