[ftnchek] Add patch to stop modifying bison output - breaks builds with bison 2.6

Orion Poplawski orion at fedoraproject.org
Fri Nov 2 18:22:08 UTC 2012


commit 808b1cbc3566d01b2737ea1e3c022be0bbaecd25
Author: Orion Poplawski <orion at nwra.com>
Date:   Fri Nov 2 12:22:06 2012 -0600

    Add patch to stop modifying bison output - breaks builds with bison 2.6

 ftnchek-3.3.1-bison26.patch |   22 ++++++++++++++++++++++
 ftnchek.spec                |    8 +++++++-
 2 files changed, 29 insertions(+), 1 deletions(-)
---
diff --git a/ftnchek-3.3.1-bison26.patch b/ftnchek-3.3.1-bison26.patch
new file mode 100644
index 0000000..feb2ee6
--- /dev/null
+++ b/ftnchek-3.3.1-bison26.patch
@@ -0,0 +1,22 @@
+diff -up ftnchek-3.3.1/Makefile.in.bison26 ftnchek-3.3.1/Makefile.in
+--- ftnchek-3.3.1/Makefile.in.bison26	2012-11-02 12:13:05.323152582 -0600
++++ ftnchek-3.3.1/Makefile.in	2012-11-02 12:17:08.191192310 -0600
+@@ -346,17 +346,7 @@ ftnchek$(EXE): $(OBJS)
+ # since dependencies may have changed.
+ fortran.c: fortran.y
+ 	$(YACC) $(YFLAGS) fortran.y
+-	@if test "$(YACC_NAME)" = "bison$(EXE)" ; \
+-	then \
+-	  $(SED) -e '/yytname\[] =/,/^};/s/tok_//g' \
+-	         -e '/yytname\[] =/,/^};/s/_/ /g' \
+-	         -e '/yytname\[] =/,/^};/s/EOS/end of statement/g' \
+-		 -e  ':CAT'  -e '/^# *if.*\\$$/N' -e 's/\\\n//' -e tCAT \
+-		y.tab.c > fortran.c ; \
+-	  $(RM) y.tab.c ; \
+-	else \
+-	  $(MV) y.tab.c fortran.c ; \
+-	fi
++	@$(MV) y.tab.c fortran.c
+ 	@if $(CMP) -s y.tab.h tokdefs.h ; then true ; else \
+ 		echo; echo tokdefs.h changed -- repeat make ; \
+ 		$(CP) y.tab.h tokdefs.h; \
diff --git a/ftnchek.spec b/ftnchek.spec
index 2664c6f..6e01667 100644
--- a/ftnchek.spec
+++ b/ftnchek.spec
@@ -1,6 +1,6 @@
 Name:           ftnchek
 Version:        3.3.1
-Release:        14%{?dist}
+Release:        15%{?dist}
 Summary:        Static analyzer for Fortran 77 programs
 
 Group:          Development/Tools
@@ -9,6 +9,8 @@ URL:            http://www.dsm.fordham.edu/~ftnchek/
 Source0:        http://www.dsm.fordham.edu/~ftnchek/download/ftnchek-3.3.1.tar.gz
 Patch0:         ftnchek-3.3.1-datadir.patch
 Patch1:         http://www.dsm.fordham.edu/~ftnchek/download/ftnchek-3.3.1-varfmt.patch
+# Patch to support bison 2.6
+Patch2:         ftnchek-3.3.1-bison26.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires:  bison
@@ -55,6 +57,7 @@ Emacs. You don't need to install this package to support ftnchek under emacs.
 %setup -q
 %patch0 -p1 -b .datadir
 %patch1 -p1 -b .varfmt
+%patch2 -p1 -b .bison26
 #Stop configure from overriding CFLAGS
 sed -i -e 's/CFLAGS="-DUNIX.*"//' configure
 
@@ -94,6 +97,9 @@ rm -rf $RPM_BUILD_ROOT
 
 
 %changelog
+* Fri Nov 2 2012 Orion Poplawski <orion at cora.nwra.com> - 3.3.1-15
+- Add patch to stop modifying bison output - breaks builds with bison 2.6
+
 * Thu Jul 19 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 3.3.1-14
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
 


More information about the scm-commits mailing list