]> git.pld-linux.org Git - packages/csstidy.git/commitdiff
- add optflags patch; rel 1
authorElan Ruusamäe <glen@pld-linux.org>
Thu, 10 Dec 2009 14:49:20 +0000 (14:49 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    csstidy.spec -> 1.11
    scons-optflags.patch -> 1.1

csstidy.spec
scons-optflags.patch [new file with mode: 0644]

index e6be231e5a3283bfbc6766a3b01eebd09c69b14e..967d7737a858d8a525784aa4a7a66c8ee0fc2a98 100644 (file)
@@ -1,16 +1,15 @@
-# TODO
-# - optlfags
 Summary:       Open Source CSS parser and optimiser
 Summary(pl.UTF-8):     Analizator i optymalizator CSS z otwartymi źródłami
 Name:          csstidy
 Version:       1.4
-Release:       0.3
+Release:       1
 License:       GPL v2+
 Group:         Applications/WWW
 Source0:       http://dl.sourceforge.net/project/csstidy/CSSTidy%20%28C%2B%2B%2C%20stable%29/1.3/%{name}-source-%{version}.zip
-# Source0-md5: 7087cc0c6cfdb42a3e796621a5d12a09
+# Source0-md5: 8fcbf5c1c3cafd9232552b3286aabcb9
 Source1:       http://ftp.debian.org/debian/pool/main/c/csstidy/%{name}_%{version}-3.diff.gz
-# Source1-md5: 8fcbf5c1c3cafd9232552b3286aabcb9
+# Source1-md5: 7087cc0c6cfdb42a3e796621a5d12a09
+Patch0:                scons-optflags.patch
 URL:           http://csstidy.sourceforge.net/
 BuildRequires: libstdc++-devel
 BuildRequires: sed >= 4.0
@@ -36,6 +35,7 @@ przeznaczony do sprawdzania poprawności CSS.
 %{__gzip} -dc %{S:1} | %{__patch} -p1
 %{__patch} -p1 < debian/patches/001_emptyfile.dpatch
 %{__patch} -p1 < debian/patches/002_gcc43fix.dpatch
+%patch0 -p1
 
 %build
 %scons
diff --git a/scons-optflags.patch b/scons-optflags.patch
new file mode 100644 (file)
index 0000000..6ad5157
--- /dev/null
@@ -0,0 +1,57 @@
+--- csstidy-1.4/SConstruct~    2009-12-10 16:46:51.000000000 +0200
++++ csstidy-1.4/SConstruct     2009-12-10 16:46:55.184590309 +0200
+@@ -12,13 +12,24 @@
+ #tell the user what we're doing
+ print '**** Compiling in ' + mymode + ' mode...'
+-debugcflags = ['-Wall', '-g', '-pedantic']   #extra compile flags for debug
+-releasecflags = ['-O2']         #extra compile flags for release
++CXX = ARGUMENTS.get('CXX')
++CXXFLAGS = ARGUMENTS.get('CXXFLAGS')
++
++if CXXFLAGS:
++      debugcxxflags = releasecxxflags = CXXFLAGS.split(' ');
++else:
++      debugcxxflags = ['-Wall', '-g', '-pedantic']   #extra compile flags for debug
++      releasecxxflags = ['-O2']         #extra compile flags for release
++
++if CXX:
++      debugcxx = releasecxx = CXX
++else:
++      debugcxx = releasecxx = 'g++'
+ env = Environment()
+ #make sure the sconscripts can get to the variables
+-Export('env', 'mymode', 'debugcflags', 'releasecflags')
++Export('env', 'mymode', 'debugcxx', 'debugcxxflags', 'releasecxx', 'releasecxxflags')
+ #put all .sconsign files in one place
+ env.SConsignFile()
+--- csstidy-1.4/csstidy/SConscript~    2009-12-10 16:46:42.000000000 +0200
++++ csstidy-1.4/csstidy/SConscript     2009-12-10 16:46:46.397716113 +0200
+@@ -3,8 +3,8 @@
+ import glob
+ #get all the build variables we need
+-Import('env', 'project', 'mymode', 'debugcflags', 'releasecflags')
+-localenv = env.Copy()
++Import('env', 'project', 'mymode', 'debugcxx', 'debugcxxflags', 'releasecxx', 'releasecxxflags')
++localenv = env.Clone()
+ buildroot = '../' + mymode  #holds the root of the build directory tree
+ builddir = buildroot + '/' + project   #holds the build directory for this project
+@@ -13,9 +13,11 @@
+ #append the user's additional compile flags
+ #assume debugcflags and releasecflags are defined
+ if mymode == 'debug':
+-    localenv.Append(CCFLAGS=debugcflags)
++    localenv['CXX']=debugcxx
++    localenv.Append(CXXFLAGS=debugcxxflags)
+ else:
+-    localenv.Append(CCFLAGS=releasecflags)
++    localenv['CXX']=releasecxx
++    localenv.Append(CXXFLAGS=releasecxxflags)
+ #specify the build directory
+ localenv.BuildDir(builddir, ".", duplicate=0)
This page took 0.064614 seconds and 4 git commands to generate.