[pure-gen] Adjust test suite's expected pure-gen output on Fedora 17 and above

Michel Alexandre Salim salimma at fedoraproject.org
Tue Feb 14 11:49:44 UTC 2012


commit 5c243662e0b13feadcea77329a2fdf49db490c23
Author: Michel Alexandre Salim <salimma at fedoraproject.org>
Date:   Tue Feb 14 12:49:38 2012 +0100

    Adjust test suite's expected pure-gen output on Fedora 17 and above
    
    - Add runtime dependency on gcc
    - Explicitly pass prefix since auto-detection is broken by usrmove

 pure-gen-0.15-adjust_test_output.patch |   11 +++++++++++
 pure-gen.spec                          |   21 ++++++++++++++++-----
 2 files changed, 27 insertions(+), 5 deletions(-)
---
diff --git a/pure-gen-0.15-adjust_test_output.patch b/pure-gen-0.15-adjust_test_output.patch
new file mode 100644
index 0000000..9b21c8f
--- /dev/null
+++ b/pure-gen-0.15-adjust_test_output.patch
@@ -0,0 +1,11 @@
+--- pure-gen-0.15/run-tests.adjust_test_output	2011-07-15 00:08:30.000000000 +0200
++++ pure-gen-0.15/run-tests	2012-02-14 12:33:39.577694079 +0100
+@@ -34,6 +34,8 @@
+ DUMP_AST=dump-ast pure-gen dummy.h
+ $diff dummy.pure - > /dev/null <<EOF
+ /* dummy.h: */
++const linux = 1;
++const unix = 1;
+ const DUMMY = 99;
+ extern int rand();
+ EOF
diff --git a/pure-gen.spec b/pure-gen.spec
index 7531275..d182aff 100644
--- a/pure-gen.spec
+++ b/pure-gen.spec
@@ -3,17 +3,18 @@
 
 Name:           pure-gen
 Version:        0.15
-Release:        1%{?dist}
+Release:        2%{?dist}
 Summary:        A Pure C bindings generator
 
 License:        BSD
 URL:            http://code.google.com/p/pure-lang/
 Source0:        http://pure-lang.googlecode.com/files/pure-gen-%{version}.tar.gz
+Patch0:         pure-gen-0.15-adjust_test_output.patch
 
 BuildRequires:  llvm
 BuildRequires:  pure-devel
 BuildRequires:  ghc-language-c-devel
-#Requires:       
+Requires:       gcc
 
 %description
 A Pure C bindings generator. Written by Albert Graef, based on Scott
@@ -22,16 +23,21 @@ Dillard's original OpenGL bindings generator.
 
 %prep
 %setup -q
+%if 0%{?fedora} >= 17
+# pure-gen output contains additional lines
+%patch0 -p1 -b .adjust_test_output
+%endif
 
 
 %build
-# configure
-make libdir=%{_libdir} %{?_smp_mflags}
+# prefix auto-detection broken by usrmove,
+#  since /bin still appears before /usr/bin
+make prefix=%{_prefix} libdir=%{_libdir} %{?_smp_mflags}
 
 
 %install
 rm -rf $RPM_BUILD_ROOT
-make install libdir=%{_libdir} DESTDIR=$RPM_BUILD_ROOT
+make install prefix=%{_prefix} libdir=%{_libdir} DESTDIR=$RPM_BUILD_ROOT
 
 
 %check
@@ -46,6 +52,11 @@ make install libdir=%{_libdir} DESTDIR=$RPM_BUILD_ROOT
 
 
 %changelog
+* Tue Feb 14 2012 Michel Salim <salimma at fedoraproject.org> - 0.15-2
+- Adjust test suite's expected pure-gen output on Fedora 17 and above
+- Add runtime dependency on gcc
+- Explicitly pass prefix since auto-detection is broken by usrmove
+
 * Fri Feb  3 2012 Michel Salim <salimma at fedoraproject.org> - 0.15-1
 - Update to 0.15
 


More information about the scm-commits mailing list