[pth] Let build fail if test_std fails. Fix previous commit, so pth-config CFLAGS check passes again.

Michael Schwendt mschwendt at fedoraproject.org
Mon Oct 31 22:11:54 UTC 2011


commit dea27b5e7e24abcff53de95d752b3d1e99bcb3c4
Author: Michael Schwendt <mschwendt at fedoraproject.org>
Date:   Mon Oct 31 23:11:48 2011 +0100

    Let build fail if test_std fails.
    Fix previous commit, so pth-config CFLAGS check passes again.

 pth-2.0.7-test_std.patch |   12 ++++++++++++
 pth.spec                 |   19 ++++++++++++++-----
 2 files changed, 26 insertions(+), 5 deletions(-)
---
diff --git a/pth-2.0.7-test_std.patch b/pth-2.0.7-test_std.patch
new file mode 100644
index 0000000..2668db9
--- /dev/null
+++ b/pth-2.0.7-test_std.patch
@@ -0,0 +1,12 @@
+diff -Nur pth-2.0.7-orig/Makefile.in pth-2.0.7/Makefile.in
+--- pth-2.0.7-orig/Makefile.in	2006-06-08 19:54:01.000000000 +0200
++++ pth-2.0.7/Makefile.in	2011-10-31 22:36:22.784082615 +0100
+@@ -340,7 +340,7 @@
+ #   execute and debug one of the test programs
+ test: test-std
+ test-std: test_std
+-	- at ./test_std; \
++	@./test_std; \
+ 	if [ $$? -eq 0 ]; then \
+ 	    touch .done-test >/dev/null 2>&1 || $(TRUE); \
+ 	    if [ ".`grep $(PLATFORM) $(S)PORTING`" = . ]; then \
diff --git a/pth.spec b/pth.spec
index 825c107..398f293 100644
--- a/pth.spec
+++ b/pth.spec
@@ -1,7 +1,7 @@
 Summary:        The GNU Portable Threads library
 Name:           pth
 Version:        2.0.7
-Release:        12%{?dist}
+Release:        13%{?dist}
 License:        LGPLv2+
 Group:          System Environment/Libraries
 URL:            http://www.gnu.org/software/pth/
@@ -9,6 +9,7 @@ Source:         ftp://ftp.gnu.org/gnu/pth/pth-%{version}.tar.gz
 Source1:        ftp://ftp.gnu.org/gnu/pth/pth-%{version}.tar.gz.sig
 Patch1:         pth-2.0.7-dont-remove-gcc-g.patch
 Patch2:         pth-2.0.7-config-script.patch
+Patch3:         pth-2.0.7-test_std.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 %description
@@ -32,13 +33,17 @@ Development headers and libraries for GNU Pth.
 %setup -q
 %patch1 -p1 -b .dont-remove-gcc-g
 %patch2 -p1 -b .config-script
+%patch3 -p1 -b .test_std
 
 
 %build
+OUR_CFLAGS="${RPM_OPT_FLAGS}"
+
 %ifarch %{arm}
-CFLAGS="$(echo $RPM_OPT_FLAGS | sed -e 's/-Wp,-D_FORTIFY_SOURCE=2/-D_FORTIFY_SOURCE=0/g')"
+OUR_CFLAGS=$(echo "${RPM_OPT_FLAGS}" | sed -e 's/-Wp,-D_FORTIFY_SOURCE=2/-D_FORTIFY_SOURCE=0/g')
 %endif
 
+CFLAGS="${OUR_CFLAGS}"
 %configure --disable-static ac_cv_func_sigstack='no'
 
 # Work around multiarch conflicts in the pth-config script in order
@@ -52,10 +57,10 @@ if [ "%_libdir" == "/usr/lib64" ] ; then
         exit 1
     fi
 fi
-if grep -e "$RPM_OPT_FLAGS" pth-config ; then
+if [ -v OUR_CFLAGS ] && grep -e "${OUR_CFLAGS}" pth-config ; then
     # Remove our extra CFLAGS from the pth-config script, since they
     # don't belong in there.
-    sed -i -e "s!$RPM_OPT_FLAGS!!g" pth-config
+    [ -n "${OUR_CFLAGS}" ] && sed -i -e "s!${OUR_CFLAGS}!!g" pth-config
 else
     echo "ERROR: Revisit the multiarch CFLAGS fix for pth-config!"
     exit 1
@@ -106,8 +111,12 @@ rm -rf $RPM_BUILD_ROOT
 
 
 %changelog
+* Mon Oct 31 2011 Michael Schwendt <mschwendt at fedoraproject.org> - 2.0.7-13
+- Let build fail if test_std fails.
+- Fix previous commit, so pth-config CFLAGS check passes again.
+
 * Mon Oct 31 2011 Chris Tyler <chris at tylers.info> - 2.0.7-12
-- Removed FORTIFY_SOURCE for %{arm} archs per Ajay Ramaswamy <ajayr at krithika.net>
+- Removed FORTIFY_SOURCE for %%{arm} archs per Ajay Ramaswamy <ajayr at krithika.net>
 - See https://bugzilla.redhat.com/show_bug.cgi?id=750243
 
 * Fri Sep 16 2011 Michael Schwendt <mschwendt at fedoraproject.org> - 2.0.7-11


More information about the scm-commits mailing list