[gyp] - Rebase to r840. - generate Makefile with RPM_OPT_FLAGS in CCFLAGS.

Akira TAGOH tagoh at fedoraproject.org
Fri Aug 20 05:34:21 UTC 2010


commit b9cc53388d9eeab3277ca62d9c298b17425a92b3
Author: Akira TAGOH <tagoh at redhat.com>
Date:   Fri Aug 20 14:34:12 2010 +0900

    - Rebase to r840.
    - generate Makefile with RPM_OPT_FLAGS in CCFLAGS.

 .gitignore            |    1 +
 gyp-rpmoptflags.patch |   38 ++++++++++++++++++++++++++++++++++++++
 gyp.spec              |   10 ++++++++--
 sources               |    2 +-
 4 files changed, 48 insertions(+), 3 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 5f98f45..8ac4972 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
 gyp-0.1-svn839.tar.bz2
+/gyp-0.1-svn840.tar.bz2
diff --git a/gyp-rpmoptflags.patch b/gyp-rpmoptflags.patch
new file mode 100644
index 0000000..8f30635
--- /dev/null
+++ b/gyp-rpmoptflags.patch
@@ -0,0 +1,38 @@
+Index: pylib/gyp/generator/make.py
+===================================================================
+--- pylib/gyp/generator/make.py	(revision 840)
++++ pylib/gyp/generator/make.py	(working copy)
+@@ -857,14 +857,30 @@
+     # Write configuration-specific variables for CFLAGS, etc.
+     for configname in sorted(configs.keys()):
+       config = configs[configname]
++      rpmoptflags = ['$(RPM_OPT_FLAGS)']
+       self.WriteList(config.get('defines'), 'DEFS_%s' % configname, prefix='-D',
+           quoter=EscapeCppDefine)
+       self.WriteLn("# Flags passed to both C and C++ files.");
+-      self.WriteList(config.get('cflags'), 'CFLAGS_%s' % configname)
++      cflags = config.get('cflags')
++      if cflags:
++        cflags += rpmoptflags
++      else:
++        cflags = rpmoptflags
++      self.WriteList(cflags, 'CFLAGS_%s' % configname)
+       self.WriteLn("# Flags passed to only C (and not C++) files.");
+-      self.WriteList(config.get('cflags_c'), 'CFLAGS_C_%s' % configname)
++      ccflags = config.get('cflags_c')
++      if ccflags:
++        ccflags += rpmoptflags
++      else:
++        ccflags = rpmoptflags
++      self.WriteList(ccflags, 'CFLAGS_C_%s' % configname)
+       self.WriteLn("# Flags passed to only C++ (and not C) files.");
+-      self.WriteList(config.get('cflags_cc'), 'CFLAGS_CC_%s' % configname)
++      cxxflags = config.get('cflags_cc')
++      if cxxflags:
++        cxxflags += rpmoptflags
++      else:
++        cxxflags = rpmoptflags
++      self.WriteList(cxxflags, 'CFLAGS_CC_%s' % configname)
+       includes = config.get('include_dirs')
+       if includes:
+         includes = map(Sourceify, map(self.Absolutify, includes))
diff --git a/gyp.spec b/gyp.spec
index 08f171c..0572bd1 100644
--- a/gyp.spec
+++ b/gyp.spec
@@ -1,4 +1,4 @@
-%global		revision	839
+%global		revision	840
 %{expand:	%%global	archivename	gyp-%{version}%{?revision:-svn%{revision}}}
 %if !(0%{?fedora} > 12 || 0%{?rhel} > 5)
 %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
@@ -6,7 +6,7 @@
 
 Name:		gyp
 Version:	0.1
-Release:	0.3%{?revision:.%{revision}svn}%{?dist}
+Release:	0.4%{?revision:.%{revision}svn}%{?dist}
 Summary:	Generate Your Projects
 
 Group:		Development/Tools
@@ -21,6 +21,7 @@ URL:		http://code.google.com/p/gyp/
 # 4. revision=$(svn info|grep -E "^Revision:"|cut -d' ' -f2)
 # 5. tar -a --exclude-vcs -cf /tmp/gyp-$version-svn$revision.tar.bz2 *
 Source0:	%{archivename}.tar.bz2
+Patch0:		gyp-rpmoptflags.patch
 
 BuildRequires:	python2-devel
 BuildArch:	noarch
@@ -36,6 +37,7 @@ irreconcilable differences.
 
 %prep
 %setup -q -c -n %{archivename}
+%patch0 -p0 -b .0-rpmoptflags
 for i in $(find pylib -name '*.py'); do
 	sed -e '\,#![ \t]*/.*python,{d}' $i > $i.new && touch -r $i $i.new && mv $i.new $i
 done
@@ -62,6 +64,10 @@ rm -rf $RPM_BUILD_ROOT
 
 
 %changelog
+* Fri Aug 20 2010 Akira TAGOH <tagoh at redhat.com> - 0.1-0.4.840svn
+- Rebase to r840.
+- generate Makefile with RPM_OPT_FLAGS in CCFLAGS.
+
 * Fri Aug  6 2010 Akira TAGOH <tagoh at redhat.com> - 0.1-0.3.839svn
 - Drop the unnecessary macro.
 
diff --git a/sources b/sources
index 45cde03..6fea56a 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-70d848e68e074fc794612499bb0c22c6  gyp-0.1-svn839.tar.bz2
+f6f80dea62bb25fa8e26374cfd35e6e1  gyp-0.1-svn840.tar.bz2


More information about the scm-commits mailing list