[ncview] Add patch to use RPM_OPT_FLAGS (bug #696739)

Orion Poplawski orion at fedoraproject.org
Thu Apr 14 19:41:23 UTC 2011


commit 603198f67c6b6da49eb15a45bfaacf608fb436fe
Author: Orion Poplawski <orion at cora.nwra.com>
Date:   Thu Apr 14 13:41:27 2011 -0600

    Add patch to use RPM_OPT_FLAGS (bug #696739)

 ncview-2.0-cflags.patch |   26 ++++++++++++++++++++++++++
 ncview.spec             |    8 +++++++-
 2 files changed, 33 insertions(+), 1 deletions(-)
---
diff --git a/ncview-2.0-cflags.patch b/ncview-2.0-cflags.patch
new file mode 100644
index 0000000..4852a91
--- /dev/null
+++ b/ncview-2.0-cflags.patch
@@ -0,0 +1,26 @@
+--- ncview-2.0beta4/configure.cflags	2010-02-23 10:04:13.000000000 -0700
++++ ncview-2.0beta4/configure	2011-04-14 13:29:45.818993115 -0600
+@@ -5855,6 +5855,7 @@
+ XAW_LIBS=$LIBS
+ echo "X Athena widget (Xaw) libraries: $XAW_LIBS"
+ 
++CFLAGS=$CFLAGSsave
+ LIBS=$LIBSsave
+ 
+ #------------------------------------------------------------------------------
+@@ -5951,6 +5952,7 @@
+ X11_LIBS=$LIBS
+ echo "X11 libraries: $X11_LIBS"
+ 
++CFLAGS=$CFLAGSsave
+ LIBS=$LIBSsave
+ 
+ # Handle udunits2
+@@ -7282,6 +7284,7 @@
+ 	EXPAT_LIBS=$LIBS
+ 	echo "Expat libraries (needed by udunits2): $EXPAT_LIBS"
+ 	UDUNITS2_LDFLAGS="$UDUNITS2_LDFLAGS $LIBS"
++        CFLAGS=$CFLAGSsave
+ 	LIBS=$LIBSsave
+ fi
+ 
diff --git a/ncview.spec b/ncview.spec
index 0b4f259..b9b8ca2 100644
--- a/ncview.spec
+++ b/ncview.spec
@@ -1,11 +1,13 @@
 Name:           ncview
 Version:        2.0
-Release:        0.1.beta4%{?dist}
+Release:        0.2.beta4%{?dist}
 Summary:        A visual browser for netCDF format files
 Group:          Applications/Engineering
 License:        GPLv1
 URL:            http://meteora.ucsd.edu/~pierce/ncview_home_page.html
 Source0:        ftp://cirrus.ucsd.edu/pub/ncview/ncview-%{version}beta4.tar.gz
+#Patch to preserve CFLAGS in configure
+Patch0:         ncview-2.0-cflags.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires:  xorg-x11-proto-devel libXaw-devel libXt-devel libXext-devel
@@ -22,6 +24,7 @@ color maps, invert the data, etc.
 
 %prep
 %setup -q -n %{name}-%{version}beta4
+%patch0 -p1 -b .cflags
 
 %build
 make distclean
@@ -61,6 +64,9 @@ rm -rf $RPM_BUILD_ROOT
 
 
 %changelog
+* Thu Apr 14 2011 Orion Poplawski <orion at cora.nwra.com> - 2.0-0.2.beta4
+- Add patch to use RPM_OPT_FLAGS (bug #696739)
+
 * Wed Apr 6 2011 Orion Poplawski <orion at cora.nwra.com> - 2.0-0.1.beta4
 - Update to 2.0beta4
 


More information about the scm-commits mailing list